From 4e472ee0ce10aac83a2aeef8954376bde54daaec Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Fri, 18 Oct 2024 07:56:20 +0300 Subject: [PATCH 001/124] Usability Params for Set-EntraUserExtension --- .../customizations/Set-EntraUserExtension.ps1 | 109 ++++++++++++++++++ .../Set-EntraUserExtension.md | 10 +- 2 files changed, 114 insertions(+), 5 deletions(-) create mode 100644 module/Entra/customizations/Set-EntraUserExtension.ps1 diff --git a/module/Entra/customizations/Set-EntraUserExtension.ps1 b/module/Entra/customizations/Set-EntraUserExtension.ps1 new file mode 100644 index 0000000000..8386204f3b --- /dev/null +++ b/module/Entra/customizations/Set-EntraUserExtension.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +@{ + SourceName = "Set-AzureADUserExtension" + TargetName = $null + Parameters = $null + Outputs = $null + CustomScript = @' + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionNameValues, + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionValue, + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionName + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ExtensionNameValues"]) + { + $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] + } + if ($null -ne $PSBoundParameters["ExtensionValue"]) + { + $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ExtensionName"]) + { + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgUserExtension @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserId -Value Id + + } + } + $response + } +'@ +} diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserExtension.md index c5a2cd40ee..82ec532e91 100644 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserExtension.md +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserExtension.md @@ -26,7 +26,7 @@ Sets a user extension. ```powershell Set-EntraUserExtension - -ObjectId + -UserId [] ``` @@ -41,7 +41,7 @@ The `Set-EntraUserExtension` cmdlet updates a user extension in Microsoft Entra ```powershell Connect-Entra -Scopes 'User.ReadWrite.All' $params = @{ - ObjectId = 'SawyerM@contoso.com' + UserId = 'SawyerM@contoso.com' ExtensionName = 'extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8' ExtensionValue = 'New Value' } @@ -50,15 +50,15 @@ Set-EntraUserExtension @params This example shows how to update the value of the extension attribute for a specified user. -- `-ObjectId` parameter specifies the user Id. +- `-UserId` parameter specifies the user Id. - `-ExtensionName` parameter specifies the name of an extension. - `-ExtensionValue` parameter specifies the extension name values. ## Parameters -### -ObjectId +### -UserId -Specifies the ID of an object. +Specifies the ID of the user. ```yaml Type: System.String From 2e4d8418d25338559119804ecd65eb923a10e2f2 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:47:50 +0300 Subject: [PATCH 002/124] Added module splitter and psm1 builder --- src/EntraModuleBuilder.ps1 | 144 +++++++++++++++++ src/EntraModuleSplitter.ps1 | 312 ++++++++++++++++++++++++++++++++++++ 2 files changed, 456 insertions(+) create mode 100644 src/EntraModuleBuilder.ps1 create mode 100644 src/EntraModuleSplitter.ps1 diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 new file mode 100644 index 0000000000..4d863324dc --- /dev/null +++ b/src/EntraModuleBuilder.ps1 @@ -0,0 +1,144 @@ +# This class builds the submodules i.e. generate the .psm1 file, help-xml and .psd1 file +class EntraModuleBuilder { + [string]$headerText + + EntraModuleBuilder() { + $this.headerText = @" +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +Set-StrictMode -Version 5 +"@ + } + + [string] ResolveStartDirectory([string]$directory) { + return Resolve-Path -Path $directory + } + + [bool] CheckTypedefsFile([string]$typedefsFilePath) { + if (-not (Test-Path -Path $typedefsFilePath)) { + Write-Host "[EntraModuleBuilder] Error: Typedefs.txt file not found at $typedefsFilePath" -ForegroundColor Red + return $false + } else { + Write-Host "[EntraModuleBuilder] Typedefs.txt found at $typedefsFilePath" -ForegroundColor Cyan + return $true + } + } + + [void] EnsureDestinationDirectory([string]$destDirectory) { + if (-not (Test-Path -Path $destDirectory)) { + New-Item -ItemType Directory -Path $destDirectory | Out-Null + Write-Host "[EntraModuleBuilder] Created destination directory: $destDirectory" -ForegroundColor Green + } + } + + [string[]] RemoveHeader([string[]]$content) { + $inHeader = $false + $filteredContent = @() + + foreach ($line in $content) { + $trimmedLine = $line.Trim() + + if ($trimmedLine -eq '# ------------------------------------------------------------------------------') { + $inHeader = -not $inHeader + continue + } + + if (-not $inHeader) { + $filteredContent += $line + } + } + + return $filteredContent + } + + [void] ProcessSubDirectory([string]$currentDirPath, [string]$currentDirName, [string]$parentDirName, [string]$destDirectory, [string]$typedefsFilePath) { + Write-Host "[EntraModuleBuilder] Processing directory: $currentDirPath" -ForegroundColor Yellow + + $psm1FileName = "$parentDirName.$currentDirName.psm1" + $psm1FilePath = Join-Path -Path $destDirectory -ChildPath $psm1FileName + + Write-Host "[EntraModuleBuilder] Creating .psm1 file: $psm1FilePath" -ForegroundColor Green + + $psm1Content = $this.headerText + "`n" # Add a newline after the header + $ps1Files = Get-ChildItem -Path $currentDirPath -Filter "*.ps1" + + if ($ps1Files.Count -eq 0) { + Write-Host "[EntraModuleBuilder] Warning: No .ps1 files found in directory $currentDirPath" -ForegroundColor Yellow + } + + $enableEntraFiles = @() + $otherFiles = @() + + foreach ($ps1File in $ps1Files) { + if ($ps1File.Name -like "Enable-Entra*") { + $enableEntraFiles += $ps1File + } else { + $otherFiles += $ps1File + } + } + + foreach ($ps1File in $otherFiles) { + Write-Host "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan + $fileContent = Get-Content -Path $ps1File.FullName + $cleanedContent = $this.RemoveHeader($fileContent) + $psm1Content += $cleanedContent -join "`n" + } + + foreach ($ps1File in $enableEntraFiles) { + Write-Host "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan + $fileContent = Get-Content -Path $ps1File.FullName + $cleanedContent = $this.RemoveHeader($fileContent) + $psm1Content += $cleanedContent -join "`n" + } + + Write-Host "[EntraModuleBuilder] Appending content from Typedefs.txt" -ForegroundColor Cyan + $typedefsContent = Get-Content -Path $typedefsFilePath -Raw + $psm1Content += "`n# Typedefs`n" + $typedefsContent + + Write-Host "[EntraModuleBuilder] Writing .psm1 file to disk: $psm1FilePath" -ForegroundColor Green + Set-Content -Path $psm1FilePath -Value $psm1Content + + Write-Host "[EntraModuleBuilder] Module file created: $psm1FilePath" -ForegroundColor Green + } + + [void] CreateSubModuleFile([string]$startDirectory, [string]$typedefsFilePath) { + Write-Host "[EntraModuleBuilder] Starting CreateSubModuleFile script..." -ForegroundColor Green + + $resolvedStartDirectory = $this.ResolveStartDirectory($startDirectory) + + if (-not ($this.CheckTypedefsFile($typedefsFilePath))) { + return + } + + if (-not (Test-Path -Path $resolvedStartDirectory)) { + Write-Host "[EntraModuleBuilder] Error: Start directory not found: $resolvedStartDirectory" -ForegroundColor Red + return + } else { + Write-Host "[EntraModuleBuilder] Processing directories inside: $resolvedStartDirectory" -ForegroundColor Cyan + } + + $subDirectories = Get-ChildItem -Path $resolvedStartDirectory -Directory + + $parentDirPath = Get-Item $resolvedStartDirectory + $parentDirName = $parentDirPath.Name + + $destDirectory = Join-Path -Path (Get-Location) -ChildPath "dest" + $this.EnsureDestinationDirectory($destDirectory) + + foreach ($subDir in $subDirectories) { + $this.ProcessSubDirectory($subDir.FullName, $subDir.Name, $parentDirName, $destDirectory, $typedefsFilePath) + } + + Write-Host "[EntraModuleBuilder] CreateSubModuleFile script completed." -ForegroundColor Green + } +} + +# Call the function with the appropriate starting directory and typedefs file path +try { + $moduleBuilder = [EntraModuleBuilder]::new() + $moduleBuilder.CreateSubModuleFile(".\Entra-Modules\Microsoft.Graph.Entra\", ".\Typedefs.txt") +} catch { + Write-Host "[EntraModuleBuilder] $_.Exception.Message" -ForegroundColor Red +} diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 new file mode 100644 index 0000000000..6b7532a79e --- /dev/null +++ b/src/EntraModuleSplitter.ps1 @@ -0,0 +1,312 @@ +# This class splits the larger Microsoft.Graph.Entra.psm1 or Microsoft.Graph.Entra.Beta.psm1 into separate files and also constructrs the submodule directories +class EntraModuleSplitter { + [string]$Header + + EntraModuleSplitter() { + $this.Header = @" +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +"@ + } + + [void] CreateOutputDirectory([string]$directoryPath) { + if (-not (Test-Path -Path $directoryPath)) { + New-Item -ItemType Directory -Path $directoryPath | Out-Null + Write-Host "[EntraModuleSplitter] Created directory: $directoryPath" -ForegroundColor Green + } + } + + [string] GetModuleFilePath([string]$source) { + if ($source -eq 'Entra') { + return ".\entra-powershell\bin\Microsoft.Graph.Entra.psm1" + } else { + return ".\entra-powershell\bin\Microsoft.Graph.Entra.Beta.psm1" + } + } + + [string] GetOutputDirectory([string]$source) { + if ($source -eq 'Entra') { + return ".\Entra-Modules" + } else { + return ".\Entra-BetaModules" + } + } + + [PSCustomObject] ReadJsonFile([string]$jsonFilePath) { + return Get-Content -Path $jsonFilePath | ConvertFrom-Json + } + + [array] ExtractFunctions([string]$content) { + $functions = @() + $inFunction = $false + $depth = 0 + $currentFunction = "" + $currentFunctionName = "" + + foreach ($line in $content -split "`r?`n") { + if (-not $inFunction) { + if ($line -match "^function\s+([a-zA-Z0-9_-]+)") { + $inFunction = $true + $currentFunctionName = $matches[1] + $currentFunction = $line + "`n" + $depth = ($line -split "{").Count - ($line -split "}").Count + continue + } + } else { + $currentFunction += $line + "`n" + $depth += ($line -split "{").Count - ($line -split "}").Count + + if ($depth -eq 0) { + $functions += [pscustomobject]@{ Name = $currentFunctionName; Content = $currentFunction } + $inFunction = $false + $currentFunction = "" + $currentFunctionName = "" + } + } + } + + return $functions + } + + [void] ProcessFunction([pscustomobject]$function, [string]$specificFunctionName, [string]$moduleOutputDirectory, [PSCustomObject]$jsonContent, [string]$header, [string]$unmappedDirectory) { + $functionName = $function.Name + $functionContent = $function.Content + $ps1Content = $header + "`n" + $functionContent + + # Check for specific function + if ($functionName -eq $specificFunctionName) { + $topLevelOutputPath = Join-Path -Path $moduleOutputDirectory -ChildPath "$specificFunctionName.ps1" + Set-Content -Path $topLevelOutputPath -Value $ps1Content + Write-Host "[EntraModuleSplitter] Created specific function file: $topLevelOutputPath" -ForegroundColor Cyan + return + } + + $isMapped = $false + + foreach ($key in $jsonContent.PSObject.Properties.Name) { + if ($functionName -like "*Dir*") { + $key = 'Directory' + } + + if ($functionName -like "*$key*") { + $keyDirectoryPath = if ($functionName -like "*Device*") { + Join-Path -Path $moduleOutputDirectory -ChildPath "Device" + } else { + Join-Path -Path $moduleOutputDirectory -ChildPath $key + } + + $this.CreateOutputDirectory($keyDirectoryPath) + + $outputFilePath = Join-Path -Path $keyDirectoryPath -ChildPath "$functionName.ps1" + Set-Content -Path $outputFilePath -Value $ps1Content + Write-Host "[EntraModuleSplitter] Created function file: $outputFilePath in $keyDirectoryPath" -ForegroundColor Green + $isMapped = $true + break + } + } + + if (-not $isMapped) { + $unmappedFilePath = Join-Path -Path $unmappedDirectory -ChildPath "$functionName.ps1" + Set-Content -Path $unmappedFilePath -Value $ps1Content + Write-Host "[EntraModuleSplitter] Created unmapped function file: $unmappedFilePath in UnMappedFiles" -ForegroundColor Red + } + } + + + + [void] SplitEntraModule([string]$Source = 'Entra') { + # Determine file paths and output directories + $psm1FilePath = $this.GetModuleFilePath($Source) + $outputDirectory = $this.GetOutputDirectory($Source) + $jsonFilePath = ".\key-value-pairs.json" + + $this.CreateOutputDirectory($outputDirectory) + $unmappedDirectory = Join-Path -Path $outputDirectory -ChildPath "UnMappedFiles" + $this.CreateOutputDirectory($unmappedDirectory) + + $jsonContent = $this.ReadJsonFile($jsonFilePath) + $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1FilePath) + $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName + $this.CreateOutputDirectory($moduleOutputDirectory) + + $psm1Content = Get-Content -Path $psm1FilePath -Raw + $functions = $this.ExtractFunctions($psm1Content) + + # Initialize a variable to track if the specific function is processed + $specificFunctionName = if ($moduleName -eq "Microsoft.Graph.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAlias" } + + foreach ($function in $functions) { + $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) + } + + Write-Host "[EntraModuleSplitter] Splitting and organizing complete." -ForegroundColor Green + } + + [void] ProcessEntraAzureADAliases([string]$Module = 'Entra') { + # Set the start directory and alias file path based on the Module parameter + $startDirectory, $aliasFilePath = $this.GetModuleDirectories($Module) + + + # Get all subdirectories + $directories = Get-ChildItem -Path $startDirectory -Directory + + # Store all mapped aliases across all directories + $allMappedAliases = @() + $mappedAliasesCount = 0 + + # Get total alias lines from the alias file (ignoring comments and empty lines) + $aliasFileContent = $this.GetFilteredAliasFileContent($aliasFilePath) + $totalAliases = $aliasFileContent.Count + + foreach ($directory in $directories) { + # Get the full path of the directory + $directoryPath = $directory.FullName + + # Get .ps1 file names in the current directory + $ps1FileNames = $this.GetPs1FileNames($directoryPath) + + if ($ps1FileNames.Count -gt 0) { + # Filter alias lines based on the .ps1 file names + $result = $this.FilterAliasLines($aliasFilePath, $ps1FileNames) + + $filteredLines = $result.FilteredLines + $mappedAliases = $result.MappedAliases + $mappedAliasesCount += $mappedAliases.Count + + # Add mapped aliases to the collection + $allMappedAliases += $mappedAliases + + if ($filteredLines.Count -gt 0) { + # Create the target directory for this key if it doesn't exist + $targetSubDirectoryPath = Join-Path -Path $startDirectory -ChildPath $directory.Name + $this.CreateDirectory($targetSubDirectoryPath) + + # Create the output file path in the target directory + $outputFilePath = Join-Path -Path $targetSubDirectoryPath -ChildPath "Enable-EntraAzureADAliases.ps1" + + # Write the filtered lines to the output file in the target directory + $this.WriteFilteredLines($outputFilePath, $filteredLines, $this.Header) + } + } + } + + # Calculate unmapped aliases and write them to a file + $unMappedAliases = $this.WriteUnmappedAliases($aliasFileContent, $allMappedAliases, $startDirectory) + + # Display summary information + $this.DisplaySummary($totalAliases, $mappedAliasesCount, $unMappedAliases.Count) + + Write-Host "[EntraModuleSplitter] Processing complete." -ForegroundColor Green + } + + [string[]] GetModuleDirectories([string]$Module) { + $startDirectory = if ($Module -eq 'EntraBeta') { + ".\Entra-Modules\Microsoft.Graph.Entra.Beta\" + } else { + ".\Entra-Modules\Microsoft.Graph.Entra\" + } + + $aliasFileName = if ($Module -eq 'EntraBeta') { + "Enable-EntraBetaAzureADAlias.ps1" + } else { + "Enable-EntraAzureADAlias.ps1" + } + + $aliasFilePath = Join-Path -Path $startDirectory -ChildPath $aliasFileName + + return $startDirectory, $aliasFilePath + } + + [string] GetHeader() { + return $this.Header + } + + [string[]] GetPs1FileNames([string]$directory) { + $files = Get-ChildItem -Path $directory -Filter "*.ps1" | ForEach-Object { + [System.IO.Path]::GetFileNameWithoutExtension($_.Name) + } + + # Return the array of file names, or an empty array if no files are found + return $files +} + + + [PSCustomObject] FilterAliasLines([string]$aliasFilePath, [string[]]$ps1FileNames) { + $aliasFileContent = $this.GetFilteredAliasFileContent($aliasFilePath) + + $filteredLines = @() + $mappedAliases = @() + + foreach ($line in $aliasFileContent) { + foreach ($fileName in $ps1FileNames) { + if ($line -like "*$fileName*") { + $filteredLines += $line + $mappedAliases += $line # Track mapped alias + break # Exit the inner loop if a match is found + } + } + } + + return @{FilteredLines = $filteredLines; MappedAliases = $mappedAliases} + } + + [string[]] GetFilteredAliasFileContent([string]$aliasFilePath) { + $fileContents= Get-Content -Path $aliasFilePath | Where-Object { + $_.Trim() -ne "" -and -not ($_.Trim().StartsWith("#")) + } + + return $fileContents + } + + [void] WriteFilteredLines([string]$outputFilePath, [string[]]$filteredLines, [string]$header) { + $functionWrapperStart = "`nfunction Enable-EntraAzureADAliases {" + "`n" + $functionWrapperEnd = "`n`n}" + + $fileContent = $header + $functionWrapperStart + ($filteredLines -join "`n") + $functionWrapperEnd + + Set-Content -Path $outputFilePath -Value $fileContent + Write-Host "[EntraModuleSplitter] Filtered lines have been written and wrapped inside Enable-EntraAzureADAliases function to $outputFilePath" -ForegroundColor Green + } + + [string[]] WriteUnmappedAliases([string[]]$aliasFileContent, [string[]]$allMappedAliases, [string]$targetDirectory) { + $allMappedAliases = $allMappedAliases | Sort-Object -Unique # Ensure uniqueness + $unMappedAliases = $aliasFileContent | Where-Object { $allMappedAliases -notcontains $_ } + + # Remove the first and last lines if applicable + if ($unMappedAliases.Count -gt 2) { + $unMappedAliases = $unMappedAliases[1..($unMappedAliases.Count - 2)] + } else { + $unMappedAliases = @() # Ensure it returns an empty array if fewer than 2 lines + } + + if ($unMappedAliases.Count -gt 0) { + $unmappedFilePath = Join-Path -Path $targetDirectory -ChildPath "UnMappedAliases.psd1" + Set-Content -Path $unmappedFilePath -Value $unMappedAliases + Write-Host "[EntraModuleSplitter] Unmapped aliases have been written to $unmappedFilePath" -ForegroundColor Yellow + } else { + Write-Host "[EntraModuleSplitter] No unmapped aliases found." -ForegroundColor Blue + } + + return $unMappedAliases # Ensure this line returns the unmapped aliases + } + + [void] CreateDirectory([string]$path) { + if (-not (Test-Path -Path $path)) { + New-Item -Path $path -ItemType Directory | Out-Null + Write-Host "[EntraModuleSplitter] Created directory: $path" -ForegroundColor Yellow + } + } + + [void] DisplaySummary([int]$totalAliases, [int]$mappedAliasesCount, [int]$unMappedAliasesCount) { + Write-Host "[EntraModuleSplitter] Total Alias Lines (excluding comments and blanks): $totalAliases" -ForegroundColor Blue + Write-Host "[EntraModuleSplitter] Mapped Aliases: $mappedAliasesCount" -ForegroundColor Blue + Write-Host "[EntraModuleSplitter] UnMapped Aliases: $unMappedAliasesCount" -ForegroundColor Red + } +} + +# Execute the function +$entraModuleSplitter = [EntraModuleSplitter]::new() +$entraModuleSplitter.SplitEntraModule('Entra') # or 'EntraBeta' +$entraModuleSplitter.ProcessEntraAzureADAliases('Entra') From a01bfb0c367842adb9dc61452cb18c2767ed87a3 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:49:52 +0300 Subject: [PATCH 003/124] Added module splitter and psm1 builder --- src/EntraModuleBuilder.ps1 | 7 ------- src/EntraModuleSplitter.ps1 | 7 +------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 4d863324dc..b8481c0f24 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -135,10 +135,3 @@ Set-StrictMode -Version 5 } } -# Call the function with the appropriate starting directory and typedefs file path -try { - $moduleBuilder = [EntraModuleBuilder]::new() - $moduleBuilder.CreateSubModuleFile(".\Entra-Modules\Microsoft.Graph.Entra\", ".\Typedefs.txt") -} catch { - Write-Host "[EntraModuleBuilder] $_.Exception.Message" -ForegroundColor Red -} diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 6b7532a79e..c89408065a 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -304,9 +304,4 @@ class EntraModuleSplitter { Write-Host "[EntraModuleSplitter] Mapped Aliases: $mappedAliasesCount" -ForegroundColor Blue Write-Host "[EntraModuleSplitter] UnMapped Aliases: $unMappedAliasesCount" -ForegroundColor Red } -} - -# Execute the function -$entraModuleSplitter = [EntraModuleSplitter]::new() -$entraModuleSplitter.SplitEntraModule('Entra') # or 'EntraBeta' -$entraModuleSplitter.ProcessEntraAzureADAliases('Entra') +} \ No newline at end of file From aad9d7eb25c15d41800b6f73c34caf1ec6aaf506 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:57:50 +0300 Subject: [PATCH 004/124] added moduleMapper.json --- module/mapping/moduleMapping.json | 16 ++++++++++++++++ src/EntraModuleBuilder.ps1 | 6 +++++- src/EntraModuleSplitter.ps1 | 18 +++++++++++------- 3 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 module/mapping/moduleMapping.json diff --git a/module/mapping/moduleMapping.json b/module/mapping/moduleMapping.json new file mode 100644 index 0000000000..9ba9b07aac --- /dev/null +++ b/module/mapping/moduleMapping.json @@ -0,0 +1,16 @@ +{ + "Authentication":"", + "Directory":"", + "Application":"", + "ApplicationProxy":"", + "User":"", + "Group":"", + "ServicePrincipal":"", + "AdministrativeUnit":"", + "Contact":"", + "Domain":"", + "Permission":"", + "Device":"", + "Policy":"", + "CertificateAuthority":"" +} \ No newline at end of file diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index b8481c0f24..bfd513c244 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -1,3 +1,7 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + # This class builds the submodules i.e. generate the .psm1 file, help-xml and .psd1 file class EntraModuleBuilder { [string]$headerText @@ -124,7 +128,7 @@ Set-StrictMode -Version 5 $parentDirPath = Get-Item $resolvedStartDirectory $parentDirName = $parentDirPath.Name - $destDirectory = Join-Path -Path (Get-Location) -ChildPath "dest" + $destDirectory = Join-Path -Path (Get-Location) -ChildPath "..\bin\" $this.EnsureDestinationDirectory($destDirectory) foreach ($subDir in $subDirectories) { diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index c89408065a..db130798cc 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -1,3 +1,7 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + # This class splits the larger Microsoft.Graph.Entra.psm1 or Microsoft.Graph.Entra.Beta.psm1 into separate files and also constructrs the submodule directories class EntraModuleSplitter { [string]$Header @@ -20,17 +24,17 @@ class EntraModuleSplitter { [string] GetModuleFilePath([string]$source) { if ($source -eq 'Entra') { - return ".\entra-powershell\bin\Microsoft.Graph.Entra.psm1" + return "..\bin\Microsoft.Graph.Entra.psm1" } else { - return ".\entra-powershell\bin\Microsoft.Graph.Entra.Beta.psm1" + return "..\bin\Microsoft.Graph.Entra.Beta.psm1" } } [string] GetOutputDirectory([string]$source) { if ($source -eq 'Entra') { - return ".\Entra-Modules" + return "..\module\Entra" } else { - return ".\Entra-BetaModules" + return "..\module\EntraBeta" } } @@ -120,7 +124,7 @@ class EntraModuleSplitter { # Determine file paths and output directories $psm1FilePath = $this.GetModuleFilePath($Source) $outputDirectory = $this.GetOutputDirectory($Source) - $jsonFilePath = ".\key-value-pairs.json" + $jsonFilePath = "..\module\mapping\moduleMapping.json" $this.CreateOutputDirectory($outputDirectory) $unmappedDirectory = Join-Path -Path $outputDirectory -ChildPath "UnMappedFiles" @@ -203,9 +207,9 @@ class EntraModuleSplitter { [string[]] GetModuleDirectories([string]$Module) { $startDirectory = if ($Module -eq 'EntraBeta') { - ".\Entra-Modules\Microsoft.Graph.Entra.Beta\" + "..\module\Entra\Microsoft.Graph.Entra.Beta\" } else { - ".\Entra-Modules\Microsoft.Graph.Entra\" + "..\module\EntraBeta\Entra-Modules\Microsoft.Graph.Entra\" } $aliasFileName = if ($Module -eq 'EntraBeta') { From 141124246c1eb1915222ea956c56da1aab9d750a Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:05:22 +0300 Subject: [PATCH 005/124] added runner script and typedefs --- build/Split-EntraModule.ps1 | 8 + src/TypeDefs.txt | 771 ++++++++++++++++++++++++++++++++++++ 2 files changed, 779 insertions(+) create mode 100644 build/Split-EntraModule.ps1 create mode 100644 src/TypeDefs.txt diff --git a/build/Split-EntraModule.ps1 b/build/Split-EntraModule.ps1 new file mode 100644 index 0000000000..0fb29e1ca8 --- /dev/null +++ b/build/Split-EntraModule.ps1 @@ -0,0 +1,8 @@ +. ..\src\EntraModuleSplitter.ps1 +. ..\src\EntraModuleBuilder.ps1 + +$entraModuleSplitter = [EntraModuleSplitter]::new() +$entraModuleSplitter.SplitEntraModule('Entra') # or 'EntraBeta' +$entraModuleSplitter.ProcessEntraAzureADAliases('Entra') +$moduleBuilder = [EntraModuleBuilder]::new() +$moduleBuilder.CreateSubModuleFile("..\module\Entra\Microsoft.Graph.Entra\", ".\Typedefs.txt") \ No newline at end of file diff --git a/src/TypeDefs.txt b/src/TypeDefs.txt new file mode 100644 index 0000000000..1465a1ad21 --- /dev/null +++ b/src/TypeDefs.txt @@ -0,0 +1,771 @@ +# ------------------------------------------------------------------------------ +# Type definitios required for commands inputs +# ------------------------------------------------------------------------------ + +$def = @" + +namespace Microsoft.Open.AzureAD.Graph.PowerShell.Custom +{ + + using System.Linq; + public enum KeyType{ + Symmetric = 0, + AsymmetricX509Cert = 1, + } + public enum KeyUsage{ + Sign = 0, + Verify = 1, + Decrypt = 2, + Encrypt = 3, + } +} + +namespace Microsoft.Open.AzureAD.Model +{ + + using System.Linq; + public class AlternativeSecurityId + { + public System.String IdentityProvider; + public System.Byte[] Key; + public System.Nullable Type; + + } + public class AppRole + { + public System.Collections.Generic.List AllowedMemberTypes; + public System.String Description; + public System.String DisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Origin; + public System.String Value; + } + public class AssignedLicense + { + public System.Collections.Generic.List DisabledPlans; + public System.String SkuId; + + } + public class AssignedLicenses + { + public System.Collections.Generic.List AddLicenses; + public System.Collections.Generic.List RemoveLicenses; + + } + public class CertificateAuthorityInformation + { + public enum AuthorityTypeEnum{ + RootAuthority = 0, + IntermediateAuthority = 1, + } + public System.Nullable AuthorityType; + public System.String CrlDistributionPoint; + public System.String DeltaCrlDistributionPoint; + public System.Byte[] TrustedCertificate; + public System.String TrustedIssuer; + public System.String TrustedIssuerSki; + + } + public class CrossCloudVerificationCodeBody + { + public System.String CrossCloudVerificationCode; + public CrossCloudVerificationCodeBody() + { + } + + public CrossCloudVerificationCodeBody(System.String value) + { + CrossCloudVerificationCode = value; + } + } + public class GroupIdsForMembershipCheck + { + public System.Collections.Generic.List GroupIds; + public GroupIdsForMembershipCheck() + { + } + + public GroupIdsForMembershipCheck(System.Collections.Generic.List value) + { + GroupIds = value; + } + } + public class KeyCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDate; + public System.String KeyId; + public System.Nullable StartDate; + public System.String Type; + public System.String Usage; + public System.Byte[] Value; + + } + public class PasswordCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDate; + public System.String KeyId; + public System.Nullable StartDate; + public System.String Value; + + } + public class PasswordProfile + { + public System.String Password; + public System.Nullable ForceChangePasswordNextLogin; + public System.Nullable EnforceChangePasswordPolicy; + + } + public class PrivacyProfile + { + public System.String ContactEmail; + public System.String StatementUrl; + + } + public class SignInName + { + public System.String Type; + public System.String Value; + + } +} + +namespace Microsoft.Open.MSGraph.Model +{ + + using System.Linq; + public class AddIn + { + public System.String Id; + public System.String Type; + public System.Collections.Generic.List Properties; + + } + public class ApiApplication + { + public System.Nullable AcceptMappedClaims; + public System.Collections.Generic.List KnownClientApplications; + public System.Collections.Generic.List PreAuthorizedApplications; + public System.Nullable RequestedAccessTokenVersion; + public System.Collections.Generic.List Oauth2PermissionScopes; + + } + public class AppRole + { + public System.Collections.Generic.List AllowedMemberTypes; + public System.String Description; + public System.String DisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Origin; + public System.String Value; + + } + public class ConditionalAccessApplicationCondition + { + public System.Collections.Generic.List IncludeApplications; + public System.Collections.Generic.List ExcludeApplications; + public System.Collections.Generic.List IncludeUserActions; + public System.Collections.Generic.List IncludeProtectionLevels; + + } + public class ConditionalAccessApplicationEnforcedRestrictions + { + public System.Nullable IsEnabled; + public ConditionalAccessApplicationEnforcedRestrictions() + { + } + + public ConditionalAccessApplicationEnforcedRestrictions(System.Nullable value) + { + IsEnabled = value; + } + } + public class ConditionalAccessCloudAppSecurity + { + public enum CloudAppSecurityTypeEnum{ + McasConfigured = 0, + MonitorOnly = 1, + BlockDownloads = 2, + } + public System.Nullable CloudAppSecurityType; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessConditionSet + { + public Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition Applications; + public Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition Users; + public Microsoft.Open.MSGraph.Model.ConditionalAccessPlatformCondition Platforms; + public Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition Locations; + public enum ConditionalAccessRiskLevel{ + Low = 0, + Medium = 1, + High = 2, + Hidden = 3, + None = 4, + UnknownFutureValue = 5, + } + public System.Collections.Generic.List SignInRiskLevels; + public enum ConditionalAccessClientApp{ + All = 0, + Browser = 1, + MobileAppsAndDesktopClients = 2, + ExchangeActiveSync = 3, + EasSupported = 4, + Other = 5, + } + public System.Collections.Generic.List ClientAppTypes; + + } + public class ConditionalAccessGrantControls + { + public System.String _Operator; + public enum ConditionalAccessGrantControl{ + Block = 0, + Mfa = 1, + CompliantDevice = 2, + DomainJoinedDevice = 3, + ApprovedApplication = 4, + CompliantApplication = 5, + PasswordChange = 6, + } + public System.Collections.Generic.List BuiltInControls; + public System.Collections.Generic.List CustomAuthenticationFactors; + public System.Collections.Generic.List TermsOfUse; + + } + public class ConditionalAccessLocationCondition + { + public System.Collections.Generic.List IncludeLocations; + public System.Collections.Generic.List ExcludeLocations; + + } + public class ConditionalAccessPersistentBrowser + { + public enum ModeEnum{ + Always = 0, + Never = 1, + } + public System.Nullable Mode; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessPlatformCondition + { + public enum ConditionalAccessDevicePlatforms{ + Android = 0, + IOS = 1, + Windows = 2, + WindowsPhone = 3, + MacOS = 4, + All = 5, + } + public System.Collections.Generic.List IncludePlatforms; + public System.Collections.Generic.List ExcludePlatforms; + + } + public class ConditionalAccessSessionControls + { + public Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions ApplicationEnforcedRestrictions; + public Microsoft.Open.MSGraph.Model.ConditionalAccessCloudAppSecurity CloudAppSecurity; + public Microsoft.Open.MSGraph.Model.ConditionalAccessSignInFrequency SignInFrequency; + public Microsoft.Open.MSGraph.Model.ConditionalAccessPersistentBrowser PersistentBrowser; + + } + public class ConditionalAccessSignInFrequency + { + public enum TypeEnum{ + Days = 0, + Hours = 1, + } + public System.Nullable Type; + public System.Nullable Value; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessUserCondition + { + public System.Collections.Generic.List IncludeUsers; + public System.Collections.Generic.List ExcludeUsers; + public System.Collections.Generic.List IncludeGroups; + public System.Collections.Generic.List ExcludeGroups; + public System.Collections.Generic.List IncludeRoles; + public System.Collections.Generic.List ExcludeRoles; + + } + public enum CountriesAndRegion{ + AD = 0, + AE = 1, + AF = 2, + AG = 3, + AI = 4, + AL = 5, + AM = 6, + AN = 7, + AO = 8, + AQ = 9, + AR = 10, + AS = 11, + AT = 12, + AU = 13, + AW = 14, + AX = 15, + AZ = 16, + BA = 17, + BB = 18, + BD = 19, + BE = 20, + BF = 21, + BG = 22, + BH = 23, + BI = 24, + BJ = 25, + BL = 26, + BM = 27, + BN = 28, + BO = 29, + BQ = 30, + BR = 31, + BS = 32, + BT = 33, + BV = 34, + BW = 35, + BY = 36, + BZ = 37, + CA = 38, + CC = 39, + CD = 40, + CF = 41, + CG = 42, + CH = 43, + CI = 44, + CK = 45, + CL = 46, + CM = 47, + CN = 48, + CO = 49, + CR = 50, + CU = 51, + CV = 52, + CW = 53, + CX = 54, + CY = 55, + CZ = 56, + DE = 57, + DJ = 58, + DK = 59, + DM = 60, + DO = 61, + DZ = 62, + EC = 63, + EE = 64, + EG = 65, + EH = 66, + ER = 67, + ES = 68, + ET = 69, + FI = 70, + FJ = 71, + FK = 72, + FM = 73, + FO = 74, + FR = 75, + GA = 76, + GB = 77, + GD = 78, + GE = 79, + GF = 80, + GG = 81, + GH = 82, + GI = 83, + GL = 84, + GM = 85, + GN = 86, + GP = 87, + GQ = 88, + GR = 89, + GS = 90, + GT = 91, + GU = 92, + GW = 93, + GY = 94, + HK = 95, + HM = 96, + HN = 97, + HR = 98, + HT = 99, + HU = 100, + ID = 101, + IE = 102, + IL = 103, + IM = 104, + IN = 105, + IO = 106, + IQ = 107, + IR = 108, + IS = 109, + IT = 110, + JE = 111, + JM = 112, + JO = 113, + JP = 114, + KE = 115, + KG = 116, + KH = 117, + KI = 118, + KM = 119, + KN = 120, + KP = 121, + KR = 122, + KW = 123, + KY = 124, + KZ = 125, + LA = 126, + LB = 127, + LC = 128, + LI = 129, + LK = 130, + LR = 131, + LS = 132, + LT = 133, + LU = 134, + LV = 135, + LY = 136, + MA = 137, + MC = 138, + MD = 139, + ME = 140, + MF = 141, + MG = 142, + MH = 143, + MK = 144, + ML = 145, + MM = 146, + MN = 147, + MO = 148, + MP = 149, + MQ = 150, + MR = 151, + MS = 152, + MT = 153, + MU = 154, + MV = 155, + MW = 156, + MX = 157, + MY = 158, + MZ = 159, + NA = 160, + NC = 161, + NE = 162, + NF = 163, + NG = 164, + NI = 165, + NL = 166, + NO = 167, + NP = 168, + NR = 169, + NU = 170, + NZ = 171, + OM = 172, + PA = 173, + PE = 174, + PF = 175, + PG = 176, + PH = 177, + PK = 178, + PL = 179, + PM = 180, + PN = 181, + PR = 182, + PS = 183, + PT = 184, + PW = 185, + PY = 186, + QA = 187, + RE = 188, + RO = 189, + RS = 190, + RU = 191, + RW = 192, + SA = 193, + SB = 194, + SC = 195, + SD = 196, + SE = 197, + SG = 198, + SH = 199, + SI = 200, + SJ = 201, + SK = 202, + SL = 203, + SM = 204, + SN = 205, + SO = 206, + SR = 207, + SS = 208, + ST = 209, + SV = 210, + SX = 211, + SY = 212, + SZ = 213, + TC = 214, + TD = 215, + TF = 216, + TG = 217, + TH = 218, + TJ = 219, + TK = 220, + TL = 221, + TM = 222, + TN = 223, + TO = 224, + TR = 225, + TT = 226, + TV = 227, + TW = 228, + TZ = 229, + UA = 230, + UG = 231, + UM = 232, + US = 233, + UY = 234, + UZ = 235, + VA = 236, + VC = 237, + VE = 238, + VG = 239, + VI = 240, + VN = 241, + VU = 242, + WF = 243, + WS = 244, + YE = 245, + YT = 246, + ZA = 247, + ZM = 248, + ZW = 249, + } + public class DefaultUserRolePermissions + { + public System.Nullable AllowedToCreateApps; + public System.Nullable AllowedToCreateSecurityGroups; + public System.Nullable AllowedToReadOtherUsers; + public System.Collections.Generic.List PermissionGrantPoliciesAssigned; + + } + public class DelegatedPermissionClassification + { + public enum ClassificationEnum{ + Low = 0, + Medium = 1, + High = 2, + } + public System.Nullable Classification; + public System.String Id; + public System.String PermissionId; + public System.String PermissionName; + + } + public class EmailAddress + { + public System.String Name; + public System.String Address; + + } + public class ImplicitGrantSettings + { + public System.Nullable EnableIdTokenIssuance; + public System.Nullable EnableAccessTokenIssuance; + + } + public class InformationalUrl + { + public System.String TermsOfServiceUrl; + public System.String MarketingUrl; + public System.String PrivacyStatementUrl; + public System.String SupportUrl; + public System.String LogoUrl; + + } + public class InvitedUserMessageInfo + { + public System.Collections.Generic.List CcRecipients; + public System.String CustomizedMessageBody; + public System.String MessageLanguage; + + } + public class IpRange + { + public System.String CidrAddress; + public IpRange() + { + } + + public IpRange(System.String value) + { + CidrAddress = value; + } + } + public class KeyCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.String DisplayName; + public System.Nullable EndDateTime; + public System.String KeyId; + public System.Nullable StartDateTime; + public System.String Type; + public System.String Usage; + public System.Byte[] Key; + + } + public class KeyValue + { + public System.String Key; + public System.String Value; + + } + public class MsDirectoryObject + { + public System.String Id; + public System.String OdataType; + } + public class MsRoleMemberInfo + { + public System.String Id; + } + public class OptionalClaim + { + public System.String Name; + public System.String Source; + public System.Nullable Essential; + public System.Collections.Generic.List AdditionalProperties; + + } + public class OptionalClaims + { + public System.Collections.Generic.List IdToken; + public System.Collections.Generic.List AccessToken; + public System.Collections.Generic.List Saml2Token; + + } + public class ParentalControlSettings + { + public enum LegalAgeGroupRuleEnum{ + Allow = 0, + RequireConsentForPrivacyServices = 1, + RequireConsentForMinors = 2, + RequireConsentForKids = 3, + BlockMinors = 4, + } + public System.Nullable LegalAgeGroupRule; + public System.Collections.Generic.List CountriesBlockedForMinors; + + } + public class PasswordCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDateTime; + public System.String DisplayName; + public System.String KeyId; + public System.Nullable StartDateTime; + public System.String SecretText; + public System.String Hint; + + } + public class PermissionScope + { + public System.String AdminConsentDescription; + public System.String AdminConsentDisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Type; + public System.String UserConsentDescription; + public System.String UserConsentDisplayName; + public System.String Value; + + } + public class PreAuthorizedApplication + { + public System.String AppId; + public System.Collections.Generic.List DelegatedPermissionIds; + + } + public class PublicClientApplication + { + public System.Collections.Generic.List RedirectUris; + public PublicClientApplication() + { + } + + public PublicClientApplication(System.Collections.Generic.List value) + { + RedirectUris = value; + } + } + public class Recipient + { + public Microsoft.Open.MSGraph.Model.EmailAddress EmailAddress; + public Recipient() + { + } + + public Recipient(Microsoft.Open.MSGraph.Model.EmailAddress value) + { + EmailAddress = value; + } + } + public class RequiredResourceAccess + { + public System.String ResourceAppId; + public System.Collections.Generic.List ResourceAccess; + + } + public class ResourceAccess + { + public System.String Id; + public System.String Type; + + } + public class RolePermission + { + public System.Collections.Generic.List AllowedResourceActions; + public System.String Condition; + + } + public class SetVerifiedPublisherRequest + { + public System.String VerifiedPublisherId; + public SetVerifiedPublisherRequest() + { + } + + public SetVerifiedPublisherRequest(System.String value) + { + VerifiedPublisherId = value; + } + } + public class User + { + public System.String Id; + public System.String OdataType; + + } + public class WebApplication + { + public System.String HomePageUrl; + public System.String LogoutUrl; + public System.Collections.Generic.List RedirectUris; + public Microsoft.Open.MSGraph.Model.ImplicitGrantSettings ImplicitGrantSettings; + + } +} +"@ + try{ Add-Type -TypeDefinition $def } + catch{} + +# ------------------------------------------------------------------------------ +# End of Type definitios required for commands inputs +# ------------------------------------------------------------------------------ From 2b48e82a29941ef34676265601fda689fbdc7205 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:07:04 +0300 Subject: [PATCH 006/124] Added Comments --- build/Split-EntraModule.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/Split-EntraModule.ps1 b/build/Split-EntraModule.ps1 index 0fb29e1ca8..122a4f901c 100644 --- a/build/Split-EntraModule.ps1 +++ b/build/Split-EntraModule.ps1 @@ -1,8 +1,13 @@ . ..\src\EntraModuleSplitter.ps1 . ..\src\EntraModuleBuilder.ps1 +# Split the module and take into account the AzureADAliases as well $entraModuleSplitter = [EntraModuleSplitter]::new() $entraModuleSplitter.SplitEntraModule('Entra') # or 'EntraBeta' $entraModuleSplitter.ProcessEntraAzureADAliases('Entra') + +#Build the .psm1 file, +#TODO: Generate help-xml +#TODO: Generate the .psd1 $moduleBuilder = [EntraModuleBuilder]::new() $moduleBuilder.CreateSubModuleFile("..\module\Entra\Microsoft.Graph.Entra\", ".\Typedefs.txt") \ No newline at end of file From b4b69bdb7ca407aa7f4fbeb70f689b54090a64d0 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:26:38 +0300 Subject: [PATCH 007/124] Added WriteModuleManifest --- build/Split-EntraModule.ps1 | 4 +- src/EntraModuleBuilder.ps1 | 83 +++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/build/Split-EntraModule.ps1 b/build/Split-EntraModule.ps1 index 122a4f901c..017fb685a1 100644 --- a/build/Split-EntraModule.ps1 +++ b/build/Split-EntraModule.ps1 @@ -7,7 +7,7 @@ $entraModuleSplitter.SplitEntraModule('Entra') # or 'EntraBeta' $entraModuleSplitter.ProcessEntraAzureADAliases('Entra') #Build the .psm1 file, -#TODO: Generate help-xml -#TODO: Generate the .psd1 +#TODO: Generate help-xml file +#TODO: Generate the .psd1 file $moduleBuilder = [EntraModuleBuilder]::new() $moduleBuilder.CreateSubModuleFile("..\module\Entra\Microsoft.Graph.Entra\", ".\Typedefs.txt") \ No newline at end of file diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index bfd513c244..093d354935 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -14,6 +14,9 @@ class EntraModuleBuilder { # ------------------------------------------------------------------------------ Set-StrictMode -Version 5 "@ + + $this.BasePath = (join-path $PSScriptRoot '../module/Entra/') + $this.OutputDirectory = (join-path $PSScriptRoot '../bin/') } [string] ResolveStartDirectory([string]$directory) { @@ -137,5 +140,85 @@ Set-StrictMode -Version 5 Write-Host "[EntraModuleBuilder] CreateSubModuleFile script completed." -ForegroundColor Green } + + [void] WriteModuleManifest($module) { + # Get all subdirectories in the base path + $BasePath=$this.BasePath + $OutputFolder=$this.outputDirectory + + $subDirectories = Get-ChildItem -Path $BasePath -Directory + $settingPath = "../module/"+$module+"/config/ModuleMetadata.json" + foreach ($subDir in $subDirectories) { + # Define module name based on sub-directory name + $moduleName = $subDir.Name + + # Log the start of processing for this module + Write-Host "[EntraModuleBuilder] Processing module: $moduleName" -ForegroundColor Blue + + # Update paths specific to this sub-directory + + $files = @("$moduleName.psd1", "$moduleName.psm1", "$moduleName-Help.xml") + $content = Get-Content -Path $settingPath | ConvertFrom-Json + + # Define PSData block based on the contents of the ModuleMetadata.json file + $PSData = @{ + Tags = $($content.tags) + LicenseUri = $($content.licenseUri) + ProjectUri = $($content.projectUri) + IconUri = $($content.iconUri) + ReleaseNotes = $($content.releaseNotes) + Prerelease = $null + } + + # Set the manifest path and functions to export + $manifestPath = Join-Path $OutputFolder "$moduleName.psd1" + $functions = $this.ModuleMap.CommandsList + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" + + # Collect required modules + $requiredModules = @() + foreach ($module in $content.requiredModules) { + $requiredModules += @{ModuleName = $module; RequiredVersion = $content.requiredModulesVersion} + } + + # Module manifest settings + $moduleSettings = @{ + Path = $manifestPath + GUID = $($content.guid) + ModuleVersion = "$($content.version)" + FunctionsToExport = $functions + CmdletsToExport = @() + AliasesToExport = @() + Author = $($content.authors) + CompanyName = $($content.owners) + FileList = $files + RootModule = "$moduleName.psm1" + Description = 'Microsoft Graph Entra PowerShell.' + DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) + PowerShellVersion = $([System.Version]::Parse('5.1')) + CompatiblePSEditions = @('Desktop', 'Core') + RequiredModules = $requiredModules + NestedModules = @() + } + + # Add prerelease info if it exists + if ($null -ne $content.Prerelease) { + $PSData.Prerelease = $content.Prerelease + } + + # Update any load message for this module if necessary + $this.LoadMessage = $this.LoadMessage.Replace("{VERSION}", $content.version) + + # Create and update the module manifest + Write-Host "[EntraModuleBuilder] Creating manifest for $moduleName at $manifestPath" -ForegroundColor Green + New-ModuleManifest @moduleSettings + Update-ModuleManifest -Path $manifestPath -PrivateData $PSData + + # Log completion for this module + Write-Host "[EntraModuleBuilder] Manifest for $moduleName created successfully" -ForegroundColor Green + } +} + + + } From ba129f504663254409799dacdc29f81fb284b96b Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:27:45 +0300 Subject: [PATCH 008/124] changed name to Create-EntraModule --- build/{Split-EntraModule.ps1 => Create-EntraModules.ps1} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename build/{Split-EntraModule.ps1 => Create-EntraModules.ps1} (100%) diff --git a/build/Split-EntraModule.ps1 b/build/Create-EntraModules.ps1 similarity index 100% rename from build/Split-EntraModule.ps1 rename to build/Create-EntraModules.ps1 From 4955209a71e8cbc68cae390d2e21e00fd6971e73 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:46:11 +0300 Subject: [PATCH 009/124] Added CreateModuleHelp --- src/EntraModuleBuilder.ps1 | 64 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 093d354935..11582fb838 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -17,6 +17,8 @@ Set-StrictMode -Version 5 $this.BasePath = (join-path $PSScriptRoot '../module/Entra/') $this.OutputDirectory = (join-path $PSScriptRoot '../bin/') + $this.TypeDefsDirectory="./Typedefs.txt" + $this.BaseDocsPath='../docs/' } [string] ResolveStartDirectory([string]$directory) { @@ -110,7 +112,7 @@ Set-StrictMode -Version 5 Write-Host "[EntraModuleBuilder] Module file created: $psm1FilePath" -ForegroundColor Green } - [void] CreateSubModuleFile([string]$startDirectory, [string]$typedefsFilePath) { + [void] CreateSubModuleFile([string]$startDirectory, [string]$typedefsFilePath=$this.TypeDefsDirectory) { Write-Host "[EntraModuleBuilder] Starting CreateSubModuleFile script..." -ForegroundColor Green $resolvedStartDirectory = $this.ResolveStartDirectory($startDirectory) @@ -131,7 +133,7 @@ Set-StrictMode -Version 5 $parentDirPath = Get-Item $resolvedStartDirectory $parentDirName = $parentDirPath.Name - $destDirectory = Join-Path -Path (Get-Location) -ChildPath "..\bin\" + $destDirectory = Join-Path -Path (Get-Location) -ChildPath $this.OutputDirectory $this.EnsureDestinationDirectory($destDirectory) foreach ($subDir in $subDirectories) { @@ -219,6 +221,64 @@ Set-StrictMode -Version 5 } +[void] CreateModuleHelp([string] $Module) { + + $binPath = $this.OutputDirectory + if (!(Test-Path $binPath)) { + New-Item -ItemType Directory -Path $binPath | Out-Null + } + + # Determine the base docs path based on the specified module + $baseDocsPath = $this.BaseDocsPath + if ($Module -eq "Entra") { + $baseDocsPath = Join-Path -Path $baseDocsPath -ChildPath "entra-powershell-v1.0/Microsoft.Graph.Entra" + } elseif ($Module -eq "EntraBeta") { + $baseDocsPath = Join-Path -Path $baseDocsPath -ChildPath "entra-powershell-beta/Microsoft.Graph.Entra.Beta" + } else { + Write-Host "Invalid module specified: $Module" -ForegroundColor Red + return + } + + # Check if the base docs path exists + if (!(Test-Path $baseDocsPath)) { + Write-Host "The specified base documentation path does not exist: $baseDocsPath" -ForegroundColor Red + return + } + + # Get all subdirectories within the base docs path + $subDirectories = Get-ChildItem -Path $baseDocsPath -Directory + foreach ($subDirectory in $subDirectories) { + # Get all markdown files in the current subdirectory + $markdownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" + + if ($markdownFiles.Count -eq 0) { + Write-Host "No markdown files found in $($subDirectory.FullName)." -ForegroundColor Yellow + continue + } + + # Generate the help file name based on the module and sub-directory + $subDirectoryName = [System.IO.Path]::GetFileName($subDirectory.FullName) + $helpFileName = if ($Module -eq "Entra") { + "Microsoft.Graph.Entra.$subDirectoryName-help.xml" + } else { + "Microsoft.Graph.Entra.Beta.$subDirectoryName-help.xml" + } + + $helpFilePath = Join-Path -Path $binPath -ChildPath $helpFileName + + # Combine all markdown file contents into one for generating the help file + $markdownContent = $markdownFiles | ForEach-Object { Get-Content -Path $_.FullName } + $markdownCombined = $markdownContent -join "`n" + + # Create the help file using PlatyPS + New-ExternalHelp -Path $helpFilePath -Content $markdownCombined -Force + + Write-Host "[EntraModuleBuilder] Help file generated: $helpFilePath" -ForegroundColor Green + } + + Write-Host "[EntraModuleBuilder] Help files generated successfully for module: $Module" -ForegroundColor Green +} + } From a8fbe400f2b53eb0dd9de6e5a204a9a6d3576a7c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:53:39 +0300 Subject: [PATCH 010/124] fixed the help generation code --- src/EntraModuleBuilder.ps1 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 11582fb838..2ffbb4fb70 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -264,16 +264,14 @@ Set-StrictMode -Version 5 "Microsoft.Graph.Entra.Beta.$subDirectoryName-help.xml" } - $helpFilePath = Join-Path -Path $binPath -ChildPath $helpFileName - - # Combine all markdown file contents into one for generating the help file - $markdownContent = $markdownFiles | ForEach-Object { Get-Content -Path $_.FullName } - $markdownCombined = $markdownContent -join "`n" + $helpOutputFilePath = Join-Path -Path $binPath -ChildPath $helpFileName + $moduleDocsPath=Join-Path -Path $baseDocsPath -ChildPath $subDirectory + # Create the help file using PlatyPS - New-ExternalHelp -Path $helpFilePath -Content $markdownCombined -Force + New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force - Write-Host "[EntraModuleBuilder] Help file generated: $helpFilePath" -ForegroundColor Green + Write-Host "[EntraModuleBuilder] Help file generated: $helpOutputFilePath" -ForegroundColor Green } Write-Host "[EntraModuleBuilder] Help files generated successfully for module: $Module" -ForegroundColor Green From 4115c361be48a79492e80113dcb2695ef8068bd6 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:58:20 +0300 Subject: [PATCH 011/124] Fixed the runner script --- build/Create-EntraModules.ps1 | 25 +++++++++++++++++++------ src/EntraModuleBuilder.ps1 | 4 ++-- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/build/Create-EntraModules.ps1 b/build/Create-EntraModules.ps1 index 017fb685a1..ef10b4947f 100644 --- a/build/Create-EntraModules.ps1 +++ b/build/Create-EntraModules.ps1 @@ -1,13 +1,26 @@ +param ( + [string]$Module = "Entra" # Default to "Entra" if no argument is provided +) + +# Import the necessary scripts . ..\src\EntraModuleSplitter.ps1 . ..\src\EntraModuleBuilder.ps1 # Split the module and take into account the AzureADAliases as well $entraModuleSplitter = [EntraModuleSplitter]::new() -$entraModuleSplitter.SplitEntraModule('Entra') # or 'EntraBeta' -$entraModuleSplitter.ProcessEntraAzureADAliases('Entra') +$entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument +$entraModuleSplitter.ProcessEntraAzureADAliases($Module) -#Build the .psm1 file, -#TODO: Generate help-xml file -#TODO: Generate the .psd1 file +# Build Entra Module $moduleBuilder = [EntraModuleBuilder]::new() -$moduleBuilder.CreateSubModuleFile("..\module\Entra\Microsoft.Graph.Entra\", ".\Typedefs.txt") \ No newline at end of file + +# Determine the output path based on the module +$outputPath = if ($Module -eq "Entra") { + "..\module\Entra\Microsoft.Graph.Entra\" +} else { + "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" +} + +$moduleBuilder.CreateHelpFile($Module) +$moduleBuilder.CreateSubModuleFile($outputPath, ".\Typedefs.txt") +$moduleBuilder.CreateModuleManifest($Module) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 2ffbb4fb70..bac5f43d74 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -143,7 +143,7 @@ Set-StrictMode -Version 5 Write-Host "[EntraModuleBuilder] CreateSubModuleFile script completed." -ForegroundColor Green } - [void] WriteModuleManifest($module) { + [void] CreateModuleManifest($module) { # Get all subdirectories in the base path $BasePath=$this.BasePath $OutputFolder=$this.outputDirectory @@ -267,7 +267,7 @@ Set-StrictMode -Version 5 $helpOutputFilePath = Join-Path -Path $binPath -ChildPath $helpFileName $moduleDocsPath=Join-Path -Path $baseDocsPath -ChildPath $subDirectory - + # Create the help file using PlatyPS New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force From c77413ce3ba4c13e4d315c5e79e50566975dac98 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:08:13 +0300 Subject: [PATCH 012/124] added dependency mapping --- src/EntraModuleBuilder.ps1 | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index bac5f43d74..3eeef5c4e7 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -143,25 +143,33 @@ Set-StrictMode -Version 5 Write-Host "[EntraModuleBuilder] CreateSubModuleFile script completed." -ForegroundColor Green } - [void] CreateModuleManifest($module) { + [void] CreateModuleManifest($module) { # Get all subdirectories in the base path - $BasePath=$this.BasePath - $OutputFolder=$this.outputDirectory + $BasePath = $this.BasePath + $OutputFolder = $this.outputDirectory $subDirectories = Get-ChildItem -Path $BasePath -Directory - $settingPath = "../module/"+$module+"/config/ModuleMetadata.json" + foreach ($subDir in $subDirectories) { # Define module name based on sub-directory name $moduleName = $subDir.Name # Log the start of processing for this module Write-Host "[EntraModuleBuilder] Processing module: $moduleName" -ForegroundColor Blue - + # Update paths specific to this sub-directory - - $files = @("$moduleName.psd1", "$moduleName.psm1", "$moduleName-Help.xml") + $settingPath = Join-Path $subDir.FullName "config/ModuleMetadata.json" + $dependencyMappingPath = Join-Path $subDir.FullName "config/dependencyMapping.json" + + # Load the module metadata $content = Get-Content -Path $settingPath | ConvertFrom-Json + # Load dependency mapping from JSON + $dependencyMapping = @{} + if (Test-Path $dependencyMappingPath) { + $dependencyMapping = Get-Content -Path $dependencyMappingPath | ConvertFrom-Json + } + # Define PSData block based on the contents of the ModuleMetadata.json file $PSData = @{ Tags = $($content.tags) @@ -175,11 +183,13 @@ Set-StrictMode -Version 5 # Set the manifest path and functions to export $manifestPath = Join-Path $OutputFolder "$moduleName.psd1" $functions = $this.ModuleMap.CommandsList + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" - - # Collect required modules + + # Collect required modules from dependency mapping $requiredModules = @() - foreach ($module in $content.requiredModules) { - $requiredModules += @{ModuleName = $module; RequiredVersion = $content.requiredModulesVersion} + if ($dependencyMapping.ContainsKey($moduleName)) { + foreach ($dependency in $dependencyMapping[$moduleName]) { + $requiredModules += @{ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion} + } } # Module manifest settings @@ -192,7 +202,7 @@ Set-StrictMode -Version 5 AliasesToExport = @() Author = $($content.authors) CompanyName = $($content.owners) - FileList = $files + FileList = @("$moduleName.psd1", "$moduleName.psm1", "$moduleName-Help.xml") RootModule = "$moduleName.psm1" Description = 'Microsoft Graph Entra PowerShell.' DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) @@ -221,6 +231,7 @@ Set-StrictMode -Version 5 } + [void] CreateModuleHelp([string] $Module) { $binPath = $this.OutputDirectory From a937005f60a7aed63d82b46fbb70ef79c691cc90 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:13:24 +0300 Subject: [PATCH 013/124] Added dependency mapping.json --- module/Entra/config/dependencyMapping.json | 3 +++ .../config}/moduleMapping.json | 0 .../EntraBeta/config/dependencyMapping.json | 3 +++ module/EntraBeta/config/moduleMapping.json | 16 ++++++++++++ src/EntraModuleBuilder.ps1 | 26 +++++++++---------- src/EntraModuleSplitter.ps1 | 2 +- 6 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 module/Entra/config/dependencyMapping.json rename module/{mapping => Entra/config}/moduleMapping.json (100%) create mode 100644 module/EntraBeta/config/dependencyMapping.json create mode 100644 module/EntraBeta/config/moduleMapping.json diff --git a/module/Entra/config/dependencyMapping.json b/module/Entra/config/dependencyMapping.json new file mode 100644 index 0000000000..432eef13d6 --- /dev/null +++ b/module/Entra/config/dependencyMapping.json @@ -0,0 +1,3 @@ +{ + "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users,Microsoft.Graph.Authentication"] +} \ No newline at end of file diff --git a/module/mapping/moduleMapping.json b/module/Entra/config/moduleMapping.json similarity index 100% rename from module/mapping/moduleMapping.json rename to module/Entra/config/moduleMapping.json diff --git a/module/EntraBeta/config/dependencyMapping.json b/module/EntraBeta/config/dependencyMapping.json new file mode 100644 index 0000000000..d4a8131a71 --- /dev/null +++ b/module/EntraBeta/config/dependencyMapping.json @@ -0,0 +1,3 @@ +{ + "Microsoft.Graph.Entra.Beta.Users":["Microsoft.Graph.Users,Microsoft.Graph.Authentication"] +} \ No newline at end of file diff --git a/module/EntraBeta/config/moduleMapping.json b/module/EntraBeta/config/moduleMapping.json new file mode 100644 index 0000000000..9ba9b07aac --- /dev/null +++ b/module/EntraBeta/config/moduleMapping.json @@ -0,0 +1,16 @@ +{ + "Authentication":"", + "Directory":"", + "Application":"", + "ApplicationProxy":"", + "User":"", + "Group":"", + "ServicePrincipal":"", + "AdministrativeUnit":"", + "Contact":"", + "Domain":"", + "Permission":"", + "Device":"", + "Policy":"", + "CertificateAuthority":"" +} \ No newline at end of file diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 3eeef5c4e7..7449b2bcbd 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -149,6 +149,19 @@ Set-StrictMode -Version 5 $OutputFolder = $this.outputDirectory $subDirectories = Get-ChildItem -Path $BasePath -Directory + + # Update paths specific to this sub-directory + $settingPath = Join-Path $subDir.FullName "config/ModuleMetadata.json" + $dependencyMappingPath = Join-Path $subDir.FullName "config/dependencyMapping.json" + + # Load the module metadata + $content = Get-Content -Path $settingPath | ConvertFrom-Json + + # Load dependency mapping from JSON + $dependencyMapping = @{} + if (Test-Path $dependencyMappingPath) { + $dependencyMapping = Get-Content -Path $dependencyMappingPath | ConvertFrom-Json + } foreach ($subDir in $subDirectories) { # Define module name based on sub-directory name @@ -156,19 +169,6 @@ Set-StrictMode -Version 5 # Log the start of processing for this module Write-Host "[EntraModuleBuilder] Processing module: $moduleName" -ForegroundColor Blue - - # Update paths specific to this sub-directory - $settingPath = Join-Path $subDir.FullName "config/ModuleMetadata.json" - $dependencyMappingPath = Join-Path $subDir.FullName "config/dependencyMapping.json" - - # Load the module metadata - $content = Get-Content -Path $settingPath | ConvertFrom-Json - - # Load dependency mapping from JSON - $dependencyMapping = @{} - if (Test-Path $dependencyMappingPath) { - $dependencyMapping = Get-Content -Path $dependencyMappingPath | ConvertFrom-Json - } # Define PSData block based on the contents of the ModuleMetadata.json file $PSData = @{ diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index db130798cc..28d8746ed3 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -124,7 +124,7 @@ class EntraModuleSplitter { # Determine file paths and output directories $psm1FilePath = $this.GetModuleFilePath($Source) $outputDirectory = $this.GetOutputDirectory($Source) - $jsonFilePath = "..\module\mapping\moduleMapping.json" + $jsonFilePath = "..\module\"+$Source+"\config\moduleMapping.json" $this.CreateOutputDirectory($outputDirectory) $unmappedDirectory = Join-Path -Path $outputDirectory -ChildPath "UnMappedFiles" From 2a3d39ce524d97b1837ac73fca096d2b57ac6845 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:28:45 +0300 Subject: [PATCH 014/124] Fixes --- build/Create-EntraModules.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/Create-EntraModules.ps1 b/build/Create-EntraModules.ps1 index ef10b4947f..04a3a28bdb 100644 --- a/build/Create-EntraModules.ps1 +++ b/build/Create-EntraModules.ps1 @@ -4,13 +4,14 @@ param ( # Import the necessary scripts . ..\src\EntraModuleSplitter.ps1 -. ..\src\EntraModuleBuilder.ps1 + # Split the module and take into account the AzureADAliases as well $entraModuleSplitter = [EntraModuleSplitter]::new() $entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument $entraModuleSplitter.ProcessEntraAzureADAliases($Module) +. ..\src\EntraModuleBuilder.ps1 # Build Entra Module $moduleBuilder = [EntraModuleBuilder]::new() From f571749bbf8c9d5c006055ddd82798cd19c7dc73 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:33:09 +0300 Subject: [PATCH 015/124] fixes --- src/EntraModuleBuilder.ps1 | 8 ++++++-- src/EntraModuleSplitter.ps1 | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 7449b2bcbd..afe6ca3daf 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -5,6 +5,10 @@ # This class builds the submodules i.e. generate the .psm1 file, help-xml and .psd1 file class EntraModuleBuilder { [string]$headerText + [string] BasePath + [string] OutputDirectory + [string] TypeDefsDirectory + [string] BaseDocsPath EntraModuleBuilder() { $this.headerText = @" @@ -151,8 +155,8 @@ Set-StrictMode -Version 5 $subDirectories = Get-ChildItem -Path $BasePath -Directory # Update paths specific to this sub-directory - $settingPath = Join-Path $subDir.FullName "config/ModuleMetadata.json" - $dependencyMappingPath = Join-Path $subDir.FullName "config/dependencyMapping.json" + $settingPath = "../module/"+$module+"config/ModuleMetadata.json" + $dependencyMappingPath = "../module/"+$module+"config/dependencyMapping.json" # Load the module metadata $content = Get-Content -Path $settingPath | ConvertFrom-Json diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 28d8746ed3..4b012eae02 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -209,7 +209,7 @@ class EntraModuleSplitter { $startDirectory = if ($Module -eq 'EntraBeta') { "..\module\Entra\Microsoft.Graph.Entra.Beta\" } else { - "..\module\EntraBeta\Entra-Modules\Microsoft.Graph.Entra\" + "..\module\EntraBeta\Microsoft.Graph.Entra\" } $aliasFileName = if ($Module -eq 'EntraBeta') { From f1e9421d7284945a96a519c0f1cf218b9c6aea8c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:01:08 +0300 Subject: [PATCH 016/124] fixes --- src/EntraModuleBuilder.ps1 | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index afe6ca3daf..091f96a17b 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -5,10 +5,10 @@ # This class builds the submodules i.e. generate the .psm1 file, help-xml and .psd1 file class EntraModuleBuilder { [string]$headerText - [string] BasePath - [string] OutputDirectory - [string] TypeDefsDirectory - [string] BaseDocsPath + [string]$BasePath + [string]$OutputDirectory + [string]$TypeDefsDirectory + [string]$BaseDocsPath EntraModuleBuilder() { $this.headerText = @" @@ -147,12 +147,12 @@ Set-StrictMode -Version 5 Write-Host "[EntraModuleBuilder] CreateSubModuleFile script completed." -ForegroundColor Green } + + [void] CreateModuleManifest($module) { - # Get all subdirectories in the base path - $BasePath = $this.BasePath - $OutputFolder = $this.outputDirectory + - $subDirectories = Get-ChildItem -Path $BasePath -Directory + $subDirectories = Get-ChildItem -Path $this.BasePath -Directory # Update paths specific to this sub-directory $settingPath = "../module/"+$module+"config/ModuleMetadata.json" @@ -185,8 +185,18 @@ Set-StrictMode -Version 5 } # Set the manifest path and functions to export - $manifestPath = Join-Path $OutputFolder "$moduleName.psd1" - $functions = $this.ModuleMap.CommandsList + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" + $manifestPath = Join-Path $this.OutputDirectory "$moduleName.psd1" + + # Check if the specified directory exists + if (-Not (Test-Path -Path $DirectoryPath)) { + Write-Error "The specified directory does not exist: $DirectoryPath" + return $null # Return null if the directory does not exist + } + + # Get all files in the specified directory and its subdirectories, without extensions + $allFunctions = Get-ChildItem -Path $DirectoryPath -Recurse -File | ForEach-Object { $_.BaseName } + + $functions = $allFunctions + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" # Collect required modules from dependency mapping $requiredModules = @() From 79bc9bdf0defb8bee6651d64ba3dd7bd646ce69a Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:41:41 +0300 Subject: [PATCH 017/124] fixes to EntraModulebuilder --- src/EntraModuleBuilder.ps1 | 98 +++++++++++++++++++++++++++----------- 1 file changed, 71 insertions(+), 27 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 091f96a17b..5eb2ded43e 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -155,17 +155,33 @@ Set-StrictMode -Version 5 $subDirectories = Get-ChildItem -Path $this.BasePath -Directory # Update paths specific to this sub-directory - $settingPath = "../module/"+$module+"config/ModuleMetadata.json" - $dependencyMappingPath = "../module/"+$module+"config/dependencyMapping.json" + $settingPath = "./config/ModuleMetadata.json" + $dependencyMappingPath = "./config/dependencyMapping.json" # Load the module metadata $content = Get-Content -Path $settingPath | ConvertFrom-Json # Load dependency mapping from JSON - $dependencyMapping = @{} + # Check if the dependency mapping file exists and load it if (Test-Path $dependencyMappingPath) { - $dependencyMapping = Get-Content -Path $dependencyMappingPath | ConvertFrom-Json + # Read the JSON content + $jsonContent = Get-Content -Path $dependencyMappingPath -Raw + + # Check if the JSON content is not null or empty + if (-not [string]::IsNullOrEmpty($jsonContent)) { + # Convert JSON to Hashtable + $dependencyMapping = @{} + $parsedContent = $jsonContent | ConvertFrom-Json + foreach ($key in $parsedContent.PSObject.Properties.Name) { + $dependencyMapping[$key] = $parsedContent.$key + } + } else { + Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json is empty." -ForegroundColor Yellow + } + } else { + Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json not found at $dependencyMappingPath." -ForegroundColor Yellow } + foreach ($subDir in $subDirectories) { # Define module name based on sub-directory name @@ -188,24 +204,54 @@ Set-StrictMode -Version 5 $manifestPath = Join-Path $this.OutputDirectory "$moduleName.psd1" # Check if the specified directory exists - if (-Not (Test-Path -Path $DirectoryPath)) { - Write-Error "The specified directory does not exist: $DirectoryPath" - return $null # Return null if the directory does not exist + if (-Not (Test-Path -Path $subDir)) { + Write-Error "The specified directory does not exist: $subDir" + exit } # Get all files in the specified directory and its subdirectories, without extensions - $allFunctions = Get-ChildItem -Path $DirectoryPath -Recurse -File | ForEach-Object { $_.BaseName } + $allFunctions = Get-ChildItem -Path $subDir -Recurse -File | ForEach-Object { $_.BaseName } $functions = $allFunctions + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" # Collect required modules from dependency mapping $requiredModules = @() - if ($dependencyMapping.ContainsKey($moduleName)) { - foreach ($dependency in $dependencyMapping[$moduleName]) { - $requiredModules += @{ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion} + if (Test-Path $dependencyMappingPath) { + $jsonContent = Get-Content -Path $dependencyMappingPath -Raw | ConvertFrom-Json + # Convert JSON to Hashtable + $dependencyMapping = @{} + foreach ($key in $jsonContent.PSObject.Properties.Name) { + $dependencyMapping[$key] = $jsonContent.$key + } + + if ($dependencyMapping.ContainsKey($moduleName)) { + foreach ($dependency in $dependencyMapping[$moduleName]) { + $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } + } } } + + $helpFileName = if ($Module -eq "Entra") { + "Microsoft.Graph.Entra.$moduleName-help.xml" + } else { + "Microsoft.Graph.Entra.Beta.$moduleName-help.xml" + } + + + $manifestFileName = if ($Module -eq "Entra") { + "Microsoft.Graph.Entra.$moduleName.psd1" + } else { + "Microsoft.Graph.Entra.Beta.$moduleName.psd1" + } + + + $moduleFileName = if ($Module -eq "Entra") { + "Microsoft.Graph.Entra.$moduleName-help.xml" + } else { + "Microsoft.Graph.Entra.Beta.$moduleName-help.xml" + } + # Module manifest settings $moduleSettings = @{ Path = $manifestPath @@ -216,7 +262,7 @@ Set-StrictMode -Version 5 AliasesToExport = @() Author = $($content.authors) CompanyName = $($content.owners) - FileList = @("$moduleName.psd1", "$moduleName.psm1", "$moduleName-Help.xml") + FileList = @("$manifestFileName.psd1", "$moduleFileName.psm1", "$helpFileName-Help.xml") RootModule = "$moduleName.psm1" Description = 'Microsoft Graph Entra PowerShell.' DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) @@ -225,14 +271,14 @@ Set-StrictMode -Version 5 RequiredModules = $requiredModules NestedModules = @() } + # Add prerelease info if it exists if ($null -ne $content.Prerelease) { $PSData.Prerelease = $content.Prerelease } - # Update any load message for this module if necessary - $this.LoadMessage = $this.LoadMessage.Replace("{VERSION}", $content.version) + # Create and update the module manifest Write-Host "[EntraModuleBuilder] Creating manifest for $moduleName at $manifestPath" -ForegroundColor Green @@ -248,30 +294,29 @@ Set-StrictMode -Version 5 [void] CreateModuleHelp([string] $Module) { - $binPath = $this.OutputDirectory - if (!(Test-Path $binPath)) { - New-Item -ItemType Directory -Path $binPath | Out-Null + if (!(Test-Path $this.OutputDirectory)) { + New-Item -ItemType Directory -Path $this.OutputDurectory | Out-Null } # Determine the base docs path based on the specified module - $baseDocsPath = $this.BaseDocsPath + $docsPath=$this.BaseDocsPath if ($Module -eq "Entra") { - $baseDocsPath = Join-Path -Path $baseDocsPath -ChildPath "entra-powershell-v1.0/Microsoft.Graph.Entra" + $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-v1.0/Microsoft.Graph.Entra" } elseif ($Module -eq "EntraBeta") { - $baseDocsPath = Join-Path -Path $baseDocsPath -ChildPath "entra-powershell-beta/Microsoft.Graph.Entra.Beta" + $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-beta/Microsoft.Graph.Entra.Beta" } else { Write-Host "Invalid module specified: $Module" -ForegroundColor Red return } # Check if the base docs path exists - if (!(Test-Path $baseDocsPath)) { - Write-Host "The specified base documentation path does not exist: $baseDocsPath" -ForegroundColor Red + if (!(Test-Path $docsPath)) { + Write-Host "The specified base documentation path does not exist: $docsPath" -ForegroundColor Red return } # Get all subdirectories within the base docs path - $subDirectories = Get-ChildItem -Path $baseDocsPath -Directory + $subDirectories = Get-ChildItem -Path $docsPath -Directory foreach ($subDirectory in $subDirectories) { # Get all markdown files in the current subdirectory $markdownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" @@ -289,9 +334,9 @@ Set-StrictMode -Version 5 "Microsoft.Graph.Entra.Beta.$subDirectoryName-help.xml" } - $helpOutputFilePath = Join-Path -Path $binPath -ChildPath $helpFileName + $helpOutputFilePath = Join-Path -Path $this.OutputDirectory -ChildPath $helpFileName - $moduleDocsPath=Join-Path -Path $baseDocsPath -ChildPath $subDirectory + $moduleDocsPath=Join-Path -Path $docsPath -ChildPath $subDirectory # Create the help file using PlatyPS New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force @@ -303,5 +348,4 @@ Set-StrictMode -Version 5 } -} - +} \ No newline at end of file From a9265d0df503d65847a2ebf0997c07a5cf7b7bad Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:56:39 +0300 Subject: [PATCH 018/124] fixes to EntraModuleBuilder --- src/EntraModuleBuilder.ps1 | 89 ++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 5eb2ded43e..b30a624882 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -163,24 +163,24 @@ Set-StrictMode -Version 5 # Load dependency mapping from JSON # Check if the dependency mapping file exists and load it - if (Test-Path $dependencyMappingPath) { - # Read the JSON content - $jsonContent = Get-Content -Path $dependencyMappingPath -Raw - - # Check if the JSON content is not null or empty - if (-not [string]::IsNullOrEmpty($jsonContent)) { - # Convert JSON to Hashtable - $dependencyMapping = @{} - $parsedContent = $jsonContent | ConvertFrom-Json - foreach ($key in $parsedContent.PSObject.Properties.Name) { - $dependencyMapping[$key] = $parsedContent.$key - } - } else { - Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json is empty." -ForegroundColor Yellow +if (Test-Path $dependencyMappingPath) { + # Read the JSON content + $jsonContent = Get-Content -Path $dependencyMappingPath -Raw + + # Check if the JSON content is not null or empty + if (-not [string]::IsNullOrEmpty($jsonContent)) { + # Convert JSON to Hashtable + $dependencyMapping = @{} + $parsedContent = $jsonContent | ConvertFrom-Json + foreach ($key in $parsedContent.PSObject.Properties.Name) { + $dependencyMapping[$key] = $parsedContent.$key } } else { - Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json not found at $dependencyMappingPath." -ForegroundColor Yellow + Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json is empty." -ForegroundColor Yellow } +} else { + Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json not found at $dependencyMappingPath." -ForegroundColor Yellow +} foreach ($subDir in $subDirectories) { @@ -215,21 +215,21 @@ Set-StrictMode -Version 5 $functions = $allFunctions + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" # Collect required modules from dependency mapping - $requiredModules = @() - if (Test-Path $dependencyMappingPath) { - $jsonContent = Get-Content -Path $dependencyMappingPath -Raw | ConvertFrom-Json - # Convert JSON to Hashtable - $dependencyMapping = @{} - foreach ($key in $jsonContent.PSObject.Properties.Name) { - $dependencyMapping[$key] = $jsonContent.$key - } - - if ($dependencyMapping.ContainsKey($moduleName)) { - foreach ($dependency in $dependencyMapping[$moduleName]) { - $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } - } - } +$requiredModules = @() +if (Test-Path $dependencyMappingPath) { + $jsonContent = Get-Content -Path $dependencyMappingPath -Raw | ConvertFrom-Json + # Convert JSON to Hashtable + $dependencyMapping = @{} + foreach ($key in $jsonContent.PSObject.Properties.Name) { + $dependencyMapping[$key] = $jsonContent.$key + } + + if ($dependencyMapping.ContainsKey($moduleName)) { + foreach ($dependency in $dependencyMapping[$moduleName]) { + $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } } + } +} $helpFileName = if ($Module -eq "Entra") { @@ -247,9 +247,9 @@ Set-StrictMode -Version 5 $moduleFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$moduleName-help.xml" + "Microsoft.Graph.Entra.$moduleName.psm1" } else { - "Microsoft.Graph.Entra.Beta.$moduleName-help.xml" + "Microsoft.Graph.Entra.Beta.$moduleName.psm1" } # Module manifest settings @@ -262,8 +262,8 @@ Set-StrictMode -Version 5 AliasesToExport = @() Author = $($content.authors) CompanyName = $($content.owners) - FileList = @("$manifestFileName.psd1", "$moduleFileName.psm1", "$helpFileName-Help.xml") - RootModule = "$moduleName.psm1" + FileList = @("$manifestFileName.psd1", "$moduleFileName.psm1", "$helpFileName-help.xml") + RootModule = "$moduleFileName.psm1" Description = 'Microsoft Graph Entra PowerShell.' DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) PowerShellVersion = $([System.Version]::Parse('5.1')) @@ -317,6 +317,7 @@ Set-StrictMode -Version 5 # Get all subdirectories within the base docs path $subDirectories = Get-ChildItem -Path $docsPath -Directory + Write-Host "SubDirs: $subDirectories" -ForegroundColor Blue foreach ($subDirectory in $subDirectories) { # Get all markdown files in the current subdirectory $markdownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" @@ -328,20 +329,32 @@ Set-StrictMode -Version 5 # Generate the help file name based on the module and sub-directory $subDirectoryName = [System.IO.Path]::GetFileName($subDirectory.FullName) + Write-Host "SubDirName: $subDirectoryName" -ForegroundColor Blue $helpFileName = if ($Module -eq "Entra") { "Microsoft.Graph.Entra.$subDirectoryName-help.xml" } else { "Microsoft.Graph.Entra.Beta.$subDirectoryName-help.xml" } - + $helpOutputFilePath = Join-Path -Path $this.OutputDirectory -ChildPath $helpFileName - $moduleDocsPath=Join-Path -Path $docsPath -ChildPath $subDirectory - - # Create the help file using PlatyPS - New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force + $moduleDocsPath=$subDirectory + Write-Host "ModuleDocsPath: $moduleDocsPath" -ForegroundColor Blue + + Write-Host "HelpOutputPath: $helpOutputFilePath" -ForegroundColor Blue + + try{ + # Create the help file using PlatyPS + New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force Write-Host "[EntraModuleBuilder] Help file generated: $helpOutputFilePath" -ForegroundColor Green + + }catch{ + + Write-Host "[EntraModuleBuilder] CreateModuleHelp: $_.Exception.Message" -ForegroundColor Red + } + + } Write-Host "[EntraModuleBuilder] Help files generated successfully for module: $Module" -ForegroundColor Green From 6f84fc1c43ecfbff376effd95307d9399bad6f0f Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:58:55 +0300 Subject: [PATCH 019/124] formatting --- src/EntraModuleBuilder.ps1 | 62 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index b30a624882..c1e0900e05 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -155,32 +155,32 @@ Set-StrictMode -Version 5 $subDirectories = Get-ChildItem -Path $this.BasePath -Directory # Update paths specific to this sub-directory - $settingPath = "./config/ModuleMetadata.json" - $dependencyMappingPath = "./config/dependencyMapping.json" + $settingPath = Join-Path $this.BasePath "./config/ModuleMetadata.json" + $dependencyMappingPath = Join-Path $this.BasePath "./config/dependencyMapping.json" # Load the module metadata $content = Get-Content -Path $settingPath | ConvertFrom-Json # Load dependency mapping from JSON # Check if the dependency mapping file exists and load it -if (Test-Path $dependencyMappingPath) { - # Read the JSON content - $jsonContent = Get-Content -Path $dependencyMappingPath -Raw - - # Check if the JSON content is not null or empty - if (-not [string]::IsNullOrEmpty($jsonContent)) { - # Convert JSON to Hashtable - $dependencyMapping = @{} - $parsedContent = $jsonContent | ConvertFrom-Json - foreach ($key in $parsedContent.PSObject.Properties.Name) { - $dependencyMapping[$key] = $parsedContent.$key + if (Test-Path $dependencyMappingPath) { + # Read the JSON content + $jsonContent = Get-Content -Path $dependencyMappingPath -Raw + + # Check if the JSON content is not null or empty + if (-not [string]::IsNullOrEmpty($jsonContent)) { + # Convert JSON to Hashtable + $dependencyMapping = @{} + $parsedContent = $jsonContent | ConvertFrom-Json + foreach ($key in $parsedContent.PSObject.Properties.Name) { + $dependencyMapping[$key] = $parsedContent.$key + } + } else { + Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json is empty." -ForegroundColor Yellow } } else { - Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json is empty." -ForegroundColor Yellow + Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json not found at $dependencyMappingPath." -ForegroundColor Yellow } -} else { - Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json not found at $dependencyMappingPath." -ForegroundColor Yellow -} foreach ($subDir in $subDirectories) { @@ -215,21 +215,21 @@ if (Test-Path $dependencyMappingPath) { $functions = $allFunctions + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" # Collect required modules from dependency mapping -$requiredModules = @() -if (Test-Path $dependencyMappingPath) { - $jsonContent = Get-Content -Path $dependencyMappingPath -Raw | ConvertFrom-Json - # Convert JSON to Hashtable - $dependencyMapping = @{} - foreach ($key in $jsonContent.PSObject.Properties.Name) { - $dependencyMapping[$key] = $jsonContent.$key - } - - if ($dependencyMapping.ContainsKey($moduleName)) { - foreach ($dependency in $dependencyMapping[$moduleName]) { - $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } + $requiredModules = @() + if (Test-Path $dependencyMappingPath) { + $jsonContent = Get-Content -Path $dependencyMappingPath -Raw | ConvertFrom-Json + # Convert JSON to Hashtable + $dependencyMapping = @{} + foreach ($key in $jsonContent.PSObject.Properties.Name) { + $dependencyMapping[$key] = $jsonContent.$key + } + + if ($dependencyMapping.ContainsKey($moduleName)) { + foreach ($dependency in $dependencyMapping[$moduleName]) { + $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } + } + } } - } -} $helpFileName = if ($Module -eq "Entra") { From ff32d9878d883db2f3e10c1d31a395c82d6c50fb Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:02:15 +0300 Subject: [PATCH 020/124] fixed manifest gen bug --- src/EntraModuleBuilder.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index c1e0900e05..bf4e685448 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -262,8 +262,8 @@ Set-StrictMode -Version 5 AliasesToExport = @() Author = $($content.authors) CompanyName = $($content.owners) - FileList = @("$manifestFileName.psd1", "$moduleFileName.psm1", "$helpFileName-help.xml") - RootModule = "$moduleFileName.psm1" + FileList = @("$manifestFileName", "$moduleFileName", "$helpFileName") + RootModule = "$moduleFileName" Description = 'Microsoft Graph Entra PowerShell.' DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) PowerShellVersion = $([System.Version]::Parse('5.1')) From 64912fe4a063d469a544ba54223e8e5d4464ed7c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:09:57 +0300 Subject: [PATCH 021/124] fixed manifest gen bug --- src/EntraModuleBuilder.ps1 | 45 ++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index bf4e685448..f120b76b21 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -187,8 +187,28 @@ Set-StrictMode -Version 5 # Define module name based on sub-directory name $moduleName = $subDir.Name + $helpFileName = if ($Module -eq "Entra") { + "Microsoft.Graph.Entra.$moduleName-help.xml" + } else { + "Microsoft.Graph.Entra.Beta.$moduleName-help.xml" + } + + + $manifestFileName = if ($Module -eq "Entra") { + "Microsoft.Graph.Entra.$moduleName.psd1" + } else { + "Microsoft.Graph.Entra.Beta.$moduleName.psd1" + } + + + $moduleFileName = if ($Module -eq "Entra") { + "Microsoft.Graph.Entra.$moduleName.psm1" + } else { + "Microsoft.Graph.Entra.Beta.$moduleName.psm1" + } + # Log the start of processing for this module - Write-Host "[EntraModuleBuilder] Processing module: $moduleName" -ForegroundColor Blue + Write-Host "[EntraModuleBuilder] Processing module: $moduleFileName" -ForegroundColor Blue # Define PSData block based on the contents of the ModuleMetadata.json file $PSData = @{ @@ -200,8 +220,9 @@ Set-StrictMode -Version 5 Prerelease = $null } + # Set the manifest path and functions to export - $manifestPath = Join-Path $this.OutputDirectory "$moduleName.psd1" + $manifestPath = Join-Path $this.OutputDirectory "$manifestFileName" # Check if the specified directory exists if (-Not (Test-Path -Path $subDir)) { @@ -232,25 +253,7 @@ Set-StrictMode -Version 5 } - $helpFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$moduleName-help.xml" - } else { - "Microsoft.Graph.Entra.Beta.$moduleName-help.xml" - } - - - $manifestFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$moduleName.psd1" - } else { - "Microsoft.Graph.Entra.Beta.$moduleName.psd1" - } - - - $moduleFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$moduleName.psm1" - } else { - "Microsoft.Graph.Entra.Beta.$moduleName.psm1" - } + # Module manifest settings $moduleSettings = @{ From 9b957836194a02b501527233e33267abfde24a0c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:24:50 +0300 Subject: [PATCH 022/124] Created New-Build.md --- build/Create-EntraModule.ps1 | 27 ++++++++ build/New-Build.md | 121 +++++++++++++++++++++++++++++++++++ src/EntraModuleBuilder.ps1 | 5 +- 3 files changed, 150 insertions(+), 3 deletions(-) create mode 100644 build/Create-EntraModule.ps1 create mode 100644 build/New-Build.md diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 new file mode 100644 index 0000000000..04a3a28bdb --- /dev/null +++ b/build/Create-EntraModule.ps1 @@ -0,0 +1,27 @@ +param ( + [string]$Module = "Entra" # Default to "Entra" if no argument is provided +) + +# Import the necessary scripts +. ..\src\EntraModuleSplitter.ps1 + + +# Split the module and take into account the AzureADAliases as well +$entraModuleSplitter = [EntraModuleSplitter]::new() +$entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument +$entraModuleSplitter.ProcessEntraAzureADAliases($Module) + +. ..\src\EntraModuleBuilder.ps1 +# Build Entra Module +$moduleBuilder = [EntraModuleBuilder]::new() + +# Determine the output path based on the module +$outputPath = if ($Module -eq "Entra") { + "..\module\Entra\Microsoft.Graph.Entra\" +} else { + "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" +} + +$moduleBuilder.CreateHelpFile($Module) +$moduleBuilder.CreateSubModuleFile($outputPath, ".\Typedefs.txt") +$moduleBuilder.CreateModuleManifest($Module) diff --git a/build/New-Build.md b/build/New-Build.md new file mode 100644 index 0000000000..336b7ee343 --- /dev/null +++ b/build/New-Build.md @@ -0,0 +1,121 @@ +## Building module + +Clone the module and follow the instructions described. You need **Microsoft.Graph PowerShell version 2.15.X** in order to build the module. + +```powershell +git clone https://github.com/microsoftgraph/entra-powershell.git +cd entra-powershell +``` + +### Install dependencies + +This module depends on some Microsoft Graph PowerShell modules. The following command installs the required dependencies. + +```powershell +# Install dependencies required to build the Microsoft Entra PowerShell General Availability (GA) +.\build\Install-Dependencies.ps1 -ModuleName Entra +``` + +Or + +```powershell +# Install the dependencies for the Microsoft Entra PowerShell preview +.\build\Install-Dependencies.ps1 -ModuleName EntraBeta +``` + +> [!TIP] +> If you encounter Execution Policies error, run the command `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`. + +### Install PlatyPS +The module help files are generated from markdown documentation (using platyPS module). To install PlatyPS module, run the command `Install-Module -Name PlatyPS`. + +```powershell +# Install PlatyPS module +Install-Module -Name PlatyPS +``` + +``` +### Build module +Use a clean PowerShell session when you're building the module. The building process attempts to load the required versions of the module, which fails if another version of the dependencies is already loaded. + +```powershell +.\build\Create-CreateModule.ps1 -Module Entra // or EntraBeta +``` + +The generated module is in the output folder `./bin` +In order to import it, you need to run `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` + +SubModule in this case is the name of the specific sub-module you want to use. + +## Usage + +Import the module and test the generated commands. + +```powershell +Import-Module .\bin\Microsoft.Graph.Entra..psd1 -Force +Connect-MgGraph -Scopes "User.Read.All" +Get-EntraUser -Top 10 +``` + +> [!TIP] +> If you are using PowerShell 5.1, you may experience the error `Function cannot be created because function capacity 4096 has been exceeded for this scope`. To fix this error, run the command: `$MaximumFunctionCount=32768`, then retry importing the module again. + +```powershell +$MaximumFunctionCount=32768 +``` + +## Testing as AzureAD PowerShell module + +For migration scenarios (if you have a script with AzureAD commands), you can use the command `Enable-EntraAzureADAlias` to enable aliases to emulate AzureAD PowerShell module commands. You need to remove AzureAD and AzureAD Preview modules to avoid collisions via the command `Remove-Module AzureAD` or `Remove-Module AzureADPreview` + +```powershell +Enable-EntraAzureADAlias +Connect-Graph +Get-AzureADUser +``` + +## Installing a test version (Optional) + +Install a test version (optional), which is recommended if you're trying to test with automation, which tries to load the module from the default PowerShell modules folder. + +```powershell +. .\build\Common-functions.ps1 +Create-ModuleFolder +Register-LocalGallery +.\build\Publish-LocalCompatModule.ps1 -Install +Unregister-LocalGallery +#When you install, you can load the module without the Path to the files. +Import-Module Microsoft.Graph.Entra..psd1 -Force +``` + +The snippet in the optional testing section publishes the module to a local repository and installs the module. + +## FAQs + +1. Installation error: `cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.` + +To solve this error, run the command: + +```powershell +Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser +``` + +2. Installation error: `Function cannot be created because function capacity 4096 has been exceeded for this scope.` + +To solve this error, run the command: + +```powershell +$MaximumFunctionCount=32768 +``` + +Or + +Use the latest version of PowerShell 7+ as the runtime version (highly recommended). + +3. Build Help error: `New-ExternalHelp : The term 'New-ExternalHelp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. `. + +To solve this error, install PlatyPS module by running the command: + +```powershell +Install-Module -Name PlatyPS +``` diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index f120b76b21..4b46d634d7 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -188,9 +188,9 @@ Set-StrictMode -Version 5 $moduleName = $subDir.Name $helpFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$moduleName-help.xml" + "Microsoft.Graph.Entra.$moduleName-Help.xml" } else { - "Microsoft.Graph.Entra.Beta.$moduleName-help.xml" + "Microsoft.Graph.Entra.Beta.$moduleName-Help.xml" } @@ -363,5 +363,4 @@ Set-StrictMode -Version 5 Write-Host "[EntraModuleBuilder] Help files generated successfully for module: $Module" -ForegroundColor Green } - } \ No newline at end of file From 640cc76ae2e7f43d979d73ef16674f1d008c8856 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:59:36 +0300 Subject: [PATCH 023/124] added Doc Splitting code and Module Mapping creator --- build/Create-ModuleMapping.ps1 | 60 ++++++++++++++++++++++++++++++ build/Split-Docs.ps1 | 68 ++++++++++++++++++++++++++++++++++ src/EntraModuleBuilder.ps1 | 17 ++++----- 3 files changed, 136 insertions(+), 9 deletions(-) create mode 100644 build/Create-ModuleMapping.ps1 create mode 100644 build/Split-Docs.ps1 diff --git a/build/Create-ModuleMapping.ps1 b/build/Create-ModuleMapping.ps1 new file mode 100644 index 0000000000..8930e2bcf8 --- /dev/null +++ b/build/Create-ModuleMapping.ps1 @@ -0,0 +1,60 @@ +function Get-DirectoryFileMap { + param ( + [string]$Source = 'Entra', # Default to 'Entra' + [string]$OutputDirectory + ) + + # Determine the root directory based on the Source parameter + switch ($Source) { + 'Entra' { + $RootDirectory = "./entra-powershell/module/Entra/Microsoft.Graph.Entra" + } + 'EntraBeta' { + $RootDirectory = "./entra-powershell/module/Entra/Microsoft.Graph.Entra.Beta" + } + default { + throw "Invalid Source specified. Use 'Entra' or 'EntraBeta'." + } + } + + # Check if the root directory exists + if (-not (Test-Path -Path $RootDirectory -PathType Container)) { + throw "Directory '$RootDirectory' does not exist." + } + + # Check if the output directory exists, create if it doesn't + if (-not (Test-Path -Path $OutputDirectory -PathType Container)) { + New-Item -Path $OutputDirectory -ItemType Directory | Out-Null + } + + $directoryMap = @{} + + # Get all the subdirectories under the root directory + $subDirectories = Get-ChildItem -Path $RootDirectory -Directory + + foreach ($subDir in $subDirectories) { + # Get the files in each sub-directory without their extensions + $files = Get-ChildItem -Path $subDir.FullName -File | ForEach-Object { + [System.IO.Path]::GetFileNameWithoutExtension($_.Name) + } + + # Add the directory name and corresponding file names to the map + $directoryMap[$subDir.Name] = $files + } + + # Convert the directory map to JSON + $jsonOutput = $directoryMap | ConvertTo-Json -Depth 3 + + # Define the output file path as moduleMapping.json + $outputFilePath = Join-Path -Path $OutputDirectory -ChildPath "moduleMapping.json" + + # Write the JSON output to moduleMapping.json + $jsonOutput | Out-File -FilePath $outputFilePath -Encoding UTF8 + + Write-Host "moduleMapping.json has been created at $outputFilePath" +} + +# Usage example: +$outputDir = "C:\Users\enganga\Entra\" +Get-DirectoryFileMap -Source 'Entra' -OutputDirectory $outputDir # For Entra + diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 new file mode 100644 index 0000000000..4568d05f16 --- /dev/null +++ b/build/Split-Docs.ps1 @@ -0,0 +1,68 @@ +function Copy-MarkdownFilesFromMapping { + param ( + [string]$Source = 'Entra', # Default to 'Entra' + [string]$MappingFilePath = "./moduleMapping.json", # Path to moduleMapping.json + [string]$DocsRootDirectory # Output root directory to copy .md files into + ) + + # Check if the mapping file exists + if (-not (Test-Path -Path $MappingFilePath -PathType Leaf)) { + throw "Mapping file '$MappingFilePath' does not exist." + } + + # Load the JSON content from the mapping file + $moduleMapping = Get-Content -Path $MappingFilePath | ConvertFrom-Json + + # Determine the source directory based on the Source parameter + switch ($Source) { + 'Entra' { + $SourceDirectory = "./entra-powershell/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" + } + 'EntraBeta' { + $SourceDirectory = "./entra-powershell/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" + } + default { + throw "Invalid Source specified. Use 'Entra' or 'EntraBeta'." + } + } + + # Check if the source directory exists + if (-not (Test-Path -Path $SourceDirectory -PathType Container)) { + throw "Source directory '$SourceDirectory' does not exist." + } + + # Check if the output root directory exists, create if it doesn't + if (-not (Test-Path -Path $DocsRootDirectory -PathType Container)) { + New-Item -Path $DocsRootDirectory -ItemType Directory | Out-Null + } + + # Iterate over each key-value pair in the moduleMapping.json + foreach ($entry in $moduleMapping.PSObject.Properties) { + $subDirName = $entry.Name # Key (sub-directory name) + $fileNames = $entry.Value # Value (array of file names without extensions) + + # Create the sub-directory under the output root directory + $targetSubDir = Join-Path -Path $DocsRootDirectory -ChildPath $subDirName + if (-not (Test-Path -Path $targetSubDir -PathType Container)) { + New-Item -Path $targetSubDir -ItemType Directory | Out-Null + } + + # Copy all matching .md files to the target sub-directory + foreach ($fileName in $fileNames) { + $sourceFile = Join-Path -Path $SourceDirectory -ChildPath "$fileName.md" + if (Test-Path -Path $sourceFile -PathType Leaf) { + Copy-Item -Path $sourceFile -Destination $targetSubDir + Write-Host "Copied $sourceFile to $targetSubDir" + } else { + Write-Warning "File $fileName.md not found in $SourceDirectory" + } + } + } + + Write-Host "Markdown file copying complete." +} + +# Usage example: +$mappingFile = "./moduleMapping.json" +$outputDocsDir = "C:\Users\enganga\Entra\Split-Docs\" +Copy-MarkdownFilesFromMapping -Source 'Entra' -MappingFilePath $mappingFile -DocsRootDirectory $outputDocsDir # For Entra diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 4b46d634d7..0502fd15c3 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -147,7 +147,9 @@ Set-StrictMode -Version 5 Write-Host "[EntraModuleBuilder] CreateSubModuleFile script completed." -ForegroundColor Green } - + [void] CreateRootModule([string] $Module){ + + } [void] CreateModuleManifest($module) { @@ -252,9 +254,6 @@ Set-StrictMode -Version 5 } } - - - # Module manifest settings $moduleSettings = @{ Path = $manifestPath @@ -333,17 +332,18 @@ Set-StrictMode -Version 5 # Generate the help file name based on the module and sub-directory $subDirectoryName = [System.IO.Path]::GetFileName($subDirectory.FullName) Write-Host "SubDirName: $subDirectoryName" -ForegroundColor Blue + $helpFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$subDirectoryName-help.xml" + "Microsoft.Graph.Entra.$subDirectoryName-Help.xml" } else { - "Microsoft.Graph.Entra.Beta.$subDirectoryName-help.xml" + "Microsoft.Graph.Entra.Beta.$subDirectoryName-Help.xml" } $helpOutputFilePath = Join-Path -Path $this.OutputDirectory -ChildPath $helpFileName $moduleDocsPath=$subDirectory + Write-Host "ModuleDocsPath: $moduleDocsPath" -ForegroundColor Blue - Write-Host "HelpOutputPath: $helpOutputFilePath" -ForegroundColor Blue try{ @@ -352,8 +352,7 @@ Set-StrictMode -Version 5 Write-Host "[EntraModuleBuilder] Help file generated: $helpOutputFilePath" -ForegroundColor Green - }catch{ - + }catch{ Write-Host "[EntraModuleBuilder] CreateModuleHelp: $_.Exception.Message" -ForegroundColor Red } From c00e45478026839740a623f78d76b0ef5b03f62e Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:09:29 +0300 Subject: [PATCH 024/124] updates --- build/Create-ModuleMapping.ps1 | 19 +++++++++++++------ build/Split-Docs.ps1 | 28 ++++++++++++++++++++++------ 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/build/Create-ModuleMapping.ps1 b/build/Create-ModuleMapping.ps1 index 8930e2bcf8..13cd30f21f 100644 --- a/build/Create-ModuleMapping.ps1 +++ b/build/Create-ModuleMapping.ps1 @@ -1,16 +1,24 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +#This function uses the moduleMapping.json to split the docs to subdirectories + function Get-DirectoryFileMap { param ( - [string]$Source = 'Entra', # Default to 'Entra' - [string]$OutputDirectory + [string]$Source = 'Entra' # Default to 'Entra' + ) - # Determine the root directory based on the Source parameter + # Determine the root directory and the output based on the Source parameter switch ($Source) { 'Entra' { $RootDirectory = "./entra-powershell/module/Entra/Microsoft.Graph.Entra" + $OutputDirectory='../module/Entra/config/' } 'EntraBeta' { - $RootDirectory = "./entra-powershell/module/Entra/Microsoft.Graph.Entra.Beta" + $RootDirectory = "./entra-powershell/module/EntraBeta/Microsoft.Graph.Entra.Beta" + $OutputDirectory="../module/EntraBeta/config/" } default { throw "Invalid Source specified. Use 'Entra' or 'EntraBeta'." @@ -55,6 +63,5 @@ function Get-DirectoryFileMap { } # Usage example: -$outputDir = "C:\Users\enganga\Entra\" -Get-DirectoryFileMap -Source 'Entra' -OutputDirectory $outputDir # For Entra +Get-DirectoryFileMap -Source 'Entra' diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 4568d05f16..159fa35c43 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -1,10 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +#This function copies the docs using the moduleMapping.json into their submodule directories + function Copy-MarkdownFilesFromMapping { param ( - [string]$Source = 'Entra', # Default to 'Entra' - [string]$MappingFilePath = "./moduleMapping.json", # Path to moduleMapping.json - [string]$DocsRootDirectory # Output root directory to copy .md files into + [string]$Source = 'Entra' # Default to 'Entra' ) + + switch ($Source) { + 'Entra' { + $DocsRootDirectory = "../module/docs/Entra/Microsoft.Graph.Entra" + $MappingFilePath='../module/Entra/config/moduleMapping.json' + } + 'EntraBeta' { + $DocsRootDirectory = "../module/docs/EntraBeta/Microsoft.Graph.Entra.Beta" + $OutputDirectory="../module/EntraBeta/config/" + } + default { + throw "Invalid Source specified. Use 'Entra' or 'EntraBeta'." + } + } # Check if the mapping file exists if (-not (Test-Path -Path $MappingFilePath -PathType Leaf)) { throw "Mapping file '$MappingFilePath' does not exist." @@ -63,6 +81,4 @@ function Copy-MarkdownFilesFromMapping { } # Usage example: -$mappingFile = "./moduleMapping.json" -$outputDocsDir = "C:\Users\enganga\Entra\Split-Docs\" -Copy-MarkdownFilesFromMapping -Source 'Entra' -MappingFilePath $mappingFile -DocsRootDirectory $outputDocsDir # For Entra +Copy-MarkdownFilesFromMapping -Source 'Entra' # For Entra From 15a2f7de7d19bb5c00d3bbc738c9f76a2165dcef Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 16:52:55 +0300 Subject: [PATCH 025/124] Debugged to add Get-EntraUnsupportedCommand and New-EntraCustomHeaders functions --- build/Create-EntraModule.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 04a3a28bdb..5986e7df82 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -1,3 +1,7 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + param ( [string]$Module = "Entra" # Default to "Entra" if no argument is provided ) @@ -6,6 +10,7 @@ param ( . ..\src\EntraModuleSplitter.ps1 + # Split the module and take into account the AzureADAliases as well $entraModuleSplitter = [EntraModuleSplitter]::new() $entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument From 79d128c6b44193afd3ef560c52f29b34e8082140 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 17:47:34 +0300 Subject: [PATCH 026/124] Debug to add export --- .../EntraBeta/config/dependencyMapping.json | 2 +- src/EntraModuleBuilder.ps1 | 85 ++++++----- src/EntraModuleSplitter.ps1 | 136 +++++++++++------- 3 files changed, 130 insertions(+), 93 deletions(-) diff --git a/module/EntraBeta/config/dependencyMapping.json b/module/EntraBeta/config/dependencyMapping.json index d4a8131a71..432c1df114 100644 --- a/module/EntraBeta/config/dependencyMapping.json +++ b/module/EntraBeta/config/dependencyMapping.json @@ -1,3 +1,3 @@ { - "Microsoft.Graph.Entra.Beta.Users":["Microsoft.Graph.Users,Microsoft.Graph.Authentication"] + "Microsoft.Graph.Entra.Beta.Users":["Microsoft.Graph.Users","Microsoft.Graph.Authentication"] } \ No newline at end of file diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 0502fd15c3..a6113101d2 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -67,54 +67,59 @@ Set-StrictMode -Version 5 } [void] ProcessSubDirectory([string]$currentDirPath, [string]$currentDirName, [string]$parentDirName, [string]$destDirectory, [string]$typedefsFilePath) { - Write-Host "[EntraModuleBuilder] Processing directory: $currentDirPath" -ForegroundColor Yellow + Write-Host "[EntraModuleBuilder] Processing directory: $currentDirPath" -ForegroundColor Yellow - $psm1FileName = "$parentDirName.$currentDirName.psm1" - $psm1FilePath = Join-Path -Path $destDirectory -ChildPath $psm1FileName + $psm1FileName = "$parentDirName.$currentDirName.psm1" + $psm1FilePath = Join-Path -Path $destDirectory -ChildPath $psm1FileName - Write-Host "[EntraModuleBuilder] Creating .psm1 file: $psm1FilePath" -ForegroundColor Green + Write-Host "[EntraModuleBuilder] Creating .psm1 file: $psm1FilePath" -ForegroundColor Green - $psm1Content = $this.headerText + "`n" # Add a newline after the header - $ps1Files = Get-ChildItem -Path $currentDirPath -Filter "*.ps1" + $psm1Content = $this.headerText + "`n" # Add a newline after the header + $ps1Files = Get-ChildItem -Path $currentDirPath -Filter "*.ps1" - if ($ps1Files.Count -eq 0) { - Write-Host "[EntraModuleBuilder] Warning: No .ps1 files found in directory $currentDirPath" -ForegroundColor Yellow - } + if ($ps1Files.Count -eq 0) { + Write-Host "[EntraModuleBuilder] Warning: No .ps1 files found in directory $currentDirPath" -ForegroundColor Yellow + } - $enableEntraFiles = @() - $otherFiles = @() + $enableEntraFiles = @() + $otherFiles = @() - foreach ($ps1File in $ps1Files) { - if ($ps1File.Name -like "Enable-Entra*") { - $enableEntraFiles += $ps1File - } else { - $otherFiles += $ps1File - } + foreach ($ps1File in $ps1Files) { + if ($ps1File.Name -like "Enable-Entra*") { + $enableEntraFiles += $ps1File + } else { + $otherFiles += $ps1File } + } - foreach ($ps1File in $otherFiles) { - Write-Host "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan - $fileContent = Get-Content -Path $ps1File.FullName - $cleanedContent = $this.RemoveHeader($fileContent) - $psm1Content += $cleanedContent -join "`n" - } + foreach ($ps1File in $otherFiles) { + Write-Host "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan + $fileContent = Get-Content -Path $ps1File.FullName + $cleanedContent = $this.RemoveHeader($fileContent) + $psm1Content += $cleanedContent -join "`n" + } - foreach ($ps1File in $enableEntraFiles) { - Write-Host "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan - $fileContent = Get-Content -Path $ps1File.FullName - $cleanedContent = $this.RemoveHeader($fileContent) - $psm1Content += $cleanedContent -join "`n" - } + foreach ($ps1File in $enableEntraFiles) { + Write-Host "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan + $fileContent = Get-Content -Path $ps1File.FullName + $cleanedContent = $this.RemoveHeader($fileContent) + $psm1Content += $cleanedContent -join "`n" + } - Write-Host "[EntraModuleBuilder] Appending content from Typedefs.txt" -ForegroundColor Cyan - $typedefsContent = Get-Content -Path $typedefsFilePath -Raw - $psm1Content += "`n# Typedefs`n" + $typedefsContent + # Add the Export-ModuleMember line to export functions + $functionsToExport = ($otherFiles + $enableEntraFiles | ForEach-Object { $_.BaseName }) -join "', '" + $psm1Content += "`nExport-ModuleMember -Function @('$functionsToExport')`n" - Write-Host "[EntraModuleBuilder] Writing .psm1 file to disk: $psm1FilePath" -ForegroundColor Green - Set-Content -Path $psm1FilePath -Value $psm1Content + Write-Host "[EntraModuleBuilder] Appending content from Typedefs.txt" -ForegroundColor Cyan + $typedefsContent = Get-Content -Path $typedefsFilePath -Raw + $psm1Content += "`n# Typedefs`n" + $typedefsContent + + Write-Host "[EntraModuleBuilder] Writing .psm1 file to disk: $psm1FilePath" -ForegroundColor Green + Set-Content -Path $psm1FilePath -Value $psm1Content + + Write-Host "[EntraModuleBuilder] Module file created: $psm1FilePath" -ForegroundColor Green +} - Write-Host "[EntraModuleBuilder] Module file created: $psm1FilePath" -ForegroundColor Green - } [void] CreateSubModuleFile([string]$startDirectory, [string]$typedefsFilePath=$this.TypeDefsDirectory) { Write-Host "[EntraModuleBuilder] Starting CreateSubModuleFile script..." -ForegroundColor Green @@ -241,14 +246,18 @@ Set-StrictMode -Version 5 $requiredModules = @() if (Test-Path $dependencyMappingPath) { $jsonContent = Get-Content -Path $dependencyMappingPath -Raw | ConvertFrom-Json + Write-Host "Dependency Mapping: $jsonContent" -ForegroundColor Green # Convert JSON to Hashtable $dependencyMapping = @{} foreach ($key in $jsonContent.PSObject.Properties.Name) { $dependencyMapping[$key] = $jsonContent.$key } - if ($dependencyMapping.ContainsKey($moduleName)) { - foreach ($dependency in $dependencyMapping[$moduleName]) { + $keyModuleName= [System.IO.Path]::GetFileNameWithoutExtension($moduleFileName) + + if ($dependencyMapping.ContainsKey($keyModuleName)) { + Write-Host "Here #moduleFin" -ForegroundColor Red + foreach ($dependency in $dependencyMapping[$keyModuleName]) { $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } } } diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 4b012eae02..bcb52411fa 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -75,79 +75,107 @@ class EntraModuleSplitter { } [void] ProcessFunction([pscustomobject]$function, [string]$specificFunctionName, [string]$moduleOutputDirectory, [PSCustomObject]$jsonContent, [string]$header, [string]$unmappedDirectory) { - $functionName = $function.Name - $functionContent = $function.Content - $ps1Content = $header + "`n" + $functionContent - - # Check for specific function - if ($functionName -eq $specificFunctionName) { - $topLevelOutputPath = Join-Path -Path $moduleOutputDirectory -ChildPath "$specificFunctionName.ps1" - Set-Content -Path $topLevelOutputPath -Value $ps1Content - Write-Host "[EntraModuleSplitter] Created specific function file: $topLevelOutputPath" -ForegroundColor Cyan - return - } + $functionName = $function.Name + $functionContent = $function.Content + $ps1Content = $header + "`n" + $functionContent + + # Check for specific function + if ($functionName -eq $specificFunctionName) { + $topLevelOutputPath = Join-Path -Path $moduleOutputDirectory -ChildPath "$specificFunctionName.ps1" + Set-Content -Path $topLevelOutputPath -Value $ps1Content + Write-Host "[EntraModuleSplitter] Created specific function file: $topLevelOutputPath" -ForegroundColor Cyan + return + } + + $isMapped = $false - $isMapped = $false + foreach ($key in $jsonContent.PSObject.Properties.Name) { + if ($functionName -like "*Dir*") { + $key = 'Directory' + } - foreach ($key in $jsonContent.PSObject.Properties.Name) { - if ($functionName -like "*Dir*") { - $key = 'Directory' + if ($functionName -like "*$key*") { + $keyDirectoryPath = if ($functionName -like "*Device*") { + Join-Path -Path $moduleOutputDirectory -ChildPath "Device" + } else { + Join-Path -Path $moduleOutputDirectory -ChildPath $key } - if ($functionName -like "*$key*") { - $keyDirectoryPath = if ($functionName -like "*Device*") { - Join-Path -Path $moduleOutputDirectory -ChildPath "Device" - } else { - Join-Path -Path $moduleOutputDirectory -ChildPath $key - } + # Create the directory if it doesn't exist + $this.CreateOutputDirectory($keyDirectoryPath) - $this.CreateOutputDirectory($keyDirectoryPath) + # Write the main function to the appropriate directory + $outputFilePath = Join-Path -Path $keyDirectoryPath -ChildPath "$functionName.ps1" + Set-Content -Path $outputFilePath -Value $ps1Content + Write-Host "[EntraModuleSplitter] Created function file: $outputFilePath in $keyDirectoryPath" -ForegroundColor Green - $outputFilePath = Join-Path -Path $keyDirectoryPath -ChildPath "$functionName.ps1" - Set-Content -Path $outputFilePath -Value $ps1Content - Write-Host "[EntraModuleSplitter] Created function file: $outputFilePath in $keyDirectoryPath" -ForegroundColor Green - $isMapped = $true - break - } + $isMapped = $true + break } + } - if (-not $isMapped) { - $unmappedFilePath = Join-Path -Path $unmappedDirectory -ChildPath "$functionName.ps1" - Set-Content -Path $unmappedFilePath -Value $ps1Content - Write-Host "[EntraModuleSplitter] Created unmapped function file: $unmappedFilePath in UnMappedFiles" -ForegroundColor Red - } + if (-not $isMapped) { + $unmappedFilePath = Join-Path -Path $unmappedDirectory -ChildPath "$functionName.ps1" + Set-Content -Path $unmappedFilePath -Value $ps1Content + Write-Host "[EntraModuleSplitter] Created unmapped function file: $unmappedFilePath in UnMappedFiles" -ForegroundColor Red } - +} - [void] SplitEntraModule([string]$Source = 'Entra') { - # Determine file paths and output directories - $psm1FilePath = $this.GetModuleFilePath($Source) - $outputDirectory = $this.GetOutputDirectory($Source) - $jsonFilePath = "..\module\"+$Source+"\config\moduleMapping.json" + [void] AddFunctionsToAllDirectories([string]$moduleOutputDirectory, [PSCustomObject[]]$functionContents) { + # Get all directories under the module output directory + $subDirectories = Get-ChildItem -Path $moduleOutputDirectory -Directory - $this.CreateOutputDirectory($outputDirectory) - $unmappedDirectory = Join-Path -Path $outputDirectory -ChildPath "UnMappedFiles" - $this.CreateOutputDirectory($unmappedDirectory) + foreach ($subDir in $subDirectories) { + foreach ($functionContent in $functionContents) { + # Construct the full path for the function file + $functionName = $functionContent.Name + $headerPs1Content = $this.Header + "`n" + $functionContent.Content + $functionFilePath = Join-Path -Path $subDir.FullName -ChildPath "$functionName.ps1" - $jsonContent = $this.ReadJsonFile($jsonFilePath) - $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1FilePath) - $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName - $this.CreateOutputDirectory($moduleOutputDirectory) + # Write the function to the specified file + Set-Content -Path $functionFilePath -Value $headerPs1Content + Write-Host "[EntraModuleSplitter] Added $functionName function to: $functionFilePath" -ForegroundColor Green + } + } +} - $psm1Content = Get-Content -Path $psm1FilePath -Raw - $functions = $this.ExtractFunctions($psm1Content) +[void] SplitEntraModule([string]$Source = 'Entra') { + # Determine file paths and output directories + $psm1FilePath = $this.GetModuleFilePath($Source) + $outputDirectory = $this.GetOutputDirectory($Source) + $jsonFilePath = ".\key-value-pairs.json" - # Initialize a variable to track if the specific function is processed - $specificFunctionName = if ($moduleName -eq "Microsoft.Graph.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAlias" } + $this.CreateOutputDirectory($outputDirectory) + $unmappedDirectory = Join-Path -Path $outputDirectory -ChildPath "UnMappedFiles" + $this.CreateOutputDirectory($unmappedDirectory) - foreach ($function in $functions) { - $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) - } + $jsonContent = $this.ReadJsonFile($jsonFilePath) + $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1FilePath) + $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName + $this.CreateOutputDirectory($moduleOutputDirectory) + + $psm1Content = Get-Content -Path $psm1FilePath -Raw + $functions = $this.ExtractFunctions($psm1Content) + + # Get the function contents for both New-EntraCustomHeaders and Get-EntraUnsupportedCommand + $functionNames = @("New-EntraCustomHeaders", "Get-EntraUnsupportedCommand") + $functionContents = $functions | Where-Object { $functionNames -contains $_.Name } - Write-Host "[EntraModuleSplitter] Splitting and organizing complete." -ForegroundColor Green + # Initialize a variable to track if the specific function is processed + $specificFunctionName = if ($moduleName -eq "Microsoft.Graph.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAliases" } + + foreach ($function in $functions) { + $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) } + # Call the new method to add functions to all directories + $this.AddFunctionsToAllDirectories($moduleOutputDirectory, $functionContents) + + Write-Host "[EntraModuleSplitter] Splitting and organizing complete." -ForegroundColor Green +} + + [void] ProcessEntraAzureADAliases([string]$Module = 'Entra') { # Set the start directory and alias file path based on the Module parameter $startDirectory, $aliasFilePath = $this.GetModuleDirectories($Module) From a7c4f43a7f90986ace3237d9e385cc748e794803 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 21 Oct 2024 17:48:30 +0300 Subject: [PATCH 027/124] Debug to add export --- module/Entra/config/dependencyMapping.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/Entra/config/dependencyMapping.json b/module/Entra/config/dependencyMapping.json index 432eef13d6..06c9b2af7d 100644 --- a/module/Entra/config/dependencyMapping.json +++ b/module/Entra/config/dependencyMapping.json @@ -1,3 +1,3 @@ { - "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users,Microsoft.Graph.Authentication"] + "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Authentication"] } \ No newline at end of file From 4349dc4ae0ab60fa2cb3f146a75e4b283c4235ba Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 22 Oct 2024 09:59:50 +0300 Subject: [PATCH 028/124] Refactored Create-ModuleMapping --- build/Create-ModuleMapping.ps1 | 57 ++++++++++++++++++++++++++-------- src/EntraModuleBuilder.ps1 | 1 - 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/build/Create-ModuleMapping.ps1 b/build/Create-ModuleMapping.ps1 index 13cd30f21f..fe5c3c8a39 100644 --- a/build/Create-ModuleMapping.ps1 +++ b/build/Create-ModuleMapping.ps1 @@ -7,51 +7,82 @@ function Get-DirectoryFileMap { param ( [string]$Source = 'Entra' # Default to 'Entra' - ) + # Function to log messages with color + function Log-Message { + param ( + [string]$Message, + [string]$Level = 'Info' # Default log level + ) + + switch ($Level) { + 'Info' { + Write-Host "[Create-ModuleMapping] INFO: $Message" -ForegroundColor Green + } + 'Warning' { + Write-Host "[Create-ModuleMapping] WARNING: $Message" -ForegroundColor Yellow + } + 'Error' { + Write-Host "[Create-ModuleMapping] ERROR: $Message" -ForegroundColor Red + } + default { + Write-Host "[Create-ModuleMapping] $Message" -ForegroundColor White + } + } + } + # Determine the root directory and the output based on the Source parameter switch ($Source) { 'Entra' { $RootDirectory = "./entra-powershell/module/Entra/Microsoft.Graph.Entra" - $OutputDirectory='../module/Entra/config/' + $OutputDirectory = '../module/Entra/config/' } 'EntraBeta' { $RootDirectory = "./entra-powershell/module/EntraBeta/Microsoft.Graph.Entra.Beta" - $OutputDirectory="../module/EntraBeta/config/" + $OutputDirectory = "../module/EntraBeta/config/" } default { + Log-Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." 'Error' throw "Invalid Source specified. Use 'Entra' or 'EntraBeta'." } } # Check if the root directory exists if (-not (Test-Path -Path $RootDirectory -PathType Container)) { + Log-Message "Directory '$RootDirectory' does not exist." 'Error' throw "Directory '$RootDirectory' does not exist." + } else { + Log-Message "Root directory '$RootDirectory' found." } # Check if the output directory exists, create if it doesn't if (-not (Test-Path -Path $OutputDirectory -PathType Container)) { New-Item -Path $OutputDirectory -ItemType Directory | Out-Null + Log-Message "Output directory '$OutputDirectory' did not exist, created it." 'Warning' + } else { + Log-Message "Output directory '$OutputDirectory' exists." } - $directoryMap = @{} + $fileDirectoryMap = @{} # Get all the subdirectories under the root directory $subDirectories = Get-ChildItem -Path $RootDirectory -Directory foreach ($subDir in $subDirectories) { + Log-Message "Processing subdirectory '$($subDir.Name)'." 'Info' + # Get the files in each sub-directory without their extensions $files = Get-ChildItem -Path $subDir.FullName -File | ForEach-Object { - [System.IO.Path]::GetFileNameWithoutExtension($_.Name) + $fileName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name) + # Map the file name to the directory name + $fileDirectoryMap[$fileName] = $subDir.Name + Log-Message "Mapped file '$fileName' to directory '$($subDir.Name)'." 'Info' } - - # Add the directory name and corresponding file names to the map - $directoryMap[$subDir.Name] = $files } - # Convert the directory map to JSON - $jsonOutput = $directoryMap | ConvertTo-Json -Depth 3 + # Convert the file-directory map to JSON + $jsonOutput = $fileDirectoryMap | ConvertTo-Json -Depth 3 # Define the output file path as moduleMapping.json $outputFilePath = Join-Path -Path $OutputDirectory -ChildPath "moduleMapping.json" @@ -59,9 +90,9 @@ function Get-DirectoryFileMap { # Write the JSON output to moduleMapping.json $jsonOutput | Out-File -FilePath $outputFilePath -Encoding UTF8 - Write-Host "moduleMapping.json has been created at $outputFilePath" + Log-Message "moduleMapping.json has been created at '$outputFilePath'." 'Info' } -# Usage example: -Get-DirectoryFileMap -Source 'Entra' + + diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index a6113101d2..220f824f2b 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -256,7 +256,6 @@ Set-StrictMode -Version 5 $keyModuleName= [System.IO.Path]::GetFileNameWithoutExtension($moduleFileName) if ($dependencyMapping.ContainsKey($keyModuleName)) { - Write-Host "Here #moduleFin" -ForegroundColor Red foreach ($dependency in $dependencyMapping[$keyModuleName]) { $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } } From 6c5a6b61b8fa9d394ad9fa2f4930e57d5408272b Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:05:07 +0300 Subject: [PATCH 029/124] refactored logging code --- build/Create-ModuleMapping.ps1 | 28 ++-------------- build/Split-Docs.ps1 | 61 ++++++++++++++++++++-------------- build/common-functions.ps1 | 29 ++++++++++++++++ 3 files changed, 68 insertions(+), 50 deletions(-) diff --git a/build/Create-ModuleMapping.ps1 b/build/Create-ModuleMapping.ps1 index fe5c3c8a39..806f42b8b8 100644 --- a/build/Create-ModuleMapping.ps1 +++ b/build/Create-ModuleMapping.ps1 @@ -3,43 +3,21 @@ # ------------------------------------------------------------------------------ #This function uses the moduleMapping.json to split the docs to subdirectories - +. ./common-functions.ps1 function Get-DirectoryFileMap { param ( [string]$Source = 'Entra' # Default to 'Entra' ) - # Function to log messages with color - function Log-Message { - param ( - [string]$Message, - [string]$Level = 'Info' # Default log level - ) - - switch ($Level) { - 'Info' { - Write-Host "[Create-ModuleMapping] INFO: $Message" -ForegroundColor Green - } - 'Warning' { - Write-Host "[Create-ModuleMapping] WARNING: $Message" -ForegroundColor Yellow - } - 'Error' { - Write-Host "[Create-ModuleMapping] ERROR: $Message" -ForegroundColor Red - } - default { - Write-Host "[Create-ModuleMapping] $Message" -ForegroundColor White - } - } - } # Determine the root directory and the output based on the Source parameter switch ($Source) { 'Entra' { - $RootDirectory = "./entra-powershell/module/Entra/Microsoft.Graph.Entra" + $RootDirectory = "./entra-powershell/module/Entra/Microsoft.Graph.Entra/" $OutputDirectory = '../module/Entra/config/' } 'EntraBeta' { - $RootDirectory = "./entra-powershell/module/EntraBeta/Microsoft.Graph.Entra.Beta" + $RootDirectory = "./entra-powershell/module/EntraBeta/Microsoft.Graph.Entra.Beta/" $OutputDirectory = "../module/EntraBeta/config/" } default { diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 159fa35c43..5b842bcb09 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -4,28 +4,34 @@ #This function copies the docs using the moduleMapping.json into their submodule directories +. ./common-functions.ps1 + +# Modified Copy-MarkdownFilesFromMapping function function Copy-MarkdownFilesFromMapping { param ( [string]$Source = 'Entra' # Default to 'Entra' ) - - switch ($Source) { + # Determine directories and mapping file paths based on the Source parameter + switch ($Source) { 'Entra' { $DocsRootDirectory = "../module/docs/Entra/Microsoft.Graph.Entra" - $MappingFilePath='../module/Entra/config/moduleMapping.json' + $MappingFilePath = '../module/Entra/config/moduleMapping.json' } 'EntraBeta' { $DocsRootDirectory = "../module/docs/EntraBeta/Microsoft.Graph.Entra.Beta" - $OutputDirectory="../module/EntraBeta/config/" + $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" } default { - throw "Invalid Source specified. Use 'Entra' or 'EntraBeta'." + Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' + return } } + # Check if the mapping file exists if (-not (Test-Path -Path $MappingFilePath -PathType Leaf)) { - throw "Mapping file '$MappingFilePath' does not exist." + Log-Message -Message "Mapping file '$MappingFilePath' does not exist." -Level 'ERROR' + return } # Load the JSON content from the mapping file @@ -40,45 +46,50 @@ function Copy-MarkdownFilesFromMapping { $SourceDirectory = "./entra-powershell/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" } default { - throw "Invalid Source specified. Use 'Entra' or 'EntraBeta'." + Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' + return } } # Check if the source directory exists if (-not (Test-Path -Path $SourceDirectory -PathType Container)) { - throw "Source directory '$SourceDirectory' does not exist." + Log-Message -Message "Source directory '$SourceDirectory' does not exist." -Level 'ERROR' + return } - # Check if the output root directory exists, create if it doesn't + # Ensure the root documentation directory exists, create if it doesn't if (-not (Test-Path -Path $DocsRootDirectory -PathType Container)) { New-Item -Path $DocsRootDirectory -ItemType Directory | Out-Null + Log-Message -Message "Created directory: $DocsRootDirectory" -Level 'SUCCESS' } - # Iterate over each key-value pair in the moduleMapping.json - foreach ($entry in $moduleMapping.PSObject.Properties) { - $subDirName = $entry.Name # Key (sub-directory name) - $fileNames = $entry.Value # Value (array of file names without extensions) + # Iterate over each file-directory pair in the moduleMapping.json + foreach ($fileEntry in $moduleMapping.PSObject.Properties) { + $fileName = $fileEntry.Name # Key (file name without extension) + $subDirName = $fileEntry.Value # Value (sub-directory name) - # Create the sub-directory under the output root directory + # Create the sub-directory under the output root directory if it doesn't exist $targetSubDir = Join-Path -Path $DocsRootDirectory -ChildPath $subDirName if (-not (Test-Path -Path $targetSubDir -PathType Container)) { New-Item -Path $targetSubDir -ItemType Directory | Out-Null + Log-Message -Message "Created sub-directory: $targetSubDir" -Level 'SUCCESS' } - # Copy all matching .md files to the target sub-directory - foreach ($fileName in $fileNames) { - $sourceFile = Join-Path -Path $SourceDirectory -ChildPath "$fileName.md" - if (Test-Path -Path $sourceFile -PathType Leaf) { - Copy-Item -Path $sourceFile -Destination $targetSubDir - Write-Host "Copied $sourceFile to $targetSubDir" - } else { - Write-Warning "File $fileName.md not found in $SourceDirectory" - } + # Build the full source file path for the .md file + $sourceFile = Join-Path -Path $SourceDirectory -ChildPath "$fileName.md" + if (Test-Path -Path $sourceFile -PathType Leaf) { + # Copy the .md file to the target sub-directory + Copy-Item -Path $sourceFile -Destination $targetSubDir + Log-Message -Message "Copied '$sourceFile' to '$targetSubDir'" -Level 'SUCCESS' + } else { + # Log a warning if the .md file doesn't exist in the source directory + Log-Message -Message "File '$fileName.md' not found in '$SourceDirectory'" -Level 'WARNING' } } - Write-Host "Markdown file copying complete." + Log-Message -Message "Markdown file copying complete." -Level 'INFO' } + # Usage example: -Copy-MarkdownFilesFromMapping -Source 'Entra' # For Entra +#Copy-MarkdownFilesFromMapping -Source 'Entra' # For Entra diff --git a/build/common-functions.ps1 b/build/common-functions.ps1 index efc22b2786..a03db9e1e9 100644 --- a/build/common-functions.ps1 +++ b/build/common-functions.ps1 @@ -204,6 +204,35 @@ function Get-CustomizationFiles { $customizationFileList } +# Reusable logging function +function Log-Message { + param ( + [string]$Message, + [string]$Level = 'INFO', # Default log level is INFO + [ConsoleColor]$Color = [ConsoleColor]::White # Default color is White + ) + + switch ($Level) { + 'INFO' { + $color = 'Cyan' + } + 'WARNING' { + $color = 'Yellow' + } + 'ERROR' { + $color = 'Red' + } + 'SUCCESS' { + $color = 'Green' + } + default { + $color = $Color + } + } + + Write-Host "[$Level] $Message" -ForegroundColor $color +} + function Create-ModuleHelp { param ( [string] From d20481f3391ab3f9f28ad06da405b8de830471e5 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:45:04 +0300 Subject: [PATCH 030/124] refactored Split-Docs code --- build/Split-Docs.ps1 | 45 +++++++++------------------- src/EntraModuleBuilder.ps1 | 58 +++++++++++++++++-------------------- src/EntraModuleSplitter.ps1 | 29 ++++++++++--------- 3 files changed, 56 insertions(+), 76 deletions(-) diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 5b842bcb09..17d6f24e6e 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -6,20 +6,20 @@ . ./common-functions.ps1 -# Modified Copy-MarkdownFilesFromMapping function function Copy-MarkdownFilesFromMapping { param ( - [string]$Source = 'Entra' # Default to 'Entra' + [string]$Source = 'Entra', # Default to 'Entra' + [string]$OutputDirectory # Allow custom output directory ) - # Determine directories and mapping file paths based on the Source parameter + # Determine source directories and mapping file paths based on the Source parameter switch ($Source) { 'Entra' { - $DocsRootDirectory = "../module/docs/Entra/Microsoft.Graph.Entra" + $DocsSourceDirectory = "./entra-powershell/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" $MappingFilePath = '../module/Entra/config/moduleMapping.json' } 'EntraBeta' { - $DocsRootDirectory = "../module/docs/EntraBeta/Microsoft.Graph.Entra.Beta" + $DocsSourceDirectory = "./entra-powershell/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" } default { @@ -28,6 +28,9 @@ function Copy-MarkdownFilesFromMapping { } } + # Use the provided output directory or default to DocsSourceDirectory if none specified + $TargetRootDirectory = if ($OutputDirectory) { $OutputDirectory } else { $DocsSourceDirectory } + # Check if the mapping file exists if (-not (Test-Path -Path $MappingFilePath -PathType Leaf)) { Log-Message -Message "Mapping file '$MappingFilePath' does not exist." -Level 'ERROR' @@ -37,30 +40,10 @@ function Copy-MarkdownFilesFromMapping { # Load the JSON content from the mapping file $moduleMapping = Get-Content -Path $MappingFilePath | ConvertFrom-Json - # Determine the source directory based on the Source parameter - switch ($Source) { - 'Entra' { - $SourceDirectory = "./entra-powershell/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" - } - 'EntraBeta' { - $SourceDirectory = "./entra-powershell/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" - } - default { - Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' - return - } - } - - # Check if the source directory exists - if (-not (Test-Path -Path $SourceDirectory -PathType Container)) { - Log-Message -Message "Source directory '$SourceDirectory' does not exist." -Level 'ERROR' - return - } - # Ensure the root documentation directory exists, create if it doesn't - if (-not (Test-Path -Path $DocsRootDirectory -PathType Container)) { - New-Item -Path $DocsRootDirectory -ItemType Directory | Out-Null - Log-Message -Message "Created directory: $DocsRootDirectory" -Level 'SUCCESS' + if (-not (Test-Path -Path $TargetRootDirectory -PathType Container)) { + New-Item -Path $TargetRootDirectory -ItemType Directory | Out-Null + Log-Message -Message "Created directory: $TargetRootDirectory" -Level 'SUCCESS' } # Iterate over each file-directory pair in the moduleMapping.json @@ -69,21 +52,21 @@ function Copy-MarkdownFilesFromMapping { $subDirName = $fileEntry.Value # Value (sub-directory name) # Create the sub-directory under the output root directory if it doesn't exist - $targetSubDir = Join-Path -Path $DocsRootDirectory -ChildPath $subDirName + $targetSubDir = Join-Path -Path $TargetRootDirectory -ChildPath $subDirName if (-not (Test-Path -Path $targetSubDir -PathType Container)) { New-Item -Path $targetSubDir -ItemType Directory | Out-Null Log-Message -Message "Created sub-directory: $targetSubDir" -Level 'SUCCESS' } # Build the full source file path for the .md file - $sourceFile = Join-Path -Path $SourceDirectory -ChildPath "$fileName.md" + $sourceFile = Join-Path -Path $DocsSourceDirectory -ChildPath "$fileName.md" if (Test-Path -Path $sourceFile -PathType Leaf) { # Copy the .md file to the target sub-directory Copy-Item -Path $sourceFile -Destination $targetSubDir Log-Message -Message "Copied '$sourceFile' to '$targetSubDir'" -Level 'SUCCESS' } else { # Log a warning if the .md file doesn't exist in the source directory - Log-Message -Message "File '$fileName.md' not found in '$SourceDirectory'" -Level 'WARNING' + Log-Message -Message "File '$fileName.md' not found in '$DocsSourceDirectory'" -Level 'WARNING' } } diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 220f824f2b..186b28a72d 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -1,7 +1,7 @@ # ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - +. ../build/common-functions.ps1 # This class builds the submodules i.e. generate the .psm1 file, help-xml and .psd1 file class EntraModuleBuilder { [string]$headerText @@ -31,10 +31,10 @@ Set-StrictMode -Version 5 [bool] CheckTypedefsFile([string]$typedefsFilePath) { if (-not (Test-Path -Path $typedefsFilePath)) { - Write-Host "[EntraModuleBuilder] Error: Typedefs.txt file not found at $typedefsFilePath" -ForegroundColor Red + Log-Message "[EntraModuleBuilder] Error: Typedefs.txt file not found at $typedefsFilePath" -Level 'ERROR' return $false } else { - Write-Host "[EntraModuleBuilder] Typedefs.txt found at $typedefsFilePath" -ForegroundColor Cyan + Log-Message "[EntraModuleBuilder] Typedefs.txt found at $typedefsFilePath" -Level 'INFO' return $true } } @@ -42,7 +42,7 @@ Set-StrictMode -Version 5 [void] EnsureDestinationDirectory([string]$destDirectory) { if (-not (Test-Path -Path $destDirectory)) { New-Item -ItemType Directory -Path $destDirectory | Out-Null - Write-Host "[EntraModuleBuilder] Created destination directory: $destDirectory" -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Created destination directory: $destDirectory" } } @@ -67,18 +67,18 @@ Set-StrictMode -Version 5 } [void] ProcessSubDirectory([string]$currentDirPath, [string]$currentDirName, [string]$parentDirName, [string]$destDirectory, [string]$typedefsFilePath) { - Write-Host "[EntraModuleBuilder] Processing directory: $currentDirPath" -ForegroundColor Yellow + Log-Message "[EntraModuleBuilder] Processing directory: $currentDirPath" $psm1FileName = "$parentDirName.$currentDirName.psm1" $psm1FilePath = Join-Path -Path $destDirectory -ChildPath $psm1FileName - Write-Host "[EntraModuleBuilder] Creating .psm1 file: $psm1FilePath" -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Creating .psm1 file: $psm1FilePath" $psm1Content = $this.headerText + "`n" # Add a newline after the header $ps1Files = Get-ChildItem -Path $currentDirPath -Filter "*.ps1" if ($ps1Files.Count -eq 0) { - Write-Host "[EntraModuleBuilder] Warning: No .ps1 files found in directory $currentDirPath" -ForegroundColor Yellow + Log-Message "[EntraModuleBuilder] Warning: No .ps1 files found in directory $currentDirPath" -Level 'ERROR' } $enableEntraFiles = @() @@ -93,14 +93,14 @@ Set-StrictMode -Version 5 } foreach ($ps1File in $otherFiles) { - Write-Host "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan + Log-Message "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" $fileContent = Get-Content -Path $ps1File.FullName $cleanedContent = $this.RemoveHeader($fileContent) $psm1Content += $cleanedContent -join "`n" } foreach ($ps1File in $enableEntraFiles) { - Write-Host "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan + Log-Message "[EntraModuleBuilder] Appending content from file: $($ps1File.Name)" -ForegroundColor Cyan $fileContent = Get-Content -Path $ps1File.FullName $cleanedContent = $this.RemoveHeader($fileContent) $psm1Content += $cleanedContent -join "`n" @@ -114,15 +114,15 @@ Set-StrictMode -Version 5 $typedefsContent = Get-Content -Path $typedefsFilePath -Raw $psm1Content += "`n# Typedefs`n" + $typedefsContent - Write-Host "[EntraModuleBuilder] Writing .psm1 file to disk: $psm1FilePath" -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Writing .psm1 file to disk: $psm1FilePath" Set-Content -Path $psm1FilePath -Value $psm1Content - Write-Host "[EntraModuleBuilder] Module file created: $psm1FilePath" -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Module file created: $psm1FilePath" -Level 'SUCCESS' } [void] CreateSubModuleFile([string]$startDirectory, [string]$typedefsFilePath=$this.TypeDefsDirectory) { - Write-Host "[EntraModuleBuilder] Starting CreateSubModuleFile script..." -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." $resolvedStartDirectory = $this.ResolveStartDirectory($startDirectory) @@ -131,10 +131,10 @@ Set-StrictMode -Version 5 } if (-not (Test-Path -Path $resolvedStartDirectory)) { - Write-Host "[EntraModuleBuilder] Error: Start directory not found: $resolvedStartDirectory" -ForegroundColor Red + Log-Message "[EntraModuleBuilder] Error: Start directory not found: $resolvedStartDirectory" -Level 'ERROR' return } else { - Write-Host "[EntraModuleBuilder] Processing directories inside: $resolvedStartDirectory" -ForegroundColor Cyan + Log-Message "[EntraModuleBuilder] Processing directories inside: $resolvedStartDirectory" } $subDirectories = Get-ChildItem -Path $resolvedStartDirectory -Directory @@ -149,7 +149,7 @@ Set-StrictMode -Version 5 $this.ProcessSubDirectory($subDir.FullName, $subDir.Name, $parentDirName, $destDirectory, $typedefsFilePath) } - Write-Host "[EntraModuleBuilder] CreateSubModuleFile script completed." -ForegroundColor Green + Log-Message "[EntraModuleBuilder] CreateSubModuleFile script completed." -Level 'SUCCESS' } [void] CreateRootModule([string] $Module){ @@ -183,10 +183,10 @@ Set-StrictMode -Version 5 $dependencyMapping[$key] = $parsedContent.$key } } else { - Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json is empty." -ForegroundColor Yellow + Log-Message "[EntraModuleBuilder] Warning: dependencyMapping.json is empty." -Level 'ERROR' } } else { - Write-Host "[EntraModuleBuilder] Warning: dependencyMapping.json not found at $dependencyMappingPath." -ForegroundColor Yellow + Log-Message "[EntraModuleBuilder] Warning: dependencyMapping.json not found at $dependencyMappingPath." -Level 'ERROR' } @@ -215,7 +215,7 @@ Set-StrictMode -Version 5 } # Log the start of processing for this module - Write-Host "[EntraModuleBuilder] Processing module: $moduleFileName" -ForegroundColor Blue + Log-Message "[EntraModuleBuilder] Processing module: $moduleFileName" # Define PSData block based on the contents of the ModuleMetadata.json file $PSData = @{ @@ -233,7 +233,7 @@ Set-StrictMode -Version 5 # Check if the specified directory exists if (-Not (Test-Path -Path $subDir)) { - Write-Error "The specified directory does not exist: $subDir" + Log-Message "The specified directory does not exist: $subDir" -Level 'ERROR' exit } @@ -291,12 +291,12 @@ Set-StrictMode -Version 5 # Create and update the module manifest - Write-Host "[EntraModuleBuilder] Creating manifest for $moduleName at $manifestPath" -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Creating manifest for $moduleName at $manifestPath" New-ModuleManifest @moduleSettings Update-ModuleManifest -Path $manifestPath -PrivateData $PSData # Log completion for this module - Write-Host "[EntraModuleBuilder] Manifest for $moduleName created successfully" -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Manifest for $moduleName created successfully" -Level 'SUCCESS' } } @@ -315,13 +315,13 @@ Set-StrictMode -Version 5 } elseif ($Module -eq "EntraBeta") { $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-beta/Microsoft.Graph.Entra.Beta" } else { - Write-Host "Invalid module specified: $Module" -ForegroundColor Red + Log-Message "Invalid module specified: $Module" -Level 'ERROR' return } # Check if the base docs path exists if (!(Test-Path $docsPath)) { - Write-Host "The specified base documentation path does not exist: $docsPath" -ForegroundColor Red + Log-Message "The specified base documentation path does not exist: $docsPath" -Level 'ERROR' return } @@ -333,13 +333,12 @@ Set-StrictMode -Version 5 $markdownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" if ($markdownFiles.Count -eq 0) { - Write-Host "No markdown files found in $($subDirectory.FullName)." -ForegroundColor Yellow + Log-Message "No markdown files found in $($subDirectory.FullName)." -Level 'ERROR' continue } # Generate the help file name based on the module and sub-directory $subDirectoryName = [System.IO.Path]::GetFileName($subDirectory.FullName) - Write-Host "SubDirName: $subDirectoryName" -ForegroundColor Blue $helpFileName = if ($Module -eq "Entra") { "Microsoft.Graph.Entra.$subDirectoryName-Help.xml" @@ -350,24 +349,21 @@ Set-StrictMode -Version 5 $helpOutputFilePath = Join-Path -Path $this.OutputDirectory -ChildPath $helpFileName $moduleDocsPath=$subDirectory - - Write-Host "ModuleDocsPath: $moduleDocsPath" -ForegroundColor Blue - Write-Host "HelpOutputPath: $helpOutputFilePath" -ForegroundColor Blue try{ # Create the help file using PlatyPS New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force - Write-Host "[EntraModuleBuilder] Help file generated: $helpOutputFilePath" -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Help file generated: $helpOutputFilePath" -Level 'SUCCESS' }catch{ - Write-Host "[EntraModuleBuilder] CreateModuleHelp: $_.Exception.Message" -ForegroundColor Red + Log-Message "[EntraModuleBuilder] CreateModuleHelp: $_.Exception.Message" -Level 'ERROR' } } - Write-Host "[EntraModuleBuilder] Help files generated successfully for module: $Module" -ForegroundColor Green + Log-Message "[EntraModuleBuilder] Help files generated successfully for module: $Module" -Level 'SUCCESS' } } \ No newline at end of file diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index bcb52411fa..d202c7eb2c 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ +. ../build/common-functions.ps1 # This class splits the larger Microsoft.Graph.Entra.psm1 or Microsoft.Graph.Entra.Beta.psm1 into separate files and also constructrs the submodule directories class EntraModuleSplitter { [string]$Header @@ -18,7 +19,7 @@ class EntraModuleSplitter { [void] CreateOutputDirectory([string]$directoryPath) { if (-not (Test-Path -Path $directoryPath)) { New-Item -ItemType Directory -Path $directoryPath | Out-Null - Write-Host "[EntraModuleSplitter] Created directory: $directoryPath" -ForegroundColor Green + Log-Message "[EntraModuleSplitter] Created directory: $directoryPath" -Level 'SUCCESS' } } @@ -83,7 +84,7 @@ class EntraModuleSplitter { if ($functionName -eq $specificFunctionName) { $topLevelOutputPath = Join-Path -Path $moduleOutputDirectory -ChildPath "$specificFunctionName.ps1" Set-Content -Path $topLevelOutputPath -Value $ps1Content - Write-Host "[EntraModuleSplitter] Created specific function file: $topLevelOutputPath" -ForegroundColor Cyan + Log-Message "[EntraModuleSplitter] Created specific function file: $topLevelOutputPath" -Level 'INFO' return } @@ -107,7 +108,7 @@ class EntraModuleSplitter { # Write the main function to the appropriate directory $outputFilePath = Join-Path -Path $keyDirectoryPath -ChildPath "$functionName.ps1" Set-Content -Path $outputFilePath -Value $ps1Content - Write-Host "[EntraModuleSplitter] Created function file: $outputFilePath in $keyDirectoryPath" -ForegroundColor Green + Log-Message "[EntraModuleSplitter] Created function file: $outputFilePath in $keyDirectoryPath" -Level 'SUCCESS' $isMapped = $true break @@ -117,7 +118,7 @@ class EntraModuleSplitter { if (-not $isMapped) { $unmappedFilePath = Join-Path -Path $unmappedDirectory -ChildPath "$functionName.ps1" Set-Content -Path $unmappedFilePath -Value $ps1Content - Write-Host "[EntraModuleSplitter] Created unmapped function file: $unmappedFilePath in UnMappedFiles" -ForegroundColor Red + Log-Message "[EntraModuleSplitter] Created unmapped function file: $unmappedFilePath in UnMappedFiles" -Level 'ERROR' } } @@ -135,7 +136,7 @@ class EntraModuleSplitter { # Write the function to the specified file Set-Content -Path $functionFilePath -Value $headerPs1Content - Write-Host "[EntraModuleSplitter] Added $functionName function to: $functionFilePath" -ForegroundColor Green + Log-Message "[EntraModuleSplitter] Added $functionName function to: $functionFilePath" } } } @@ -172,7 +173,7 @@ class EntraModuleSplitter { # Call the new method to add functions to all directories $this.AddFunctionsToAllDirectories($moduleOutputDirectory, $functionContents) - Write-Host "[EntraModuleSplitter] Splitting and organizing complete." -ForegroundColor Green + Log-Message "[EntraModuleSplitter] Splitting and organizing complete." -Level 'SUCCESS' } @@ -230,7 +231,7 @@ class EntraModuleSplitter { # Display summary information $this.DisplaySummary($totalAliases, $mappedAliasesCount, $unMappedAliases.Count) - Write-Host "[EntraModuleSplitter] Processing complete." -ForegroundColor Green + Log-Message "[EntraModuleSplitter] Processing complete." -Level 'SUCCESS' } [string[]] GetModuleDirectories([string]$Module) { @@ -299,7 +300,7 @@ class EntraModuleSplitter { $fileContent = $header + $functionWrapperStart + ($filteredLines -join "`n") + $functionWrapperEnd Set-Content -Path $outputFilePath -Value $fileContent - Write-Host "[EntraModuleSplitter] Filtered lines have been written and wrapped inside Enable-EntraAzureADAliases function to $outputFilePath" -ForegroundColor Green + Log-Message "[EntraModuleSplitter] Filtered lines have been written and wrapped inside Enable-EntraAzureADAliases function to $outputFilePath" -Level 'SUCCESS' } [string[]] WriteUnmappedAliases([string[]]$aliasFileContent, [string[]]$allMappedAliases, [string]$targetDirectory) { @@ -316,9 +317,9 @@ class EntraModuleSplitter { if ($unMappedAliases.Count -gt 0) { $unmappedFilePath = Join-Path -Path $targetDirectory -ChildPath "UnMappedAliases.psd1" Set-Content -Path $unmappedFilePath -Value $unMappedAliases - Write-Host "[EntraModuleSplitter] Unmapped aliases have been written to $unmappedFilePath" -ForegroundColor Yellow + Log-Message "[EntraModuleSplitter] Unmapped aliases have been written to $unmappedFilePath" -Level 'INFO' } else { - Write-Host "[EntraModuleSplitter] No unmapped aliases found." -ForegroundColor Blue + Log-Message "[EntraModuleSplitter] No unmapped aliases found." -Level 'INFO' } return $unMappedAliases # Ensure this line returns the unmapped aliases @@ -327,13 +328,13 @@ class EntraModuleSplitter { [void] CreateDirectory([string]$path) { if (-not (Test-Path -Path $path)) { New-Item -Path $path -ItemType Directory | Out-Null - Write-Host "[EntraModuleSplitter] Created directory: $path" -ForegroundColor Yellow + Log-Message "[EntraModuleSplitter] Created directory: $path" } } [void] DisplaySummary([int]$totalAliases, [int]$mappedAliasesCount, [int]$unMappedAliasesCount) { - Write-Host "[EntraModuleSplitter] Total Alias Lines (excluding comments and blanks): $totalAliases" -ForegroundColor Blue - Write-Host "[EntraModuleSplitter] Mapped Aliases: $mappedAliasesCount" -ForegroundColor Blue - Write-Host "[EntraModuleSplitter] UnMapped Aliases: $unMappedAliasesCount" -ForegroundColor Red + Log-Message "[EntraModuleSplitter] Total Alias Lines (excluding comments and blanks): $totalAliases" + Log-Message "[EntraModuleSplitter] Mapped Aliases: $mappedAliasesCount" + Log-Message "[EntraModuleSplitter] UnMapped Aliases: $unMappedAliasesCount" -Level 'ERROR' } } \ No newline at end of file From 251813dc772ce039b68c7e98cde1513ecb99b08c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:21:36 +0300 Subject: [PATCH 031/124] Refactor --- build/Create-EntraModules.ps1 | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 build/Create-EntraModules.ps1 diff --git a/build/Create-EntraModules.ps1 b/build/Create-EntraModules.ps1 deleted file mode 100644 index 04a3a28bdb..0000000000 --- a/build/Create-EntraModules.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -param ( - [string]$Module = "Entra" # Default to "Entra" if no argument is provided -) - -# Import the necessary scripts -. ..\src\EntraModuleSplitter.ps1 - - -# Split the module and take into account the AzureADAliases as well -$entraModuleSplitter = [EntraModuleSplitter]::new() -$entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument -$entraModuleSplitter.ProcessEntraAzureADAliases($Module) - -. ..\src\EntraModuleBuilder.ps1 -# Build Entra Module -$moduleBuilder = [EntraModuleBuilder]::new() - -# Determine the output path based on the module -$outputPath = if ($Module -eq "Entra") { - "..\module\Entra\Microsoft.Graph.Entra\" -} else { - "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" -} - -$moduleBuilder.CreateHelpFile($Module) -$moduleBuilder.CreateSubModuleFile($outputPath, ".\Typedefs.txt") -$moduleBuilder.CreateModuleManifest($Module) From a9ad3f1b8c1fa3dade38ae703298146d6c5c21ca Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:23:14 +0300 Subject: [PATCH 032/124] rename file --- build/Create-EntraModules.ps1 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 build/Create-EntraModules.ps1 diff --git a/build/Create-EntraModules.ps1 b/build/Create-EntraModules.ps1 new file mode 100644 index 0000000000..5986e7df82 --- /dev/null +++ b/build/Create-EntraModules.ps1 @@ -0,0 +1,32 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +param ( + [string]$Module = "Entra" # Default to "Entra" if no argument is provided +) + +# Import the necessary scripts +. ..\src\EntraModuleSplitter.ps1 + + + +# Split the module and take into account the AzureADAliases as well +$entraModuleSplitter = [EntraModuleSplitter]::new() +$entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument +$entraModuleSplitter.ProcessEntraAzureADAliases($Module) + +. ..\src\EntraModuleBuilder.ps1 +# Build Entra Module +$moduleBuilder = [EntraModuleBuilder]::new() + +# Determine the output path based on the module +$outputPath = if ($Module -eq "Entra") { + "..\module\Entra\Microsoft.Graph.Entra\" +} else { + "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" +} + +$moduleBuilder.CreateHelpFile($Module) +$moduleBuilder.CreateSubModuleFile($outputPath, ".\Typedefs.txt") +$moduleBuilder.CreateModuleManifest($Module) From c0f3179f7a247fc3f66c325c2893572e4b5ca14b Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:56:13 +0300 Subject: [PATCH 033/124] minor changes --- build/Create-EntraModule.ps1 | 22 +- build/Split-EntraModule.ps1 | 17 + build/TypeDefs.txt | 771 +++++++++++++++++++++++++++++++++++ src/EntraModuleBuilder.ps1 | 30 +- src/EntraModuleSplitter.ps1 | 6 +- 5 files changed, 815 insertions(+), 31 deletions(-) create mode 100644 build/Split-EntraModule.ps1 create mode 100644 build/TypeDefs.txt diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 5986e7df82..a1f4fcf7ea 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -1,32 +1,16 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -param ( - [string]$Module = "Entra" # Default to "Entra" if no argument is provided -) - -# Import the necessary scripts -. ..\src\EntraModuleSplitter.ps1 - - - -# Split the module and take into account the AzureADAliases as well -$entraModuleSplitter = [EntraModuleSplitter]::new() -$entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument -$entraModuleSplitter.ProcessEntraAzureADAliases($Module) . ..\src\EntraModuleBuilder.ps1 # Build Entra Module $moduleBuilder = [EntraModuleBuilder]::new() # Determine the output path based on the module -$outputPath = if ($Module -eq "Entra") { +$startPath = if ($Module -eq "Entra") { "..\module\Entra\Microsoft.Graph.Entra\" } else { "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" } -$moduleBuilder.CreateHelpFile($Module) -$moduleBuilder.CreateSubModuleFile($outputPath, ".\Typedefs.txt") +$moduleBuilder.CreateModuleHelp($Module) +$moduleBuilder.CreateSubModuleFile($startPath, ".\Typedefs.txt") $moduleBuilder.CreateModuleManifest($Module) diff --git a/build/Split-EntraModule.ps1 b/build/Split-EntraModule.ps1 new file mode 100644 index 0000000000..8afd805c98 --- /dev/null +++ b/build/Split-EntraModule.ps1 @@ -0,0 +1,17 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +param ( + [string]$Module = "Entra" # Default to "Entra" if no argument is provided +) + +# Import the necessary scripts +. ..\src\EntraModuleSplitter.ps1 + + + +# Split the module and take into account the AzureADAliases as well +$entraModuleSplitter = [EntraModuleSplitter]::new() +$entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument +$entraModuleSplitter.ProcessEntraAzureADAliases($Module) \ No newline at end of file diff --git a/build/TypeDefs.txt b/build/TypeDefs.txt new file mode 100644 index 0000000000..1465a1ad21 --- /dev/null +++ b/build/TypeDefs.txt @@ -0,0 +1,771 @@ +# ------------------------------------------------------------------------------ +# Type definitios required for commands inputs +# ------------------------------------------------------------------------------ + +$def = @" + +namespace Microsoft.Open.AzureAD.Graph.PowerShell.Custom +{ + + using System.Linq; + public enum KeyType{ + Symmetric = 0, + AsymmetricX509Cert = 1, + } + public enum KeyUsage{ + Sign = 0, + Verify = 1, + Decrypt = 2, + Encrypt = 3, + } +} + +namespace Microsoft.Open.AzureAD.Model +{ + + using System.Linq; + public class AlternativeSecurityId + { + public System.String IdentityProvider; + public System.Byte[] Key; + public System.Nullable Type; + + } + public class AppRole + { + public System.Collections.Generic.List AllowedMemberTypes; + public System.String Description; + public System.String DisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Origin; + public System.String Value; + } + public class AssignedLicense + { + public System.Collections.Generic.List DisabledPlans; + public System.String SkuId; + + } + public class AssignedLicenses + { + public System.Collections.Generic.List AddLicenses; + public System.Collections.Generic.List RemoveLicenses; + + } + public class CertificateAuthorityInformation + { + public enum AuthorityTypeEnum{ + RootAuthority = 0, + IntermediateAuthority = 1, + } + public System.Nullable AuthorityType; + public System.String CrlDistributionPoint; + public System.String DeltaCrlDistributionPoint; + public System.Byte[] TrustedCertificate; + public System.String TrustedIssuer; + public System.String TrustedIssuerSki; + + } + public class CrossCloudVerificationCodeBody + { + public System.String CrossCloudVerificationCode; + public CrossCloudVerificationCodeBody() + { + } + + public CrossCloudVerificationCodeBody(System.String value) + { + CrossCloudVerificationCode = value; + } + } + public class GroupIdsForMembershipCheck + { + public System.Collections.Generic.List GroupIds; + public GroupIdsForMembershipCheck() + { + } + + public GroupIdsForMembershipCheck(System.Collections.Generic.List value) + { + GroupIds = value; + } + } + public class KeyCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDate; + public System.String KeyId; + public System.Nullable StartDate; + public System.String Type; + public System.String Usage; + public System.Byte[] Value; + + } + public class PasswordCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDate; + public System.String KeyId; + public System.Nullable StartDate; + public System.String Value; + + } + public class PasswordProfile + { + public System.String Password; + public System.Nullable ForceChangePasswordNextLogin; + public System.Nullable EnforceChangePasswordPolicy; + + } + public class PrivacyProfile + { + public System.String ContactEmail; + public System.String StatementUrl; + + } + public class SignInName + { + public System.String Type; + public System.String Value; + + } +} + +namespace Microsoft.Open.MSGraph.Model +{ + + using System.Linq; + public class AddIn + { + public System.String Id; + public System.String Type; + public System.Collections.Generic.List Properties; + + } + public class ApiApplication + { + public System.Nullable AcceptMappedClaims; + public System.Collections.Generic.List KnownClientApplications; + public System.Collections.Generic.List PreAuthorizedApplications; + public System.Nullable RequestedAccessTokenVersion; + public System.Collections.Generic.List Oauth2PermissionScopes; + + } + public class AppRole + { + public System.Collections.Generic.List AllowedMemberTypes; + public System.String Description; + public System.String DisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Origin; + public System.String Value; + + } + public class ConditionalAccessApplicationCondition + { + public System.Collections.Generic.List IncludeApplications; + public System.Collections.Generic.List ExcludeApplications; + public System.Collections.Generic.List IncludeUserActions; + public System.Collections.Generic.List IncludeProtectionLevels; + + } + public class ConditionalAccessApplicationEnforcedRestrictions + { + public System.Nullable IsEnabled; + public ConditionalAccessApplicationEnforcedRestrictions() + { + } + + public ConditionalAccessApplicationEnforcedRestrictions(System.Nullable value) + { + IsEnabled = value; + } + } + public class ConditionalAccessCloudAppSecurity + { + public enum CloudAppSecurityTypeEnum{ + McasConfigured = 0, + MonitorOnly = 1, + BlockDownloads = 2, + } + public System.Nullable CloudAppSecurityType; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessConditionSet + { + public Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition Applications; + public Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition Users; + public Microsoft.Open.MSGraph.Model.ConditionalAccessPlatformCondition Platforms; + public Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition Locations; + public enum ConditionalAccessRiskLevel{ + Low = 0, + Medium = 1, + High = 2, + Hidden = 3, + None = 4, + UnknownFutureValue = 5, + } + public System.Collections.Generic.List SignInRiskLevels; + public enum ConditionalAccessClientApp{ + All = 0, + Browser = 1, + MobileAppsAndDesktopClients = 2, + ExchangeActiveSync = 3, + EasSupported = 4, + Other = 5, + } + public System.Collections.Generic.List ClientAppTypes; + + } + public class ConditionalAccessGrantControls + { + public System.String _Operator; + public enum ConditionalAccessGrantControl{ + Block = 0, + Mfa = 1, + CompliantDevice = 2, + DomainJoinedDevice = 3, + ApprovedApplication = 4, + CompliantApplication = 5, + PasswordChange = 6, + } + public System.Collections.Generic.List BuiltInControls; + public System.Collections.Generic.List CustomAuthenticationFactors; + public System.Collections.Generic.List TermsOfUse; + + } + public class ConditionalAccessLocationCondition + { + public System.Collections.Generic.List IncludeLocations; + public System.Collections.Generic.List ExcludeLocations; + + } + public class ConditionalAccessPersistentBrowser + { + public enum ModeEnum{ + Always = 0, + Never = 1, + } + public System.Nullable Mode; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessPlatformCondition + { + public enum ConditionalAccessDevicePlatforms{ + Android = 0, + IOS = 1, + Windows = 2, + WindowsPhone = 3, + MacOS = 4, + All = 5, + } + public System.Collections.Generic.List IncludePlatforms; + public System.Collections.Generic.List ExcludePlatforms; + + } + public class ConditionalAccessSessionControls + { + public Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions ApplicationEnforcedRestrictions; + public Microsoft.Open.MSGraph.Model.ConditionalAccessCloudAppSecurity CloudAppSecurity; + public Microsoft.Open.MSGraph.Model.ConditionalAccessSignInFrequency SignInFrequency; + public Microsoft.Open.MSGraph.Model.ConditionalAccessPersistentBrowser PersistentBrowser; + + } + public class ConditionalAccessSignInFrequency + { + public enum TypeEnum{ + Days = 0, + Hours = 1, + } + public System.Nullable Type; + public System.Nullable Value; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessUserCondition + { + public System.Collections.Generic.List IncludeUsers; + public System.Collections.Generic.List ExcludeUsers; + public System.Collections.Generic.List IncludeGroups; + public System.Collections.Generic.List ExcludeGroups; + public System.Collections.Generic.List IncludeRoles; + public System.Collections.Generic.List ExcludeRoles; + + } + public enum CountriesAndRegion{ + AD = 0, + AE = 1, + AF = 2, + AG = 3, + AI = 4, + AL = 5, + AM = 6, + AN = 7, + AO = 8, + AQ = 9, + AR = 10, + AS = 11, + AT = 12, + AU = 13, + AW = 14, + AX = 15, + AZ = 16, + BA = 17, + BB = 18, + BD = 19, + BE = 20, + BF = 21, + BG = 22, + BH = 23, + BI = 24, + BJ = 25, + BL = 26, + BM = 27, + BN = 28, + BO = 29, + BQ = 30, + BR = 31, + BS = 32, + BT = 33, + BV = 34, + BW = 35, + BY = 36, + BZ = 37, + CA = 38, + CC = 39, + CD = 40, + CF = 41, + CG = 42, + CH = 43, + CI = 44, + CK = 45, + CL = 46, + CM = 47, + CN = 48, + CO = 49, + CR = 50, + CU = 51, + CV = 52, + CW = 53, + CX = 54, + CY = 55, + CZ = 56, + DE = 57, + DJ = 58, + DK = 59, + DM = 60, + DO = 61, + DZ = 62, + EC = 63, + EE = 64, + EG = 65, + EH = 66, + ER = 67, + ES = 68, + ET = 69, + FI = 70, + FJ = 71, + FK = 72, + FM = 73, + FO = 74, + FR = 75, + GA = 76, + GB = 77, + GD = 78, + GE = 79, + GF = 80, + GG = 81, + GH = 82, + GI = 83, + GL = 84, + GM = 85, + GN = 86, + GP = 87, + GQ = 88, + GR = 89, + GS = 90, + GT = 91, + GU = 92, + GW = 93, + GY = 94, + HK = 95, + HM = 96, + HN = 97, + HR = 98, + HT = 99, + HU = 100, + ID = 101, + IE = 102, + IL = 103, + IM = 104, + IN = 105, + IO = 106, + IQ = 107, + IR = 108, + IS = 109, + IT = 110, + JE = 111, + JM = 112, + JO = 113, + JP = 114, + KE = 115, + KG = 116, + KH = 117, + KI = 118, + KM = 119, + KN = 120, + KP = 121, + KR = 122, + KW = 123, + KY = 124, + KZ = 125, + LA = 126, + LB = 127, + LC = 128, + LI = 129, + LK = 130, + LR = 131, + LS = 132, + LT = 133, + LU = 134, + LV = 135, + LY = 136, + MA = 137, + MC = 138, + MD = 139, + ME = 140, + MF = 141, + MG = 142, + MH = 143, + MK = 144, + ML = 145, + MM = 146, + MN = 147, + MO = 148, + MP = 149, + MQ = 150, + MR = 151, + MS = 152, + MT = 153, + MU = 154, + MV = 155, + MW = 156, + MX = 157, + MY = 158, + MZ = 159, + NA = 160, + NC = 161, + NE = 162, + NF = 163, + NG = 164, + NI = 165, + NL = 166, + NO = 167, + NP = 168, + NR = 169, + NU = 170, + NZ = 171, + OM = 172, + PA = 173, + PE = 174, + PF = 175, + PG = 176, + PH = 177, + PK = 178, + PL = 179, + PM = 180, + PN = 181, + PR = 182, + PS = 183, + PT = 184, + PW = 185, + PY = 186, + QA = 187, + RE = 188, + RO = 189, + RS = 190, + RU = 191, + RW = 192, + SA = 193, + SB = 194, + SC = 195, + SD = 196, + SE = 197, + SG = 198, + SH = 199, + SI = 200, + SJ = 201, + SK = 202, + SL = 203, + SM = 204, + SN = 205, + SO = 206, + SR = 207, + SS = 208, + ST = 209, + SV = 210, + SX = 211, + SY = 212, + SZ = 213, + TC = 214, + TD = 215, + TF = 216, + TG = 217, + TH = 218, + TJ = 219, + TK = 220, + TL = 221, + TM = 222, + TN = 223, + TO = 224, + TR = 225, + TT = 226, + TV = 227, + TW = 228, + TZ = 229, + UA = 230, + UG = 231, + UM = 232, + US = 233, + UY = 234, + UZ = 235, + VA = 236, + VC = 237, + VE = 238, + VG = 239, + VI = 240, + VN = 241, + VU = 242, + WF = 243, + WS = 244, + YE = 245, + YT = 246, + ZA = 247, + ZM = 248, + ZW = 249, + } + public class DefaultUserRolePermissions + { + public System.Nullable AllowedToCreateApps; + public System.Nullable AllowedToCreateSecurityGroups; + public System.Nullable AllowedToReadOtherUsers; + public System.Collections.Generic.List PermissionGrantPoliciesAssigned; + + } + public class DelegatedPermissionClassification + { + public enum ClassificationEnum{ + Low = 0, + Medium = 1, + High = 2, + } + public System.Nullable Classification; + public System.String Id; + public System.String PermissionId; + public System.String PermissionName; + + } + public class EmailAddress + { + public System.String Name; + public System.String Address; + + } + public class ImplicitGrantSettings + { + public System.Nullable EnableIdTokenIssuance; + public System.Nullable EnableAccessTokenIssuance; + + } + public class InformationalUrl + { + public System.String TermsOfServiceUrl; + public System.String MarketingUrl; + public System.String PrivacyStatementUrl; + public System.String SupportUrl; + public System.String LogoUrl; + + } + public class InvitedUserMessageInfo + { + public System.Collections.Generic.List CcRecipients; + public System.String CustomizedMessageBody; + public System.String MessageLanguage; + + } + public class IpRange + { + public System.String CidrAddress; + public IpRange() + { + } + + public IpRange(System.String value) + { + CidrAddress = value; + } + } + public class KeyCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.String DisplayName; + public System.Nullable EndDateTime; + public System.String KeyId; + public System.Nullable StartDateTime; + public System.String Type; + public System.String Usage; + public System.Byte[] Key; + + } + public class KeyValue + { + public System.String Key; + public System.String Value; + + } + public class MsDirectoryObject + { + public System.String Id; + public System.String OdataType; + } + public class MsRoleMemberInfo + { + public System.String Id; + } + public class OptionalClaim + { + public System.String Name; + public System.String Source; + public System.Nullable Essential; + public System.Collections.Generic.List AdditionalProperties; + + } + public class OptionalClaims + { + public System.Collections.Generic.List IdToken; + public System.Collections.Generic.List AccessToken; + public System.Collections.Generic.List Saml2Token; + + } + public class ParentalControlSettings + { + public enum LegalAgeGroupRuleEnum{ + Allow = 0, + RequireConsentForPrivacyServices = 1, + RequireConsentForMinors = 2, + RequireConsentForKids = 3, + BlockMinors = 4, + } + public System.Nullable LegalAgeGroupRule; + public System.Collections.Generic.List CountriesBlockedForMinors; + + } + public class PasswordCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDateTime; + public System.String DisplayName; + public System.String KeyId; + public System.Nullable StartDateTime; + public System.String SecretText; + public System.String Hint; + + } + public class PermissionScope + { + public System.String AdminConsentDescription; + public System.String AdminConsentDisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Type; + public System.String UserConsentDescription; + public System.String UserConsentDisplayName; + public System.String Value; + + } + public class PreAuthorizedApplication + { + public System.String AppId; + public System.Collections.Generic.List DelegatedPermissionIds; + + } + public class PublicClientApplication + { + public System.Collections.Generic.List RedirectUris; + public PublicClientApplication() + { + } + + public PublicClientApplication(System.Collections.Generic.List value) + { + RedirectUris = value; + } + } + public class Recipient + { + public Microsoft.Open.MSGraph.Model.EmailAddress EmailAddress; + public Recipient() + { + } + + public Recipient(Microsoft.Open.MSGraph.Model.EmailAddress value) + { + EmailAddress = value; + } + } + public class RequiredResourceAccess + { + public System.String ResourceAppId; + public System.Collections.Generic.List ResourceAccess; + + } + public class ResourceAccess + { + public System.String Id; + public System.String Type; + + } + public class RolePermission + { + public System.Collections.Generic.List AllowedResourceActions; + public System.String Condition; + + } + public class SetVerifiedPublisherRequest + { + public System.String VerifiedPublisherId; + public SetVerifiedPublisherRequest() + { + } + + public SetVerifiedPublisherRequest(System.String value) + { + VerifiedPublisherId = value; + } + } + public class User + { + public System.String Id; + public System.String OdataType; + + } + public class WebApplication + { + public System.String HomePageUrl; + public System.String LogoutUrl; + public System.Collections.Generic.List RedirectUris; + public Microsoft.Open.MSGraph.Model.ImplicitGrantSettings ImplicitGrantSettings; + + } +} +"@ + try{ Add-Type -TypeDefinition $def } + catch{} + +# ------------------------------------------------------------------------------ +# End of Type definitios required for commands inputs +# ------------------------------------------------------------------------------ diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 186b28a72d..956c090635 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -5,10 +5,10 @@ # This class builds the submodules i.e. generate the .psm1 file, help-xml and .psd1 file class EntraModuleBuilder { [string]$headerText - [string]$BasePath [string]$OutputDirectory [string]$TypeDefsDirectory [string]$BaseDocsPath + EntraModuleBuilder() { $this.headerText = @" @@ -19,10 +19,11 @@ class EntraModuleBuilder { Set-StrictMode -Version 5 "@ - $this.BasePath = (join-path $PSScriptRoot '../module/Entra/') - $this.OutputDirectory = (join-path $PSScriptRoot '../bin/') - $this.TypeDefsDirectory="./Typedefs.txt" + + $this.OutputDirectory = '../bin/' + $this.TypeDefsDirectory="../build/Typedefs.txt" $this.BaseDocsPath='../docs/' + } [string] ResolveStartDirectory([string]$directory) { @@ -127,6 +128,7 @@ Set-StrictMode -Version 5 $resolvedStartDirectory = $this.ResolveStartDirectory($startDirectory) if (-not ($this.CheckTypedefsFile($typedefsFilePath))) { + Log-Message "Typedefs.txt not found" -Level 'ERROR' return } @@ -157,13 +159,23 @@ Set-StrictMode -Version 5 } [void] CreateModuleManifest($module) { - + # Update paths specific to this sub-directory + $rootPath=if ($Module -eq "Entra") { + "../module/Entra" + } else { + "../module/EntraBeta" + } + $moduleBasePath =f ($Module -eq "Entra") { + "../module/Entra/Microsoft.Graph.Entra" + } else { + "../module/EntraBeta/Microsoft.Graph.Entra.Beta" + } - $subDirectories = Get-ChildItem -Path $this.BasePath -Directory + $subDirectories = Get-ChildItem -Path $moduleBasePath -Directory - # Update paths specific to this sub-directory - $settingPath = Join-Path $this.BasePath "./config/ModuleMetadata.json" - $dependencyMappingPath = Join-Path $this.BasePath "./config/dependencyMapping.json" + + $settingPath = Join-Path $rootPath -ChildPath "/config/ModuleMetadata.json" + $dependencyMappingPath = Join-Path $rootPath -ChildPath "/config/dependencyMapping.json" # Load the module metadata $content = Get-Content -Path $settingPath | ConvertFrom-Json diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index d202c7eb2c..29684de4ae 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -145,7 +145,7 @@ class EntraModuleSplitter { # Determine file paths and output directories $psm1FilePath = $this.GetModuleFilePath($Source) $outputDirectory = $this.GetOutputDirectory($Source) - $jsonFilePath = ".\key-value-pairs.json" + $jsonFilePath = "../module/Entra/config/moduleMapping.json" $this.CreateOutputDirectory($outputDirectory) $unmappedDirectory = Join-Path -Path $outputDirectory -ChildPath "UnMappedFiles" @@ -236,9 +236,9 @@ class EntraModuleSplitter { [string[]] GetModuleDirectories([string]$Module) { $startDirectory = if ($Module -eq 'EntraBeta') { - "..\module\Entra\Microsoft.Graph.Entra.Beta\" + "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" } else { - "..\module\EntraBeta\Microsoft.Graph.Entra\" + "..\module\Entra\Microsoft.Graph.Entra\" } $aliasFileName = if ($Module -eq 'EntraBeta') { From b026e8665ff2a8bcfd57fa803a9b2f245e4a9215 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:28:55 +0300 Subject: [PATCH 034/124] minor changes --- build/Create-EntraModules.ps1 | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 build/Create-EntraModules.ps1 diff --git a/build/Create-EntraModules.ps1 b/build/Create-EntraModules.ps1 deleted file mode 100644 index 5986e7df82..0000000000 --- a/build/Create-EntraModules.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -param ( - [string]$Module = "Entra" # Default to "Entra" if no argument is provided -) - -# Import the necessary scripts -. ..\src\EntraModuleSplitter.ps1 - - - -# Split the module and take into account the AzureADAliases as well -$entraModuleSplitter = [EntraModuleSplitter]::new() -$entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument -$entraModuleSplitter.ProcessEntraAzureADAliases($Module) - -. ..\src\EntraModuleBuilder.ps1 -# Build Entra Module -$moduleBuilder = [EntraModuleBuilder]::new() - -# Determine the output path based on the module -$outputPath = if ($Module -eq "Entra") { - "..\module\Entra\Microsoft.Graph.Entra\" -} else { - "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" -} - -$moduleBuilder.CreateHelpFile($Module) -$moduleBuilder.CreateSubModuleFile($outputPath, ".\Typedefs.txt") -$moduleBuilder.CreateModuleManifest($Module) From 77926e046b5935883d890d3cac664c8274075056 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 12:56:31 +0300 Subject: [PATCH 035/124] Small changes to mapping generation and doc splitting --- build/Create-ModuleMapping.ps1 | 13 ++++++------- build/Split-Docs.ps1 | 12 ++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/build/Create-ModuleMapping.ps1 b/build/Create-ModuleMapping.ps1 index 806f42b8b8..4abfe06b92 100644 --- a/build/Create-ModuleMapping.ps1 +++ b/build/Create-ModuleMapping.ps1 @@ -2,7 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -#This function uses the moduleMapping.json to split the docs to subdirectories +#This function uses the moduleMapping.json to split the docs to subdirectories i.e. Key =SubModule name and +# Value =an array of strings representing the files in that directory . ./common-functions.ps1 function Get-DirectoryFileMap { param ( @@ -13,11 +14,11 @@ function Get-DirectoryFileMap { # Determine the root directory and the output based on the Source parameter switch ($Source) { 'Entra' { - $RootDirectory = "./entra-powershell/module/Entra/Microsoft.Graph.Entra/" + $RootDirectory = "../module/Entra/Microsoft.Graph.Entra/" $OutputDirectory = '../module/Entra/config/' } 'EntraBeta' { - $RootDirectory = "./entra-powershell/module/EntraBeta/Microsoft.Graph.Entra.Beta/" + $RootDirectory = "../module/EntraBeta/Microsoft.Graph.Entra.Beta/" $OutputDirectory = "../module/EntraBeta/config/" } default { @@ -63,7 +64,7 @@ function Get-DirectoryFileMap { $jsonOutput = $fileDirectoryMap | ConvertTo-Json -Depth 3 # Define the output file path as moduleMapping.json - $outputFilePath = Join-Path -Path $OutputDirectory -ChildPath "moduleMapping.json" + $outputFilePath = Join-Path -Path $OutputDirectory -ChildPath "newModuleMapping.json" # Write the JSON output to moduleMapping.json $jsonOutput | Out-File -FilePath $outputFilePath -Encoding UTF8 @@ -71,6 +72,4 @@ function Get-DirectoryFileMap { Log-Message "moduleMapping.json has been created at '$outputFilePath'." 'Info' } - - - +Get-DirectoryFileMap -Source 'Entra' \ No newline at end of file diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 17d6f24e6e..a76ba9c173 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -3,6 +3,7 @@ # ------------------------------------------------------------------------------ #This function copies the docs using the moduleMapping.json into their submodule directories +# i.e. For each entry, it will use the Key(cmdlet name) and map it to the Value(A subdirectory created in the respective docs directory) . ./common-functions.ps1 @@ -15,12 +16,12 @@ function Copy-MarkdownFilesFromMapping { # Determine source directories and mapping file paths based on the Source parameter switch ($Source) { 'Entra' { - $DocsSourceDirectory = "./entra-powershell/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" - $MappingFilePath = '../module/Entra/config/moduleMapping.json' + $DocsSourceDirectory = "../module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" + $MappingFilePath = '../module/Entra/config/newModuleMapping.json' } 'EntraBeta' { - $DocsSourceDirectory = "./entra-powershell/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" - $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" + $DocsSourceDirectory = "../module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" + $MappingFilePath = "../module/EntraBeta/config/newModuleMapping.json" } default { Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' @@ -74,5 +75,4 @@ function Copy-MarkdownFilesFromMapping { } -# Usage example: -#Copy-MarkdownFilesFromMapping -Source 'Entra' # For Entra +Copy-MarkdownFilesFromMapping -Source 'Entra' # For Entra From c0ecd8e7319d8f772705364ece9b944a487e0e6d Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:02:34 +0300 Subject: [PATCH 036/124] Small changes to mapping generation and doc splitting --- build/Create-EntraModule.ps1 | 6 ++++++ src/EntraModuleBuilder.ps1 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index a1f4fcf7ea..b812bea558 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -2,6 +2,12 @@ . ..\src\EntraModuleBuilder.ps1 # Build Entra Module + + +param ( + [string]$Module = "Entra" # Default to "Entra" if no argument is provided +) + $moduleBuilder = [EntraModuleBuilder]::new() # Determine the output path based on the module diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 956c090635..0e5d36819f 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -165,7 +165,7 @@ Set-StrictMode -Version 5 } else { "../module/EntraBeta" } - $moduleBasePath =f ($Module -eq "Entra") { + $moduleBasePath =if ($Module -eq "Entra") { "../module/Entra/Microsoft.Graph.Entra" } else { "../module/EntraBeta/Microsoft.Graph.Entra.Beta" From 7aba8d49aa7a347fdfa0cee4c8cf20ebedaaa5cc Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:08:23 +0300 Subject: [PATCH 037/124] fixes --- build/Create-EntraModule.ps1 | 8 ++------ src/EntraModuleBuilder.ps1 | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index b812bea558..067a2860ba 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -1,14 +1,9 @@ - -. ..\src\EntraModuleBuilder.ps1 -# Build Entra Module - - param ( [string]$Module = "Entra" # Default to "Entra" if no argument is provided ) -$moduleBuilder = [EntraModuleBuilder]::new() +. ..\src\EntraModuleBuilder.ps1 # Determine the output path based on the module $startPath = if ($Module -eq "Entra") { @@ -16,6 +11,7 @@ $startPath = if ($Module -eq "Entra") { } else { "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" } +$moduleBuilder = [EntraModuleBuilder]::new() $moduleBuilder.CreateModuleHelp($Module) $moduleBuilder.CreateSubModuleFile($startPath, ".\Typedefs.txt") diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 0e5d36819f..46f15a1d05 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -22,7 +22,7 @@ Set-StrictMode -Version 5 $this.OutputDirectory = '../bin/' $this.TypeDefsDirectory="../build/Typedefs.txt" - $this.BaseDocsPath='../docs/' + $this.BaseDocsPath='../module/docs/' } From cdfb9220e10b2ac05c462604b7a49bf3b055da63 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:02:52 +0300 Subject: [PATCH 038/124] Updated dependencyMapping.json --- module/Entra/config/dependencyMapping.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/module/Entra/config/dependencyMapping.json b/module/Entra/config/dependencyMapping.json index 06c9b2af7d..d1d54e7249 100644 --- a/module/Entra/config/dependencyMapping.json +++ b/module/Entra/config/dependencyMapping.json @@ -1,3 +1,11 @@ { - "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Authentication"] + "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], + "Microsoft.Graph.Entra.Authentication":["Microsoft.Graph.Authentication"], + "Microsoft.Graph.Entra.DirectoryObjects":["Microsoft.Graph.DirectoryObjects"], + "Microsoft.Graph.Entra.Groups":["Microsoft.Graph.Groups"], + "Microsoft.Graph.Entra.DirectoryManagement":["Microsoft.Graph.DirectoryManagement"], + "Microsoft.Graph.Entra.Governance":["Microsoft.Graph.Governance"], + "Microsoft.Graph.Entra.SignIns":["Microsoft.Graph.SigIns"], + "Microsoft.Graph.Entra.Applications":["Microsoft.Graph.Applications"], + "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"] } \ No newline at end of file From 2e6fd2783ff35127bfaece2537229914c0d457f8 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:10:48 +0300 Subject: [PATCH 039/124] Updated module map code --- src/EntraModuleSplitter.ps1 | 101 ++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 50 deletions(-) diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 29684de4ae..cd4b97c745 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -33,9 +33,9 @@ class EntraModuleSplitter { [string] GetOutputDirectory([string]$source) { if ($source -eq 'Entra') { - return "..\module\Entra" + return "..\module\Entra\" } else { - return "..\module\EntraBeta" + return "..\module\EntraBeta\" } } @@ -78,43 +78,39 @@ class EntraModuleSplitter { [void] ProcessFunction([pscustomobject]$function, [string]$specificFunctionName, [string]$moduleOutputDirectory, [PSCustomObject]$jsonContent, [string]$header, [string]$unmappedDirectory) { $functionName = $function.Name $functionContent = $function.Content + + # Append the function contents to the header $ps1Content = $header + "`n" + $functionContent - # Check for specific function + # Add the Enable-Entra*AzureADAlias function to the root of the module directory if ($functionName -eq $specificFunctionName) { $topLevelOutputPath = Join-Path -Path $moduleOutputDirectory -ChildPath "$specificFunctionName.ps1" Set-Content -Path $topLevelOutputPath -Value $ps1Content Log-Message "[EntraModuleSplitter] Created specific function file: $topLevelOutputPath" -Level 'INFO' return } - + + # Function has been mapped to a directory $isMapped = $false - foreach ($key in $jsonContent.PSObject.Properties.Name) { - if ($functionName -like "*Dir*") { - $key = 'Directory' - } + if($functionName -ne 'New-EntraCustomHeaders' or $functionName -ne 'Get-EntraUnsupportedCommand'){ + $subModuleDirectoryName = $moduleMapping.$functionName - if ($functionName -like "*$key*") { - $keyDirectoryPath = if ($functionName -like "*Device*") { - Join-Path -Path $moduleOutputDirectory -ChildPath "Device" - } else { - Join-Path -Path $moduleOutputDirectory -ChildPath $key - } + # Create the subModule Directory + $subModuleDirectory = Join-Path $moduleOutputDirectory -ChildPath "$subModuleDirectoryName" - # Create the directory if it doesn't exist - $this.CreateOutputDirectory($keyDirectoryPath) + # Create the directory if it doesn't exist + $this.CreateOutputDirectory($subModuleDirectory) - # Write the main function to the appropriate directory - $outputFilePath = Join-Path -Path $keyDirectoryPath -ChildPath "$functionName.ps1" - Set-Content -Path $outputFilePath -Value $ps1Content - Log-Message "[EntraModuleSplitter] Created function file: $outputFilePath in $keyDirectoryPath" -Level 'SUCCESS' + # Write the main function to the appropriate directory + $outputFilePath = Join-Path -Path $subModuleDirectory -ChildPath "$functionName.ps1" + Set-Content -Path $outputFilePath -Value $ps1Content + Log-Message "[EntraModuleSplitter] Created function file: $outputFilePath in $subModuleDirectory" -Level 'SUCCESS' - $isMapped = $true - break - } - } + $isMapped = $true + } + # Account for unmapped files if (-not $isMapped) { $unmappedFilePath = Join-Path -Path $unmappedDirectory -ChildPath "$functionName.ps1" Set-Content -Path $unmappedFilePath -Value $ps1Content @@ -141,40 +137,45 @@ class EntraModuleSplitter { } } -[void] SplitEntraModule([string]$Source = 'Entra') { - # Determine file paths and output directories - $psm1FilePath = $this.GetModuleFilePath($Source) - $outputDirectory = $this.GetOutputDirectory($Source) - $jsonFilePath = "../module/Entra/config/moduleMapping.json" +[void] SplitEntraModule([string]$Module = 'Entra') { - $this.CreateOutputDirectory($outputDirectory) - $unmappedDirectory = Join-Path -Path $outputDirectory -ChildPath "UnMappedFiles" - $this.CreateOutputDirectory($unmappedDirectory) + $JsonFilePath=if($Module -eq 'Entra'){ + '../module/Entra/config/moduleMapping.json' + }else{ + '../module/EntraBeta/config/moduleMapping.json' + } + # Determine file paths and output directories + $psm1FilePath = $this.GetModuleFilePath($Module) + $outputDirectory = $this.GetOutputDirectory($Module) - $jsonContent = $this.ReadJsonFile($jsonFilePath) - $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1FilePath) - $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName - $this.CreateOutputDirectory($moduleOutputDirectory) + $this.CreateOutputDirectory($outputDirectory) + $unmappedDirectory = Join-Path -Path $outputDirectory -ChildPath "UnMappedFiles" + $this.CreateOutputDirectory($unmappedDirectory) - $psm1Content = Get-Content -Path $psm1FilePath -Raw - $functions = $this.ExtractFunctions($psm1Content) + $jsonContent = $this.ReadJsonFile($JsonFilePath) + $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1FilePath) + $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName + $this.CreateOutputDirectory($moduleOutputDirectory) - # Get the function contents for both New-EntraCustomHeaders and Get-EntraUnsupportedCommand - $functionNames = @("New-EntraCustomHeaders", "Get-EntraUnsupportedCommand") - $functionContents = $functions | Where-Object { $functionNames -contains $_.Name } + $psm1Content = Get-Content -Path $psm1FilePath -Raw + $functions = $this.ExtractFunctions($psm1Content) - # Initialize a variable to track if the specific function is processed - $specificFunctionName = if ($moduleName -eq "Microsoft.Graph.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAliases" } + # Get the function contents for both New-EntraCustomHeaders and Get-EntraUnsupportedCommand + $functionNames = @("New-EntraCustomHeaders", "Get-EntraUnsupportedCommand") + $functionContents = $functions | Where-Object { $functionNames -contains $_.Name } - foreach ($function in $functions) { - $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) - } + # Initialize a variable to track if the specific function is processed + $specificFunctionName = if ($moduleName -eq "Microsoft.Graph.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAliases" } - # Call the new method to add functions to all directories - $this.AddFunctionsToAllDirectories($moduleOutputDirectory, $functionContents) + foreach ($function in $functions) { + $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) + } - Log-Message "[EntraModuleSplitter] Splitting and organizing complete." -Level 'SUCCESS' -} + # Call the new method to add functions to all directories + $this.AddFunctionsToAllDirectories($moduleOutputDirectory, $functionContents) + + Log-Message "[EntraModuleSplitter] Splitting and organizing complete." -Level 'SUCCESS' + } [void] ProcessEntraAzureADAliases([string]$Module = 'Entra') { From 0bbd4769c888c44fb5f1ecac0cc1466072c7afcc Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:22:07 +0300 Subject: [PATCH 040/124] Added Meta-Module Generation Code --- src/EntraModuleBuilder.ps1 | 74 ++++++++++++++++++++++++++++++++----- src/EntraModuleSplitter.ps1 | 1 + 2 files changed, 66 insertions(+), 9 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 46f15a1d05..a503b32b93 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -153,9 +153,72 @@ Set-StrictMode -Version 5 Log-Message "[EntraModuleBuilder] CreateSubModuleFile script completed." -Level 'SUCCESS' } + [string[]] GetSubModuleFiles([string]$directoryPath) { + # Check if the directory exists + if (-Not (Test-Path -Path $directoryPath)) { + Write-Host "Directory does not exist: $directoryPath" -ForegroundColor Red + return $null # Return null if directory does not exist + } + + # Get all .psm1 files in the specified directory + $psm1Files = Get-ChildItem -Path $directoryPath -Filter *.psm1 -File + + # Check if any .psm1 files were found + if ($psm1Files.Count -eq 0) { + Write-Host "No .psm1 files found in the directory: $directoryPath" -ForegroundColor Yellow + return @() # Return an empty array if no files are found + } else { + # Return the names of the .psm1 files + return $psm1Files.Name + } + } [void] CreateRootModule([string] $Module){ - + $rootModuleName=if($Module -eq 'Entra'){ + 'Microsoft.Graph.Entra.root.psm1' + }else{ + 'Microsoft.Graph.Enta.Beta.root.psm1' + } + + + #Generate the .psm1 file + # Validate the target directory + if (-not (Test-Path $TargetDirectory)) { + Log-Message "The specified target directory does not exist. Creating it..." -Level 'ERROR' + New-Item -ItemType Directory -Path $TargetDirectory -Force | Out-Null + } + + # Start building the code snippet + $codeSnippet = @" +# Import all sub-modules dynamically + +`$subModules = @( +"@ + + # Add each sub-module to the code snippet + foreach ($subModule in $subModules) { + $codeSnippet += " '$subModule',`n" + } + + # Close the array and complete the foreach loop + $codeSnippet += @" +) + +foreach (`$subModule in `$subModules) { + Import-Module -Name `$subModule -Force -ErrorAction Stop +} +"@ + + $rootModuleContent=$this.headerText+"`n"+$codeSnippet + # Define the file paths + + $rootPsm1FilePath = Join-Path -Path $this.OutputDirectory -ChildPath $rootModuleName + + # Write the generated code to both files + + $rootModuleContent | Out-File -FilePath $rootPsm1FilePath -Encoding utf8 + + Log-Message "[EntraModuleBuilder] Root Module successfully created" -Level 'SUCCESS' } [void] CreateModuleManifest($module) { @@ -218,8 +281,7 @@ Set-StrictMode -Version 5 } else { "Microsoft.Graph.Entra.Beta.$moduleName.psd1" } - - + $moduleFileName = if ($Module -eq "Entra") { "Microsoft.Graph.Entra.$moduleName.psm1" } else { @@ -239,7 +301,6 @@ Set-StrictMode -Version 5 Prerelease = $null } - # Set the manifest path and functions to export $manifestPath = Join-Path $this.OutputDirectory "$manifestFileName" @@ -300,8 +361,6 @@ Set-StrictMode -Version 5 $PSData.Prerelease = $content.Prerelease } - - # Create and update the module manifest Log-Message "[EntraModuleBuilder] Creating manifest for $moduleName at $manifestPath" New-ModuleManifest @moduleSettings @@ -312,8 +371,6 @@ Set-StrictMode -Version 5 } } - - [void] CreateModuleHelp([string] $Module) { if (!(Test-Path $this.OutputDirectory)) { @@ -371,7 +428,6 @@ Set-StrictMode -Version 5 }catch{ Log-Message "[EntraModuleBuilder] CreateModuleHelp: $_.Exception.Message" -Level 'ERROR' } - } diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index cd4b97c745..b9875c18de 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -99,6 +99,7 @@ class EntraModuleSplitter { # Create the subModule Directory $subModuleDirectory = Join-Path $moduleOutputDirectory -ChildPath "$subModuleDirectoryName" + # Create the directory if it doesn't exist $this.CreateOutputDirectory($subModuleDirectory) From c812ad3f6e10a8e2558532abac49baec25a39849 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:36:20 +0300 Subject: [PATCH 041/124] Added Meta-Module Generation Code --- src/EntraModuleBuilder.ps1 | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index a503b32b93..a8836f2c75 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -153,23 +153,30 @@ Set-StrictMode -Version 5 Log-Message "[EntraModuleBuilder] CreateSubModuleFile script completed." -Level 'SUCCESS' } - [string[]] GetSubModuleFiles([string]$directoryPath) { + [string[]] GetSubModuleFiles([string] $Module, [string]$DirectoryPath) { # Check if the directory exists - if (-Not (Test-Path -Path $directoryPath)) { + # Define the pattern for matching submodule files + $pattern = if ($module -like "Microsoft.Graph.Entra.Beta.*") { + "Microsoft.Graph.Entra.Beta.*.psm1" + } else { + "Microsoft.Graph.Entra.*.psm1" + } + + if (-Not (Test-Path -Path $DirectoryPath)) { Write-Host "Directory does not exist: $directoryPath" -ForegroundColor Red return $null # Return null if directory does not exist } # Get all .psm1 files in the specified directory - $psm1Files = Get-ChildItem -Path $directoryPath -Filter *.psm1 -File + $subModules = Get-ChildItem -Path $DirectoryPath -Filter $pattern -File # Check if any .psm1 files were found - if ($psm1Files.Count -eq 0) { - Write-Host "No .psm1 files found in the directory: $directoryPath" -ForegroundColor Yellow + if ($subModules.Count -eq 0) { + Log-Message "No .psm1 files found in the directory: $directoryPath" -Level 'INFO' return @() # Return an empty array if no files are found } else { # Return the names of the .psm1 files - return $psm1Files.Name + return $subModules.Name } } @@ -180,9 +187,10 @@ Set-StrictMode -Version 5 'Microsoft.Graph.Enta.Beta.root.psm1' } + $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) - #Generate the .psm1 file - # Validate the target directory + #Generate the Root .psm1 file + # Validate the target directory if (-not (Test-Path $TargetDirectory)) { Log-Message "The specified target directory does not exist. Creating it..." -Level 'ERROR' New-Item -ItemType Directory -Path $TargetDirectory -Force | Out-Null @@ -371,6 +379,7 @@ foreach (`$subModule in `$subModules) { } } + [void] CreateModuleHelp([string] $Module) { if (!(Test-Path $this.OutputDirectory)) { From 84aca33208f6618629eb4e33d9cc9bc0abb5f9ab Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:14:40 +0300 Subject: [PATCH 042/124] Added Meta-Module Generation Code --- build/Create-EntraModule.ps1 | 9 +--- src/EntraModuleBuilder.ps1 | 82 +++++++++++++++++++++++++++++++++++- 2 files changed, 83 insertions(+), 8 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 067a2860ba..287bb72bc9 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -5,14 +5,9 @@ param ( . ..\src\EntraModuleBuilder.ps1 -# Determine the output path based on the module -$startPath = if ($Module -eq "Entra") { - "..\module\Entra\Microsoft.Graph.Entra\" -} else { - "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" -} + $moduleBuilder = [EntraModuleBuilder]::new() $moduleBuilder.CreateModuleHelp($Module) -$moduleBuilder.CreateSubModuleFile($startPath, ".\Typedefs.txt") +$moduleBuilder.CreateSubModuleFile($Module, ".\Typedefs.txt") $moduleBuilder.CreateModuleManifest($Module) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index a8836f2c75..526ed13ea9 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -122,7 +122,13 @@ Set-StrictMode -Version 5 } - [void] CreateSubModuleFile([string]$startDirectory, [string]$typedefsFilePath=$this.TypeDefsDirectory) { + [void] CreateSubModuleFile([string]$Module, [string]$typedefsFilePath=$this.TypeDefsDirectory) { + # Determine the output path based on the module + $startDirectory = if ($Module -eq "Entra") { + "..\module\Entra\Microsoft.Graph.Entra\" + } else { + "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" + } Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." $resolvedStartDirectory = $this.ResolveStartDirectory($startDirectory) @@ -151,6 +157,9 @@ Set-StrictMode -Version 5 $this.ProcessSubDirectory($subDir.FullName, $subDir.Name, $parentDirName, $destDirectory, $typedefsFilePath) } + #Create the RootModule .psm1 file + $this.CreateRootModule($Module) + Log-Message "[EntraModuleBuilder] CreateSubModuleFile script completed." -Level 'SUCCESS' } [string[]] GetSubModuleFiles([string] $Module, [string]$DirectoryPath) { @@ -229,6 +238,73 @@ foreach (`$subModule in `$subModules) { Log-Message "[EntraModuleBuilder] Root Module successfully created" -Level 'SUCCESS' } + [void] CreateRootModuleManifest([string] $Module) { + + # Update paths specific to this sub-directory + $rootPath=if ($Module -eq "Entra") { + "../module/Entra" + } else { + "../module/EntraBeta" + } + + $moduleName=if($Module -eq 'Entra'){ + 'Microsoft.Graph.Entra.root' + }else{ + 'Microsoft.Grap.Entra.Beta.root' + } + + $settingPath = Join-Path $rootPath -ChildPath "/config/ModuleMetadata.json" + + #We do not need to create a help file for the root module, since once the nested modules are loaded, their help will be available + $files = @("$($moduleName).psd1", "$($moduleName).psm1") + $content = Get-Content -Path $settingPath | ConvertFrom-Json + $PSData = @{ + Tags = $($content.tags) + LicenseUri = $($content.licenseUri) + ProjectUri = $($content.projectUri) + IconUri = $($content.iconUri) + ReleaseNotes = $($content.releaseNotes) + Prerelease = $null + } + $manifestPath = Join-Path $this.OutputDirectory -ChildPath "$($moduleName).psd1" + + $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) + $nestedModules=@() + foreach($module in $subModules){ + Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' + $nestedModules += $module + } + $moduleSettings = @{ + Path = $manisfestPath + GUID = $($content.guid) + ModuleVersion = "$($content.version)" + FunctionsToExport =@() + CmdletsToExport=@() + AliasesToExport=@() + Author = $($content.authors) + CompanyName = $($content.owners) + FileList = $files + RootModule = "$($moduleName).psm1" + Description = 'Microsoft Graph Entra PowerShell.' + DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) + PowerShellVersion = $([System.Version]::Parse('5.1')) + CompatiblePSEditions = @('Desktop','Core') + RequiredModules = @() + NestedModules = $nestedModules + } + + if($null -ne $content.Prerelease){ + $PSData.Prerelease = $content.Prerelease + } + + Log-Message "Starting Root Module Manifest generation" -Level 'INFO' + $this.LoadMessage = $this.LoadMessage.Replace("{VERSION}", $content.version) + New-ModuleManifest @moduleSettings + Update-ModuleManifest -Path $manifestPath -PrivateData $PSData + + Log-Message "Root Module Manifest successfully created" -Level 'INFO' + } + [void] CreateModuleManifest($module) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { @@ -377,6 +453,10 @@ foreach (`$subModule in `$subModules) { # Log completion for this module Log-Message "[EntraModuleBuilder] Manifest for $moduleName created successfully" -Level 'SUCCESS' } + + #Create the Root Module Manifest + + $this.CreateRootModuleManifest($module) } From bd6993e4ccc32ed7834c8c19f98e778dc8a07a78 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:24:58 +0300 Subject: [PATCH 043/124] Fixes --- src/EntraModuleBuilder.ps1 | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 526ed13ea9..7af7cb14c1 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -199,11 +199,6 @@ Set-StrictMode -Version 5 $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) #Generate the Root .psm1 file - # Validate the target directory - if (-not (Test-Path $TargetDirectory)) { - Log-Message "The specified target directory does not exist. Creating it..." -Level 'ERROR' - New-Item -ItemType Directory -Path $TargetDirectory -Force | Out-Null - } # Start building the code snippet $codeSnippet = @" @@ -275,7 +270,7 @@ foreach (`$subModule in `$subModules) { $nestedModules += $module } $moduleSettings = @{ - Path = $manisfestPath + Path = $manifestPath GUID = $($content.guid) ModuleVersion = "$($content.version)" FunctionsToExport =@() @@ -298,7 +293,7 @@ foreach (`$subModule in `$subModules) { } Log-Message "Starting Root Module Manifest generation" -Level 'INFO' - $this.LoadMessage = $this.LoadMessage.Replace("{VERSION}", $content.version) + New-ModuleManifest @moduleSettings Update-ModuleManifest -Path $manifestPath -PrivateData $PSData From 062ab1e4dcaeb13d6be3edeb83aacf6cfbbcd0f4 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:37:45 +0300 Subject: [PATCH 044/124] fixed submodule loading code --- src/EntraModuleBuilder.ps1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 7af7cb14c1..bcff93e159 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -208,9 +208,14 @@ Set-StrictMode -Version 5 "@ # Add each sub-module to the code snippet - foreach ($subModule in $subModules) { - $codeSnippet += " '$subModule',`n" - } + for ($i = 0; $i -lt $subModules.Count; $i++) { + $codeSnippet += " '$($subModules[$i])'" + if ($i -lt $subModules.Count - 1) { + $codeSnippet += ",`n" # Add a comma except for the last item + } else { + $codeSnippet += "`n" # Just a newline for the last item + } + } # Close the array and complete the foreach loop $codeSnippet += @" From 79c6e47c0f8b6ff7b27284cdfa721a8a914622a6 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:43:29 +0300 Subject: [PATCH 045/124] fixed root module manifest gen code --- src/EntraModuleBuilder.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index bcff93e159..6250fca012 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -271,8 +271,10 @@ foreach (`$subModule in `$subModules) { $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) $nestedModules=@() foreach($module in $subModules){ - Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' - $nestedModules += $module + if($module -eq $moduleName){ + Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' + $nestedModules += $module + } } $moduleSettings = @{ Path = $manifestPath From 4668958e3de0a948c84de0afee69f27ce0441e9b Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:44:34 +0300 Subject: [PATCH 046/124] fixed root module manifest gen code --- src/EntraModuleBuilder.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 6250fca012..fb09e5259c 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -271,7 +271,7 @@ foreach (`$subModule in `$subModules) { $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) $nestedModules=@() foreach($module in $subModules){ - if($module -eq $moduleName){ + if($module -ne $moduleName){ Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' $nestedModules += $module } From 0467e56104ca9989e222e239fd63fe3183c937e0 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:46:24 +0300 Subject: [PATCH 047/124] fixed root module manifest gen code --- src/EntraModuleBuilder.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index fb09e5259c..6206e93263 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -271,7 +271,7 @@ foreach (`$subModule in `$subModules) { $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) $nestedModules=@() foreach($module in $subModules){ - if($module -ne $moduleName){ + if($module -ne "$($moduleName).psm1"){ Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' $nestedModules += $module } From 4981de9538b68cf4040d2de551fce63a09f4f40e Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:50:12 +0300 Subject: [PATCH 048/124] fixed root module manifest gen code --- src/EntraModuleBuilder.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 6206e93263..cae56f9edd 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -196,9 +196,15 @@ Set-StrictMode -Version 5 'Microsoft.Graph.Enta.Beta.root.psm1' } - $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) + $subModuleFiles=$this.GetSubModuleFiles($Module,$this.OutputDirectory) + $subModules=@() + # Prevents the old root module from being added to prevent cyclic dependency + foreach($module in $subModuleFiles){ + if($module -ne $rootModuleName){ + subModules+=$module + } + } - #Generate the Root .psm1 file # Start building the code snippet $codeSnippet = @" From 06389572d182fc9b1a9d65a75f9fe10ed9467a41 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:54:36 +0300 Subject: [PATCH 049/124] fixed root module manifest gen code --- src/EntraModuleBuilder.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index cae56f9edd..d4e4bafecd 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -201,7 +201,7 @@ Set-StrictMode -Version 5 # Prevents the old root module from being added to prevent cyclic dependency foreach($module in $subModuleFiles){ if($module -ne $rootModuleName){ - subModules+=$module + $subModules+=$module } } From 57f25d8b5cb216658be5d058ee1f0ee5b74a8d59 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:08:52 +0300 Subject: [PATCH 050/124] fixed root module manifest gen code --- src/EntraModuleBuilder.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index d4e4bafecd..6d873023d3 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -228,7 +228,7 @@ Set-StrictMode -Version 5 ) foreach (`$subModule in `$subModules) { - Import-Module -Name `$subModule -Force -ErrorAction Stop + Import-Module -Name `$subModule -Force } "@ From d06c3bd1a05f0391380d69be2531bec276da1e38 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:15:28 +0300 Subject: [PATCH 051/124] fixed module loading issue --- src/EntraModuleBuilder.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 6d873023d3..e83a276593 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -228,7 +228,7 @@ Set-StrictMode -Version 5 ) foreach (`$subModule in `$subModules) { - Import-Module -Name `$subModule -Force + Import-Module -Name `( Join-Path $PSScriptRoot $subModule) -Force } "@ From 1e4f660c86c79565f907ba2b420009166af11044 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:24:50 +0300 Subject: [PATCH 052/124] fixed root module generation to give correct path --- src/EntraModuleBuilder.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index e83a276593..f5e58a2b79 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -202,6 +202,7 @@ Set-StrictMode -Version 5 foreach($module in $subModuleFiles){ if($module -ne $rootModuleName){ $subModules+=$module + } } @@ -226,9 +227,10 @@ Set-StrictMode -Version 5 # Close the array and complete the foreach loop $codeSnippet += @" ) - +`$moduleBasePath = Split-Path -Parent `$MyInvocation.MyCommand.Definition foreach (`$subModule in `$subModules) { - Import-Module -Name `( Join-Path $PSScriptRoot $subModule) -Force + `$subModulePath=Join-Path `$moduleBasePath -ChildPath `$subModule + Import-Module -Name `$subModulePath -Force -ErrorAction Stop } "@ From 0ba1878756f9367aaf4b016734c050fcac16940a Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:43:50 +0300 Subject: [PATCH 053/124] Fixed required module fetching --- src/EntraModuleBuilder.ps1 | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index f5e58a2b79..3c66639906 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -337,27 +337,7 @@ foreach (`$subModule in `$subModules) { # Load the module metadata $content = Get-Content -Path $settingPath | ConvertFrom-Json - # Load dependency mapping from JSON - # Check if the dependency mapping file exists and load it - if (Test-Path $dependencyMappingPath) { - # Read the JSON content - $jsonContent = Get-Content -Path $dependencyMappingPath -Raw - - # Check if the JSON content is not null or empty - if (-not [string]::IsNullOrEmpty($jsonContent)) { - # Convert JSON to Hashtable - $dependencyMapping = @{} - $parsedContent = $jsonContent | ConvertFrom-Json - foreach ($key in $parsedContent.PSObject.Properties.Name) { - $dependencyMapping[$key] = $parsedContent.$key - } - } else { - Log-Message "[EntraModuleBuilder] Warning: dependencyMapping.json is empty." -Level 'ERROR' - } - } else { - Log-Message "[EntraModuleBuilder] Warning: dependencyMapping.json not found at $dependencyMappingPath." -Level 'ERROR' - } - + # Create Manifest for each SubModule foreach ($subDir in $subDirectories) { # Define module name based on sub-directory name From 4dc24631a923d5c8ea810c2fc096d5db08f344c8 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:45:56 +0300 Subject: [PATCH 054/124] Added logging for testing --- src/EntraModuleBuilder.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 3c66639906..69de51de52 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -230,7 +230,9 @@ Set-StrictMode -Version 5 `$moduleBasePath = Split-Path -Parent `$MyInvocation.MyCommand.Definition foreach (`$subModule in `$subModules) { `$subModulePath=Join-Path `$moduleBasePath -ChildPath `$subModule - Import-Module -Name `$subModulePath -Force -ErrorAction Stop + Write-Host "Importing... `$subModule" -ForegroundColor Yellow + Import-Module -Name `$subModulePath -Force -ErrorAction Stop + Write-Host "Imported `$subModule" -ForegroundColor Yellow } "@ From 4f7328566c6f68fbbf730c5659a06f2fb5e6083c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:08:02 +0300 Subject: [PATCH 055/124] Added logging for testing --- src/EntraModuleBuilder.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 69de51de52..2599974cb2 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -230,9 +230,7 @@ Set-StrictMode -Version 5 `$moduleBasePath = Split-Path -Parent `$MyInvocation.MyCommand.Definition foreach (`$subModule in `$subModules) { `$subModulePath=Join-Path `$moduleBasePath -ChildPath `$subModule - Write-Host "Importing... `$subModule" -ForegroundColor Yellow Import-Module -Name `$subModulePath -Force -ErrorAction Stop - Write-Host "Imported `$subModule" -ForegroundColor Yellow } "@ From 5b78d5269f0559285db1ca17b2d239c5a456cb9e Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:24:03 +0300 Subject: [PATCH 056/124] Added correct moduleMapping for Entra --- module/Entra/config/dependencyMapping.json | 8 +- module/Entra/config/moduleMapping.json | 276 +++++++++++++++++- .../EntraBeta/config/dependencyMapping.json | 2 +- src/EntraModuleSplitter.ps1 | 5 +- 4 files changed, 270 insertions(+), 21 deletions(-) diff --git a/module/Entra/config/dependencyMapping.json b/module/Entra/config/dependencyMapping.json index d1d54e7249..dd089a7bb4 100644 --- a/module/Entra/config/dependencyMapping.json +++ b/module/Entra/config/dependencyMapping.json @@ -1,11 +1,11 @@ { - "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], + "Microsoft.Graph.Entra.User":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], "Microsoft.Graph.Entra.Authentication":["Microsoft.Graph.Authentication"], - "Microsoft.Graph.Entra.DirectoryObjects":["Microsoft.Graph.DirectoryObjects"], - "Microsoft.Graph.Entra.Groups":["Microsoft.Graph.Groups"], + "Microsoft.Graph.Entra.Directory":["Microsoft.Graph.DirectoryObjects"], + "Microsoft.Graph.Entra.Group":["Microsoft.Graph.Groups"], "Microsoft.Graph.Entra.DirectoryManagement":["Microsoft.Graph.DirectoryManagement"], "Microsoft.Graph.Entra.Governance":["Microsoft.Graph.Governance"], "Microsoft.Graph.Entra.SignIns":["Microsoft.Graph.SigIns"], - "Microsoft.Graph.Entra.Applications":["Microsoft.Graph.Applications"], + "Microsoft.Graph.Entra.Application":["Microsoft.Graph.Applications"], "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"] } \ No newline at end of file diff --git a/module/Entra/config/moduleMapping.json b/module/Entra/config/moduleMapping.json index 9ba9b07aac..f1adeadf5e 100644 --- a/module/Entra/config/moduleMapping.json +++ b/module/Entra/config/moduleMapping.json @@ -1,16 +1,264 @@ { - "Authentication":"", - "Directory":"", - "Application":"", - "ApplicationProxy":"", - "User":"", - "Group":"", - "ServicePrincipal":"", - "AdministrativeUnit":"", - "Contact":"", - "Domain":"", - "Permission":"", - "Device":"", - "Policy":"", - "CertificateAuthority":"" + "Add-EntraAdministrativeUnitMember": "DirectoryManagement", + "Add-EntraLifecyclePolicyGroup": "Groups", + "Get-EntraAccountSku": "DirectoryManagement", + "Get-EntraAdministrativeUnit": "DirectoryManagement", + "Get-EntraAdministrativeUnitMember": "DirectoryManagement", + "New-EntraAdministrativeUnit": "DirectoryManagement", + "Remove-EntraAdministrativeUnit": "DirectoryManagement", + "Remove-EntraAdministrativeUnitMember": "DirectoryManagement", + "Set-EntraAdministrativeUnit": "DirectoryManagement", + "Get-EntraApplicationProxyApplication": "Applications", + "New-EntraApplicationProxyApplication": "Applications", + "Remove-EntraApplicationProxyApplication": "Applications", + "Set-EntraApplicationProxyApplication": "Applications", + "Get-EntraApplicationOwner":"Applications", + "Get-EntraApplicationPasswordCredential":"Applications", + "Get-EntraApplicationServiceEndpoint":"Applications", + "Get-EntraApplicationTemplate":"Applications", + "Get-EntraDeletedApplication":"Applications", + "Set-EntraApplicationProxyApplicationCustomDomainCertificate": "Applications", + "Set-EntraApplicationProxyApplicationSingleSignOn": "Applications", + "Get-EntraApplicationProxyApplicationConnectorGroup": "Applications", + "Get-EntraApplicationProxyConnector": "Applications", + "Get-EntraApplicationProxyConnectorGroup": "Applications", + "Get-EntraApplicationProxyConnectorGroupMember": "Applications", + "Get-EntraApplicationProxyConnectorGroupMembers": "Applications", + "Get-EntraApplicationProxyConnectorMemberOf": "Applications", + "New-EntraApplicationProxyConnectorGroup": "Applications", + "Remove-EntraApplicationProxyApplicationConnectorGroup": "Applications", + "Remove-EntraApplicationProxyConnectorGroup": "Applications", + "Set-EntraApplicationProxyConnector": "Applications", + "Set-EntraApplicationProxyConnectorGroup": "Applications", + "Add-EntraApplicationOwner": "Applications", + "Get-EntraApplication": "Applications", + "Get-EntraApplicationExtensionProperty": "Applications", + "Get-EntraApplicationKeyCredential": "Applications", + "Get-EntraApplicationLogo": "Applications", + "Add-EntraServicePrincipalDelegatedPermissionClassification": "Applications", + "Add-EntraServicePrincipalOwner": "Applications", + "Get-EntraServicePrincipal": "Applications", + "Get-EntraServicePrincipalCreatedObject": "Applications", + "Get-EntraServicePrincipalDelegatedPermissionClassification": "Applications", + "Get-EntraServicePrincipalKeyCredential": "Applications", + "Get-EntraServicePrincipalMembership": "Applications", + "Get-EntraServicePrincipalOAuth2PermissionGrant": "Applications", + "Get-EntraServicePrincipalOwnedObject": "Applications", + "Get-EntraServicePrincipalOwner": "Applications", + "Get-EntraServicePrincipalPasswordCredential": "Applications", + "New-EntraApplication": "Applications", + "New-EntraApplicationExtensionProperty": "Applications", + "New-EntraApplicationKey": "Applications", + "New-EntraApplicationKeyCredential": "Applications", + "New-EntraApplicationPassword": "Applications", + "New-EntraApplicationPasswordCredential": "Applications", + "New-EntraServicePrincipal": "Applications", + "New-EntraServicePrincipalKeyCredential": "Applications", + "New-EntraServicePrincipalPasswordCredential": "Applications", + "Remove-EntraApplication": "Applications", + "Remove-EntraApplicationExtensionProperty": "Applications", + "Remove-EntraApplicationKey": "Applications", + "Remove-EntraApplicationKeyCredential": "Applications", + "Remove-EntraApplicationOwner": "Applications", + "Remove-EntraApplicationPassword": "Applications", + "Remove-EntraApplicationPasswordCredential": "Applications", + "Remove-EntraApplicationVerifiedPublisher": "Applications", + "Remove-EntraDeletedApplication": "Applications", + "Remove-EntraDeletedDirectoryObject": "Applications", + "Remove-EntraServicePrincipal": "Applications", + "Remove-EntraServicePrincipalDelegatedPermissionClassification": "Applications", + "Remove-EntraServicePrincipalKeyCredential": "Applications", + "Remove-EntraServicePrincipalOwner": "Applications", + "Remove-EntraServicePrincipalPasswordCredential": "Applications", + "Restore-EntraDeletedApplication": "Applications", + "Select-EntraGroupIdsServicePrincipalIsMemberOf": "Applications", + "Set-EntraApplication": "Applications", + "Set-EntraApplicationLogo": "Applications", + "Set-EntraApplicationVerifiedPublisher": "Applications", + "Set-EntraServicePrincipal": "Applications", + "Get-EntraTrustedCertificateAuthority": "SignIns", + "New-EntraTrustedCertificateAuthority": "SignIns", + "Remove-EntraTrustedCertificateAuthority": "SignIns", + "Set-EntraTrustedCertificateAuthority": "SignIns", + "Get-EntraContact": "DirectoryManagement", + "Get-EntraContactDirectReport": "DirectoryManagement", + "Get-EntraContactManager": "DirectoryManagement", + "Get-EntraContactMembership": "DirectoryManagement", + "Get-EntraContactThumbnailPhoto": "DirectoryManagement", + "Remove-EntraContact": "DirectoryManagement", + "Get-EntraContract": "DirectoryManagement", + "Add-EntraDeviceRegisteredOwner": "DirectoryManagement", + "Add-EntraDeviceRegisteredUser": "DirectoryManagement", + "Get-EntraDevice": "DirectoryManagement", + "Get-EntraDeviceRegisteredOwner": "DirectoryManagement", + "Get-EntraDeviceRegisteredUser": "DirectoryManagement", + "New-EntraDevice": "DirectoryManagement", + "Remove-EntraDevice": "DirectoryManagement", + "Remove-EntraDeviceRegisteredOwner": "DirectoryManagement", + "Remove-EntraDeviceRegisteredUser": "DirectoryManagement", + "Set-EntraDevice": "DirectoryManagement", + "Add-EntraDirectoryRoleMember": "DirectoryManagement", + "Get-EntraDeletedDirectoryObject": "DirectoryManagement", + "Get-EntraDirectoryRole": "DirectoryManagement", + "Enable-EntraDirectoryRole": "DirectoryManagement", + "Get-EntraDirectoryRoleMember": "DirectoryManagement", + "Get-EntraDirectoryRoleTemplate": "DirectoryManagement", + "Get-EntraDirSyncConfiguration": "DirectoryManagement", + "Get-EntraHasObjectsWithDirSyncProvisioningError": "DirectoryManagement", + "Remove-EntraDirectoryRoleMember": "DirectoryManagement", + "Restore-EntraDeletedDirectoryObject": "DirectoryManagement", + "Set-EntraDirSyncConfiguration": "DirectoryManagement", + "Set-EntraDirSyncEnabled": "DirectoryManagement", + "Set-EntraDirSyncFeature": "DirectoryManagement", + "Get-EntraDomain": "DirectoryManagement", + "Get-EntraDomainFederationSettings": "DirectoryManagement", + "Get-EntraDomainNameReference": "DirectoryManagement", + "Get-EntraDirectoryManagementerviceConfigurationRecord": "DirectoryManagement", + "Get-EntraDomainVerificationDnsRecord": "DirectoryManagement", + "New-EntraDomain": "DirectoryManagement", + "Remove-EntraDomain": "DirectoryManagement", + "Set-EntraDomain": "DirectoryManagement", + "Set-EntraDomainFederationSettings": "DirectoryManagement", + "Get-EntraExtensionProperty": "DirectoryManagement", + "Get-EntraFederationProperty": "DirectoryManagement", + "Add-EntraGroupMember": "Groups", + "Add-EntraGroupOwner": "Groups", + "Set-EntraFeatureRolloutPolicy": "SignIns", + "Get-EntraDeletedGroup": "Groups", + "Get-EntraGroup": "Groups", + "Get-EntraGroupAppRoleAssignment": "Groups", + "Get-EntraGroupLifecyclePolicy": "Groups", + "Get-EntraGroupMember": "Groups", + "Get-EntraGroupOwner": "Groups", + "Get-EntraGroupPermissionGrant": "Groups", + "Get-EntraLifecyclePolicyGroup": "Groups", + "Get-EntraPolicy": "SignIns", + "New-EntraPolicy": "SignIns", + "Remove-EntraPolicy": "SignIns", + "Set-EntraPolicy": "SignIns", + "New-EntraGroup": "Groups", + "New-EntraGroupAppRoleAssignment": "Groups", + "New-EntraGroupLifecyclePolicy": "Groups", + "Remove-EntraGroup": "Groups", + "Remove-EntraGroupAppRoleAssignment": "Groups", + "Remove-EntraGroupLifecyclePolicy": "Groups", + "Remove-EntraGroupMember": "Groups", + "Remove-EntraGroupOwner": "Groups", + "Remove-EntraLifecyclePolicyGroup": "Groups", + "Reset-EntraLifeCycleGroup": "Groups", + "Select-EntraGroupIdsContactIsMemberOf": "Groups", + "Select-EntraGroupIdsGroupIsMemberOf": "Groups", + "Select-EntraGroupIdsUserIsMemberOf": "Groups", + "Set-EntraGroup": "Groups", + "Set-EntraGroupLifecyclePolicy": "Groups", + "Get-EntraAuthorizationPolicy": "SignIns", + "Get-EntraConditionalAccessPolicy": "SignIns", + "Get-EntraIdentityProvider": "SignIns", + "Get-EntraOAuth2PermissionGrant": "SignIns", + "Get-EntraPasswordPolicy": "DirectoryManagement", + "Get-EntraPermissionGrantConditionSet": "SignIns", + "Get-EntraPermissionGrantPolicy": "SignIns", + "Get-EntraScopedRoleMembership": "DirectoryManagement", + "New-EntraOauth2PermissionGrant": "SignIns", + "New-EntraConditionalAccessPolicy": "SignIns", + "New-EntraIdentityProvider": "SignIns", + "New-EntraInvitation": "Invitations", + "New-EntraPermissionGrantConditionSet": "SignIns", + "New-EntraPermissionGrantPolicy": "SignIns", + "Remove-EntraConditionalAccessPolicy": "SignIns", + "Remove-EntraIdentityProvider": "SignIns", + "Remove-EntraOAuth2PermissionGrant": "SignIns", + "Remove-EntraPermissionGrantConditionSet": "SignIns", + "Remove-EntraPermissionGrantPolicy": "SignIns", + "Remove-EntraScopedRoleMembership": "DirectoryManagement", + "Revoke-EntraSignedInUserAllRefreshToken": "Authentication", + "Revoke-EntraUserAllRefreshToken": "Authentication", + "Set-EntraAuthorizationPolicy": "SignIns", + "Set-EntraConditionalAccessPolicy": "SignIns", + "Set-EntraIdentityProvider": "SignIns", + "Set-EntraPermissionGrantConditionSet": "SignIns", + "Set-EntraPermissionGrantPolicy": "SignIns", + "New-EntraNamedLocationPolicy": "SignIns", + "Remove-EntraNamedLocationPolicy": "SignIns", + "Set-EntraNamedLocationPolicy": "SignIns", + "Get-EntraNamedLocationPolicy": "SignIns", + "Get-EntraPartnerInformation": "DirectoryManagement", + "Set-EntraPartnerInformation": "DirectoryManagement", + "Get-EntraSubscribedSku": "DirectoryManagement", + "Get-EntraTenantDetail": "DirectoryManagement", + "Set-EntraTenantDetail": "DirectoryManagement", + "Add-EntraScopedRoleMembership": "DirectoryManagement", + "Get-EntraUser": "Users", + "Get-EntraUserAppRoleAssignment": "Users", + "Get-EntraUserCreatedObject": "Users", + "Get-EntraUserDirectReport": "Users", + "Get-EntraUserExtension": "Users", + "Get-EntraUserLicenseDetail": "Users", + "Get-EntraUserManager": "Users", + "Get-EntraUserMembership": "Users", + "Get-EntraUserOAuth2PermissionGrant": "Users", + "Get-EntraUserOwnedDevice": "Users", + "Get-EntraUserOwnedObject": "Users", + "Get-EntraUserRegisteredDevice": "Users", + "Get-EntraUserThumbnailPhoto": "Users", + "New-EntraUser": "Users", + "New-EntraUserAppRoleAssignment": "Users", + "Remove-EntraUser": "Users", + "Remove-EntraUserAppRoleAssignment": "Users", + "Remove-EntraUserExtension": "Users", + "Remove-EntraUserManager": "Users", + "Set-EntraUser": "Users", + "Set-EntraUserExtension": "Users", + "Set-EntraUserLicense": "Users", + "Set-EntraUserManager": "Users", + "Set-EntraUserPassword": "Users", + "Set-EntraUserThumbnailPhoto": "Users", + "Update-EntraSignedInUserPassword": "Users", + "Reset-EntraStrongAuthenticationMethodByUpn": "Authentication", + "Get-EntraDirSyncfeature": "DirectoryManagement", + "Get-EntraAttributeSet": "DirectoryManagement", + "New-EntraAttributeSet": "DirectoryManagement", + "Set-EntraAttributeSet": "DirectoryManagement", + "Add-EntraCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Set-EntraCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Get-EntraCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Get-EntraCustomSecurityAttributeDefinition": "DirectoryManagement", + "New-EntraCustomSecurityAttributeDefinition": "DirectoryManagement", + "Set-EntraCustomSecurityAttributeDefinition": "DirectoryManagement", + "Add-EntraEnvironment": "Authentication", + "Confirm-EntraDomain": "DirectoryManagement", + "Connect-Entra": "Authentication", + "Disconnect-Entra": "Authentication", + "Enable-EntraAzureADAlias": "Migration", + "Find-EntraPermission": "Authentication", + "Get-CrossCloudVerificationCode": "DirectoryManagement", + "Get-EntraContext": "Authentication", + "Get-EntraEnvironment": "Authentication", + "Get-EntraObjectByObjectId": "DirectoryManagement", + "Test-EntraScript": "Migration", + "Get-EntraUnsupportedCommand": "Migration", + "Get-EntraObjectSetting": "Groups", + "New-EntraApplicationFromApplicationTemplate": "Applications", + "New-EntraFeatureRolloutPolicy": "SignIns", + "Remove-EntraFeatureRolloutPolicyDirectoryObject": "SignIns", + "Remove-EntraFeatureRolloutPolicy": "SignIns", + "Remove-EntraExternalDomainFederation": "DirectoryManagement", + "Get-EntraDirSyncFeature": "DirectoryManagement", + "Get-EntraAuditDirectoryLog": "Reports", + "Get-EntraAuditSignInLog": "Reports", + "Get-EntraDirectoryObjectOnPremisesProvisioningError": "DirectoryManagement", + "Get-EntraDirectoryRoleAssignment": "Governance", + "Get-EntraDirectoryRoleDefinition": "Governance", + "Get-EntraFeatureRolloutPolicy": "SignIns", + "Get-EntraServicePrincipalAppRoleAssignedTo": "Applications", + "Get-EntraServicePrincipalAppRoleAssignment": "Applications", + "New-EntraDirectoryRoleAssignment": "Governance", + "New-EntraDirectoryRoleDefinition": "Governance", + "New-EntraServicePrincipalAppRoleAssignment": "Applications", + "Remove-EntraDirectoryRoleAssignment": "Governance", + "Remove-EntraDirectoryRoleDefinition": "Governance", + "Remove-EntraServicePrincipalAppRoleAssignment": "Applications", + "Set-EntraDirectoryRoleDefinition": "Governance", + "Update-EntraUserFromFederated": "Users", + "Get-EntraDomainServiceConfiguration":"DirectoryManagement" } \ No newline at end of file diff --git a/module/EntraBeta/config/dependencyMapping.json b/module/EntraBeta/config/dependencyMapping.json index 432c1df114..ed944543ad 100644 --- a/module/EntraBeta/config/dependencyMapping.json +++ b/module/EntraBeta/config/dependencyMapping.json @@ -1,3 +1,3 @@ { - "Microsoft.Graph.Entra.Beta.Users":["Microsoft.Graph.Users","Microsoft.Graph.Authentication"] + "Microsoft.Graph.Entra.Beta.User":["Microsoft.Graph.Users"] } \ No newline at end of file diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index b9875c18de..985781ebda 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -93,7 +93,8 @@ class EntraModuleSplitter { # Function has been mapped to a directory $isMapped = $false - if($functionName -ne 'New-EntraCustomHeaders' or $functionName -ne 'Get-EntraUnsupportedCommand'){ + if($moduleMapping.ContainsKey($functionName)){ + $subModuleDirectoryName = $moduleMapping.$functionName # Create the subModule Directory @@ -112,7 +113,7 @@ class EntraModuleSplitter { } # Account for unmapped files - if (-not $isMapped) { + if (-not $isMapped -and $functionName -ne 'New-EntraCustomHeaders') { $unmappedFilePath = Join-Path -Path $unmappedDirectory -ChildPath "$functionName.ps1" Set-Content -Path $unmappedFilePath -Value $ps1Content Log-Message "[EntraModuleSplitter] Created unmapped function file: $unmappedFilePath in UnMappedFiles" -Level 'ERROR' From a4836a9bcbd5bf755d6115b3eb977fdae502a8de Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:27:33 +0300 Subject: [PATCH 057/124] fix bug --- src/EntraModuleSplitter.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 985781ebda..26734568e5 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -75,7 +75,7 @@ class EntraModuleSplitter { return $functions } - [void] ProcessFunction([pscustomobject]$function, [string]$specificFunctionName, [string]$moduleOutputDirectory, [PSCustomObject]$jsonContent, [string]$header, [string]$unmappedDirectory) { + [void] ProcessFunction([pscustomobject]$function, [string]$specificFunctionName, [string]$moduleOutputDirectory, [PSCustomObject]$moduleMapping, [string]$header, [string]$unmappedDirectory) { $functionName = $function.Name $functionContent = $function.Content From fc20c044cfb308eea82f391e94d772ca3a0554c1 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:28:20 +0300 Subject: [PATCH 058/124] fix bug --- src/EntraModuleSplitter.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 26734568e5..5938deae6c 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -40,7 +40,7 @@ class EntraModuleSplitter { } [PSCustomObject] ReadJsonFile([string]$jsonFilePath) { - return Get-Content -Path $jsonFilePath | ConvertFrom-Json + return Get-Content -Path $jsonFilePath | ConvertFrom-Json -AsHashTable } [array] ExtractFunctions([string]$content) { From 6518336a431a27fdf2b6deee4fbe685cbcc9840b Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:39:16 +0300 Subject: [PATCH 059/124] fix bug --- build/Create-EntraModule.ps1 | 4 +++- build/Split-Docs.ps1 | 8 +++----- module/Entra/config/moduleMapping.json | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 287bb72bc9..e6a3e7f20d 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -4,10 +4,12 @@ param ( ) . ..\src\EntraModuleBuilder.ps1 - +. .\Split-Docs $moduleBuilder = [EntraModuleBuilder]::new() +# Split the docs first +Split-Docs -Source $Module $moduleBuilder.CreateModuleHelp($Module) $moduleBuilder.CreateSubModuleFile($Module, ".\Typedefs.txt") $moduleBuilder.CreateModuleManifest($Module) diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index a76ba9c173..c1f38ec50f 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -7,7 +7,7 @@ . ./common-functions.ps1 -function Copy-MarkdownFilesFromMapping { +function Split-Docs { param ( [string]$Source = 'Entra', # Default to 'Entra' [string]$OutputDirectory # Allow custom output directory @@ -17,11 +17,11 @@ function Copy-MarkdownFilesFromMapping { switch ($Source) { 'Entra' { $DocsSourceDirectory = "../module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" - $MappingFilePath = '../module/Entra/config/newModuleMapping.json' + $MappingFilePath = '../module/Entra/config/moduleMapping.json' } 'EntraBeta' { $DocsSourceDirectory = "../module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" - $MappingFilePath = "../module/EntraBeta/config/newModuleMapping.json" + $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" } default { Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' @@ -74,5 +74,3 @@ function Copy-MarkdownFilesFromMapping { Log-Message -Message "Markdown file copying complete." -Level 'INFO' } - -Copy-MarkdownFilesFromMapping -Source 'Entra' # For Entra diff --git a/module/Entra/config/moduleMapping.json b/module/Entra/config/moduleMapping.json index f1adeadf5e..d041ba6a9f 100644 --- a/module/Entra/config/moduleMapping.json +++ b/module/Entra/config/moduleMapping.json @@ -215,7 +215,6 @@ "Set-EntraUserThumbnailPhoto": "Users", "Update-EntraSignedInUserPassword": "Users", "Reset-EntraStrongAuthenticationMethodByUpn": "Authentication", - "Get-EntraDirSyncfeature": "DirectoryManagement", "Get-EntraAttributeSet": "DirectoryManagement", "New-EntraAttributeSet": "DirectoryManagement", "Set-EntraAttributeSet": "DirectoryManagement", From 0e5e8e2fa8ec71b271482642372099fc96ce7305 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:42:44 +0300 Subject: [PATCH 060/124] fix bug --- build/Split-Docs.ps1 | 2 +- module/Entra/config/moduleMapping.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index c1f38ec50f..92de312f50 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -39,7 +39,7 @@ function Split-Docs { } # Load the JSON content from the mapping file - $moduleMapping = Get-Content -Path $MappingFilePath | ConvertFrom-Json + $moduleMapping = Get-Content -Path $MappingFilePath | ConvertFrom-Json -AsHashTable # Ensure the root documentation directory exists, create if it doesn't if (-not (Test-Path -Path $TargetRootDirectory -PathType Container)) { diff --git a/module/Entra/config/moduleMapping.json b/module/Entra/config/moduleMapping.json index d041ba6a9f..99f9b4c37f 100644 --- a/module/Entra/config/moduleMapping.json +++ b/module/Entra/config/moduleMapping.json @@ -215,6 +215,7 @@ "Set-EntraUserThumbnailPhoto": "Users", "Update-EntraSignedInUserPassword": "Users", "Reset-EntraStrongAuthenticationMethodByUpn": "Authentication", + "Get-EntraDirSyncfeature": "DirectoryManagement", "Get-EntraAttributeSet": "DirectoryManagement", "New-EntraAttributeSet": "DirectoryManagement", "Set-EntraAttributeSet": "DirectoryManagement", @@ -259,5 +260,5 @@ "Remove-EntraServicePrincipalAppRoleAssignment": "Applications", "Set-EntraDirectoryRoleDefinition": "Governance", "Update-EntraUserFromFederated": "Users", - "Get-EntraDomainServiceConfiguration":"DirectoryManagement" + "Get-EntraDomainServiceConfigurationRecord":"DirectoryManagement" } \ No newline at end of file From 515165639d7936e32abf4e424d727a3e04d2a1f2 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:51:18 +0300 Subject: [PATCH 061/124] Split Files --- .../Add-EntraApplicationOwner.ps1 | 81 ++ ...cipalDelegatedPermissionClassification.ps1 | 105 +++ .../Add-EntraServicePrincipalOwner.ps1 | 93 ++ .../Enable-EntraAzureADAliases.ps1 | 96 +++ .../Applications/Get-EntraApplication.ps1 | 162 ++++ .../Get-EntraApplicationExtensionProperty.ps1 | 90 ++ .../Get-EntraApplicationKeyCredential.ps1 | 18 + .../Applications/Get-EntraApplicationLogo.ps1 | 56 ++ .../Get-EntraApplicationOwner.ps1 | 70 ++ ...Get-EntraApplicationPasswordCredential.ps1 | 34 + .../Get-EntraApplicationServiceEndpoint.ps1 | 107 +++ .../Get-EntraApplicationTemplate.ps1 | 76 ++ .../Get-EntraDeletedApplication.ps1 | 145 ++++ .../Get-EntraServicePrincipal.ps1 | 128 +++ ...EntraServicePrincipalAppRoleAssignedTo.ps1 | 107 +++ ...EntraServicePrincipalAppRoleAssignment.ps1 | 107 +++ ...Get-EntraServicePrincipalCreatedObject.ps1 | 107 +++ ...cipalDelegatedPermissionClassification.ps1 | 109 +++ ...Get-EntraServicePrincipalKeyCredential.ps1 | 23 + .../Get-EntraServicePrincipalMembership.ps1 | 108 +++ ...aServicePrincipalOAuth2PermissionGrant.ps1 | 107 +++ .../Get-EntraServicePrincipalOwnedObject.ps1 | 108 +++ .../Get-EntraServicePrincipalOwner.ps1 | 107 +++ ...ntraServicePrincipalPasswordCredential.ps1 | 23 + .../Get-EntraUnsupportedCommand.ps1 | 8 + .../Applications/New-EntraApplication.ps1 | 286 ++++++ .../New-EntraApplicationExtensionProperty.ps1 | 105 +++ ...ntraApplicationFromApplicationTemplate.ps1 | 50 ++ .../Applications/New-EntraApplicationKey.ps1 | 105 +++ .../New-EntraApplicationKeyCredential.ps1 | 126 +++ .../New-EntraApplicationPassword.ps1 | 100 +++ ...New-EntraApplicationPasswordCredential.ps1 | 103 +++ .../Applications/New-EntraCustomHeaders.ps1 | 31 + .../New-EntraServicePrincipal.ps1 | 229 +++++ ...EntraServicePrincipalAppRoleAssignment.ps1 | 105 +++ ...ntraServicePrincipalPasswordCredential.ps1 | 37 + .../Applications/Remove-EntraApplication.ps1 | 84 ++ ...move-EntraApplicationExtensionProperty.ps1 | 91 ++ .../Remove-EntraApplicationKey.ps1 | 98 +++ .../Remove-EntraApplicationKeyCredential.ps1 | 91 ++ .../Remove-EntraApplicationOwner.ps1 | 91 ++ .../Remove-EntraApplicationPassword.ps1 | 91 ++ ...ove-EntraApplicationPasswordCredential.ps1 | 91 ++ ...move-EntraApplicationVerifiedPublisher.ps1 | 84 ++ .../Remove-EntraDeletedApplication.ps1 | 84 ++ .../Remove-EntraDeletedDirectoryObject.ps1 | 28 + .../Remove-EntraServicePrincipal.ps1 | 84 ++ ...EntraServicePrincipalAppRoleAssignment.ps1 | 91 ++ ...cipalDelegatedPermissionClassification.ps1 | 21 + ...ove-EntraServicePrincipalKeyCredential.ps1 | 91 ++ .../Remove-EntraServicePrincipalOwner.ps1 | 90 ++ ...ntraServicePrincipalPasswordCredential.ps1 | 20 + .../Restore-EntraDeletedApplication.ps1 | 104 +++ ...ntraGroupIdsServicePrincipalIsMemberOf.ps1 | 77 ++ .../Applications/Set-EntraApplication.ps1 | 305 +++++++ .../Applications/Set-EntraApplicationLogo.ps1 | 59 ++ .../Set-EntraApplicationVerifiedPublisher.ps1 | 91 ++ .../Set-EntraServicePrincipal.ps1 | 169 ++++ .../Authentication/Add-EntraEnvironment.ps1 | 80 ++ .../Authentication/Connect-Entra.ps1 | 172 ++++ .../Authentication/Disconnect-Entra.ps1 | 10 + .../Enable-EntraAzureADAliases.ps1 | 43 + .../Authentication/Find-EntraPermission.ps1 | 154 ++++ .../Authentication/Get-EntraContext.ps1 | 72 ++ .../Authentication/Get-EntraEnvironment.ps1 | 66 ++ .../Get-EntraUnsupportedCommand.ps1 | 8 + .../Authentication/New-EntraCustomHeaders.ps1 | 31 + ...t-EntraStrongAuthenticationMethodByUpn.ps1 | 58 ++ ...evoke-EntraSignedInUserAllRefreshToken.ps1 | 25 + .../Revoke-EntraUserAllRefreshToken.ps1 | 84 ++ .../Add-EntraAdministrativeUnitMember.ps1 | 37 + ...ecurityAttributeDefinitionAllowedValue.ps1 | 51 ++ .../Add-EntraDeviceRegisteredOwner.ps1 | 93 ++ .../Add-EntraDeviceRegisteredUser.ps1 | 93 ++ .../Add-EntraDirectoryRoleMember.ps1 | 93 ++ .../Add-EntraScopedRoleMembership.ps1 | 73 ++ .../Confirm-EntraDomain.ps1 | 91 ++ .../Enable-EntraAzureADAliases.ps1 | 83 ++ .../Enable-EntraDirectoryRole.ps1 | 84 ++ .../Get-EntraAccountSku.ps1 | 73 ++ .../Get-EntraAdministrativeUnit.ps1 | 90 ++ .../Get-EntraAdministrativeUnitMember.ps1 | 89 ++ .../Get-EntraAttributeSet.ps1 | 45 + .../DirectoryManagement/Get-EntraContact.ps1 | 121 +++ .../Get-EntraContactDirectReport.ps1 | 107 +++ .../Get-EntraContactManager.ps1 | 90 ++ .../Get-EntraContactMembership.ps1 | 108 +++ .../DirectoryManagement/Get-EntraContract.ps1 | 119 +++ ...EntraCustomSecurityAttributeDefinition.ps1 | 46 + ...ecurityAttributeDefinitionAllowedValue.ps1 | 54 ++ .../Get-EntraDeletedDirectoryObject.ps1 | 91 ++ .../DirectoryManagement/Get-EntraDevice.ps1 | 138 +++ .../Get-EntraDeviceRegisteredOwner.ps1 | 79 ++ .../Get-EntraDeviceRegisteredUser.ps1 | 79 ++ .../Get-EntraDirSyncConfiguration.ps1 | 71 ++ .../Get-EntraDirSyncfeature.ps1 | 89 ++ ...ctoryObjectOnPremisesProvisioningError.ps1 | 39 + .../Get-EntraDirectoryRole.ps1 | 102 +++ .../Get-EntraDirectoryRoleMember.ps1 | 61 ++ .../Get-EntraDirectoryRoleTemplate.ps1 | 83 ++ .../DirectoryManagement/Get-EntraDomain.ps1 | 93 ++ .../Get-EntraDomainFederationSettings.ps1 | 89 ++ .../Get-EntraDomainNameReference.ps1 | 60 ++ ...-EntraDomainServiceConfigurationRecord.ps1 | 92 ++ .../Get-EntraDomainVerificationDnsRecord.ps1 | 92 ++ .../Get-EntraExtensionProperty.ps1 | 88 ++ .../Get-EntraFederationProperty.ps1 | 78 ++ .../Get-EntraObjectByObjectId.ps1 | 61 ++ .../Get-EntraPartnerInformation.ps1 | 39 + .../Get-EntraPasswordPolicy.ps1 | 71 ++ .../Get-EntraScopedRoleMembership.ps1 | 68 ++ .../Get-EntraSubscribedSku.ps1 | 88 ++ .../Get-EntraTenantDetail.ps1 | 102 +++ .../Get-EntraUnsupportedCommand.ps1 | 8 + .../New-EntraAdministrativeUnit.ps1 | 51 ++ .../New-EntraAttributeSet.ps1 | 53 ++ .../New-EntraCustomHeaders.ps1 | 31 + ...EntraCustomSecurityAttributeDefinition.ps1 | 85 ++ .../DirectoryManagement/New-EntraDevice.ps1 | 182 ++++ .../DirectoryManagement/New-EntraDomain.ps1 | 106 +++ .../Remove-EntraAdministrativeUnit.ps1 | 37 + .../Remove-EntraAdministrativeUnitMember.ps1 | 43 + .../Remove-EntraContact.ps1 | 84 ++ .../Remove-EntraDevice.ps1 | 84 ++ .../Remove-EntraDeviceRegisteredOwner.ps1 | 91 ++ .../Remove-EntraDeviceRegisteredUser.ps1 | 91 ++ .../Remove-EntraDirectoryRoleMember.ps1 | 91 ++ .../Remove-EntraDomain.ps1 | 84 ++ .../Remove-EntraScopedRoleMembership.ps1 | 43 + .../Set-EntraAdministrativeUnit.ps1 | 50 ++ .../Set-EntraAttributeSet.ps1 | 45 + ...EntraCustomSecurityAttributeDefinition.ps1 | 50 ++ ...ecurityAttributeDefinitionAllowedValue.ps1 | 46 + .../DirectoryManagement/Set-EntraDevice.ps1 | 185 ++++ .../Set-EntraDirSyncConfiguration.ps1 | 104 +++ .../Set-EntraDirSyncEnabled.ps1 | 48 ++ .../Set-EntraDirSyncFeature.ps1 | 103 +++ .../DirectoryManagement/Set-EntraDomain.ps1 | 105 +++ .../Set-EntraDomainFederationSettings.ps1 | 130 +++ .../Set-EntraPartnerInformation.ps1 | 67 ++ .../Set-EntraTenantDetail.ps1 | 101 +++ .../Enable-EntraAzureADAlias.ps1 | 236 +++++ .../Governance/Enable-EntraAzureADAliases.ps1 | 53 ++ .../Get-EntraDirectoryRoleAssignment.ps1 | 126 +++ .../Get-EntraDirectoryRoleDefinition.ps1 | 125 +++ .../Get-EntraUnsupportedCommand.ps1 | 8 + .../Governance/New-EntraCustomHeaders.ps1 | 31 + .../New-EntraDirectoryRoleAssignment.ps1 | 98 +++ .../New-EntraDirectoryRoleDefinition.ps1 | 132 +++ .../Remove-EntraDirectoryRoleAssignment.ps1 | 84 ++ .../Remove-EntraDirectoryRoleDefinition.ps1 | 84 ++ .../Set-EntraDirectoryRoleDefinition.ps1 | 143 +++ .../Groups/Add-EntraGroupMember.ps1 | 91 ++ .../Groups/Add-EntraGroupOwner.ps1 | 93 ++ .../Groups/Add-EntraLifecyclePolicyGroup.ps1 | 91 ++ .../Groups/Enable-EntraAzureADAliases.ps1 | 65 ++ .../Groups/Get-EntraDeletedGroup.ps1 | 128 +++ .../Groups/Get-EntraGroup.ps1 | 128 +++ .../Get-EntraGroupAppRoleAssignment.ps1 | 107 +++ .../Groups/Get-EntraGroupLifecyclePolicy.ps1 | 90 ++ .../Groups/Get-EntraGroupMember.ps1 | 134 +++ .../Groups/Get-EntraGroupOwner.ps1 | 70 ++ .../Groups/Get-EntraGroupPermissionGrant.ps1 | 90 ++ .../Groups/Get-EntraLifecyclePolicyGroup.ps1 | 90 ++ .../Groups/Get-EntraObjectSetting.ps1 | 101 +++ .../Groups/Get-EntraUnsupportedCommand.ps1 | 8 + .../Groups/New-EntraCustomHeaders.ps1 | 31 + .../Groups/New-EntraGroup.ps1 | 133 +++ .../New-EntraGroupAppRoleAssignment.ps1 | 105 +++ .../Groups/New-EntraGroupLifecyclePolicy.ps1 | 98 +++ .../Groups/Remove-EntraGroup.ps1 | 84 ++ .../Remove-EntraGroupAppRoleAssignment.ps1 | 91 ++ .../Remove-EntraGroupLifecyclePolicy.ps1 | 84 ++ .../Groups/Remove-EntraGroupMember.ps1 | 91 ++ .../Groups/Remove-EntraGroupOwner.ps1 | 91 ++ .../Remove-EntraLifecyclePolicyGroup.ps1 | 91 ++ .../Groups/Reset-EntraLifeCycleGroup.ps1 | 84 ++ .../Select-EntraGroupIdsContactIsMemberOf.ps1 | 77 ++ .../Select-EntraGroupIdsGroupIsMemberOf.ps1 | 94 ++ .../Select-EntraGroupIdsUserIsMemberOf.ps1 | 77 ++ .../Groups/Set-EntraGroup.ps1 | 140 +++ .../Groups/Set-EntraGroupLifecyclePolicy.ps1 | 105 +++ .../Enable-EntraAzureADAliases.ps1 | 40 + .../Get-EntraUnsupportedCommand.ps1 | 8 + .../Invitations/New-EntraCustomHeaders.ps1 | 31 + .../Invitations/New-EntraInvitation.ps1 | 85 ++ .../Migration/Enable-EntraAzureADAliases.ps1 | 39 + .../Migration/Get-EntraUnsupportedCommand.ps1 | 8 + .../Migration/New-EntraCustomHeaders.ps1 | 31 + .../Migration/Test-EntraScript.ps1 | 139 +++ .../Reports/Enable-EntraAzureADAliases.ps1 | 41 + .../Reports/Get-EntraAuditDirectoryLog.ps1 | 83 ++ .../Reports/Get-EntraAuditSignInLog.ps1 | 91 ++ .../Reports/Get-EntraUnsupportedCommand.ps1 | 8 + .../Reports/New-EntraCustomHeaders.ps1 | 31 + .../SignIns/Enable-EntraAzureADAliases.ps1 | 66 ++ .../SignIns/Get-EntraAuthorizationPolicy.ps1 | 55 ++ .../Get-EntraConditionalAccessPolicy.ps1 | 90 ++ .../SignIns/Get-EntraFeatureRolloutPolicy.ps1 | 82 ++ .../SignIns/Get-EntraIdentityProvider.ps1 | 93 ++ .../SignIns/Get-EntraNamedLocationPolicy.ps1 | 94 ++ .../Get-EntraOAuth2PermissionGrant.ps1 | 100 +++ .../Get-EntraPermissionGrantConditionSet.ps1 | 101 +++ .../Get-EntraPermissionGrantPolicy.ps1 | 90 ++ .../SignIns/Get-EntraPolicy.ps1 | 90 ++ .../Get-EntraTrustedCertificateAuthority.ps1 | 113 +++ .../SignIns/Get-EntraUnsupportedCommand.ps1 | 8 + .../New-EntraConditionalAccessPolicy.ps1 | 160 ++++ .../SignIns/New-EntraCustomHeaders.ps1 | 31 + .../SignIns/New-EntraFeatureRolloutPolicy.ps1 | 71 ++ .../SignIns/New-EntraIdentityProvider.ps1 | 109 +++ .../SignIns/New-EntraNamedLocationPolicy.ps1 | 137 +++ .../New-EntraOauth2PermissionGrant.ps1 | 68 ++ .../New-EntraPermissionGrantConditionSet.ps1 | 149 ++++ .../New-EntraPermissionGrantPolicy.ps1 | 98 +++ .../SignIns/New-EntraPolicy.ps1 | 94 ++ .../New-EntraTrustedCertificateAuthority.ps1 | 75 ++ .../Remove-EntraConditionalAccessPolicy.ps1 | 84 ++ .../Remove-EntraFeatureRolloutPolicy.ps1 | 27 + ...traFeatureRolloutPolicyDirectoryObject.ps1 | 29 + .../SignIns/Remove-EntraIdentityProvider.ps1 | 84 ++ .../Remove-EntraNamedLocationPolicy.ps1 | 84 ++ .../Remove-EntraOAuth2PermissionGrant.ps1 | 84 ++ ...emove-EntraPermissionGrantConditionSet.ps1 | 98 +++ .../Remove-EntraPermissionGrantPolicy.ps1 | 84 ++ .../SignIns/Remove-EntraPolicy.ps1 | 44 + ...emove-EntraTrustedCertificateAuthority.ps1 | 67 ++ .../SignIns/Set-EntraAuthorizationPolicy.ps1 | 134 +++ .../Set-EntraConditionalAccessPolicy.ps1 | 197 +++++ .../SignIns/Set-EntraFeatureRolloutPolicy.ps1 | 61 ++ .../SignIns/Set-EntraIdentityProvider.ps1 | 105 +++ .../SignIns/Set-EntraNamedLocationPolicy.ps1 | 135 +++ .../Set-EntraPermissionGrantConditionSet.ps1 | 154 ++++ .../Set-EntraPermissionGrantPolicy.ps1 | 98 +++ .../SignIns/Set-EntraPolicy.ps1 | 103 +++ .../Set-EntraTrustedCertificateAuthority.ps1 | 81 ++ .../Users/Enable-EntraAzureADAliases.ps1 | 65 ++ .../Users/Get-EntraUnsupportedCommand.ps1 | 8 + .../Users/Get-EntraUser.ps1 | 132 +++ .../Users/Get-EntraUserAppRoleAssignment.ps1 | 107 +++ .../Users/Get-EntraUserCreatedObject.ps1 | 120 +++ .../Users/Get-EntraUserDirectReport.ps1 | 79 ++ .../Users/Get-EntraUserExtension.ps1 | 43 + .../Users/Get-EntraUserLicenseDetail.ps1 | 90 ++ .../Users/Get-EntraUserManager.ps1 | 60 ++ .../Users/Get-EntraUserMembership.ps1 | 108 +++ .../Get-EntraUserOAuth2PermissionGrant.ps1 | 107 +++ .../Users/Get-EntraUserOwnedDevice.ps1 | 102 +++ .../Users/Get-EntraUserOwnedObject.ps1 | 81 ++ .../Users/Get-EntraUserRegisteredDevice.ps1 | 102 +++ .../Users/Get-EntraUserThumbnailPhoto.ps1 | 111 +++ .../Users/New-EntraCustomHeaders.ps1 | 31 + .../Users/New-EntraUser.ps1 | 286 ++++++ .../Users/New-EntraUserAppRoleAssignment.ps1 | 105 +++ .../Users/Remove-EntraUser.ps1 | 84 ++ .../Remove-EntraUserAppRoleAssignment.ps1 | 91 ++ .../Users/Remove-EntraUserExtension.ps1 | 99 +++ .../Users/Remove-EntraUserManager.ps1 | 84 ++ .../Users/Set-EntraUser.ps1 | 328 +++++++ .../Users/Set-EntraUserExtension.ps1 | 106 +++ .../Users/Set-EntraUserLicense.ps1 | 52 ++ .../Users/Set-EntraUserManager.ps1 | 93 ++ .../Users/Set-EntraUserPassword.ps1 | 96 +++ .../Users/Set-EntraUserThumbnailPhoto.ps1 | 108 +++ .../Update-EntraSignedInUserPassword.ps1 | 49 ++ .../Users/Update-EntraUserFromFederated.ps1 | 82 ++ .../Applications/Add-EntraApplicationOwner.md | 102 +++ ...ncipalDelegatedPermissionClassification.md | 163 ++++ .../Add-EntraServicePrincipalOwner.md | 109 +++ .../Applications/Get-EntraApplication.md | 276 ++++++ .../Get-EntraApplicationExtensionProperty.md | 106 +++ .../Get-EntraApplicationKeyCredential.md | 89 ++ .../Applications/Get-EntraApplicationLogo.md | 136 +++ .../Applications/Get-EntraApplicationOwner.md | 212 +++++ .../Get-EntraApplicationPasswordCredential.md | 104 +++ .../Get-EntraApplicationServiceEndpoint.md | 167 ++++ .../Get-EntraApplicationTemplate.md | 173 ++++ .../Get-EntraDeletedApplication.md | 257 ++++++ .../Applications/Get-EntraServicePrincipal.md | 369 ++++++++ ...-EntraServicePrincipalAppRoleAssignedTo.md | 188 ++++ ...-EntraServicePrincipalAppRoleAssignment.md | 192 +++++ .../Get-EntraServicePrincipalCreatedObject.md | 155 ++++ ...ncipalDelegatedPermissionClassification.md | 204 +++++ .../Get-EntraServicePrincipalKeyCredential.md | 91 ++ .../Get-EntraServicePrincipalMembership.md | 178 ++++ ...raServicePrincipalOAuth2PermissionGrant.md | 169 ++++ .../Get-EntraServicePrincipalOwnedObject.md | 195 +++++ .../Get-EntraServicePrincipalOwner.md | 217 +++++ ...EntraServicePrincipalPasswordCredential.md | 93 ++ .../Applications/New-EntraApplication.md | 490 +++++++++++ .../New-EntraApplicationExtensionProperty.md | 215 +++++ ...EntraApplicationFromApplicationTemplate.md | 111 +++ .../Applications/New-EntraApplicationKey.md | 155 ++++ .../New-EntraApplicationKeyCredential.md | 258 ++++++ .../New-EntraApplicationPassword.md | 121 +++ .../New-EntraApplicationPasswordCredential.md | 215 +++++ .../Applications/New-EntraServicePrincipal.md | 406 +++++++++ ...-EntraServicePrincipalAppRoleAssignment.md | 230 +++++ .../New-EntraServicePrincipalKeyCredential.md | 182 ++++ ...EntraServicePrincipalPasswordCredential.md | 168 ++++ .../Applications/Remove-EntraApplication.md | 84 ++ ...emove-EntraApplicationExtensionProperty.md | 106 +++ .../Remove-EntraApplicationKey.md | 133 +++ .../Remove-EntraApplicationKeyCredential.md | 108 +++ .../Remove-EntraApplicationOwner.md | 106 +++ .../Remove-EntraApplicationPassword.md | 106 +++ ...move-EntraApplicationPasswordCredential.md | 104 +++ ...emove-EntraApplicationVerifiedPublisher.md | 83 ++ .../Remove-EntraDeletedApplication.md | 92 ++ .../Remove-EntraDeletedDirectoryObject.md | 96 +++ .../Remove-EntraServicePrincipal.md | 86 ++ ...-EntraServicePrincipalAppRoleAssignment.md | 117 +++ ...ncipalDelegatedPermissionClassification.md | 105 +++ ...move-EntraServicePrincipalKeyCredential.md | 104 +++ .../Remove-EntraServicePrincipalOwner.md | 107 +++ ...EntraServicePrincipalPasswordCredential.md | 104 +++ .../Restore-EntraDeletedApplication.md | 127 +++ ...EntraGroupIdsServicePrincipalIsMemberOf.md | 110 +++ .../Applications/Set-EntraApplication.md | 496 +++++++++++ .../Applications/Set-EntraApplicationLogo.md | 126 +++ .../Set-EntraApplicationVerifiedPublisher.md | 111 +++ .../Applications/Set-EntraServicePrincipal.md | 440 ++++++++++ .../Authentication/Add-EntraEnvironment.md | 119 +++ .../Authentication/Connect-Entra.md | 583 +++++++++++++ .../Authentication/Disconnect-Entra.md | 78 ++ .../Authentication/Find-EntraPermission.md | 239 +++++ .../Authentication/Get-EntraContext.md | 130 +++ .../Authentication/Get-EntraEnvironment.md | 108 +++ ...et-EntraStrongAuthenticationMethodByUpn.md | 79 ++ ...Revoke-EntraSignedInUserAllRefreshToken.md | 73 ++ .../Revoke-EntraUserAllRefreshToken.md | 90 ++ .../Add-EntraAdministrativeUnitMember.md | 111 +++ ...SecurityAttributeDefinitionAllowedValue.md | 139 +++ .../Add-EntraDeviceRegisteredOwner.md | 107 +++ .../Add-EntraDeviceRegisteredUser.md | 112 +++ .../Add-EntraDirectoryRoleMember.md | 104 +++ .../Add-EntraScopedRoleMembership.md | 135 +++ .../Confirm-EntraDomain.md | 112 +++ .../Enable-EntraDirectoryRole.md | 96 +++ .../Get-CrossCloudVerificationCode.md | 72 ++ .../Get-EntraAccountSku.md | 117 +++ .../Get-EntraAdministrativeUnit.md | 237 +++++ .../Get-EntraAdministrativeUnitMember.md | 193 +++++ .../Get-EntraAttributeSet.md | 143 +++ .../DirectoryManagement/Get-EntraContact.md | 236 +++++ .../Get-EntraContactDirectReport.md | 159 ++++ .../Get-EntraContactManager.md | 98 +++ .../Get-EntraContactMembership.md | 175 ++++ .../Get-EntraContactThumbnailPhoto.md | 150 ++++ .../DirectoryManagement/Get-EntraContract.md | 195 +++++ ...-EntraCustomSecurityAttributeDefinition.md | 142 +++ ...SecurityAttributeDefinitionAllowedValue.md | 187 ++++ .../Get-EntraDeletedDirectoryObject.md | 122 +++ .../DirectoryManagement/Get-EntraDevice.md | 271 ++++++ .../Get-EntraDeviceRegisteredOwner.md | 196 +++++ .../Get-EntraDeviceRegisteredUser.md | 180 ++++ .../Get-EntraDirSyncConfiguration.md | 106 +++ .../Get-EntraDirSyncFeature.md | 153 ++++ ...ectoryObjectOnPremisesProvisioningError.md | 104 +++ .../Get-EntraDirectoryRole.md | 181 ++++ .../Get-EntraDirectoryRoleMember.md | 106 +++ .../Get-EntraDirectoryRoleTemplate.md | 101 +++ .../DirectoryManagement/Get-EntraDomain.md | 147 ++++ .../Get-EntraDomainFederationSettings.md | 129 +++ .../Get-EntraDomainNameReference.md | 113 +++ ...t-EntraDomainServiceConfigurationRecord.md | 112 +++ .../Get-EntraDomainVerificationDnsRecord.md | 112 +++ .../Get-EntraExtensionProperty.md | 97 +++ .../Get-EntraFederationProperty.md | 90 ++ .../Get-EntraObjectByObjectId.md | 142 +++ .../Get-EntraPartnerInformation.md | 135 +++ .../Get-EntraPasswordPolicy.md | 101 +++ .../Get-EntraScopedRoleMembership.md | 145 ++++ .../Get-EntraSubscribedSku.md | 227 +++++ .../Get-EntraTenantDetail.md | 167 ++++ .../New-EntraAdministrativeUnit.md | 133 +++ .../New-EntraAttributeSet.md | 136 +++ ...-EntraCustomSecurityAttributeDefinition.md | 234 +++++ .../DirectoryManagement/New-EntraDevice.md | 339 ++++++++ .../DirectoryManagement/New-EntraDomain.md | 158 ++++ .../Remove-EntraAdministrativeUnit.md | 87 ++ .../Remove-EntraAdministrativeUnitMember.md | 108 +++ .../Remove-EntraContact.md | 79 ++ .../DirectoryManagement/Remove-EntraDevice.md | 85 ++ .../Remove-EntraDeviceRegisteredOwner.md | 101 +++ .../Remove-EntraDeviceRegisteredUser.md | 99 +++ .../Remove-EntraDirectoryRoleMember.md | 106 +++ .../DirectoryManagement/Remove-EntraDomain.md | 91 ++ .../Remove-EntraExternalDomainFederation.md | 79 ++ .../Remove-EntraScopedRoleMembership.md | 106 +++ .../Restore-EntraDeletedDirectoryObject.md | 154 ++++ .../Set-EntraAdministrativeUnit.md | 145 ++++ .../Set-EntraAttributeSet.md | 147 ++++ ...-EntraCustomSecurityAttributeDefinition.md | 149 ++++ ...SecurityAttributeDefinitionAllowedValue.md | 126 +++ .../DirectoryManagement/Set-EntraDevice.md | 387 +++++++++ .../Set-EntraDirSyncConfiguration.md | 144 ++++ .../Set-EntraDirSyncEnabled.md | 140 +++ .../Set-EntraDirSyncFeature.md | 187 ++++ .../DirectoryManagement/Set-EntraDomain.md | 135 +++ .../Set-EntraDomainFederationSettings.md | 290 +++++++ .../Set-EntraPartnerInformation.md | 242 ++++++ .../Set-EntraTenantDetail.md | 216 +++++ .../Get-EntraDirectoryRoleAssignment.md | 282 ++++++ .../Get-EntraDirectoryRoleDefinition.md | 273 ++++++ .../New-EntraDirectoryRoleAssignment.md | 136 +++ .../New-EntraDirectoryRoleDefinition.md | 330 +++++++ .../Remove-EntraDirectoryRoleAssignment.md | 88 ++ .../Remove-EntraDirectoryRoleDefinition.md | 93 ++ .../Set-EntraDirectoryRoleDefinition.md | 267 ++++++ .../Groups/Add-EntraGroupMember.md | 102 +++ .../Groups/Add-EntraGroupOwner.md | 108 +++ .../Groups/Add-EntraLifecyclePolicyGroup.md | 111 +++ .../Groups/Get-EntraDeletedGroup.md | 293 +++++++ .../Groups/Get-EntraGroup.md | 309 +++++++ .../Groups/Get-EntraGroupAppRoleAssignment.md | 181 ++++ .../Groups/Get-EntraGroupLifecyclePolicy.md | 134 +++ .../Groups/Get-EntraGroupMember.md | 214 +++++ .../Groups/Get-EntraGroupOwner.md | 189 ++++ .../Groups/Get-EntraGroupPermissionGrant.md | 106 +++ .../Groups/Get-EntraLifecyclePolicyGroup.md | 105 +++ .../Groups/Get-EntraObjectSetting.md | 252 ++++++ .../Groups/New-EntraGroup.md | 346 ++++++++ .../Groups/New-EntraGroupAppRoleAssignment.md | 151 ++++ .../Groups/New-EntraGroupLifecyclePolicy.md | 138 +++ .../Groups/Remove-EntraGroup.md | 93 ++ .../Remove-EntraGroupAppRoleAssignment.md | 99 +++ .../Remove-EntraGroupLifecyclePolicy.md | 87 ++ .../Groups/Remove-EntraGroupMember.md | 102 +++ .../Groups/Remove-EntraGroupOwner.md | 101 +++ .../Remove-EntraLifecyclePolicyGroup.md | 117 +++ .../Groups/Reset-EntraLifeCycleGroup.md | 84 ++ .../Select-EntraGroupIdsContactIsMemberOf.md | 99 +++ .../Select-EntraGroupIdsGroupIsMemberOf.md | 101 +++ .../Select-EntraGroupIdsUserIsMemberOf.md | 110 +++ .../Groups/Set-EntraGroup.md | 313 +++++++ .../Groups/Set-EntraGroupLifecyclePolicy.md | 160 ++++ .../Invitations/New-EntraInvitation.md | 291 +++++++ .../Migration/Enable-EntraAzureADAlias.md | 57 ++ .../Migration/Test-EntraScript.md | 120 +++ .../Reports/Get-EntraAuditDirectoryLog.md | 179 ++++ .../Reports/Get-EntraAuditSignInLog.md | 213 +++++ .../SignIns/Get-EntraAuthorizationPolicy.md | 156 ++++ .../Get-EntraConditionalAccessPolicy.md | 135 +++ .../SignIns/Get-EntraFeatureRolloutPolicy.md | 212 +++++ .../SignIns/Get-EntraIdentityProvider.md | 140 +++ .../SignIns/Get-EntraNamedLocationPolicy.md | 138 +++ .../SignIns/Get-EntraOAuth2PermissionGrant.md | 190 ++++ .../Get-EntraPermissionGrantConditionSet.md | 214 +++++ .../SignIns/Get-EntraPermissionGrantPolicy.md | 134 +++ .../SignIns/Get-EntraPolicy.md | 196 +++++ .../Get-EntraTrustedCertificateAuthority.md | 186 ++++ .../New-EntraConditionalAccessPolicy.md | 278 ++++++ .../SignIns/New-EntraFeatureRolloutPolicy.md | 224 +++++ .../SignIns/New-EntraIdentityProvider.md | 170 ++++ .../SignIns/New-EntraNamedLocationPolicy.md | 236 +++++ .../SignIns/New-EntraOauth2PermissionGrant.md | 188 ++++ .../New-EntraPermissionGrantConditionSet.md | 372 ++++++++ .../SignIns/New-EntraPermissionGrantPolicy.md | 133 +++ .../SignIns/New-EntraPolicy.md | 254 ++++++ .../New-EntraTrustedCertificateAuthority.md | 98 +++ .../Remove-EntraConditionalAccessPolicy.md | 87 ++ .../Remove-EntraFeatureRolloutPolicy.md | 87 ++ ...ntraFeatureRolloutPolicyDirectoryObject.md | 105 +++ .../SignIns/Remove-EntraIdentityProvider.md | 88 ++ .../Remove-EntraNamedLocationPolicy.md | 88 ++ .../Remove-EntraOAuth2PermissionGrant.md | 84 ++ ...Remove-EntraPermissionGrantConditionSet.md | 129 +++ .../Remove-EntraPermissionGrantPolicy.md | 85 ++ .../SignIns/Remove-EntraPolicy.md | 83 ++ ...Remove-EntraTrustedCertificateAuthority.md | 92 ++ .../SignIns/Set-EntraAuthorizationPolicy.md | 241 ++++++ .../Set-EntraConditionalAccessPolicy.md | 240 ++++++ .../SignIns/Set-EntraFeatureRolloutPolicy.md | 231 +++++ .../SignIns/Set-EntraIdentityProvider.md | 195 +++++ .../SignIns/Set-EntraNamedLocationPolicy.md | 258 ++++++ .../Set-EntraPermissionGrantConditionSet.md | 309 +++++++ .../SignIns/Set-EntraPermissionGrantPolicy.md | 143 +++ .../SignIns/Set-EntraPolicy.md | 211 +++++ .../Set-EntraTrustedCertificateAuthority.md | 92 ++ .../Users/Get-EntraUser.md | 426 +++++++++ .../Users/Get-EntraUserAppRoleAssignment.md | 184 ++++ .../Users/Get-EntraUserCreatedObject.md | 175 ++++ .../Users/Get-EntraUserDirectReport.md | 175 ++++ .../Users/Get-EntraUserExtension.md | 111 +++ .../Users/Get-EntraUserLicenseDetail.md | 105 +++ .../Users/Get-EntraUserManager.md | 142 +++ .../Users/Get-EntraUserMembership.md | 218 +++++ .../Get-EntraUserOAuth2PermissionGrant.md | 201 +++++ .../Users/Get-EntraUserOwnedDevice.md | 166 ++++ .../Users/Get-EntraUserOwnedObject.md | 208 +++++ .../Users/Get-EntraUserRegisteredDevice.md | 165 ++++ .../Users/Get-EntraUserThumbnailPhoto.md | 109 +++ .../Users/New-EntraUser.md | 816 ++++++++++++++++++ .../Users/New-EntraUserAppRoleAssignment.md | 209 +++++ .../Users/Remove-EntraUser.md | 88 ++ .../Remove-EntraUserAppRoleAssignment.md | 106 +++ .../Users/Remove-EntraUserExtension.md | 130 +++ .../Users/Remove-EntraUserManager.md | 82 ++ .../Users/Set-EntraUser.md | 677 +++++++++++++++ .../Users/Set-EntraUserExtension.md | 91 ++ .../Users/Set-EntraUserLicense.md | 209 +++++ .../Users/Set-EntraUserManager.md | 101 +++ .../Users/Set-EntraUserPassword.md | 164 ++++ .../Users/Set-EntraUserThumbnailPhoto.md | 130 +++ .../Users/Update-EntraSignedInUserPassword.md | 106 +++ .../Users/Update-EntraUserFromFederated.md | 105 +++ 507 files changed, 63375 insertions(+) create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncfeature.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 create mode 100644 module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 new file mode 100644 index 0000000000..756f8ae9a7 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraApplicationOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + $newOwner = @{} + + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $newOwner["@odata.id"] = "https://graph.microsoft.com/v1.0/directoryObjects/"+$PSBoundParameters["RefObjectId"] + $params["BodyParameter"] = $newOwner + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + New-MgApplicationOwnerByRef @params -Headers $customHeaders +} +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 new file mode 100644 index 0000000000..6594c093a2 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraServicePrincipalDelegatedPermissionClassification { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PermissionName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PermissionId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Classification"]) + { + $params["Classification"] = $PSBoundParameters["Classification"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PermissionName"]) + { + $params["PermissionName"] = $PSBoundParameters["PermissionName"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["PermissionId"]) + { + $params["PermissionId"] = $PSBoundParameters["PermissionId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgServicePrincipalDelegatedPermissionClassification @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 new file mode 100644 index 0000000000..4222af4eee --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraServicePrincipalOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgServicePrincipalOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..716d55060f --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,96 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraApplicationServiceEndpoint -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-EntraServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Remove-EntraServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-EntraServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 new file mode 100644 index 0000000000..3110847fa7 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 @@ -0,0 +1,162 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraApplication { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"; ApplicationId = "Id"} + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"`$_ : `$(`$params[`$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgApplication @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name InformationalUrls -Value Info + $propsToConvert = @( + 'AddIns','Logo','AppRoles','GroupMembershipClaims','IdentifierUris','Info', + 'IsDeviceOnlyAuthSupported','KeyCredentials','Oauth2RequirePostResponse','OptionalClaims', + 'ParentalControlSettings','PasswordCredentials','Api','PublicClient', + 'PublisherDomain','Web','RequiredResourceAccess','SignInAudience') + try { + foreach ($prop in $propsToConvert) { + if($prop -eq 'AppRoles'){ + $myAppRoles = New-Object System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.AppRole] + foreach ($appRole in $_.$prop) { + $hash = New-Object Microsoft.Open.AzureAD.Model.AppRole + foreach ($propertyName in $hash.psobject.Properties.Name) { + $hash.$propertyName = $appRole.$propertyName + } + $myAppRoles.Add($hash) + } + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($myAppRoles) -Force + } + else { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + catch {} + } + foreach ($credType in @('KeyCredentials', 'PasswordCredentials')) { + if ($null -ne $_.PSObject.Properties[$credType]) { + $_.$credType | ForEach-Object { + try { + if ($null -ne $_.EndDateTime -or $null -ne $_.StartDateTime) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name EndDate -Value $_.EndDateTime + Add-Member -InputObject $_ -MemberType NoteProperty -Name StartDate -Value $_.StartDateTime + $_.PSObject.Properties.Remove('EndDateTime') + $_.PSObject.Properties.Remove('StartDateTime') + } + } + catch {} + } + } + } + } + + $response +} +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 new file mode 100644 index 0000000000..0586f64c1d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraApplicationExtensionProperty { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgApplicationExtensionProperty @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 new file mode 100644 index 0000000000..263a3ffeed --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 @@ -0,0 +1,18 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraApplicationKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + (Get-MgApplication -Headers $customHeaders -ApplicationId $PSBoundParameters["ObjectId"]).KeyCredentials + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 new file mode 100644 index 0000000000..3f240e247e --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 @@ -0,0 +1,56 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraApplicationLogo { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $View, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FileName, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = 'https://graph.microsoft.com/v1.0/applications' + $Method = "GET" + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $URI = "$baseUri/$($params.ApplicationId)" + } + + if($null -ne $PSBoundParameters["FilePath"]){ + $params["FilePath"] = $PSBoundParameters["FilePath"] + + $imageExtensions = @(".jpg", ".jpeg", ".png", ".gif", ".bmp") + + if(-not (Test-Path $($params.FilePath) -PathType Leaf) -and $imageExtensions -notcontains [System.IO.Path]::GetExtension($($params.FilePath))){ + Write-Error -Message "Get-EntraApplicationLogo : FilePath is invalid" + break; + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $logoUrl = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).Info.logoUrl + + if($null -ne $logoUrl){ + try { + Invoke-WebRequest -Uri $logoUrl -OutFile $($params.FilePath) + } + catch { + + } + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 new file mode 100644 index 0000000000..3e5c528300 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraApplicationOwner { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $baseUri = 'https://graph.microsoft.com/v1.0/applications' + $properties = '$select=*' + $Method = "GET" + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $URI = "$baseUri/$($params.ApplicationId)/owners?$properties" + } + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.ApplicationId)/owners?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + $URI = "$baseUri/$($params.ApplicationId)/owners?`$top=$topCount&$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 new file mode 100644 index 0000000000..16f06fbeb4 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 @@ -0,0 +1,34 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraApplicationPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + # TODO : Invoke API and apply the correct Select query + + $response = (Get-MgApplication -Headers $customHeaders -ApplicationId $PSBoundParameters["ApplicationId"]).PasswordCredentials + + if($null -ne $PSBoundParameters["Property"]) + { + $response | Select-Object $PSBoundParameters["Property"] + } + else { + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 new file mode 100644 index 0000000000..0d26652059 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraApplicationServiceEndpoint { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalEndpoint @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 new file mode 100644 index 0000000000..6962a30f8c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraApplicationTemplate { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $uri = "https://graph.microsoft.com/v1.0/applicationTemplates" + $params["Method"] = "GET" + $params["Uri"] = $uri+'?$select=*' + + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $params["Uri"] = $uri+"?`$select=$($selectProperties)" + } + if(($PSBoundParameters.ContainsKey("Top") -and (-not $PSBoundParameters.ContainsKey("All"))) -or ($PSBoundParameters.ContainsKey("Top") -and $null -ne $PSBoundParameters["All"])) + { + $topCount = $PSBoundParameters["Top"] + $params["Uri"] += "&`$top=$topCount" + } + if($null -ne $PSBoundParameters["Filter"]) + { + $Filter = $PSBoundParameters["Filter"] + $f = '$' + 'Filter' + $params["Uri"] += "&$f=$Filter" + } + if((-not $PSBoundParameters.ContainsKey("Top")) -and (-not $PSBoundParameters.ContainsKey("All"))) + { + $params["Uri"] += "&`$top=100" + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["ApplicationTemplateId"] = $PSBoundParameters["Id"] + $params["Uri"] = $uri + "/$Id" + } + + $response = Invoke-GraphRequest -Uri $($params.Uri) -Method GET -Headers $customHeaders + + if($response.ContainsKey('value')){ + $response = $response.value + } + + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + $userList = @() + foreach ($res in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphApplicationTemplate + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 new file mode 100644 index 0000000000..0a6c5b8763 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 @@ -0,0 +1,145 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDeletedApplication { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDirectoryDeletedItemAsApplication @params -Headers $customHeaders + + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + $propsToConvert = @( + 'AddIns','AppRoles','GroupMembershipClaims','IdentifierUris','Info', + 'IsDeviceOnlyAuthSupported','KeyCredentials','OptionalClaims', + 'ParentalControlSettings','PasswordCredentials','Api','PublicClient', + 'PublisherDomain','Web','RequiredResourceAccess') + + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + + Add-Member -InputObject $_ -MemberType AliasProperty -Name AppLogoUrl -Value Logo + Add-Member -InputObject $_ -MemberType AliasProperty -Name InformationalUrls -Value Info + Add-Member -InputObject $_ -MemberType AliasProperty -Name HomePage -Value Web.HomePageUrl + Add-Member -InputObject $_ -MemberType AliasProperty -Name LogoutUrl -Value Web.LogoutUrl + Add-Member -InputObject $_ -MemberType AliasProperty -Name ReplyUrls -Value Web.RedirectUris + Add-Member -InputObject $_ -MemberType AliasProperty -Name KnownClientApplications -Value Api.KnownClientApplications + Add-Member -InputObject $_ -MemberType AliasProperty -Name PreAuthorizedApplications -Value Api.PreAuthorizedApplications + Add-Member -InputObject $_ -MemberType AliasProperty -Name Oauth2AllowImplicitFlow -Value Web.Oauth2AllowImplicitFlow + } + + } + + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 new file mode 100644 index 0000000000..4c53a2331e --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 @@ -0,0 +1,128 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipal { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipal @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 new file mode 100644 index 0000000000..c8ab41fa93 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalAppRoleAssignedTo { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 new file mode 100644 index 0000000000..75896d85c8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalAppRoleAssignedTo @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 new file mode 100644 index 0000000000..d5ebb04644 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalCreatedObject { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalCreatedObject @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 new file mode 100644 index 0000000000..086970fd94 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalDelegatedPermissionClassification { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalDelegatedPermissionClassification @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 new file mode 100644 index 0000000000..670eb8b46b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 @@ -0,0 +1,23 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $response = (Get-MgServicePrincipal -Headers $customHeaders -ServicePrincipalId $PSBoundParameters["ServicePrincipalId"]).KeyCredentials + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name StartDate -Value StartDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name EndDate -Value EndDateTime + } + } + $response +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 new file mode 100644 index 0000000000..bac598a209 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalMembership { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalTransitiveMemberOf @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 new file mode 100644 index 0000000000..96c754f0c2 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalOAuth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalOauth2PermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 new file mode 100644 index 0000000000..2b0c61fa37 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalOwnedObject { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalOwnedObject @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 new file mode 100644 index 0000000000..4ce9fe2f33 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalOwner { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgServicePrincipalOwner @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('appRoles','oauth2PermissionScopes') + try{ + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + }catch{} + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 new file mode 100644 index 0000000000..3438fe42cf --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 @@ -0,0 +1,23 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraServicePrincipalPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $response = (Get-MgServicePrincipal -Headers $customHeaders -ServicePrincipalId $PSBoundParameters["ServicePrincipalId"]).PasswordCredentials + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name StartDate -Value StartDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name EndDate -Value EndDateTime + } + } + $response +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 new file mode 100644 index 0000000000..04c3764bee --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 @@ -0,0 +1,286 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraApplication { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TokenEncryptionKeyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GroupMembershipClaims, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Tags, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.WebApplication] $Web, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $SignInAudience + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["ParentalControlSettings"]) + { + $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["ParentalControlSettings"] = $Value + } + if($null -ne $PSBoundParameters["RequiredResourceAccess"]) + { + $TmpValue = $PSBoundParameters["RequiredResourceAccess"] + $Value = $TmpValue | ConvertTo-Json + $params["RequiredResourceAccess"] = $Value + } + if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) + { + $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + } + if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + { + $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["IdentifierUris"]) + { + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + } + if($null -ne $PSBoundParameters["AppRoles"]) + { + $TmpValue = $PSBoundParameters["AppRoles"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $Temp = $v | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} + $a += $hash + } + + $Value = $a + $params["AppRoles"] = $Value + } + if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) + { + $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) + { + $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["Tags"]) + { + $params["Tags"] = $PSBoundParameters["Tags"] + } + if($null -ne $PSBoundParameters["PasswordCredentials"]) + { + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $Temp = $v | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} + $a += $hash + } + + $Value = $a + $params["PasswordCredentials"] = $Value + } + if($null -ne $PSBoundParameters["PublicClient"]) + { + $TmpValue = $PSBoundParameters["PublicClient"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["PublicClient"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["Api"]) + { + $TmpValue = $PSBoundParameters["Api"] + + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Api"] = $Value + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["Web"]) + { + $TmpValue = $PSBoundParameters["Web"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Web"] = $Value + } + if($null -ne $PSBoundParameters["OptionalClaims"]) + { + $TmpValue = $PSBoundParameters["OptionalClaims"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["OptionalClaims"] = $Value + } + if($null -ne $PSBoundParameters["InformationalUrl"]) + { + $TmpValue = $PSBoundParameters["InformationalUrl"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Info"] = $Value + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["AddIns"]) + { + $TmpValue = $PSBoundParameters["AddIns"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["AddIns"] = $Value + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["KeyCredentials"]) + { + $TmpValue = $PSBoundParameters["KeyCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDateTime + Key= $v.Key + StartDateTime= $v.StartDateTime + Type= $v.Type + Usage= $v.Usage + } + + $a += $hash + } + + $Value = $a + $params["KeyCredentials"] = $Value + } + if ($null -ne $PSBoundParameters["SignInAudience"]) + { + $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgApplication @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 new file mode 100644 index 0000000000..a1f8f9a7a5 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraApplicationExtensionProperty { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Name, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $TargetObjects, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DataType, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["Name"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["TargetObjects"]) + { + $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] + } + if ($null -ne $PSBoundParameters["DataType"]) + { + $params["DataType"] = $PSBoundParameters["DataType"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgApplicationExtensionProperty @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 new file mode 100644 index 0000000000..4ecda99cbe --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraApplicationFromApplicationTemplate { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DisplayName + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["Id"]) { + $params["ApplicationTemplateId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $body = @{ + displayName = $DisplayName + } + + $uri = "https://graph.microsoft.com/v1.0/applicationTemplates/$Id/instantiate" + $response = invoke-graphrequest -uri $uri -Headers $customHeaders -Body $body -Method POST | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $memberList = @() + foreach($data in $response){ + $memberType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphApplicationServicePrincipal + if (-not ($data -is [psobject])) { + $data = [pscustomobject]@{ Value = $data } + } + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $memberType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $memberList += $memberType + } + $memberList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 new file mode 100644 index 0000000000..29c18f2c2c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraApplicationKey { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Proof, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["PasswordCredential"]) + { + $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["KeyCredential"]) + { + $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["Proof"]) + { + $params["Proof"] = $PSBoundParameters["Proof"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Add-MgApplicationKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 new file mode 100644 index 0000000000..d806d8bb00 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraApplicationKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Value, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomKeyIdentifier, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $EndDate, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $StartDate + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Usage"]) + { + $params["Usage"] = $PSBoundParameters["Usage"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["Type"]) + { + $params["Type"] = $PSBoundParameters["Type"] + } + if ($null -ne $PSBoundParameters["Value"]) + { + $params["Value"] = $PSBoundParameters["Value"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) + { + $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["EndDate"]) + { + $params["EndDate"] = $PSBoundParameters["EndDate"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["StartDate"]) + { + $params["StartDate"] = $PSBoundParameters["StartDate"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Add-MgApplicationKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 new file mode 100644 index 0000000000..4513fbd479 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraApplicationPassword { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["PasswordCredential"]) + { + $TmpValue = $PSBoundParameters["PasswordCredential"] + $hash = @{} + $TmpValue.PSObject.Properties | ForEach-Object { + if ($_.Value) { + $hash[$_.Name] = $_.Value + } + } + + $Value = $hash + $params["PasswordCredential"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Add-MgApplicationPassword @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 new file mode 100644 index 0000000000..73e7a57a93 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraApplicationPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Value, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomKeyIdentifier, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $StartDate, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $EndDate + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $body=@{} + + if($null -ne $PSBoundParameters["StartDate"]) + { + $body["startDateTime"] = $PSBoundParameters["StartDate"] + } + if($null -ne $PSBoundParameters["EndDate"]) + { + $body["endDateTime"] = $PSBoundParameters["EndDate"] + } + if($null -ne $PSBoundParameters["CustomKeyIdentifier"]) + { + $body["displayName"] = $PSBoundParameters["CustomKeyIdentifier"] + } + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + $params["PasswordCredential"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Add-MgApplicationPassword @params -Headers $customHeaders + $response | ForEach-Object { + If($_.DisplayName){ + $Value = [System.Text.Encoding]::ASCII.GetBytes($_.DisplayName) + Add-Member -InputObject $_ -MemberType NoteProperty -Name CustomKeyIdentifier -Value $Value -Force + } + Add-Member -InputObject $_ -MemberType AliasProperty -Name Value -Value SecretText + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 new file mode 100644 index 0000000000..5a51fb5f03 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 @@ -0,0 +1,229 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraServicePrincipal { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ServicePrincipalType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ReplyUrls, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Tags, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PublisherName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ErrorUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $AlternativeNames, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Homepage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $LogoutUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $SamlMetadataUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ServicePrincipalType"]) + { + $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ReplyUrls"]) + { + $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) + { + $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $TmpValue = $PSBoundParameters["AccountEnabled"] + $Value = $null + + if (-not [bool]::TryParse($TmpValue, [ref]$Value)) { + throw 'Invalid input for AccountEnabled' + return + } + $params["AccountEnabled"] = $Value + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["Tags"]) + { + $params["Tags"] = $PSBoundParameters["Tags"] + } + if($null -ne $PSBoundParameters["PasswordCredentials"]) + { + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDate + SecretText= $v.Value + StartDateTime= $v.StartDate + } + + $a += $hash + } + $Value = $a + $params["PasswordCredentials"] = $Value + } + if ($null -ne $PSBoundParameters["PublisherName"]) + { + $params["PublisherName"] = $PSBoundParameters["PublisherName"] + } + if ($null -ne $PSBoundParameters["ErrorUrl"]) + { + $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["AlternativeNames"]) + { + $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["AppId"]) + { + $params["AppId"] = $PSBoundParameters["AppId"] + } + if ($null -ne $PSBoundParameters["Homepage"]) + { + $params["Homepage"] = $PSBoundParameters["Homepage"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["LogoutUrl"]) + { + $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["SamlMetadataUrl"]) + { + $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] + } + if($null -ne $PSBoundParameters["KeyCredentials"]) + { + $TmpValue = $PSBoundParameters["KeyCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDate + Key= $v.Value + StartDateTime= $v.StartDate + Type= $v.Type + Usage= $v.Usage + } + + $a += $hash + } + $Value = $a + $params["KeyCredentials"] = $Value + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) + { + $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgServicePrincipal @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name AppOwnerTenantId -Value AppOwnerOrganizationId + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 new file mode 100644 index 0000000000..c8ad2a0e66 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraServicePrincipalAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PrincipalId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["AppRoleId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PrincipalId"]) + { + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgServicePrincipalAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 new file mode 100644 index 0000000000..8efb459fef --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 @@ -0,0 +1,37 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraServicePrincipalPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Value, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $StartDate, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomKeyIdentifier, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $EndDate + ) + + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $body = @{ + passwordCredential = @{ + startDateTime = $PSBoundParameters["StartDate"]; + endDateTime = $PSBoundParameters["EndDate"]; + } + } + $response = Add-MgServicePrincipalPassword -Headers $customHeaders -ServicePrincipalId $PSBoundParameters["ServicePrincipalId"] -BodyParameter $body + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name StartDate -Value StartDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name EndDate -Value EndDateTime + } + } + $response +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 new file mode 100644 index 0000000000..bd042cd176 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraApplication { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgApplication @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 new file mode 100644 index 0000000000..5eb242f5d6 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraApplicationExtensionProperty { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionPropertyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ExtensionPropertyId"]) + { + $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgApplicationExtensionProperty @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 new file mode 100644 index 0000000000..b2da26a94c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraApplicationKey { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $KeyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Proof, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["Proof"]) + { + $params["Proof"] = $PSBoundParameters["Proof"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgApplicationKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 new file mode 100644 index 0000000000..8e25f12ca4 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraApplicationKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgApplicationKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 new file mode 100644 index 0000000000..b334456de8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraApplicationOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["OwnerId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgApplicationOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 new file mode 100644 index 0000000000..dc8fedf18f --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraApplicationPassword { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $KeyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgApplicationPassword @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 new file mode 100644 index 0000000000..c0823ef2e9 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraApplicationPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgApplicationPassword @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 new file mode 100644 index 0000000000..5c646f1b96 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraApplicationVerifiedPublisher { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["AppObjectId"]) + { + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Clear-MgApplicationVerifiedPublisher @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 new file mode 100644 index 0000000000..89edda4a12 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDeletedApplication { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgDirectoryDeletedItem @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 new file mode 100644 index 0000000000..6b49f2bcb1 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("Id")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryObjectId + ) + + PROCESS { + $params = @{} + $Method = "DELETE" + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["DirectoryObjectId"]) { + $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $URI = "https://graph.microsoft.com/v1.0/directory/deletedItems/$DirectoryObjectId" + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 new file mode 100644 index 0000000000..b043722b52 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraServicePrincipal { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgServicePrincipal @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 new file mode 100644 index 0000000000..2086d55297 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraServicePrincipalAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppRoleAssignmentId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + { + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgServicePrincipalAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 new file mode 100644 index 0000000000..0357d442ec --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraServicePrincipalDelegatedPermissionClassification { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS{ + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + Remove-MgServicePrincipalDelegatedPermissionClassification -Headers $customHeaders -ServicePrincipalId $PSBoundParameters["ServicePrincipalId"] -DelegatedPermissionClassificationId $PSBoundParameters["Id"] + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 new file mode 100644 index 0000000000..b8bf8f656d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraServicePrincipalKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgServicePrincipalKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 new file mode 100644 index 0000000000..0e303328fb --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraServicePrincipalOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["OwnerId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgServicePrincipalOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 new file mode 100644 index 0000000000..b0f31570bd --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 @@ -0,0 +1,20 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraServicePrincipalPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId, + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS{ + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + Remove-MgServicePrincipalPassword -Headers $customHeaders -ServicePrincipalId $PSBoundParameters["ServicePrincipalId"] -KeyId $PSBoundParameters["KeyId"] + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 new file mode 100644 index 0000000000..703c5baf03 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 @@ -0,0 +1,104 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Restore-EntraDeletedApplication { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] + } + if($null -ne $PSBoundParameters["IdentifierUris"]) + { + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Restore-MgDirectoryDeletedItem @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name Homepage -value $_.AdditionalProperties['web']['homePageUrl'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name ReplyUrls -value $_.AdditionalProperties['web']['redirectUris'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name ParentalControlSettings -value $_.AdditionalProperties['parentalControlSettings'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name PasswordCredentials -value $_.AdditionalProperties['passwordCredentials'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name KeyCredentials -value $_.AdditionalProperties['keyCredentials'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name AddIns -value $_.AdditionalProperties['addIns'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name AppId -value $_.AdditionalProperties['appId'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name AppRoles -value $_.AdditionalProperties['appRoles'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name DisplayName -value $_.AdditionalProperties['displayName'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name IdentifierUris -value $_.AdditionalProperties['identifierUris'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name KnownClientApplications -value $_.AdditionalProperties['api']['knownClientApplications'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name Oauth2Permissions -value $_.AdditionalProperties['api']['oauth2PermissionScopes'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name PreAuthorizedApplications -value $_.AdditionalProperties['api']['preAuthorizedApplications'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name PublicClient -value $_.AdditionalProperties['publicClient'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name PublisherDomain -value $_.AdditionalProperties['publisherDomain'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name RequiredResourceAccess -value $_.AdditionalProperties['requiredResourceAccess'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name SignInAudience -value $_.AdditionalProperties['signInAudience'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name ObjectType -value $_.AdditionalProperties['@odata.type'] + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 new file mode 100644 index 0000000000..a1981bcd68 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Select-EntraGroupIdsServicePrincipalIsMemberOf { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $initalResponse = Get-MgServicePrincipalMemberOf @params -Headers $customHeaders + $response = $initalResponse | Where-Object -Filterscript {$_.Id -in ($GroupIdsForMembershipCheck.GroupIds)} + if($response){ + $response.Id + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 new file mode 100644 index 0000000000..a3818da5ca --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 @@ -0,0 +1,305 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraApplication { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TokenEncryptionKeyId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GroupMembershipClaims, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.WebApplication] $Web, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Tags, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $SignInAudience + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["Api"]) + { + $TmpValue = $PSBoundParameters["Api"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["Api"] = $Value + } + if($null -ne $PSBoundParameters["OptionalClaims"]) + { + $TmpValue = $PSBoundParameters["OptionalClaims"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["OptionalClaims"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["Tags"]) + { + $params["Tags"] = $PSBoundParameters["Tags"] + } + if($null -ne $PSBoundParameters["Web"]) + { + $TmpValue = $PSBoundParameters["Web"] + $Value = @{} + if($TmpValue.HomePageUrl) { $Value["HomePageUrl"] = $TmpValue.HomePageUrl } + if($TmpValue.LogoutUrl) { $Value["LogoutUrl"] = $TmpValue.LogoutUrl } + if($TmpValue.RedirectUris) { $Value["RedirectUris"] = $TmpValue.RedirectUris } + if($TmpValue.ImplicitGrantSettings) { $Value["ImplicitGrantSettings"] = $TmpValue.ImplicitGrantSettings } + + $params["Web"] = $Value + } + if($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + { + $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + } + if($null -ne $PSBoundParameters["RequiredResourceAccess"]) + { + $TmpValue = $PSBoundParameters["RequiredResourceAccess"] + $Value = $TmpValue | ConvertTo-Json + $params["RequiredResourceAccess"] = $Value + } + if($null -ne $PSBoundParameters["PublicClient"]) + { + $TmpValue = $PSBoundParameters["PublicClient"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["PublicClient"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) + { + $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] + } + if($null -ne $PSBoundParameters["KeyCredentials"]) + { + $TmpValue = $PSBoundParameters["KeyCredentials"] + $a = @() + $inpu = $TmpValue + foreach($v in $inpu) + { + $hash = @{} + if($TmpValue.CustomKeyIdentifier) { $hash["CustomKeyIdentifier"] = $v.CustomKeyIdentifier } + if($TmpValue.EndDateTime) { $hash["EndDateTime"] = $v.EndDateTime } + if($TmpValue.Key) { $hash["Key"] = $v.Key } + if($TmpValue.StartDateTime) { $hash["StartDateTime"] = $v.StartDateTime } + if($TmpValue.Type) { $hash["Type"] = $v.Type } + if($TmpValue.Usage) { $hash["Usage"] = $v.Usage } + if($TmpValue.DisplayName) { $hash["DisplayName"] = $v.DisplayName } + if($TmpValue.KeyId) { $hash["KeyId"] = $v.KeyId } + + $a += $hash + } + + $Value = $a + $params["KeyCredentials"] = $Value + } + if($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) + { + $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + } + if($null -ne $PSBoundParameters["IdentifierUris"]) + { + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + } + if($null -ne $PSBoundParameters["ParentalControlSettings"]) + { + $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["ParentalControlSettings"] = $Value + } + if($null -ne $PSBoundParameters["GroupMembershipClaims"]) + { + $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] + } + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($null -ne $PSBoundParameters["AddIns"]) + { + $TmpValue = $PSBoundParameters["AddIns"] + $Value = @() + $Properties = @() + + foreach($prop in $TmpValue.Properties) + { + $Temp = $prop | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $hash[$_.Name] = $_.Value } + $Properties += $hash + } + + foreach($data in $TmpValue) + { + $hash = @{ + Id= $data.Id + Type = $data.Type + Properties = $Properties + } + + $Value += $hash + } + $params["AddIns"] = $Value + } + if($null -ne $PSBoundParameters["AppRoles"]) + { + $TmpValue = $PSBoundParameters["AppRoles"] + $a = @() + $inpu = $TmpValue + foreach($v in $inpu) + { + $hash = @{} + if($TmpValue.AllowedMemberTypes) { $hash["AllowedMemberTypes"] = $v.AllowedMemberTypes } + if($TmpValue.Description) { $hash["Description"] = $v.Description } + if($TmpValue.DisplayName) { $hash["DisplayName"] = $v.DisplayName } + if($TmpValue.Id) { $hash["Id"] = $v.Id } + if($TmpValue.IsEnabled) { $hash["IsEnabled"] = $v.IsEnabled } + if($TmpValue.Origin) { $hash["Origin"] = $v.Origin } + if($TmpValue.Value) { $hash["Value"] = $v.Value } + + $a += $hash + } + + $Value = $a + $params["AppRoles"] = $Value + } + if($null -ne $PSBoundParameters["PasswordCredentials"]) + { + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $inpu = $TmpValue + foreach($v in $inpu) + { + $hash = @{} + if($TmpValue.CustomKeyIdentifier) { $hash["CustomKeyIdentifier"] = $v.CustomKeyIdentifier } + if($TmpValue.EndDateTime) { $hash["EndDateTime"] = $v.EndDateTime } + if($TmpValue.Hint) { $hash["Hint"] = $v.Hint } + if($TmpValue.StartDateTime) { $hash["StartDateTime"] = $v.StartDateTime } + if($TmpValue.SecretText) { $hash["SecretText"] = $v.SecretText } + if($TmpValue.DisplayName) { $hash["DisplayName"] = $v.DisplayName } + if($TmpValue.KeyId) { $hash["KeyId"] = $v.KeyId } + + $a += $hash + } + + $Value = $a + $params["PasswordCredentials"] = $Value + } + if($null -ne $PSBoundParameters["SignInAudience"]) + { + $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] + } + if($null -ne $PSBoundParameters["InformationalUrl"]) + { + $TmpValue = $PSBoundParameters["InformationalUrl"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["Info"] = $Value + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgApplication @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 new file mode 100644 index 0000000000..fb658ebb7c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 @@ -0,0 +1,59 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraApplicationLogo { + [CmdletBinding(DefaultParameterSetName = 'File')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "Stream")] + [Parameter(ParameterSetName = "File")] + [Parameter(ParameterSetName = "ByteArray")] + [System.String] $ApplicationId, + [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Byte[]] $ImageByteArray, + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, + [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.IO.Stream] $FileStream + ) + PROCESS { + try{ + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = 'https://graph.microsoft.com/v1.0/applications' + $Method = "PUT" + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $URI = "$baseUri/$($params.ApplicationId)/logo" + } + if($null -ne $PSBoundParameters["FilePath"]){ + $params["FilePath"] = $PSBoundParameters["FilePath"] + $isUrl = [System.Uri]::IsWellFormedUriString($($params.FilePath), [System.UriKind]::Absolute) + $isLocalFile = [System.IO.File]::Exists($($params.FilePath)) + + if($isUrl){ + $logoBytes = (Invoke-WebRequest $($params.FilePath)).Content + } + elseif($isLocalFile){ + $logoBytes = [System.IO.File]::ReadAllBytes($($params.FilePath)) + } + else{ + Write-Error -Message "FilePath is invalid" -ErrorAction Stop + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method -ContentType "image/*" -Body $logoBytes + } + catch [System.Net.WebException]{ + Write-Error -Message "FilePath is invalid. Invalid or malformed url" -ErrorAction Stop + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 new file mode 100644 index 0000000000..b92430dc5d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraApplicationVerifiedPublisher { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.SetVerifiedPublisherRequest] $SetVerifiedPublisherRequest, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) + { + $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["AppObjectId"]) + { + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Set-MgApplicationVerifiedPublisher @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 new file mode 100644 index 0000000000..cf5ed1d7fe --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 @@ -0,0 +1,169 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraServicePrincipal { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $AlternativeNames, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PublisherName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ReplyUrls, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $LogoutUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ErrorUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $SamlMetadataUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AccountEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ServicePrincipalType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Tags, + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Homepage, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AppId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PreferredSingleSignOnMode + ) + + PROCESS { + $params = @{} + $params["Uri"] = "https://graph.microsoft.com/v1.0/servicePrincipals" + $params["Method"] = "PATCH" + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $body["accountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if($null -ne $PSBoundParameters["AlternativeNames"]) + { + $body["alternativeNames"] = $PSBoundParameters["AlternativeNames"] + } + if($null -ne $PSBoundParameters["PreferredSingleSignOnMode"]) + { + $body["preferredSingleSignOnMode"] = $PSBoundParameters["PreferredSingleSignOnMode"] + } + if($null -ne $PSBoundParameters["Tags"]) + { + $body["tags"] = $PSBoundParameters["Tags"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $body["displayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["AppId"]) + { + $body["appId"] = $PSBoundParameters["AppId"] + } + if($null -ne $PSBoundParameters["ErrorUrl"]) + { + $body["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + } + if($null -ne $PSBoundParameters["KeyCredentials"]) + { + $a = @() + $inpu = $PSBoundParameters["KeyCredentials"] + foreach($value in $inpu) + { + $hash = @{ + customKeyIdentifier= $value.CustomKeyIdentifier + endDateTime = $value.EndDate + key= $value.Value + startDateTime= $value.StartDate + type= $value.Type + usage= $value.Usage + } + $a += $hash + } + $body["keyCredentials"] = $a + } + if($null -ne $PSBoundParameters["ReplyUrls"]) + { + $body["replyUrls"] = $PSBoundParameters["ReplyUrls"] + } + if($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["Uri"] += "/$ServicePrincipalId" + } + if($null -ne $PSBoundParameters["LogoutUrl"]) + { + $body["logoutUrl"] = $PSBoundParameters["LogoutUrl"] + } + if($null -ne $PSBoundParameters["SamlMetadataUrl"]) + { + $body["samlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] + } + if($null -ne $PSBoundParameters["Homepage"]) + { + $body["homePage"] = $PSBoundParameters["Homepage"] + } + if($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) + { + $body["appRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] + } + if($null -ne $PSBoundParameters["PasswordCredentials"]) + { + $a = @() + $inpu = $PSBoundParameters["PasswordCredentials"] + foreach($value in $inpu) + { + $hash = @{ + customKeyIdentifier= $value.CustomKeyIdentifier + endDateTime = $value.EndDate + secretText= $value.Value + startDateTime= $value.StartDate + } + $a += $hash + } + + $body["passwordCredentials"] = $a + } + if($null -ne $PSBoundParameters["ServicePrincipalType"]) + { + $body["servicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] + } + if($null -ne $PSBoundParameters["PublisherName"]) + { + $body["publisherName"] = $PSBoundParameters["PublisherName"] + } + if($null -ne $PSBoundParameters["ServicePrincipalNames"]) + { + $body["servicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] + } + if($null -ne $PSBoundParameters["PreferredTokenSigningKeyThumbprint"]) + { + $body["preferredTokenSigningKeyThumbprint"] = $PSBoundParameters["PreferredTokenSigningKeyThumbprint"] + } + if($null -ne $PSBoundParameters["CustomSecurityAttributes"]) + { + $body["customSecurityAttributes"] = $PSBoundParameters["CustomSecurityAttributes"] + } + $params["Body"] = $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + $response = Invoke-GraphRequest @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 new file mode 100644 index 0000000000..45e83afcf8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 @@ -0,0 +1,80 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraEnvironment { + [CmdletBinding(DefaultParameterSetName = 'AddQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AzureADEndpoint, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GraphEndpoint + ) + + PROCESS{ + $params=@{} + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Name"]){ + $params["Name"]=$PSBoundParameters["Name"] + } + + if($null -ne $PSBoundParameters["AzureADEndpoint"]){ + $params["AzureADEndpoint"]=$PSBoundParameters["AzureADEndpoint"] + } + + if($null -ne $PSBoundParameters["GraphEndpoint"]){ + $params["GraphEndpoint"]=$PSBoundParameters["GraphEndpoint"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Add-MgEnvironment @params + + } + } + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 new file mode 100644 index 0000000000..77c9e41e2e --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 @@ -0,0 +1,172 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Connect-Entra { + [CmdletBinding(DefaultParameterSetName = 'UserParameterSet')] + param ( + [Parameter(ParameterSetName = "UserParameterSet",Position = 1)] + [System.String[]] $Scopes, + [Parameter(ParameterSetName = "AppCertificateParameterSet",Position = 1)] + [Parameter(ParameterSetName = "UserParameterSet")] + [Parameter(ParameterSetName = "IdentityParameterSet")] + [Alias("AppId", "ApplicationId")][System.String] $ClientId, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Parameter(ParameterSetName = "UserParameterSet",Position = 4)] + [Alias("Audience", "Tenant")][System.String] $TenantId, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Parameter(ParameterSetName = "UserParameterSet")] + [Parameter(ParameterSetName = "IdentityParameterSet")] + [Parameter(ParameterSetName = "EnvironmentVariableParameterSet")] + $ContextScope, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Parameter(ParameterSetName = "AccessTokenParameterSet")] + [Parameter(ParameterSetName = "UserParameterSet")] + [Parameter(ParameterSetName = "IdentityParameterSet")] + [Parameter(ParameterSetName = "EnvironmentVariableParameterSet")] + [ValidateNotNullOrEmpty()] + [Alias("EnvironmentName", "NationalCloud")][System.String] $Environment, + [Parameter(ParameterSetName = "EnvironmentVariableParameterSet")] + [Switch] $EnvironmentVariable, + [Parameter(ParameterSetName = "UserParameterSet")] + [Alias("UseDeviceAuthentication", "DeviceCode", "DeviceAuth", "Device")][System.Management.Automation.SwitchParameter] $UseDeviceCode, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Parameter(ParameterSetName = "AccessTokenParameterSet")] + [Parameter(ParameterSetName = "UserParameterSet")] + [Parameter(ParameterSetName = "IdentityParameterSet")] + [Parameter(ParameterSetName = "EnvironmentVariableParameterSet")] + [ValidateNotNullOrEmpty()] + [Double] $ClientTimeout, + [Parameter()] + [Switch] $NoWelcome, + [Parameter(ParameterSetName = "IdentityParameterSet",Position = 1)] + [Alias("ManagedIdentity", "ManagedServiceIdentity", "MSI")][System.Management.Automation.SwitchParameter] $Identity, + [Parameter(ParameterSetName = "AppCertificateParameterSet",Position = 2)] + [Alias("CertificateSubject", "CertificateName")][System.String] $CertificateSubjectName, + [Parameter(ParameterSetName = "AppCertificateParameterSet",Position = 3)] + [System.String] $CertificateThumbprint, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [System.Security.Cryptography.X509Certificates.X509Certificate2] $Certificate, + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Alias("SecretCredential", "Credential")][System.Management.Automation.PSCredential] $ClientSecretCredential, + [Parameter(ParameterSetName = "AccessTokenParameterSet",Position = 1)] + [System.Security.SecureString] $AccessToken + ) + + PROCESS { + $params = @{} + if ($null -ne $PSBoundParameters["Scopes"]) { + $params["Scopes"] = $PSBoundParameters["Scopes"] + } + + if ($null -ne $PSBoundParameters["ClientId"]) { + $params["ClientId"] = $PSBoundParameters["ClientId"] + } + + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["TenantId"] = $PSBoundParameters["TenantId"] + } + + if ($null -ne $PSBoundParameters["ContextScope"]) { + $params["ContextScope"] = $PSBoundParameters["ContextScope"] + } + + if ($null -ne $PSBoundParameters["Environment"]) { + $params["Environment"] = $PSBoundParameters["Environment"] + } + + if ($PSBoundParameters.ContainsKey("EnvironmentVariable")) { + $params["EnvironmentVariable"] = $PSBoundParameters["EnvironmentVariable"] + } + + if ($null -ne $PSBoundParameters["UseDeviceCode"]) { + $params["UseDeviceCode"] = $PSBoundParameters["UseDeviceCode"] + } + + if ($null -ne $PSBoundParameters["ClientTimeout"]) { + $params["ClientTimeout"] = $PSBoundParameters["ClientTimeout"] + } + + if ($PSBoundParameters.ContainsKey("NoWelcome")) { + $params["NoWelcome"] = $PSBoundParameters["NoWelcome"] + } + + if ($PSBoundParameters.ContainsKey("Identity")) { + $params["Identity"] = $PSBoundParameters["Identity"] + } + + if ($null -ne $PSBoundParameters["CertificateSubjectName"]) { + $params["CertificateSubjectName"] = $PSBoundParameters["CertificateSubjectName"] + } + + if ($null -ne $PSBoundParameters["CertificateThumbprint"]) { + $params["CertificateThumbprint"] = $PSBoundParameters["CertificateThumbprint"] + } + + if ($null -ne $PSBoundParameters["Certificate"]) { + $params["Certificate"] = $PSBoundParameters["Certificate"] + } + + if ($null -ne $PSBoundParameters["ClientSecretCredential"]) { + $params["ClientSecretCredential"] = $PSBoundParameters["ClientSecretCredential"] + } + + if ($null -ne $PSBoundParameters["AccessToken"]) { + $params["AccessToken"] = $PSBoundParameters["AccessToken"] + } + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + Connect-MgGraph @params + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 new file mode 100644 index 0000000000..9a8a691a44 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 @@ -0,0 +1,10 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Disconnect-Entra { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param () + Disconnect-MgGraph +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..375a2c496b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Connect-AzureAD -Value Connect-Entra -Scope Global -Force + Set-Alias -Name Disconnect-AzureAD -Value Disconnect-Entra -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 new file mode 100644 index 0000000000..e0f9d646c3 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 @@ -0,0 +1,154 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Find-EntraPermission { + [CmdletBinding(DefaultParameterSetName = 'Search')] + param ( + [parameter(ParameterSetName='Search', position=0, ValueFromPipeline=$true, Mandatory=$true)] + [String] $SearchString, + + [parameter(ParameterSetName='Search')] + [Switch] $ExactMatch, + + [ValidateSet('Any', 'Delegated', 'Application')] + [String] $PermissionType = 'Any', + + [Switch] $Online, + + [parameter(ParameterSetName='All')] + [Switch] $All + ) + + PROCESS { + $params = @{} + if($null -ne $PSBoundParameters["SearchString"]) + { + $params["SearchString"]=$PSBoundParameters["SearchString"] + } + if($null -ne $PSBoundParameters["PermissionType"]) + { + $params["PermissionType"]=$PSBoundParameters["PermissionType"] + } + if($null -ne $PSBoundParameters["ExactMatch"]) + { + $params["ExactMatch"] = $PSBoundParameters["ExactMatch"] + } + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($null -ne $PSBoundParameters["Online"]) + { + if($PSBoundParameters["Online"]) + { + $params["Online"] = $PSBoundParameters["Online"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Find-MgGraphPermission @params + } +}function Restore-EntraDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $AutoReconcileProxyConflict + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = 'https://graph.microsoft.com/v1.0/directory/deletedItems/' + $params["Method"] = "POST" + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] += $Id+"/microsoft.graph.restore" + } + if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) + { + $params["Body"] = @{ + autoReconcileProxyConflict = $true + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $data | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $userList = @() + foreach ($res in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 new file mode 100644 index 0000000000..22c810597d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraContext { + [CmdletBinding(DefaultParameterSetName = '')] + param () + + PROCESS { + $params = @{} + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["Confirm"]) + { + $params["Confirm"] = $PSBoundParameters["Confirm"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["WhatIf"]) + { + $params["WhatIf"] = $PSBoundParameters["WhatIf"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgContext @params + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 new file mode 100644 index 0000000000..8b3e762f45 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraEnvironment{ + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name) + PROCESS{ + $params = @{} + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + if ($null -ne $PSBoundParameters["Name"]) { + $params["Name"] = $PSBoundParameters["Name"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Get-MgEnvironment @params + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 new file mode 100644 index 0000000000..6647681c07 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 @@ -0,0 +1,58 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Reset-EntraStrongAuthenticationMethodByUpn { + [CmdletBinding(DefaultParameterSetName = 'SetAccidentalDeletionThreshold')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserPrincipalName, + [Parameter(ParameterSetName = "SetAccidentalDeletionThreshold", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId + ) + + PROCESS { + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["UserPrincipalName"]) { + $userId = $PSBoundParameters.UserPrincipalName + } + function DeleteAuthMethod($uid, $method){ + switch ($method.AdditionalProperties['@odata.type']) { + '#microsoft.graph.emailAuthenticationMethod' { + Remove-MgUserAuthenticationEmailMethod -UserId $uid -EmailAuthenticationMethodId $method.Id + } + '#microsoft.graph.phoneAuthenticationMethod' { + Remove-MgUserAuthenticationPhoneMethod -UserId $uid -PhoneAuthenticationMethodId $method.Id + } + Default { + + } + } + return $? # Return true if no error and false if there is an error + } + + $methods = Get-MgUserAuthenticationMethod -UserId $userId -Headers $customHeaders + # -1 to account for passwordAuthenticationMethod + + foreach ($authMethod in $methods) { + $deleted = DeleteAuthMethod -uid $userId -method $authMethod + if(!$deleted){ + # We need to use the error to identify and delete the default method. + $defaultMethod = $authMethod + } + } + + # Graph API does not support reading default method of a user. + # Plus default method can only be deleted when it is the only (last) auth method for a user. + # We need to use the error to identify and delete the default method. + try { + if($null -ne $defaultMethod){ + $result = DeleteAuthMethod -uid $userId -method $defaultMethod + } + } + catch {} + + if($null -ne $methods){ + $methods = Get-MgUserAuthenticationMethod -UserId $userId + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 new file mode 100644 index 0000000000..0366ab0b28 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Revoke-EntraSignedInUserAllRefreshToken { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri 'https://graph.microsoft.com/v1.0/me/revokeSignInSessions' -Method POST).value + if($response){ + $responseType = New-Object Microsoft.Graph.PowerShell.Models.ComponentsMwc6EoResponsesRevokesigninsessionsresponseContentApplicationJsonSchema + $responseType.Value= $response + $responseType + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 new file mode 100644 index 0000000000..4b94247287 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Revoke-EntraUserAllRefreshToken { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Revoke-MgUserSignInSession @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 new file mode 100644 index 0000000000..7bd4691d83 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 @@ -0,0 +1,37 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraAdministrativeUnitMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $Uri = "/v1.0/directory/administrativeUnits/$($params.AdministrativeUnitId)/members/" + '$ref' + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================") + + Invoke-GraphRequest -Headers $customHeaders -Uri $Uri -Method "POST" -Body $Value + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 new file mode 100644 index 0000000000..e2063fff92 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -0,0 +1,51 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraCustomSecurityAttributeDefinitionAllowedValue { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsActive, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomSecurityAttributeDefinitionId + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["Id"]) { + $body["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["IsActive"]) { + $body["IsActive"] = $PSBoundParameters["IsActive"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $Uri = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/$CustomSecurityAttributeDefinitionId/allowedValues" + $Method = "POST" + $response = Invoke-GraphRequest -Uri $Uri -Method $Method -Body $body -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + if($response) + { + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAllowedValue + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 new file mode 100644 index 0000000000..c592a6900b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraDeviceRegisteredOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgDeviceRegisteredOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 new file mode 100644 index 0000000000..99c0634f16 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraDeviceRegisteredUser { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgDeviceRegisteredUserByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 new file mode 100644 index 0000000000..166eb52df0 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraDirectoryRoleMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + { + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgDirectoryRoleMemberByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 new file mode 100644 index 0000000000..d334e16f05 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraScopedRoleMembership { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $RoleObjectId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.MsRoleMemberInfo] $RoleMemberInfo + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $Uri = "/v1.0/directory/administrativeUnits/$($params.AdministrativeUnitId)/scopedRoleMembers" + } + if($null -ne $PSBoundParameters["RoleObjectId"]) + { + $params["RoleId"] = $PSBoundParameters["RoleObjectId"] + $body.roleId = $PSBoundParameters["RoleObjectId"]; + } + if($null -ne $PSBoundParameters["RoleMemberInfo"]) + { + $TmpValue = $PSBoundParameters["RoleMemberInfo"] + $Value = @{ + id = ($TmpValue).Id + } + $params["RoleMemberInfo"] = $Value | ConvertTo-Json + $body.roleMemberInfo = $Value + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $Uri -Method "POST" -Body $body + $response = $response | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name AdministrativeUnitObjectId -Value AdministrativeUnitId + Add-Member -InputObject $_ -MemberType AliasProperty -Name RoleObjectId -Value RoleId + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + + $memberList = @() + foreach($data in $response){ + $memberType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphScopedRoleMembership + if (-not ($data -is [psobject])) { + $data = [pscustomobject]@{ Value = $data } + } + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $memberType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $memberList += $memberType + } + $memberList + + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 new file mode 100644 index 0000000000..38cc10d082 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Confirm-EntraDomain { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.CrossCloudVerificationCodeBody] $CrossCloudVerificationCode + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["CrossCloudVerificationCode"]) + { + $params["CrossCloudVerificationCode"] = $PSBoundParameters["CrossCloudVerificationCode"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Confirm-MgDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..4afa422f7f --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraDirectoryRoleTemplate -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-EntraAdministrativeUnit -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force + Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force + Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force + Set-Alias -Name Set-AzureADDevice -Value Set-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADContract -Value Get-EntraContract -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force + Set-Alias -Name New-AzureADDevice -Value New-EntraDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraDomainVerificationDnsRecord -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force + Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-EntraRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Add-EntraCustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 new file mode 100644 index 0000000000..3c44b0f030 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraDirectoryRole { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $RoleTemplateId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["RoleTemplateId"]) + { + $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgDirectoryRole @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 new file mode 100644 index 0000000000..dd1489717b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraAccountSku { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgSubscribedSku @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name ActiveUnits -Value $_.PrepaidUnits.Enabled + Add-Member -InputObject $_ -MemberType NoteProperty -Name LockedOutUnits -Value $_.PrepaidUnits.LockedOut + Add-Member -InputObject $_ -MemberType NoteProperty -Name SuspendedUnits -Value $_.PrepaidUnits.Suspended + Add-Member -InputObject $_ -MemberType NoteProperty -Name WarningUnits -Value $_.PrepaidUnits.Warning + Add-Member -InputObject $_ -MemberType NoteProperty -Name AccountObjectId -Value $_.AccountId + Add-Member -InputObject $_ -MemberType NoteProperty -Name TargetClass -Value $_.AppliesTo + } + } + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 new file mode 100644 index 0000000000..7a1c4671b8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraAdministrativeUnit { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias("ObjectId")] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = "/v1.0/directory/administrativeUnits" + $properties = '$select=*' + $params["Uri"] = "$baseUri/?$properties" + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $params["Uri"] = "$baseUri/$($params.AdministrativeUnitId)?$properties" + } + if ($PSBoundParameters.ContainsKey("Top")) { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $params["Uri"] += "&`$top=999" + } + else { + $params["Uri"] += "&`$top=$topCount" + } + } + if ($null -ne $PSBoundParameters["Filter"]) { + $Filter = $PSBoundParameters["Filter"] + $f = '$' + 'Filter' + $params["Uri"] += "&$f=$Filter" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $($params.Uri) -Method GET) + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + try { + $data = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $all = $All.IsPresent + $increment = $topCount - $data.Count + while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { + $params["Uri"] = $response.'@odata.nextLink' + if ($increment -gt 0) { + $topValue = [Math]::Min($increment, 999) + $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $increment -= $topValue + } + $response = Invoke-GraphRequest @params + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } + catch {} + $data | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimeStamp -Value deletedDateTime + } + } + + if ($data) { + $aulist = @() + foreach ($item in $data) { + $auType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAdministrativeUnit + $item.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0, 1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $auType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $aulist += $auType + } + $aulist + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 new file mode 100644 index 0000000000..89630226bf --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraAdministrativeUnitMember { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All + ) + + PROCESS { + $params = @{} + $topCount = $null + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = "/v1.0/directory/administrativeUnits/$AdministrativeUnitId/members?`$select=*" + $params["Uri"] = "$baseUri" + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($PSBoundParameters.ContainsKey("Top")) { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $minTop = 999 + $params["Uri"] += "&`$top=999" + } + else { + $params["Uri"] += "&`$top=$topCount" + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $($params.Uri) -Method GET) + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + try { + $data = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $all = $All.IsPresent + $increment = $topCount - $data.Count + while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { + $params["Uri"] = $response.'@odata.nextLink' + if ($increment -gt 0) { + $topValue = [Math]::Min($increment, 999) + if ($minTop) { + $params["Uri"] = $params["Uri"].Replace("`$top=$minTop", "`$top=$topValue") + } + else { + $params["Uri"] = $params["Uri"].Replace("`$top=$topCount", "`$top=$topValue") + } + $increment -= $topValue + } + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $($params.Uri) -Method GET) + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } + catch {} + $data | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + if ($data) { + $memberList = @() + foreach ($response in $data) { + $memberType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + if (-not ($response -is [psobject])) { + $response = [pscustomobject]@{ Value = $response } + } + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $memberType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $memberList += $memberType + } + $memberList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 new file mode 100644 index 0000000000..38714ba526 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraAttributeSet { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("Id")] + [System.String] $AttributeSetId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/v1.0/directory/attributeSets/" + $params["Method"] = "GET" + if ($null -ne $PSBoundParameters["AttributeSetId"]) { + $params["Uri"] += $AttributeSetId + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + try { + $response = $response.value + } + catch {} + if($response) + { + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAttributeSet + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 new file mode 100644 index 0000000000..6ef166f77f --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 @@ -0,0 +1,121 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraContact { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{OrgContactId = "Id"} + if($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgContact @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value Phones + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value ServiceProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value Phones + $propsToConvert = @('Addresses','Manager','Phones') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 new file mode 100644 index 0000000000..9f242e30aa --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraContactDirectReport { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgContactDirectReport @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 new file mode 100644 index 0000000000..56017c250a --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraContactManager { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgContactManager @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 new file mode 100644 index 0000000000..03f423b2fb --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraContactMembership { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgContactMemberOf @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 new file mode 100644 index 0000000000..cc36865b67 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 @@ -0,0 +1,119 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraContract { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ContractId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{ObjectId = "Id"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ContractId"]) + { + $params["ContractId"] = $PSBoundParameters["ContractId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgContract @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 new file mode 100644 index 0000000000..438be06236 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 @@ -0,0 +1,46 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraCustomSecurityAttributeDefinition { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $Method = "GET" + $Uri = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/" + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["Id"]) { + $Uri += $Id + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Uri $Uri -Method $Method -Headers $customHeaders) | ConvertTo-Json | ConvertFrom-Json + try { + $response = $response.value + } + catch {} + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphCustomSecurityAttributeDefinition + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 new file mode 100644 index 0000000000..c4323c75f9 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -0,0 +1,54 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraCustomSecurityAttributeDefinitionAllowedValue { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomSecurityAttributeDefinitionId + ) + + PROCESS { + $params = @{} + $params["Uri"] = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/$CustomSecurityAttributeDefinitionId/allowedValues/" + $params["Method"] = "GET" + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["Id"]) { + $params["Uri"] += $Id + } + if ($null -ne $PSBoundParameters["Filter"]) { + $params["Uri"] += '?$filter=' + $Filter + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest @params -Headers $customHeaders) | ConvertTo-Json -Depth 5 | ConvertFrom-Json + try { + $response = $response.value + } + catch {} + if($response) + { + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAllowedValue + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 new file mode 100644 index 0000000000..f2d13b7830 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryObjectId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["DirectoryObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDirectoryDeletedItem @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 new file mode 100644 index 0000000000..210f20678b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 @@ -0,0 +1,138 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDevice { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDevice @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSVersion -Value OperatingSystemVersion + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DevicePhysicalIds -Value PhysicalIds + Add-Member -InputObject $_ -MemberType AliasProperty -Name ComplianceExpiryTime -Value ComplianceExpirationDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceTrustType -Value TrustType + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceObjectVersion -Value DeviceVersion + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 new file mode 100644 index 0000000000..cc5ebacb12 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 @@ -0,0 +1,79 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDeviceRegisteredOwner { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $baseUri = 'https://graph.microsoft.com/v1.0/devices' + $properties = '$select=*' + $Method = "GET" + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $URI = "$baseUri/$($params.DeviceId)/registeredOwners?$properties" + } + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.DeviceId)/registeredOwners?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + $URI = "$baseUri/$($params.DeviceId)/registeredOwners?`$top=$topCount&$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ImmutableId -Value onPremisesImmutableId + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value onPremisesProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserState -Value ExternalUserState + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserStateChangedOn -Value ExternalUserStateChangeDateTime + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 new file mode 100644 index 0000000000..62b510ae77 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 @@ -0,0 +1,79 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDeviceRegisteredUser { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $baseUri = 'https://graph.microsoft.com/v1.0/devices' + $properties = '$select=*' + $Method = "GET" + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $URI = "$baseUri/$($params.DeviceId)/registeredUsers?$properties" + } + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.DeviceId)/registeredUsers?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + $URI = "$baseUri/$($params.DeviceId)/registeredUsers?`$top=$topCount&$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ImmutableId -Value onPremisesImmutableId + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value onPremisesProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserState -Value ExternalUserState + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserStateChangedOn -Value ExternalUserStateChangeDateTime + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 new file mode 100644 index 0000000000..526feed0cd --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 @@ -0,0 +1,71 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDirSyncConfiguration { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][ValidateNotNullOrEmpty()][ValidateScript({ if ($_ -is [System.Guid]) { $true } else { throw "TenantId must be of type [System.Guid]." } })][System.guid] $TenantId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["OnPremisesDirectorySynchronizationId"] = $PSBoundParameters["TenantId"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = ((Get-MgDirectoryOnPremiseSynchronization @params -Headers $customHeaders).configuration | Select-Object -Property AccidentalDeletionPrevention).AccidentalDeletionPrevention + # Create a custom table + $customTable = [PSCustomObject]@{ + "AccidentalDeletionThreshold" = $response.AlertThreshold + "DeletionPreventionType" = $response.SynchronizationPreventionType + } + $customTable + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncfeature.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncfeature.ps1 new file mode 100644 index 0000000000..96ac75b343 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncfeature.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDirSyncfeature { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String]$Feature + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["Feature"]) { + $Feature = $PSBoundParameters["Feature"] + } + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["OnPremisesDirectorySynchronizationId"] = $PSBoundParameters["TenantId"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $jsonData = Get-MgDirectoryOnPremiseSynchronization @params -Headers $customHeaders | ConvertTo-Json + $object = ConvertFrom-Json $jsonData + $table =@() + foreach ($featureName in $object.Features.PSObject.Properties.Name) { + $row = New-Object PSObject -Property @{ + 'DirSyncFeature' = $featureName -replace "Enabled", "" + 'Enabled' = $object.Features.$featureName + } + $table += $row + } + if([string]::IsNullOrWhiteSpace($Feature)) { + $table | Format-Table -AutoSize + } + else { + $output = $table | Where-Object {$_.dirsyncFeature -eq $Feature} + if($null -eq $output) { + Write-Error "Get-EntraDirSyncfeature : Invalid value for parameter. Parameter Name: Feature." + } + else { + $output + } + } + } + }# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 new file mode 100644 index 0000000000..abbed13e68 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDirectoryObjectOnPremisesProvisioningError { + [CmdletBinding(DefaultParameterSetName = 'GetById')] + param ( + [Parameter(ParameterSetName = "GetById")][ValidateNotNullOrEmpty()][ValidateScript({if ($_ -is [System.Guid]) { $true } else {throw "TenantId must be of type [System.Guid]."}})][System.Guid] $TenantId + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["TenantId"] = $PSBoundParameters["TenantId"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $Object = @("users", "groups", "contacts") + $response = @() + + try { + foreach ($obj in $object) { + $obj = ($obj | Out-String).trimend() + $uri = 'https://graph.microsoft.com/v1.0/' + $obj + '?$select=onPremisesProvisioningErrors' + $response += ((Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method GET).value).onPremisesProvisioningErrors + } + } + catch {} + if ([string]::IsNullOrWhiteSpace($response)) { + write-host "False" + } + else { + $response + } + + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 new file mode 100644 index 0000000000..fcf3bec5fb --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDirectoryRole { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{ObjectId = "Id"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + { + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDirectoryRole @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 new file mode 100644 index 0000000000..b9a13d4dd4 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDirectoryRoleMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = 'https://graph.microsoft.com/v1.0/directoryRoles' + $properties = '$select=*' + $Method = "GET" + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["DirectoryRoleId"]) + { + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + $URI = "$baseUri/$($params.DirectoryRoleId)/members?$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value ServiceProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value businessPhones + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 new file mode 100644 index 0000000000..183df10db5 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDirectoryRoleTemplate { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDirectoryRoleTemplate @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 new file mode 100644 index 0000000000..0f274b828e --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDomain { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value Id + $propsToConvert = @('State') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + + $response + } + +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 new file mode 100644 index 0000000000..b977f3bab3 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDomainFederationSettings { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param( + [Parameter(Mandatory=$true,Position=0,ValueFromPipelineByPropertyName=$true)][string]$DomainName, + [Parameter(Mandatory=$false,Position=1,ValueFromPipelineByPropertyName=$true)][ValidateNotNullOrEmpty()][ValidateScript({ if ($_ -is [System.Guid]) { $true } else { throw "TenantId must be of type [System.Guid]." } })][System.guid] $TenantId + ) + process { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($PSBoundParameters.ContainsKey("TenantId")) { + $params["TenantId"] = $TenantId + } + if ($PSBoundParameters.ContainsKey("DomainName")) { + $params["DomainId"] = $DomainName + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgDomainFederationConfiguration -Headers $customHeaders -DomainId $params["DomainId"] | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $customTable = [PSCustomObject]@{ + "ActiveLogOnUri" = $response.ActiveSignInUri + #"DefaultInteractiveAuthenticationMethod" = $response. + "FederationBrandName" = $response.DisplayName + "IssuerUri" = $response.IssuerUri + "LogOffUri" = $response.SignOutUri + "MetadataExchangeUri" = $response.MetadataExchangeUri + "NextSigningCertificate" = $response.NextSigningCertificate + #"OpenIdConnectDiscoveryEndpoint" = $response. + "PassiveLogOnUri" = $response.PassiveSignInUri + #"PasswordChangeUri" = $response. + #"PasswordResetUri" = $response. + "PreferredAuthenticationProtocol" = $response.PreferredAuthenticationProtocol + "PromptLoginBehavior" = $response.PromptLoginBehavior + "SigningCertificate" = $response.SigningCertificate + "SigningCertificateUpdateStatus" = $response.SigningCertificateUpdateStatus + #"SupportsMfa" = $response. + } + $customTable + + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 new file mode 100644 index 0000000000..03a2ee898f --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDomainNameReference { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = 'https://graph.microsoft.com/v1.0/domains' + $properties = '$select=*' + $Method = "GET" + $keysChanged = @{ObjectId = "Id"} + if($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + $URI = "$baseUri/$($params.DomainId)/domainNameReferences?$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value deletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value onPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ImmutableId -Value onPremisesImmutableId + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value onPremisesProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value businessPhones + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserState -Value externalUserState + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserStateChangedOn -Value externalUserStateChangeDate + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 new file mode 100644 index 0000000000..213fadb6b1 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDomainServiceConfigurationRecord { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDomainServiceConfigurationRecord @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 new file mode 100644 index 0000000000..f5011fa6bf --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDomainVerificationDnsRecord { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDomainVerificationDnsRecord @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 new file mode 100644 index 0000000000..1215395d91 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraExtensionProperty { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsSyncedFromOnPremises + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["IsSyncedFromOnPremises"]) + { + $params["IsSyncedFromOnPremises"] = $PSBoundParameters["IsSyncedFromOnPremises"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDirectoryObjectAvailableExtensionProperty @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 new file mode 100644 index 0000000000..7e2501fe98 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraFederationProperty { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)][System.String] $DomainName, + [Parameter(ParameterSetName = "GetQuery", Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)][Switch] $SupportMultipleDomain + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["DomainName"]) { + $params["DomainId"] = $PSBoundParameters["DomainName"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgDomainFederationConfiguration @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ActiveClientSignInUrl -Value ActiveSignInUri + Add-Member -InputObject $_ -MemberType AliasProperty -Name FederationServiceDisplayName -Value DisplayName + Add-Member -InputObject $_ -MemberType AliasProperty -Name FederationServiceIdentifier -Value IssuerUri + Add-Member -InputObject $_ -MemberType AliasProperty -Name FederationMetadataUrl -Value MetadataExchangeUri + Add-Member -InputObject $_ -MemberType AliasProperty -Name PassiveClientSignInUrl -Value PassiveSignInUri + Add-Member -InputObject $_ -MemberType AliasProperty -Name PassiveClientSignOutUrl -Value SignOutUri + } + } + $response + + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 new file mode 100644 index 0000000000..be766a8bf1 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraObjectByObjectId { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[System.String]] $ObjectIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Types, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + $URI = 'https://graph.microsoft.com/v1.0/directoryObjects/microsoft.graph.getByIds?$select=*' + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $URI = "https://graph.microsoft.com/v1.0/directoryObjects/microsoft.graph.getByIds?$properties" + } + if($null -ne $PSBoundParameters["Types"]) + { + $body["Types"] = $PSBoundParameters["Types"] + } + if($null -ne $PSBoundParameters["ObjectIds"]) + { + $body["Ids"] = $PSBoundParameters["ObjectIds"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest -Uri $URI -Method POST -Body $body -Headers $customHeaders | ConvertTo-Json -depth 10 | ConvertFrom-Json + try { + $response = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + catch {} + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 new file mode 100644 index 0000000000..cecc0cec27 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraPartnerInformation { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["TenantID"] = $PSBoundParameters["TenantId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $TenantID = ((invoke-mggraphrequest -Method GET -Uri "https://graph.microsoft.com/v1.0/organization").value).id + } + $response = invoke-mggraphrequest -Headers $customHeaders -Method GET -Uri "https://graph.microsoft.com/v1.0/organization/$TenantID/partnerInformation" + # Create a custom table + $customTable = [PSCustomObject]@{ + "PartnerCompanyName" = $response.companyName + "companyType" = $response.companyType + "PartnerSupportTelephones" = $response.supportTelephones + "PartnerSupportEmails" = $response.supportEmails + "PartnerHelpUrl" = $response.helpUrl + "PartnerCommerceUrl" = $response.commerceUrl + "PartnerSupportUrl" = $response.supportUrl + "ObjectID" = $response.partnerTenantId + } + $customTable + } + }# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 new file mode 100644 index 0000000000..bdbd0122a9 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 @@ -0,0 +1,71 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraPasswordPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $DomainName + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["DomainName"]) { + $params["DomainId"] = $PSBoundParameters["DomainName"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgDomain @params -Headers $customHeaders + # Create a custom table + $customTable = [PSCustomObject]@{ + "NotificationDays" = $response.PasswordNotificationWindowInDays + "ValidityPeriod" = $response.PasswordValidityPeriodInDays + } + $customTable + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 new file mode 100644 index 0000000000..b01f1052eb --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraScopedRoleMembership { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ScopedRoleMembershipId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $isList = $false + $baseUri = "https://graph.microsoft.com/v1.0/directory/administrativeUnits" + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $uri = $baseUri + "/$($params.AdministrativeUnitId)/scopedRoleMembers" + $params["Uri"] = $uri + $isList = $true + } + if($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) + { + $isList = $false + $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] + $uri = $uri + "/$($params.ScopedRoleMembershipId)" + $params["Uri"] = $uri + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================") + + $response = (Invoke-GraphRequest -Uri $uri -Headers $customHeaders -Method GET) | ConvertTo-Json -Depth 5 | ConvertFrom-Json + if($isList){ + $response = $response.value + } + + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name AdministrativeUnitObjectId -Value AdministrativeUnitId + Add-Member -InputObject $_ -MemberType AliasProperty -Name RoleObjectId -Value RoleId + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + + $memberList = @() + foreach($data in $response){ + $memberType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphScopedRoleMembership + if (-not ($data -is [psobject])) { + $data = [pscustomobject]@{ Value = $data } + } + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $memberType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $memberList += $memberType + } + $memberList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 new file mode 100644 index 0000000000..93244d40ea --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraSubscribedSku { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SubscribedSkuId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["SubscribedSkuId"]) + { + $params["SubscribedSkuId"] = $PSBoundParameters["SubscribedSkuId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Get-MgSubscribedSku @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('PrepaidUnits') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 new file mode 100644 index 0000000000..90c22dd6f7 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraTenantDetail { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgOrganization @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name CompanyLastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + $propsToConvert = @('AssignedPlans','ProvisionedPlans','VerifiedDomains','PrivacyProfile') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 new file mode 100644 index 0000000000..cc89ffe44b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 @@ -0,0 +1,51 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraAdministrativeUnit { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + $body["Description"] = $PSBoundParameters["Description"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $body["DisplayName"] = $PSBoundParameters["DisplayName"] + } + + $uri = "/v1.0/directory/administrativeUnits" + $body = $body | ConvertTo-Json + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method POST -Body $body + $response = $response | ConvertTo-Json | ConvertFrom-Json + $auList = @() + foreach($data in $response){ + $auType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAdministrativeUnit + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $auType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $auList += $auType + } + $auList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 new file mode 100644 index 0000000000..7e8b6bd707 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraAttributeSet { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Alias("Id")] + [System.String] $AttributeSetId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $MaxAttributesPerSet + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/v1.0/directory/attributeSets" + $params["Method"] = "POST" + + if ($null -ne $PSBoundParameters["AttributeSetId"]) { + $body["id"] = $PSBoundParameters["AttributeSetId"] + } + if ($null -ne $PSBoundParameters["Description"]) { + $body["description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["MaxAttributesPerSet"]) { + $body["maxAttributesPerSet"] = $PSBoundParameters["MaxAttributesPerSet"] + } + $params["Body"] = $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + if ($response) { + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAttributeSet + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0, 1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 new file mode 100644 index 0000000000..7c13174761 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomSecurityAttributeDefinition { + [CmdletBinding(DefaultParameterSetName = 'NewCustomSecurityAttributeDefinition')] + param ( + [Parameter()] + [System.String] $Description, + [Parameter(Mandatory = $true)] + [System.String] $Name, + [Parameter(Mandatory = $true)] + [System.String] $AttributeSet, + [Parameter(Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, + [Parameter(Mandatory = $true)] + [System.String] $Type, + [Parameter(Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsCollection, + [Parameter(Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsSearchable, + [Parameter(Mandatory = $true)] + [System.String] $Status + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $Uri = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions" + $Method = "POST" + + if($null -ne $PSBoundParameters["AttributeSet"]) + { + $body["attributeSet"] = $PSBoundParameters["AttributeSet"] + } + if($null -ne $PSBoundParameters["Description"]) + { + $body["description"] = $PSBoundParameters["Description"] + } + if($null -ne $PSBoundParameters["IsCollection"]) + { + $body["isCollection"] = $PSBoundParameters["IsCollection"] + } + if($null -ne $PSBoundParameters["IsSearchable"]) + { + $body["isSearchable"] = $PSBoundParameters["IsSearchable"] + } + if($null -ne $PSBoundParameters["Name"]) + { + $body["name"] = $PSBoundParameters["Name"] + } + if($null -ne $PSBoundParameters["Status"]) + { + $body["status"] = $PSBoundParameters["Status"] + } + if($null -ne $PSBoundParameters["Type"]) + { + $body["type"] = $PSBoundParameters["Type"] + } + if($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) + { + $body["usePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $type= [Microsoft.Graph.PowerShell.Models.MicrosoftGraphCustomSecurityAttributeDefinition] + $response = Invoke-GraphRequest -Uri $Uri -Method $Method -Body $body -Headers $customHeaders | ConvertTo-Json -Depth 20 | ConvertFrom-Json + $targetList = @() + foreach ($item in $response) { + $targetObject = [Activator]::CreateInstance($type) + foreach ($property in $item.PSObject.Properties) { + if ($targetObject.PSObject.Properties[$property.Name]) { + $targetObject.PSObject.Properties[$property.Name].Value = $property.Value + } + } + $targetList += $targetObject + } + $targetList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 new file mode 100644 index 0000000000..7882e0d6e4 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 @@ -0,0 +1,182 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraDevice { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsManaged, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DeviceId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceTrustType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DeviceOSVersion, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompliant, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $DeviceObjectVersion, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DeviceOSType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceMetadata, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ProfileType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SystemLabels, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["IsManaged"]) + { + $params["IsManaged"] = $PSBoundParameters["IsManaged"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["DeviceTrustType"]) + { + $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] + } + if ($null -ne $PSBoundParameters["DeviceOSVersion"]) + { + $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["IsCompliant"]) + { + $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) + { + $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["DeviceOSType"]) + { + $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) + { + $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) + { + $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DeviceMetadata"]) + { + $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + } + if ($null -ne $PSBoundParameters["ProfileType"]) + { + $params["ProfileType"] = $PSBoundParameters["ProfileType"] + } + if ($null -ne $PSBoundParameters["SystemLabels"]) + { + $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] + } + if ($null -ne $PSBoundParameters["DevicePhysicalIds"]) + { + $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgDevice @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 new file mode 100644 index 0000000000..fe942ef038 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraDomain { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SupportedServices, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefault, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Name + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["SupportedServices"]) + { + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) + { + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["IsDefault"]) + { + $params["IsDefault"] = $PSBoundParameters["IsDefault"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["Id"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 new file mode 100644 index 0000000000..680367605a --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 @@ -0,0 +1,37 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraAdministrativeUnit { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $uri = "/v1.0/directory/administrativeUnits/$($params.AdministrativeUnitId)" + $params["Uri"] = $uri + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method DELETE + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 new file mode 100644 index 0000000000..bc070f282a --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraAdministrativeUnitMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $uri = "/v1.0/directory/administrativeUnits/$AdministrativeUnitId/members/$MemberId/`$ref" + $params["Uri"] = $uri + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method DELETE + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 new file mode 100644 index 0000000000..dab22efd8b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraContact { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgContact @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 new file mode 100644 index 0000000000..b3befd6328 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDevice { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgDevice @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 new file mode 100644 index 0000000000..9c72a3fe1c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDeviceRegisteredOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["OwnerId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgDeviceRegisteredOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 new file mode 100644 index 0000000000..73fcc521d4 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDeviceRegisteredUser { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgDeviceRegisteredUserByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 new file mode 100644 index 0000000000..df8f099878 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDirectoryRoleMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + { + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgDirectoryRoleMemberByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 new file mode 100644 index 0000000000..7b9bab7909 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDomain { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 new file mode 100644 index 0000000000..00d796052b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraScopedRoleMembership { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ScopedRoleMembershipId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) + { + $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] + } + + $uri = "/v1.0/directory/administrativeUnits/$($params.AdministrativeUnitId)/scopedRoleMembers/$($params.ScopedRoleMembershipId)" + $params["Uri"] = $uri + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method DELETE + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 new file mode 100644 index 0000000000..229e6e710b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraAdministrativeUnit { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $body["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + $body["Description"] = $PSBoundParameters["Description"] + } + + $uri = "/v1.0/directory/administrativeUnits/$($params.AdministrativeUnitId)" + $params["Uri"] = $uri + + $body = $body | ConvertTo-Json + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method PATCH -Body $body + + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 new file mode 100644 index 0000000000..10eb598c95 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraAttributeSet { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Alias("Id")] + [System.String] $AttributeSetId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $MaxAttributesPerSet + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/v1.0/directory/attributeSets/" + $params["Method"] = "PATCH" + if($null -ne $PSBoundParameters["AttributeSetId"]) + { + $params["Uri"] += $AttributeSetId + } + if($null -ne $PSBoundParameters["Description"]) + { + $body["description"] = $PSBoundParameters["Description"] + } + if($null -ne $PSBoundParameters["MaxAttributesPerSet"]) + { + $body["maxAttributesPerSet"] = $PSBoundParameters["MaxAttributesPerSet"] + } + $params["Body"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 new file mode 100644 index 0000000000..f5f381e76c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraCustomSecurityAttributeDefinition { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Status + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $Uri = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/$Id" + $Method = "PATCH" + + if($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["Description"]) + { + $body["description"] = $PSBoundParameters["Description"] + } + if($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) + { + $body["usePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] + } + if($null -ne $PSBoundParameters["Status"]) + { + $body["status"] = $PSBoundParameters["Status"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Uri $Uri -Method $Method -Body $body -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 new file mode 100644 index 0000000000..e8f5f16bcb --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -0,0 +1,46 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraCustomSecurityAttributeDefinitionAllowedValue { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsActive, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomSecurityAttributeDefinitionId + ) + + PROCESS { + + $params = @{} + $body = @{} + + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $Uri = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/$CustomSecurityAttributeDefinitionId/allowedValues/$Id" + $Method = "PATCH" + + if($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["IsActive"]) + { + $body["IsActive"] = $PSBoundParameters["IsActive"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Uri $Uri -Method $Method -Body $body -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 new file mode 100644 index 0000000000..1f40091ff8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 @@ -0,0 +1,185 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraDevice { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $DeviceObjectVersion, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceOSVersion, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompliant, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceTrustType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsManaged, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ProfileType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceOSType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceMetadata, + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceObjectId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SystemLabels + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["DeviceObjectVersion"]) + { + $params["DeviceVersion"] = $PSBoundParameters["DeviceObjectVersion"] + } + if($null -ne $PSBoundParameters["DeviceOSVersion"]) + { + $params["OperatingSystemVersion"] = $PSBoundParameters["DeviceOSVersion"] + } + if($null -ne $PSBoundParameters["AlternativeSecurityIds"]) + { + $TmpValue = $PSBoundParameters["AlternativeSecurityIds"] + $key = [System.Text.Encoding]::UTF8.GetString($TmpValue.key) + $Temp = @{ + alternativeSecurityIds = @( + @{ + type = $TmpValue.type + key = [System.Text.Encoding]::ASCII.GetBytes($key) + } + ) + } + $Value = $Temp + $params["BodyParameter"] = $Value + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId1"] = $PSBoundParameters["DeviceId"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) + { + $params["ApproximateLastSignInDateTime"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["DevicePhysicalIds"]) + { + $params["PhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["IsCompliant"]) + { + $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] + } + if($null -ne $PSBoundParameters["DeviceTrustType"]) + { + $params["TrustType"] = $PSBoundParameters["DeviceTrustType"] + } + if($null -ne $PSBoundParameters["IsManaged"]) + { + $params["IsManaged"] = $PSBoundParameters["IsManaged"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["ProfileType"]) + { + $params["ProfileType"] = $PSBoundParameters["ProfileType"] + } + if($null -ne $PSBoundParameters["DeviceOSType"]) + { + $params["OperatingSystem"] = $PSBoundParameters["DeviceOSType"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if($null -ne $PSBoundParameters["DeviceMetadata"]) + { + $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["DeviceObjectId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceObjectId"] + } + if($null -ne $PSBoundParameters["SystemLabels"]) + { + $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] + } + if($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgDevice @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 new file mode 100644 index 0000000000..690b8eae82 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 @@ -0,0 +1,104 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraDirSyncConfiguration { + [CmdletBinding(DefaultParameterSetName = 'SetAccidentalDeletionThreshold')] + param ( + [Parameter(ParameterSetName = "SetAccidentalDeletionThreshold", ValueFromPipelineByPropertyName = $true, Mandatory = $true)][System.UInt32] $AccidentalDeletionThreshold, + [Parameter(ParameterSetName = "SetAccidentalDeletionThreshold", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, + [switch] $Force + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["AccidentalDeletionThreshold"]) { + $AccidentalDeletionThreshold = $PSBoundParameters["AccidentalDeletionThreshold"] + } + if ($null -ne $PSBoundParameters["TenantId"]) { + $TenantId = $PSBoundParameters["TenantId"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + if ($Force) { + $decision = 0 + } + else { + $title = 'Confirm' + $question = 'Do you want to continue?' + $Suspend = New-Object System.Management.Automation.Host.ChoiceDescription "&Suspend", "S" + $Yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Y" + $No = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "S" + $choices = [System.Management.Automation.Host.ChoiceDescription[]]($Yes, $No, $Suspend) + $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) + } + + if ($decision -eq 0) { + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $OnPremisesDirectorySynchronizationId = (Get-MgDirectoryOnPremiseSynchronization).Id + } + else { + $OnPremisesDirectorySynchronizationId = $TenantId + } + $params = @{ + configuration = @{ + accidentalDeletionPrevention = @{ + synchronizationPreventionType = "enabledForCount" + alertThreshold = $AccidentalDeletionThreshold + } + } + } + $response = Update-MgDirectoryOnPremiseSynchronization -Headers $customHeaders -OnPremisesDirectorySynchronizationId $OnPremisesDirectorySynchronizationId -BodyParameter $params + $response + } + else { + return + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 new file mode 100644 index 0000000000..f07475edb5 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 @@ -0,0 +1,48 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraDirSyncEnabled { + [CmdletBinding(DefaultParameterSetName = 'All')] + param ( + [Parameter(ParameterSetName = "All", ValueFromPipelineByPropertyName = $true, Mandatory = $true)][System.Boolean] $EnableDirsync, + [Parameter(ParameterSetName = "All", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, + [switch] $Force + ) + + PROCESS { + $params = @{} + $body = @{} + $OrganizationId='' + $params["Method"] = "PATCH" + $URL = "https://graph.microsoft.com/v1.0/organization/" + $TenantId + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($EnableDirsync -or (-not($EnableDirsync))) { + $body["OnPremisesSyncEnabled"] =$PSBoundParameters["EnableDirsync"] + } + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $OrganizationId = ((invoke-mggraphrequest -Method GET -Uri "https://graph.microsoft.com/v1.0/directory/onPremisesSynchronization/").value).id + $URL = "https://graph.microsoft.com/v1.0/organization/" + $OrganizationId + } + + $params["Uri"] = $URL + $params["Body"] = $body + + if ($Force) { + $decision = 0 + } + else { + $title = 'Confirm' + $question = 'Do you want to continue?' + $Suspend = New-Object System.Management.Automation.Host.ChoiceDescription "&Suspend", "S" + $Yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Y" + $No = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "S" + $choices = [System.Management.Automation.Host.ChoiceDescription[]]($Yes, $No, $Suspend) + $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) + } + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 new file mode 100644 index 0000000000..be4c90efc1 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraDirSyncFeature { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", Mandatory = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Feature, + [Parameter(ParameterSetName = "GetQuery", Mandatory = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $Enabled, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipelineByPropertyName = $true)][ValidateNotNullOrEmpty()][ValidateScript({if ($_ -is [System.Guid]) { $true } else {throw "TenantId must be of type [System.Guid]."}})][System.Guid] $TenantId, + [switch] $Force + ) + PROCESS { + + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["Feature"]) { + $Feature = $PSBoundParameters["Feature"] + "Enabled" + } + if ($null -ne $PSBoundParameters["Enabled"]) { + $Enabled = $PSBoundParameters["Enabled"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $OnPremisesDirectorySynchronizationId = (Get-MgDirectoryOnPremiseSynchronization).Id + } + else { + $OnPremisesDirectorySynchronizationId = $TenantId + } + $body = @{ + features = @{ $Feature = $Enabled } + } + $body = $body | ConvertTo-Json + if ($Force) { + # If -Force is used, skip confirmation and proceed with the action. + $decision = 0 + } + else { + $title = 'Confirm' + $question = 'Do you want to continue?' + $Suspend = new-Object System.Management.Automation.Host.ChoiceDescription "&Suspend", "S" + $Yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Y" + $No = new-Object System.Management.Automation.Host.ChoiceDescription "&No", "N" + $choices = [System.Management.Automation.Host.ChoiceDescription[]]( $Yes, $No, $Suspend) + $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) + } + if ($decision -eq 0) { + $response = Update-MgDirectoryOnPremiseSynchronization -Headers $customHeaders -OnPremisesDirectorySynchronizationId $OnPremisesDirectorySynchronizationId -BodyParameter $body + $response + } + else { + return + } + + + } + }# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 new file mode 100644 index 0000000000..3a1baae69f --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraDomain { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SupportedServices, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefault, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["SupportedServices"]) + { + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) + { + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["IsDefault"]) + { + $params["IsDefault"] = $PSBoundParameters["IsDefault"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 new file mode 100644 index 0000000000..d48d71e173 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 @@ -0,0 +1,130 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraDomainFederationSettings { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param( + [Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)][string]$DomainName, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$SigningCertificate, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$NextSigningCertificate, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$LogOffUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$PassiveLogOnUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$ActiveLogOnUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$IssuerUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$FederationBrandName, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$MetadataExchangeUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$PreferredAuthenticationProtocol, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]$SigningCertificateUpdateStatus, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$PromptLoginBehavior + ) + process { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DomainName"]) + { + $params["DomainId"] = $PSBoundParameters["DomainName"] + $Id = $PSBoundParameters["DomainName"] + if($null -ne $Id) + { + $params["InternalDomainFederationId"] = (Get-MgDomainFederationConfiguration -DomainId $Id).Id + } + } + if($null -ne $PSBoundParameters["SigningCertificate"]) + { + $params["SigningCertificate"] = $PSBoundParameters["SigningCertificate"] + } + if($null -ne $PSBoundParameters["NextSigningCertificate"]) + { + $params["NextSigningCertificate"] = $PSBoundParameters["NextSigningCertificate"] + } + if($null -ne $PSBoundParameters["LogOffUri"]) + { + $params["SignOutUri"] = $PSBoundParameters["LogOffUri"] + } + if($null -ne $PSBoundParameters["PassiveLogOnUri"]) + { + $params["PassiveSignInUri"] = $PSBoundParameters["PassiveLogOnUri"] + } + if($null -ne $PSBoundParameters["ActiveLogOnUri"]) + { + $params["ActiveSignInUri"] = $PSBoundParameters["ActiveLogOnUri"] + } + if($null -ne $PSBoundParameters["IssuerUri"]) + { + $params["IssuerUri"] = $PSBoundParameters["IssuerUri"] + } + if($null -ne $PSBoundParameters["FederationBrandName"]) + { + $params["DisplayName"] = $PSBoundParameters["FederationBrandName"] + } + if($null -ne $PSBoundParameters["MetadataExchangeUri"]) + { + $params["MetadataExchangeUri"] = $PSBoundParameters["MetadataExchangeUri"] + } + if($null -ne $PSBoundParameters["PreferredAuthenticationProtocol"]) + { + $params["PreferredAuthenticationProtocol"] = $PSBoundParameters["PreferredAuthenticationProtocol"] + } + if($null -ne $PSBoundParameters["SigningCertificateUpdateStatus"]) + { + $params["SigningCertificateUpdateStatus"] = $PSBoundParameters["SigningCertificateUpdateStatus"] + } + if($null -ne $PSBoundParameters["PromptLoginBehavior"]) + { + $params["PromptLoginBehavior"] = $PSBoundParameters["PromptLoginBehavior"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if($null -ne $params.InternalDomainFederationId) + { + $response = Update-MgDomainFederationConfiguration @params -Headers $customHeaders + $response + } + } + } + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 new file mode 100644 index 0000000000..b55dc4dfeb --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraPartnerInformation { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter( ValueFromPipelineByPropertyName = $true)] + [System.Guid] $ObjectId, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $CompanyType, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $PartnerCommerceUrl, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $PartnerCompanyName, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $PartnerHelpUrl, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string[]] $PartnerSupportEmails, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string[]] $PartnerSupportTelephones, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $PartnerSupportUrl, + [Parameter(ValueFromPipelineByPropertyName = $true)] + [System.Guid] $TenantId + ) + + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["TenantId"]) { + $body["partnerTenantId"] = $PSBoundParameters["TenantId"] + } + if ($null -ne $PSBoundParameters["CompanyType"]) { + $body["companyType"] = $PSBoundParameters["CompanyType"] + } + if ($null -ne $PSBoundParameters["PartnerCommerceUrl"]) { + $body["commerceUrl"] = $PSBoundParameters["PartnerCommerceUrl"] + } + if ($null -ne $PSBoundParameters["PartnerCompanyName"]) { + $body["companyName"] = $PSBoundParameters["PartnerCompanyName"] + } + if ($null -ne $PSBoundParameters["PartnerHelpUrl"]) { + $body["helpUrl"] = $PSBoundParameters["PartnerHelpUrl"] + } + if ($null -ne $PSBoundParameters["PartnerSupportEmails"]) { + $body["supportEmails"] = @($PSBoundParameters["PartnerSupportEmails"]) + } + if ($null -ne $PSBoundParameters["PartnerSupportTelephones"]) { + $body["supportTelephones"] = @($PSBoundParameters["PartnerSupportTelephones"] -as [string[]]) + } + if ($null -ne $PSBoundParameters["PartnerSupportUrl"]) { + $body["supportUrl"] = $PSBoundParameters["PartnerSupportUrl"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $TenantID = ((Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/organization").value).id + } + Invoke-MgGraphRequest -Headers $customHeaders -Method PATCH -Uri "https://graph.microsoft.com/v1.0/organization/$TenantID/partnerInformation" -Body $body + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 new file mode 100644 index 0000000000..330e59e310 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraTenantDetail { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationPhones, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationMails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["MarketingNotificationEmails"]) + { + $params["MarketingNotificationEmails"] = $PSBoundParameters["MarketingNotificationEmails"] + } + + if($null -ne $PSBoundParameters["SecurityComplianceNotificationMails"]) + { + $params["SecurityComplianceNotificationMails"] = $PSBoundParameters["SecurityComplianceNotificationMails"] + } + + if($null -ne $PSBoundParameters["SecurityComplianceNotificationPhones"]) + { + $params["SecurityComplianceNotificationPhones"] = $PSBoundParameters["SecurityComplianceNotificationPhones"] + } + + if($null -ne $PSBoundParameters["TechnicalNotificationMails"]) + { + $params["TechnicalNotificationMails"] = $PSBoundParameters["TechnicalNotificationMails"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================") + + $params["OrganizationId"] = (Get-MgOrganization).Id + Update-MgOrganization @params -Headers $customHeaders + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 b/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 new file mode 100644 index 0000000000..06625c0688 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 @@ -0,0 +1,236 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAlias { + Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraUserOwnedObject -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraGroupMember -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraDirectoryRoleTemplate -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-EntraAdministrativeUnit -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Set-AzureADUserManager -Value Set-EntraUserManager -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force + Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraUserPassword -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force + Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Set-AzureADDevice -Value Set-EntraDevice -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADContract -Value Get-EntraContract -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force + Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADDevice -Value New-EntraDevice -Scope Global -Force + Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraUserExtension -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraUserLicense -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraDomainVerificationDnsRecord -Scope Global -Force + Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraUserCreatedObject -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force + Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraUserMembership -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADGroup -Value Get-EntraGroup -Scope Global -Force + Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraUserLicenseDetail -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraApplicationServiceEndpoint -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Connect-AzureAD -Value Connect-Entra -Scope Global -Force + Set-Alias -Name Disconnect-AzureAD -Value Disconnect-Entra -Scope Global -Force + Set-Alias -Name Remove-EntraRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name New-EntraRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Set-EntraRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-EntraRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-EntraRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name New-EntraRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-EntraServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Remove-EntraServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-EntraServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Add-EntraCustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Get-EntraAuditDirectoryLogs -Value Get-EntraAuditDirectoryLog -Scope Global -Force + Set-Alias -Name Get-EntraAuditSignInLogs -Value Get-EntraAuditSignInLog -Scope Global -Force +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..18bb52ba45 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-EntraRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name New-EntraRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Set-EntraRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-EntraRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-EntraRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name New-EntraRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 new file mode 100644 index 0000000000..0f7acf1bca --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDirectoryRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleAssignmentId, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + { + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["SearchString"]) + { + $params["SearchString"] = $PSBoundParameters["SearchString"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgRoleManagementDirectoryRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 new file mode 100644 index 0000000000..84a2e4b23b --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 @@ -0,0 +1,125 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDirectoryRoleDefinition { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleDefinitionId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"} + if($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + { + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgRoleManagementDirectoryRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + $propsToConvert = @('RolePermissions') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 new file mode 100644 index 0000000000..cd1e5451b6 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraDirectoryRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PrincipalId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $RoleDefinitionId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DirectoryScopeId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["PrincipalId"]) + { + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + { + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["DirectoryScopeId"]) + { + $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgRoleManagementDirectoryRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 new file mode 100644 index 0000000000..c9be0cd37f --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 @@ -0,0 +1,132 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraDirectoryRoleDefinition { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TemplateId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Version, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["TemplateId"]) + { + $params["TemplateId"] = $PSBoundParameters["TemplateId"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Version"]) + { + $params["Version"] = $PSBoundParameters["Version"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ResourceScopes"]) + { + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) + { + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if($null -ne $PSBoundParameters["RolePermissions"]) + { + $TmpValue = $PSBoundParameters["RolePermissions"] + $Temp = @{ + allowedResourceActions = $TmpValue.allowedResourceActions + condition = $TmpValue.condition + } + $Value = $Temp + $params["RolePermissions"] = $Value + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgRoleManagementDirectoryRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 new file mode 100644 index 0000000000..cd16ac4fc4 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDirectoryRoleAssignment { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleAssignmentId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + { + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgRoleManagementDirectoryRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 new file mode 100644 index 0000000000..293d53c09d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraDirectoryRoleDefinition { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleDefinitionId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + { + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgRoleManagementDirectoryRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 new file mode 100644 index 0000000000..bf57845b42 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 @@ -0,0 +1,143 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraDirectoryRoleDefinition { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleDefinitionId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TemplateId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Version, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + { + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["TemplateId"]) + { + $params["TemplateId"] = $PSBoundParameters["TemplateId"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Version"]) + { + $params["Version"] = $PSBoundParameters["Version"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ResourceScopes"]) + { + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) + { + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if($null -ne $PSBoundParameters["RolePermissions"]) + { + $TmpValue = $PSBoundParameters["RolePermissions"] + $Value = @() + foreach($val in $TmpValue) + { + $Temp = $val | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $hash[$_.Name] = $_.Value } + $Value += $hash + } + $params["RolePermissions"] = $Value + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgRoleManagementDirectoryRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 new file mode 100644 index 0000000000..13b6f20463 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraGroupMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["RefObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgGroupMember @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 new file mode 100644 index 0000000000..b75d7e6c91 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraGroupOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} + $params["BodyParameter"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgGroupOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 new file mode 100644 index 0000000000..576bdcb18a --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraLifecyclePolicyGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Add-MgGroupToLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..3671f5ac83 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraGroupMember -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force + Set-Alias -Name Get-AzureADGroup -Value Get-EntraGroup -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 new file mode 100644 index 0000000000..e8acc5e627 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 @@ -0,0 +1,128 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraDeletedGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"} + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgDirectoryDeletedItemAsGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 new file mode 100644 index 0000000000..dce890fa05 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 @@ -0,0 +1,128 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 new file mode 100644 index 0000000000..b6b2cbd0f2 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraGroupAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgGroupAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 new file mode 100644 index 0000000000..2b2bb1ce0e --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraGroupLifecyclePolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgGroupLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 new file mode 100644 index 0000000000..6ab247754a --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 @@ -0,0 +1,134 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraGroupMember { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $baseUri = 'https://graph.microsoft.com/v1.0/groups' + $properties = '$select=*' + $Method = "GET" + + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + $URI = "$baseUri/$($params.GroupId)/members?$properties" + } + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.GroupId)/members?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $minTop = 999 + $URI = "$baseUri/$($params.GroupId)/members?`$top=999&$properties" + } + else{ + $URI = "$baseUri/$($params.GroupId)/members?`$top=$topCount&$properties" + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $data = $response + try { + $data = @($response.value) + $all = $All.IsPresent + $increment = $topCount - $data.Count + while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { + $URI = $response.'@odata.nextLink' + if ($increment -gt 0) { + $topValue = [Math]::Min($increment, 999) + if($minTop){ + $URI = $URI.Replace("`$top=$minTop", "`$top=$topValue") + } + else{ + $URI = $URI.Replace("`$top=$topCount", "`$top=$topValue") + } + $increment -= $topValue + } + $response = Invoke-GraphRequest -Uri $URI -Method $Method + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } catch {} + $data | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $serviceprincipal = @() + if (($data.count -eq 0) -or $data.'@odata.type' -notcontains 'microsoft.graph.servicePrincipal') { + $URI = "$baseUri/$($params.GroupId)/members/microsoft.graph.servicePrincipal?$properties" + $topCount = $Top - $data.count + if ($PSBoundParameters.ContainsKey("Top") -and $topCount -gt 0) { + $increment = $topCount - $data.Count + $increment = 1 + $hasNextLink = $false + + do { + $topValue = [Math]::Min($topCount, 999) + $URI = "$baseUri/$($params.GroupId)/members/microsoft.graph.servicePrincipal?`$top=$topValue&$properties" + $response = Invoke-GraphRequest -Uri $URI -Method $Method -Headers $customHeaders + $serviceprincipal += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $hasNextLink = $null -ne $response.PSObject.Properties.Match('@odata.nextLink') + $increment-- + } while ($increment -gt 0 -and $hasNextLink) + } + elseif($null -eq $PSBoundParameters["Top"]){ + $response = Invoke-GraphRequest -Uri $URI -Method $Method -Headers $customHeaders + $serviceprincipal += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + try{ + $serviceprincipal | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name '@odata.type' -Value '#microsoft.graph.servicePrincipal' -Force + } + } + $data += $serviceprincipal + } + catch {} + } + if($data){ + $userList = @() + foreach ($response in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + if (-not ($response -is [psobject])) { + $response = [pscustomobject]@{ Value = $response } + } + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 new file mode 100644 index 0000000000..ef3434e3b8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraGroupOwner { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $baseUri = 'https://graph.microsoft.com/v1.0/groups' + $properties = '$select=*' + $Method = "GET" + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + $URI = "$baseUri/$($params.GroupId)/owners?$properties" + } + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.GroupId)/owners?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + $URI = "$baseUri/$($params.GroupId)/owners?`$top=$topCount&$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 new file mode 100644 index 0000000000..9ea2d2fa2c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraGroupPermissionGrant { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgGroupPermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 new file mode 100644 index 0000000000..5fde4c5d59 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraLifecyclePolicyGroup { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgGroupLifecyclePolicyByGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 new file mode 100644 index 0000000000..854d36fda7 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraObjectSetting { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetType, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetObjectId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $topCount = $null + $baseUri = "https://graph.microsoft.com/v1.0/$TargetType/$TargetObjectId/settings" + $params["Method"] = "GET" + $params["Uri"] = $baseUri+'?$select=*' + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $params["Uri"] = $baseUri+"?`$select=$($selectProperties)" + } + if($PSBoundParameters.ContainsKey("Top") -and (-not $PSBoundParameters.ContainsKey("All"))) + { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $params["Uri"] += "&`$top=999" + } + else{ + $params["Uri"] += "&`$top=$topCount" + } + } + if($null -ne $PSBoundParameters["Id"]) + { + $Id = $PSBoundParameters["Id"] + $params["Uri"] = "$baseUri/$($Id)" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + try { + $data = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $all = $All.IsPresent + $increment = $topCount - $data.Count + while ($response.'@odata.nextLink' -and (($all) -or ($increment -gt 0 -and -not $all))) { + $params["Uri"] = $response.'@odata.nextLink' + if (-not $all) { + $topValue = [Math]::Min($increment, 999) + $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $increment -= $topValue + } + $response = Invoke-GraphRequest @params + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } catch {} + + $targetTypeList = @() + + if($TargetType.ToLower() -eq 'groups'){ + foreach($res in $data){ + $groupType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphGroupSetting + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $groupType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetTypeList += $groupType + } + } + + if($TargetType.ToLower() -eq 'users'){ + foreach($res in $data){ + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphUserSettings + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetTypeList += $userType + } + } + + $targetTypeList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 new file mode 100644 index 0000000000..c64cc58176 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 @@ -0,0 +1,133 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $MailNickname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $SecurityEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $MailEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Visibility, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $GroupTypes + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["MailNickname"]) + { + $params["MailNickname"] = $PSBoundParameters["MailNickname"] + } + if ($null -ne $PSBoundParameters["SecurityEnabled"]) + { + $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["MailEnabled"]) + { + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Visibility"]) + { + $params["Visibility"] = $PSBoundParameters["Visibility"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + { + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["GroupTypes"]) + { + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 new file mode 100644 index 0000000000..1275890e29 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraGroupAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppRoleId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PrincipalId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["AppRoleId"]) + { + $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PrincipalId"]) + { + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgGroupAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 new file mode 100644 index 0000000000..f135d53338 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraGroupLifecyclePolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ManagedGroupTypes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AlternateNotificationEmails + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + { + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + { + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + } + if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) + { + $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgGroupLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 new file mode 100644 index 0000000000..f933aeed2d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraGroup { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 new file mode 100644 index 0000000000..91e1a7a219 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraGroupAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppRoleAssignmentId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + { + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgGroupAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 new file mode 100644 index 0000000000..f3a17f74a8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraGroupLifecyclePolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgGroupLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 new file mode 100644 index 0000000000..6e9d37af62 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraGroupMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgGroupMemberByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 new file mode 100644 index 0000000000..49ce25a572 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraGroupOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["OwnerId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgGroupOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 new file mode 100644 index 0000000000..b698ca4877 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraLifecyclePolicyGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgGroupFromLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 new file mode 100644 index 0000000000..679810be3d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Reset-EntraLifeCycleGroup { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["GroupId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-MgRenewGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 new file mode 100644 index 0000000000..7641c0ef00 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Select-EntraGroupIdsContactIsMemberOf { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["OrgContactId"] = $PSBoundParameters["ObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $initalResponse = Get-MgContactMemberOfAsGroup @params -Headers $customHeaders + $response = $initalResponse | Where-Object -Filterscript {$_.Id -in ($GroupIdsForMembershipCheck.GroupIds)} + if($response){ + $response.Id + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 new file mode 100644 index 0000000000..e7201dc21d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 @@ -0,0 +1,94 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Select-EntraGroupIdsGroupIsMemberOf { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["GroupId"] = $PSBoundParameters["ObjectId"] + } + if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) + { + $GroupIdData = Get-EntraGroup -All + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $initalResponse = Get-MgGroupMemberOf @params -Headers $customHeaders + $response = $initalResponse | Where-Object -Filterscript {$_.Id -in ($GroupIdsForMembershipCheck.GroupIds)} + $result=@() + if($response){ + $result = $response.Id + } + $notMember = $GroupIdsForMembershipCheck.GroupIds | Where-Object -Filterscript { $_ -notin $result } + foreach ($Id in $notMember) { + if ($GroupIdData.Id -notcontains $Id) { + Write-Error "Error occurred while executing SelectEntraGroupIdsGroupIsMemberOf +Code: Request_BadRequest +Message: Invalid GUID:$Id" + return + } + } + if($response){ + $response.Id + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 new file mode 100644 index 0000000000..a4e66f7749 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Select-EntraGroupIdsUserIsMemberOf { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $initalResponse = Get-MgUserMemberOfAsGroup -Headers $customHeaders -UserId $params["UserId"] + $response = $initalResponse | Where-Object -Filterscript {$_.ID -in ($GroupIdsForMembershipCheck.GroupIds)} + if($response){ + $response.ID + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 new file mode 100644 index 0000000000..913e5f6747 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 @@ -0,0 +1,140 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $SecurityEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $GroupTypes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $MailEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Visibility, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MailNickname + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["SecurityEnabled"]) + { + $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["GroupTypes"]) + { + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + } + if ($null -ne $PSBoundParameters["MailEnabled"]) + { + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Visibility"]) + { + $params["Visibility"] = $PSBoundParameters["Visibility"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + { + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["MailNickname"]) + { + $params["MailNickname"] = $PSBoundParameters["MailNickname"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 new file mode 100644 index 0000000000..25167a96a3 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraGroupLifecyclePolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ManagedGroupTypes, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AlternateNotificationEmails + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + { + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + { + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + } + if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) + { + $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgGroupLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..8f38ff13ac --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,40 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 b/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 new file mode 100644 index 0000000000..36df233f27 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraInvitation { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $InvitedUserEmailAddress, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $InvitedUserType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $SendInvitationMessage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $InvitedUserDisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.User] $InvitedUser, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $InviteRedirectUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["InvitedUser"]) + { + $TmpValue = $PSBoundParameters["InvitedUser"] + $Temp = @{} + foreach ($property in $TmpValue.PSObject.Properties) { + $Temp[$property.Name] = $property.Value + } + $params["InvitedUser"] = $Temp + } + if($null -ne $PSBoundParameters["InvitedUserMessageInfo"]) + { + $TmpValue = $PSBoundParameters["InvitedUserMessageInfo"] + $Temp = @{} + $Temp["CustomizedMessageBody"] = $TmpValue.CustomizedMessageBody + $Temp["MessageLanguage"] = $TmpValue.MessageLanguage + $Temp["CcRecipients"] = $TmpValue.CcRecipients + $Value = $Temp + $params["InvitedUserMessageInfo"] = $Value + } + if($null -ne $PSBoundParameters["InvitedUserType"]) + { + $params["InvitedUserType"] = $PSBoundParameters["InvitedUserType"] + } + if($null -ne $PSBoundParameters["SendInvitationMessage"]) + { + $params["SendInvitationMessage"] = $PSBoundParameters["SendInvitationMessage"] + } + if($null -ne $PSBoundParameters["InvitedUserEmailAddress"]) + { + $params["InvitedUserEmailAddress"] = $PSBoundParameters["InvitedUserEmailAddress"] + } + if($null -ne $PSBoundParameters["InvitedUserDisplayName"]) + { + $params["InvitedUserDisplayName"] = $PSBoundParameters["InvitedUserDisplayName"] + } + if($null -ne $PSBoundParameters["InviteRedirectUrl"]) + { + $params["InviteRedirectUrl"] = $PSBoundParameters["InviteRedirectUrl"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = New-MgInvitation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..49db31eea3 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 b/module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 new file mode 100644 index 0000000000..b9bd962b8d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 @@ -0,0 +1,139 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Test-EntraScript { + <# + .SYNOPSIS + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. + + .DESCRIPTION + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. + + .PARAMETER Path + Path to the script file(s) to scan. + Or name of the content, when also specifying -Content + + .PARAMETER Content + Code content to scan. + Used when scanning code that has no file representation (e.g. straight from a repository). + + .PARAMETER Quiet + Only return $true or $false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($false) + + .EXAMPLE + PS C:\> Test-EntraScript -Path .\usercreation.ps1 -Quiet + + Returns whether the script "usercreation.ps1" could run under Microsoft.Graph.Entra + + .EXAMPLE + PS C:\> Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript + + Returns a list of all scripts that would not run under the Microsoft.Graph.Entra module, listing each issue with line and code. + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias('FullName', 'Name')] + [string[]] + $Path, + + [Parameter(ValueFromPipelineByPropertyName = $true)] + [string] + $Content, + + [switch] + $Quiet + ) + + begin { + function Test-ScriptCommand { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [Alias('FullName')] + [string] + $Name, + + [Parameter(Mandatory = $true)] + [string] + $Content, + + [switch] + $Quiet, + + [AllowEmptyCollection()] + [string[]] + $RequiredCommands, + + [AllowEmptyCollection()] + [string[]] + $ForbiddenCommands + ) + + $ast = [System.Management.Automation.Language.Parser]::ParseInput($Content, [ref]$null, [ref]$null) + $allCommands = $ast.FindAll({ $args[0] -is [System.Management.Automation.Language.CommandAst] }, $true) + $allCommandNames = @($allCommands).ForEach{ $_.CommandElements[0].Value } + + $findings = @() + foreach ($command in $allCommands) { + if ($command.CommandElements[0].Value -notin $ForbiddenCommands) { continue } + $findings += [PSCustomObject]@{ + PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' + Name = $Name + Line = $command.Extent.StartLineNumber + Type = 'UnsupportedCommand' + Command = $command.CommandElements[0].Value + Code = $command.Extent.Text + } + } + foreach ($requiredCommand in $RequiredCommands) { + if ($requiredCommand -notin $allCommandNames) { continue } + $findings += [PSCustomObject]@{ + PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' + Name = $Name + Line = -1 + Type = 'RequiredCommandMissing' + Command = $requiredCommand + Code = '' + } + } + + if (-not $Quiet) { + $findings + return + } + + $findings -as [bool] + } + + $testParam = @{ + Quiet = $Quiet + ForbiddenCommands = $script:MISSING_CMDS + } + } + process { + if ($Path -and $Content) { + Test-ScriptCommand -Name @($Path)[0] -Content $Content + return + } + foreach ($entry in $Path) { + try { $resolvedPaths = Resolve-Path -Path $entry -ErrorAction Stop } + catch { + Write-Error $_ + continue + } + + foreach ($resolvedPath in $resolvedPaths) { + if (-not (Test-Path -Path $resolvedPath -PathType Leaf)) { + Write-Warning "Not a file: $resolvedPath" + continue + } + + $scriptContent = (Get-Content -LiteralPath $resolvedPath) -join "`n" + Test-ScriptCommand -Name $resolvedPath -Content $scriptContent @testParam + } + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..91f0f7f55a --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,41 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-EntraAuditDirectoryLogs -Value Get-EntraAuditDirectoryLog -Scope Global -Force + Set-Alias -Name Get-EntraAuditSignInLogs -Value Get-EntraAuditSignInLog -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 new file mode 100644 index 0000000000..3f129fc7c3 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraAuditDirectoryLog { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter + ) + + PROCESS { + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $topCount = $null + $baseUri = 'https://graph.microsoft.com/v1.0/auditLogs/directoryAudits' + $params["Method"] = "GET" + $params["Uri"] = "$baseUri"+"?" + + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $params["Uri"] += "&`$top=999" + } + else{ + $params["Uri"] += "&`$top=$topCount" + } + } + if($null -ne $PSBoundParameters["Id"]) + { + $LogId = $PSBoundParameters["Id"] + $params["Uri"] = "$baseUri/$($LogId)" + } + if($null -ne $PSBoundParameters["Filter"]) + { + $Filter = $PSBoundParameters["Filter"] + $f = '$Filter' + $params["Uri"] += "&$f=$Filter" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + try { + $data = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $all = $All.IsPresent + $increment = $topCount - $data.Count + while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { + $params["Uri"] = $response.'@odata.nextLink' + if ($increment -gt 0) { + $topValue = [Math]::Min($increment, 999) + $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $increment -= $topValue + } + $response = Invoke-GraphRequest @params + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } catch {} + + $userList = @() + foreach ($response in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryAudit + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 new file mode 100644 index 0000000000..0d3e8a1751 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraAuditSignInLog { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("Id")] + [System.String] $SignInId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter + ) + + PROCESS { + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $topCount = $null + $baseUri = 'https://graph.microsoft.com/v1.0/auditLogs/signIns' + $params["Method"] = "GET" + $params["Uri"] = "$baseUri" + $query = $null + + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $query += "&`$top=999" + } + else{ + $query += "&`$top=$topCount" + } + } + + if($null -ne $PSBoundParameters["SignInId"]) + { + $logId = $PSBoundParameters["SignInId"] + $params["Uri"] = "$baseUri/$($logId)" + } + if($null -ne $PSBoundParameters["Filter"]) + { + $Filter = $PSBoundParameters["Filter"] + $f = '$filter' + $query += "&$f=$Filter" + } + + if($null -ne $query) + { + $query = "?" + $query.TrimStart("&") + $params["Uri"] += $query + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $data = $response | ConvertTo-Json -Depth 100 | ConvertFrom-Json + try { + $data = $response.value | ConvertTo-Json -Depth 100 | ConvertFrom-Json + $all = $All.IsPresent + $increment = $topCount - $data.Count + while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { + $params["Uri"] = $response.'@odata.nextLink' + if ($increment -gt 0) { + $topValue = [Math]::Min($increment, 999) + $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $increment -= $topValue + } + $response = Invoke-GraphRequest @params + $data += $response.value | ConvertTo-Json -Depth 100 | ConvertFrom-Json + } + } catch {} + $userList = @() + foreach ($response in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphSignIn + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..92983cb8b9 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 new file mode 100644 index 0000000000..755f4b8eef --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 @@ -0,0 +1,55 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraAuthorizationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/authorizationPolicy?" + $params["Method"] = "GET" + + if($null -ne $PSBoundParameters["Id"]) + { + $Id = $Id.Substring(0, 1).ToLower() + $Id.Substring(1) + $Filter = "Id eq '$Id'" + $f = '$' + 'Filter' + $params["Uri"] += "&$f=$Filter" + } + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $params["Uri"] += "&$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + if($response){ + $policyList = @() + foreach ($data in $response) { + $policyType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAuthorizationPolicy + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $policyType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $policyList += $policyType + } + $policyList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 new file mode 100644 index 0000000000..139c1049c2 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraConditionalAccessPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgIdentityConditionalAccessPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 new file mode 100644 index 0000000000..3558d25a9a --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraFeatureRolloutPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $baseUri = 'https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies' + $params["Method"] = "GET" + $params["Uri"] = "$baseUri" + $query = $null + + if($null -ne $PSBoundParameters["Id"]) + { + $Id = $PSBoundParameters["Id"] + $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies/$Id" + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $FilterValue = $PSBoundParameters["SearchString"] + $filter="displayName eq '$FilterValue' or startswith(displayName,'$FilterValue')" + $f = '$' + 'Filter' + $query += "&$f=$Filter" + } + if($null -ne $PSBoundParameters["Filter"]) + { + $Filter = $PSBoundParameters["Filter"] + $f = '$' + 'Filter' + $query += "&$f=$Filter" + } + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $query += "&`$select=$($selectProperties)" + } + if($null -ne $query) + { + $query = "?" + $query.TrimStart("&") + $params["Uri"] += $query + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $data = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + try { + $data = $data.value | ConvertTo-Json | ConvertFrom-Json + } + catch {} + + if($data) + { + $userList = @() + foreach ($response in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 new file mode 100644 index 0000000000..effecdfde6 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraIdentityProvider { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $IdentityProviderBaseId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + { + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgIdentityProvider @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName + Add-Member -InputObject $_ -MemberType AliasProperty -Name Type -Value identityProviderType + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 new file mode 100644 index 0000000000..e24ca7a7d0 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 @@ -0,0 +1,94 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraNamedLocationPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgIdentityConditionalAccessNamedLocation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('ipRanges') + try { + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 new file mode 100644 index 0000000000..493cff9df7 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraOAuth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgOAuth2PermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 new file mode 100644 index 0000000000..3f532c92a0 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraPermissionGrantConditionSet { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["ConditionSetType"]) + { + $conditionalSet = $PSBoundParameters["ConditionSetType"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + if("$conditionalSet" -eq "includes"){ + $response = Get-MgPolicyPermissionGrantPolicyInclude @params -Headers $customHeaders + } + elseif("$conditionalSet" -eq "excludes"){ + $response = Get-MgPolicyPermissionGrantPolicyExclude @params -Headers $customHeaders + } + else{ + Write-Error("Message: Resource not found for the segment '$conditionalSet'.") + return + } + + $response +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 new file mode 100644 index 0000000000..352d5e7cee --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraPermissionGrantPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgPolicyPermissionGrantPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 new file mode 100644 index 0000000000..d04e28dae7 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUrl = "https://graph.microsoft.com/v1.0/policies/" + $endpoints = @("homeRealmDiscoveryPolicies", "claimsMappingPolicies", "tokenIssuancePolicies", "tokenLifetimePolicies", "activityBasedTimeoutPolicies", "featureRolloutPolicies", "defaultAppManagementPolicy", "appManagementPolicies", "authenticationFlowsPolicy", "authenticationMethodsPolicy", "permissionGrantPolicies") + + if($PSBoundParameters.ContainsKey("Top") -and ($null -eq $Top -or $Top -eq 0)){ + Write-Error "Invalid page size specified: '0'. Must be between 1 and 999 inclusive. +Status: 400 (BadRequest) +ErrorCode: Request_UnsupportedQuery" + break + } + $response = @() + foreach ($endpoint in $endpoints) { + $url = "${baseUrl}${endpoint}" + try { + $policies = (Invoke-GraphRequest -Headers $customHeaders -Uri $url -Method GET).value + } + catch { + $policies = (Invoke-GraphRequest -Headers $customHeaders -Uri $url -Method GET) + } + $policies | ForEach-Object { + $_.Type = ($endpoint.Substring(0, 1).ToUpper() + $endpoint.Substring(1) -replace "ies", "y") + $response += $_ + if ($Top -and ($response.Count -ge $Top)) { + break + } + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================") + + if ($PSBoundParameters.ContainsKey("ID")) { + $response = $response | Where-Object { $_.id -eq $Id } + if($Null -eq $response ) { + Write-Error "Get-EntraPolicy : Error occurred while executing Get-Policy + Code: Request_BadRequest + Message: Invalid object identifier '$Id' ." + } + } elseif (-not $All -and $Top) { + $response = $response | Select-Object -First $Top + } + + $data = $response | ConvertTo-Json -Depth 50 | ConvertFrom-Json + $respList = @() + + foreach ($res in $data) { + switch ($res.type) { + "ActivityBasedTimeoutPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphActivityBasedTimeoutPolicy } + "AppManagementPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppManagementPolicy } + "ClaimsMappingPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphClaimsMappingPolicy } + "FeatureRolloutPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy } + "HomeRealmDiscoveryPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphHomeRealmDiscoveryPolicy } + "TokenIssuancePolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphTokenIssuancePolicy } + "TokenLifetimePolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphTokenLifetimePolicy } + "PermissionGrantPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphPermissionGrantPolicy } + "DefaultAppManagementPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphappManagementPolicy } + "AuthenticationFlowsPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphauthenticationFlowsPolicy } + "AuthenticationMethodsPolicy" { $respType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphauthenticationMethodsPolicy} + default { Write-Error "Unknown type: " + $res.type} + } + + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $respType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $respList += $respType + } + $respList + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 new file mode 100644 index 0000000000..954f948652 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraTrustedCertificateAuthority { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TrustedIssuer, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TrustedIssuerSki, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["OrganizationId"] = (Get-MgContext).TenantId + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["TrustedIssuerSki"]) + { + $trustedIssuerSki = $PSBoundParameters["TrustedIssuerSki"] + } + if($null -ne $PSBoundParameters["TrustedIssuer"]) + { + $trustedIssuer = $PSBoundParameters["TrustedIssuer"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $responseData = Get-MgOrganizationCertificateBasedAuthConfiguration @params -Headers $customHeaders + $response= @() + if($responseData){ + $responseData.CertificateAuthorities | ForEach-Object { + if ( + ([string]::IsNullOrEmpty($TrustedIssuer) -and [string]::IsNullOrEmpty($TrustedIssuerSki)) -or + (![string]::IsNullOrEmpty($TrustedIssuer) -and ![string]::IsNullOrEmpty($TrustedIssuerSki) -and $_.Issuer -eq $TrustedIssuer -and $_.IssuerSki -eq $TrustedIssuerSki) -or + (![string]::IsNullOrEmpty($TrustedIssuer) -and [string]::IsNullOrEmpty($TrustedIssuerSki) -and $_.Issuer -eq $TrustedIssuer) -or + (![string]::IsNullOrEmpty($TrustedIssuerSki) -and [string]::IsNullOrEmpty($TrustedIssuer) -and $_.IssuerSki -eq $TrustedIssuerSki)) + { + $data = @{ + AuthorityType = "IntermediateAuthority" + TrustedCertificate = $_.Certificate + CrlDistributionPoint = $_.CertificateRevocationListUrl + DeltaCrlDistributionPoint = $_.DeltaCertificateRevocationListUrl + TrustedIssuer = $_.Issuer + TrustedIssuerSki = $_.IssuerSki + } + + if($_.IsRootAuthority){ + $data.AuthorityType = "RootAuthority" + } + $dataJson = ConvertTo-Json $data + $response += [Newtonsoft.Json.JsonConvert]::DeserializeObject($dataJson, [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation]) + } + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 new file mode 100644 index 0000000000..293b86bb15 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 @@ -0,0 +1,160 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraConditionalAccessPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $State, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if($null -ne $PSBoundParameters["Conditions"]) + { + $TmpValue = $PSBoundParameters["Conditions"] + $Value = @{} + $TmpValue.PSObject.Properties | foreach { + $propName = $_.Name + $propValue = $_.Value + if ($propName -eq 'clientAppTypes') { + $Value[$propName] = $propValue + } + elseif ($propValue -is [System.Object]) { + $nestedProps = @{} + $propValue.PSObject.Properties | foreach { + $nestedPropName = $_.Name + $nestedPropValue = $_.Value + $nestedProps[$nestedPropName] = $nestedPropValue + } + $Value[$propName] = $nestedProps + } + } + $params["Conditions"] = $Value + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["SessionControls"]) + { + $TmpValue = $PSBoundParameters["SessionControls"] + $Value = @{} + $TmpValue.PSObject.Properties | foreach { + $propName = $_.Name + $propValue = $_.Value + if ($propValue -is [System.Object]) { + $nestedProps = @{} + $propValue.PSObject.Properties | foreach { + $nestedPropName = $_.Name + $nestedPropValue = $_.Value + $nestedProps[$nestedPropName] = $nestedPropValue + } + $Value[$propName] = $nestedProps + } + } + $params["SessionControls"] = $Value + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["GrantControls"]) + { + $TmpValue = $PSBoundParameters["GrantControls"] + $hash = @{} + if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } + if($null -ne $TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } + if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } + if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } + + $Value = $hash + $params["GrantControls"] = $Value + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgIdentityConditionalAccessPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 new file mode 100644 index 0000000000..55652846c3 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 @@ -0,0 +1,71 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraFeatureRolloutPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Feature, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $body = @{} + $params["Uri"] = 'https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies/' + $params["Method"] = "POST" + + if ($null -ne $PSBoundParameters["Description"]) { + $body["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) { + $body["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) { + $body["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["Feature"]) { + $body["Feature"] = $PSBoundParameters["Feature"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) { + $body["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if ($null -ne $PSBoundParameters["AppliesTo"]) { + $body["AppliesTo"] = $PSBoundParameters["AppliesTo"] + } + + $params["Body"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $data = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + if ($data) { + $userList = @() + foreach ($response in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 new file mode 100644 index 0000000000..776de0d7b1 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraIdentityProvider { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ClientSecret, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Type, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Name, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ClientId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + if($null -ne $PSBoundParameters["Id"]) + { + $params["IdentityProviderBaseId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["Type"]) + { + $body["identityProviderType"] = $PSBoundParameters["Type"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["Name"]) + { + $body["displayName"] = $PSBoundParameters["Name"] + } + if($null -ne $PSBoundParameters["ClientId"]) + { + $body["clientId"] = $PSBoundParameters["ClientId"] + } + if($null -ne $PSBoundParameters["ClientSecret"]) + { + $body["clientSecret"] = $PSBoundParameters["ClientSecret"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + $body["@odata.type"] = "#microsoft.graph.socialIdentityProvider" + $params["BodyParameter"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgIdentityProvider @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName + Add-Member -InputObject $_ -MemberType AliasProperty -Name Type -Value identityProviderType + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 new file mode 100644 index 0000000000..77e7927acc --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 @@ -0,0 +1,137 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraNamedLocationPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $OdataType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsTrusted, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges + ) + + PROCESS { + $body = @{} + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["IncludeUnknownCountriesAndRegions"]) + { + $body["IncludeUnknownCountriesAndRegions"] = $PSBoundParameters["IncludeUnknownCountriesAndRegions"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $body["Id"] = $PSBoundParameters["Id"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["IsTrusted"]) + { + $body["IsTrusted"] = $PSBoundParameters["IsTrusted"] + } + if($null -ne $PSBoundParameters["OdataType"]) + { + $body["@odata.type"] = $PSBoundParameters["OdataType"] + } + if($null -ne $PSBoundParameters["CountriesAndRegions"]) + { + $body["CountriesAndRegions"] = $PSBoundParameters["CountriesAndRegions"] + } + if($null -ne $PSBoundParameters["IpRanges"]) + { + $Tmp = $PSBoundParameters["IpRanges"] + $hash =@() + foreach($i in $Tmp){ + $hash += @{cidrAddress=$i.CidrAddress} + } + $body["IpRanges"] = $hash + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $body["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + $params["BodyParameter"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgIdentityConditionalAccessNamedLocation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('ipRanges') + try { + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 new file mode 100644 index 0000000000..e6827d1b74 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraOauth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'CreateExpanded')] + param ( + [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ClientId, + [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true)] + [System.String] $ConsentType, + [Parameter(ParameterSetName = "CreateExpanded")] + [System.String] $PrincipalId, + [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true)] + [System.String] $ResourceId, + [Parameter(ParameterSetName = "CreateExpanded")] + [System.String] $Scope + ) + + PROCESS { + $params = @{} + $body = @{} + $params["Uri"] = "https://graph.microsoft.com/v1.0/oauth2PermissionGrants" + $params["Method"] = "POST" + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ClientId"]) + { + $body["clientId"] = $PSBoundParameters["ClientId"] + } + if($null -ne $PSBoundParameters["ConsentType"]) + { + $body["consentType"] = $PSBoundParameters["ConsentType"] + } + if($null -ne $PSBoundParameters["PrincipalId"]) + { + $body["principalId"] = $PSBoundParameters["PrincipalId"] + } + if($null -ne $PSBoundParameters["ResourceId"]) + { + $body["resourceId"] = $PSBoundParameters["ResourceId"] + } + if($null -ne $PSBoundParameters["Scope"]) + { + $body["scope"] = $PSBoundParameters["Scope"] + } + $params["Body"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + if($response){ + $response = $response | ConvertTo-Json | ConvertFrom-Json + $response | ForEach-Object { + if ($null -ne $_) { + $userData = [Microsoft.Graph.PowerShell.Models.MicrosoftGraphOAuth2PermissionGrant]::new() + $_.PSObject.Properties | ForEach-Object { + $userData | Add-Member -MemberType NoteProperty -Name $_.Name -Value $_.Value -Force + } + } + } + $userData + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 new file mode 100644 index 0000000000..eb9cd0b152 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 @@ -0,0 +1,149 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraPermissionGrantConditionSet { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionClassification, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ResourceApplication, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Permissions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["PermissionType"]) + { + $params["PermissionType"] = $PSBoundParameters["PermissionType"] + } + if($null -ne $PSBoundParameters["PermissionClassification"]) + { + $params["PermissionClassification"] = $PSBoundParameters["PermissionClassification"] + } + if($null -ne $PSBoundParameters["ResourceApplication"]) + { + $params["ResourceApplication"] = $PSBoundParameters["ResourceApplication"] + } + if($null -ne $PSBoundParameters["Permissions"]) + { + $params["Permissions"] = $PSBoundParameters["Permissions"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ClientApplicationTenantIds"]) + { + $params["ClientApplicationTenantIds"] = $PSBoundParameters["ClientApplicationTenantIds"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($null -ne $PSBoundParameters["ConditionSetType"]) + { + $conditionalSet = $PSBoundParameters["ConditionSetType"] + } + if($null -ne $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"]) + { + $params["ClientApplicationsFromVerifiedPublisherOnly"] = $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"] + } + if($null -ne $PSBoundParameters["ClientApplicationPublisherIds"]) + { + $params["ClientApplicationPublisherIds"] = $PSBoundParameters["ClientApplicationPublisherIds"] + } + if($null -ne $PSBoundParameters["ClientApplicationIds"]) + { + $params["ClientApplicationIds"] = $PSBoundParameters["ClientApplicationIds"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + + if("$conditionalSet" -eq "includes"){ + $response = New-MgPolicyPermissionGrantPolicyInclude @params -Headers $customHeaders + } + elseif("$conditionalSet" -eq "excludes"){ + $response = New-MgPolicyPermissionGrantPolicyExclude @params -Headers $customHeaders + } + else{ + Write-Error("Message: Resource not found for the segment '$conditionalSet'.") + return + } + + + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 new file mode 100644 index 0000000000..f7a8789636 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraPermissionGrantPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgPolicyPermissionGrantPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 new file mode 100644 index 0000000000..a657537877 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 @@ -0,0 +1,94 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraPolicy { + [CmdletBinding(DefaultParameterSetName = 'NewPolicy')] + param ( + [Parameter(ParameterSetName = "NewPolicy", Mandatory = $true)] + [System.Collections.Generic.List`1[System.String]] $Definition, + [Parameter(ParameterSetName = "NewPolicy", Mandatory = $true)] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "NewPolicy", Mandatory = $true)] + [System.String] $Type, + [Parameter(ParameterSetName = "NewPolicy")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = "NewPolicy")] + [System.Nullable`1[System.Boolean]] $IsOrganizationDefault, + [Parameter(ParameterSetName = "NewPolicy")] + [System.String] $AlternativeIdentifier + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Type"] = $Type + $respType = $null + + if($params.type -eq "activityBasedTimeoutPolicy" ) { + $params.type = "activityBasedTimeoutPolicies" + $respType = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphActivityBasedTimeoutPolicy + } + elseif ($params.type -eq "ApplicationManagementPolicy") { + $params.type = "appManagementPolicies" + $respType = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppManagementPolicy + } + elseif ($params.type -eq "claimsMappingPolicies") { + $params.type = "claimsMappingPolicies" + $respType = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphClaimsMappingPolicy + } + elseif ($params.type -eq "featureRolloutPolicy") { + $params.type = "featureRolloutPolicies" + $respType = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy + } + elseif ($params.type -eq "HomeRealmDiscoveryPolicy") { + $params.type = "homeRealmDiscoveryPolicies" + $respType = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphHomeRealmDiscoveryPolicy + } + elseif ($params.type -eq "tokenIssuancePolicy") { + $params.type = "tokenIssuancePolicies" + $respType = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphTokenIssuancePolicy + } + elseif ($params.type -eq "tokenLifetimePolicy") { + $params.type = "tokenLifetimePolicies" + $respType = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphTokenLifetimePolicy + } + elseif ($params.type -eq "permissionGrantPolicy") { + $params.type = "permissionGrantPolicies" + $respType = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphPermissionGrantPolicy + } + $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/" + $params.type + $Definition =$PSBoundParameters["Definition"] + $DisplayName=$PSBoundParameters["DisplayName"] + $AlternativeIdentifier = $PSBoundParameters["AlternativeIdentifier"] + $KeyCredentials = $PSBoundParameters["KeyCredentials"] + $IsOrganizationDefault =$PSBoundParameters["IsOrganizationDefault"] + $params["Method"] = "POST" + + $body = @{ + Definition = $Definition + DisplayName = $DisplayName + IsOrganizationDefault = $IsOrganizationDefault + AlternativeIdentifier =$AlternativeIdentifier + KeyCredentials = $KeyCredentials + Type = $Type + } + $body = $body | ConvertTo-Json + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $params.uri -Method $params.method -Body $body | ConvertTo-Json | ConvertFrom-Json + + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $respType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + + $respType + + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 new file mode 100644 index 0000000000..cbbd1d4589 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraTrustedCertificateAuthority { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $tenantId = (Get-MgContext).TenantId + $params["Uri"] = "/v1.0/organization/$tenantId/certificateBasedAuthConfiguration" + $params["Method"] = "POST" + $newCert = $PSBoundParameters["CertificateAuthorityInformation"] + $previousCerts = @() + Get-EntraTrustedCertificateAuthority | ForEach-Object { + $previousCerts += $_ + if(($_.TrustedIssuer -eq $newCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $newCert.TrustedIssuerSki)){ + Throw [System.Management.Automation.PSArgumentException] "A certificate already exists on the server with associated trustedIssuer and trustedIssuerSki fields." + } + } + $previousCerts += $newCert + $body = @{ + certificateAuthorities = @() + } + $previousCerts | ForEach-Object { + $isRoot = $false + if("RootAuthority" -eq $_.AuthorityType){ + $isRoot = $true + } + $cert = @{ + isRootAuthority = $isRoot + certificateRevocationListUrl = $_.CrlDistributionPoint + deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint + certificate = [convert]::tobase64string($_.TrustedCertificate) + } + $body.certificateAuthorities += $cert + } + $params["Body"] = ConvertTo-Json $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest @params -Headers $customHeaders + $customObject = [PSCustomObject]@{ + "@odata.context" = $response["@odata.context"] + certificateAuthorities = @{ + AuthorityType = if ($response.certificateAuthorities.isRootAuthority) { "RootAuthority" } else { "" } + CrlDistributionPoint = $response.certificateAuthorities.certificateRevocationListUrl + DeltaCrlDistributionPoint = $response.certificateAuthorities.deltaCertificateRevocationListUrl + TrustedCertificate = [Convert]::FromBase64String($response.certificateAuthorities.certificate) + TrustedIssuer = $response.certificateAuthorities.issuer + TrustedIssuerSki = $response.certificateAuthorities.issuerSki + } + Id = $response.id + } + $customObject = $customObject | ConvertTo-Json -depth 5 | ConvertFrom-Json + $certificateList = @() + foreach ($certAuthority in $customObject) { + $certificateType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphCertificateBasedAuthConfiguration + $certAuthority.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + Add-Member -InputObject $certificateType -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $certificateList += $certificateType + } + $certificateList + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 new file mode 100644 index 0000000000..a476e7caeb --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraConditionalAccessPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgIdentityConditionalAccessPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 new file mode 100644 index 0000000000..2ac3b06f9c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraFeatureRolloutPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies/$Id" + $params["Method"] = "DELETE" + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 new file mode 100644 index 0000000000..4a791d5238 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraFeatureRolloutPolicyDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $params["Uri"] = 'https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies/{0}/appliesTo/{1}/$ref' -f $Id,$ObjectId + $params["Method"] = "DELETE" + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 new file mode 100644 index 0000000000..f3b14538a8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraIdentityProvider { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $IdentityProviderBaseId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + { + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgIdentityProvider @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 new file mode 100644 index 0000000000..c45b8bcf17 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraNamedLocationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgIdentityConditionalAccessNamedLocation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 new file mode 100644 index 0000000000..2295bf84ed --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraOAuth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgOAuth2PermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 new file mode 100644 index 0000000000..eb29c3c739 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraPermissionGrantConditionSet { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ConditionSetType"]) + { + $conditionalSet = $PSBoundParameters["ConditionSetType"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + + if("$conditionalSet" -eq "includes"){ + $response = Remove-MgPolicyPermissionGrantPolicyInclude @params -Headers $customHeaders + } + elseif("$conditionalSet" -eq "excludes"){ + $response = Remove-MgPolicyPermissionGrantPolicyExclude @params -Headers $customHeaders + } + else{ + Write-Error("Message: Resource not found for the segment '$conditionalSet'.") + return + } + + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 new file mode 100644 index 0000000000..5c8e6d49d0 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraPermissionGrantPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgPolicyPermissionGrantPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 new file mode 100644 index 0000000000..1092725d14 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $policyTypes = "activityBasedTimeoutPolicies", "defaultAppManagementPolicy", "appManagementPolicies", "authenticationFlowsPolicy", "authenticationMethodsPolicy", "claimsMappingPolicies", "featureRolloutPolicies", "homeRealmDiscoveryPolicies", "permissionGrantPolicies", "tokenIssuancePolicies", "tokenLifetimePolicies" + + foreach ($policyType in $policyTypes) { + $uri = "https://graph.microsoft.com/v1.0/policies/" + $policyType + "/" + $id + try { + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method GET + break + } + catch {} + } + $policy = ($response.'@odata.context') -match 'policies/([^/]+)/\$entity' + + $policyType = $Matches[1] + + Write-Debug("============================ Matches ============================") + + Write-Debug($Matches[1]) + + if (($null -ne $PSBoundParameters["id"]) -and ($null -ne $policyType )) { + $URI = "https://graph.microsoft.com/v1.0/policies/" + $policyType + "/" + $id + } + $Method = "DELETE" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 new file mode 100644 index 0000000000..08ab2a2558 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraTrustedCertificateAuthority { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $tenantId = (Get-MgContext).TenantId + $params["Uri"] = "/v1.0/organization/$tenantId/certificateBasedAuthConfiguration" + $params["Method"] = "POST" + $certNotFound = $true + $modifiedCert = $PSBoundParameters["CertificateAuthorityInformation"] + $previousCerts = @() + Get-EntraTrustedCertificateAuthority | ForEach-Object { + if(($_.TrustedIssuer -eq $modifiedCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $modifiedCert.TrustedIssuerSki)){ + $certNotFound = $false + } + else{ + $previousCerts += $_ + } + } + if($certNotFound){ + Throw [System.Management.Automation.PSArgumentException] "Provided certificate authority not found on the server. Please make sure you have provided the correct information in trustedIssuer and trustedIssuerSki fields." + } + $body = @{ + certificateAuthorities = @() + } + $previousCerts | ForEach-Object { + $isRoot = $false + if("RootAuthority" -eq $_.AuthorityType){ + $isRoot = $true + } + $cert = @{ + isRootAuthority = $isRoot + certificateRevocationListUrl = $_.CrlDistributionPoint + deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint + certificate = [convert]::tobase64string($_.TrustedCertificate) + } + $body.certificateAuthorities += $cert + } + $params["Body"] = ConvertTo-Json $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $certificateList = @() + foreach ($data in $response) { + $certificateType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphCertificateBasedAuthConfiguration + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $certificateType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $certificateList += $certificateType + } + $certificateList + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 new file mode 100644 index 0000000000..d3d3e6a7db --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 @@ -0,0 +1,134 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraAuthorizationPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) + { + $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) + { + $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) + { + $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) + { + $TmpValue = $PSBoundParameters["DefaultUserRolePermissions"] + $hash = @{} + $hash["AllowedToCreateApps"] = $TmpValue.AllowedToCreateApps + $hash["AllowedToCreateSecurityGroups"] = $TmpValue.AllowedToCreateSecurityGroups + $hash["AllowedToReadOtherUsers"] = $TmpValue.AllowedToReadOtherUsers + $hash["PermissionGrantPoliciesAssigned"] = $TmpValue.PermissionGrantPoliciesAssigned + + $Value = $hash + $params["DefaultUserRolePermissions"] = $Value + } + if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) + { + $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgPolicyAuthorizationPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 new file mode 100644 index 0000000000..185de36477 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 @@ -0,0 +1,197 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraConditionalAccessPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $State, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if($null -ne $PSBoundParameters["Conditions"]) + { + $TmpValue = $PSBoundParameters["Conditions"] + if($TmpValue.Applications){ + $Applications=@{} + $Applications["IncludeApplications"] = $TmpValue.Applications.IncludeApplications + $Applications["ExcludeApplications"] = $TmpValue.Applications.ExcludeApplications + $Applications["IncludeUserActions"] = $TmpValue.Applications.IncludeUserActions + $Applications["IncludeProtectionLevels"] = $TmpValue.Applications.IncludeProtectionLevels + } + if($TmpValue.Locations){ + $Locations = @{} + $Locations["IncludeLocations"] = $TmpValue.Locations.IncludeLocations + $Locations["ExcludeLocations"] = $TmpValue.Locations.ExcludeLocations + } + if($TmpValue.Platforms){ + $Platforms = @{} + $Platforms["IncludePlatforms"] = $TmpValue.Platforms.IncludePlatforms + $Platforms["ExcludePlatforms"] = $TmpValue.Platforms.ExcludePlatforms + } + if($TmpValue.Users){ + $Users = @{} + $Users["IncludeUsers"] = $TmpValue.Users.IncludeUsers + $Users["ExcludeUsers"] = $TmpValue.Users.ExcludeUsers + $Users["IncludeGroups"] = $TmpValue.Users.IncludeGroups + $Users["ExcludeGroups"] = $TmpValue.Users.ExcludeGroups + $Users["IncludeRoles"] = $TmpValue.Users.IncludeRoles + $Users["ExcludeRoles"] = $TmpValue.Users.ExcludeRoles + } + + $hash = @{} + if($TmpValue.Applications) {$hash["Applications"] = $Applications } + if($TmpValue.ClientAppTypes) { $hash["ClientAppTypes"] = $TmpValue.ClientAppTypes } + if($TmpValue.Locations) { $hash["Locations"] = $Locations } + if($TmpValue.Platforms) { $hash["Platforms"] = $Platforms } + if($TmpValue.SignInRiskLevels) { $hash["SignInRiskLevels"] = $TmpValue.SignInRiskLevels } + if($TmpValue.Users) { $hash["Users"] = $Users } + $Value = $hash + $params["Conditions"] = $Value + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["SessionControls"]) + { + $TmpValue = $PSBoundParameters["SessionControls"] + if($TmpValue.ApplicationEnforcedRestrictions){ + $ApplicationEnforcedRestrictions = @{} + $ApplicationEnforcedRestrictions["IsEnabled"] = $TmpValue.ApplicationEnforcedRestrictions.IsEnabled + } + if($TmpValue.CloudAppSecurity){ + $CloudAppSecurity = @{} + $CloudAppSecurity["IsEnabled"] = $TmpValue.CloudAppSecurity.IsEnabled + $CloudAppSecurity["CloudAppSecurityType"] = $TmpValue.CloudAppSecurity.CloudAppSecurityType + } + if($TmpValue.PersistentBrowser){ + $PersistentBrowser = @{} + $PersistentBrowser["IsEnabled"] = $TmpValue.PersistentBrowser.IsEnabled + $PersistentBrowser["Mode"] = $TmpValue.PersistentBrowser.Mode + } + if($TmpValue.SignInFrequency){ + $SignInFrequency = @{} + $SignInFrequency["IsEnabled"] = $TmpValue.SignInFrequency.IsEnabled + $SignInFrequency["Type"] = $TmpValue.SignInFrequency.Type + $SignInFrequency["Value"] = $TmpValue.SignInFrequency.Value + } + + $hash = @{} + if($TmpValue.ApplicationEnforcedRestrictions) { $hash["ApplicationEnforcedRestrictions"] = $ApplicationEnforcedRestrictions } + if($TmpValue.CloudAppSecurity) { $hash["CloudAppSecurity"] = $CloudAppSecurity } + if($TmpValue.SignInFrequency) { $hash["SignInFrequency"] = $SignInFrequency } + if($TmpValue.PersistentBrowser) { $hash["PersistentBrowser"] = $PersistentBrowser } + $Value = $hash + $params["SessionControls"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["GrantControls"]) + { + $TmpValue = $PSBoundParameters["GrantControls"] + $hash = @{} + if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } + if($TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } + if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } + if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } + $Value = $hash + $params["GrantControls"] = $Value + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgIdentityConditionalAccessPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 new file mode 100644 index 0000000000..8dc40a1e59 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraFeatureRolloutPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Feature, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $body = @{} + $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies/$Id" + $params["Method"] = "PATCH" + + if ($null -ne $PSBoundParameters["Description"]) { + $body["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) { + $body["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) { + $body["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["Feature"]) { + $body["Feature"] = $PSBoundParameters["Feature"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) { + $body["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if ($null -ne $PSBoundParameters["AppliesTo"]) { + $body["AppliesTo"] = $PSBoundParameters["AppliesTo"] + } + + $params["Body"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 new file mode 100644 index 0000000000..93c2ca0ada --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraIdentityProvider { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Name, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ClientId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Type, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ClientSecret, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $IdentityProviderBaseId + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + if($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + { + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + } + if($null -ne $PSBoundParameters["Type"]) + { + $body["identityProviderType"] = $PSBoundParameters["Type"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Name"]) + { + $body["displayName"] = $PSBoundParameters["Name"] + } + if($null -ne $PSBoundParameters["ClientId"]) + { + $body["clientId"] = $PSBoundParameters["ClientId"] + } + if($null -ne $PSBoundParameters["ClientSecret"]) + { + $body["clientSecret"] = $PSBoundParameters["ClientSecret"] + } + $body["@odata.type"] = "#microsoft.graph.socialIdentityProvider" + $params["BodyParameter"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgIdentityProvider @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 new file mode 100644 index 0000000000..ad3acf8e65 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 @@ -0,0 +1,135 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraNamedLocationPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $OdataType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsTrusted, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + if($null -ne $PSBoundParameters["IncludeUnknownCountriesAndRegions"]) + { + $body["IncludeUnknownCountriesAndRegions"] = $PSBoundParameters["IncludeUnknownCountriesAndRegions"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $body["Id"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["IsTrusted"]) + { + $body["IsTrusted"] = $PSBoundParameters["IsTrusted"] + } + if($null -ne $PSBoundParameters["OdataType"]) + { + $body["@odata.type"] = $PSBoundParameters["OdataType"] + } + if($null -ne $PSBoundParameters["CountriesAndRegions"]) + { + $body["CountriesAndRegions"] = $PSBoundParameters["CountriesAndRegions"] + } + if($null -ne $PSBoundParameters["IpRanges"]) + { + $Tmp = $PSBoundParameters["IpRanges"] + $hash =@() + foreach($i in $Tmp){ + $hash += @{cidrAddress=$i.CidrAddress} + } + $body["IpRanges"] = $hash + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $body["DisplayName"] = $PSBoundParameters["DisplayName"] + } + + $params["BodyParameter"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgIdentityConditionalAccessNamedLocation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 new file mode 100644 index 0000000000..840cb0f765 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 @@ -0,0 +1,154 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraPermissionGrantConditionSet { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionClassification, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ResourceApplication, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Permissions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ClientApplicationTenantIds"]) + { + $params["ClientApplicationTenantIds"] = $PSBoundParameters["ClientApplicationTenantIds"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"]) + { + $params["ClientApplicationsFromVerifiedPublisherOnly"] = $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"] + } + if($null -ne $PSBoundParameters["ClientApplicationPublisherIds"]) + { + $params["ClientApplicationPublisherIds"] = $PSBoundParameters["ClientApplicationPublisherIds"] + } + if($null -ne $PSBoundParameters["PermissionType"]) + { + $params["PermissionType"] = $PSBoundParameters["PermissionType"] + } + if($null -ne $PSBoundParameters["ConditionSetType"]) + { + $conditionalSet = $PSBoundParameters["ConditionSetType"] + } + if($null -ne $PSBoundParameters["Permissions"]) + { + $params["Permissions"] = $PSBoundParameters["Permissions"] + } + if($null -ne $PSBoundParameters["ClientApplicationIds"]) + { + $params["ClientApplicationIds"] = $PSBoundParameters["ClientApplicationIds"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["ResourceApplication"]) + { + $params["ResourceApplication"] = $PSBoundParameters["ResourceApplication"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["PermissionClassification"]) + { + $params["PermissionClassification"] = $PSBoundParameters["PermissionClassification"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + if("$conditionalSet" -eq "includes"){ + $response = Update-MgPolicyPermissionGrantPolicyInclude @params -Headers $customHeaders + } + elseif("$conditionalSet" -eq "excludes"){ + $response = Update-MgPolicyPermissionGrantPolicyExclude @params -Headers $customHeaders + } + else{ + Write-Error("Message: Resource not found for the segment '$conditionalSet'.") + return + } + + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 new file mode 100644 index 0000000000..8e080062c3 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraPermissionGrantPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgPolicyPermissionGrantPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 new file mode 100644 index 0000000000..3661d51ca9 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AlternativeIdentifier, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Definition, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Type, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsOrganizationDefault + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + $policyTypeMap = @{ + "ActivityBasedTimeoutPolicy" = "activityBasedTimeoutPolicies" + "ApplicationManagementPolicy" = "appManagementPolicies" + "DefaultAppManagementPolicy" = "defaultAppManagementPolicy" + "AuthenticationFlowsPolicy" = "authenticationFlowsPolicy" + "AuthenticationMethodsPolicy" = "authenticationMethodsPolicy" + "ClaimsMappingPolicy" = "claimsMappingPolicies" + "FeatureRolloutPolicy" = "featureRolloutPolicies" + "HomeRealmDiscoveryPolicy" = "homeRealmDiscoveryPolicies" + "PermissionGrantPolicy" = "permissionGrantPolicies" + "TokenIssuancePolicy" = "tokenIssuancePolicies" + "TokenLifetimePolicy" = "tokenLifetimePolicies" + } + + $policyTypes = $policyTypeMap.Values + + if ($null -ne $PSBoundParameters["type"]) { + $type = if ($policyTypeMap.ContainsKey($type)) { $policyTypeMap[$type] } else { + Write-Error "Set-EntraBetADPolicy : Error occurred while executing SetPolicy + Code: Request_BadRequest + Message: Invalid value specified for property 'type' of resource 'Policy'." + return; + } + } else { + $type = $null + } + + if(!$type) { + foreach ($pType in $policyTypes) { + $uri = "https://graph.microsoft.com/v1.0/policies/" + $pType + "/" + $id + try { + $response = Invoke-GraphRequest -Uri $uri -Method GET + break + } + catch {} + } + $policy = ($response.'@odata.context') -match 'policies/([^/]+)/\$entity' + $type = $Matches[1] + } + + if($policyTypes -notcontains $type) { + Write-Error "Set-AzureADPolicy : Error occurred while executing SetPolicy + Code: Request_BadRequest + Message: Invalid value specified for property 'type' of resource 'Policy'." + } + else { + if ($null -ne $PSBoundParameters["Definition"]) { + $params["Definition"] = $PSBoundParameters["Definition"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["Definition"]) { + $params["Definition"] = $PSBoundParameters["Definition"] + } + if ($null -ne $PSBoundParameters["IsOrganizationDefault"]) { + $params["IsOrganizationDefault"] = $PSBoundParameters["IsOrganizationDefault"] + } + if (($null -ne $PSBoundParameters["id"]) -and ($null -ne $type )) { + $URI = "https://graph.microsoft.com/v1.0/policies/" + $type + "/" + $id + } + + $Method = "PATCH" + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $body = $params | ConvertTo-Json + Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Body $body -Method $Method + + } + + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 new file mode 100644 index 0000000000..2bb7c9dd7c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraTrustedCertificateAuthority { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $tenantId = (Get-MgContext).TenantId + $params["Uri"] = "/v1.0/organization/$tenantId/certificateBasedAuthConfiguration" + $params["Method"] = "POST" + $certNotFound = $true + $modifiedCert = $PSBoundParameters["CertificateAuthorityInformation"] + $previusCerts = @() + Get-EntraTrustedCertificateAuthority | ForEach-Object { + if(($_.TrustedIssuer -eq $modifiedCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $modifiedCert.TrustedIssuerSki)){ + $previusCerts += $modifiedCert + $certNotFound = $false + } + else{ + $previusCerts += $_ + } + } + if($certNotFound){ + Throw [System.Management.Automation.PSArgumentException] "Provided certificate authority not found on the server. Please make sure you have provided the correct information in trustedIssuer and trustedIssuerSki fields." + } + $body = @{ + certificateAuthorities = @() + } + $previusCerts | ForEach-Object { + $isRoot = $false + if("RootAuthority" -eq $_.AuthorityType){ + $isRoot = $true + } + $cert = @{ + isRootAuthority = $isRoot + certificateRevocationListUrl = $_.CrlDistributionPoint + deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint + certificate = [convert]::tobase64string($_.TrustedCertificate) + } + $body.certificateAuthorities += $cert + } + $params["Body"] = ConvertTo-Json $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest @params -Headers $customHeaders + $customObject = [PSCustomObject]@{ + "@odata.context" = $response["@odata.context"] + certificateAuthorities = @{ + AuthorityType = if ($response.certificateAuthorities.isRootAuthority) { "RootAuthority" } else { "" } + CrlDistributionPoint = $response.certificateAuthorities.certificateRevocationListUrl + DeltaCrlDistributionPoint = $response.certificateAuthorities.deltaCertificateRevocationListUrl + TrustedCertificate = [Convert]::FromBase64String($response.certificateAuthorities.certificate) + TrustedIssuer = $response.certificateAuthorities.issuer + TrustedIssuerSki = $response.certificateAuthorities.issuerSki + } + Id = $response.id + } + $customObject = $customObject | ConvertTo-Json -depth 5 | ConvertFrom-Json + $certificateList = @() + foreach ($certAuthority in $customObject) { + $certificateType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphCertificateBasedAuthConfiguration + $certAuthority.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + Add-Member -InputObject $certificateType -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $certificateList += $certificateType + } + $certificateList + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..2d279836f8 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraUserOwnedObject -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force + Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force + Set-Alias -Name Set-AzureADUserManager -Value Set-EntraUserManager -Scope Global -Force + Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force + Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraUserExtension -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraUserLicense -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraUserCreatedObject -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraUserMembership -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force + Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraUserLicenseDetail -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 new file mode 100644 index 0000000000..5fdeb777b5 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 @@ -0,0 +1,132 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUser { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias("ObjectId")] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $topCount = $null + $upnPresent = $false + $baseUri = 'https://graph.microsoft.com/v1.0/users' + $properties = '$select=Id,AccountEnabled,AgeGroup,OfficeLocation,AssignedLicenses,AssignedPlans,City,CompanyName,ConsentProvidedForMinor,Country,CreationType,Department,DisplayName,GivenName,OnPremisesImmutableId,JobTitle,LegalAgeGroupClassification,Mail,MailNickName,MobilePhone,OnPremisesSecurityIdentifier,OtherMails,PasswordPolicies,PasswordProfile,PostalCode,PreferredLanguage,ProvisionedPlans,OnPremisesProvisioningErrors,ProxyAddresses,RefreshTokensValidFromDateTime,ShowInAddressList,State,StreetAddress,Surname,BusinessPhones,UsageLocation,UserPrincipalName,ExternalUserState,ExternalUserStateChangeDateTime,UserType,OnPremisesLastSyncDateTime,ImAddresses,SecurityIdentifier,OnPremisesUserPrincipalName,ServiceProvisioningErrors,IsResourceAccount,OnPremisesExtensionAttributes,DeletedDateTime,OnPremisesSyncEnabled,EmployeeType,EmployeeHireDate,CreatedDateTime,EmployeeOrgData,preferredDataLocation,Identities,onPremisesSamAccountName,EmployeeId,EmployeeLeaveDateTime,AuthorizationInfo,FaxNumber,OnPremisesDistinguishedName,OnPremisesDomainName,IsLicenseReconciliationNeeded,signInSessionsValidFromDateTime' + $params["Method"] = "GET" + $params["Uri"] = "$baseUri/?$properties" + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $params["Uri"] = "$baseUri/?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $params["Uri"] += "&`$top=999" + } + else{ + $params["Uri"] += "&`$top=$topCount" + } + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $SearchString = "`$search=`"userprincipalname:$TmpValue`" OR `"state:$TmpValue`" OR `"mailNickName:$TmpValue`" OR `"mail:$TmpValue`" OR `"jobTitle:$TmpValue`" OR `"displayName:$TmpValue`" OR `"department:$TmpValue`" OR `"country:$TmpValue`" OR `"city:$TmpValue`"" + $params["Uri"] += "&$SearchString" + $customHeaders['ConsistencyLevel'] = 'eventual' + } + if($null -ne $PSBoundParameters["UserId"]) + { + $UserId = $PSBoundParameters["UserId"] + if ($UserId -match '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'){ + $f = '$' + 'Filter' + $Filter = "UserPrincipalName eq '$UserId'" + $params["Uri"] += "&$f=$Filter" + $upnPresent = $true + } + else{ + $params["Uri"] = "$baseUri/$($UserId)?$properties" + } + } + if($null -ne $PSBoundParameters["Filter"]) + { + $Filter = $PSBoundParameters["Filter"] + $f = '$' + 'Filter' + $params["Uri"] += "&$f=$Filter" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + if ($upnPresent -and ($null -eq $response.value -or $response.value.Count -eq 0)) + { + Write-Error "Resource '$UserId' does not exist or one of its queried reference-property objects are not present. + Status: 404 (NotFound) + ErrorCode: Request_ResourceNotFound" + } + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + try { + $data = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $all = $All.IsPresent + $increment = $topCount - $data.Count + while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { + $params["Uri"] = $response.'@odata.nextLink' + if ($increment -gt 0) { + $topValue = [Math]::Min($increment, 999) + $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $increment -= $topValue + } + $response = Invoke-GraphRequest @params + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } catch {} + $data | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserState -Value ExternalUserState + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserStateChangedOn -Value ExternalUserStateChangeDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ImmutableId -Value onPremisesImmutableId + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value onPremisesProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + } + } + if($data){ + $userList = @() + foreach ($response in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphUser + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 new file mode 100644 index 0000000000..789aa8cb48 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgUserAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 new file mode 100644 index 0000000000..947fa53659 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserCreatedObject { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgUserCreatedObject @params -Headers $customHeaders + $properties = @{ + ObjectId = "Id" + DeletionTimestamp = "deletedDateTime" + AppOwnerTenantId = "appOwnerOrganizationId" + } + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + foreach ($prop in $properties.GetEnumerator()) { + $propertyName = $prop.Name + $propertyValue = $prop.Value + if ($_.PSObject.Properties.Match($propertyName)) { + $_ | Add-Member -MemberType AliasProperty -Name $propertyName -Value $propertyValue + } + } + $propsToConvert = @('keyCredentials','passwordCredentials','requiredResourceAccess') + foreach ($prop in $propsToConvert) { + try { + if($_.PSObject.Properties.Match($prop)) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 new file mode 100644 index 0000000000..19a459cb87 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 @@ -0,0 +1,79 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserDirectReport { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $baseUri = 'https://graph.microsoft.com/v1.0/users' + $properties = '$select=*' + $Method = "GET" + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + $URI = "$baseUri/$($params.UserId)/directReports?$properties" + } + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.UserId)/directReports?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + $URI = "$baseUri/$($params.UserId)/directReports?`$top=$topCount&$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ImmutableId -Value onPremisesImmutableId + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value onPremisesProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserState -Value ExternalUserState + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserStateChangedOn -Value ExternalUserStateChangeDateTime + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 new file mode 100644 index 0000000000..7705eea62a --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserExtension { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = "https://graph.microsoft.com/v1.0/users/$UserId" + $properties = '$select=Identities,OnPremisesDistinguishedName,EmployeeId,CreatedDateTime' + $params["Uri"] = "$baseUri/?$properties" + + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $params["Uri"] = "$baseUri/?$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $data = Invoke-GraphRequest -Uri $($params.Uri) -Method GET -Headers $customHeaders | Convertto-json | convertfrom-json + $data | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name userIdentities -Value identities + } + } + $data + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 new file mode 100644 index 0000000000..5c8950c5dd --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserLicenseDetail { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgUserLicenseDetail @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 new file mode 100644 index 0000000000..294dad008d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserManager { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $Method = "GET" + $keysChanged = @{UserId = "Id"} + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + $URI = "https://graph.microsoft.com/v1.0/users/$($params.UserId)/manager?`$select=*" + + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $URI = "https://graph.microsoft.com/v1.0/users/$($params.UserId)/manager?$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method -ErrorAction Stop + try { + $response = $response | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } + catch {} + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 new file mode 100644 index 0000000000..723e3acf6f --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserMembership { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgUserMemberOf @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 new file mode 100644 index 0000000000..0380c7289d --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserOAuth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgUserOAuth2PermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 new file mode 100644 index 0000000000..9ec992cf4c --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserOwnedDevice { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgUserOwnedDevice @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('AdditionalProperties') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 new file mode 100644 index 0000000000..7fb3557c97 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserOwnedObject { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["UserId"]) { + $params["UserId"] = $PSBoundParameters["UserId"] + } + $URI = "/v1.0/users/$($params.UserId)/ownedObjects" + + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $URI = "/v1.0/users/$($params.UserId)/ownedObjects?$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $Method = "GET" + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value; + + $Top = $null + if ($PSBoundParameters.ContainsKey("Top")) { + $Top = $PSBoundParameters["Top"] + } + + if($null -ne $Top){ + $userList = @() + $response | ForEach-Object { + if ($null -ne $_ -and $Top -gt 0) { + $data = $_ | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + $Top = $Top - 1 + } + } + $userList + } + else { + $userList = @() + $response | ForEach-Object { + if ($null -ne $_) { + $data = $_ | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + } + $userList + } + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 new file mode 100644 index 0000000000..0db77c7798 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserRegisteredDevice { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgUserRegisteredDevice @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('AdditionalProperties') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 new file mode 100644 index 0000000000..f4e0406c97 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 @@ -0,0 +1,111 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserThumbnailPhoto { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $View, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FileName, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["View"]) + { + $params["View"] = $PSBoundParameters["View"] + } + if ($null -ne $PSBoundParameters["FileName"]) + { + $params["FileName"] = $PSBoundParameters["FileName"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["FilePath"]) + { + $params["FilePath"] = $PSBoundParameters["FilePath"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgUserPhoto @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 new file mode 100644 index 0000000000..eb71b54c3e --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 @@ -0,0 +1,286 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraUser { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompromised, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Surname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Country, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $OtherMails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $State, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PostalCode, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PhysicalDeliveryOfficeName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GivenName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserPrincipalName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CreationType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AgeGroup, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $JobTitle, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ImmutableId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CompanyName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PasswordPolicies, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TelephoneNumber, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserStateChangedOn, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Mobile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $City, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UsageLocation, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $FacsimileTelephoneNumber, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ShowInAddressList, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Department, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PreferredLanguage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ConsentProvidedForMinor, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MailNickName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $StreetAddress + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["PostalCode"]) + { + $params["PostalCode"] = $PSBoundParameters["PostalCode"] + } + if($null -ne $PSBoundParameters["MailNickName"]) + { + $params["MailNickName"] = $PSBoundParameters["MailNickName"] + } + if($null -ne $PSBoundParameters["ShowInAddressList"]) + { + $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["Mobile"]) + { + $params["MobilePhone"] = $PSBoundParameters["Mobile"] + } + if($null -ne $PSBoundParameters["JobTitle"]) + { + $params["JobTitle"] = $PSBoundParameters["JobTitle"] + } + if($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + { + $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] + } + if($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) + { + $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] + } + if($null -ne $PSBoundParameters["OtherMails"]) + { + $params["OtherMails"] = $PSBoundParameters["OtherMails"] + } + if($null -ne $PSBoundParameters["PasswordPolicies"]) + { + $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] + } + if($null -ne $PSBoundParameters["IsCompromised"]) + { + $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + } + if($null -ne $PSBoundParameters["SignInNames"]) + { + $params["Identities"] = $PSBoundParameters["SignInNames"] + } + if($null -ne $PSBoundParameters["PreferredLanguage"]) + { + $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] + } + if($null -ne $PSBoundParameters["UserState"]) + { + $params["ExternalUserState"] = $PSBoundParameters["UserState"] + } + if($null -ne $PSBoundParameters["ImmutableId"]) + { + $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] + } + if($null -ne $PSBoundParameters["City"]) + { + $params["City"] = $PSBoundParameters["City"] + } + if($null -ne $PSBoundParameters["AgeGroup"]) + { + $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] + } + if($null -ne $PSBoundParameters["ExtensionProperty"]) + { + $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] + } + if($null -ne $PSBoundParameters["UsageLocation"]) + { + $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] + } + if($null -ne $PSBoundParameters["UserStateChangedOn"]) + { + $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] + } + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if($null -ne $PSBoundParameters["Country"]) + { + $params["Country"] = $PSBoundParameters["Country"] + } + if($null -ne $PSBoundParameters["UserPrincipalName"]) + { + $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] + } + if($null -ne $PSBoundParameters["GivenName"]) + { + $params["GivenName"] = $PSBoundParameters["GivenName"] + } + if($null -ne $PSBoundParameters["PasswordProfile"]) + { + $TmpValue = $PSBoundParameters["PasswordProfile"] + $Value = @{ + forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin + forceChangePasswordNextSignInWithMfa = $TmpValue.EnforceChangePasswordPolicy + password = $TmpValue.Password + } + $params["passwordProfile"] = $Value + } + if($null -ne $PSBoundParameters["UserType"]) + { + $params["UserType"] = $PSBoundParameters["UserType"] + } + if($null -ne $PSBoundParameters["StreetAddress"]) + { + $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] + } + if($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if($null -ne $PSBoundParameters["Department"]) + { + $params["Department"] = $PSBoundParameters["Department"] + } + if($null -ne $PSBoundParameters["CompanyName"]) + { + $params["CompanyName"] = $PSBoundParameters["CompanyName"] + } + if($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) + { + $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] + } + if($null -ne $PSBoundParameters["Surname"]) + { + $params["Surname"] = $PSBoundParameters["Surname"] + } + if($null -ne $PSBoundParameters["TelephoneNumber"]) + { + $params["BusinessPhones"] = @($PSBoundParameters["TelephoneNumber"]) + } + if($null -ne $PSBoundParameters["CreationType"]) + { + $params["CreationType"] = $PSBoundParameters["CreationType"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $params = $params | ConvertTo-Json + $response = Invoke-GraphRequest -Headers $customHeaders -Uri 'https://graph.microsoft.com/v1.0/users?$select=*' -Method POST -Body $params + $response = $response | ConvertTo-Json | ConvertFrom-Json + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserState -Value ExternalUserState + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserStateChangedOn -Value ExternalUserStateChangeDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ImmutableId -Value onPremisesImmutableId + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value onPremisesProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + + $userData = [Microsoft.Graph.PowerShell.Models.MicrosoftGraphUser]::new() + $_.PSObject.Properties | ForEach-Object { + $userData | Add-Member -MemberType NoteProperty -Name $_.Name -Value $_.Value -Force + } + } + } + $userData + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 new file mode 100644 index 0000000000..dba7c210ee --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraUserAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PrincipalId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["AppRoleId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PrincipalId"]) + { + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgUserAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 new file mode 100644 index 0000000000..ada0c5ef63 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraUser { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgUser @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 new file mode 100644 index 0000000000..d9b0867b02 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraUserAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppRoleAssignmentId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + { + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgUserAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 new file mode 100644 index 0000000000..7e304ce936 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 @@ -0,0 +1,99 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraUserExtension { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Generic.List`1[System.String]] $ExtensionNames, + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionName, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ExtensionNames"]) + { + $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ExtensionName"]) + { + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ExtensionId"]) + { + $params["ExtensionId"] = $PSBoundParameters["ExtensionId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgUserExtension @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 new file mode 100644 index 0000000000..de11c1ce1e --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraUserManager { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgUserManagerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 new file mode 100644 index 0000000000..0cb69750cb --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 @@ -0,0 +1,328 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraUser { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompromised, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Surname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Country, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $OtherMails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $State, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PostalCode, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PhysicalDeliveryOfficeName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GivenName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserPrincipalName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CreationType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AgeGroup, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $JobTitle, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ImmutableId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CompanyName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PasswordPolicies, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TelephoneNumber, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserStateChangedOn, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Mobile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $City, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UsageLocation, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $FacsimileTelephoneNumber, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ShowInAddressList, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Department, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PreferredLanguage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ConsentProvidedForMinor, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MailNickName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $StreetAddress + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["UserState"]) + { + $params["ExternalUserState"] = $PSBoundParameters["UserState"] + } + if ($null -ne $PSBoundParameters["IsCompromised"]) + { + $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + } + if ($null -ne $PSBoundParameters["Surname"]) + { + $params["Surname"] = $PSBoundParameters["Surname"] + } + if ($null -ne $PSBoundParameters["ExtensionProperty"]) + { + $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["Country"]) + { + $params["Country"] = $PSBoundParameters["Country"] + } + if ($null -ne $PSBoundParameters["OtherMails"]) + { + $params["OtherMails"] = $PSBoundParameters["OtherMails"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if ($null -ne $PSBoundParameters["PostalCode"]) + { + $params["PostalCode"] = $PSBoundParameters["PostalCode"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) + { + $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] + } + if ($null -ne $PSBoundParameters["GivenName"]) + { + $params["GivenName"] = $PSBoundParameters["GivenName"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["UserPrincipalName"]) + { + $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] + } + if ($null -ne $PSBoundParameters["CreationType"]) + { + $params["CreationType"] = $PSBoundParameters["CreationType"] + } + if($null -ne $PSBoundParameters["PasswordProfile"]) + { + $TmpValue = $PSBoundParameters["PasswordProfile"] + $Value = @{ + forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin + forceChangePasswordNextSignInWithMfa = $TmpValue.EnforceChangePasswordPolicy + password = $TmpValue.Password + } + $params["PasswordProfile"] = $Value + } + if ($null -ne $PSBoundParameters["AgeGroup"]) + { + $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] + } + if ($null -ne $PSBoundParameters["JobTitle"]) + { + $params["JobTitle"] = $PSBoundParameters["JobTitle"] + } + if ($null -ne $PSBoundParameters["ImmutableId"]) + { + $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["CompanyName"]) + { + $params["CompanyName"] = $PSBoundParameters["CompanyName"] + } + if ($null -ne $PSBoundParameters["PasswordPolicies"]) + { + $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] + } + if ($null -ne $PSBoundParameters["SignInNames"]) + { + $params["Identities"] = $PSBoundParameters["SignInNames"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["TelephoneNumber"]) + { + $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["UserStateChangedOn"]) + { + $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] + } + if ($null -ne $PSBoundParameters["Mobile"]) + { + $params["MobilePhone"] = $PSBoundParameters["Mobile"] + } + if ($null -ne $PSBoundParameters["City"]) + { + $params["City"] = $PSBoundParameters["City"] + } + if ($null -ne $PSBoundParameters["UsageLocation"]) + { + $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] + } + if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) + { + $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ShowInAddressList"]) + { + $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] + } + if ($null -ne $PSBoundParameters["Department"]) + { + $params["Department"] = $PSBoundParameters["Department"] + } + if ($null -ne $PSBoundParameters["UserType"]) + { + $params["UserType"] = $PSBoundParameters["UserType"] + } + if ($null -ne $PSBoundParameters["PreferredLanguage"]) + { + $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] + } + if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + { + $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["MailNickName"]) + { + $params["MailNickName"] = $PSBoundParameters["MailNickName"] + } + if ($null -ne $PSBoundParameters["StreetAddress"]) + { + $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgUser @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 new file mode 100644 index 0000000000..e73e84fc34 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraUserExtension { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionNameValues, + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionName, + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionValue, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ExtensionNameValues"]) + { + $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ExtensionName"]) + { + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ExtensionValue"]) + { + $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgUserExtension @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 new file mode 100644 index 0000000000..9d32524230 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraUserLicense { + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.AssignedLicenses] $AssignedLicenses + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + $UserId = $PSBoundParameters["UserId"] + } + $jsonBody = @{ + addLicenses = @(if ($PSBoundParameters.AssignedLicenses.AddLicenses) { + $PSBoundParameters.AssignedLicenses.AddLicenses | Select-Object @{Name='skuId'; Expression={$_.'skuId' -replace 's', 's'.ToLower()}} + } else { + @() + }) + removeLicenses = @(if ($PSBoundParameters.AssignedLicenses.RemoveLicenses) { + $PSBoundParameters.AssignedLicenses.RemoveLicenses + } else { + @() + }) + } | ConvertTo-Json + + $customHeaders['Content-Type'] = 'application/json' + + $graphApiEndpoint = "https://graph.microsoft.com/v1.0/users/$UserId/microsoft.graph.assignLicense" + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $graphApiEndpoint -Method Post -Body $jsonBody + + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserId -Value Id + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 new file mode 100644 index 0000000000..e060847812 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraUserManager { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} + $params["BodyParameter"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Set-MgUserManagerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 new file mode 100644 index 0000000000..dd77afc676 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 @@ -0,0 +1,96 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraUserPassword { + param ( + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $ForceChangePasswordNextLogin, + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Security.SecureString] $Password, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $EnforceChangePasswordPolicy + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["UserId"]) + { + $userId = $PSBoundParameters["UserId"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Password"]) + { + $Temp = $PSBoundParameters["Password"] + $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Temp) + $PlainPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["ForceChangePasswordNextLogin"]) + { + $ForceChangePasswordNextSignIn = $PSBoundParameters["ForceChangePasswordNextLogin"] + } + if($null -ne $PSBoundParameters["EnforceChangePasswordPolicy"]) + { + $ForceChangePasswordNextSignInWithMfa = $PSBoundParameters["EnforceChangePasswordPolicy"] + } + + $PasswordProfile = @{} + if($null -ne $PSBoundParameters["ForceChangePasswordNextLogin"]) { $PasswordProfile["ForceChangePasswordNextSignIn"] = $ForceChangePasswordNextSignIn } + if($null -ne $PSBoundParameters["EnforceChangePasswordPolicy"]) { $PasswordProfile["ForceChangePasswordNextSignInWithMfa"] = $ForceChangePasswordNextSignInWithMfa } + if($null -ne $PSBoundParameters["Password"]) { $PasswordProfile["password"] = $PlainPassword } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgUser -Headers $customHeaders -UserId $userId -PasswordProfile $PasswordProfile @params + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 new file mode 100644 index 0000000000..2d793b6226 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraUserThumbnailPhoto { + [CmdletBinding(DefaultParameterSetName = 'File')] + param ( + + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, + + [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.IO.Stream] $FileStream, + + [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Byte[]] $ImageByteArray, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "Stream")] + [Parameter(ParameterSetName = "File")] + [Parameter(ParameterSetName = "ByteArray")] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["FilePath"]) + { + $params["InFile"] = $PSBoundParameters["FilePath"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["FileStream"]) + { + $params["FileStream"] = $PSBoundParameters["FileStream"] + } + if ($null -ne $PSBoundParameters["ImageByteArray"]) + { + $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Set-MgUserPhotoContent @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 new file mode 100644 index 0000000000..6188a142ae --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 @@ -0,0 +1,49 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Update-EntraSignedInUserPassword { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Security.SecureString] $NewPassword, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Security.SecureString] $CurrentPassword + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["NewPassword"]) + { + $params["NewPassword"] = $PSBoundParameters["NewPassword"] + } + if($null -ne $PSBoundParameters["CurrentPassword"]) + { + $params["CurrentPassword"] = $PSBoundParameters["CurrentPassword"] + } + + $currsecur = [System.Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUnicode($params.CurrentPassword) + $curr = [System.Runtime.InteropServices.Marshal]::PtrToStringUni($currsecur) + + $newsecur = [System.Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUnicode($params.NewPassword) + $new = [System.Runtime.InteropServices.Marshal]::PtrToStringUni($newsecur) + + $params["Url"] = "https://graph.microsoft.com/v1.0/me/changePassword" + $body = @{ + currentPassword = $curr + newPassword = $new + } + $body = $body | ConvertTo-Json + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $params.Url -Method POST -Body $body + $response + } +} + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 new file mode 100644 index 0000000000..b5e4230487 --- /dev/null +++ b/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Update-EntraUserFromFederated { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserPrincipalName, + [Parameter(Mandatory=$false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName=$true)][string] $NewPassword, + [Parameter(Mandatory=$false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName=$true)][guid] $TenantId + + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["UserPrincipalName"]) { + $UserPrincipalName = $PSBoundParameters.UserPrincipalName + $UserId = Get-MgUser -Search "UserPrincipalName:$UserPrincipalName" -ConsistencyLevel eventual + if ($null -ne $UserId) + { + $AuthenticationMethodId = Get-MgUserAuthenticationMethod -UserId $UserId.Id + $params["AuthenticationMethodId"] = $AuthenticationMethodId.Id + $params["UserId"] = $UserId.Id + } + } + if ($PSBoundParameters.ContainsKey("NewPassword")) { + $params["NewPassword"] = $PSBoundParameters["NewPassword"] + } + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if($null -ne $AuthenticationMethodId) + { + $response = Reset-MgUserAuthenticationMethodPassword @params -Headers $customHeaders + } + $response + } +} + diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md new file mode 100644 index 0000000000..c9bfb8a7fa --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md @@ -0,0 +1,102 @@ +--- +title: Add-EntraApplicationOwner +description: This article provides details on the Add-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Add-EntraApplicationOwner + +## Synopsis + +Adds an owner to an application. + +## Syntax + +```powershell +Add-EntraApplicationOwner + -ApplicationId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraApplicationOwner` cmdlet adds an owner to a Microsoft Entra ID application. + +## Examples + +### Example 1: Add a user as an owner to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$ApplicationId = (Get-EntraApplication -Top 1).ObjectId +$UserObjectId = (Get-EntraUser -UserId 'SawyerM@contoso.com').ObjectId +Add-EntraApplicationOwner -ApplicationId $ApplicationId -RefObjectId $UserObjectId +``` + +This example demonstrates how to add an owner to an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the ID of an application. +- `-RefObjectId` parameter specifies the ID of a user. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) + +[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..9cb637423c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,163 @@ +--- +title: Add-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Add-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Add-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Add a classification for a delegated permission. + +## Syntax + +```powershell +Add-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -PermissionId + -Classification + -PermissionName + [] +``` + +## Description + +The `Add-EntraServicePrincipalDelegatedPermissionClassification` cmdlet creates a delegated permission classification for the given permission on service principal. + +## Examples + +### Example 1: Create Delegated Permission Classification + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$PermissionId = $ServicePrincipal.PublishedPermissionScopes[0].Id +$PermissionName = $ServicePrincipal.PublishedPermissionScopes[0].Value + +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + PermissionId = $PermissionId + Classification = 'Low' + PermissionName = $PermissionName +} + +Add-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +T2qU_E28O0GgkLLIYRPsTwE low fc946a4f-bc4d-413b-a090-b2c86113ec4f LicenseManager.AccessAsUser +``` + +This command creates a delegated permission classification for the given permission on the service principal. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. +- `-PermissionId` parameter specifies the ID for a delegated permission. +- `-Classification` parameter specifies the classification for a delegated permission. +- `-PermissionName` parameter specifies the name for a delegated permission. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionId + +The ID for a delegated permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionName + +The name for a delegated permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Classification + +The classification for a delegated permission. +This parameter can take one of the following values: + +- Low: Specifies a classification for a permission as low impact. + +- Medium: Specifies a classification for a permission as medium impact. + +- High: Specifies a classification for a permission as high impact. + +```yaml +Type: ClassificationEnum +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DelegatedPermissionClassification + +## Notes + +## Related Links + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..e526f2d41a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md @@ -0,0 +1,109 @@ +--- +title: Add-EntraServicePrincipalOwner +description: This article provides details on the Add-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Add-EntraServicePrincipalOwner + +## Synopsis + +Adds an owner to a service principal. + +## Syntax + +```powershell +Add-EntraServicePrincipalOwner + -ServicePrincipalId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraServicePrincipalOwner` cmdlet adds an owner to a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Add a user as an owner to a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId +$OwnerId = (Get-EntraUser -Top 1).ObjectId +$Params = @{ + ServicePrincipalId = $ServicePrincipalId + RefObjectId = $OwnerId +} +Add-EntraServicePrincipalOwner @Params +``` + +This example demonstrates how to add an owner to a service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. +- `-RefObjectId` parameter specifies the user object ID. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md new file mode 100644 index 0000000000..d8cdda2c35 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md @@ -0,0 +1,276 @@ +--- +title: Get-EntraApplication +description: This article provides details on the Get-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplication + +schema: 2.0.0 +--- + +# Get-EntraApplication + +## Synopsis + +Gets an application. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraApplication + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraApplication + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraApplication + -ApplicationId + [-Property ] + [-All] + [] +``` + +## Description + +The `Get-EntraApplication` cmdlet gets a Microsoft Entra ID application. + +## Examples + +### Example 1: Get an application by ApplicationId + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -ApplicationId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +ToGraph_443democc3c aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This example demonstrates how to retrieve specific application by providing ID. + +### Example 2: Get all applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -All +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +test app aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADandPersonalMicrosoftAccount contoso.com +ToGraph_443DEM cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +test adms eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADandPersonalMicrosoftAccount contoso.com +test adms app azure gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADandPersonalMicrosoftAccount contoso.com +test adms2 iiiiiiii-aaaa-bbbb-cccc-jjjjjjjjjjjj jjjjjjjj-bbbb-cccc-dddd-kkkkkkkkkkkk AzureADandPersonalMicrosoftAccount contoso.com +``` + +This example demonstrates how to get all applications from Microsoft Entra ID. + +### Example 3: Get applications with expiring secrets + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication | + Where-Object { + $_.PasswordCredentials.keyId -ne $null -and + $_.PasswordCredentials.EndDateTime -lt (Get-Date).AddDays(30) + } | + ForEach-Object { + $_.DisplayName, + $_.Id, + $_.PasswordCredentials + } +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + AppOne 8/19/2024 9:00:00 PM 1jQ aaaaaaaa-0b0b-1c1c-2d2d-333333333333 8/6/2024 6:07:47 PM +``` + +This example retrieves applications with expiring secrets within 30 days. + +### Example 4: Get an application by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -Filter "DisplayName eq 'ToGraph_443DEMO'" +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +ToGraph_443DEMO cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +``` + +In this example, we retrieve application by its display name from Microsoft Entra ID. + +### Example 5: Search among retrieved applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -SearchString 'My new application 2' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application 2 kkkkkkkk-cccc-dddd-eeee-llllllllllll llllllll-dddd-eeee-ffff-mmmmmmmmmmmm AzureADandPersonalMicrosoftAccount contoso.com +``` + +This example demonstrates how to retrieve applications for specific string from Microsoft Entra ID. + +### Example 6: Retrieve an application by identifierUris + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -Filter "identifierUris/any(uri:uri eq 'https://wingtips.wingtiptoysonline.com')" +``` + +This example demonstrates how to retrieve applications by its identifierUris from Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplication](New-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..bce69cd889 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraApplicationExtensionProperty +description: This article provides details on the Get-EntraApplicationExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# Get-EntraApplicationExtensionProperty + +## Synopsis + +Gets application extension properties. + +## Syntax + +```powershell +Get-EntraApplicationExtensionProperty + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationExtensionProperty` cmdlet gets application extension properties in Microsoft Entra ID. + +## Examples + +### Example 1: Get extension properties + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationExtensionProperty -ApplicationId $Application.Id +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ------------- ---------------------- ---- ------------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Boolean False False extension_c371a443f6734a3e8982a26357fb7d59_NewAttribute {User} +``` + +This command gets the extension properties for the specified application in Microsoft Entra ID. You cane use the command `Get-EntraApplication` to get application ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +## Parameters + +### -ApplicationId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) + +[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..b0b5a7e66b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md @@ -0,0 +1,89 @@ +--- +title: Get-EntraApplicationKeyCredential +description: This article provides details on the Get-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# Get-EntraApplicationKeyCredential + +## Synopsis + +Gets the key credentials for an application. + +## Syntax + +```powershell +Get-EntraApplicationKeyCredential + -ObjectId + [] +``` + +## Description + +The `Get-EntraApplicationKeyCredential` cmdlet retrieves the key credentials for an application. Specify `ObjectId` parameter to retrieve the key credentials for an application. + +## Examples + +### Example 1: Get key credentials + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationKeyCredential -ObjectId $application.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage +------------------- ----------- ----------- --- ----- ------------- ---- ----- +{116, 101, 115, 116…} MyApp Cert 6/27/2024 11:49:17 AM bbbbbbbb-1c1c-2d2d-3e3e-444444444444 6/27/2023 11:29:17 AM AsymmetricX509Cert Verify +``` + +This command gets the key credentials for the specified application. + +`-ObjectId` parameter specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -ObjectId + +Specifies a unique ID of an application in Microsoft Entra ID to retrieve key credentials. Use `Get-EntraApplication` for more details. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) + +[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md new file mode 100644 index 0000000000..166508d887 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md @@ -0,0 +1,136 @@ +--- +title: Get-EntraApplicationLogo +description: This article provides details on the Get-EntraApplicationLogo command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationLogo + +schema: 2.0.0 +--- + +# Get-EntraApplicationLogo + +## Synopsis + +Retrieve the logo of an application. + +## Syntax + +```powershell +Get-EntraApplicationLogo + -ApplicationId + [-FileName ] + [-View ] + [-FilePath ] + [] +``` + +## Description + +The `Get-EntraApplicationLogo` cmdlet retrieves the logo that is set for an application. Specify the `ApplicationId` parameter to get a specific application logo for an application. + +## Examples + +### Example 1: Get an application logo for an application by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationLogo -ApplicationId 'bbbbbbbb-1111-1111-1111-cccccccccccc' -FilePath 'D:\outfile1.jpg' +``` + +This example shows how to retrieve the application logo for an application that is specified through the Object ID parameter. + +## Parameters + +### -FileName + +If provided, the application logo is saved to the file using the specified file name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FilePath + +If provided, the application logo is copied with a random filename to the file path that is specified in this parameter. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +The ApplicationId of the application for which the logo is to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -View + +If set to $true, the application's logo is displayed in a new window on the screen. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +### System.Boolean + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraApplicationLogo](Set-EntraApplicationLogo.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md new file mode 100644 index 0000000000..80b78d9283 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md @@ -0,0 +1,212 @@ +--- +title: Get-EntraApplicationOwner +description: This article provides details on the Get-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Get-EntraApplicationOwner + +## Synopsis + +Gets the owner of an application. + +## Syntax + +```powershell +Get-EntraApplicationOwner + -ApplicationId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationOwner` cmdlet get an owner of an Microsoft Entra ID application. + +## Examples + +### Example 1: Get the owner of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to get the owners of an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +### Example 2: Get the details about the owner of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -SearchString '' +$applicationOwners = Get-EntraApplicationOwner -ObjectId $application.ObjectId +$ownerDetails = $applicationOwners | ForEach-Object { + $ownerDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + displayName = $ownerDetail.displayName + Id = $ownerDetail.Id + UserPrincipalName = $ownerDetail.UserPrincipalName + UserType = $ownerDetail.UserType + accountEnabled = $ownerDetail.accountEnabled + } +} +$ownerDetails | Format-Table -Property displayName, Id, UserPrincipalName, UserType, accountEnabled -AutoSize +``` + +```Output +displayName Id UserPrincipalName UserType accountEnabled +----------- -- ----------------- -------- -------------- +Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc SawyerM@contoso.com Member True +Adele Vance ec5813fb-346e-4a33-a014-b55ffee3662b AdeleV@contoso.com Member True +``` + +This example demonstrates how to get the owners of an application in Microsoft Entra ID with more owner lookup details. + +### Example 3: Get all owners of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to get the all owners of a specified application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +### Example 4: Get top two owners of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to get the two owners of a specified application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) + +[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..f82b444191 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Get-EntraApplicationPasswordCredential +description: This article provides details on the Get-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# Get-EntraApplicationPasswordCredential + +## Synopsis + +Gets the password credential for an application. + +## Syntax + +```powershell +Get-EntraApplicationPasswordCredential + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationPasswordCredential` cmdlet receives the password credentials for a Microsoft Entra ID application. Specify `ApplicationId` parameter to cmdlet receives the password credentials. + +## Examples + +### Example 1: Get password credential for specified application + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationPasswordCredential -ApplicationId $application.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +{100, 101, 109, 111} demo 26/07/2025 10:34:40 Ap6 bbbbbbbb-1111-2222-3333-cccccccccccc 26/07/2024 10:34:40 +``` + +This example shows how to retrieve the password credential for specified application. + +- `-ApplicationId` specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -ApplicationId + +The ApplicationId of the application for which to get the password credential. Use `Get-EntraApplication` for more details. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md new file mode 100644 index 0000000000..69df671ca9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md @@ -0,0 +1,167 @@ +--- +title: Get-EntraApplicationServiceEndpoint +description: This article provides details on the Get-EntraApplicationServiceEndpoint command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint + +schema: 2.0.0 +--- + +# Get-EntraApplicationServiceEndpoint + +## Synopsis + +Retrieve the service endpoint of an application. + +## Syntax + +```powershell +Get-EntraApplicationServiceEndpoint + -ApplicationId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationServiceEndpoint` cmdlet retrieves the service endpoint(s) of an application. + +The service endpoint entity contains service discovery information. The serviceEndpoints property of the Application entity is of type ServiceEndpoint. + +Other services can use the information stored in the ServiceEndpoint entity to find this service and its addressable endpoints. + +## Examples + +### Example 1: Retrieve the application service endpoint by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId +``` + +This example demonstrates how to retrieve service endpoint of the application that is specified through the Object ID parameter. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +### Example 2: Get all service endpoints + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -All +``` + +This example demonstrates how to retrieve all service endpoints of a specified application. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +### Example 3: Get top five service endpoints + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -Top 5 +``` + +This example demonstrates how to retrieve five service endpoints of a specified application. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -All + +Return all service endpoints. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the object ID of the application for which the service endpoint is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of results that are returned. +The default is 100. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md new file mode 100644 index 0000000000..3ef510d43f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md @@ -0,0 +1,173 @@ +--- +title: Get-EntraApplicationTemplate +description: This article provides details on the Get-EntraApplicationTemplate command. + + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationTemplate +schema: 2.0.0 +--- + +# Get-EntraApplicationTemplate + +## Synopsis + +Retrieve a list of applicationTemplate objects. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraApplicationTemplate + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraApplicationTemplate + -Id + [] +``` + +## Description + +The `Get-EntraApplicationTemplate` cmdlet allows users to get a list of all the application templates or a specific application template. + +## Examples + +### Example 1. Gets a list of application template objects + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationTemplate +``` + +This command gets all the application template objects + +### Example 2. Gets an application template object + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationTemplate -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id Categories Description +-- ---------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {businessMgmt, productivity, projectManagement} Cube is perfect for businesses +``` + +This command gets an application template object for the given id. + +- `-Id` Specifies the unique identifier of an application template. + +## Parameters + +### -Id + +The unique identifier of an application template. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.ApplicationTemplate + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md new file mode 100644 index 0000000000..74cdce0fb3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md @@ -0,0 +1,257 @@ +--- +title: Get-EntraDeletedApplication +description: This article provides details on the Get-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Get-EntraDeletedApplication + +## Synopsis + +Retrieves the list of previously deleted applications. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDeletedApplication + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDeletedApplication + [-SearchString ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeletedApplication` cmdlet Retrieves the list of previously deleted applications. + +Note: Deleted security groups are permanently removed and cannot be retrieved. + +## Examples + +### Example 1: Get list of deleted applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com +TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com +``` + +This cmdlet retrieves the list of deleted applications. + +### Example 2: Get list of deleted applications using All parameter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -All +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com +TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com +``` + +This cmdlet retrieves the list of deleted applications using All parameter. + +### Example 3: Get top two deleted applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -Top 2 +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +``` + +This cmdlet retrieves top two deleted applications. + +### Example 4: Get deleted applications using SearchString parameter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -SearchString 'TestApp1' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This cmdlet retrieves deleted applications using SearchString parameter. + +### Example 5: Get deleted applications filter by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -Filter "DisplayName eq 'TestApp1'" +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This cmdlet retrieves deleted applications having specified display name. + +### Example 6: Get deleted applications with deletion age in days + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication | + Select-Object DisplayName, Id, AppId, SignInAudience, PublisherDomain, DeletedDateTime, + @{Name='DeletionAgeInDays'; Expression={(Get-Date) - $_.DeletedDateTime | Select-Object -ExpandProperty Days}} | + Format-Table -AutoSize +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain DeletedDateTime DeletionAgeInDays +----------- -- ----- -------------- --------------- --------------- ----------------- +Entra PowerShell App aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com 9/18/2024 7:41:44 AM 1 +``` + +This cmdlet retrieves deleted applications with deletion age in days. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Retrieve only those deleted applications that satisfy the filter. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Retrieve only those applications that satisfy the -SearchString value. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of applications returned by this cmdlet. +The default value is 100. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md new file mode 100644 index 0000000000..3f6ed52f43 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md @@ -0,0 +1,369 @@ +--- +title: Get-EntraServicePrincipal +description: This article provides details on the Get-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipal + +## Synopsis + +Gets a service principal. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraServicePrincipal + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraServicePrincipal + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraServicePrincipal + -ServicePrincipalId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipal` cmdlet gets a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve all service principal from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal +``` + +```Output +ObjectId AppId DisplayName +-------- ----- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 Demo App +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22223333-cccc-4444-dddd-5555eeee6666 Demo Two App +dddddddd-3333-4444-5555-eeeeeeeeeeee 33334444-dddd-5555-eeee-6666ffff7777 ProjectWorkManagement +``` + +This example retrieves all service principals from the directory. + +### Example 2: Retrieve a service principal by ServicePrincipalId + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -ServicePrincipalId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This command retrieves specific service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 3: Retrieve all service principals from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -All +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +ProvisioningPowerBi cccccccc-2222-3333-4444-dddddddddddd 22223333-cccc-4444-dddd-5555eeee6666 Application +``` + +This example retrieves all service principals from the directory. + +### Example 4: Retrieve top two service principal from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Top 2 +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +``` + +This command retrieves top two service principals from the directory. + +### Example 5: Get a service principal by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "DisplayName eq 'M365 License Manager'" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This example gets a service principal by its display name. + +### Example 6: Retrieve a list of all service principal, which has a display name that contains "M365 License Manager" + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -SearchString 'M365 License Manager' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This example gets a list of service principal, which has the specified display name. + +### Example 7: Retrieve all Enterprise apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryIntegratedApp')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Enterprise App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +Enterprise App2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application +``` + +This example demonstrates how to retrieve all enterprise apps. + +### Example 8: Retrieve all App proxy apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryOnPremApp')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +App proxy 1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +App proxy 2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application +``` + +This example demonstrates how to retrieve all app proxy apps. + +### Example 9: Retrieve all disabled apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "accountEnabled eq false" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Disabled App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all disabled apps. + +### Example 10: Retrieve all Global Secure Access apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'PrivateAccessNonWebApplication') or tags/Any(x: x eq 'NetworkAccessManagedApplication')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Global secure access app 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all Global secure access apps. + +### Example 11: List all applications without user assignment + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -All | Where-Object {$_.appRoleAssignmentRequired -ne 'true'} +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +App without user assignment 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all applications without user assignment. + +### Example 12: List all SAML application details + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "PreferredSingleSignOnMode eq 'saml'" +$servicePrincipal | Select-Object Id, DisplayName, AccountEnabled, AppId, PreferredSingleSignOnMode, AppRoleAssignmentRequired, SignInAudience, NotificationEmailAddresses, PreferredTokenSigningKeyEndDateTime, PreferredTokenSigningKeyValid, ReplyUrls,LoginUrl, LogoutUrl | Format-Table -AutoSize +``` + +```Output +Id DisplayName AccountEnabled AppId PreferredSingleSignOnMode AppRoleAssignmentRequired SignInAudience NotificationEmailAddresses +-- ----------- -------------- ----- ------------------------- ------------------------- -------------- -------------- +00001111-aaaa-2222-bbbb-3333cccc4444 SAML App True 33334444-dddd-5555-eeee-6666ffff7777 saml True AzureADMyOrg {admin@Contoso} +``` + +This example demonstrates how to retrieve all SAML application details. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md new file mode 100644 index 0000000000..891274acdb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md @@ -0,0 +1,188 @@ +--- +title: Get-EntraServicePrincipalAppRoleAssignedTo +description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignedTo command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalAppRoleAssignedTo + +## Synopsis + +Gets app role assignments for this app or service, granted to users, groups and other service principals. + +## Syntax + +```powershell +Get-EntraServicePrincipalAppRoleAssignedTo + -ServicePrincipalId + [-All ] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalAppRoleAssignedTo` cmdlet gets app role assignments for this app or service, granted to users, groups and other service principals. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Retrieve the app role assignments + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipalId +``` + +This example shows how to get app role assignments for an app or service, granted to users, groups and other service principals. + +- The first command gets the ID of a service principal and stores it in the $ServicePrincipalId variable. + +- The second command gets the app role assignments for the service principal granted to users, groups and other service principals. + +### Example 2: Get all app role assignments + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -All +``` + +```output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets the all app role assignments for the service principal granted to users, groups and other service principals. + +### Example 3: Get five app role assignments + +```powershell + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -Top 5 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets the five app role assignments for the service principal granted to users, groups and other service principals. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +`Get-EntraServiceAppRoleAssignedTo` is an alias for `Get-EntraServicePrincipalAppRoleAssignedTo`. + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..971849856a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,192 @@ +--- +title: Get-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Gets a service principal application role assignment. + +## Syntax + +```powershell +Get-EntraServicePrincipalAppRoleAssignment + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalAppRoleAssignment` cmdlet gets a role assignment for a service principal application in Microsoft Entra ID. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Retrieve the application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipalId +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 29-02-2024 05:53:00 Ask HR aaaaaaaa-bbbb-cccc-1111-222222222222 Group M365 License Manager +``` + +This command gets application role assignments for specified service principal. + +- The first command gets the ID of a service principal by using the Get-EntraServicePrincipal (./Get-EntraServicePrincipal.md) cmdlet. The command stores the ID in the $ServicePrincipalId variable. + +- The second command gets the application role assignments for the service principal in identified by $ServicePrincipalId. + +### Example 2: Retrieve all application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets all application role assignments for specified service principal. + +### Example 3: Retrieve the top five application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 3 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets three application role assignments for specified service principal. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraServiceAppRoleAssignment` is an alias for `Get-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) + +[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md new file mode 100644 index 0000000000..8a607194b9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md @@ -0,0 +1,155 @@ +--- +title: Get-EntraServicePrincipalCreatedObject +description: This article provides details on the Get-EntraServicePrincipalCreatedObject command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalCreatedObject + +## Synopsis + +Get objects created by a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalCreatedObject + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalCreatedObject` cmdlet gets an object created by a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the objects that created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +This example gets objects created by the service principal identified by $ServicePrincipalId. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Retrieve the all objects created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +This example demonstrates how to get the all object created by a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Retrieve the top two objects created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +This example demonstrates how to get the top two object created by a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..a236c7769c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,204 @@ +--- +title: Get-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Get-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Retrieve the delegated permission classification objects on a service principal. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalDelegatedPermissionClassification` cmdlet retrieves the delegated permission classifications from a service principal. + +## Examples + +### Example 1: Get a list of delegated permission classifications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +cccccccc-8888-9999-0000-dddddddddddd low dddd3333-ee44-5555-66ff-777777aaaaaa profile +``` + +This command retrieves all delegated permission classifications from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. + +### Example 2: Get a delegated permission classifications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + Id = '5XBeIKarUkypdm0tRsSAQwE' +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +``` + +This command retrieves the delegated permission classification by Id from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. +- `-Id` parameter specifies the delegated permission classification object Id. + +### Example 3: Get a delegated permission classification with filter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + Filter = "PermissionName eq 'Sites.Read.All'" +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +``` + +This command retrieves the filtered delegated permission classifications from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. +- `-Id` parameter specifies the delegated permission classification object Id. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a delegated permission classification object ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DelegatedPermissionClassification + +## Notes + +## Related Links + +[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..3dcf28a491 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,91 @@ +--- +title: Get-EntraServicePrincipalKeyCredential +description: This article provides details on the Get-EntraServicePrincipalKeyCredential Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalKeyCredential + +## Synopsis + +Get key credentials for a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalKeyCredential + -ServicePrincipalId + [] +``` + +## Description + +The `Get-EntraServicePrincipalKeyCredential` cmdlet gets the key credentials for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the key credential of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage +------------------- ----------- ----------- --- ----- ------------- ---- ----- + 08-02-2025 09:57:08 68b45e27-fef8-4f0d-bc7a-76bd949c16d1 08-02-2024 09:57:08 Symmetric Sign +``` + +This example retrieves the key credentials for specified service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal object Id. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of the application for which to get the password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) + +[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md new file mode 100644 index 0000000000..4fcb1f99c2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md @@ -0,0 +1,178 @@ +--- +title: Get-EntraServicePrincipalMembership +description: This article provides details on the Get-EntraServicePrincipalMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalMembership + +## Synopsis + +Get a service principal membership. + +## Syntax + +```powershell +Get-EntraServicePrincipalMembership + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalMembership` cmdlet gets the memberships of a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +``` + +This cmdlet retrieves a specified service principal memberships in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Retrieve all memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +22223333-cccc-4444-dddd-5555eeee6666 +33334444-dddd-5555-eeee-6666ffff7777 +``` + +This command gets all memberships of a specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Retrieve top two memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +22223333-cccc-4444-dddd-5555eeee6666 + +``` + +This command gets top two memberships of a specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md new file mode 100644 index 0000000000..aaa8e79db5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md @@ -0,0 +1,169 @@ +--- +title: Get-EntraServicePrincipalOAuth2PermissionGrant +description: This article provides details on the Get-EntraServicePrincipalOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOAuth2PermissionGrant + +## Synopsis + +Gets an oAuth2PermissionGrant object. + +## Syntax + +```powershell +Get-EntraServicePrincipalOAuth2PermissionGrant +-ServicePrincipalId +[-All] +[-Top ] +[-Property ] +[] +``` + +## Description + +The `Get-EntraServicePrincipalOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId $ServicePrincipalId +``` + +```output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +``` + +This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +### Example 2: Get all OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals A1bC2dE3f... openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 996d39aa-fdac-4d97-aa3d-c81fb47362ac aaaaaaaa-bbbb-cccc-1111-222222222222 PrivilegedAccess... +``` + +This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +### Example 3: Get two OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 2 +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +``` + +This example demonstrates how to get top two oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md new file mode 100644 index 0000000000..890f1d9a67 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md @@ -0,0 +1,195 @@ +--- +title: Get-EntraServicePrincipalOwnedObject +description: This article provides details on the Get-EntraServicePrincipalOwnedObject Command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOwnedObject + +## Synopsis + +Gets an object owned by a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalOwnedObject + [-All] + -ServicePrincipalId + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalOwnedObject` cmdlet retrieves an object owned by a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +The command retrieves the owned objects of a service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 2: Retrieve the all owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipalId = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").ObjectId +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipalId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves an object owned by a service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal Id. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 2: Retrieve all owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +The command receives the all owned objects of a service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 3: Retrieve top one owned object of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves the top one owned object of a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..2270323cb2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md @@ -0,0 +1,217 @@ +--- +title: Get-EntraServicePrincipalOwner +description: This article provides details on the Get-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOwner + +## Synopsis + +Get the owner of a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalOwner + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalOwner` cmdlet gets the owners of a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the owner of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example gets the owners of a specified service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 2: Retrieve all the owners of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command gets all the owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 3: Retrieve top two owners of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This command gets top two owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 4: Retrieve service principal owner details + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +# Get the owners of the service principal +$owners = Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All +$result = @() + +# Loop through each owner and get their UserPrincipalName and DisplayName +foreach ($owner in $owners) { + $userId = $owner.Id + $user = Get-EntraUser -UserId $userId + $userDetails = [PSCustomObject]@{ + Id = $owner.Id + UserPrincipalName = $user.UserPrincipalName + DisplayName = $user.DisplayName + } + $result += $userDetails +} + +# Output the result in a table format +$result | Format-Table -AutoSize +``` + +```Output +Id UserPrincipalName DisplayName +-- ----------------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AlexW@contoso.com Alex Wilber +bbbbbbbb-1111-2222-3333-cccccccccccc AdeleV@contoso.com Adele Vance +``` + +This example shows how to retrieve more details of a service principal owner such as displayName, userPrincipalName. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..32f7613b31 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,93 @@ +--- +title: Get-EntraServicePrincipalPasswordCredential +description: This article provides details on the Get-EntraServicePrincipalPasswordCredential Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalPasswordCredential + +## Synopsis + +Get credentials for a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + [] +``` + +## Description + +The `Get-EntraServicePrincipalPasswordCredential` cmdlet gets the password credentials for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the password credential of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 17-04-2025 07:32:41 gjW bdf6a3df-cc9b-4612-b948-e32804ee88f7 17-04-2024 07:32:41 + 21-03-2025 08:12:08 4fl 7f4414ec-8f72-49a8-b949-70d635899656 21-03-2024 08:12:08 + 12-12-2024 08:39:07 mjl 0fff6b21-0a20-4f7c-93ba-26ed9b648344 12-12-2023 08:39:10 +``` + +This example retrieves the password credentials for specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the object ID of a service principal. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of the service principal for which to get password credentials. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) + +[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md new file mode 100644 index 0000000000..f8b75c0061 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md @@ -0,0 +1,490 @@ +--- +title: New-EntraApplication +description: This article provides details on the New-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplication + +schema: 2.0.0 +--- + +# New-EntraApplication + +## Synopsis + +Creates (registers) a new application object. + +## Syntax + +```powershell +New-EntraApplication + -DisplayName + [-AddIns ] + [-PasswordCredentials ] + [-TokenEncryptionKeyId ] + [-SignInAudience ] + [-KeyCredentials ] + [-ParentalControlSettings ] + [-IdentifierUris ] + [-AppRoles ] + [-PublicClient ] + [-InformationalUrl ] + [-Tags ] + [-Api ] + [-OptionalClaims ] + [-GroupMembershipClaims ] + [-Web ] + [-IsFallbackPublicClient ] + [-IsDeviceOnlyAuthSupported ] + [-RequiredResourceAccess ] + [] +``` + +## Description + +Creates (registers) a new application object. Specify the `DisplayName` parameter to create a new application. + +## Examples + +### Example 1: Create an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +New-EntraApplication -DisplayName 'My new application' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 2: Create an application using IdentifierUris parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +New-EntraApplication -DisplayName 'My new application' -IdentifierUris 'https://mynewapp.contoso.com' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 3: Create an application using AddIns parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$addin = New-Object Microsoft.Open.MSGraph.Model.AddIn +$addin.Type = 'testtype' +$addinproperties = New-Object System.collections.Generic.List[Microsoft.Open.MSGraph.Model.KeyValue] +$addinproperties.Add([Microsoft.Open.MSGraph.Model.KeyValue]@{ Key = "key"; Value = "value" }) +$addin.Properties = $addinproperties +New-EntraApplication -DisplayName 'My new application' -AddIns $addin +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +## Parameters + +### -AddIns + +Defines custom behavior that a consuming service can use to call an app in specific contexts. + +For example, applications that can render file streams may set the addIns property for its "FileHandler" functionality. + +This will let services like Office 365 call the application in the context of a document the user is working on. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Api + +Specifies settings for an application that implements a web API. + +```yaml +Type: ApiApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoles + +The collection of application roles that an application might declare. +These roles can be assigned to users, groups, or service principals. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupMembershipClaims + +Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentifierUris + +User-defined URI(s) that uniquely identify a Web application within its Microsoft Entra ID tenant, or within a verified custom domain (see "Domains" tab in the Azure classic portal) if the application is multi-tenant. + +The first element is populated from the Web application's "APP ID URI" field if updated via the Azure classic portal (or respective Microsoft Entra ID PowerShell cmdlet parameter). + +Extra URIs can be added via the application manifest; see Understanding the Microsoft Entra ID Application Manifest for details. + +This collection is also used to populate the Web application's servicePrincipalNames collection. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InformationalUrl + +Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. + +The terms of service and privacy statement are surfaced to users through the user consent experience. + +```yaml +Type: InformationalUrl +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsDeviceOnlyAuthSupported + +Specifies if the application supports authentication using a device token. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsFallbackPublicClient + +Specifies the fallback application type as public client, such as an installed application running on a mobile device. + +The default value is false that means the fallback application type is confidential client such as web app. + +There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). + +In those cases Microsoft Entra ID interprets the application type based on the value of this property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +The collection of key credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OptionalClaims + +Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. + +```yaml +Type: OptionalClaims +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentalControlSettings + +Specifies parental control settings for an application. + +```yaml +Type: ParentalControlSettings +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +The collection of password credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicClient + +Specifies whether this application is a public client (such as an installed application running on a mobile device). +Default is false. + +```yaml +Type: PublicClientApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequiredResourceAccess + +Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. + +This pre-configuration of required resource access drives the consent experience. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInAudience + +Specifies what Microsoft accounts are supported for the current application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Custom strings that can be used to categorize and identify the application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TokenEncryptionKeyId + +Specifies the keyId of a public key from the keyCredentials collection. + +When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. + +The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Web + +Specifies settings for a web application. + +```yaml +Type: WebApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Boolean + +### Microsoft.Open.MSGraph.Model.ApiApplication + +### Microsoft.Open.MSGraph.Model.InformationalUrl + +### Microsoft.Open.MSGraph.Model.OptionalClaims + +### Microsoft.Open.MSGraph.Model.ParentalControlSettings + +### Microsoft.Open.MSGraph.Model.PublicClientApplication + +### Microsoft.Open.MSGraph.Model.WebApplication + +### String + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.Add-in] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] + +### System.Collections.Generic.List`1[System.String] + +### System. Nullable`1[System.Boolean] + +## Outputs + +### Microsoft.Open.MSGraph.Model.MsApplication + +## Notes + +- See more details - + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..3635b5b70b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md @@ -0,0 +1,215 @@ +--- +title: New-EntraApplicationExtensionProperty +description: This article provides details on the New-EntraApplicationExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# New-EntraApplicationExtensionProperty + +## Synopsis + +Creates an application extension property. + +## Syntax + +```powershell +New-EntraApplicationExtensionProperty + -ApplicationId + -Name + [-DataType ] + [-TargetObjects ] + [] +``` + +## Description + +The `New-EntraApplicationExtensionProperty` cmdlet creates an application extension property for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Create an extension property + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} +``` + +This command creates an application extension property of the string type for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. + +### Example 2: Create an extension property with data type parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' + DataType = 'Boolean' +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app Boolean False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} +``` + +This command creates an application extension property of the specified data type for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. +- `-DataType` parameter specifies the data type of the value the extension property can hold. + +### Example 3: Create an extension property with targets parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$targets = New-Object System.Collections.Generic.List[System.String] +$targets.Add('User') +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' + TargetObjects = $targets +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {User} +``` + +The example shows how to create an application extension property with the specified target objects for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. +- `-TargetObjects` parameter specifies the Microsoft Graph resources that use the extension property. All values must be in PascalCase. + +## Parameters + +### -DataType + +Specifies the data type of the value the extension property can hold. Following values are supported. + +- Binary - 256 bytes maximum +- Boolean +- DateTime - Must be specified in ISO 8601 format. Will be stored in UTC. +- Integer - 32-bit value. +- LargeInteger - 64-bit value. +- String - 256 characters maximum + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +Specifies the name of the extension property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjects + +Specifies the Microsoft Graph resources that can use the extension property. All values must be in PascalCase. The following values are supported. + +- User +- Group +- AdministrativeUnit +- Application +- Device +- Organization + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) + +[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md new file mode 100644 index 0000000000..3c8821a907 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md @@ -0,0 +1,111 @@ +--- +title: New-EntraApplicationFromApplicationTemplate +description: This article provides details on the New-EntraApplicationFromApplicationTemplate command. + + +ms.service: entra +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate +schema: 2.0.0 +--- + +# New-EntraApplicationFromApplicationTemplate + +## Synopsis + +Add an instance of an application from the Microsoft Entra application gallery into your directory. + +## Syntax + +```powershell +New-EntraApplicationFromApplicationTemplate + -Id + -DisplayName + [] +``` + +## Description + +The `New-EntraApplicationFromApplicationTemplate` cmdlet adds an instance of an application from the Microsoft Entra application gallery into your directory. + +The application template with ID `8adf8e6e-67b2-4cf2-a259-e3dc5476c621` can be used to add a non-gallery app that you can configure different single-sign on (SSO) modes like SAML SSO and password-based SSO. + +## Examples + +### Example 1: Creates an application from application template + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DisplayName = 'ApplicationTemplate' +} +New-EntraApplicationFromApplicationTemplate @params +``` + +```Output +@odata.context servicePrincipal +-------------- ---------------- +https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.applicationServicePrincipal @{oauth2PermissionScopes=System.Object[]; servicePrincipalType=Application; displ...} +``` + +This command instantiates a new application based on application template referenced by the ID. + +- `-Id` specifies Application TemplateId. +- `-DisplayName` specifies application template display name. + +## Parameters + +### -Id + +The Id parameter specifies Application TemplateId. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Application template display name. + +```yaml +Type: System.ApplicationTemplateDisplayName +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.ApplicationTemplateCopy + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md new file mode 100644 index 0000000000..0f5ed02cf9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md @@ -0,0 +1,155 @@ +--- +title: New-EntraApplicationKey +description: This article provides details on the New-EntraApplicationKey command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKey + +schema: 2.0.0 +--- + +# New-EntraApplicationKey + +## Synopsis + +Adds a new key to an application. + +## Syntax + +```powershell +New-EntraApplicationKey + -ObjectId + -KeyCredential + -PasswordCredential ] + -Proof + [] +``` + +## Description + +Adds a new key to an application. + +## Examples + +### Example 1: Add a key credential to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $app.ObjectId + KeyCredential = @{ key=[System.Convert]::FromBase64String('{base64cert}') } + PasswordCredential = @{ DisplayName = 'mypassword' } + Proof = '{token}' +} + +New-EntraApplicationKey @params +``` + +This command adds a key credential to an specified application. + +- `-ObjectId` parameter specifies the unique identifier of an application. +- `-KeyCredential` parameter specifies the application key credential to add. +- `-PasswordCredential` parameter specifies the application password credential to add. +- `-Proof` parameter specifies the signed JWT token used as a proof of possession of the existing keys. + +## Parameters + +### -KeyCredential + +The application key credential to add. + +NOTES: keyId value should be null. + +```yaml +Type: KeyCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +The unique identifier of the application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredential + +The application password credential to add. + +NOTES: keyId value should be null. + +```yaml +Type: PasswordCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Proof + +A signed JWT token used as a proof of possession of the existing keys. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +### Microsoft.Open.MSGraph.Model.KeyCredential + +### Microsoft.Open.MSGraph.Model.PasswordCredential + +## Outputs + +### Microsoft.Open.MSGraph.Model.KeyCredential + +## Notes + +## Related Links + +[Remove-EntraApplicationKey](Remove-EntraApplicationKey.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..4d347c6251 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md @@ -0,0 +1,258 @@ +--- +title: New-EntraApplicationKeyCredential +description: This article provides details on the New-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# New-EntraApplicationKeyCredential + +## Synopsis + +Creates a key credential for an application. + +## Syntax + +```powershell +New-EntraApplicationKeyCredential + -ApplicationId + [-CustomKeyIdentifier ] + [-Type ] + [-Usage ] + [-Value ] + [-EndDate ] + [-StartDate ] + [] +``` + +## Description + +The `New-EntraApplicationKeyCredential` cmdlet creates a key credential for an application. + +An application can use this command along with `Remove-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. + +As part of the request validation, proof of possession of an existing key is verified before the action can be performed. + +## Examples + +### Example 1: Create a new application key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' + +$AppId = (Get-EntraApplication -Top 1).Objectid +$params = @{ + ApplicationId = $AppId + CustomKeyIdentifier = 'EntraPowerShellKey' + StartDate = '2024-03-21T14:14:14Z' + Type = 'Symmetric' + Usage = 'Sign' + Value = '' +} + +New-EntraApplicationKeyCredential @params +``` + +```Output +CustomKeyIdentifier : {84, 101, 115, 116} +EndDate : 2024-03-21T14:14:14Z +KeyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 +StartDate : 2025-03-21T14:14:14Z +Type : Symmetric +Usage : Sign +Value : {49, 50, 51} +``` + +This example shows how to create an application key credential. + +- `-ApplicationId` Specifies a unique ID of an application +- `-CustomKeyIdentifier` Specifies a custom key ID. +- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. +- `-Type` Specifies the type of the key. +- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. +- `-Value` Specifies the value for the key. + +You can use the `Get-EntraApplication` cmdlet to retrieve the application Object ID. + +### Example 2: Use a certificate to add an application key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' + +$cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 #create a new certificate object +$cer.Import('C:\Users\ContosoUser\appcert.cer') +$bin = $cer.GetRawCertData() +$base64Value = [System.Convert]::ToBase64String($bin) +$bin = $cer.GetCertHash() +$base64Thumbprint = [System.Convert]::ToBase64String($bin) +$keyid = [System.Guid]::NewGuid().ToString() + +$params = @{ + ApplicationId = '22223333-cccc-4444-dddd-5555eeee6666' + CustomKeyIdentifier = $base64Thumbprint + Type = 'AsymmetricX509Cert' + Usage = 'Verify' + Value = $base64Value + StartDate = $cer.GetEffectiveDateString() + EndDate = $cer.GetExpirationDateString() +} + +New-EntraApplicationKeyCredential @params +``` + +This example shows how to create an application key credential. + +- `-ApplicationId` Specifies a unique ID of an application +- `-CustomKeyIdentifier` Specifies a custom key ID. +- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. +- `-EndDate` Specifies the time when the key becomes invalid as a DateTime object. +- `-Type` Specifies the type of the key. +- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. +- `-Value` Specifies the value for the key. + +## Parameters + +### -CustomKeyIdentifier + +Specifies a custom key ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +Specifies the time when the key becomes invalid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +Specifies the time when the key becomes valid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of the key. + +```yaml +Type: KeyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Usage + +Specifies the key usage. + +- `AsymmetricX509Cert`: The usage must be `Verify`. +- `X509CertAndPassword`: The usage must be `Sign`. + +```yaml +Type: KeyUsage +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Value + +Specifies the value for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) + +[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md new file mode 100644 index 0000000000..155f17e3fe --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md @@ -0,0 +1,121 @@ +--- +title: New-EntraApplicationPassword +description: This article provides details on the New-EntraApplicationPassword command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPassword + +schema: 2.0.0 +--- + +# New-EntraApplicationPassword + +## Synopsis + +Adds a strong password to an application. + +## Syntax + +```powershell +New-EntraApplicationPassword + -ObjectId + -PasswordCredential + [] +``` + +## Description + +Adds a strong password to an application. + +## Examples + +### Example 1: Add a password to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$Application = Get-EntraBetaApplication -SearchString '' +$PasswordCredential= New-Object Microsoft.Open.MSGraph.Model.PasswordCredential +$PasswordCredential.StartDateTime = Get-Date -Year 2024 -Month 12 -Day 28 +$PasswordCredential.EndDateTime = Get-Date -Year 2025 -Month 2 -Day 28 +$PasswordCredential.KeyId = 'bbbbbbbb-1c1c-2d2d-3e3e-444444444444' +$PasswordCredential.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('a') +$PasswordCredential.Hint = 'b' +$params = @{ + ObjectId = $Application.ObjectId + PasswordCredential = $PasswordCredential +} + +New-EntraApplicationPassword @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +{97} 2/28/2025 7:05:39 AM nnW bbbbbbbb-1c1c-2d2d-3e3e-444444444444 12/28/2024 7:05:39 AM +``` + +This example adds a password to the specified application. + +- `-ObjectId` parameter specifies the unique identifier of the application. +- `-PasswordCredential` parameter specifies a password credential associated with an application or a service principal. + +## Parameters + +### -ObjectId + +The unique identifier of the application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredential + +Represents a password credential associated with an application or a service principal. + +```yaml +Type: PasswordCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +### Microsoft.Open.MSGraph.Model.PasswordCredential + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraApplicationPassword](Remove-EntraApplicationPassword.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..55f8da01e5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md @@ -0,0 +1,215 @@ +--- +title: New-EntraApplicationPasswordCredential +description: This article provides details on the New-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# New-EntraApplicationPasswordCredential + +## Synopsis + +Creates a password credential for an application. + +## Syntax + +```powershell +New-EntraApplicationPasswordCredential + -ApplicationId + [-CustomKeyIdentifier ] + [-StartDate ] + [-EndDate ] + [] +``` + +## Description + +The `New-EntraApplicationPasswordCredential` cmdlet creates a password credential for an application in Microsoft Entra ID. + +## Examples + +### Example 1: Create a password credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +New-EntraApplicationPasswordCredential -ApplicationId $application.Id +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. + +### Example 2: Create a password credential using CustomKeyIdentifier parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +100 101 109 111 demo 8/2/2026 11:47:53 AM 8Mw tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 8/2/2024 11:47:53 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-CustomKeyIdentifier` Speicifies unique binary identifier. + +### Example 3: Create a password credential using StartDate parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + StartDate = (Get-Date).AddYears(0) + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-StartDate` Speicifies the date and time at which the password becomes valid. + +### Example 4: Create a password credential using EndDate parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + EndDate = (Get-Date).AddYears(2) + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-EndDate` Speicifies The date and time at which the password expires. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -CustomKeyIdentifier + +A unique binary identifier. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +The date and time at which the password becomes valid. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +The date and time at which the password expires. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) + +[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md new file mode 100644 index 0000000000..278ad45ebb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md @@ -0,0 +1,406 @@ +--- +title: New-EntraServicePrincipal +description: This article provides details on the New-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipal + +schema: 2.0.0 +--- + +# New-EntraServicePrincipal + +## Synopsis + +Creates a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipal + -AppId + [-KeyCredentials ] + [-Homepage ] + [-LogoutUrl ] + [-ServicePrincipalType ] + [-AlternativeNames ] + [-PasswordCredentials ] + [-Tags ] + [-AccountEnabled ] + [-ServicePrincipalNames ] + [-AppRoleAssignmentRequired ] + [-DisplayName ] + [-ReplyUrls ] + [] +``` + +## Description + +Create a new service Principal. + +For multitenant apps, the calling user must also be in at least one of the following Microsoft Entra roles: + +- Application Administrator +- Cloud Application Administrator + +For single-tenant apps where the calling user is a non-admin user but is the owner of the backing application, the user must have the Application Developer role. + +## Examples + +### Example 1: Create a new service principal using DisplayName, AccountEnabled, Tags, and AppRoleAssignmentRequired + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AccountEnabled = $true + AppId = $MyApp.AppId + AppRoleAssignmentRequired = $true + DisplayName = $MyApp.DisplayName + Tags = {WindowsAzureActiveDirectoryIntegratedApp} +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +The tag `-Tags {WindowsAzureActiveDirectoryIntegratedApp}` is used to have this service principal show up in the list of Integrated Applications in the Admin Portal. + +- `-AccountEnabled` parameter specifies true if the service principal account is enabled, otherwise false. +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-DisplayName` parameter specifies the service principal display name. +- `-AppRoleAssignmentRequired` parameter indicates whether an application role assignment is required. + +### Example 2: Create a new service principal using Homepage, logoutUrl, and ReplyUrls + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + Homepage = 'https://localhost/home' + LogoutUrl = 'htpp://localhost/logout' + ReplyUrls = 'https://localhost/redirect' +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-Homepage` parameter specifies the home page or landing page of the application. +- `-LogoutUrl` parameter specifies the logout URL. +- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. + +### Example 3: Create a new service principal by KeyCredentials + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential +$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') +$startdate = Get-Date -Year 2023 -Month 10 -Day 23 +$creds.StartDate = $startdate +$creds.Type = 'Symmetric' +$creds.Usage = 'Sign' +$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('strong-cred-value') +$creds.EndDate = Get-Date -Year 2024 -Month 10 -Day 23 +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + KeyCredentials = $creds +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-KeyCredentials` parameter specifies the collection of key credentials associated with the service principal. + +### Example 4: Create a new service principal by AlternativeNames, ServicePrincipalType, and ServicePrincipalName + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + AlternativeNames = 'sktest2' + ServicePrincipalType = 'Application' + ServicePrincipalNames = $MyApp.AppId +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADandPersonalMicrosoftAccount Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-AlternativeNames` parameter specifies the alternative names for this service principal. +- `-ServicePrincipalType` parameter specifies the type of the service principal. +- `-ServicePrincipalNames` parameter specifies an array of service principal names. + +## Parameters + +### -AccountEnabled + +True if the service principal account is enabled; otherwise, false. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeNames + +The alternative names for this service principal. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppId + +The unique identifier for the associated application (its appId property). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoleAssignmentRequired + +Indicates whether an application role assignment is required. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the service principal display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Homepage + +Home page or landing page of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +The collection of key credentials associated with the service principal. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoutUrl + +Specifies the logout URL. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +The collection of password credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplyUrls + +The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalNames + +Specifies an array of service principal names. +Based on the identifierURIs collection, plus the application's appId property, these URIs are used to reference an application's service principal. +A client uses ServicePrincipalNames to: + +- populate requiredResourceAccess, via "Permissions to other applications" in the Azure classic portal. +- Specify a resource URI to acquire an access token, which is the URI returned in the claim. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalType + +The type of the service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Tags linked to this service principal. + +Note that if you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..5a44ce185e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,230 @@ +--- +title: New-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the New-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Assigns a service principal to an application role. + +## Syntax + +```powershell +New-EntraServicePrincipalAppRoleAssignment + -ObjectId + -PrincipalId + -Id + -ResourceId + [] +``` + +## Description + +The `New-EntraServicePrincipalAppRoleAssignment` cmdlet assigns a service principal to an application role in Microsoft Entra ID. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Assign an app role to another service principal + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $spo.ObjectId +} + +New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box aaaa0000-bb11-2222-33cc-444444dddddd +``` + +This example demonstrates how to assign an app role to another service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. + +- `-ObjectId` parameter specifies the ObjectId of a client service principal to which you're assigning the app role. +- `-ResourceId`parameter specifies the ObjectId of the resource service principal. +- `-Id` parameter specifies the Id of the app role (defined on the resource service principal) to assign to the client service principal. If no app roles are defined on the resource app, you can use `00000000-0000-0000-0000-000000000000`. +- `-PrincipalId` parameter specifies the ObjectId of the client service principal to which you're assigning the app role. + +### Example 2: Assign an app role to a user + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $user = Get-EntraUser -SearchString 'Test Contoso' + + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $user.ObjectId +} + +New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box bbbb1111-cc22-3333-44dd-555555eeeeee +``` + +This example demonstrates how to assign an app role to a user in Microsoft Entra ID. +You can use the command `Get-EntraServicePrincipal` to get a service principal Id. +You can use the command `Get-EntraUser` to get a user Id. + +- `-ObjectId` parameter specifies the ObjectId of the app's service principal. +- `-ResourceId`parameter specifies the ObjectId of the app's service principal. +- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the user. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the user. +- `-PrincipalId` parameter specifies the ObjectId of a user to which you're assigning the app role. + +### Example 3: Assign an app role to a group + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $group = Get-EntraGroup -SearchString 'testGroup' + + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $group.ObjectId + } + + New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box cccc2222-dd33-4444-55ee-666666ffffff +``` + +This example demonstrates how to assign an app role to a group in Microsoft Entra ID. +You can use the command `Get-EntraServicePrincipal` to get a service principal Id. +You can use the command `Get-EntraGroup` to get a group Id. + +- `-ObjectId` parameter specifies the ObjectId of the app's service principal. +- `-ResourceId`parameter specifies the ObjectId of the app's service principal. +- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the group. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the group. +- `-PrincipalId` parameter specifies the ObjectId of a group to which you're assigning the app role. + +## Parameters + +### -Id + +Specifies the ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies a principal ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +Specifies a resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`New-EntraServiceAppRoleAssignment` is an alias for `New-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) + +[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..74a1a50f71 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,182 @@ +--- +title: New-EntraServicePrincipalKeyCredential +description: This article provides details on the New-EntraServicePrincipalKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalKeyCredential + +## Synopsis + +Creates a password credential for a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipalKeyCredential + -ObjectId + [-CustomKeyIdentifier ] + [-StartDate ] + [-EndDate ] + [-Type ] + [-Usage ] + [-Value ] + [] +``` + +## Description + +The New-EntraServicePrincipalKeyCredential cmdlet creates a key credential for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Create a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +New-EntraServicePrincipalKeyCredential +``` + +This command creates a key credential for a service principal. + +## Parameters + +### -CustomKeyIdentifier + +Specifies a custom key ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +Specifies the time when the key becomes invalid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +Specifies the time when the key becomes valid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of the key. + +```yaml +Type: KeyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Usage + +Specifies the key usage. + +```yaml +Type: KeyUsage +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Value + +Specifies the value for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) + +[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..a8377771c4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,168 @@ +--- +title: New-EntraServicePrincipalPasswordCredential +description: This article provides details on the New-EntraServicePrincipalPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalPasswordCredential + +## Synopsis + +Creates a password credential for a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + [-EndDate ] + [-StartDate ] + [] +``` + +## Description + +The `New-EntraServicePrincipalPasswordCredential` cmdlet creates a password credential for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Create a password credential with StartDate + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + StartDate = '2024-04-21T14:14:14Z' +} +New-EntraServicePrincipalPasswordCredential @Params +``` + +```Output +secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u +@odata.type : #microsoft.graph.servicePrincipal +endDateTime : 08-08-2026 10:30:00 +hint : LY. +customKeyIdentifier : +startDateTime : 08-08-2024 14:14:14 +keyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 +@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword +displayName : +StartDate : 08-08-2024 14:14:14 +EndDate : 08-08-2026 10:30:00 +``` + +This example demonstrates how to create a password credential with StartDate for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-StarteDate` parameter specifies the date and time at which the password becomes valid. + +### Example 2: Create a password credential with EndtDate + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + EndDate = '2030-03-21T14:14:14Z' +} +New-EntraServicePrincipalPasswordCredential @Params +``` + +```Output +secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u +@odata.type : #microsoft.graph.servicePrincipal +endDateTime : 08-08-2026 10:30:00 +hint : LY. +customKeyIdentifier : +startDateTime : 08-08-2024 14:14:14 +keyId : bbbbbbbb-1c1c-2d2d-3e3e-444444444444 +@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword +displayName : +StartDate : 08-08-2024 14:14:14 +EndDate : 08-08-2026 10:30:00 +``` + +This example demonstrates how to create a password credential with EndDate for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-EndDate` parameter specifies the date and time at which the password expires represented using ISO 8601 format and is always in UTC time. + +## Parameters + +### -EndDate + +The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of the service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) + +[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md new file mode 100644 index 0000000000..bb06d0fd75 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraApplication +description: This article provides details on the Remove-EntraApplication command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplication + +schema: 2.0.0 +--- + +# Remove-EntraApplication + +## Synopsis + +Deletes an application object. + +## Syntax + +```powershell +Remove-EntraApplication + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplication` cmdlet deletes an application object identified by ApplicationId. Specify the `ApplicationId` parameter to delete an application object. + +## Examples + +### Example 1: Remove an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$Application = Get-EntraApplication -SearchString '' +Remove-EntraApplication -ApplicationId $Application.ObjectId +``` + +This example demonstrates how to delete an application object. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[New-EntraApplication](New-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..3ff1288b6e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationExtensionProperty +description: This article provides details on the Remove-EntraApplicationExtensionProperty command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# Remove-EntraApplicationExtensionProperty + +## Synopsis + +Removes an application extension property. + +## Syntax + +```powershell +Remove-EntraApplicationExtensionProperty + -ExtensionPropertyId + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplicationExtensionProperty` cmdlet removes an application extension property for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an application extension property + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + ExtensionPropertyId = 'cccc2222-dd33-4444-55ee-666666ffffff' +} + +Remove-EntraApplicationExtensionProperty @params +``` + +This example removes the extension property that has the specified ID from an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-ExtensionPropertyId` parameter specifies the unique identifier of the extension property to remove. + +## Parameters + +### -ExtensionPropertyId + +Specifies the unique ID of the extension property to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) + +[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md new file mode 100644 index 0000000000..9f0e4a9325 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md @@ -0,0 +1,133 @@ +--- +title: Remove-EntraApplicationKey +description: This article provides details on the Remove-EntraApplicationKey command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKey + +schema: 2.0.0 +--- + +# Remove-EntraApplicationKey + +## Synopsis + +Removes a key from an application. + +## Syntax + +```powershell +Remove-EntraApplicationKey + -ObjectId + [-Proof ] + [-KeyId ] + [] +``` + +## Description + +Removes a key from an application. + +## Examples + +### Example 1: Removes a key credential from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $app.ObjectId + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' + Proof = {token} +} + +Remove-EntraApplicationKey @params +``` + +This command removes the specified key credential from the specified application. + +- `-ObjectId` parameter specifies the unique identifier of an application. +- `-KeyId` parameter specifies the key Id corresponding to the key object to be removed. +- `-Proof` parameter specifies the JWT token provided as a proof of possession. + +## Parameters + +### -ObjectId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KeyId + +The key Id corresponding to the key object to be removed. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Proof + +The JWT token provided as a proof of possession. + +A self-signed JWT token used as a proof of possession of the existing keys. This JWT token must be signed with a private key that corresponds to one of the existing valid certificates associated with the application. The token should contain the following claims: + +- `aud`: Audience needs to be 00000002-0000-0000-c000-000000000000. +- `iss`: Issuer needs to be the ID of the application that initiates the request. +- `nbf`: Not before time. +- `exp`: Expiration time should be the value of nbf + 10 minutes. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationKey](New-EntraApplicationKey.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..944d130412 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md @@ -0,0 +1,108 @@ +--- +title: Remove-EntraApplicationKeyCredential +description: This article provides details on the Remove-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# Remove-EntraApplicationKeyCredential + +## Synopsis + +Removes a key credential from an application. + +## Syntax + +```powershell +Remove-EntraApplicationKeyCredential + -ApplicationId + -KeyId + [] +``` + +## Description + +The `Remove-EntraApplicationKeyCredential` cmdlet removes a key credential from an application. + +An application can use this command along with `New-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. + +## Examples + +### Example 1: Remove a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +} + +Remove-EntraApplicationKeyCredential @params +``` + +This command removes the specified key credential from the specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-KeyId` Specifies a custom key ID. Use `Get-EntraApplicationKeyCredential` to get the keyId details. + +## Parameters + +### -KeyId + +Specifies a custom key ID. The unique identifier for the password. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) + +[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md new file mode 100644 index 0000000000..a8a9019f62 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationOwner +description: This article provides details on the Remove-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Remove-EntraApplicationOwner + +## Synopsis + +Removes an owner from an application. + +## Syntax + +```powershell +Remove-EntraApplicationOwner + -OwnerId + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplicationOwner` cmdlet removes an owner from an application in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an owner from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + OwnerId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} + +Remove-EntraApplicationOwner @params +``` + +This example removes the specified owner from the specified application. You can use the command `Get-EntraApplication` to get application Id. + +- `-ApplicationId` parameter specifies the the unique identifier of a application. +- `-OwnerId` parameter specifies the ID of the owner. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, -`InformationVariable`, `-OutVariable`, -`OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) + +[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md new file mode 100644 index 0000000000..b63496136c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationPassword +description: This article provides details on the Remove-EntraApplicationPassword command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPassword + +schema: 2.0.0 +--- + +# Remove-EntraApplicationPassword + +## Synopsis + +Remove a password from an application. + +## Syntax + +```powershell +Remove-EntraApplicationPassword + -ObjectId + [-KeyId ] + [] +``` + +## Description + +Remove a password from an application. + +## Examples + +### Example 1: Removes a password from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $application.Id + KeyId = 'cccccccc-2d2d-3e3e-4f4f-555555555555' +} + +Remove-EntraApplicationPassword @params +``` + +This example removes the specified password from the specified application. + +- `-ObjectId` parameter specifies the unique identifier of the application. +- `-KeyId` parameter specifies the unique identifier of the PasswordCredential. + +## Parameters + +### -ObjectId + +The unique identifier of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KeyId + +The unique identifier for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationPassword](New-EntraApplicationPassword.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..72d34ae5ff --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraApplicationPasswordCredential +description: This article provides details on the Remove-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# Remove-EntraApplicationPasswordCredential + +## Synopsis + +Removes a password credential from an application. + +## Syntax + +```powershell +Remove-EntraApplicationPasswordCredential + -ApplicationId + -KeyId + [] +``` + +## Description + +The `Remove-EntraApplicationPasswordCredential` cmdlet removes a password credential from an application in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an application password credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq 'Contoso Helpdesk App'" +$KeyIDs = Get-EntraApplicationPasswordCredential -ApplicationId $application.Id +Remove-EntraApplicationPasswordCredential -ApplicationId $application.Id -KeyId $KeyIds[0].KeyId +``` + +This example demonstrates how to remove the password credential for an application. + +- `ApplicationId` Specifies the ID of the application. Use `Get-EntraApplication` to get application ObjectId value. +- `KeyId` Specifies the ID of the password credential. Use `Get-EntraApplicationPasswordCredential` to retrieve a specific credential details. + +## Parameters + +### -KeyId + +Specifies the ID of the password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of the application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) + +[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md new file mode 100644 index 0000000000..d34578e6cb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md @@ -0,0 +1,83 @@ +--- +title: Remove-EntraApplicationVerifiedPublisher +description: This article provides details on the Remove-EntraApplicationVerifiedPublisher command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher + +schema: 2.0.0 +--- + +# Remove-EntraApplicationVerifiedPublisher + +## Synopsis + +Removes the verified publisher from an application. + +## Syntax + +```powershell +Remove-EntraApplicationVerifiedPublisher + -AppObjectId + [] +``` + +## Description + +Removes the verified publisher from an application. + +## Examples + +### Example 1: Remove the verified publisher from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +Remove-EntraApplicationVerifiedPublisher -AppObjectId $app.ObjectId +``` + +This command demonstrates how to remove the verified publisher from an application. + +- `-AppObjectId` parameter specifies the unique identifier of an application. + +## Parameters + +### -AppObjectId + +The unique identifier of a Microsoft Entra ID Application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[Set-EntraApplicationVerifiedPublisher](Set-EntraApplicationVerifiedPublisher.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md new file mode 100644 index 0000000000..fb083eb0aa --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraDeletedApplication +description: This article provides details on the Remove-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Remove-EntraDeletedApplication + +## Synopsis + +Permanently delete a recently deleted application object from deleted items. + +## Syntax + +```powershell +Remove-EntraDeletedApplication + [-ObjectId] + [] +``` + +## Description + +Permanently delete a recently deleted application object from deleted items. After an item is permanently deleted, it can't be restored. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- To permanently delete deleted applications or service principals: Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. + +## Examples + +### Example 1: Remove deleted application object + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$App = Get-EntraDeletedApplication -SearchString 'My PowerShell Application' +Remove-EntraDeletedApplication -ObjectId $App.ObjectId +``` + +This command removes recently deleted application. You can use the command `Get-EntraDeletedApplication` to get deleted application Id. + +- `-ObjectId` parameter specifies the Id of a deleted application. + +## Parameters + +### -ObjectId + +The unique identifier of deleted application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) + +[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..9860be4fb3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md @@ -0,0 +1,96 @@ +--- +title: Remove-EntraDeletedDirectoryObject +description: This article provides details on the Remove-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Remove-EntraDeletedDirectoryObject + +## Synopsis + +Permanently delete a previously deleted directory object. + +## Syntax + +```powershell +Remove-EntraDeletedDirectoryObject + -DirectoryObjectId + [] +``` + +## Description + +The `Remove-EntraDeletedDirectoryObject` cmdlet is used to permanently delete a previously deleted directory object. + +When a directory object is permanently deleted, it can no longer be restored. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- To permanently delete deleted applications or service principals: `Application Administrator`, `Cloud Application Administrator`, or `Hybrid Identity Administrator`. +- To permanently delete deleted users: `User Administrator`. +- To permanently delete deleted groups: `Groups Administrator`. + +## Examples + +### Example 1: Delete a previously deleted directory object + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Group.ReadWrite.All','Application.ReadWrite.All','User.ReadWrite.All' + +Remove-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This example demonstrates how to permanently delete a previously deleted directory object by DirectoryObjectId. + +- `-DirectoryObjectId` parameter specifies the Id of the directory object that is permanently deleted. + +## Parameters + +### -DirectoryObjectId + +The DirectoryObjectId of the directory object that is permanently deleted. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) + +[Restore-EntraDeletedDirectoryObject](Restore-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md new file mode 100644 index 0000000000..65cf9d1a54 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md @@ -0,0 +1,86 @@ +--- +title: Remove-EntraServicePrincipal +description: This article provides details on the Remove-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipal + +## Synopsis + +Removes a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipal + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipal` cmdlet removes a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Removes a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Remove-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId +``` + +This example demonstrates how to remove a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipal](New-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..333bf29a33 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,117 @@ +--- +title: Remove-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the Remove-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Removes a service principal application role assignment. + +## Syntax + +```powershell +Remove-EntraServicePrincipalAppRoleAssignment + -AppRoleAssignmentId + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalAppRoleAssignment` cmdlet removes a service principal application role assignment in Microsoft Entra ID. + +App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Removes a service principal application role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $servicePrincipal.Id -AppRoleAssignmentId '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' +``` + +This example demonstrates how to remove a service principal application role assignment in Microsoft Entra ID. + +- `-ServicePrincipalId` - specifies the unique identifier (Object ID) of the service principal or user from which you want to remove an app role assignment. +- `-AppRoleAssignmentId` - specifies the unique identifier (ID) of the app role assignment that you want to remove. The value `2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6` represents the ID of the specific app role assignment to be removed. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the ID of the application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Remove-EntraServiceAppRoleAssignment` is an alias for `Remove-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) + +[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..6f2490f9fd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Remove-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Remove delegated permission classification. + +## Syntax + +```powershell +Remove-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -Id + [] +``` + +## Description + +The `Remove-EntraServicePrincipalDelegatedPermissionClassification` cmdlet deletes the given delegated permission classification by Id from service principal. + +## Examples + +### Example 1: Remove a delegated permission classification + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' +} +Remove-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +This command deletes the delegated permission classification by Id from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. +- `-Id` parameter specifies the unique identifier of a delegated permission classification object Id. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a delegated permission classification object Id. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Add-EntraServicePrincipalDelegatedPermissionClassification](Add-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..18477f4493 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraServicePrincipalKeyCredential +description: This article provides details on the Remove-EntraServicePrincipalKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalKeyCredential + +## Synopsis + +Removes a key credential from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalKeyCredential + -ServicePrincipalId + -KeyId + [] +``` + +## Description + +The Remove-EntraServicePrincipalKeyCredential cmdlet removes a key credential from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' #Delegated Permission +Connect-Entra -Scopes 'Application.ReadWrite.OwnedBy' #Application Permission +$SPObjectID = (Get-EntraServicePrincipal -SearchString 'Entra Multi-Factor Auth Client').ObjectID +Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID +Remove-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID -KeyId +``` + +This example demonstrates how to remove a key credential from a service principal in Microsoft Entra ID. + +- First command stores the ObjectID of your service principal in the $SPObjectID variable. +- The second command gets all the Key Credentials for the service principal. Copy the preferred KeyID associated with the certificate to be removed and paste it at the in the third command. +- The last command removes the certificate (key credential) from the service principal configuration. + +## Parameters + +### -KeyId + +Specifies the ID of a key credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) + +[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..685585aa07 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md @@ -0,0 +1,107 @@ +--- +title: Remove-EntraServicePrincipalOwner +description: This article provides details on the Remove-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalOwner + +## Synopsis + +Removes an owner from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalOwner + -OwnerId + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalOwner` cmdlet removes an owner from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Removes an owner from a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$owner = Get-EntraUser -UserId 'SawyerM@contoso.com' + +$params= @{ + ServicePrincipalId = $servicePrincipal.Id + OwnerId = $owner.Id +} +Remove-EntraServicePrincipalOwner @params +``` + +This example demonstrates how to remove an owner from a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal Id. +- `-OwnerId` parameter specifies the service principal owner Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) + +[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..6706517f45 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraServicePrincipalPasswordCredential +description: This article provides details on the Remove-EntraServicePrincipalPasswordCredential command. + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalPasswordCredential + +## Synopsis + +Removes a password credential from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + -KeyId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalPasswordCredential` cmdlet removes a password credential from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a password credential from a service principal in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +} +Remove-EntraServicePrincipalPasswordCredential @Params +``` + +This example demonstrates how to remove a password credential from a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ServicePrincipalId of a specified Service Principal Password Credential. +- `-KeyId` parameter specifies the unique identifier of a Password Credential. + +## Parameters + +### -KeyId + +Specifies the unique identifier of password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) + +[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md new file mode 100644 index 0000000000..a3c04f906a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md @@ -0,0 +1,127 @@ +--- +title: Restore-EntraDeletedApplication +description: This article provides details on the Restore-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Restore-EntraDeletedApplication + +## Synopsis + +Restores a previously deleted application. + +## Syntax + +```powershell +Restore-EntraDeletedApplication + [-IdentifierUris ] + -ObjectId + [] +``` + +## Description + +This cmdlet restores a previously deleted application. + +Restoring an application doesn't restore the associated service principal automatically. You must explicitly restore the deleted service principal. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- Application Administrator +- Cloud Application Administrator +- Hybrid Identity Administrator + +## Examples + +### Example 1: Restores a previously deleted application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraApplication -SearchString 'New Entra Application' + +# Delete a specific application +Remove-EntraApplication -ObjectId $application.ObjectId + +# Confirm deleted application +Get-EntraDeletedApplication -Filter "DisplayName eq 'New Entra Application'" + +# Restore a deleted application +Restore-EntraDeletedApplication -ObjectId $application.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example shows how an application is deleted, then the deleted application is retrieved using the `Get-EntraDeletedApplication` cmdlet, and subsequently the application is restored by specifying the application's Object ID in the `Restore-EntraDeletedApplication` cmdlet. + +- `-ObjectId` parameter specifies the ObjectId of the deleted application that is to be restored. + +## Parameters + +### -IdentifierUris + +The IdentifierUris of the application that is to be restored. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +The ObjectId of the deleted application that is to be restored. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md new file mode 100644 index 0000000000..570791b14e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md @@ -0,0 +1,110 @@ +--- +title: Select-EntraGroupIdsServicePrincipalIsMemberOf +description: This article provides details on the Select-EntraGroupIdsServicePrincipalIsMemberOf command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsServicePrincipalIsMemberOf + +## Synopsis + +Selects the groups in which a service principal is a member. + +## Syntax + +```powershell +Select-EntraGroupIdsServicePrincipalIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsServicePrincipalIsMemberOf` cmdlet selects the groups in which a service principal is a member in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Top 10).ObjectId +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $ServicePrincipal.ObjectId + GroupIdsForMembershipCheck = $Groups +} +Select-EntraGroupIdsServicePrincipalIsMemberOf @params +``` + +```Output +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command gets the group membership of a group for a specified service principal. +You can use the command `Get-EntraGroup` to get group Id. +You can use the command `Get-EntraServicePrincipal` to get service principal Id. + +- `-ObjectId` parameter specifies the service principal Id. +- `-GroupIdsForMembershipCheck` parameter specifies the array of group object IDs. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md new file mode 100644 index 0000000000..a79faa2c1f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md @@ -0,0 +1,496 @@ +--- +title: Set-EntraApplication +description: This article provides details on the Set-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplication + +schema: 2.0.0 +--- + +# Set-EntraApplication + +## Synopsis + +Updates the properties of an application object. + +## Syntax + +```powershell +Set-EntraApplication + -ApplicationId + [-PasswordCredentials ] + [-TokenEncryptionKeyId ] + [-SignInAudience ] + [-KeyCredentials ] + [-ParentalControlSettings ] + [-IdentifierUris ] + [-AppRoles ] + [-PublicClient ] + [-InformationalUrl ] + [-Tags ] + [-Api ] + [-OptionalClaims ] + [-GroupMembershipClaims ] + [-Web ] + [-DisplayName ] + [-IsFallbackPublicClient ] + [-IsDeviceOnlyAuthSupported ] + [-RequiredResourceAccess ] + [] +``` + +## Description + +Updates the properties of an application object. + +## Examples + +### Example 1: Update an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + DisplayName = 'New Demo Application' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 2: Update an application using IdentifierUris parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + IdentifierUris = 'https://mynewapp.contoso.com' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 3: Update an application using GroupMembershipClaims parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + GroupMembershipClaims = 'SecurityGroup' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 4: Update an application using IsDeviceOnlyAuthSupported parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + IsDeviceOnlyAuthSupported = $false +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 5: Update an application using Tags parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + Tags = 'mytag' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +## Parameters + +### -Api + +Specifies settings for an application that implements a web API. + +```yaml +Type: ApiApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoles + +The collection of application roles that an application might declare. + +These roles can be assigned to users, groups, or service principals. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupMembershipClaims + +Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentifierUris + +Specifies identifier Uniform Resource Identifiers (URIs). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InformationalUrl + +Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. + +The terms of service and privacy statement are surfaced to users through the user consent experience. + +```yaml +Type: InformationalUrl +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsDeviceOnlyAuthSupported + +Specifies if the application supports authentication using a device token. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsFallbackPublicClient + +Specifies the fallback application type as public client, such as an installed application running on a mobile device. + +The default value is `false` that means the fallback application type is confidential client such as web app. + +There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). + +In those cases Microsoft Entra ID interprets the application type based on the value of this property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +Specifies key credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OptionalClaims + +Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. + +```yaml +Type: OptionalClaims +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentalControlSettings + +Specifies parental control settings for an application. + +```yaml +Type: ParentalControlSettings +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +Specifies password credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicClient + +Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is `false`. + +```yaml +Type: PublicClientApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequiredResourceAccess + +Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. + +This pre-configuration of required resource access drives the consent experience. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInAudience + +Specifies what Microsoft accounts are supported for the current application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Custom strings that can be used to categorize and identify the application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TokenEncryptionKeyId + +Specifies the keyId of a public key from the keyCredentials collection. + +When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. + +The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Web + +Specifies settings for a web application. + +```yaml +Type: WebApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Boolean + +### Microsoft.Open.MSGraph.Model.ApiApplication + +### Microsoft.Open.MSGraph.Model.InformationalUrl + +### Microsoft.Open.MSGraph.Model.OptionalClaims + +### Microsoft.Open.MSGraph.Model.ParentalControlSettings + +### Microsoft.Open.MSGraph.Model.PublicClientApplication + +### Microsoft.Open.MSGraph.Model.WebApplication + +### String + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] + +### System.Collections.Generic.List`1[System.String] + +### System.Nullable`1[System.Boolean] + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[New-EntraApplication](New-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md new file mode 100644 index 0000000000..a029dc0470 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md @@ -0,0 +1,126 @@ +--- +title: Set-EntraApplicationLogo +description: This article provides details on the Set-EntraApplicationLogo command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationLogo + +schema: 2.0.0 +--- + +# Set-EntraApplicationLogo + +## Synopsis + +Sets the logo for an Application + +## Syntax + +### File (Default) + +```powershell +Set-EntraApplicationLogo + -ApplicationId + -FilePath + [] +``` + +### Stream + +```powershell +Set-EntraApplicationLogo + -ApplicationId + [] +``` + +### ByteArray + +```powershell +Set-EntraApplicationLogo + -ApplicationId + [] +``` + +## Description + +The `Set-EntraApplicationLogo` cmdlet is used to set the logo for an application. + +## Examples + +### Example 1: Sets the application logo for the application specified by the ApplicationId parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Demo Application'" +$params = @{ + ObjectId = $application.ObjectId + FilePath = 'D:\applogo.jpg' +} +Set-EntraApplicationLogo @params +``` + +This cmdlet sets the application logo for the application specified by the `-ApplicationId` parameter to the image specified with the `-FilePath` parameter. + +## Parameters + +### -FilePath + +The file path of the file that is to be uploaded as the application logo. + +```yamlset-EntraApplicationLogo +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +The ApplicationId of the Application for which the logo is set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.IO.Stream System.Byte\[\] + +## Outputs + +### System.Object + +## Notes + +File uploads must be smaller than 500KB. + +## Related Links + +[Get-EntraApplicationLogo](Get-EntraApplicationLogo.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md new file mode 100644 index 0000000000..722021d35c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md @@ -0,0 +1,111 @@ +--- +title: Set-EntraApplicationVerifiedPublisher +description: This article provides details on the Set-EntraApplicationVerifiedPublisher command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher + +schema: 2.0.0 +--- + +# Set-EntraApplicationVerifiedPublisher + +## Synopsis + +Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. + +## Syntax + +```powershell +Set-EntraApplicationVerifiedPublisher + -AppObjectId + -SetVerifiedPublisherRequest + [] +``` + +## Description + +Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. + +## Examples + +### Example 1: Set the verified publisher of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$appObjId = $app.ObjectId +$mpnId = '0433167' +$req = @{verifiedPublisherId = $mpnId} +$params = @{ + AppObjectId = $appObjId + SetVerifiedPublisherRequest = $req +} +Set-EntraApplicationVerifiedPublisher @params +``` + +This command sets the verified publisher of an application. + +The Microsoft Partner Network ID (MPNID) of the verified publisher can be obtained from the publisher's Partner Center account. + +- `-AppObjectId` parameter specifies the unique identifier of a Microsoft Entra ID Application. +- `-SetVerifiedPublisherRequest` parameter specifies the request body object containing the verifiedPublisherId property with it's the MPNID value. + +## Parameters + +### -AppObjectId + +The unique identifier of a Microsoft Entra ID Application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SetVerifiedPublisherRequest + +A request body object containing the verifiedPublisherId property it's the MPNID value. + +```yaml +Type: SetVerifiedPublisherRequest +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraApplicationVerifiedPublisher](Remove-EntraApplicationVerifiedPublisher.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md new file mode 100644 index 0000000000..b2dd1e4636 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md @@ -0,0 +1,440 @@ +--- +title: Set-EntraServicePrincipal +description: This article provides details on the Set-EntraServicePrincipal command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Set-EntraServicePrincipal + +## Synopsis + +Updates a service principal. + +## Syntax + +```powershell +Set-EntraServicePrincipal + -ServicePrincipalId + [-KeyCredentials ] + [-Homepage ] + [-AppId ] + [-LogoutUrl ] + [-ServicePrincipalType ] + [-AlternativeNames ] + [-PasswordCredentials ] + [-PreferredSingleSignOnMode ] + [-Tags ] + [-AccountEnabled ] + [-ServicePrincipalNames ] + [-AppRoleAssignmentRequired ] + [-DisplayName ] + [-ReplyUrls ] + [] +``` + +## Description + +The `Set-EntraServicePrincipal` cmdlet updates a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Disable the account of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AccountEnabled = $False +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `AccountEnabled` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-AccountEnabled` parameter specifies indicates whether the account is enabled. + +### Example 2: Update AppId and Homepage of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AppId = '22223333-cccc-4444-dddd-5555eeee6666' + Homepage = 'https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `AppId` and Homepage of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-AppId` parameter specifies the application ID. +- `-Homepage` parameter specifies the home page or landing page of the application. + +### Example 3: Update AlternativeNames and DisplayName of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AlternativeNames = 'Service Principal Demo' + DisplayName = 'NewName' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update AlternativeNames and DisplayName of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 4: Update LogoutUrl and ReplyUrls of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + LogoutUrl = 'https://securescore.office.com/SignOut' + ReplyUrls = 'https://admin.contoso.com' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update LogoutUrl and ReplyUrls of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-LogoutUrl` parameter specifies the sign out URL. +- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. + +### Example 5: Update ServicePrincipalType and AppRoleAssignmentRequired of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + ServicePrincipalType = 'Application' + AppRoleAssignmentRequired = $True +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `ServicePrincipalType` and `AppRoleAssignmentRequired` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-ServicePrincipalType` parameter specifies the service principal type. +- `-AppRoleAssignmentRequired` parameter specifies indicates whether an application role assignment is required. + +### Example 6: Update KeyCredentials of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential +$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') +$startdate = Get-Date -Year 2024 -Month 10 -Day 10 +$creds.StartDate = $startdate +$creds.Type = 'Symmetric' +$creds.Usage = 'Sign' +$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('A') +$creds.EndDate = Get-Date -Year 2025 -Month 12 -Day 20 +Set-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId -KeyCredentials $creds +``` + +This example demonstrates how to update KeyCredentials of a service principal in Microsoft Entra ID. + +Use the `New-EntraServicePrincipalPasswordCredential` and `Remove-EntraServicePrincipalPasswordCredential` cmdlets to update the password or secret for a servicePrincipal. + +### Example 7: Update PreferredSingleSignOnMode of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + PreferredSingleSignOnMode = 'saml' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `PreferredSingleSignOnMode` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-PreferredSingleSignOnMode` parameter specifies the single sign-on mode configured for this application. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeNames + +The alternative names for this service principal. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppId + +Specifies the application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoleAssignmentRequired + +Indicates whether an application role assignment is required. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Homepage + +Specifies the home page or landing page of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +Specifies key credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoutUrl + +Specifies the sign out URL. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Species the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredentials + +Specifies password credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredSingleSignOnMode + +Specifies the single sign-on mode configured for this application. Microsoft Entra ID uses the preferred single sign-on mode to launch the application from Microsoft 365 or the My Apps portal. The supported values are password, saml, notSupported, and oidc. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplyUrls + +The URLs that user tokens are sent to for sign in with the associated application, or the redirect Uniform Resource Identifiers that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalNames + +Specifies service principal names. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalType + +The service principal type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Specifies an array of tags. + +If you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipal](New-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md new file mode 100644 index 0000000000..7b5c34637f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md @@ -0,0 +1,119 @@ +--- +title: Add-EntraEnvironment +description: This article provides details on the Add-EntraEnvironment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraEnvironment + +schema: 2.0.0 +--- + +# Add-EntraEnvironment + +## Synopsis + +Adds Microsoft Entra environment to the settings file. + +## Syntax + +### Add Entra Environment Name + +```powershell +Add-EntraEnvironment + [-Name] + [-AzureADEndpoint] + [-GraphEndpoint] + [-ProgressAction ] + [-WhatIf] + [-Confirm] + [] +``` + +## Description + +Adds Microsoft Entra environment to the settings file. + +## Examples + +### Example 1: Add a user defined environment + +```powershell +$params = @{ + Name = 'Canary' + GraphEndpoint = 'https://canary.graph.microsoft.com' + AzureADEndpoint = 'https://login.microsoftonline.com' +} + +Add-EntraEnvironment @params +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Canary https://login.microsoftonline.com https://microsoftgraph.com User-defined {} +``` + +Adds a user-defined Entra environment to the settings file. + +## Parameters + +### -Name + +Specifies the name of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GraphEndpoint + +Specifies the GraphEndpoint URL of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AzueADEndpoint + +Specifies the AzureADEndpoint URL of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraEnvironment](Get-EntraEnvironment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md new file mode 100644 index 0000000000..1322d7b844 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md @@ -0,0 +1,583 @@ +--- +title: Connect-Entra +description: This article provides details on the Connect-Entra Command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi254 +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Connect-Entra + +schema: 2.0.0 +--- + +# Connect-Entra + +## Synopsis + +Connect to Microsoft Entra ID with an authenticated account. + +## Syntax + +### UserParameterSet (Default) + +```powershell +Connect-Entra +[[-Scopes] ] +[[-ClientId] ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-UseDeviceCode] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### AppCertificateParameterSet + +```powershell +Connect-Entra +[-ClientId] +[[-CertificateSubjectName] ] +[[-CertificateThumbprint] ] +[-Certificate ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### IdentityParameterSet + +```powershell +Connect-Entra +[[-ClientId] ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-Identity] +[-NoWelcome] +[] +``` + +### AppSecretCredentialParameterSet + +```powershell +Connect-Entra +[-ClientSecretCredential ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### AccessTokenParameterSet + +```powershell +Connect-Entra +[-AccessToken] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### EnvironmentVariableParameterSet + +```powershell +Connect-Entra +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-EnvironmentVariable] +[-NoWelcome] +[] +``` + +## Description + +The `Connect-Entra` cmdlet connects to Microsoft Entra ID with an authenticated account. + +Several authentication scenarios are supported based on your use case, such as delegated (interactive) and app-only (non-interactive). + +`Connect-Entra` is an alias for `Connect-MgGraph`. + +## Examples + +### Example 1: Delegated access: Connect a PowerShell session to a tenant + +```powershell +Connect-Entra +``` + +This example shows how to connect your current PowerShell session to a Microsoft Entra ID tenant using credentials. + +### Example 2: Delegated access: Connect a PowerShell session to a tenant with required scopes + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Group.ReadWrite.All' +``` + +```Output +Welcome to Microsoft Graph! + +``` + +This example shows how to authenticate to Microsoft Entra ID with scopes. + +### Example 3: Delegated access: Using an access token + +```powershell +$secureString = ConvertTo-SecureString -String $AccessToken -AsPlainText -Force +Connect-Entra -AccessToken $secureString +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example shows how to interactively authenticate to Microsoft Entra ID using an access token. + +For more information on how to get or create access token, see [Request an access token](https://learn.microsoft.com/graph/auth-v2-user#3-request-an-access-token). + +### Example 4: Delegated access: Using device code flow + +```powershell +Connect-Entra -UseDeviceCode +``` + +```Output +To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code A1B2CDEFGH to authenticate. +``` + +This example shows how to interactively authenticate to Microsoft Entra ID using device code flow. + +For more information, see [Device Code flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-device-code). + +### Example 5: App-only access: Using client credential with a Certificate thumbprint + +```powershell +$connectParams = @{ + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + ApplicationId = '00001111-aaaa-2222-bbbb-3333cccc4444' + CertificateThumbprint = 'AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00' +} + +Connect-Entra @connectParams +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example shows how to authenticate using an ApplicationId and CertificateThumbprint. + +For more information on how to get or create CertificateThumbprint, see [Authenticate with app-only access](https://learn.microsoft.com/powershell/entra-powershell/app-only-access-auth). + +### Example 6: App-only access: Using client credential with a certificate name + +```powershell +$params = @{ + ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + CertificateName = 'YOUR_CERT_SUBJECT' +} + +Connect-Entra @params +``` + +```powershell + $Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint + Connect-Entra -ClientId '' -TenantId '' -Certificate $Cert +``` + +You can find the certificate subject by running the above command. + +### Example 7: App-only access: Using client credential with a certificate + +```powershell +$Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint +$params = @{ + ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + Certificate = $Cert +} + +Connect-Entra @params +``` + +### Example 8: App-only access: Using client secret credentials + +```powershell +$ClientSecretCredential = Get-Credential -Credential '00001111-aaaa-2222-bbbb-3333cccc4444' +# Enter client_secret in the password prompt. +Connect-Entra -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -ClientSecretCredential $ClientSecretCredential +``` + +This authentication method is ideal for background interactions. + +For more information on how to get credential, see [Get-Credential](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential) command. + +### Example 9: App-only access: Using managed identity: System-assigned managed identity + +```powershell +Connect-Entra -Identity +``` + +Uses an automatically managed identity on a service instance. The identity is tied to the lifecycle of a service instance. + +### Example 10: App-only access: Using managed identity: User-assigned managed identity + +```powershell +Connect-Entra -Identity -ClientId 'User_Assigned_Managed_identity_Client_Id' +``` + +Uses a user created managed identity as a standalone Azure resource. + +### Example 11: Connecting to an environment as a different identity + +```powershell +Connect-Entra -ContextScope 'Process' +``` + +```Output +Welcome to Microsoft Graph! +``` + +To connect as a different identity other than CurrentUser, specify the ContextScope parameter with the value Process. + +For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/microsoft.graph.entra/get-entracontext) command. + +### Example 12: Connecting to an environment or cloud + +```powershell +Get-EntraEnvironment +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in +USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in +``` + +```powershell +Connect-Entra -Environment 'Global' +``` + +When you use Connect-Entra, you can choose to target other environments. By default, Connect-Entra targets the global public cloud. + +### Example 13: Sets the HTTP client timeout in seconds + +```powershell + Connect-Entra -ClientTimeout 60 +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example Sets the HTTP client timeout in seconds. + +### Example 14: Hides the welcome message + +```powershell +Connect-Entra -NoWelcome +``` + +This example hides the welcome message. + +### Example 15: Allows for authentication using environment variables + +```powershell +Connect-Entra -EnvironmentVariable +``` + +This example allows for authentication using environment variables. + +## Parameters + +### -CertificateThumbprint + +Specifies the certificate thumbprint of a digital public key X.509 certificate of a user account that has permission to perform this action. + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientId + +Specifies the application ID of the service principal. + +```yaml +Type: System.String +Parameter Sets: UserParameterSet, IdentityParameterSet +Aliases: AppId, ApplicationId + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: AppId, ApplicationId + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the ID of a tenant. + +If you don't specify this parameter, the account is authenticated with the home tenant. + +You must specify the TenantId parameter to authenticate as a service principal or when using Microsoft account. + +```yaml +Type: System.String +Parameter Sets: UserParameterSet, AppCertificateParameterSet, AppSecretCredentialParameterSet +Aliases: Audience, Tenant + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AccessToken + +Specifies a bearer token for Microsoft Entra service. Access tokens do time out and you have to handle their refresh. + +```yaml +Type: SecureString +Parameter Sets: AccessTokenParameterSet +Aliases: +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientTimeout + +Sets the HTTP client timeout in seconds. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContextScope + +Determines the scope of authentication context. This ContextScope accepts `Process` for the current process, or `CurrentUser` for all sessions started by user. + +```yaml +Type: ContextScope +Accepted values: Process, CurrentUser +Parameter Sets: UserParameterSet, AppCertificateParameterSet, IdentityParameterSet, AppSecretCredentialParameterSet, EnvironmentVariableParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Environment + +The name of the national cloud environment to connect to. By default global cloud is used. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EnvironmentName, NationalCloud +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWelcome + +Hides the welcome message. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scopes + +An array of delegated permissions to consent to. + +```yaml +Type: System.String[] +Parameter Sets: UserParameterSet +Aliases: +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseDeviceCode + +Use device code authentication instead of a browser control. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UserParameterSet +Aliases: UseDeviceAuthentication, DeviceCode, DeviceAuth, Device +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Certificate + +An X.509 certificate supplied during invocation. + +```yaml +Type: X509Certificate2 +Parameter Sets: AppCertificateParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSubjectName + +The subject distinguished name of a certificate. The certificate is retrieved from the current user's certificate store. + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: CertificateSubject, CertificateName +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecretCredential + +The PSCredential object provides the application ID and client secret for service principal credentials. For more information about the PSCredential object, type Get-Help Get-Credential. + +```yaml +Type: PSCredential +Parameter Sets: AppSecretCredentialParameterSet +Aliases: SecretCredential, Credential +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnvironmentVariable + +Allows for authentication using environment variables configured on the host machine. See + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: EnvironmentVariableParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Identity + +Sign-in using a managed identity + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: IdentityParameterSet +Aliases: ManagedIdentity, ManagedServiceIdentity, MSI +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction + +The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break. + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Disconnect-Entra](Disconnect-Entra.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md new file mode 100644 index 0000000000..4cf9324306 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md @@ -0,0 +1,78 @@ +--- +title: Disconnect-Entra +description: This article provides details on the Disconnect-Entra Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Disconnect-Entra + +schema: 2.0.0 +--- + +# Disconnect-Entra + +## Synopsis + +Disconnects the current session from a Microsoft Entra ID tenant. + +## Syntax + +```powershell +Disconnect-Entra + [] +``` + +## Description + +The Disconnect-Entra cmdlet disconnects the current session from a Microsoft Entra ID tenant. + +## Examples + +### Example 1: Disconnect your session from a tenant + +```powershell + Disconnect-Entra +``` + +```output +ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 +TenantId : bbbbcccc-1111-dddd-2222-eeee3333ffff +Scopes : {Agreement.ReadWrite.All, CustomSecAttributeDefinition.ReadWrite.All, TeamMember.Read.All...} +AuthType : AppOnly +TokenCredentialType : ClientCertificate +CertificateThumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00 +CertificateSubjectName : +Account : +AppName : MG_graph_auth +ContextScope : Process +Certificate : +PSHostVersion : 5.1.22621.2506 +ManagedIdentityId : +ClientSecret : +Environment : Global +``` + +This command disconnects your session from a tenant. + +## Parameters + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Connect-Entra](Connect-Entra.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md new file mode 100644 index 0000000000..8ef326b326 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md @@ -0,0 +1,239 @@ +--- +title: Find-EntraPermission +description: This article provides details on the Find-EntraPermission command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Find-EntraPermission + +schema: 2.0.0 +--- + +# Find-EntraPermission + +## Synopsis + +Helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. + +## Syntax + +### Search + +```powershell +Find-EntraPermission + [-SearchString] + [-ExactMatch] + [-PermissionType ] + [-Online] + [-ProgressAction ] + [] +``` + +### All + +```powershell +Find-EntraPermission + [-PermissionType ] + [-Online] + [-All] + [-ProgressAction ] + [] +``` + +## Description + +The `Find-EntraPermission` cmdlet helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. + +## Examples + +### Example 1: Get a list of all Application permissions + +```powershell +Find-EntraPermission application +``` + +```Output +PermissionType: Delegated + +Id Consent Name Description +-- ------- ---- ----------- +c79f8feb-a9db-4090-85f9-90d820caa0eb Admin Application.Read.All Allows the app to read applications and service principals on behalf of the signed-in user. +bdfbf15f-ee85-4955-8675-146e8e5296b5 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. + +PermissionType: Application + +Id Consent Name Description +-- ------- ---- ----------- +9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 Admin Application.Read.All Allows the app to read all applications and service principals without a signed-in user. +1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals without a signed-in user. Does not allow management of consent grants. +18a4783c-866b-4cc7-a460-3d5e5662c884 Admin Application.ReadWrite.OwnedBy Allows the app to create other applications, and fully manage those applications (read, update, update application secrets and delete), without a signed-in user... +``` + +### Example 2. Get a list of permissions for the Read permissions + +```powershell +Find-EntraPermission application.Read | Format-List +``` + +```Output +Id : c79f8feb-a9db-4090-85f9-90d820caa0eb +PermissionType : Delegated +Consent : Admin +Name : Application.Read.All +Description : Allows the app to read applications and service principals on behalf of the signed-in user. + +Id : bdfbf15f-ee85-4955-8675-146e8e5296b5 +PermissionType : Delegated +Consent : Admin +Name : Application.ReadWrite.All +Description : Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. + +Id : 9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 +PermissionType : Application +Consent : Admin +Name : Application.Read.All +Description : Allows the app to read all applications and service principals without a signed-in user. +``` + +### Example 3. Search for permissions with exact match + +```powershell +Find-EntraPermission -SearchString 'User.Read.All' -ExactMatch +``` + +```Output + PermissionType: Delegated + +Id Consent Name Description +-- ------- ---- ----------- +a154be20-db9c-4678-8ab7-66f6cc099a59 Admin User.Read.All Allows the app to read the full set of profile properties, reports, and ma… + + PermissionType: Application + +Id Consent Name Description +-- ------- ---- ----------- +df021288-bdef-4463-88db-98f22de89214 Admin User.Read.All Allows the app to read user profiles without a signed in user. +``` + +This example demonstrates how to search for permissions that exactly match a specified permission name. + +### Example 4. Get all permissions of the specified type + +```powershell +Find-EntraPermission -PermissionType 'Delegated' +``` + +```Output +Id Consent Name Description +-- ------- ---- ----------- +ebfcd32b-babb-40f4-a14b-42706e83bd28 Admin AccessReview.Read.All Allows the app to read access re… +e4aa47b9-9a69-4109-82ed-36ec70d85ff1 Admin AccessReview.ReadWrite.All Allows the app to read, update, … +5af8c3f5-baca-439a-97b0-ea58a435e269 Admin AccessReview.ReadWrite.Membership Allows the app to read, +``` + +This example shows how to get all permissions of a specified type, for example, `Delegated` or `Application` permissions. + +## Parameters + +### -SearchString + +Specifies the filter for the permissions, for example, domain and scope. + +```yaml + +Type: System.String +Required: True +Position: Named +Default value: None +Accept pipeline input: True +Accept wildcard characters: False +``` + +### -All + +Sets if the cmdlet returns all parameters. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExactMatch + +Sets if Search String should be an exact match. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Online + +Use the -Online parameter with -SearchString in Find-MgGraphPermission to fetch the latest permissions from Microsoft Graph before searching. This ensures Find-MgGraphPermission returns accurate results by including any new permissions added for recent APIs. The command uses the existing Microsoft Graph connection established by Connect-MgGraph. If your connection lacks permissions to access this data or if there’s no network connectivity, the command fails. Once updated, Find-MgGraphPermission will continue using the refreshed permission list for future searches, even without the -Online parameter. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionType + +Specifies the type of Permission, for example, Delegated or Application. + +```yaml + +Type: System.String +Required: False +Position: Named +Default value: Any +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction + +Specifics the progra option. + +```yaml +Type: System.Management.Automation.SwitchParameter +Aliases: progra +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md new file mode 100644 index 0000000000..86085f8469 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md @@ -0,0 +1,130 @@ +--- +title: Get-EntraContext +description: This article provides details on the Get-EntraContext command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContext + +schema: 2.0.0 +--- + +# Get-EntraContext + +## Synopsis + +Retrieve information about your current session + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContext + [-ProgressAction ] + [] +``` + +## Description + +`Get-EntraContext` is used to retrieve the details about your current session, which include: + +- ClientID +- TenantID +- Certificate Thumbprint +- Scopes consented to +- AuthType: Delegated or app-only +- AuthProviderType +- CertificateName +- Account +- AppName +- ContextScope +- Certificate +- PSHostVersion +- ClientTimeOut. + +`Get-EntraCurrentSessionInfo` is an alias for `Get-EntraContext`. + +## Examples + +### Example 1: Get the current session + +```powershell +Get-EntraContext +``` + +```Output +ClientId : 11112222-bbbb-3333-cccc-4444dddd5555 +TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee +CertificateThumbprint : +Scopes : {User.ReadWrite.All,...} +AuthType : Delegated +AuthProviderType : InteractiveAuthenticationProvider +CertificateName : +Account : SawyerM@Contoso.com +AppName : Microsoft Graph PowerShell +ContextScope : CurrentUser +Certificate : +PSHostVersion : 5.1.17763.1 +ClientTimeout : 00:05:00 +``` + +This example demonstrates how to retrieve the details of the current session. + +### Example 2: Get the current session scopes + +```powershell +Get-EntraContext | Select -ExpandProperty Scopes +``` + +```Output +AppRoleAssignment.ReadWrite.All +Directory.AccessAsUser.All +EntitlementManagement.ReadWrite.All +Group.ReadWrite.All +openid +Organization.Read.All +profile +RoleManagement.ReadWrite.Directory +User.Read +User.ReadWrite.All +``` + +Retrieves all scopes. + +## Parameters + +### -ProgressAction + +Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md new file mode 100644 index 0000000000..c5cf3a9139 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md @@ -0,0 +1,108 @@ +--- +title: Get-EntraEnvironment +description: This article provides details on the Get-EntraEnvironment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraEnvironment + +schema: 2.0.0 +--- + +# Get-EntraEnvironment + +## Synopsis + +Gets global public Environments. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraEnvironment + [] +``` + +### GetByName + +```powershell +Get-EntraEnvironment + -Name + [] +``` + +## Description + +When you use `Connect-Entra`, you can choose to target other environments. By default, `Connect-Entra` targets the global public cloud. + +## Examples + +### Example 1: Get a list of public cloud environments + +```powershell +Get-EntraEnvironment +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in +USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in +USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in +Germany https://login.microsoftonline.de https://graph.microsoft.de Built-in +Canary https://login.microsoftonline.com https://canary.graph.microsoft.com User-defined +``` + +This command retrieves a list of global public Environments. + +### Example 2: Get a specific environment created + +```powershell +Get-EntraEnvironment -Name 'Global' +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +``` + +This command retrieves an environment with the specified name. + +## Parameters + +### -Name + +Specifies the name of an environment + +```yaml + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraEnvironment](Add-EntraEnvironment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md new file mode 100644 index 0000000000..2017e7aa8a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md @@ -0,0 +1,79 @@ +--- +title: Reset-EntraStrongAuthenticationMethodByUpn +description: This article provides details on the Reset-EntraStrongAuthenticationMethodByUpn command. + + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn + +schema: 2.0.0 +--- + +# Reset-EntraStrongAuthenticationMethodByUpn + +## Synopsis + +Resets the strong authentication method using the User Principal Name (UPN). + +## Syntax + +```powershell +Reset-EntraStrongAuthenticationMethodByUpn + -UserPrincipalName + [] +``` + +## Description + +The `Reset-EntraStrongAuthenticationMethodByUpn` cmdlet resets the strong authentication method by using the User Principal Name (UPN). + +## Examples + +### Example 1: Resets the strong authentication method by using the User Principal Name + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite', 'UserAuthenticationMethod.ReadWrite.All' +Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'SawyerM@contoso.com' +``` + +This example demonstrates how to reset the strong authentication method by using the User Principal Name (UPN). + +- `-UserPrincipalName` parameter specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. + +## Parameters + +### -UserPrincipalName + +Specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md new file mode 100644 index 0000000000..3a375cf615 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md @@ -0,0 +1,73 @@ +--- +title: Revoke-EntraSignedInUserAllRefreshToken +description: This article provides details on the Revoke-EntraSignedInUserAllRefreshToken command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken + +schema: 2.0.0 +--- + +# Revoke-EntraSignedInUserAllRefreshToken + +## Synopsis + +Invalidates the refresh tokens issued to applications for the current user. + +## Syntax + +```powershell +Revoke-EntraSignedInUserAllRefreshToken + [] +``` + +## Description + +The `Revoke-EntraSignedInUserAllRefreshToken` cmdlet invalidates all the refresh tokens issued to applications for a user (and session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. + +The user or an administrator typically performs this operation if the user's device is lost or stolen. This action prevents access to the organization's data on the device by requiring the user to sign in again to all previously consented applications, regardless of the device. + +Note: If the application attempts to redeem a delegated access token for this user using an invalidated refresh token, the application receives an error. When this happens, the application needs to acquire a new refresh token by making a request to the authorized endpoint, which forces the user to sign in. + +After you run this command, a small delay of a few minutes can occur before tokens are revoked. + +## Examples + +### Example 1: Revoke refresh tokens for the current user + +```powershell +Connect-Entra -Scopes 'User.RevokeSessions.All' +Revoke-EntraSignedInUserAllRefreshToken +``` + +```Output +Value +----- +True +``` + +This command revokes the tokens for the current user. + +## Parameters + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Revoke-EntraUserAllRefreshToken](Revoke-EntraUserAllRefreshToken.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md new file mode 100644 index 0000000000..364ce1fa3a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md @@ -0,0 +1,90 @@ +--- +title: Revoke-EntraUserAllRefreshToken +description: This article provides details on the Revoke-EntraUserAllRefreshToken command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken +schema: 2.0.0 +--- + +# Revoke-EntraUserAllRefreshToken + +## Synopsis + +Invalidates the refresh tokens issued to applications for a user. + +## Syntax + +```powershell +Revoke-EntraUserAllRefreshToken + -UserId + [] +``` + +## Description + +The `Revoke-EntraUserAllRefreshToken` cmdlet invalidates the refresh tokens issued to applications for a user. + +The cmdlet also invalidates tokens issued to session cookies in a browser for the user. + +The cmdlet operates by resetting the refreshTokensValidFromDateTime user property to the current date and time. + +This operation is usually performed by the user or an administrator if the user's device is lost or stolen. It blocks access to the organization's data by requiring the user to sign in again to all previously authorized applications, regardless of the device. + +## Examples + +### Example 1: Revoke refresh tokens for a user + +```powershell +Connect-Entra -Scopes 'User.RevokeSessions.All' +Revoke-EntraUserAllRefreshToken -UserId 'SawyerM@contoso.com' +``` + +```Output +Value +----- +True +``` + +This example demonstrates how to revoke the tokens for the specified user. + +- `-UserId` parameter specifies the unique identifier of a user. + +## Parameters + +### -UserId + +Specifies the unique ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Revoke-EntraSignedInUserAllRefreshToken](Revoke-EntraSignedInUserAllRefreshToken.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..7049899b74 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md @@ -0,0 +1,111 @@ +--- +title: Add-EntraAdministrativeUnitMember +description: This article provides details on the Add-EntraAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Add-EntraAdministrativeUnitMember + +## Synopsis + +Adds an administrative unit member. + +## Syntax + +```powershell +Add-EntraAdministrativeUnitMember + -RefObjectId + -AdministrativeUnitId + [] +``` + +## Description + +The `Add-EntraAdministrativeUnitMember` cmdlet adds a Microsoft Entra ID administrative unit member. + +Administrative units enable more granular management of permissions and access, particularly in large organizations or where administrative responsibilities are divided across departments or regions. + +To add a user, group, or device to an administrative unit, the calling principal must be assigned at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add user as an administrative unit member + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraAdministrativeUnitMember @params +``` + +This example shows how to add an administrative unit member. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit ID. You can use the command `Get-EntraUser` to get user ID. + +- `AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `RefObjectId` parameter specifies the ID of the user or group you want to add as a member of the administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of a Microsoft Entra ID administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the unique ID of the specific Microsoft Entra ID object that are as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) + +[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..59f40bdbf9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,139 @@ +--- +title: Add-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Add-EntraCustomSecurityAttributeDefinitionAllowedValue command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue +schema: 2.0.0 +--- + +# Add-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Adds a predefined value for a custom security attribute definition. + +## Syntax + +```powershell +Add-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + -Id + -IsActive + [] +``` + +## Description + +The `Add-EntraCustomSecurityAttributeDefinitionAllowedValue` adds a predefined value for a Microsoft Entra ID custom security attribute definition. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a predefined value for a Microsoft Entra ID custom security attribute definition + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinitionId = (Get-EntraCustomSecurityAttributeDefinition -Id '').Id +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinitionId + Id = 'Alpine' + IsActive = $true +} +Add-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output + +Id IsActive +-- -------- +Alpine True +``` + +This example adds a predefined value to a custom security attribute definition. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use the command `Get-EntraCustomSecurityAttributeDefinition` to get the ID. +- `-Id` parameter specifies the identifier for the predefined value. +- `-IsActive` parameter specifies the predefined value is active or deactivated. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier for a custom security attribute definition in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters aren't. This identifier is case sensitive, can't be changed later, and is required. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsActive + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any another supported directory objects. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Add-EntraCustomSecurityAttributeDefinitionAllowedValues` is an alias for `Add-EntraCustomSecurityAttributeDefinitionAllowedValue`. + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..b0f4c794f1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md @@ -0,0 +1,107 @@ +--- +title: Add-EntraDeviceRegisteredOwner +description: This article provides details on the Add-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Add-EntraDeviceRegisteredOwner + +## Synopsis + +Adds a registered owner for a device. + +## Syntax + +```powershell +Add-EntraDeviceRegisteredOwner + -DeviceId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDeviceRegisteredOwner` cmdlet adds a registered owner for a Microsoft Entra ID device. + +## Examples + +### Example 1: Add a user as a registered user + +```powershell +Connect-Entra -Scopes 'Device.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$Device = Get-EntraDevice -SearchString '' +$params = @{ + DeviceId = $Device.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraDeviceRegisteredOwner @params +``` + +This example shows how to add a registered user to a device. + +- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. + +- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. + +## Parameters + +### -DeviceId + +Specifies the object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Active Directory object to add. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) + +[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..354cbf34c6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md @@ -0,0 +1,112 @@ +--- +title: Add-EntraDeviceRegisteredUser +description: This article provides details on the Add-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Add-EntraDeviceRegisteredUser + +## Synopsis + +Adds a registered user for a device. + +## Syntax + +```powershell +Add-EntraDeviceRegisteredUser + -DeviceId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDeviceRegisteredUser` cmdlet adds a registered user for a Microsoft Entra ID device. + +## Examples + +### Example 1: Add a user as a registered user + +```powershell +Connect-Entra -Scopes 'Device.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$Device = Get-EntraDevice -SearchString '' +$params = @{ + DeviceId = $Device.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraDeviceRegisteredUser @params +``` + +This example shows how to add a registered user to a device. + +- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. + +- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. + +## Parameters + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..d163b40171 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md @@ -0,0 +1,104 @@ +--- +title: Add-EntraDirectoryRoleMember +description: This article provides details on the Add-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Add-EntraDirectoryRoleMember + +## Synopsis + +Adds a member to a directory role. + +## Syntax + +```powershell +Add-EntraDirectoryRoleMember + -DirectoryRoleId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDirectoryRoleMember` cmdlet adds a member to a Microsoft Entra ID role. + +## Examples + +### Example 1: Add a member to a Microsoft Entra ID role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$params = @{ + DirectoryRoleId = '019ea7a2-1613-47c9-81cb-20ba35b1ae48' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Add-EntraDirectoryRoleMember @params +``` + +This example adds a member to a directory role. + +- `DirectoryRoleId` parameter specifies the ID of the directory role to which the member is added. Use the Get-EntraDirectoryRole command to retrieve the details of the directory role. +- `RefObjectId` parameter specifies the ID of Microsoft Entra ID object to assign as owner/manager/member. + +## Parameters + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) + +[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..2919fc8285 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md @@ -0,0 +1,135 @@ +--- +title: Add-EntraScopedRoleMembership +description: This article provides details on the Add-EntraScopedRoleMembership command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Add-EntraScopedRoleMembership + +## Synopsis + +Assign a Microsoft Entra role with an administrative unit scope. + +## Syntax + +```powershell +Add-EntraScopedRoleMembership + -AdministrativeUnitId + [-RoleObjectId ] + [-RoleMemberInfo ] + [] +``` + +## Description + +The `Add-EntraScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership. + +For delegated scenarios, the calling user needs at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add a scoped role membership to an administrative unit + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$User = Get-EntraUser -SearchString 'MarkWood' +$Role = Get-EntraDirectoryRole -Filter "DisplayName eq ''" +$Unit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo +$RoleMember.ObjectId = $User.ObjectId +$params = @{ + AdministrativeUnitId = $Unit.ObjectId + RoleObjectId = $Role.ObjectId + RoleMemberInfo = $RoleMember +} +Add-EntraScopedRoleMembership @params +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +The example shows how to add a user to the specified role within the specified administrative unit. + +- `-AdministrativeUnitId` Parameter specifies the ID of an administrative unit. +- `-RoleObjectId` Parameter specifies the ID of a directory role. +- `-RoleMemberInfo` Parameter specifies a RoleMemberInfo object. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RoleMemberInfo + +Specifies a RoleMemberInfo object. + +```yaml +Type: System.RoleMemberInfo +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleObjectId + +Specifies the ID of a directory role. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) + +[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md new file mode 100644 index 0000000000..da02de22be --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md @@ -0,0 +1,112 @@ +--- +title: Confirm-EntraDomain +description: This article provides details on the Confirm-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Confirm-EntraDomain + +schema: 2.0.0 +--- + +# Confirm-EntraDomain + +## Synopsis + +Validate the ownership of a domain. + +## Syntax + +```powershell +Confirm-EntraDomain + -Name + [-CrossCloudVerificationCode ] + [] +``` + +## Description + +The `Confirm-EntraDomain` cmdlet validates the ownership of a Microsoft Entra ID domain. + +The work or school account needs to belong to at least the **Domain Name Administrator** Microsoft Entra role. + +## Examples + +### Example 1: Confirm the domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Confirm-EntraDomain -Name Contoso.com +``` + +This example verifies a domain and updates its status to `verified`. + +### Example 2: Confirm the domain with a cross cloud verification code + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Confirm-EntraDomain -Name Contoso.com -CrossCloudVerificationCode ms84324896 +``` + +This example confirms a domain in dual federation scenarios. + +## Parameters + +### -Name + +Specifies the name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -CrossCloudVerificationCode + +The cross-cloud domain verification code. + +```yaml +Type: CrossCloudVerificationCodeBody +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md new file mode 100644 index 0000000000..f1d4bcccd1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md @@ -0,0 +1,96 @@ +--- +title: Enable-EntraDirectoryRole +description: This article provides details on the Enable-EntraDirectoryRole command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraDirectoryRole + +schema: 2.0.0 +--- + +# Enable-EntraDirectoryRole + +## Synopsis + +Activates an existing directory role in Microsoft Entra ID. + +## Syntax + +```powershell +Enable-EntraDirectoryRole + [-RoleTemplateId ] + [] +``` + +## Description + +The `Enable-EntraDirectoryRole` cmdlet activates an existing directory role in Microsoft Entra ID. + +The Company Administrators and the default user directory roles (User, Guest User, and Restricted Guest User) are activated by default. To access and assign members to other directory roles, you must first activate them using their corresponding directory role template ID. + +## Examples + +### Example 1: Enable a directory role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$InviterRole = Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Guest Inviter'} +Enable-EntraDirectoryRole -RoleTemplateId $InviterRole.ObjectId +``` + +```Output +DeletedDateTime Id Description DisplayName RoleTemplateId +--------------- -- ----------- ----------- -------------- + b5baa59b-86ab-4053-ac3a-0396116d1924 Guest Inviter has access to invite guest users. Guest Inviter 92ed04bf-c94a-4b82-9729-b799a7a4c178 +``` + +The example shows how to enable the directory role. + +You can use `Get-EntraDirectoryRoleTemplate` to fetch a specific directory role to activate. + +- `RoleTemplateId` parameter specifies the ID of the role template to enable. + +## Parameters + +### -RoleTemplateId + +The ID of the Role template to enable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For additional details see [Activate directoryRole](/graph/api/directoryrole-post-directoryroles). + +## Related Links + +[Get-EntraDirectoryRole](Get-EntraDirectoryRole.md) + +[Get-EntraDirectoryRoleTemplate](Get-EntraDirectoryRoleTemplate.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md new file mode 100644 index 0000000000..9271fdef45 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md @@ -0,0 +1,72 @@ +--- +title: Get-CrossCloudVerificationCode +description: This article provides details on the Get-CrossCloudVerificationCode command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode + +schema: 2.0.0 +--- + +# Get-CrossCloudVerificationCode + +## Synopsis +Gets the verification code used to validate the ownership of the domain in another connected cloud. +Important: Only applies to a verified domain. + +## Syntax + +```powershell +Get-CrossCloudVerificationCode + -Name + [] +``` + +## Description + +## Examples + +### Example 1: Get the cross cloud verification code +```powershell +PS C:\>Get-CrossCloudVerificationCode -Name Contoso.com +``` + +This command returns a string that can be used to enable cross cloud federation scenarios. + +## Parameters + +### -Name +Specifies the name of a domain. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.GetCrossCloudVerificationCodeResponse +## Notes + +## RELATED LINKS \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md new file mode 100644 index 0000000000..d6e6628eca --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md @@ -0,0 +1,117 @@ +--- +title: Get-EntraAccountSku +description: This article provides details on the Get-EntraAccountSku command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAccountSku + +schema: 2.0.0 +--- + +# Get-EntraAccountSku + +## Synopsis + +Retrieves all the SKUs for a company. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAccountSku + [] +``` + +### GetById + +```powershell +Get-EntraAccountSku + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraAccountSku` retrieves the list of commercial subscriptions acquired by an organization. + +For a list of license names in the Microsoft Entra or Microsoft 365 admin centers and their corresponding Microsoft Graph `skuId` and `skuPartNumber` properties, refer to the [mapping information](https://learn.microsoft.com/entra/identity/users/licensing-service-plan-reference). + +## Examples + +### Example 1: Gets a list of SKUs + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraAccountSku +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… +ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… +dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… +``` + +This command returns a list of SKUs. + +### Example 2: Gets a list of SKUs by TenantId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraAccountSku -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… +ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… +dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… +``` + +This command returns a list of SKUs for a specified tenant. + +- `-TenantId` parameter specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this isn't provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..0c85fb6da1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md @@ -0,0 +1,237 @@ +--- +title: Get-EntraAdministrativeUnit +description: This article provides details on the Get-EntraAdministrativeUnit command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit +schema: 2.0.0 +--- + +# Get-EntraAdministrativeUnit + +## Synopsis + +Gets an administrative unit. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAdministrativeUnit + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraAdministrativeUnit + -AdministrativeUnitId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraAdministrativeUnit` cmdlet gets a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameter to get a specific administrative unit. + +## Examples + +### Example 1: Get all administrative units + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName + cccccccc-2222-3333-4444-dddddddddddd testdemo test1 + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 +``` + +This command gets all the administrative units. + +### Example 2: Get all administrative units using '-All' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -All +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName + cccccccc-2222-3333-4444-dddddddddddd testdemo test1 + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 +``` + +This command gets all the administrative units. + +### Example 3: Get a specific administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -AdministrativeUnitId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName +``` + +This example returns the details of the specified administrative unit. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 4: Get administrative units filter by display name + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -Filter "DisplayName eq 'DAU-Test'" +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test +``` + +This example list of administrative units containing display name with the specified name. + +### Example 5: Get top one administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -Top 1 +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test +``` + +This example returns the specified top administrative units. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter filters which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..99c4fe82d9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md @@ -0,0 +1,193 @@ +--- +title: Get-EntraAdministrativeUnitMember +description: This article provides details on the Get-EntraAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Get-EntraAdministrativeUnitMember + +## Synopsis + +Gets a member of an administrative unit. + +## Syntax + +```powershell +Get-EntraAdministrativeUnitMember + -AdministrativeUnitId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraAdministrativeUnitMember` cmdlet gets a member of a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameters to retrieve an administrative unit member. + +In delegated scenarios with work or school accounts, the signed-in user must either be a member user or be assigned a supported Microsoft Entra role, or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: + +- Directory Readers: Read basic properties on administrative units +- Global Reader: Read all properties of administrative units, including members +- Privileged Role Administrator: Create and manage administrative units (including members) + +## Examples + +### Example 1: Get an administrative unit member by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example returns the list of administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 2: Get all administrative unit members by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example returns the list of all administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 3: Get top three administrative unit members by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example returns top three administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) + +[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md new file mode 100644 index 0000000000..7b235ab88d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md @@ -0,0 +1,143 @@ +--- +title: Get-EntraAttributeSet +description: This article provides details on the Get-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAttributeSet + +schema: 2.0.0 +--- + +# Get-EntraAttributeSet + +## Synopsis + +Gets a list of attribute sets. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAttributeSet + [] +``` + +### GetById + +```powershell +Get-EntraAttributeSet + -AttributeSetId + [] +``` + +## Description + +The `Get-EntraAttributeSet` cmdlet gets a list of Microsoft Entra ID attribute sets. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The supported roles for this operation are: + +- Attribute Assignment Reader +- Attribute Definition Reader +- Attribute Assignment Administrator +- Attribute Definition Administrator + +By default, other administrator roles cannot read, define, or assign custom security attributes. + +## Examples + +### Example 1: Get an all attribute sets + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraAttributeSet +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Engineering Attributes for cloud engineering team 25 +Contoso Attributes for Contoso 25 +``` + +This example returns all attribute sets. + +### Example 2: Get an attribute sets + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraAttributeSet -AttributeSetId 'Testing' +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Testing Attributes for engineering team 10 +``` + +This example demonstrates how to retrieve an attribute set by Id. + +- `AttributeSetId` parameter specifies the unique identifier for the attribute set within a tenant. + +## Parameters + +### -AttributeSetId + +Unique identifier for the attribute set within a tenant. + +This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraAttributeSet](New-EntraAttributeSet.md) + +[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md new file mode 100644 index 0000000000..fb0bcb0cb5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md @@ -0,0 +1,236 @@ +--- +title: Get-EntraContact +description: This article provides details on the Get-EntraContact command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContact + +schema: 2.0.0 +--- + +# Get-EntraContact + +## Synopsis + +Gets a contact from Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContact + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraContact + -OrgContactId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContact` cmdlet gets a contact from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve all contact objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves all contact objects in the directory. + +### Example 2: Retrieve specific contact object in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -OrgContactId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +``` + +This example retrieves specified contact in the directory. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 3: Retrieve all contacts objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -All +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves all the contacts in the directory. + +### Example 4: Retrieve top two contacts objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -Top 2 +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +``` + +This example retrieves top two contacts in the directory. + +### Example 5: Retrieve all contacts objects in the directory filter by DisplayName + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves contacts having the specified display name. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraContact](Remove-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md new file mode 100644 index 0000000000..5ba96a392d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md @@ -0,0 +1,159 @@ +--- +title: Get-EntraContactDirectReport +description: This article provides details on the Get-EntraContactDirectReport command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactDirectReport + +schema: 2.0.0 +--- + +# Get-EntraContactDirectReport + +## Synopsis + +Get the direct reports for a contact. + +## Syntax + +```powershell +Get-EntraContactDirectReport + -OrgContactId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactDirectReport` cmdlet gets the direct reports for a contact. + +## Examples + +### Example 1: Get the direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId +``` + +This example shows how to retrieve direct reports for an organizational contact. + +You can use the command `Get-EntraBetaContact` to get organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 2: Get all direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -All +``` + +This example shows how to retrieve all direct reports for an organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 3: Get top two direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -Top 2 +``` + +This example shows how to retrieve top two direct reports for an organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md new file mode 100644 index 0000000000..9aba156048 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md @@ -0,0 +1,98 @@ +--- +title: Get-EntraContactManager +description: This article provides details on the Get-EntraContactManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactManager + +schema: 2.0.0 +--- + +# Get-EntraContactManager + +## Synopsis + +Gets the manager of a contact. + +## Syntax + +```powershell +Get-EntraContactManager + -OrgContactId + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactManager` cmdlet gets the manager of a contact in Microsoft Entra ID. + +## Examples + +### Example 1: Get the manager of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Top 1 +Get-EntraContactManager -OrgContactId $Contact.ObjectId +``` + +The example demonstrates how to retrieve the manager of a contact. You can use the command `Get-EntraContact` to get organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +## Parameters + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: OrgContactId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md new file mode 100644 index 0000000000..e09631eec8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraContactMembership +description: This article provides details on the Get-EntraContactMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactMembership + +schema: 2.0.0 +--- + +# Get-EntraContactMembership + +## Synopsis + +Get a contact membership. + +## Syntax + +```powershell +Get-EntraContactMembership + -OrgContactId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactMembership` cmdlet gets a contact membership in Microsoft Entra ID. + +This command is useful to administrators who need to understand which groups, roles, or administrative units a particular contact belongs to. This can be important for troubleshooting access issues, auditing memberships, and ensuring that contact memberships are correctly configured. + +## Examples + +### Example 1: Get the memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This command gets all the memberships for specified contact. + +### Example 2: Get all memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This command gets all the memberships for specified contact. + +### Example 3: Get top two memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +``` + +This command gets top two memberships for specified contact. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md new file mode 100644 index 0000000000..ab173d765b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md @@ -0,0 +1,150 @@ +--- +title: Get-EntraContactThumbnailPhoto +description: This article provides details on the Get-EntraContactThumbnailPhoto command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto + +schema: 2.0.0 +--- + +# Get-EntraContactThumbnailPhoto + +## Synopsis + +Retrieves the thumbnail photo of a contact. + +## Syntax + +```powershell +Get-EntraContactThumbnailPhoto + -ObjectId + [-FilePath ] + [-FileName ] + [-View ] + [] +``` + +## Description + +Retrieves the thumbnail photo of a contact. + +## Examples + +### Example 1: Get the memberships of a contact + +```powershell +Connect-Entra -Scopes 'Contacts.Read' +Get-EntraContactThumbnailPhoto -ObjectId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```output +Tag : +PhysicalDimension : {Width=279, Height=390} +Size : {Width=279, Height=390} +Width : 279 +Height : 390 +HorizontalResolution : 96 +VerticalResolution : 96 +Flags : 77840 +RawFormat : [ImageFormat: aaaa0000-bb11-2222-33cc-444444dddddd] +PixelFormat : Format24bppRgb +Palette : System.Drawing.Imaging.ColorPalette +FrameDimensionsList : {eeee4444-ff55-6666-77aa-888888bbbbbb} +PropertyIdList : {274, 305, 306, 36867...} +PropertyItems : {274, 305, 306, 36867...} +``` + +This example retrieves the thumbnail photo of the contact object specified with the object ID parameter. + +## Parameters + +### -FileName + +When provided, the cmdlet writes a copy of the thumbnail photo to this filename. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FilePath + +When provided, the cmdlet writes a copy of the thumbnail photo to this file path using a random filename. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +The object ID of the contact for which the thumbnail photo is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -View + +If this parameter value is set to $True, display the retrieved thumbnail photo in a new window. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Boolean + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md new file mode 100644 index 0000000000..c65dae7c2b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md @@ -0,0 +1,195 @@ +--- +title: Get-EntraContract +description: This article provides details on the Get-EntraContract command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContract + +schema: 2.0.0 +--- + +# Get-EntraContract + +## Synopsis + +Gets a contract. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContract + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraContract + -ContractId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContract` cmdlet gets a contract information associated to a partner tenant. + +The contract object contains the following attributes: + +- `contractType` - type of the contract. + +Possible values are: + +1. SyndicationPartner - indicates a partner that exclusively resells and manages O365 and Intune for this customer. +They resell and support their customers. +1. BreadthPartner - indicates that the partner has the ability to provide administrative support for this customer. +However the partner isn't allowed to resell to the customer. +1. ResellerPartner - indicates a partner that is similar to a syndication partner, except that it doesn't have exclusive access to a tenant. In the syndication case, the customer can't buy additional direct subscriptions from Microsoft or from other partners. + +- `customerContextId` - unique identifier for the customer tenant referenced by this partnership. + +Corresponds to the ObjectId property of the customer tenant's TenantDetail object. + +- `defaultDomainName` - a copy of the customer tenant's default domain name. +The copy is made when the partnership with the customer is established. +It isn't automatically updated if the customer tenant's default domain name changes. + +- `deletionTimestamp` - this property isn't valid for contracts and always returns null. + +- `displayName` - a copy of the customer tenant's display name. +The copy is made when the partnership with the customer is established. +It isn't automatically updated if the customer tenant's display name changes. + +- `objectType` - a string that identifies the object type. The value is always `Contract`. + +- `ContractId` - the unique identifier for the partnership. + +## Examples + +### Example 1: Get all contracts in the directory + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraContract +``` + +This command gets all contracts in the Microsoft Entra ID. + +### Example 2: Get top two contracts in the directory + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraContract -Top 2 +``` + +This command gets top two contracts in the Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ContractId + +Specifies the ID of a contract. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..ec88ceccfd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraCustomSecurityAttributeDefinition +description: This article provides details on the Get-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition +schema: 2.0.0 +--- + +# Get-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Gets a list of custom security attribute definitions. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraCustomSecurityAttributeDefinition + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraCustomSecurityAttributeDefinition + -Id + [-Property ] + [] +``` + +## Description + +Gets a list of Microsoft Entra ID custom security attribute definitions. Specify `Id` parameter to get a list of custom security attribute definitions. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following privileged roles are supported for this operation: + +- Attribute Assignment Reader +- Attribute Definition Reader +- Attribute Assignment Administrator +- Attribute Definition Administrator + +## Examples + +### Example 1: Get a list of all custom security attribute definitions + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraCustomSecurityAttributeDefinition +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Engineering_newvalue Engineering New Eng Value True True NewValue Available String False +Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False +``` + +This example returns all custom security attribute definitions. + +### Example 2: Get a specific custom security attribute definition + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_ProjectDate' +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False +``` + + This example returns a specific custom security attribute definition. + +- `Id` parameter specifies the custom security attribute definition object ID. + +## Parameters + +### -Id + +The unique identifier of a Microsoft Entra ID custom security attribute definition object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) + +[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..e043e38f4b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,187 @@ +--- +title: Get-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Get-EntraCustomSecurityAttributeDefinitionAllowedValue command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue +schema: 2.0.0 +--- + +# Get-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Gets the predefined value for a custom security attribute definition. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + [-Filter ] + [] +``` + +### GetById + +```powershell +Get-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + -Id + [] +``` + +## Description + +The `Get-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdley gets the predefined value for a Microsoft Entra ID custom security attribute definition. Specify `CustomSecurityAttributeDefinitionId` parameter to get the predefined value custom security attribute definition. + +The signed-in user must be assigned one of the following directory roles: + +- Attribute Definition Reader +- Attribute Definition Administrator + +## Examples + +### Example 1: Get all predefined values + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $CustomSecurityAttributeDefinition.Id +``` + +```Output +Id IsActive +-- -------- +Apline True +``` + +This example retrieves an all predefined values. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. + +### Example 2: Get predefined value with ID parameter + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id + Id = 'Alpine' +} +Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +id isActive +-- -------- +Apline True +``` + +This example retrieves a specific predefined value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. +- `-Id` parameter specifies the ID of Microsoft Entra ID Object. + +### Example 3: Get predefined value with Filter parameter + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id + Filter = "Id eq 'Apline'" +} +Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +id isActive +-- -------- +Apline True +``` + +This example Get a predefined value with Filter. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier of a custom security attribute definition in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Filter items by property values. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters are not. This identifier is case sensitive, cannot be changed later, and is required. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..099bb99475 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md @@ -0,0 +1,122 @@ +--- +title: Get-EntraDeletedDirectoryObject +description: This article provides details on the Get-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Get-EntraDeletedDirectoryObject + +## Synopsis + +Retrieves a soft deleted directory object from the directory. + +## Syntax + +```powershell +Get-EntraDeletedDirectoryObject + -DirectoryObjectId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeletedDirectoryObject` cmdlet retrieves a soft deleted directory object from the directory. +Note that soft delete for groups is currently only implemented for Unified Groups (also known as +Office 365 Groups). + +## Examples + +### Example 1: Retrieve a deleted directory object. + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' +Get-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 2/2/2024 5:33:56 AM +``` + +This example shows how to retrieve the deleted directory object from the directory. + +- `-DirectoryObjectId` parameter specifies the Id of the directory object to retrieve. + +### Example 2: Retrieve a deleted directory object with more details. + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' +Get-EntraDeletedDirectoryObject -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' | Format-Table -Property Id, displayName, '@odata.type' -AutoSize +``` + +```Output +Id displayName @odata.type +-- ----------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Entra PowerShell App #microsoft.graph.application +``` + +This example shows how to retrieve the deleted directory object details from the directory. + +- `-Id` parameter specifies the Id of the directory object to retrieve. + +## Parameters + +### -DirectoryObjectId + +The Id of the directory object to retrieve. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md new file mode 100644 index 0000000000..9d6749d3d4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md @@ -0,0 +1,271 @@ +--- +title: Get-EntraDevice +description: This article provides details on the Get-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDevice + +schema: 2.0.0 +--- + +# Get-EntraDevice + +## Synopsis + +Gets a device from Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDevice + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDevice + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDevice + -DeviceId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDevice` cmdlet gets a device from Microsoft Entra ID. Specify the `DeviceId` parameter to get a specific device. + +## Examples + +### Example 1: Get a device by ID + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example shows how to retrieve a device using its ID. + +### Example 2: Get all devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData + cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve all devices from Microsoft Entra ID. + +### Example 3: Get top two devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Top 2 +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData + cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve top two devices from Microsoft Entra ID. + +### Example 4: Get a device by display name + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve device using the display name. + +### Example 5: Get a device using display name + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Filter "startsWith(DisplayName,'Woodgrove')" +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve all the devices whose display name starts with the word `Woodgrove`. + +### Example 6: Search among retrieved devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -SearchString 'DESKTOP' +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example shows how to retrieve devices containing the word 'DESKTOP.' + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies the OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraDevice](New-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..1149f5438e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md @@ -0,0 +1,196 @@ +--- +title: Get-EntraDeviceRegisteredOwner +description: This article provides details on the Get-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Get-EntraDeviceRegisteredOwner + +## Synopsis + +Gets the registered owner of a device. + +## Syntax + +```powershell +Get-EntraDeviceRegisteredOwner + -DeviceId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeviceRegisteredOwner` cmdlet gets the registered owner of a device in Microsoft Entra ID. Specify `DeviceId` parameter gets the registered owner of a device. + +## Examples + +### Example 1: Retrieve the registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +$DevId = (Get-EntraDevice -Top 1).ObjectId +Get-EntraDeviceRegisteredOwner -DeviceId $DevId +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example shows how to find the registered owner of a device.. + +- `-DeviceId` parameter specifies the device's ID. + +### Example 2: Retrieve the registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command gets the registered owner of a device. + +- `-DeviceId` parameter specifies the device's ID + +### Example 3: Retrieve all the registered owners of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command retrieves all the registered owners of a device. + +- `-DeviceId` parameter specifies the device's ID. + +### Example 4: Retrieve top one registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command retrieves all the registered owners of a device. + +- `-DeviceId` parameter specifies the device's ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) + +[Get-EntraDevice](Get-EntraDevice.md) + +[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..810e5ec600 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md @@ -0,0 +1,180 @@ +--- +title: Get-EntraDeviceRegisteredUser +description: This article provides details on the Get-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Get-EntraDeviceRegisteredUser + +## Synopsis + +Retrieve a list of users that are registered users of the device. + +## Syntax + +```powershell +Get-EntraDeviceRegisteredUser + -DeviceId + [-All ] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeviceRegisteredUser` cmdlet gets a registered user for a Microsoft Entra ID device. Specify `DeviceId` parameter to get a registered user for a Microsoft Entra ID device. + +## Examples + +### Example 1: Retrieve the registered user of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +$DevId = (Get-EntraDevice -Top 1).ObjectId +Get-EntraDeviceRegisteredUser -DeviceId $DevId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +``` + +This example demonstrates how to retrieve registered user for a specific Microsoft Entra ID device. + +### Example 2: Get all registered users of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +``` + +This example demonstrates how to retrieve all registered users for a specified device. + +- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. + +### Example 3: Get top two registered users of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to retrieve top two registered users for the specified device. + +- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies an object ID of a device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) + +[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md new file mode 100644 index 0000000000..a771858b4b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraDirSyncConfiguration +description: This article provides details on the Get-EntraDirSyncConfiguration command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration + +schema: 2.0.0 +--- + +# Get-EntraDirSyncConfiguration + +## Synopsis + +Gets the directory synchronization settings. + +## Syntax + +```powershell +Get-EntraDirSyncConfiguration + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDirSyncConfiguration` cmdlet gets the directory synchronization settings. + +For delegated scenarios, the user needs to be assigned the Global Administrator role. + +## Examples + +### Example 1: Get directory synchronization settings + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Get-EntraDirSyncConfiguration +``` + +```Output +AccidentalDeletionThreshold DeletionPreventionType +--------------------------- ---------------------- + 500 enabledForCount +``` + +This example gets directory synchronization settings. + +### Example 2: Get directory synchronization settings by TenantId + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Get-EntraDirSyncConfiguration -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' +``` + +```Output +AccidentalDeletionThreshold DeletionPreventionType +--------------------------- ---------------------- + 500 enabledForCount +``` + +This example gets directory synchronization settings by TenantId. + +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant for the operation. If TenantId isn't provided, it defaults to the current user's tenant. This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +## Notes + +## Related Links + +[Set-EntraDirSyncConfiguration](Set-EntraDirSyncConfiguration.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md new file mode 100644 index 0000000000..6b0d0dcab6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md @@ -0,0 +1,153 @@ +--- +title: Get-EntraDirSyncFeature +description: This article provides details on the Get-EntraDirSyncFeature command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncFeature + +schema: 2.0.0 +--- + +# Get-EntraDirSyncFeature + +## Synopsis + +Checks the status of directory synchronization features for a tenant. + +## Syntax + +```powershell +Get-EntraDirSyncFeature + [-TenantId ] + [-Feature ] + [] +``` + +## Description + +The `Get-EntraDirSyncFeature` cmdlet checks the status of directory synchronization features for a tenant. + +Some of the features that can be used with this cmdlet include: + +- **DeviceWriteback** +- **DirectoryExtensions** +- **DuplicateProxyAddressResiliency** +- **DuplicateUPNResiliency** +- **EnableSoftMatchOnUpn** +- **PasswordSync** +- **SynchronizeUpnForManagedUsers** +- **UnifiedGroupWriteback** +- **UserWriteback** + +The cmdlet can be run without specifying any features, in which case it returns a list of all features and their enabled or disabled status. + +For delegated scenarios, the user needs to be assigned the Global Administrator role. + +## Examples + +### Example 1: Return a list of all directory synchronization features + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' +Get-EntraDirSyncFeature +``` + +```Output +Enabled DirSyncFeature +------- -------------- + False BlockCloudObjectTakeoverThroughHardMatch + False BlockSoftMatch + False BypassDirSyncOverrides + False CloudPasswordPolicyForPasswordSyncedUsers + False ConcurrentCredentialUpdate + True ConcurrentOrgIdProvisioning + False DeviceWriteback + False DirectoryExtensions + False FopeConflictResolution + False GroupWriteBack + False PasswordSync + False PasswordWriteback + True QuarantineUponProxyAddressesConflict + True QuarantineUponUpnConflict + True SoftMatchOnUpn + True SynchronizeUpnForManagedUsers + False UnifiedGroupWriteback + False UserForcePasswordChangeOnLogon + False UserWriteback +``` + +This example gets a list of all directory synchronization features and shows if they are enabled (True) or disabled (False). + +### Example 2: Return the PasswordSync feature status + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' +Get-EntraDirSyncFeature -Feature 'PasswordSync' +``` + +```Output +Enabled DirSyncFeature +------- -------------- + False PasswordSync +``` + +This example shows if PasswordSync is enabled (True) or disabled (False) for the tenant. + +- `-Feature` specifies the directory synchronization feature to check the status of. + +## Parameters + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Feature + +The directory synchronization feature to check the status of. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraDirSyncFeature](Set-EntraDirSyncFeature.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md new file mode 100644 index 0000000000..4bbd98ed43 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md @@ -0,0 +1,104 @@ +--- +title: Get-EntraDirectoryObjectOnPremisesProvisioningError +description: This article provides details on the Get-EntraDirectoryObjectOnPremisesProvisioningError command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError + +schema: 2.0.0 +--- + +# Get-EntraDirectoryObjectOnPremisesProvisioningError + +## Synopsis + +Returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +## Syntax + +```powershell +Get-EntraDirectoryObjectOnPremisesProvisioningError + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDirectoryObjectOnPremisesProvisioningError` returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +## Examples + +### Example 1: Return whether Microsoft Entra ID has objects with DirSync provisioning error + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' + +Get-EntraDirectoryObjectOnPremisesProvisioningError +``` + +```Output +False +``` + +This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +### Example 2: Return whether Microsoft Entra ID has objects with DirSync provisioning error + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' + +Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId '0000aaaa-11bb-cccc-dd22-eeeeee333333' +``` + +```Output +False +``` + +This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. + +If this isn't provided then the value defaults to the tenant of the current user. + +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md new file mode 100644 index 0000000000..aac3e91b9d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md @@ -0,0 +1,181 @@ +--- +title: Get-EntraDirectoryRole +description: This article provides details on the Get-EntraDirectoryRole command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRole + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRole + +## Synopsis + +Gets a directory role. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRole + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRole + -DirectoryRoleId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRole` cmdlet gets a directory role from Microsoft Entra ID. Specify `ObjectId` parameter to get a directory role. + +## Examples + +### Example 1: Get a directory role by ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -DirectoryRoleId '019ea7a2-1613-47c9-81cb-20ba35b1ae48' +``` + +```Output +ObjectId DisplayName Description +-------- ----------- ----------- +019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. +``` + +This command gets the specified directory role. + +- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. + +### Example 2: Get all directory roles + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Perform all migration functionality to migrate content to Microsoft 365 usin... + aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb Can manage all aspects of users and groups, including resetting passwords fo... + bbbbbbbb-7777-8888-9999-cccccccccccc Can read basic directory information. Commonly used to grant directory read ... + cccccccc-8888-9999-0000-dddddddddddd Can read and write basic directory information. For granting access to appli... +``` + +This command gets all the directory roles. + +### Example 3: Get a directory role filter by ObjectId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -Filter "ObjectId eq '019ea7a2-1613-47c9-81cb-20ba35b1ae48'" +``` + +```Output +ObjectId DisplayName Description +-------- ----------- ----------- +019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. +``` + +This command gets the directory role by ObjectId. + +- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. + +### Example 4: Get a directory role filter by displayName + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -Filter "displayName eq 'Helpdesk Administrator'" +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 56644e28-bf8b-4dad-8595-24448ffa3cb8 Perform all migration functionality to migrate content to Microsoft 365 usin... +``` + +This command gets the directory role by display name. + +## Parameters + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Enable-EntraDirectoryRole](Enable-EntraDirectoryRole.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..3238d3cb09 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraDirectoryRoleMember +description: This article provides details on the Get-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleMember + +## Synopsis + +Gets members of a directory role. + +## Syntax + +```powershell +Get-EntraDirectoryRoleMember + -DirectoryRoleId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleMember` cmdlet retrieves the members of a directory role in Microsoft Entra ID. To obtain the members of a specific directory role, specify the `DirectoryRoleId`. Use the `Get-EntraDirectoryRole` cmdlet to get the `DirectoryRoleId` value. + +## Examples + +### Example 1: Get members by role ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleMember -DirectoryRoleId '1d73e796-aac5-4b3a-b7e7-74a3d1926a85' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This example retrieves the members of the specified role. + +- `-DirectoryRoleId` parameter specifies directory role ID. + +## Parameters + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) + +[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md new file mode 100644 index 0000000000..6ea213a233 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md @@ -0,0 +1,101 @@ +--- +title: Get-EntraDirectoryRoleTemplate +description: This article provides details on the Get-EntraDirectoryRoleTemplate command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleTemplate + +## Synopsis + +Gets directory role templates. + +## Syntax + +```powershell +Get-EntraDirectoryRoleTemplate + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleTemplate` cmdlet gets directory role templates in Microsoft Entra ID. + +## Examples + +### Example 1: Get role templates + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleTemplate +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identities. + 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. + 2af84b1e-32c8-42b7-82bc-daa82404023b Default role for guest users with restricted access. Can read a limited set of directory information. + 95e79109-95c0-4d8e-aee3-d01accf2d47b Can invite guest users independent of the 'members can invite guests' setting. + fe930be7-5e62-47db-91af-98c3a49a38b1 Can manage all aspects of users and groups, including resetting passwords for limited admins. +``` + +This example retrieves the role templates in Microsoft Entra ID. + +### Example 2: Get a specific role template + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Helpdesk Administrator'} +``` + +```Output +DeletedDateTime Id Description DisplayName +--------------- -- ----------- ----------- + 729827e3-9c14-49f7-bb1b-9608f156bbb8 Can reset passwords for non-administrators and Helpdesk Administrators. Helpdesk Administrator +``` + +This example retrieves a Helpdesk role template. + +## Parameters + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md new file mode 100644 index 0000000000..6a9d0258f3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md @@ -0,0 +1,147 @@ +--- +title: Get-EntraDomain +description: This article provides details on the Get-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomain + +schema: 2.0.0 +--- + +# Get-EntraDomain + +## Synopsis + +Gets a domain. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDomain + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDomain + -Name + [-Property ] + [] +``` + +## Description + +The `Get-EntraDomain` cmdlet gets a domain in Microsoft Entra ID. + +The work or school account must be assigned to at least one of the following Microsoft Entra roles: + +- User Administrator +- Helpdesk Administrator +- Service Support Administrator +- Directory Readers +- AdHoc License Administrator +- Application Administrator +- Security Reader +- Security Administrator +- Privileged Role Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Get a list of Domains that are created + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomain +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +test33.com Managed True False False False False 15 +test44.com Managed True False False False False 17 +``` + +This command retrieves a list of domains. + +### Example 2: Get a specific Domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomain -Name TEST22.com +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +``` + +This command retrieves a domain with the specified name. + +## Parameters + +### -Name + +Specifies the name of a domain. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md new file mode 100644 index 0000000000..2381a779d4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md @@ -0,0 +1,129 @@ +--- +title: Get-EntraDomainFederationSettings +description: This article provides details on the Get-EntraDomainFederationSettings command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings + +schema: 2.0.0 +--- + +# Get-EntraDomainFederationSettings + +## Synopsis + +Retrieves settings for a federated domain. + +## Syntax + +```powershell +Get-EntraDomainFederationSettings + -DomainName + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDomainFederationSettings` cmdlet gets key settings from Microsoft Entra ID. + +Use the `Get-EntraFederationProperty` cmdlet to get settings for both Microsoft Entra ID and the Entra ID Federation Services server. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Global Reader +- Security Reader +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Get federation settings for specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainFederationSettings -DomainName 'contoso.com' +``` + +This command gets federation settings for specified domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. + +## Parameters + +### -DomainName + +The fully qualified domain name to retrieve. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this isn't provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DomainFederationSettings + +### This cmdlet returns the following settings + +### ActiveLogOnUri + +### FederationBrandName + +### IssuerUri + +### LogOffUri + +### MetadataExchangeUri + +### NextSigningCertificate + +### PassiveLogOnUri + +### SigningCertificate + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md new file mode 100644 index 0000000000..d6e7a88bf0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md @@ -0,0 +1,113 @@ +--- +title: Get-EntraDomainNameReference +description: This article provides details on the Get-EntraDomainNameReference command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainNameReference + +schema: 2.0.0 +--- + +# Get-EntraDomainNameReference + +## Synopsis + +Retrieves the objects that are referenced by a given domain name. + +## Syntax + +```powershell +Get-EntraDomainNameReference + -Name + [-Property ] + [] +``` + +## Description + +The `Get-EntraDomainNameReference` cmdlet retrieves the objects that are referenced with a given domain name. Specify `Name` parameter retrieve the objects. + +The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. + +## Examples + +### Example 1: Retrieve the domain name reference objects for a domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainNameReference -Name contoso.com +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example shows how to retrieve the domain name reference objects for a domain that is specified through the -Name parameter. + +- `-Name` parameter specifies the name of the domain name for which the referenced objects are retrieved. + +## Parameters + +### -Name + +The name of the domain name for which the referenced objects are retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md new file mode 100644 index 0000000000..df14887de6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md @@ -0,0 +1,112 @@ +--- +title: Get-EntraDomainServiceConfigurationRecord +description: This article provides details on the Get-EntraDomainServiceConfigurationRecord command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord + +schema: 2.0.0 +--- + +# Get-EntraDomainServiceConfigurationRecord + +## Synopsis + +Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. + +## Syntax + +```powershell +Get-EntraDomainServiceConfigurationRecord + -Name + [-Property ] + [] +``` + +## Description + +Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. + +After you have successfully verified the ownership of a domain and you have indicated what services you plan to use with the domain, you can request Microsoft Entra ID to return you a set of DNS records which you need to add to the zone file of the domain so that the services can work properly with your domain. + +## Examples + +### Example 1: Retrieve domain service configuration records by Name + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainServiceConfigurationRecord -Name 'test.mail.contoso.com' +``` + +```Output +Id IsOptional Label RecordType SupportedService Ttl +-- ---------- ----- ---------- ---------------- --- +aaaa0000-bb11-2222-33cc-444444dddddd False test.mail.contoso.com Mx Email 3600 +bbbb1111-cc22-3333-44dd-555555eeeeee False test.mail.contoso.com Txt Email 3600 +cccc2222-dd33-4444-55ee-666666ffffff False autodiscover.test.mail.contoso.com CName Email 3600 +dddd3333-ee44-5555-66ff-777777aaaaaa False msoid.test.mail.contoso.com CName OrgIdAuthentication 3600 +eeee4444-ff55-6666-77aa-888888bbbbbb False enterpriseregistration.test.mail.contoso.com CName Intune 3600 +ffff5555-aa66-7777-88bb-999999cccccc False enterpriseenrollment.test.mail.contoso.com CName Intune 3600 +``` + +This example shows how to retrieve the Domain service configuration records for a domain with the given name. + +- `-Name` parameter specifies domain name for which the domain service configuration records are to be retrieved. + +## Parameters + +### -Name + +The name of the domain for which the domain service configuration records are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md new file mode 100644 index 0000000000..cd3821fc66 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md @@ -0,0 +1,112 @@ +--- +title: Get-EntraDomainVerificationDnsRecord +description: This article provides details on the Get-EntraDomainVerificationDnsRecord command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord + +schema: 2.0.0 +--- + +# Get-EntraDomainVerificationDnsRecord + +## Synopsis + +Retrieve the domain verification DNS record for a domain. + +## Syntax + +```powershell +Get-EntraDomainVerificationDnsRecord + -Name + [-Property ] + [] +``` + +## Description + +Gets the domain's verification records from the `verificationDnsRecords` navigation property. + +You can't use the domain with your Microsoft Entra ID tenant until you have successfully verified that you own the domain. + +To verify the ownership of the domain, you need to first retrieve a set of domain verification records that you need to add to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. + +Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + +The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. + +## Examples + +### Example 1: Retrieve the domain verification DNS record + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainVerificationDnsRecord -Name mail.contoso.com +``` + +```Output +Id IsOptional Label RecordType SupportedService Ttl +-- ---------- ----- ---------- ---------------- --- +aaaa0000-bb11-2222-33cc-444444dddddd False mail.contoso.com Txt Email 3600 +bbbb1111-cc22-3333-44dd-555555eeeeee False mail.contoso.com Mx Email 3600 +``` + +This example shows how to retrieve the Domain verification DNS records for a domain with the given name. + +## Parameters + +### -Name + +The domain name for which the domain verification Domain Name System (DNS) records are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md new file mode 100644 index 0000000000..0b48a4f8c1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md @@ -0,0 +1,97 @@ +--- +title: Get-EntraExtensionProperty +description: This article provides details on the Get-EntraExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraExtensionProperty + +schema: 2.0.0 +--- + +# Get-EntraExtensionProperty + +## Synopsis + +Gets extension properties registered with Microsoft Entra ID. + +## Syntax + +```powershell +Get-EntraExtensionProperty + [-IsSyncedFromOnPremises ] + [] +``` + +## Description + +The Get-EntraExtensionProperty cmdlet gets a collection that contains the extension properties registered with Microsoft Entra ID through Microsoft Entra ID Connect. + +You can get extension properties that are synced with on-premises Microsoft Entra ID that aren't synced with on-premises Microsoft Entra ID or both types. + +This command returns all directory extension definitions registered in a directory, including those from multitenant apps. The following entities support extension properties: + +- User +- Group +- AdministrativeUnit +- Application +- Device +- Organization + +## Examples + +### Example 1: Get extension properties synced from on-premises Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraExtensionProperty -IsSyncedFromOnPremises $True +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ------------- ---------------------- ---- ------------- + aaaabbbb-0000-cccc-1111-dddd2222eeee Tenant Schema Extension App String False True extension_aaaabbbb-0000-cccc-1111-dddd2222eeee_extensionAttribute1 {User} +``` + +This command gets extension properties that have sync from on-premises Microsoft Entra ID. + +## Parameters + +### -IsSyncedFromOnPremises + +Specifies whether this cmdlet gets extension properties that are synced or not synced. + +- `$True` - get extension properties that are synced from the on-premises Microsoft Entra ID. +- `$False` - get extension properties that aren't synced from the on-premises Microsoft Entra ID. +- `No value` - get all extension properties (both synced and nonsynced). + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md new file mode 100644 index 0000000000..615248b150 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md @@ -0,0 +1,90 @@ +--- +title: Get-EntraFederationProperty +description: This article provides details on the Get-EntraFederationProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFederationProperty + +schema: 2.0.0 +--- + +# Get-EntraFederationProperty + +## Synopsis + +Displays the properties of the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +## Syntax + +```powershell +Get-EntraFederationProperty + -DomainName + [] +``` + +## Description + +The `Get-EntraFederationProperty` cmdlet gets key settings from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +You can use this information to troubleshoot authentication problems caused by mismatched settings between the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Global Reader +- Security Reader +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Display properties for specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraFederationProperty -DomainName contoso.com +``` + +This command displays properties for specified domain. + +- `-DomainName` Specifies the domain name. + +## Parameters + +### -DomainName + +The domain name for which the properties from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online are displayed. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md new file mode 100644 index 0000000000..813b97fb34 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraObjectByObjectId +description: This article provides details on the Get-EntraObjectByObjectId command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectByObjectId + +schema: 2.0.0 +--- + +# Get-EntraObjectByObjectId + +## Synopsis + +Retrieves the objects specified by the ObjectIds parameter. + +## Syntax + +```powershell +Get-EntraObjectByObjectId + -ObjectIds + [-Types ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraObjectByObjectId` cmdlet retrieves the objects specified by the ObjectIds parameter. + +## Examples + +### Example 1: Get an object One or more object IDs + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' , 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve objects for a specified object Ids. + +- `ObjectIds` parameter specifies the One or more object IDs. + +### Example 2: Get an object by types + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Types User +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve objects for a specified object type. + +- `-ObjectIds` parameter specifies the One or more object IDs. +- `-Types` parameter specifies the type of object ID. + +## Parameters + +### -ObjectIds + +One or more object IDs's, separated by commas, for which the objects are retrieved. The IDs are GUIDs, represented as strings. You can specify up to 1,000 IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Types + +Specifies the type of objects that the cmdlet returns. If not specified, the default is directoryObject, which includes all resource types defined in the directory. You can specify any object derived from directoryObject in the collection, such as user, group, and device objects. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md new file mode 100644 index 0000000000..c2338d2a49 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md @@ -0,0 +1,135 @@ +--- +title: Get-EntraPartnerInformation +description: This article provides details on the Get-EntraPartnerInformation command. + +ms.topic: reference +ms.date: 09/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPartnerInformation + +schema: 2.0.0 +--- + +# Get-EntraPartnerInformation + +## Synopsis + +Retrieves company-level information for partners. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPartnerInformation + [] +``` + +### GetById + +```powershell +Get-EntraPartnerInformation + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraPartnerInformation` cmdlet is used to retrieve partner-specific information. +This cmdlet should only be used for partner tenants. + +## Examples + +### Example 1: Retrieve partner information + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraPartnerInformation +``` + +```Output +PartnerCompanyName : Contoso +companyType : +PartnerSupportTelephones : {12123, +1911} +PartnerSupportEmails : {} +PartnerHelpUrl : http://www.help.contoso.com +PartnerCommerceUrl : +ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc +PartnerSupportUrl : +``` + +This command retrieves partner-specific information. + +### Example 2: Retrieve partner information with specific TenantId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +$tenantId = (Get-EntraContext).TenantId +Get-EntraPartnerInformation -TenantId $tenantId +``` + +```Output +PartnerCompanyName : Contoso +companyType : +PartnerSupportTelephones : {12123, +1911} +PartnerSupportEmails : {} +PartnerHelpUrl : http://www.help.contoso.com +PartnerCommerceUrl : +ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc +PartnerSupportUrl : +``` + +This command retrieves partner-specific information. + +`-TenantId` Parameter specifies unique ID of the tenant to perform the operation on. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this is not provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Company level information outputs + +- CompanyType: The type of this company (can be partner or regular tenant) +- DapEnabled: Flag to determine if the partner has delegated admin privileges +- PartnerCompanyName: The name of the company +- PartnerSupportTelephones: Support Telephone numbers for the partner +- PartnerSupportEmails: Support E-Mail address for the partner +- PartnerCommerceUrl: URL for the partner's commerce web site +- PartnerSupportUrl: URL for the Partner's support website +- PartnerHelpUrl: URL for the partner's help web site + +## Notes + +## Related Links + +[Set-EntraPartnerInformation](Set-EntraPartnerInformation.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md new file mode 100644 index 0000000000..ea27374f11 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md @@ -0,0 +1,101 @@ +--- +title: Get-EntraPasswordPolicy +description: This article provides details on the Get-EntraPasswordPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPasswordPolicy + +schema: 2.0.0 +--- + +# Get-EntraPasswordPolicy + +## Synopsis + +Retrieves the current password policy for the tenant or the specified domain. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPasswordPolicy + [] +``` + +### GetById + +```powershell +Get-EntraPasswordPolicy + -DomainName + [] +``` + +## Description + +The `Get-EntraPasswordPolicy` cmdlet can be used to retrieve the values associated with the Password Expiry +window or Password Expiry Notification window for a tenant or specified domain. + +When a domain name is specified, it must be a verified domain for the company. + +The work or school account needs to belong to one of the following Microsoft Entra roles: + +- Domain Name Administrator + +## Examples + +### Example 1: Get password policy for a specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraPasswordPolicy -DomainName 'contoso.com' +``` + +```Output +NotificationDays ValidityPeriod +---------------- -------------- + 90 180 +``` + +Returns the password policy for the specified domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. + +## Parameters + +### -DomainName + +The fully qualified name of the domain to be retrieved. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..3d2a8293a7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md @@ -0,0 +1,145 @@ +--- +title: Get-EntraScopedRoleMembership +description: This article provides details on the Get-EntraScopedRoleMembership command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Get-EntraScopedRoleMembership + +## Synopsis + +List Microsoft Entra role assignments with administrative unit scope. + +## Syntax + +```powershell +Get-EntraScopedRoleMembership + -AdministrativeUnitId + [-ScopedRoleMembershipId ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraScopedRoleMembership` cmdlet lists Microsoft Entra role assignments with an administrative unit scope. Use the `ObjectId` parameter to retrieve a specific scoped role membership. + +## Examples + +### Example 1: Get Scoped Role Administrator + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' +} +Get-EntraScopedRoleMembership @params +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example gets scoped role administrator. You cane use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-ScopedRoleMembershipId` parameter specifies the scoped role membership Id. + +### Example 2: List scoped administrators for administrative unit by ObjectId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraScopedRoleMembership -ObjectId $AdministrativeUnit.ObjectId +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example list scoped administrators with objectId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ScopedRoleMembershipId + +Specifies the ID of a scoped role membership. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) + +[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md new file mode 100644 index 0000000000..bcf1591a2e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md @@ -0,0 +1,227 @@ +--- +title: Get-EntraSubscribedSku +description: This article provides details on the Get-EntraSubscribedSku command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraSubscribedSku + +schema: 2.0.0 +--- + +# Get-EntraSubscribedSku + +## Synopsis + +Gets subscribed SKUs to Microsoft services. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraSubscribedSku + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraSubscribedSku + -SubscribedSkuId + [-Property ] + [] +``` + +## Description + +The `Get-EntraSubscribedSku` cmdlet gets subscribed SKUs to Microsoft services. + +## Examples + +### Example 1: Get subscribed SKUs + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraSubscribedSku +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... +bbbb1111-cc22-3333-44dd-555555eeeeee 1111bbbb-22cc-dddd-ee33-ffffff444444 M365x99297270 User Enabled 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTE... +cccc2222-dd33-4444-55ee-666666ffffff 2222cccc-33dd-eeee-ff44-aaaaaa555555 M365x99297270 User Enabled 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTE... +``` + +This example demonstrates how to retrieve subscribed SKUs to Microsoft services. + +### Example 2: Get subscribed SKUs by SubscribedSkuId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraSubscribedSku -SubscribedSkuId 'abcdefgh-1111-2222-bbbb-cccc33333333_dddddddd-4444-5555-eeee-666666666666' +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... +``` + +This example demonstrates how to retrieve specified subscribed SKUs to Microsoft services. + +- `-SubscribedSkuId` parameter specifies the ID of the SKU (Stock Keeping Unit). + +### Example 3: Get available license plans + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Organization.Read.All' +Get-EntraSubscribedSku | Select-Object -Property Sku*, ConsumedUnits -ExpandProperty PrepaidUnits +``` + +```Output +Enabled : 5 +LockedOut : 0 +Suspended : 0 +Warning : 0 +AdditionalProperties : +SkuId : efccb6f7-5641-4e0e-bd10-b4976e1bf68e +SkuPartNumber : EMS +ConsumedUnits : 3 +``` + +This example demonstrates how to retrieve available license plans. + +### Example 4: Retrieve all users assigned a specific license + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +$sku = Get-EntraSubscribedSku | Where-Object { $_.SkuPartNumber -eq 'DEVELOPERPACK_E5' } +$skuId = $sku.SkuId +$usersWithDeveloperPackE5 = Get-EntraUser -All | Where-Object { + $_.AssignedLicenses -and ($_.AssignedLicenses.SkuId -contains $skuId) +} +$usersWithDeveloperPackE5 | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled, UserType | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AccountEnabled UserType +-- ----------- ----------------- -------------- -------- +cccccccc-2222-3333-4444-dddddddddddd Angel Brown AngelB@contoso.com True Member +dddddddd-3333-4444-5555-eeeeeeeeeeee Avery Smith AveryS@contoso.com True Member +eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com True Member +``` + +This example demonstrates how to retrieve all users assigned a specific license. + +### Example 5: Get a list of users, their assigned licenses, and licensing source + +```powershell +Connect-Entra -Scopes 'Organization.Read.All','User.Read.All','Group.Read.All' + +# Get all users with specified properties +$Users = Get-EntraUser -All -Property AssignedLicenses, LicenseAssignmentStates, DisplayName, UserPrincipalName, ObjectId + +$SelectedUsers = $Users | Select-Object ObjectId, UserPrincipalName, DisplayName, AssignedLicenses -ExpandProperty LicenseAssignmentStates + +# Group Name lookup +$GroupDisplayNames = @{} + +# Sku Part Number lookup +$SkuPartNumbers = @{} + +# Populate the hashtable with group display names and SKU part numbers +foreach ($User in $SelectedUsers) { + $AssignedByGroup = $User.AssignedByGroup + $SkuId = $User.SkuId + + try { + # Check if the group display name is already in the hashtable + if (-not $GroupDisplayNames.ContainsKey($AssignedByGroup)) { + $Group = Get-EntraGroup -GroupId $AssignedByGroup + $GroupDisplayNames[$AssignedByGroup] = $Group.DisplayName + } + + $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue $GroupDisplayNames[$AssignedByGroup] + } catch { + $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue 'N/A (Direct Assignment)' + } + + try { + # Check if the SKU part number is already in the hashtable + if (-not $SkuPartNumbers.ContainsKey($SkuId)) { + $Sku = Get-EntraSubscribedSku | Where-Object { $_.SkuId -eq $SkuId } | Select-Object -ExpandProperty SkuPartNumber + $SkuPartNumbers[$SkuId] = $Sku + } + + $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue $SkuPartNumbers[$SkuId] + } catch { + $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue 'N/A' + } +} + +$SelectedUsers | Format-Table UserPrincipalName, DisplayName, AssignedByGroup, GroupDisplayName, SkuId, SkuPartNumber, State, Error -AutoSize +``` + +```Output +userPrincipalName displayName assignedByGroup GroupDisplayName skuId SkuPartNumber state error +----------------- ----------- --------------- ---------------- ----- ------------- ----- ----- +averyh@contoso.com Avery Howard cccccccc-2222-3333-4444-dddddddddddd Contoso Team abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None +devont@contoso.com Devon Torres ffffffff-5555-6666-7777-aaaaaaaaaaaa Retail abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None +``` + +This example shows a list of users, their licenses, and the source of the license such as directly assigned or group assigned. + +## Parameters + +### -SubscribedSkuId + +The object ID of the SKU (Stock Keeping Unit). + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md new file mode 100644 index 0000000000..7bf50037c6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md @@ -0,0 +1,167 @@ +--- +title: Get-EntraTenantDetail +description: This article provides details on the Get-EntraTenantDetail command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTenantDetail + +schema: 2.0.0 +--- + +# Get-EntraTenantDetail + +## Synopsis + +Gets the details of a tenant. + +## Syntax + +```powershell +Get-EntraTenantDetail + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraTenantDetail` cmdlet gets the details of a tenant in Microsoft Entra ID. + +In delegated scenarios involving work or school accounts, the signed-in user must be assigned either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation: + +- Application Administrator +- Authentication Administrator +- Cloud Application Administrator +- Directory Readers +- Directory Reviewer +- Global Reader +- Helpdesk Administrator +- Security Administrator +- Security Operator +- Security Reader +- Service Support Administrator +- User Administrator +- Privileged Role Administrator + +## Examples + +### Example 1: Get all tenant details + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTenantDetail -All +``` + +```Output +DisplayName Id TenantType CountryLetterCode VerifiedDomains +----------- -- ---------- ----------------- --------------- +Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AAD NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Mana... +``` + +This example shows how to retrieve all tenant details. + +### Example 2: Get top one tenant details + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTenantDetail -Top 1 +``` + +```Output +DisplayName Id CountryLetterCode VerifiedDomains +----------- -- ----------------- --------------- +Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}} +``` + +This example shows how to retrieve details of a top one tenant in Microsoft Entra ID. + +### Example 3: Get directory tenant size quota + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +(Get-EntraTenantDetail).AdditionalProperties.directorySizeQuota +``` + +```Output +Key Value +--- ----- +used 339 +total 50000 +``` + +This example shows how to retrieve the directory tenant size quota. + +A directory quota represents the maximum number of objects allowed in a tenant, including user accounts, app registrations, and groups. Once this limit is reached, attempts to create new objects will result in an error. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraTenantDetail](Set-EntraTenantDetail.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..f5effc7db0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md @@ -0,0 +1,133 @@ +--- +title: New-EntraAdministrativeUnit +description: This article provides details on the New-EntraAdministrativeUnit command. + + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# New-EntraAdministrativeUnit + +## Synopsis + +Creates an administrative unit. + +## Syntax + +```powershell +New-EntraAdministrativeUnit + [-Description ] + -DisplayName + [] +``` + +## Description + +The `New-EntraAdministrativeUnit` cmdlet creates an administrative unit in Microsoft Entra ID. Specify `DisplayName` parameter to create an administrative unit. + +In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that includes the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. The Privileged Role Administrator role is the least privileged role that meets this requirement. + +## Examples + +### Example 1: Create an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +New-EntraAdministrativeUnit -DisplayName 'TestAU' +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. + +### Example 2: Create an administrative unit using '-Description' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$params = @{ + DisplayName = 'Pacific Administrative Unit' + Description = 'Administrative Unit for Pacific region' +} + +New-EntraAdministrativeUnit @params +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + bbbbbbbb-1111-2222-3333-cccccccccccc Pacific Administrative Unit test111 False +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. +- `-Description` parameter specifies a description for the Administrative unit object. + +## Parameters + +### -Description + +Specifies a description for the new administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the new administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md new file mode 100644 index 0000000000..8a6f2ea0bf --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md @@ -0,0 +1,136 @@ +--- +title: New-EntraAttributeSet +description: This article provides details on the New-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAttributeSet + +schema: 2.0.0 +--- + +# New-EntraAttributeSet + +## Synopsis + +Adds a new attribute set. + +## Syntax + +```powershell +New-EntraAttributeSet + [-AttributeSetId ] + [-Description ] + [-MaxAttributesPerSet ] + [] +``` + +## Description + +Adds a new Microsoft Entra ID attribute set object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a single attribute set + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'NewCustomAttributeSet' + Description = 'Attributes for engineering team' + MaxAttributesPerSet = 10 +} + +New-EntraAttributeSet @params +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Testing Attributes for engineering team 10 +``` + +This example demonstrates hoe to add a single attribute set. + +- `-Id` parameter specifies the name of the attribute set. +- `-Description` parameter specifies the description for the attribute set. +- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. + +## Parameters + +### -Description + +Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AttributeSetId + +Name of the attribute set. Unique identifier for the attribute set within a tenant, up to 32 Unicode characters. It can't contain spaces or special characters, is case sensitive, and can't be changed later. Required. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaxAttributesPerSet + +Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraAttributeSet](Get-EntraAttributeSet.md) + +[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..6e1299f5b0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,234 @@ +--- +title: New-EntraCustomSecurityAttributeDefinition +description: This article provides details on the New-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# New-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Create a new customSecurityAttributeDefinition object. + +## Syntax + +```powershell +New-EntraCustomSecurityAttributeDefinition + -IsSearchable + [-Description ] + -IsCollection + -AttributeSet + -Type + -Name + -Status + -UsePreDefinedValuesOnly + [] +``` + +## Description + +The `New-EntraCustomSecurityAttributeDefinition` cmdlet creates a new customSecurityAttributeDefinition object. Specify `IsSearchable`, `IsCollection`, `AttributeSet`, `Type`, `Name`, `Status` and `UsePreDefinedValuesOnly` parameters for create a new custom security attribute definition. + +You can define up to 500 active objects in a tenant. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a custom security attribute + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All','CustomSecAttributeDefinition.ReadWrite.All' +$AttributeSet = Get-EntraAttributeSet -Id '' +$params = @{ + Name = 'ProjectTest' + Description = 'Target completion' + Type = 'String' + Status = 'Available' + AttributeSet = $AttributeSet.Id + IsCollection = $False + IsSearchable = $True + UsePreDefinedValuesOnly = $True +} +New-EntraCustomSecurityAttributeDefinition @params +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Test_ProjectTest Test Target completion False True ProjectTest Available String False +``` + +This example demonstrates how to add a custom security attribute. + +- `-Name` parameter specifies the name of the custom security attribute. +- `-Description` parameter specifies the description of the custom security attribute. +- `-Type` parameter specifies the data type for the custom security attribute values. +- `-Status` parameter specifies the custom security attribute is active or deactivated. +- `-AttributeSet` parameter specifies the name of attribute set. +- `-IsCollection` parameter specifies the allows multiple values can be assigned to the custom security attribute. +- `-IsSearchable` parameter specifies the custom security attribute values are indexed for searching on objects. +- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. + +## Parameters + +### -AttributeSet + +Name of the attribute set. Case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCollection + +Indicates whether multiple values can be assigned to the custom security attribute. Can't be changed later. If type is set to Boolean, isCollection can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsSearchable + +Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Can't be changed later. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Can't contain spaces or special characters. Can't be changed later. Case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status + +Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Can't be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsePreDefinedValuesOnly + +Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) + +[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md new file mode 100644 index 0000000000..d81f8e00ad --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md @@ -0,0 +1,339 @@ +--- +title: New-EntraDevice +description: This article provides details on the New-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDevice + +schema: 2.0.0 +--- + +# New-EntraDevice + +## Synopsis + +Creates a device. + +## Syntax + +```powershell +New-EntraDevice + -DisplayName + -DeviceOSType + -AccountEnabled + -DeviceId + -DeviceOSVersion + -AlternativeSecurityIds + [-DevicePhysicalIds ] + [-DeviceTrustType ] + [-DeviceMetadata ] + [-ApproximateLastLogonTimeStamp ] + [-IsManaged ] + [-DeviceObjectVersion ] + [-IsCompliant ] + [-ProfileType ] + [-SystemLabels ] + [] +``` + +## Description + +The `New-EntraDevice` cmdlet creates a device in Microsoft Entra ID. + +The calling user must be in one of the following Microsoft Entra roles: Intune Administrator or Windows 365 Administrator. + +## Examples + +### Example 1: Create a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' + +$params = @{ + AccountEnabled = $true + DisplayName = 'My new device' + AlternativeSecurityIds = $altsecid + DeviceId = $guid + DeviceOSType = 'OS/2' + DeviceOSVersion = '9.3' +} + +New-EntraDevice @params +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb dddddddd-3333-4444-5555-eeeeeeeeeeee My new device +``` + +This command creates a new device. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeSecurityIds + +Specifies alternative security IDs. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApproximateLastLogonTimeStamp + +Specifies last sign-in date time. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceMetadata + +The metadata for this device + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectVersion + +Specifies the object version of the device. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSType + +Specifies the operating system type of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSVersion + +Specifies the operating system version of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DevicePhysicalIds + +Specifies the physical ID. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceTrustType + +The trust type for this device + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompliant + +True if the device complies with Mobile Device Management (MDM) policies; otherwise, false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsManaged + +True if the device is managed by a Mobile Device Management (MDM) app such as Intune; otherwise, false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileType + +Specifies profile type of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemLabels + +Specifies labels for the device. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md new file mode 100644 index 0000000000..bba50a37cd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md @@ -0,0 +1,158 @@ +--- +title: New-EntraDomain +description: This article provides details on the New-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDomain + +schema: 2.0.0 +--- + +# New-EntraDomain + +## Synopsis + +Creates a domain. + +## Syntax + +```powershell +New-EntraDomain + -Name + [-IsDefault ] + [-SupportedServices ] + [] +``` + +## Description + +The `New-EntraDomain` cmdlet creates a domain in Microsoft Entra ID. + +The work or school account needs to belong to at least the Domain Name Administrator role. + +## Examples + +### Example 1: Create a new Domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo.com +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain in Microsoft Entra ID. + +### Example 2: Create a new Domain with a list of domain capabilities + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo1.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo1.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain with the specified services in Microsoft Entra ID. + +### Example 3: Create a new Domain and make if the default new user creation + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo2.com -IsDefault $True +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo2.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain in Microsoft Entra ID and marks it as the default to be used for new user creation. + +## Parameters + +### -IsDefault + +Indicates whether or not this is the default domain that is used for user creation. + +There is only one default domain per company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The fully qualified name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SupportedServices + +The capabilities assigned to the domain. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..2b4e4d8f3b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraAdministrativeUnit +description: This article provides details on the Remove-EntraAdministrativeUnit command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# Remove-EntraAdministrativeUnit + +## Synopsis + +Removes an administrative unit. + +## Syntax + +```powershell +Remove-EntraAdministrativeUnit + -AdministrativeUnitId + [] +``` + +## Description + +The `Remove-EntraAdministrativeUnit` cmdlet removes an administrative unit from Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to delete an administrative unit. + +To delete an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. + +## Examples + +### Example 1: Remove an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Remove-EntraAdministrativeUnit -ObjectId $AdministrativeUnit.ObjectId +``` + +This command removes the specified administrative unit from Microsoft Entra ID. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..306fdee2a1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md @@ -0,0 +1,108 @@ +--- +title: Remove-EntraAdministrativeUnitMember +description: This article provides details on the Remove-EntraAdministrativeUnitMember command. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Remove-EntraAdministrativeUnitMember + +## Synopsis + +Removes an administrative unit member. + +## Syntax + +```powershell +Remove-EntraAdministrativeUnitMember + -AdministrativeUnitId + -MemberId + [] +``` + +## Description + +The `Remove-EntraAdministrativeUnitMember` cmdlet removes an administrative unit member in Microsoft Entra ID. Specify `AdministrativeUnitId` and `MemberId` to remove an administrative unit member. + +To remove a member from an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. + +## Examples + +### Example 1: Remove an administrative unit member + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + MemberId = 'eeeeeeee-4444-5555-6666-ffffffffffff' +} +Remove-EntraAdministrativeUnitMember @params +``` + +This command removes a specified member (user or group) from a specified administrative unit. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-MemberId` parameter specifies the ID of the administrative unit member. + +## Parameters + +### -MemberId + +Specifies the ID of the administrative unit member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) + +[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md new file mode 100644 index 0000000000..9d5b0e222a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md @@ -0,0 +1,79 @@ +--- +title: Remove-EntraContact +description: This article provides details on the Remove-EntraContact command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraContact + +schema: 2.0.0 +--- + +# Remove-EntraContact + +## Synopsis + +Removes a contact. + +## Syntax + +```powershell +Remove-EntraContact + -OrgContactId + [] +``` + +## Description + +The `Remove-EntraContact` removes a contact from Microsoft Entra ID. + +## Examples + +### Example 1: Remove a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Remove-EntraContact -OrgContactId $Contact.ObjectId +``` + +The example shows how to remove a contact. + +## Parameters + +### -OrgContactId + +Specifies the object ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md new file mode 100644 index 0000000000..bacb0d4a0c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md @@ -0,0 +1,85 @@ +--- +title: Remove-EntraDevice +description: This article provides details on the Remove-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDevice + +schema: 2.0.0 +--- + +# Remove-EntraDevice + +## Synopsis + +Deletes a device. + +## Syntax + +```powershell +Remove-EntraDevice + -DeviceId + [] +``` + +## Description + +The `Remove-EntraDevice` cmdlet removes a device from Microsoft Entra ID. + +The calling user must be in one of the following Microsoft Entra roles: Intune Administrator, Windows 365 Administrator, or Cloud Device Administrator. + +## Examples + +### Example 1: Remove a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +$Device = Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" +Remove-EntraDevice -DeviceId $Device.ObjectId +``` + +This command removes the specified device. + +## Parameters + +### -DeviceId + +Specifies the object ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[New-EntraDevice](New-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..ec6b3a8a33 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md @@ -0,0 +1,101 @@ +--- +title: Remove-EntraDeviceRegisteredOwner +description: This article provides details on the Remove-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Remove-EntraDeviceRegisteredOwner + +## Synopsis + +Removes the registered owner of a device. + +## Syntax + +```powershell +Remove-EntraDeviceRegisteredOwner + -OwnerId + -DeviceId + [] +``` + +## Description + +The `Remove-EntraDeviceRegisteredOwner` cmdlet removes the registered owner of a device in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an owner from a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$Device = Get-EntraDevice -Top 1 +$Owner = Get-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId +Remove-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId -OwnerId $Owner.ObjectId +``` + +This examples shows how to remove the owner of a device. + +## Parameters + +### -DeviceId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies an owner ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) + +[Get-EntraDevice](Get-EntraDevice.md) + +[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..ec9ca2ff64 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md @@ -0,0 +1,99 @@ +--- +title: Remove-EntraDeviceRegisteredUser +description: This article provides details on the Remove-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Remove-EntraDeviceRegisteredUser + +## Synopsis + +Removes a registered user from a device. + +## Syntax + +```powershell +Remove-EntraDeviceRegisteredUser + -DeviceId + -UserId + [] +``` + +## Description + +The `Remove-EntraDeviceRegisteredUser` cmdlet removes a registered user from a Microsoft Entra ID device. + +## Examples + +### Example 1: Remove a registered user from a device + +```Powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$Device = Get-EntraDevice -Top 1 +$User = Get-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId +Remove-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId -UserId $User.ObjectId +``` + +This example shows how to remove the registered user from device. + +## Parameters + +### -DeviceId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) + +[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..4b888305c9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraDirectoryRoleMember +description: This article provides details on the Remove-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleMember + +## Synopsis + +Removes a member of a directory role. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleMember + -DirectoryRoleId + -MemberId + [] +``` + +## Description + +The `Remove-EntraDirectoryRoleMember` cmdlet removes a member from a directory role in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a member from a directory role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$params = @{ + DirectoryRoleId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + MemberId = '11bb11bb-cc22-dd33-ee44-55ff55ff55ff' +} + +Remove-EntraDirectoryRoleMember @params +``` + +This example removes the specified member from the specified role. + +- `-DirectoryRoleId` - specifies the unique identifier (ObjectId) of the directory role from which the member will be removed. + +- `-MemberId` - specifies the unique identifier (MemberId) of the member (user, group, or service principal) that is to be removed from the specified directory role. + +## Parameters + +### -MemberId + +Specifies the object ID of a role member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DirectoryRoleId + +Specifies the object ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) + +[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md new file mode 100644 index 0000000000..cfd13d0926 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md @@ -0,0 +1,91 @@ +--- +title: Remove-EntraDomain +description: This article provides details on the Remove-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDomain + +schema: 2.0.0 +--- + +# Remove-EntraDomain + +## Synopsis + +Removes a domain. + +## Syntax + +```powershell +Remove-EntraDomain + -Name + [] +``` + +## Description + +The `Remove-EntraDomain` cmdlet removes a domain from Microsoft Entra ID. + +Important: + +- Deleted domains are not recoverable. +- Attempts to delete will fail if there are any resources or objects still dependent on the domain. + +The work or school account needs to belong to at least the `Domain Name Administrator` Microsoft Entra role. + +## Examples + +### Example 1: Remove a domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Remove-EntraDomain -Name Contoso.com +``` + +This command removes a domain from Microsoft Entra ID. + +## Parameters + +### -Name + +Specifies the name of the domain to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md new file mode 100644 index 0000000000..f0b6781699 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md @@ -0,0 +1,79 @@ +--- +title: Remove-EntraExternalDomainFederation +description: This article provides details on the Remove-EntraExternalDomainFederation command. + + +ms.topic: reference +ms.date: 06/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra + +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation + +schema: 2.0.0 +--- + +# Remove-EntraExternalDomainFederation + +## Synopsis + +Delete an externalDomainFederation by external domain name. + +## Syntax + +```powershell +Remove-EntraExternalDomainFederation + -ExternalDomainName + [] +``` + +## Description + +This `Remove-EntraExternalDomainFederation` cmdlet removes an externalDomainFederation by external domain name. + +## Examples + +### Example 1: Deletes an external domain federation setting for a given external domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Remove-EntraExternalDomainFederation -ExternalDomainName 'test.com' +``` + +This command deletes an external domain federation setting. + +- `ExternalDomainName` Parameter specifies unique identifer of an externalDomainFederation. + +## Parameters + +### -ExternalDomainName + +The unique identifer of an externalDomainFederation in Microsoft Entra ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..498ce84d81 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraScopedRoleMembership +description: This article provides details on the Remove-EntraScopedRoleMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Remove-EntraScopedRoleMembership + +## Synopsis + +Removes a scoped role membership. + +## Syntax + +```powershell +Remove-EntraScopedRoleMembership + -AdministrativeUnitId + -ScopedRoleMembershipId + [] +``` + +## Description + +The `Remove-EntraScopedRoleMembership` cmdlet removes a scoped role membership from Microsoft Entra ID. Specify `AdministrativeUnitId` and `ScopedRoleMembershipId` parameter to remove a scoped role membership. + +## Examples + +### Example 1: Remove a scoped role membership + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.AdministrativeUnitId + ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' +} +Remove-EntraScopedRoleMembership @params +``` + +This cmdlet removes a specific scoped role membership from Microsoft Entra ID. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-ScopedRoleMembershipId` parameter specifies the ID of the scoped role membership to remove. To obtain the details of a scoped role membership, you can use the `Get-EntraScopedRoleMembership` command. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ScopedRoleMembershipId + +Specifies the ID of the scoped role membership to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) + +[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..ce69a357d3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md @@ -0,0 +1,154 @@ +--- +title: Restore-EntraDeletedDirectoryObject +description: This article provides details on the Restore-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Restore-EntraDeletedDirectoryObject + +## Synopsis + +Restore a previously deleted object. + +## Syntax + +```powershell +Restore-EntraDeletedDirectoryObject + -Id + [] +``` + +## Description + +The `Restore-EntraDeletedDirectoryObject` cmdlet is used to restore previously deleted objects, such as application, group, service principal, administrative unit, or user objects. + +When a group or application is deleted, it is initially soft deleted and can be recovered within the first 30 days. After 30 days, the deleted object is permanently deleted and cannot be recovered. + +**Notes:** + +- Only Unified Groups (also known as Office 365 Groups) can be restored; Security groups cannot be restored. +- Restoring an application does not automatically restore its associated service principal. You must explicitly use this cmdlet to restore the deleted service principal. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles: + +- **To restore deleted applications or service principals:** Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. +- **To restore deleted users:** User Administrator. + - However, to restore users with privileged administrator roles: + - In delegated scenarios, the app must be assigned the `Directory.AccessAsUser.All` delegated permission, and the calling user must also be assigned a higher privileged administrator role. + - In app-only scenarios, in addition to being granted the `User.ReadWrite.All` application permission, the app must be assigned a higher privileged administrator role. +- **To restore deleted groups:** Groups Administrator. + - However, to restore role-assignable groups, the calling user must be assigned the Privileged Role Administrator role. + +## Examples + +### Example 1: Restore a deleted object with ID + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' #administrativeUnit resource +Connect-Entra -Scopes 'Application.ReadWrite.All' #application resource +Connect-Entra -Scopes 'Group.ReadWrite.All' #group resource +Connect-Entra -Scopes 'Application.ReadWrite.All' #servicePrincipal resource +Connect-Entra -Scopes 'User.ReadWrite.All' #user resource +Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example shows how to restore a deleted object in Microsoft Entra ID. + +- `-Id` parameter specifies the Id of the directory object to restore. + +### Example 2: Restoring a Soft-Deleted User and Removing Conflicting Proxy Addresses + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -AutoReconcileProxyConflict +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example shows how to restore a deleted object in Microsoft Entra ID. + +- `-Id` parameter specifies the Id of the directory object to restore. +- `-AutoReconcileProxyConflict` parameter removes any conflicting proxy addresses while restoring a soft-deleted user whose one or more proxy addresses are currently used for an active user. + +## Parameters + +### -Id + +The Id of the directory object to restore. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AutoReconcileProxyConflict + +Specifies whether Microsoft Entra ID should remove conflicting proxy addresses when restoring a soft-deleted user, if any of the user's proxy addresses are currently in use by an active user. This parameter applies only when restoring a soft-deleted user. The default value is `false`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) + +[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) + +[Remove-EntraDeletedDirectoryObject](Remove-EntraDeletedDirectoryObject.md) + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) + +[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..9087e6ebfb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md @@ -0,0 +1,145 @@ +--- +title: Set-EntraAdministrativeUnit +description: This article provides details on the Set-EntraAdministrativeUnit command. + +ms.topic: reference +ms.date: 06/19/2023 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# Set-EntraAdministrativeUnit + +## Synopsis + +Updates an administrative unit. + +## Syntax + +```powershell +Set-EntraAdministrativeUnit + -AdministrativeUnitId + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +The `Set-EntraAdministrativeUnit` cmdlet updates an administrative unit in Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to update a specific administrative unit. + +In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. + +The Privileged Role Administrator is the least privileged role required for this operation. + +## Examples + +### Example 1: Update DisplayName + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + DisplayName = 'UpdatedAU' +} +Set-EntraAdministrativeUnit @params +``` + +This Command update DisplayName of specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-DisplayName` parameter specifies the display name for the administrative unit. + +### Example 2: Update Description + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + Description = 'Updated AU Description' +} +Set-EntraAdministrativeUnit @params +``` + +This example shows how to update the description of a specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-Description` parameter specifies the description for the administrative unit. + +## Parameters + +### -Description + +Specifies a description. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the Id of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md new file mode 100644 index 0000000000..71c1d09ff0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md @@ -0,0 +1,147 @@ +--- +title: Set-EntraAttributeSet +description: This article provides details on the Set-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAttributeSet + +schema: 2.0.0 +--- + +# Set-EntraAttributeSet + +## Synopsis + +Updates an existing attribute set. + +## Syntax + +```powershell +Set-EntraAttributeSet + -AttributeSetId + [-Description ] + [-MaxAttributesPerSet ] + [] +``` + +## DESCRIPTION + +The `Set-EntraAttributeSet` cmdlet updates a Microsoft Entra ID attribute set object specified by its ID. Specify `AttributeSetId` parameter to Update a Microsoft Entra ID attribute set object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. + +Note: Only the Attribute Definition Administrator role is supported for this operation. Ensure the signed-in user is assigned this role. + +You can only update the `description` and `maxAttributesPerSet` properties. + +## Examples + +### Example 1: Update an attribute set + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Engineering' + Description = 'Attributes for cloud engineering team' +} +Set-EntraAttributeSet @params +``` + +This example update an attribute set. + +- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. +- `-Description` parameter specifies the description for the attribute set. + +### Example 2: Update an attribute set using MaxAttributesPerSet + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Engineering' + MaxAttributesPerSet = 10 +} +Set-EntraAttributeSet @params +``` + +This example update an attribute set using MaxAttributesPerSet. + +- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. +- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. + +## Parameters + +### -Description + +Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AttributeSetId + +Name of the attribute set. Unique identifier for the attribute set within a tenant. This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MaxAttributesPerSet + +Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraAttributeSet](New-EntraAttributeSet.md) + +[Get-EntraAttributeSet](Get-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..d91b797cc7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,149 @@ +--- +title: Set-EntraCustomSecurityAttributeDefinition +description: This article provides details on the Set-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 07/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# Set-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Update the properties of a customSecurityAttributeDefinition object. + +## Syntax + +```powershell +Set-EntraCustomSecurityAttributeDefinition + -Id + [-Description ] + [-Status ] + [-UsePreDefinedValuesOnly ] + [] +``` + +## Description + +Update the properties of a customSecurityAttributeDefinition object. Specify `Id` parameter to update a custom security attribute definition. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Update a custom security attribute + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + Id = 'Engineering_ProjectDate' + Description = 'Add-description' + Status = 'Available' + UsePreDefinedValuesOnly = $False +} +Set-EntraCustomSecurityAttributeDefinition @params +``` + +This example update a custom security attribute. + +- `-Id` parameter specifies the custom security attribute definition object ID. +- `-Description` parameter specifies the description of the custom security attribute. +- `-Status` parameter specifies the custom security attribute is active or deactivated. +- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. + +## Parameters + +### -Description + +Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID custom security attribute definition object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Status + +Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsePreDefinedValuesOnly + +Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) + +[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..a2b37457d9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,126 @@ +--- +title: Set-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Set-EntraCustomSecurityAttributeDefinitionAllowedValue command. + +ms.topic: reference +ms.date: 07/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue + +schema: 2.0.0 +--- + +# Set-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Updates an existing custom security attribute definition predefined value. + +## Syntax + +```powershell +Set-EntraCustomSecurityAttributeDefinitionAllowedValue + [-IsActive ] + -CustomSecurityAttributeDefinitionId + -Id [] +``` + +## Description + +The `Set-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdlet update a Microsoft Entra ID custom security attribute definition predefined value object identified by ID. Specify `CustomSecurityAttributeDefinitionId` and `Id` parameter to update a Microsoft Entra ID custom security attribute definition predefined value. + +## Examples + +### Example 1: Update a custom security attribute definition predefined value + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + CustomSecurityAttributeDefinitionId = 'Engineering_Project' + Id = 'Alpine' + IsActive = $true +} +Set-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +This example update a custom security attribute definition predefined value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. +- `-Id` parameter specifies the ID of Microsoft Entra ID Object. +- `-IsActive` parameter specifies the predefined value is active or deactivated. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier of customSecurityAttributeDefinition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. This field is optional. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsActive + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any other supported directory objects. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md new file mode 100644 index 0000000000..2e21b12941 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md @@ -0,0 +1,387 @@ +--- +title: Set-EntraDevice +description: This article provides details on the Set-EntraDevice command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDevice + +schema: 2.0.0 +--- + +# Set-EntraDevice + +## Synopsis + +Updates a device. + +## Syntax + +```powershell +Set-EntraDevice + -DeviceObjectId + [-DevicePhysicalIds ] + [-DeviceOSType ] + [-DeviceTrustType ] + [-DisplayName ] + [-DeviceMetadata ] + [-ApproximateLastLogonTimeStamp ] + [-AccountEnabled ] + [-IsManaged ] + [-DeviceId ] + [-DeviceObjectVersion ] + [-IsCompliant ] + [-DeviceOSVersion ] + [-AlternativeSecurityIds ] + [-ProfileType ] + [-SystemLabels ] + [] +``` + +## Description + +The `Set-EntraDevice` cmdlet updates a device in Microsoft Entra ID. + +The calling user must have at least the Intune Administrator role in Microsoft Entra. A user with the Cloud Device Administrator role can only enable or disable devices, while a user with the Windows 365 Administrator role can only update basic device properties. + +## Examples + +### Example 1: Update a device display name + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName 'My OS/2 computer' +``` + +This example shows how to update a display name of a specified. + +### Example 2: Update a device alternative security ID + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +$NewId= New-Object Microsoft.Open.AzureAD.Model.AlternativeSecurityId +$NewId.Key =[System.Text.Encoding]::UTF8.GetBytes('test') +$NewId.type = 2 +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AlternativeSecurityIds $NewId +``` + +This example shows how to update an alternative security ID of a specified device. + +### Example 3: Update a device account enabled + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AccountEnabled $true +``` + +This example shows how to update an account enabled of a specified device. + +### Example 4: Update a device OS type + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DeviceOSType Windows +``` + +This example shows how to update an OS type of a specified device. + +### Example 5: Update a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' + +$params = @{ + DeviceObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DeviceMetadata = 'Testdevice' + DeviceObjectVersion = 4 + DevicePhysicalIds = '[GID]:g:1234567890123456' + IsCompliant = $false +} + +Set-EntraDevice @params +``` + +This example shows how to update multiple properties of a specified device. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeSecurityIds + +Specifies alternative security IDs. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApproximateLastLogonTimeStamp + +The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderby. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the device ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceMetadata + +The device metadata for this device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectVersion + +Specifies the object version of the device. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSType + +Specifies the operating system. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSVersion + +Specifies the operating system version. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DevicePhysicalIds + +Specifies the physical ID. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceTrustType + +Specifies the device trust type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompliant + +Indicates whether the device is compliant. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsManaged + +Indicates whether the device is managed. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectId + +Specifies the object ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProfileType + +Specifies the profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemLabels + +Specifies list of labels applied to the device by the system. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[New-EntraDevice](New-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md new file mode 100644 index 0000000000..1226207ac6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md @@ -0,0 +1,144 @@ +--- +title: Set-EntraDirSyncConfiguration +description: This article provides details on the Set-EntraDirSyncConfiguration command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration + +schema: 2.0.0 +--- + +# Set-EntraDirSyncConfiguration + +## Synopsis + +Modifies the directory synchronization settings. + +## Syntax + +```powershell +Set-EntraDirSyncConfiguration + -AccidentalDeletionThreshold + [-Force] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraDirSyncConfiguration` cmdlet modifies the directory synchronization settings. + +## Examples + +### Example 1: Set directory synchronization settings + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold 600 -Force +``` + +This command sets directory synchronization settings. + +- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Set directory synchronization settings for a Tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$tenantID = (Get-EntraContext).TenantId +$params = @{ + AccidentalDeletionThreshold = 600 + TenantId = $tenantID + Force = $true +} + +Set-EntraDirSyncConfiguration @params +``` + +This command sets directory synchronization settings. + +- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. +- `-Force` Forces the command to run without asking for user confirmation. +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -AccidentalDeletionThreshold + +Specifies the accidental deletion prevention configuration for a tenant. + +```yaml +Type: System.UInt32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: SetAccidentalDeletionThreshold +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.UInt32 + +### System.Guid + +## Outputs + +### System.Object + +## Notes + +- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). + +## Related Links + +[Get-EntraDirSyncConfiguration](Get-EntraDirSyncConfiguration.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md new file mode 100644 index 0000000000..75055a97f0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md @@ -0,0 +1,140 @@ +--- +title: Set-EntraDirSyncEnabled +description: This article provides details on the Set-EntraDirSyncEnabled command. + + +ms.topic: reference +ms.date: 09/27/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled + +schema: 2.0.0 +--- + +# Set-EntraDirSyncEnabled + +## Synopsis + +Turns directory synchronization on or off for a company. + +## Syntax + +```powershell +Set-EntraDirSyncEnabled + -EnableDirSync + [-Force] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraDirSyncEnabled` cmdlet turns directory synchronization on or off for a company. +>[!IMPORTANT] +>It may take up to 72 hours to complete deactivation once you have disabled DirSync through this cmdlet. The time depends on the number of objects that are in your cloud service subscription account. **You cannot cancel the disable action**. It will need to complete before you can take any other action, including re-enabling of DirSync. If you choose to re-enable DirSync, a full synchronization of your synced objects will happen. This may take a considerable time depending on the number of objects in your Microsoft Entra ID. +>[!NOTE] +>If you disable DirSync and you decide to re-enable it, and you have enabled the BlockCloudObjectTakeoverThroughHardMatch feature, OnPrem to cloud object takeover/update for all objects mastered in the Microsoft Entra ID will be blocked. If this is the case and you want to resume syncing Microsoft Entra ID mastered objects with Microsoft Entra ID, set **BlockCloudObjectTakeoverThroughHardMatch** feature to false. + +## Examples + +### Example 1: Turn on directory synchronization + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' +$params = @{ + EnableDirsync = $True + Force = $True +} +Set-EntraDirSyncEnabled @params +``` + +This example turns on directory synchronization for a company. + +- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Turn off directory synchronization + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' +$params = @{ + EnableDirsync = $False + TenantId = 'aaaaaaaa-1111-1111-1111-000000000000' + Force = $True + +} +Set-EntraDirSyncEnabled @params +``` + +This example turns off directory synchronization for a company. + +- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. +- `-Force` Forces the command to run without asking for user confirmation. +- `-TenantId` Specifies the unique ID of the tenant on which to perform the operation. + +## Parameters + +### -EnableDirsync + +Specifies whether to turn on directory synchronization on for your company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the unique ID of the tenant on which to perform the operation. +The default value is the tenant of the current user. +This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md new file mode 100644 index 0000000000..7dcceca78b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md @@ -0,0 +1,187 @@ +--- +title: Set-EntraDirSyncFeature +description: This article provides details on the Set-EntraDirSyncFeature command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncFeature + +schema: 2.0.0 +--- + +# Set-EntraDirSyncFeature + +## Synopsis + +Used to set identity synchronization features for a tenant. + +## Syntax + +```powershell +Set-EntraDirSyncFeature + -Feature + -Enabled + [-TenantId ] + [-Force] + [] +``` + +## Description + +The `Set-EntraDirSyncFeature` cmdlet sets identity synchronization features for a tenant. + +You can use the following synchronization features with this cmdlet: + +- **EnableSoftMatchOnUpn**: Soft match is the process used to link an object being synced from on-premises for the first time with one that already exists in the cloud. When this feature is enabled, soft match is attempted using the standard logic, based on the primary SMTP address. If a match isn't found based on primary SMTP, then a match is attempted based on UserPrincipalName. Once this feature is enabled, it can't be disabled. +- **PasswordSync**: Used to indicate on-premise password synchronization. +- **SynchronizeUpnForManagedUsers**: Allows for the synchronization of UserPrincipalName updates from on-premises for managed (nonfederated) users that are assigned a license. These updates are blocked if this feature isn't enabled. Once this feature is enabled, it can't be disabled. +- **BlockSoftMatch**: When this feature is enabled, it blocks the soft match feature. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching is completed and is no longer needed. +- **BlockCloudObjectTakeoverThroughHardMatch**: Used to block cloud object takeover via source anchor hard match. + +Enabling some of these features, such as EnableSoftMatchOnUpn and SynchronizationUpnForManagedUsers, is a permanent operation. +You can't disable these features once they're enabled. + +## Examples + +### Example 1: Enable a feature for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockCloudObjectTakeoverThroughHardMatch' + Enable = $True +} +Set-EntraDirSyncFeature @params +``` + +This command enables the SoftMatchOnUpn feature for the tenant. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Block Soft Matching for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockSoftMatch' + Enable = $True +} + +Set-EntraDirSyncFeature @params +``` + +This command enables the BlockSoftMatch feature for the tenant - effectively blocking the Soft Matching feature in the tenant. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. + +### Example 3: Block Cloud object takeover through Hard Matching for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockCloudObjectTakeoverThroughHardMatch' + Enable = $True +} + +Set-EntraDirSyncFeature @params +``` + +This command enables the BlockCloudObjectTakeoverThroughHardMatch feature for the tenant - effectively blocking the Hard Match object takeover. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -Feature + +The DirSync feature to turn on or off. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Enable + +Indicates whether the specified features are turned on for the company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). +- For the feature list see the [onPremisesDirectorySynchronizationFeature resource type](https://learn.microsoft.com/graph/api/resources/onpremisesdirectorysynchronizationfeature). + +## Related Links + +[Get-EntraDirSyncFeature](Get-EntraDirSyncFeature.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md new file mode 100644 index 0000000000..d2000341f7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md @@ -0,0 +1,135 @@ +--- +title: Set-EntraDomain +description: This article provides details on the Set-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomain + +schema: 2.0.0 +--- + +# Set-EntraDomain + +## Synopsis + +Updates a domain. + +## Syntax + +```powershell +Set-EntraDomain + -Name + [-IsDefault ] + [-SupportedServices ] + [] +``` + +## Description + +The `Set-EntraDomain` cmdlet updates a verified domain in Microsoft Entra ID. + +The work or school account needs to belong to at least one of the following Microsoft Entra roles: + +- Domain Name Administrator +- Security Administrator +- External Identity Provider Administrator + +## Examples + +### Example 1: Set the domain as the default domain for new user account creation + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Set-EntraDomain -Name Contoso.com -IsDefault $true +``` + +This example demonstrates how to set default domain for new user account in Microsoft Entra ID. + +### Example 2: Set the list of domain capabilities + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Set-EntraDomain -Name Contoso.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') +``` + +This example demonstrates how to set domain capabilities for new user account in Microsoft Entra ID. + +## Parameters + +### -IsDefault + +Indicates whether or not this is the default domain that is used for user creation. +There's only one default domain per company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The fully qualified name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SupportedServices + +The capabilities assigned to the domain. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md new file mode 100644 index 0000000000..21dbb0f668 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md @@ -0,0 +1,290 @@ +--- +title: Set-EntraDomainFederationSettings +description: This article provides details on the Set-EntraDomainFederationSettings command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings + +schema: 2.0.0 +--- + +# Set-EntraDomainFederationSettings + +## Synopsis + +Updates settings for a federated domain. + +## Syntax + +```powershell +Set-EntraDomainFederationSettings + -DomainName + [-SigningCertificate ] + [-NextSigningCertificate ] + [-LogOffUri ] + [-PassiveLogOnUri ] + [-ActiveLogOnUri ] + [-IssuerUri ] + [-FederationBrandName ] + [-MetadataExchangeUri ] + [-PreferredAuthenticationProtocol ] + [-SigningCertificateUpdateStatus ] + [-PromptLoginBehavior ] + [] +``` + +## Description + +The `Set-EntraDomainFederationSettings` cmdlet is used to update the settings of a single sign-on domain. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Set the PromptLoginBehavior + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' + +$params = @{ + DomainName = 'contoso.com' + PreferredAuthenticationProtocol = 'WsFed' + PromptLoginBehavior = 'TranslateToFreshPasswordAuth' # Or 'NativeSupport' or 'Disabled', depending on the requirement +} +Set-EntraDomainFederationSettings @params +``` + +This command updates the `PromptLoginBehavior` to either `TranslateToFreshPasswordAuth`, `NativeSupport`, or `Disabled`. These possible values are described: + +- `TranslateToFreshPasswordAuth` - means the default Microsoft Entra ID behavior of translating `prompt=login` to `wauth=https://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password` and `wfresh=0`. +- `NativeSupport` - means that the `prompt=login` parameter is sent as is to ADFS. +- `Disabled` - means that only wfresh=0 is sent to ADFS + +Use the `Get-EntraDomainFederationSettings -DomainName | Format-List *` to get the values for `PreferredAuthenticationProtocol` and `PromptLoginBehavior` for the federated domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. +- `-PreferredAuthenticationProtocol` parameter specifies the preferred authentication protocol. +- `-PromptLoginBehavior` parameter specifies the prompt sign-in behavior. + +## Parameters + +### -DomainName + +The fully qualified domain name (FQDN) to update. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -SigningCertificate + +The current certificate used to sign tokens passed to the Microsoft Entra ID Identity platform. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NextSigningCertificate + +The next token signing certificate that will be used to sign tokens when the primary signing certificate expires. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -LogOffUri + +The URL clients are redirected to when they sign out of Microsoft Entra ID services. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PassiveLogOnUri + +The URL that web-based clients will be directed to when signing in to Microsoft Entra ID services. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ActiveLogOnUri + +A URL that specifies the end point used by active clients when authenticating with domains set up for single sign-on (also known as identity federation) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IssuerUri + +The unique identifier of the domain in the Microsoft Entra ID Identity platform derived from the federation server. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FederationBrandName + +The name of the string value shown to users when signing in to Microsoft Entra ID. +We recommend that customers use something that is familiar to +users such as "Contoso Inc." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MetadataExchangeUri + +The URL that specifies the metadata exchange end point used for authentication from rich client applications such as Lync Online. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PreferredAuthenticationProtocol + +Specifies the preferred authentication protocol. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 10 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SigningCertificateUpdateStatus + +Specifies the update status of the signing certificate. + +```yaml +Type: System.Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: 11 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PromptLoginBehavior + +Specifies the prompt login behavior. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 12 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDomainFederationSettings](Get-EntraDomainFederationSettings.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md new file mode 100644 index 0000000000..1a4ad58b18 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md @@ -0,0 +1,242 @@ +--- +title: Set-EntraPartnerInformation +description: This article provides details on the Set-EntraPartnerInformation command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPartnerInformation + +schema: 2.0.0 +--- + +# Set-EntraPartnerInformation + +## Synopsis + +Sets company information for partners. + +## Syntax + +```powershell +Set-EntraPartnerInformation + [-CompanyType ] + [-PartnerCompanyName ] + [-PartnerSupportTelephones ] + [-PartnerSupportEmails ] + [-PartnerCommerceUrl ] + [-PartnerSupportUrl ] + [-PartnerHelpUrl ] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraPartnerInformation` cmdlet is used by partners to set partner-specific properties. + +These properties can view by all tenants that the partner has access to. + +## Examples + +### Example 1: Update the help URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerHelpUrl 'http://www.help.contoso.com' +``` + +This example shows how to update the help URL. + +### Example 2: Update the Support URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerSupportUrl 'http://www.test1.com' +``` + +This example shows how to update the support URL. + +### Example 3: Update the Commerce URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerCommerceUrl 'http://www.test1.com' +``` + +This example shows how to update the commerce URL. + +### Example 4: Update the SupportEmails + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerSupportEmails 'contoso@example.com' +``` + +This example shows how to update the support email addresses. + +### Example 5: Update the SupportTelephones + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$tenantId = (Get-EntraContext).TenantId +$params = @{ + PartnerSupportTelephones = '234234234' + TenantId = $tenantId +} +Set-EntraPartnerInformation @params +``` + +This example shows how to update support telephone numbers. + +## Parameters + +### -PartnerCommerceUrl + +Specifies the URL for the partner's commerce website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerHelpUrl + +Specifies the URL for the partner's Help website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportEmails + +Specifies the support email address for the partner. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportTelephones + +Specifies the support telephone numbers for the partner. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportUrl + +Specifies the URL for the partner's support website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the unique ID of the tenant on which to perform the operation. +The default value is the tenant of the current user. +This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -CompanyType + +Specifies the partner's company type. + +```yaml +Type: CompanyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerCompanyName + +Specifies the partner's company name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPartnerInformation](Get-EntraPartnerInformation.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md new file mode 100644 index 0000000000..24191c6eb6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md @@ -0,0 +1,216 @@ +--- +title: Set-EntraTenantDetail +description: This article provides details on the Set-EntraTenantDetail command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTenantDetail + +schema: 2.0.0 +--- + +# Set-EntraTenantDetail + +## Synopsis + +Set contact details for a tenant. + +## Syntax + +```powershell +Set-EntraTenantDetail + [-PrivacyProfile ] + [-MarketingNotificationEmails ] + [-TechnicalNotificationMails ] + [-SecurityComplianceNotificationMails ] + [-SecurityComplianceNotificationPhones ] + [] +``` + +## Description + +This cmdlet is used to set various contact details for a tenant. + +For delegated scenarios, the signed-in user must have at least one of the following Microsoft Entra roles. + +- Application Administrator +- Cloud Application Administrator +- Privileged Role Administrator +- User Administrator +- Helpdesk Administrator + +## Examples + +### Example 1: Set contact details for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$params = @{ + MarketingNotificationEmails = @('amy@contoso.com', 'henry@contoso.com') + SecurityComplianceNotificationMails = @('john@contoso.com', 'mary@contoso.com') + SecurityComplianceNotificationPhones = @('1-555-625-9999', '1-555-233-5544') + TechnicalNotificationMails = 'peter@contoso.com' +} + +Set-EntraTenantDetail @params +``` + +This example demonstrates how to set various contact details for a tenant. + +- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. +- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. +- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. +- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. + +### Example 2: Set MarketingNotificationEmails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -MarketingNotificationEmails @('amy@contoso.com','henry@contoso.com') +``` + +This example demonstrates how to set MarketingNotificationEmails detail for a tenant. + +- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. + +### Example 3: Set SecurityComplianceNotificationMails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -SecurityComplianceNotificationMails @('john@contoso.com','mary@contoso.com') +``` + +This example demonstrates how to set SecurityComplianceNotificationMails detail for a tenant. + +- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. + +### Example 4: Set -SecurityComplianceNotificationPhones for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -SecurityComplianceNotificationPhones @('1-555-625-9999', '1-555-233-5544') +``` + +This example demonstrates how to set MarketingNotificationEmails detail for a tenant. + +- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. + +### Example 5: Set TechnicalNotificationMails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -TechnicalNotificationMails 'peter@contoso.com' +``` + +This example demonstrates how to set TechnicalNotificationMails detail for a tenant. + +- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. + +## Parameters + +### -MarketingNotificationEmails + +The email addresses that are used to send marketing notification emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityComplianceNotificationMails + +The email addresses that are used to send security compliance emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityComplianceNotificationPhones + +One or more phone numbers that are used for security compliance. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TechnicalNotificationMails + +The email addresses that are used for technical notification emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivacyProfile + +Represents a company's privacy profile, which includes a privacy statement URL and a contact person for questions regarding the privacy statement. + +```yaml +Type: PrivacyProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +- For more details see [Update organization](https://learn.microsoft.com/graph/api/organization-update). + +## Related Links + +[Get-EntraTenantDetail](Get-EntraTenantDetail.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..7c86ba6f95 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md @@ -0,0 +1,282 @@ +--- +title: Get-EntraDirectoryRoleAssignment +description: This article provides details on the Get-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleAssignment + +## Synopsis + +Get a Microsoft Entra ID roleAssignment. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRoleAssignment + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetValue + +```powershell +Get-EntraDirectoryRoleAssignment + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRoleAssignment + -UnifiedRoleAssignmentId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleAssignment` cmdlet gets information about role assignments in Microsoft Entra ID. To get a role assignment, specify the `UnifiedRoleAssignmentId` parameter. Specify the `SearchString` or `Filter` parameter to find a particular role assignment. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: + +- microsoft.directory/roleAssignments/standard/read (least privileged) +- microsoft.directory/roleAssignments/allProperties/read +- microsoft.directory/roleAssignments/allProperties/allTasks + +The least privileged roles for this operation, from least to most privileged, are: + +- Directory Readers +- Global Reader +- Privileged Role Administrator + +## Examples + +### Example 1: Get role assignments + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments in Microsoft Entra ID. + +### Example 2: Get role assignments using 'All' parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -All +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets all the role assignments in Microsoft Entra ID. + +### Example 3: Get role assignments by Id + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId '00001111-aaaa-2222-bbbb-3333cccc4444' +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments using specified roleAssignment Id. + +- `UnifiedRoleAssignmentId` parameter specifies the roleAssignment object ID. + +### Example 4: Get role assignments filter by principalId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Filter "principalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments containing the specified principalId. + +### Example 5: Get role assignments filter by roleDefinitionId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Filter "roleDefinitionId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments containing the specified roleDefinitionId. + +### Example 6: Get top two role assignments + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Top 2 +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets top two role assignments. + +## Parameters + +### -UnifiedRoleAssignmentId + +The unique identifier of a Microsoft Entra ID roleAssignment object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment + +## Notes + +`Get-EntraRoleAssignment` is an alias for `Get-EntraDirectoryRoleAssignment`. + +## Related Links + +[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) + +[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..7fcd4cd5a8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md @@ -0,0 +1,273 @@ +--- +title: Get-EntraDirectoryRoleDefinition +description: This article provides details on the Get-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleDefinition + +## Synopsis + +Gets information about role definitions in Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRoleDefinition + [-All] + [-Top ] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraDirectoryRoleDefinition + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleDefinition` cmdlet gets information about role definitions in Microsoft Entra ID. To get a role definition, specify the `UnifiedRoleDefinitionId` parameter. Specify the `SearchString` or `Filter` parameter to find particular role definition. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: + +- microsoft.directory/roleAssignments/standard/read (least privileged) +- microsoft.directory/roleAssignments/allProperties/read +- microsoft.directory/roleAssignments/allProperties/allTasks + +The least privileged roles for this operation, from least to most privileged, are: + +- Directory Readers +- Global Reader +- Privileged Role Administrator + +## Examples + +### Example 1: Get all role definitions + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Guest User 10dae51f-b6af-4016-8d66-8c2a99b929b3 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command returns all the role definitions present. + +### Example 2: Get a role definition by UnifiedRoleDefinitionId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId '1a327991-10cb-4266-877a-998fb4df78ec' +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command returns a specified role definition. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. + +### Example 3: Filter role definitions by display name + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -Filter "startsWith(displayName, 'Restricted')" +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command return all the role definitions containing the specified display name. + +### Example 4: Get top two role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -Top 2 +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +Restricted Guest User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. True True +``` + +This command return top two the role definitions in Microsoft Entra DirectoryRoleId. + +### Example 5: Filter role definitions by display name + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -SearchString 'Global' + ``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +Global Administrator 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identit… +Global Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff f2ef992c-3afb-46b9-b7cf-a126ee74c451 Can read everything that a Global Administrator can, but not update anything. +``` + +This command return all the role definitions containing the specified display name. + +## Parameters + +### -UnifiedRoleDefinitionId + +Specifies the UnifiedRoleDefinitionId of the role definition. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records that this cmdlet gets. The default value is 100. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter string to match a set of role definitions. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +`Get-EntraRoleDefinition` is an alias for `Get-EntraDirectoryRoleDefintion`. + +## Related Links + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) + +[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..aae90daa6d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md @@ -0,0 +1,136 @@ +--- +title: New-EntraDirectoryRoleAssignment +description: This article provides details on the New-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraDirectoryRoleAssignment + +## Synopsis + +Create a new Microsoft Entra ID roleAssignment. + +## Syntax + +```powershell +New-EntraDirectoryRoleAssignment + -PrincipalId + -RoleDefinitionId + [-DirectoryScopeId ] + [] +``` + +## Description + +The `New-EntraDirectoryRoleAssignment` cmdlet creates a new Microsoft Entra role assignment. + +## Examples + +### Example 1: Create a new Microsoft Entra ID role assignment + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' +$params = @{ + RoleDefinitionId = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + PrincipalId = 'aaaaaaaa-bbbb-cccc-1111-222222222222' + DirectoryScopeId = '/' + } + +New-EntraDirectoryRoleAssignment @params +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command creates a new role assignment in Microsoft Entra ID. + +- `-RoleDefinitionId` parameter specifies the ID of the role definition that you want to assign. Role definitions describe the permissions that are granted to users or groups by the role. This is the Identifier of the `unifiedRoleDefinition` the assignment is for. + +- `-PrincipalId` parameter specifies the ID of the principal (user, group, or service principal) to whom the role is being assigned. + +- `-DirectoryScopeId` parameter specifies the scope of the directory over which the role assignment is effective. The '/' value typically represents the root scope, meaning the role assignment is applicable across the entire directory. + +## Parameters + +### -DirectoryScopeId + +Specifies the scope for the role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies the principal for role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleDefinitionId + +Specifies the role definition for role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment + +## Notes + +`New-EntraRoleAssignment` is an alias for `New-EntraDirectoryRoleAssignment`. + +## Related Links + +[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) + +[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d55868d7d6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md @@ -0,0 +1,330 @@ +--- +title: New-EntraDirectoryRoleDefinition +description: This article provides details on the New-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# New-EntraDirectoryRoleDefinition + +## Synopsis + +Create a new Microsoft Entra ID roleDefinition. + +## Syntax + +```powershell +New-EntraDirectoryRoleDefinition + [-TemplateId ] + -DisplayName + -RolePermissions + [-Description ] + [-Version ] + -IsEnabled + [-ResourceScopes ] + [] +``` + +## Description + +Create a new Microsoft Entra ID roleDefinition object. + +## Examples + +### Example 1: Creates a new role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output + +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 93ff7659-04bd-4d97-8add-b6c992cce98e False False + +``` + +This command creates a new role definition in Microsoft Entra ID. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. + +### Example 2: Creates a new role definition with Description parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + Description = 'Role Definition demo' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output + +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 e14cb8e2-d696-4756-bd7f-c7df25271f3d Role Definition demo False False + +``` + +This command creates a new role definition with Description parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Description` parameter specifies the description for the role definition. + +### Example 3: Creates a new role definition with ResourceScopes parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + ResourceScopes = '/' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 2bc29892-ca2e-457e-b7c0-03257a0bcd0c False False + +``` + +This command creates a new role definition with ResourceScopes parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-ResourceScopes` parameter specifies the resource scopes for the role definition. + +### Example 4: Creates a new role definition with TemplateId parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + TemplateId = '4dd5aa9c-cf4d-4895-a993-740d342802b9' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 4dd5aa9c-cf4d-4895-a993-740d342802b9 False False + +``` + +This command creates a new role definition with TemplateId parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-TemplateId` parameter specifies the template ID for the role definition. + +### Example 5: Creates a new role definition with Version parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + Version = '2' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 b69d16e9-b3f9-4289-a87f-8f796bd9fa28 False False + +``` + +This command creates a new role definition with Version parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Version` parameter specifies the version for the role definition. + +## Parameters + +### -Description + +Specifies a description for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role isn't available for assignment. Read-only when `isBuiltIn` is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceScopes + +Specifies the resource scopes for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolePermissions + +Specifies permissions for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateId + +Specifies the template ID for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version + +Specifies version for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition + +## Notes + +`New-EntraRoleDefinition` is an alias for `New-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..ba9841b7cd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraDirectoryRoleAssignment +description: This article provides details on the Remove-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleAssignment + +## Synopsis + +Delete a Microsoft Entra ID roleAssignment. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleAssignment + -UnifiedRoleAssignmentId + [] +``` + +## Description + +The `Remove-EntraDirectoryRoleAssignment` cmdlet removes a role assignment from Microsoft Entra ID. + +## Examples + +### Example 1: Remove a role assignment + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' +Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId Y1vFBcN4i0e3ngdNDocmngJAWGnAbFVAnJQyBBLv1lM-1 +``` + +This example removes the specified role assignment from Microsoft Entra ID. + +- `-Id` parameter specifies the role assignment ID. + +## Parameters + +### -UnifiedRoleAssignmentId + +The unique identifier of an object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Remove-EntraRoleAssignment` is an alias for `Remove-EntraDirectoryRoleAssignment`. + +## Related Links + +[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) + +[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d80058e54d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md @@ -0,0 +1,93 @@ +--- +title: Remove-EntraDirectoryRoleDefinition +description: This article provides details on the Remove-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleDefinition + +## Synopsis + +Delete a Microsoft Entra ID Directory roleDefinition object. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [] +``` + +## Description + +Delete a Microsoft Entra ID Directory roleDefinition object by ID. + +You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. + +## Examples + +### Example 1: Remove a specified role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 +``` + +This example demonstrates how to remove the specified role definition from Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. + +## Parameters + +### -UnifiedRoleDefinitionId + +The unique identifier of an object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Remove-EntraRoleDefinition` is an alias for `Remove-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d00e0c6818 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md @@ -0,0 +1,267 @@ +--- +title: Set-EntraDirectoryRoleDefinition +description: This article provides details on the Set-EntraDirectoryRoleDefinition command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Set-EntraDirectoryRoleDefinition + +## Synopsis + +Update an existing Microsoft Entra ID roleDefinition. + +## Syntax + +```powershell +Set-EntraDirectoryRoleDefinition + [-TemplateId ] + [-DisplayName ] + [-RolePermissions ] + -UnifiedRoleDefinitionId + [-Description ] + [-Version ] + [-IsEnabled ] + [-ResourceScopes ] + [] +``` + +## Description + +Updates a Microsoft Entra roleDefinition object identified by ID. You can't update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. + +## Examples + +### Example 1: Update an roleDefinition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -DisplayName 'UpdatedDisplayName' +``` + +This example updates the specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-DisplayName` parameter specifies the display name for the role definition. + +### Example 2: Update an roleDefinition with Description + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -Description 'MYROLEUPDATE1S' +``` + +This example updates the Description of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-Description` parameter specifies the description for the role definition. + +### Example 3: Update an roleDefinition with IsEnabled + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -IsEnabled $true +``` + +This example updates the IsEnabled of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-IsEnabled` parameter specifies whether the role definition is enabled. + +### Example 4: Update an roleDefinition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/standard/read") +$params = @{ + UnifiedRoleDefinitionId = $roleDefinition.Id + Description = 'Update' + DisplayName = 'Update' + ResourceScopes = '/' + IsEnabled = $false + RolePermissions = $RolePermissions + TemplateId = '54d418b2-4cc0-47ee-9b39-e8f84ed8e073' + Version = 2 +} + +Set-EntraDirectoryRoleDefinition @params +``` + +This example updates the RolePermissions, TemplateId, TemplateId, ResourceScopes of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Description` parameter specifies the description for the role definition. +- `-ResourceScopes` parameter specifies the resource scopes for the role definition. +- `-TemplateId` parameter specifies the template ID for the role definition. +- `-Version` parameter specifies the version for the role definition. + +## Parameters + +### -UnifiedRoleDefinitionId + +Specifies the roleDefinition object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Description + +Specifies a description for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role is not available for assignment. Read-only when `isBuiltIn` is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceScopes + +Specifies the resource scopes for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolePermissions + +Specifies permissions for the role definition. List of permissions included in the role. Read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateId + +Specifies the template ID for the role definition. A custom template ID can be set when `isBuiltIn` is `false`. This ID is typically used to keep the same identifier across different directories. It is read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version + +Specifies version for the role definition. Indicates version of the role definition. Read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Set-EntraRoleDefinition` is an alias for `Set-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md new file mode 100644 index 0000000000..cca67243d0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md @@ -0,0 +1,102 @@ +--- +title: Add-EntraGroupMember +description: This article explains the Add-EntraGroupMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupMember + +schema: 2.0.0 +--- + +# Add-EntraGroupMember + +## Synopsis + +Adds a member to a group. + +## Syntax + +```powershell +Add-EntraGroupMember + -GroupId + -RefObjectId + [] +``` + +## Description + +The Add-EntraGroupMember cmdlet adds a member to a group. + +## Examples + +### Example 1: Add a member to a group + +```powershell +Connect-Entra -Scopes 'GroupMember.ReadWrite.All' +$params = @{ + GroupId = 'dddddddd-2222-3333-5555-rrrrrrrrrrrr' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} + +Add-EntraGroupMember @params +``` + +This example demonstrates how to add a member to a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object that is assigned as an owner, manager, or member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupMember](Get-EntraGroupMember.md) + +[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md new file mode 100644 index 0000000000..2e74ae568b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md @@ -0,0 +1,108 @@ +--- +title: Add-EntraGroupOwner +description: This article explains the Add-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupOwner + +schema: 2.0.0 +--- + +# Add-EntraGroupOwner + +## Synopsis + +Adds an owner to a group. + +## Syntax + +```powershell +Add-EntraGroupOwner + -GroupId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraGroupOwner` cmdlet adds an owner to a Microsoft Entra ID group. Specify the `GroupId` and `RefObjectId` parameters to add an owner to a group. + +`-GroupId` - specifies the unique identifier (Object ID) of the group to which you want to add an owner. + +`-RefObjectId` - specifies the unique identifier (Object ID) of the owner to be added to the group. + +## Examples + +### Example 1: Add an owner to a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + GroupId = $group.ObjectId + RefObjectId = $user.ObjectId +} + +Add-EntraGroupOwner @params +``` + +This example demonstrates how to add an owner to a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object that will be assigned as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupOwner](Get-EntraGroupOwner.md) + +[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..df79fef7d9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md @@ -0,0 +1,111 @@ +--- +title: Add-EntraLifecyclePolicyGroup +description: This article provides details on the Add-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Add-EntraLifecyclePolicyGroup + +## Synopsis + +Adds a group to a lifecycle policy. + +## Syntax + +```powershell +Add-EntraLifecyclePolicyGroup + -GroupId + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Add-EntraLifecyclePolicyGroup` cmdlet adds a group to a lifecycle policy in Microsoft Entra ID. + +## Examples + +### Example 1: Add a group to the lifecycle policy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" +$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 +$params = @{ + GroupLifecyclePolicyId = $policy.Id + groupId = $group.ObjectId +} +Add-EntraLifecyclePolicyGroup @params +``` + +This example adds a group to the lifecycle policy. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy add to the group. +- `-GroupId` parameter specifies the ID of the group add to the Lifecycle Policy. + +## Parameters + +### -GroupId + +Specifies the ID of an Office365 group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of the lifecycle policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) + +[Remove-EntraLifecyclePolicyGroup](Remove-EntraLifecyclePolicyGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md new file mode 100644 index 0000000000..f85a857377 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md @@ -0,0 +1,293 @@ +--- +title: Get-EntraDeletedGroup +description: This article provides details on the Get-EntraDeletedGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedGroup + +schema: 2.0.0 +--- + +# Get-EntraDeletedGroup + +## Synopsis + +This cmdlet is used to retrieve the soft deleted groups in a Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDeletedGroup + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDeletedGroup + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDeletedGroup + -GroupId + [-All] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaDeletedGroup + [-All] + [-SearchString ] + [-Property ] + [] +``` + +## Description + +This cmdlet retrieves soft-deleted groups from a directory. When a group is deleted, it is soft deleted and can be recovered within 30 days. After 30 days, the group is permanently deleted and cannot be recovered. + +Please note that soft delete currently applies only to Unified Groups (also known as Office 365 Groups). + +## Examples + +### Example 1: Get deleted groups in the directory + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves all recoverable deleted groups in the Microsoft Entra ID. + +### Example 2: Get deleted groups in the directory using All parameter + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -All +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves all recoverable deleted groups in the directory, using All parameter. + +### Example 3: Get top two deleted groups + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -Top 2 +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +``` + +This cmdlet retrieves top two deleted groups in the directory. + +### Example 4: Get deleted groups containing string 'test2' + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -SearchString 'test2' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves deleted groups in the directory, containing the specified string. + +### Example 5: Get deleted groups filter by display name + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -Filter "displayName eq 'test21'" +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +``` + +This cmdlet retrieves deleted groups in the directory, having the specified display name. + +### Example 6: Get deleted group by GroupId + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -GroupId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +``` + +This cmdlet retrieves the deleted group specified by GroupId. + +- `-GroupId` parameter specifies the deleted group GroupId. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +The GroupId of the deleted group to be retrieved. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md new file mode 100644 index 0000000000..62d509e6c3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md @@ -0,0 +1,309 @@ +--- +title: Get-EntraGroup +description: This article explains the Get-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroup + +schema: 2.0.0 +--- + +# Get-EntraGroup + +## Synopsis + +Gets a group. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraGroup + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraGroup + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraGroup + -GroupId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroup` cmdlet gets a group in Microsoft Entra ID. Specify the `ObjectId` parameter to get a specific group. + +## Examples + +### Example 1: Get all groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup +``` + +```Output +DisplayName Id MailNickname Description +----------- -- ------------ ----------- +SimpleTestGrp aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NickName +SimpleGroup bbbbbbbb-1111-2222-3333-cccccccccccc NickName +testGroupInAU10 cccccccc-2222-3333-4444-dddddddddddd testGroupInAU10 testGroupInAU10 +My new group dddddddd-3333-4444-5555-eeeeeeeeeeee NotSet New created group +SimpleGroup eeeeeeee-4444-5555-6666-ffffffffffff NickName +``` + +This example demonstrates how to get all groups from Microsoft Entra ID. + +### Example 2: Get a specific group by using an GroupId + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -GroupId 'pppppppp-4444-0000-8888-yyyyyyyyyyyy' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneaglegroup Crimson Eagle Group {Unified} +``` + +This example demonstrates how to retrieve specific group by providing ID. + +### Example 3: Get top five groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -Top 5 +``` + +```Output +DisplayName Id MailNickname Description +----------- -- ------------ ----------- +Contoso Group hhhhhhhh-3333-5555-3333-qqqqqqqqqqqq contosogroup Contoso Group +Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneagle Crimson Eagle Group +Bold Falcon tttttttt-0000-3333-9999-mmmmmmmmmmmm boldfalcon Bold Falcon Group +Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda +Misty Fox kkkkkkkk-3333-5555-1111-nnnnnnnnnnnn mistyfox Misty Fox Group +``` + +This example demonstrates how to get top five groups. + +### Example 4: Get a group by DisplayName + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -Filter "DisplayName eq 'Azure Panda'" +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda {Unified} +``` + +In this example, we retrieve group using the Display Name. + +### Example 5: Get groups that contain a search string + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -SearchString 'New' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +New Sparkling Deer bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq newsparklingdeer New Sparkling Deer Group {Unified} +New Golden Fox xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb newgoldenfox New Golden Fox {DynamicMembership} +``` + +This example demonstrates how to retrieve groups that include the text new in their display names from Microsoft Entra ID. + +### Example 6: Listing ownerless groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$allGroups = Get-EntraGroup -All +$groupsWithoutOwners = foreach ($group in $allGroups) { + $owners = Get-EntraGroupOwner -ObjectId $group.Id + if ($owners.Count -eq 0) { + $group + } +} +$groupsWithoutOwners | Format-Table DisplayName, Id, GroupTypes +``` + +```Output +DisplayName Id GroupTypes +----------- -- ---------- +My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} +HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} +``` + +This example demonstrates how to retrieve groups without owners. By identifying ownerless groups, IT admins can improve overall governance and operational efficiency. + +### Example 7: Listing empty groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$allGroups = Get-EntraGroup -All +$groupsWithoutMembers = foreach ($group in $allGroups) { + $members = Get-EntraGroupMember -ObjectId $group.Id + if ($members.Count -eq 0) { + $group + } +} +$groupsWithoutMembers | Format-Table DisplayName, Id, GroupTypes +``` + +```Output +DisplayName Id GroupTypes +----------- -- ---------- +My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} +HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} +``` + +This example demonstrates how to retrieve groups without members. By identifying memberless groups, IT admins can identify and clean up unused or obsolete groups that no longer serve a purpose. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +The unique identifier of a group in Microsoft Entra ID (GroupId) + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraGroup](New-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..724b696cec --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md @@ -0,0 +1,181 @@ +--- +title: Get-EntraGroupAppRoleAssignment +description: This article provides details on the Get-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraGroupAppRoleAssignment + +## Synopsis + +Gets a group application role assignment. + +## Syntax + +```powershell +Get-EntraGroupAppRoleAssignment + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupAppRoleAssignment` cmdlet gets a group application role assignment in Microsoft Entra ID. Specify the `GroupId` parameter to get a group application role assignment. + +## Examples + +### Example 1: Retrieve application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$GroupId = (Get-EntraGroup -Top 1).ObjectId +Get-EntraGroupAppRoleAssignment -GroupId $GroupId +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR +``` + +This example retrieves the application role assignments of a group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +### Example 2: Retrieve all application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -All +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR +``` + +This example retrieves all application role assignments of the specified group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +### Example 3: Retrieve top two application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -Top 2 +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +``` + +This example retrieves top two application role assignments of the specified group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) + +[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..9df4ac2bb7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md @@ -0,0 +1,134 @@ +--- +title: Get-EntraGroupLifecyclePolicy +description: This article provides details on the Get-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Get-EntraGroupLifecyclePolicy + +## Synopsis + +Retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. +If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraGroupLifecyclePolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupLifecyclePolicy` command retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. Specify the `-GroupLifecyclePolicyId` parameter to get the group lifecycle policy. +If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. + +## Examples + +### Example 1: Retrieve all groupLifecyclePolicies + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupLifecyclePolicy +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +eeeeeeee-4444-5555-6666-ffffffffffff example@contoso.com 200 Selected +``` + +This example demonstrates how to retrieve the properties and relationships of all groupLifecyclePolicies in Microsoft Entra ID. + +### Example 2: Retrieve properties of an groupLifecyclePolicy + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 Selected +``` + +This command is used to retrieve a specific Microsoft Group Lifecycle Policy. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +## Parameters + +### -GroupLifecyclePolicyId + +Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md new file mode 100644 index 0000000000..bdd0673a08 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md @@ -0,0 +1,214 @@ +--- +title: Get-EntraGroupMember +description: This article provides details on the Get-EntraGroupMember command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupMember + +schema: 2.0.0 +--- + +# Get-EntraGroupMember + +## Synopsis + +Gets a member of a group. + +## Syntax + +```powershell +Get-EntraGroupMember + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupMember` cmdlet gets a member of a group in Microsoft Entra ID. Specify the `GroupId` parameter to get a member of a group. + +In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: `microsoft.directory/groups/members/read`, `microsoft.directory/groups/members/limitedRead`, or `microsoft.directory/groups/hiddenMembers/read` (for hidden members). The following least privileged roles support this operation: + +- Group owners +- "Member" users +- "Guest" users (with limited read permissions) +- Directory Readers +- Directory Writers +- Groups Administrator +- User Administrator (includes hidden members) +- Exchange Administrator (includes hidden members) +- SharePoint Administrator (includes hidden members) +- Intune Administrator (includes hidden members) +- Teams Administrator (includes hidden members) +- Yammer Administrator (includes hidden members) + +To list members of a hidden group, the `Member.Read.Hidden` permission is also required. + +## Examples + +### Example 1: Get a group member by ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This example demonstrates how to retrieve group member by ID. + +- `-GroupId` Specifies the ID of a group. + +### Example 2: Get two group member + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'hhhhhhhh-8888-9999-8888-cccccccccccc' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This example demonstrates how to retrieve top two groups from Microsoft Entra ID. + +- `-GroupId` specifies the ID of a group. + +### Example 3: Get all members within a group by group ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +cccccccc-8888-9999-0000-dddddddddddd +``` + +This example retrieves all members within a group by group ID. + +- `-GroupId` specifies the ID of a group. + +### Example 4: Retrieve and Select Group Member Properties + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' | Select-Object DisplayName, '@odata.type' +``` + +```Output +displayName @odata.type +----------- ----------- +test1 #microsoft.graph.user +test2 #microsoft.graph.user +test2 #microsoft.graph.servicePrincipal +test3 #microsoft.graph.servicePrincipal +``` + +This example retrieves the members of a specified group by its `GroupId` and selects only the `DisplayName` and `@odata.type` properties for each member. + +- `-GroupId` specifies the ID of a group. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupMember](Add-EntraGroupMember.md) + +[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md new file mode 100644 index 0000000000..340e3463a9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md @@ -0,0 +1,189 @@ +--- +title: Get-EntraGroupOwner +description: This article provides details on the Get-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupOwner + +schema: 2.0.0 +--- + +# Get-EntraGroupOwner + +## Synopsis + +Gets an owner of a group. + +## Syntax + +```powershell +Get-EntraGroupOwner + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupOwner` cmdlet gets an owner of a group in Microsoft Entra ID. Specify `GroupId` parameter gets an owner of a group. + +In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with the `microsoft.directory/groups/owners/read` permission. The following least privileged roles support this operation: + +- Group owners +- Directory Readers +- Directory Writers +- Groups Administrator +- User Administrator + +## Examples + +### Example 1: Get a group owner by ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'vvvvvvvv-7777-9999-7777-jjjjjjjjjjjj' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve the owner of a specific group. + +- `-GroupId` Parameter specifies the ID of a group. + +### Example 2: Gets all group owners + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'zzzzzzzz-6666-8888-9999-pppppppppppp' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve the all owner of a specific group. + +- `-GroupId` Parameter specifies the ID of a group. + +### Example 3: Gets two group owners + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve the top two owners of a specific group. + +- `-GroupId` parameter specifies the ID of a group. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupOwner](Add-EntraGroupOwner.md) + +[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md new file mode 100644 index 0000000000..51986bf57f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraGroupPermissionGrant +description: This article provides details on the Get-EntraGroupPermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraGroupPermissionGrant + +## Synopsis + +Retrieves a list of permission grants consented to for a group. + +## Syntax + +```powershell +Get-EntraGroupPermissionGrant + -GroupId + [-Property ] + [] +``` + +## Description + +Retrieves a list of permission grants consented to for a group. + +## Examples + +### Example 1: List existing permission grants for the group + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupPermissionGrant -GroupId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' +``` + +```Output + Id : CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3 + ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 + ClientAppId : 44445555-eeee-6666-ffff-7777aaaa8888 + ResourceAppId : bbbb1111-cc22-3333-44dd-555555eeeeee + PermissionType : Application + Permission : Member.Read.Group +``` + +This cmdlet list existing permission grants for the specified group. + +## Parameters + +### -GroupId + +The unique identifier of group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.GetMSGroupPermissionGrantsResponse + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..1555496573 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md @@ -0,0 +1,105 @@ +--- +title: Get-EntraLifecyclePolicyGroup +description: This article provides details on the Get-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Get-EntraLifecyclePolicyGroup + +## Synopsis + +Retrieves the lifecycle policy object to which a group belongs. + +## Syntax + +```powershell +Get-EntraLifecyclePolicyGroup + -GroupId + [-Property ] + [] +``` + +## Description + +The `Get-EntraLifecyclePolicyGroup` retrieves the lifecycle policy object to which a group belongs. Specify the `-GroupId` parameter to get the lifecycle policy object to which a group belongs. + +## Examples + +### Example 1: Retrieve lifecycle policy object + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraLifecyclePolicyGroup -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +bbbbbbbb-1111-2222-3333-cccccccccccc admingroup@contoso.com 200 All +``` + +This example demonstrates how to retrieve lifecycle policy object by Id in Microsoft Entra ID. + +- `-GroupId` - specifies the ID of a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md new file mode 100644 index 0000000000..3973de997e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md @@ -0,0 +1,252 @@ +--- +title: Get-EntraObjectSetting +description: This article provides details on the Get-EntraObjectSetting command. + + +ms.topic: reference +ms.date: 07/03/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectSetting +schema: 2.0.0 +--- + +# Get-EntraObjectSetting + +## Synopsis + +Gets an object setting. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraObjectSetting + [-Top ] + [-All] + -TargetType + -TargetObjectId + [] +``` + +### GetById + +```powershell +Get-EntraObjectSetting + -Id [-All] + -TargetType + -TargetObjectId + [] +``` + +## Description + +The `Get-EntraObjectSetting` cmdlet retrieves an object setting from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +### Example 2: Retrieve a specific object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' + Id ='aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Get-EntraObjectSetting @params +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves Specific object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. +- `-Id` Parameter specifies the ID of a settings object. + +### Example 3: Retrieve top one object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params -Top 1 +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves top one object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +### Example 4: Retrieve all object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params -All +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves all records of object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a settings object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjectId + +Specifies the ID of the target object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetType + +Specifies the target type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md new file mode 100644 index 0000000000..22a87355e6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md @@ -0,0 +1,346 @@ +--- +title: New-EntraGroup +description: This article provides details on the New-EntraGroup command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroup + +schema: 2.0.0 +--- + +# New-EntraGroup + +## Synopsis + +Creates a Microsoft Entra ID group. + +## Syntax + +```powershell +New-EntraGroup + -DisplayName + [-GroupTypes ] + -SecurityEnabled + [-Description ] + -MailEnabled + -MailNickname + [-Visibility ] + [-IsAssignableToRole ] + [] +``` + +## Description + +The `New-EntraGroup` cmdlet creates a Microsoft Entra ID group. Specify the `DisplayName`, `MailNickname`, `MailEnabled` and `SecurityEnabled` parameters for creating a Microsoft Entra ID group. + +For information about creating dynamic groups, see: [Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership). + +**Notes on permissions:** + +- To create the group with users as owners or members, the app must have at least the `User.Read.All` permission. +- To create the group with other service principals as owners or members, the app must have at least the `Application.Read.All` permission. +- To create the group with either users or service principals as owners or members, the app must have at least the `Directory.Read.All` permission. + +## Examples + +### Example 1: Create a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq helpDeskAdminGroup {} +``` + +This example demonstrates how to create the new group. + +### Example 2: Create a group with Description parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group' + MailEnabled = $false + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $true + Description = 'Group assignable to role' +} + +New-EntraGroup @params +``` + +```Output + +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group zzzzzzzz-6666-8888-9999-pppppppppppp helpDeskAdminGroup Group assignable to role {} + +``` + +This example demonstrates how to create the new group with description parameter. + +### Example 3: Create a group with IsAssignableToRole parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + Description = 'Group assignable to role' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + IsAssignableToRole = $True +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj helpDeskAdminGroup Group assignable to role {} +``` + +This example demonstrates how to create the new group with IsAssignableToRole parameter. + +### Example 4: Create a group with Visibility parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + Description = 'Group assignable to role' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + Visibility = 'Private' +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 gggggggg-0000-4444-3333-llllllllllll helpDeskAdminGroup Group assignable to role {} +``` + +This example demonstrates how to create the new group with Visibility parameter. + +### Example 5: Create a group with GroupTypes parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group3' + Description = 'group des' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup1' + SecurityEnabled = $True + GroupTypes = 'Unified' +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group3 xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb helpDeskAdminGroup1 group des {Unified} +``` + +This example demonstrates how to create the new group with GroupTypes parameter. + +## Parameters + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailEnabled + +Specifies whether this group is mail enabled. + +Currently, you can't create mail enabled groups in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. +If MailEnabled is $False, you must still specify a mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Specifies whether the group is security enabled. +For security groups, this value must be $True. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a unified or dynamic group. + +Notes: + +- This parameter currently can't be used to create dynamic groups. To create a dynamic group in PowerShell, you must use the Entra module. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +This parameter determines the visibility of the group's content and members list. + +This parameter can take one of the following values: + +- "Public" - Anyone can view the contents of the group +- "Private" - Only members can view the content of the group +- "HiddenMembership" - Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value is "Public". + +Notes: + +- This parameter is only valid for groups that have the groupType set to "Unified". +- If a group has this attribute set to "HiddenMembership", it can't be changed later. +- Anyone can join a group that has this attribute set to "Public". If the attribute is set to Private or HiddenMembership, only owners can add new members to the group and requests to join the group need approval of the owners. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +Indicates whether group can be assigned to a role. This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) + +[Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..d70bac714b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md @@ -0,0 +1,151 @@ +--- +title: New-EntraGroupAppRoleAssignment +description: This article provides details on the New-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraGroupAppRoleAssignment + +## Synopsis + +Assign a group of users to an application role. + +## Syntax + +```powershell +New-EntraGroupAppRoleAssignment + -GroupId + -PrincipalId + -AppRoleId + -ResourceId + [] +``` + +## Description + +The `New-EntraGroupAppRoleAssignment` cmdlet assigns a group of users to an application role in Microsoft Entra ID. + +## Examples + +### Example 1: Assign a group of users to an application + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$appname = 'Box' +$spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" +$group = Get-EntraGroup -SearchString 'Contoso Team' +New-EntraGroupAppRoleAssignment -GroupId $group.ObjectId -PrincipalId $group.ObjectId -ResourceId $spo.ObjectId -AppRoleId $spo.Approles[1].id +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + AaBbCcDdEeFfGgHhIiJjKkLlMmNnOo1 00000000-0000-0000-0000-000000000000 3/13/2024 4:41:43 AM Contoso Team aaaaaaaa-bbbb-cccc-1111-222222222222 +3/13/2024 4:45:00 AM BbCcDdEeFfGgHhIiJjKkLlMmNnOoPp2 00000000-0000-0000-0000-000000000000 3/13/2024 4:45:00 AM Finance Group bbbbbbbb-cccc-dddd-2222-333333333333 +``` + +This example demonstrates how to assign a group of users to an application role in Microsoft Entra ID. + +- `GroupId`: The ID of the group to which you're assigning the app role. + +- `PrincipalId`: The ID of the group to which you're assigning the app role. + +- `ResourceId`: The ID of the resource service Principal, which has defined the app role. + +- `AppRoleId`: The ID of the appRole (defined on the resource service principal) to assign to the group. + +## Parameters + +### -AppRoleId + +Specifies the ID of the app role (defined on the resource service principal) to assign. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies the principal ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The unique identifier (ID) for the resource service principal for which the assignment is made. +Required on create. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) + +[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..78e3bb4b9f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md @@ -0,0 +1,138 @@ +--- +title: New-EntraGroupLifecyclePolicy +description: This article provides details on the New-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# New-EntraGroupLifecyclePolicy + +## Synopsis + +Creates a new groupLifecyclePolicy. + +## Syntax + +```powershell +New-EntraGroupLifecyclePolicy + -ManagedGroupTypes + -GroupLifetimeInDays + -AlternateNotificationEmails + [] +``` + +## Description + +Creates a new groupLifecyclePolicy in Microsoft Entra ID. + +## Examples + +### Example 1: Creates a new groupLifecyclePolicy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$Params = @{ + GroupLifetimeInDays = 99 + ManagedGroupTypes = 'Selected' + AlternateNotificationEmails = 'example@contoso.com' +} +New-EntraGroupLifecyclePolicy @params +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb example@contoso.com 99 Selected +``` + +This example creates a new groupLifecyclePolicy with a group lifetime of 99 days for a selected set of Office 365 groups. Renewal notification emails are sent to for groups without owners. + +- `-GroupLifetimeInDays` parameter specifies the number of days a group can exist before it needs to be renewed. +- `-ManagedGroupTypes` parameter allows the admin to select which office 365 groups the policy applies to. +- `-AlternateNotificationEmails` parameter specifies notification emails for group. + +## Parameters + +### -AlternateNotificationEmails + +Notification emails for groups without owners are sent to these email addresses, separated by a ';'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifetimeInDays + +The number of days a group can exist before it needs to be renewed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedGroupTypes + +This parameter allows the admin to select which Office 365 groups the policy applies to. +'None' creates the policy in a disabled state. +'All' applies the policy to every Office 365 group in the tenant. +'Selected' allows the admin to choose specific Office 365 groups to which the policy applies. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) + +[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md new file mode 100644 index 0000000000..ae746e39ed --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md @@ -0,0 +1,93 @@ +--- +title: Remove-EntraGroup +description: This article provides details on the Remove-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroup + +schema: 2.0.0 +--- + +# Remove-EntraGroup + +## Synopsis + +Removes a group. + +## Syntax + +```powershell +Remove-EntraGroup + -GroupId + [] +``` + +## Description + +The `Remove-EntraGroup` cmdlet removes a group from Microsoft Entra ID. Specify the `GroupId` parameter removes a group. + +Unified Group can be restored withing 30 days after deletion using the `Restore-EntraBetaDeletedDirectoryObject` cmdlet. Security groups can't be restored after deletion. + +**Notes on permissions:** + +The following conditions apply for apps to delete role-assignable groups: + +- For delegated scenarios, the app must be assigned the `RoleManagement.ReadWrite.Directory` delegated permission, and the calling user must be the creator of the group or be assigned at least the Privileged Role Administrator Microsoft Entra role. +- For app-only scenarios, the calling app must be the owner of the group or be assigned the `RoleManagement.ReadWrite.Directory` application permission or be assigned at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Remove a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroup -GroupId $group.Id +``` + +This example demonstrates how to remove a group in Microsoft Entra ID. + +- `GroupId` parameter specifies the group ID . + +## Parameters + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroup](New-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..c5306735b7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md @@ -0,0 +1,99 @@ +--- +title: Remove-EntraGroupAppRoleAssignment +description: This article provides details on the Remove-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraGroupAppRoleAssignment + +## Synopsis + +Delete a group application role assignment. + +## Syntax + +```powershell +Remove-EntraGroupAppRoleAssignment + -AppRoleAssignmentId + -GroupId +[] +``` + +## Description + +The `Remove-EntraGroupAppRoleAssignment` cmdlet removes a group application role assignment from Microsoft Entra ID. + +## Examples + +### Example 1: Remove group app role assignment + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupAppRoleAssignment -GroupId $group.Id -AppRoleAssignmentId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' +``` + +This example demonstrates how to remove the specified group application role assignment. +GroupId - Specifies the object ID of a group. +AppRoleAssignmentId - Specifies the object ID of the group application role assignment. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the object ID of the group application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) + +[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..d60bc7953d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraGroupLifecyclePolicy +description: This article provides details on the Remove-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Remove-EntraGroupLifecyclePolicy + +## Synopsis + +Deletes a groupLifecyclePolicies object + +## Syntax + +```powershell +Remove-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Remove-EntraGroupLifecyclePolicy` command deletes a groupLifecyclePolicies object in Microsoft Entra ID. Specify `Id` parameter deletes the groupLifecyclePolicies object. + +## Examples + +### Example 1: Remove a groupLifecyclePolicies + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' +``` + +This example demonstrates how to delete the groupLifecyclePolicies object that has the specified ID. You can use `Get-EntraGroupLifecyclePolicy` to get Id details. + +## Parameters + +### -GroupLifecyclePolicyId + +Specifies the ID of the groupLifecyclePolicies object that this cmdlet removes. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) + +[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md new file mode 100644 index 0000000000..ca01328299 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md @@ -0,0 +1,102 @@ +--- +title: Remove-EntraGroupMember +description: This article provides details on the Remove-EntraGroupMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupMember + +schema: 2.0.0 +--- + +# Remove-EntraGroupMember + +## Synopsis + +Removes a member from a group. + +## Syntax + +```powershell +Remove-EntraGroupMember + -GroupId + -MemberId + [] +``` + +## Description + +The `Remove-EntraGroupMember` cmdlet removes a member from a group in Microsoft Entra ID. Specify the `ObjectId` and `MemberId` parameters to remove a member from a group. + +## Examples + +### Example 1: Remove a member + +```powershell +Connect-Entra -Scopes 'GroupMember.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupMember -GroupId $group.Id -MemberId 'zzzzzzzz-6666-8888-9999-pppppppppppp' +``` + +This command removes the specified member from the specified group. + +GroupId - Specifies the object ID of a group in Microsoft Entra ID. + +MemberId - Specifies the ID of the member to remove. + +## Parameters + +### -MemberId + +Specifies the ID of the member to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupMember](Add-EntraGroupMember.md) + +[Get-EntraGroupMember](Get-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md new file mode 100644 index 0000000000..759c736651 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md @@ -0,0 +1,101 @@ +--- +title: Remove-EntraGroupOwner +description: This article provides details on the Remove-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupOwner + +schema: 2.0.0 +--- + +# Remove-EntraGroupOwner + +## Synopsis + +Removes an owner from a group. + +## Syntax + +```powershell +Remove-EntraGroupOwner + -OwnerId + -GroupId + [] +``` + +## Description + +The `Remove-EntraGroupOwner` cmdlet removes an owner from a group in Microsoft Entra ID. Specify the `GroupId` and `OwnerId` parameters to remove an owner from a group. + +## Examples + +### Example 1: Remove an owner + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupOwner -GroupId $group.Id -OwnerId 'xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb' +``` + +This example demonstrates how to remove an owner from a group in Microsoft Entra ID. + +GroupId - Specifies the ID of a group in Microsoft Entra ID. + +- `OwnerId` specifies the ID of an owner. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of an owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Add-EntraGroupOwner](Add-EntraGroupOwner.md) + +[Get-EntraGroupOwner](Get-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..888872cd48 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md @@ -0,0 +1,117 @@ +--- +title: Remove-EntraLifecyclePolicyGroup +description: This article provides details on the Remove-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Remove-EntraLifecyclePolicyGroup + +## Synopsis + +Removes a group from a lifecycle policy. + +## Syntax + +```powershell +Remove-EntraLifecyclePolicyGroup + -GroupId + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Remove-EntraLifecyclePolicyGroup` cmdlet removes a group from a lifecycle policy in Microsoft Entra ID. + +## Examples + +### Example 1: Remove lifecycle policy group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" +$policy = Get-EntraLifecyclePolicyGroup -Id $group.ObjectId +$params = @{ + GroupLifecyclePolicyId = $policy.Id + GroupId = $group.ObjectId +} +Remove-EntraLifecyclePolicyGroup @params +``` + +```Output +Value +----- +True +``` + +This example demonstrates how to remove a group from a lifecycle policy in Microsoft Entra ID with specified Id and groupId. + +- `-GroupLifecyclePolicyId` parameter specifies the lifecycle policy object ID. +- `-GroupId` parameter specifies the ID of Office365 group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of the lifecycle policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) + +[Add-EntraLifecyclePolicyGroup](Add-EntraLifecyclePolicyGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md new file mode 100644 index 0000000000..b8aeaa6a36 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md @@ -0,0 +1,84 @@ +--- +title: Reset-EntraLifeCycleGroup +description: This article provides details on the Reset-EntraLifeCycleGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup + +schema: 2.0.0 +--- + +# Reset-EntraLifeCycleGroup + +## Synopsis + +Renews a group by updating the RenewedDateTime property on a group to the current DateTime. + +## Syntax + +```powershell +Reset-EntraLifeCycleGroup + -Id + [] +``` + +## Description + +The `Reset-EntraLifeCycleGroup` renews a group by updating the RenewedDateTime property on a group to the current DateTime. +When a group is renewed, the group expiration is extended by the number of days defined in the policy. + +## Examples + +### Example 1: Renew a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +Reset-EntraLifeCycleGroup -Id 'hhhhhhhh-8888-9999-8888-cccccccccccc' +``` + +This example demonstrates how to renew a specified group. + +- `-Id` - Specifies the lifecycle policy object ID. + +## Parameters + +### -Id + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md new file mode 100644 index 0000000000..80f5ee8ca8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md @@ -0,0 +1,99 @@ +--- +title: Select-EntraGroupIdsContactIsMemberOf +description: This article provides details on the Select-EntraGroupIdsContactIsMemberOf command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsContactIsMemberOf + +## Synopsis + +Get groups in which a contact is a member. + +## Syntax + +```powershell +Select-EntraGroupIdsContactIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsContactIsMemberOf` cmdlet gets groups in Microsoft Entra ID in which a contact is a member. + +## Examples + +### Example 1: Get groups in which a contact is a member + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All,Group.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Filter "DisplayName eq 'Entra PowerShell Group'").ObjectId +$UserID = (Get-EntraContact -ObjectId 'hhhhhhhh-8888-9999-8888-cccccccccccc').ObjectId +Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups +``` + +This example demonstrates how to get groups in which a contact is a member. + +- `-ObjectId` parameter specifies the contact Object ID. +- `-GroupIdsForMembershipCheck` parameter specifies the group Object ID. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the object ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md new file mode 100644 index 0000000000..f0eabc7873 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md @@ -0,0 +1,101 @@ +--- +title: Select-EntraGroupIdsGroupIsMemberOf +description: This article provides details on the Select-EntraGroupIdsGroupIsMemberOf command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsGroupIsMemberOf + +## Synopsis + +Gets group IDs that a group is a member of. + +## Syntax + +```powershell +Select-EntraGroupIdsGroupIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsGroupIsMemberOf` cmdlet gets the groups that a specified group is a member of in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a group + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Top 1).ObjectId +$GroupId = (Get-EntraGroup -Top 1).ObjectId +Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupId -GroupIdsForMembershipCheck $Groups +``` + +This example gets the group membership of a group identified by $GroupId. Use `Get-EntraGroup` cmdlet to obtain group `ObjectId` value. + +- `-ObjectId` parameter specifies the group ID. +- `-GroupIdsForMembershipCheck` Specifies an array of group object IDs. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md new file mode 100644 index 0000000000..d5cb471ca8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md @@ -0,0 +1,110 @@ +--- +title: Select-EntraGroupIdsUserIsMemberOf +description: This article provides details on the Select-EntraGroupIdsUserIsMemberOf command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsUserIsMemberOf + +## Synopsis + +Selects the groups that a user is a member of. + +## Syntax + +```powershell +Select-EntraGroupIdsUserIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsUserIsMemberOf` cmdlet selects the groups that a user is a member of in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a user + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$myGroup = Get-EntraGroup -Filter "DisplayName eq ''" +$UserId = 'SawyerM@contoso.com' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = $myGroup.ObjectId +$Params = @{ + ObjectId = $UserId + GroupIdsForMembershipCheck = $Groups +} +Select-EntraGroupIdsUserIsMemberOf @Params +``` + +```Output +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example retrieves the group membership of a group for a user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-GroupIdsForMembershipCheck` parameter specifies the group Object Ids. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md new file mode 100644 index 0000000000..1886cefa89 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md @@ -0,0 +1,313 @@ +--- +title: Set-EntraGroup +description: This article provides details on the Set-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroup + +schema: 2.0.0 +--- + +# Set-EntraGroup + +## Synopsis + +Sets the properties for an existing Microsoft Entra ID group. + +## Syntax + +```powershell +Set-EntraGroup + -GroupId + [-DisplayName ] + [-GroupTypes ] + [-SecurityEnabled ] + [-Description ] + [-MailEnabled ] + [-MailNickname ] + [-Visibility ] + [-IsAssignableToRole ] + [] +``` + +## Description + +The `Set-EntraGroup` cmdlet sets the properties for an existing Microsoft Entra ID group. Specify the `GroupId` parameter to set the properties for an existing Microsoft Entra ID group. + +## Examples + +### Example 1: Update a group display name + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + DisplayName = 'UPDATE HelpDesk Team Leaders' +} +Set-EntraGroup @params +``` + +This command updates the display name of a specified group in Microsoft Entra ID. + +### Example 2: Update a group description + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + Description = 'This is my new group' +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a group description. + +### Example 3: Update a group mail nickname + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MailNickName = 'newnickname' +} +Set-EntraGroup @params +``` + +This command updates the mail nickname of a specified group in Microsoft Entra ID. + +### Example 4: Update a group security enabled + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + SecurityEnabled = $true +} +Set-EntraGroup @params +``` + +This command updates the security enabled of a specified group in Microsoft Entra ID. + +### Example 5: Update a group mail enabled + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MailEnabled = $false +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a group main enabled. + +### Example 6: Update a property for a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + Visibility = 'Private' + GroupTypes = 'DynamicMembership' + IsAssignableToRole = $true +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a property for an existing Microsoft Entra ID group. + +## Parameters + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a dynamic group. +To create a dynamic group, specify a value of DynamicMembership. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MailEnabled + +Indicates whether this group is mail enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Indicates whether the group is security enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +Specifies the visibility of the group's content and members list. +This parameter can take one of the following values: + +* "Public": Anyone can view the contents of the group. +* "Private": Only members can view the content of the group. +* "HiddenMembership": Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator, and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value is "Public." + +Notes: + +* This parameter is only valid for groups that have the groupType set to "Unified." +* If a group has this attribute set to "HiddenMembership," it can't be changed later. +* Anyone can join a group that has this attribute set to "Public." If the attribute is set to Private or HiddenMembership, only owner can add new members to the group and requests to join the group need approval of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroup](New-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..df8b9a3a99 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md @@ -0,0 +1,160 @@ +--- +title: Set-EntraGroupLifecyclePolicy +description: This article provides details on the Set-EntraGroupLifecyclePolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Set-EntraGroupLifecyclePolicy + +## Synopsis + +Updates a specific group Lifecycle Policy in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [-AlternateNotificationEmails ] + [-GroupLifetimeInDays ] + [-ManagedGroupTypes ] + [] +``` + +## Description + +The `Set-EntraGroupLifecyclePolicy` command updates a specific group Lifecycle Policy in Microsoft Entra ID. + +## Examples + +### Example 1: Updates group lifecycle policy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 +$params = @{ + GroupLifecyclePolicyId = $policy.Id + GroupLifetimeInDays = 200 + AlternateNotificationEmails = 'example@contoso.com' + ManagedGroupTypes = 'All' +} +Set-EntraGroupLifecyclePolicy @params +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 All +``` + +This example updates the specified groupLifecyclePolicy in Microsoft Entra ID. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy to be modified. +- `-GroupLifetimeInDays` parameter specifies the lifetime of the groups in the policy to 200 days. The GroupLifetimeInDays represents the number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. +- `-AlternateNotificationEmails` parameter specifies the email address that receives notifications about the policy. Multiple email address can be defined by separating email address with a semicolon. +- `-ManagedGroupTypes` parameter specifies which office 365 groups the policy applies to. Possible values are `All`, `Selected`, or `None`. +In this case, 'All' suggests that the policy manages all types of groups. + +## Parameters + +### -AlternateNotificationEmails + +Notification emails for groups that have no owners are sent to these email addresses. +List of email addresses separated by a ";". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifetimeInDays + +The number of days a group can exist before it needs to be renewed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ManagedGroupTypes + +Allows the admin to select which office 365 groups the policy applies to. + +- "None" will create the policy in a disabled state. +- "All" will apply the policy to every Office 365 group in the tenant. +- "Selected" will allow the admin to choose specific Office 365 groups that the policy applies to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) + +[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md new file mode 100644 index 0000000000..df6ead8bb6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md @@ -0,0 +1,291 @@ +--- +title: New-EntraInvitation +description: This article provides details on the New-EntraInvitation command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraInvitation + +schema: 2.0.0 +--- + +# New-EntraInvitation + +## Synopsis + +This cmdlet is used to invite a new external user to your directory. + +## Syntax + +```powershell +New-EntraInvitation + [-InvitedUser ] + [-InvitedUserType ] + -InvitedUserEmailAddress + [-SendInvitationMessage ] +-InviteRedirectUrl + [-InvitedUserMessageInfo ] [-InvitedUserDisplayName ] + [] +``` + +## Description + +This cmdlet is used to invite a new external user to your directory. + +Invitation adds an external user to the organization. When creating a new invitation, you have several options available: + +- On invitation creation, Microsoft Graph can automatically send an invitation email directly to the invited user, or your app can use the inviteRedeemUrl returned in the response to craft your own invitation (through your communication mechanism of choice) to the invited user. If you decide to have Microsoft Graph send an invitation email automatically, you can specify the content and language of the email by using invitedUserMessageInfo. + +- When the user is invited, a user entity (of userType Guest) is created and can be used to control access to resources. The invited user has to go through the redemption process to access any resources they have been invited to. + +To reset the redemption status for a guest user, the User.ReadWrite.All permission is the minimum required. + +For delegated scenarios, the signed-in user must have at least one of the following roles: Guest Inviter, Directory Writers, or User Administrator. Additionally, to reset the redemption status, the signed-in user must have the Helpdesk Administrator or User Administrator role. + +## Examples + +### Example 1: Invite a new external user to your directory + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example sent an email to the user who's email address is in the `-InvitedUserEmailAddress` parameter. + +When the user accepts the invitation, they're forwarded to the url as specified in the `-InviteRedirectUrl` parameter. + +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. + +### Example 2: Invite a new external user to your directory with InvitedUserDisplayName parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' + InvitedUserDisplayName = 'microsoftuser' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with `-InvitedUserDisplayName` parameter. + +- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user +- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. +- `-InvitedUserDisplayName`Parameter specifies the display name of the user. + +### Example 3: Invite a new external user to your directory with InvitedUserMessageInfo parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$a= New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo +$a.CustomizedMessageBody = 'Hi there, how are you' +$a.MessageLanguage = 'EN' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.microsoft.com' + InvitedUserMessageInfo = $a +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with InvitedUserMessageInfo parameter. + +- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. +- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. +- `-InvitedUserMessageInfo`Parameter specifies addition information to specify how the invitation message is sent. + +### Example 4: Invite a new external user to your directory with InvitedUserType parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.microsoft.com' + InvitedUserType = 'Guest' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +9e2b9f02-c2cb-4832-920d-81959f44e397 https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with InvitedUserType parameter. + +## Parameters + +### -InvitedUserDisplayName + +The display name of the user as it appears in your directory. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserEmailAddress + +The Email address to which the invitation is sent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserMessageInfo + +Addition information to specify how the invitation message is sent. + +```yaml +Type: InvitedUserMessageInfo +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUser + +An existing user object in the directory that you want to add or update the B2B credentials for. + +```yaml +Type: User +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserType + +The userType of the user being invited. By default, this is Guest. + +You can invite as Member if you are company administrator. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InviteRedirectUrl + +The URL to which the invited user is forwarded after accepting the invitation. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SendInvitationMessage + +A Boolean parameter that indicates whether or not an invitation message sent to the invited user. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +- See more information - . + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md new file mode 100644 index 0000000000..7667dcb6b1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md @@ -0,0 +1,57 @@ +--- +title: Enable-EntraAzureADAlias +description: This article provides details on the Enable-EntraAzureADAlias command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraAzureADAlias + +schema: 2.0.0 +--- + +# Enable-EntraAzureADAlias + +## Synopsis + +Enables aliases for AzureAD commands. + +## Syntax + +```powershell +Enable-EntraAzureADAlias +``` + +## Description + +Enables Azure AD command aliases in the current PowerShell session. + +## Examples + +### Example 1: Enable aliasing + +```powershell +Enable-EntraAzureADAlias +``` + +Enables all Azure AD prefixes for the current PowerShell session. + +## Parameters + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md new file mode 100644 index 0000000000..bdc29b6526 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md @@ -0,0 +1,120 @@ +--- +title: Test-EntraScript +description: This article provides details on the Test-EntraScript command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Test-EntraScript + +schema: 2.0.0 +--- + +# Test-EntraScript + +## Synopsis + +Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. + +## Syntax + +```powershell +Test-EntraScript + -Path + [-Content ] + [-Quiet] + [] +``` + +## Description + +Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. + +## Examples + +### Example 1 + +```powershell +Test-EntraScript -Path .\usercreation.ps1 -Quiet +``` + +Returns whether the script `usercreation.ps1` could run under Microsoft.Graph.Entra. + +### Example 2 + +```powershell +Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript +``` + +Returns a list of all scripts that wouldn't run under the Microsoft.Graph.Entra module, listing each issue with line and code. + +## Parameters + +### -Path + +Path to one or more script files to scan. +Or name of the content, when also specifying -Content + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: FullName, Name + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Content + +Code content to scan. +Used when scanning code that has no file representation (for example, +straight from a repository). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Quiet + +Only return $true or $ false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($ false) + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md new file mode 100644 index 0000000000..640ed63b0e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md @@ -0,0 +1,179 @@ +--- +title: Get-EntraAuditDirectoryLog +description: This article provides details on the Get-EntraAuditDirectoryLog command. + + +ms.topic: reference +ms.date: 07/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Get-EntraAuditDirectoryLog + +## Synopsis + +Get directory audit logs. + +## Syntax + +```powershell +Get-EntraAuditDirectoryLog +[-All] +[-Top ] +[-Filter ] +[] +``` + +## Description + +The `Get-EntraAuditDirectoryLog` cmdlet gets a Microsoft Entra ID audit log. + +Retrieve audit logs from Microsoft Entra ID, covering logs from various services such as user, app, device, and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (SSPR and admin resets), and self-service group management. + +## Examples + +### Example 1: Get all logs + +```powershell + Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' + Get-EntraAuditDirectoryLog -All +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId +-- ---------------- ------------------- -------- ------------- +Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd +Directory_bbbbbbbb-1111-2222-3333-cccccccccccc 17/07/2024 07:31:54 Update user UserManagement bbbb1111-cc22-3333-44dd-555555eeeeee +SSGM_cccccccc-2222-3333-4444-dddddddddddd 17/07/2024 07:13:08 GroupsODataV4_GetgroupLifecyclePolicies GroupManagement cccc2222-dd33-4444-55ee-666666ffffff + +``` + +This command gets all audit logs. + +### Example 2: Get first n logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Top 1 +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId LoggedB + yServic + e +-- ---------------- ------------------- -------- ------------- ------- +Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb_8IAPT_617717139 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd Core... + +``` + +This example returns the first N logs. + +### Example 3: Get audit logs containing a given ActivityDisplayName + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Filter "ActivityDisplayName eq 'Update rollout policy of feature'" -Top 1 +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId +-- ---------------- ------------------- -------- ------------- +Application Proxy_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 16/07/2024 05:13:49 Update rollout policy of feature Authentication aaaa0000-bb11-2222-33cc-444444dddddd +``` + +This command shows how to get audit logs by ActivityDisplayName. + +### Example 4: Get all audit logs with a given result + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Filter "result eq 'failure'" -All +``` + +This command shows how to get audit logs by the result. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraAuditDirectoryLogs` is an alias for `Get-EntraAuditDirectoryLog`. + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md new file mode 100644 index 0000000000..5f710b7c0d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md @@ -0,0 +1,213 @@ +--- +title: Get-EntraAuditSignInLog +description: This article provides details on the Get-EntraAuditSignInLog command. + + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Get-EntraAuditSignInLog + +## Synopsis + +Get audit logs of sign-ins. + +## Syntax + +```powershell +Get-EntraAuditSignInLog + [-SignInId] + [-All] + [-Top ] + [-Filter ] + [] +``` + +## Description + +The `Get-EntraAuditSignInLog` cmdlet gets the Microsoft Entra ID sign-in log. + +In addition to delegated permissions, the signed-in user must belong to at least one of the following Microsoft Entra roles to read sign-in reports: + +- Global Reader +- Reports Reader +- Security Administrator +- Security Operator +- Security Reader + +## Examples + +### Example 1: Get all logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -All +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none +cccccccc-2222-3333-4444-dddddddddddd Azure Active Directory PowerShell 22223333-cccc-4444-dddd-5555eeee6666 {} none +dddddddd-3333-4444-5555-eeeeeeeeeeee Azure Active Directory PowerShell 33334444-dddd-5555-eeee-6666ffff7777 {} none +``` + +This example returns all audit logs of sign-ins. + +### Example 2: Get the first two logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Top 2 +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none +``` + +This example returns the first two audit logs of sign-ins. + +### Example 3: Get audit logs containing a given AppDisplayName + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Filter "AppDisplayName eq 'Graph Explorer'" -Top 1 +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 +``` + +This example demonstrates how to retrieve sign-in logs by AppDisplayName. + +### Example 4: Get all sign-in logs between dates + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Filter "createdDateTime ge 2024-07-01T00:00:00Z and createdDateTime le 2024-07-14T23:59:59Z" +``` + +This example shows how to retrieve sign-in logs between dates. + +### Example 5: List failed sign-ins for a user + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" +$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize +``` + +This example demonstrates how to retrieve failed sign-ins for a user. + +## Parameters + +### -SignInId + +Specifies unique ID of the Audit Log. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraAuditSignInLogs` is an alias for `Get-EntraAuditSignInLog`. + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md new file mode 100644 index 0000000000..c735ee4d6c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md @@ -0,0 +1,156 @@ +--- +title: Get-EntraAuthorizationPolicy +description: This article provides details on the Get-EntraAuthorizationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy + +schema: 2.0.0 +--- + +# Get-EntraAuthorizationPolicy + +## Synopsis + +Gets an authorization policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAuthorizationPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraAuthorizationPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraAuthorizationPolicy` cmdlet gets a Microsoft Entra ID authorization policy. + +## Examples + +### Example 1: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraAuthorizationPolicy +``` + +```Output +DeletedDateTime Description DisplayName Id AllowEmailVerifiedUsersToJoinOrganization AllowI + nvites + From +--------------- ----------- ----------- -- ----------------------------------------- ------ + Used to manage authorization related settings across the company. Authorization Policy authorizationPolicy True every… +``` + +This example gets the Microsoft Entra ID authorization policy. + +### Example 2: Get an authorization policy by ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraAuthorizationPolicy -Id 'authorizationPolicy' | Format-List +``` + +```Output +allowInvitesFrom : everyone +allowUserConsentForRiskyApps : +id : authorizationPolicy +defaultUserRolePermissions : @{allowedToCreateSecurityGroups=True; allowedToReadBitlockerKeysForOwnedDevice=True; allowedToCreateTenants=True; + allowedToReadOtherUsers=True; allowedToCreateApps=False; permissionGrantPoliciesAssigned=System.Object[]} +blockMsolPowerShell : False +guestUserRoleId : a0b1b346-4d3e-4e8b-98f8-753987be4970 +displayName : Authorization Policy +@odata.context : https://graph.microsoft.com/v1.0/$metadata#policies/authorizationPolicy/$entity +allowedToSignUpEmailBasedSubscriptions : True +description : Used to manage authorization related settings across the company. +allowEmailVerifiedUsersToJoinOrganization : True +allowedToUseSSPR : True +DeletedDateTime : +AdditionalProperties : {} +``` + +This example gets the Microsoft Entra ID authorization policy. + +- `-Id` parameter specifies the unique identifier of the authorization policy. + +The response properties are: + +- `allowedToSignUpEmailBasedSubscriptions` - indicates whether users can sign up for email based subscriptions. +- `allowedToUseSSPR` - indicates whether administrators of the tenant can use the Self-Service Password Reset (SSPR). +- `allowEmailVerifiedUsersToJoinOrganization` - indicates whether a user can join the tenant by email validation. +- `allowInvitesFrom` - indicates who can invite guests to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. `everyone` is the default setting for all cloud environments except US Government. +- `allowUserConsentForRiskyApps` - indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. +- `blockMsolPowerShell` - to disable the use of the MSOnline PowerShell module set this property to `true`. This also disables user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This doesn't affect Microsoft Entra Connect or Microsoft Graph. +- `defaultUserRolePermissions` - specifies certain customizable permissions for default user role. +- `description` - description of this policy. +- `displayName` - display name for this policy. +- `enabledPreviewFeatures` - list of features enabled for private preview on the tenant. +- `guestUserRoleId` -represents role templateId for the role that should be granted to guests. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). +- `permissionGrantPolicyIdsAssignedToDefaultUserRole` - indicates if user consent to apps is allowed, and if it is, the app consent policy that governs the permission for users to grant consent. Values should be in the format `managePermissionGrantsForSelf.{id}` for user consent policies or `managePermissionGrantsForOwnedResource.{id}` for resource-specific consent policies, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. + +## Parameters + +### -Id + +Specifies the unique identifier of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraAuthorizationPolicy](Set-EntraAuthorizationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..406c7ef223 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md @@ -0,0 +1,135 @@ +--- +title: Get-EntraConditionalAccessPolicy +description: This article provides details on the Get-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Get-EntraConditionalAccessPolicy + +## Synopsis + +Gets a Microsoft Entra ID conditional access policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraConditionalAccessPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraConditionalAccessPolicy + -PolicyId + [-Property ] + [] +``` + +## Description + +This cmdlet allows an admin to get the Microsoft Entra ID conditional access policy. +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Retrieves a list of all conditional access policies in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraConditionalAccessPolicy +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled +ffffffff-5555-6666-7777-aaaaaaaaaaaa 2/27/2024 6:26:00 AM ConditionalAccessPolicy 2/29/2024 2:41:34 PM disabled +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 2/27/2024 6:30:48 AM ConditionalAccessPolicy 2/29/2024 2:43:53 PM disabled +``` + +This example retrieves a list of all conditional access policies in Microsoft Entra ID. + +### Example 2: Retrieves a conditional access policy in Microsoft Entra ID with given ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraConditionalAccessPolicy -PolicyId 'eeeeeeee-4444-5555-6666-ffffffffffff' +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled +``` + +This example retrieves a specified conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of a conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..b4dd3a5fd2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md @@ -0,0 +1,212 @@ +--- +title: Get-EntraFeatureRolloutPolicy +description: This article provides details on the Get-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Get-EntraFeatureRolloutPolicy + +## Synopsis + +Gets the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraFeatureRolloutPolicy + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraFeatureRolloutPolicy + [-SearchString ] + [] +``` + +### GetById + +```powershell +Get-EntraFeatureRolloutPolicy + -Id + [] +``` + +## Description + +The `Get-EntraFeatureRolloutPolicy` cmdlet allows an admin to get the policy for cloud authentication rollout (users moving from federation to cloud auth) in Microsoft Entra ID. + +This policy consists of one or two FeatureRolloutPolicy objects. These objects hold the groups assigned for cloud authentication (Pass-through authentication or Password Hash Sync) and groups assigned for Seamless single sign-on. + +## Examples + +### Example 1: Retrieves a list of all cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False True +bbbbbbbb-1111-2222-3333-cccccccccccc Feature-Rollout-Policy change emailAsAlternateId False False +``` + +This command retrieves a list of all cloud authentication roll-out policies in Microsoft Entra ID. + +### Example 2: Retrieves cloud authentication roll-out in Microsoft Entra ID with given ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output + +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False + +``` + +This example retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +- `-Id` - Specify The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +### Example 3: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Search String + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -SearchString 'Feature-Rollout-Policy' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False +``` + +This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +### Example 4: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Filter parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -Filter "Description eq 'Feature-Rollout-Policy'" +``` + +```Output + +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False + +``` + +This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.MsFeatureRolloutPolicy + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md new file mode 100644 index 0000000000..358563649f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md @@ -0,0 +1,140 @@ +--- +title: Get-EntraIdentityProvider +description: This article provides details on the Get-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Get-EntraIdentityProvider + +## Synopsis + +This cmdlet is used to retrieve the configured identity providers in the directory. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraIdentityProvider + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraIdentityProvider + -IdentityProviderBaseId + [-Property ] + [] +``` + +## Description + +The `Get-EntraIdentityProvider` cmdlet is used to retrieve the identity providers that have been configured in the directory. +These identity providers can be used to allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C. + +Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. +For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. +The Gmail user will use their Google account credentials to authenticate and access the documents. + +The current set of identity providers can be Microsoft, Google, Facebook, Amazon, or LinkedIn. + +## Examples + +### Example 1: Retrieve all identity providers + +```powershell +Connect-Entra -Scopes 'IdentityProvider.Read.All' +Get-EntraIdentityProvider +``` + +```Output +Id DisplayName +-- ----------- +AADSignup-OAUTH Directory Sign up +Google-OAUTH Test +EmailOtpSignup-OAUTH Email One Time Passcode +MSASignup-OAUTH Microsoft Account +``` + +This example retrieves the list of all configured identity providers and their properties. + +### Example 2: Retrieve identity provider by Id + +```powershell +Connect-Entra -Scopes 'IdentityProvider.Read.All' +Get-EntraIdentityProvider -IdentityProviderBaseId Google-OAUTH +``` + +```Output +Id DisplayName +-- ----------- +Google-OAUTH GoogleName +``` + +This example retrieves the properties for the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. + +## Parameters + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..edab5a7bd4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md @@ -0,0 +1,138 @@ +--- +title: Get-EntraNamedLocationPolicy +description: This article provides details on the Get-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Get-EntraNamedLocationPolicy + +## Synopsis + +Gets a Microsoft Entra ID named location policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraNamedLocationPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraNamedLocationPolicy + -PolicyId + [-Property ] + [] +``` + +## Description + +This cmdlet allows an admin to get the Microsoft Entra ID named location policies. + +Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. + +## Examples + +### Example 1: Retrieves a list of all named location policies in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraNamedLocationPolicy +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee 31/07/2024 9:53:10 NamedLocation 31/07/2024 9:53:10 +eeeeeeee-4444-5555-6666-ffffffffffff 31/07/2024 4:38:42 NamedLocation1 31/07/2024 4:38:42 +ffffffff-5555-6666-7777-aaaaaaaaaaaa 01/08/2024 4:39:42 NamedLocation2 01/08/2024 4:39:42 +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 01/08/2024 4:57:03 NamedLocation3 01/08/2024 4:57:03 +``` + +This command retrieves a list of all named location policies in Microsoft Entra ID. + +### Example 2: Retrieves a named location policy by Id + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraNamedLocationPolicy -PolicyId 'dddddddd-3333-4444-5555-eeeeeeeeeeee' +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee 3/1/2024 9:53:10 AM NamedLocation 3/1/2024 9:53:10 AM +``` + +This example retrieves a specified named location policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the policy Id of a named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md new file mode 100644 index 0000000000..7d77a9299d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md @@ -0,0 +1,190 @@ +--- +title: Get-EntraOAuth2PermissionGrant +description: This article provides details on the Get-EntraOAuth2PermissionGrant Command. + + +ms.topic: reference +ms.date: 10/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraOAuth2PermissionGrant + +## Synopsis + +Gets OAuth2PermissionGrant entities. + +## Syntax + +```powershell +Get-EntraOAuth2PermissionGrant + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraOAuth2PermissionGrant` cmdlet gets OAuth2PermissionGrant entities in Microsoft Entra ID. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator +- Directory Readers +- Global Reader + +## Examples + +### Example 1: Get the OAuth2 permission grants + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read +H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read +``` + +This command gets the OAuth2 permission grants. + +### Example 2: Get all the OAuth2 permission grants + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant -All +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read +H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read +``` + +This command gets all the OAuth2 permission grants. + +### Example 3: Get OAuth2 permission grants for a user in a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Helpdesk Application'" +Get-EntraOAuth2PermissionGrant | Where-Object {$_.ClientId -eq $servicePrincipal.Id -and $_.PrincipalId -eq $user.Id} | Format-List +``` + +```Output +ObjectId : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 +ClientId : 22223333-cccc-4444-dddd-5555eeee6666 +ConsentType : Principal +Id : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 +PrincipalId : aaaaaaaa-bbbb-cccc-1111-222222222222 +ResourceId : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 +Scope : User.Read.All openid profile offline_access Organization.Read.All User.ReadWrite.All Device.Read.All Device.ReadWrite.All Directory.Read.All User.Read RoleManagement.ReadWrite.Directory Group.ReadWrite.All +AdditionalProperties : {} +``` + +This example gets the OAuth2 permission grants for a user in a service principal. + + +### Example 4: Get top 2 OAuth2 permission grants record + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant -Top 2 +``` + +```output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +``` + +This command retrieves the top 2 OAuth2 permission grant records. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) +[New-EntraOAuth2PermissionGrant](New-EntraOauth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..35e31777dd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md @@ -0,0 +1,214 @@ +--- +title: Get-EntraPermissionGrantConditionSet +description: This article provides details on the Get-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Get-EntraPermissionGrantConditionSet + +## Synopsis + +Get a Microsoft Entra ID permission grant condition set by ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPermissionGrantConditionSet + -ConditionSetType + -PolicyId + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [-Property ] + [] +``` + +## Description + +Get a Microsoft Entra ID permission grant condition set object by ID. + +## Examples + +### Example 1: Get all permission grant condition sets that are included in the permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets all permission grant condition sets that are included in the policy. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. + +### Example 2: Get all permission grant condition sets that are excluded in the permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'excludes' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +bbbbbbbb-1111-2222-3333-cccccccccccc False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +cccccccc-2222-3333-4444-dddddddddddd False {44445555-eeee-6666-ffff-7777gggg8888} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets all permission grant condition sets that are excluded in the policy. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. + +### Example 3: Get a permission grant condition set + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets a permission grant condition set specified by Id. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of the permission grant condition set object. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..800032dcc0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md @@ -0,0 +1,134 @@ +--- +title: Get-EntraPermissionGrantPolicy +description: This article provides details on the Get-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Get-EntraPermissionGrantPolicy + +## Synopsis + +Gets a permission grant policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPermissionGrantPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraPermissionGrantPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraPermissionGrantPolicy` cmdlet gets a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Get all permission grant policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +Get-EntraPermissionGrantPolicy +``` + +```Output +DeletedDateTime Description +--------------- ----------- + Includes all application permissions (app roles), for all APIs, for any client application. + Includes all chat resoruce-specific application permissions, for all APIs, for any client application. + (Deprecated) Includes all team resource-specific application permissions, for all APIs, for any client application. +``` + +This command gets all the permission grant policies. + +### Example 2: Get a permission grant policy by ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +Get-EntraPermissionGrantPolicy -Id 'testtenant-sampleapp-permissions' +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + Permissions for sample app in test tenant Sample app permissions testtenant-sampleapp-permissions +``` + +This command gets the specified permission grant policy. + +- `Id` parameter specifies the permission grant policy ID. + +## Parameters + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md new file mode 100644 index 0000000000..77785c64c1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md @@ -0,0 +1,196 @@ +--- +title: Get-EntraPolicy +description: This article provides details on the Get-EntraPolicy command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPolicy + +schema: 2.0.0 +--- + +# Get-EntraPolicy + +## Synopsis + +Gets a policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPolicy + [-Top ] + [-All] + [] +``` + +### GetById + +```powershell +Get-EntraPolicy + -Id + [-All] + [] +``` + +## Description + +The `Get-EntraPolicy` cmdlet gets a policy in Microsoft Entra ID. Specify `Id` parameter to get a policy. + +## Examples + +### Example 1: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc +{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example shows how to return all policies. + +### Example 2: Get policy using Display Name + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + Permissions consentable based on Microsoft's current recommendations. Microsoft User Default Recommended Policy microsoft-user-default-recommended +``` + +This example shows how to get a specific policy using Display Name. + +### Example 3: Get a policy with specific ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -Id 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True +``` + +This example demonstrated how to receive policy with specific ID. + +- `Id` parameter specifies the unique policy ID, which you want to receive. In this example, `bbbbbbbb-1111-2222-3333-cccccccccccc` represents the ID of the policy. + +### Example 4: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -All +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc +{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example demonstrates how to retrieve all policies in Microsoft Entra ID. + +### Example 5: Get the top one policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -Top 1 +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True +``` + +This example demonstrates how to retrieve top one policies in Microsoft Entra ID. + +## Parameters + +### -Id + +The Id of the policy you want to retrieve. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all policies. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPolicy](New-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..a26bfd778e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md @@ -0,0 +1,186 @@ +--- +title: Get-EntraTrustedCertificateAuthority +description: This article provides details on the Get-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Get-EntraTrustedCertificateAuthority + +## Synopsis + +Gets the trusted certificate authority. + +## Syntax + +```powershell +Get-EntraTrustedCertificateAuthority + [-TrustedIssuerSki ] + [-TrustedIssuer ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraTrustedCertificateAuthority` cmdlet gets the trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl1 +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : https://deltaexample.crl +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 0...} +TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory. + +### Example 2: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuer + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority -TrustedIssuer 'CN=mscmdlet' +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl1 +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : https://deltaexample.crl +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C +``` + +This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuer. + +- `-TrustedIssuer` parameter specifies the trusted issuer. + +### Example 3: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority -TrustedIssuerSki 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 0...} +TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki. + +- `-TrustedIssuerSki` parameter specifies the trusted issuer ski. + +## Parameters + +### -TrustedIssuer + +Specifies a trusted issuer. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TrustedIssuerSki + +Specifies a trusted issuer ski. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..3b9cb44f36 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md @@ -0,0 +1,278 @@ +--- +title: New-EntraConditionalAccessPolicy +description: This article provides details on the New-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# New-EntraConditionalAccessPolicy + +## Synopsis + +Creates a new conditional access policy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraConditionalAccessPolicy + [-Id ] + [-DisplayName ] + [-State ] + [-Conditions ] + [-GrantControls ] + [-SessionControls ] + [] +``` + +## Description + +This cmdlet allows an admin to create new conditional access policy in Microsoft Entra ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Creates a new conditional access policy in Microsoft Entra ID that require MFA to access Exchange Online + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = 'all' +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = 'OR' +$controls.BuiltInControls = 'mfa' + +$params = @{ + DisplayName = 'MFA policy' + State = 'Enabled' + Conditions = $conditions + GrantControls = $controls +} + +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:29:09 MFA policy enabled +``` + +This command creates a new conditional access policy in Microsoft Entra ID that requires MFA to access Exchange Online. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +### Example 2: Creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = 'all' +$conditions.Locations = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition +$conditions.Locations.IncludeLocations = '5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9' +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = 'OR' +$controls.BuiltInControls = 'block' + +$params = @{ + DisplayName = 'MFA policy' + State = 'Enabled' + Conditions = $conditions + GrantControls = $controls +} + +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 MFA policy enabled +``` + +This command creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. + +### Example 3: Use all conditions and controls + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' + +$Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") +$Condition.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$Condition.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" +$Condition.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$Condition.Users.IncludeUsers = "all" + +$Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$Controls._Operator = "AND" +$Controls.BuiltInControls = @("mfa") + +$SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls +$ApplicationEnforcedRestrictions = New-Object Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions +$ApplicationEnforcedRestrictions.IsEnabled = $true +$SessionControls.applicationEnforcedRestrictions = $ApplicationEnforcedRestrictions +$params = @{ + DisplayName = "ConditionalAccessPolicy" + Conditions = $conditions + GrantControls = $controls + SessionControls = $SessionControls + } +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 ConditionalAccessPolicy enabled +``` + +This example creates new conditional access policy in Microsoft Entra ID with all the conditions and controls. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +## Parameters + +### -DisplayName + +Specifies the display name of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Conditions + +Specifies the conditions for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessConditionSet +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GrantControls + +Specifies the controls for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessGrantControls +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionControls + +Enables limited experiences within specific cloud applications. + +```yaml +Type: ConditionalAccessSessionControls +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..e276f16fd8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md @@ -0,0 +1,224 @@ +--- +title: New-EntraFeatureRolloutPolicy +description: This article provides details on the New-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy + +schema: 2.0.0 +--- + +# New-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to create the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraFeatureRolloutPolicy + -Feature + -IsEnabled + [-Description ] + [-IsAppliedToOrganization ] + [-AppliesTo ] + -DisplayName + [] +``` + +## Description + +The `New-EntraFeatureRolloutPolicy` cmdlet allows an admin to create the policy for cloud authentication roll-out (users moving from federation to cloud auth) in Microsoft Entra ID. + +The policy admin can identify whether the users authenticate using password hashes in Microsoft Entra ID (Password hash-sync) or Microsoft Entra ID on-premises directly (Pass-through authentication). + +## Examples + +### Example 1: Creates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Feature = 'PassthroughAuthentication' + DisplayName = 'FeatureRolloutPolicy' + IsEnabled = $false +} +New-EntraFeatureRolloutPolicy @params +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False + +``` + +This example creates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. + +- `-IsEnabled` specifies the status of cloud authentication roll-out policy. + +### Example 2: Creates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Feature = 'PassthroughAuthentication' + DisplayName = 'FeatureRolloutPolicy' + IsEnabled = $false + IsAppliedToOrganization = $false +} +New-EntraFeatureRolloutPolicy @params +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False + +``` + +This command creates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. + +- `-IsEnabled` specifies the status of cloud authentication roll-out policy. + +- `-IsAppliedToOrganization` specifies if the cloud authentication roll-out policy applied to the entire organization. + +## Parameters + +### -DisplayName + +Specifies the display name of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Feature + +Specifies a feature assigned to the cloud authentication roll-out policy. + +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +```yaml +Type: FeatureEnum +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies the status of cloud authentication roll-out policy. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliesTo + +Specifies a list of Microsoft Entra ID objects that is assigned to the feature. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAppliedToOrganization + +Specifies if the cloud authentication roll-out policy applied to the entire organization. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.MsFeatureRolloutPolicy + +## Notes + +## Related Links + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md new file mode 100644 index 0000000000..246056cf38 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md @@ -0,0 +1,170 @@ +--- +title: New-EntraIdentityProvider +description: This article provides details on the New-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraIdentityProvider + +schema: 2.0.0 +--- + +# New-EntraIdentityProvider + +## Synopsis + +Configure a new identity provider in the directory. + +## Syntax + +```powershell +New-EntraIdentityProvider + -Type + -ClientSecret + -ClientId + [-Name ] + [] +``` + +## Description + +The `New-EntraIdentityProvider` cmdlet is used to configure an identity provider in the directory. + +Adding an identity provider will allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C using the identity provider. + +Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. + +For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. The Gmail user will use their Google account credentials to authenticate and access the documents. + +The current set of identity providers can be: + +- Microsoft +- Google +- Facebook +- Amazon +- LinkedIn + +The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add LinkedIn identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + Type = 'LinkedIn' + Name = 'LinkedInName' + ClientId = 'LinkedInAppClientId' + ClientSecret = 'LinkedInAppClientSecret' +} + +New-EntraIdentityProvider @params +``` + +```Output +Id DisplayName +-- ----------- +LinkedIn-OAUTH LinkedInName +``` + +This example adds a LinkedIn identity provider. + +- `-Type` parameter specifies the identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. +- `-Name` parameter specifies the display name of the identity provider. +- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. +- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. + +## Parameters + +### -ClientId + +The client identifier for the application, obtained during the application's registration with the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecret + +The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The display name of the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. + +For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..997bf4368b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md @@ -0,0 +1,236 @@ +--- +title: New-EntraNamedLocationPolicy +description: This article provides details on the New-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# New-EntraNamedLocationPolicy + +## Synopsis + +Creates a new named location policy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraNamedLocationPolicy + [-OdataType ] + [-Id ] + [-DisplayName ] + [-IpRanges ] + [-IsTrusted ] + [-CountriesAndRegions ] + [-IncludeUnknownCountriesAndRegions ] + [] +``` + +## Description + +This cmdlet allows an admin to create new named location policy in Microsoft Entra ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Creates a new Ip named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange +$ipRanges.cidrAddress = '6.5.4.3/32' +$params = @{ + OdataType = '#microsoft.graph.ipNamedLocation' + DisplayName = 'IP named location policy' + IsTrusted = $false + IpRanges = $ipRanges +} + +New-EntraNamedLocationPolicy @params +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +bbbbbbbb-1111-2222-3333-cccccccccccc 31-07-2024 10:45:27 IP named location policy 31-07-2024 10:45:27 +``` + +This command creates a new country named location policy in Microsoft Entra ID. + +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. +- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. + +### Example 2: Creates a new country named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + OdataType = '#microsoft.graph.countryNamedLocation' + DisplayName = 'Country named location policy' + CountriesAndRegions = 'IN' + IncludeUnknownCountriesAndRegions = $false +} + +New-EntraNamedLocationPolicy @params +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +cccccccc-2222-3333-4444-dddddddddddd 31-07-2024 10:46:16 Country named location policy 31-07-2024 10:46:16 +``` + +This command creates a new country named location policy in Microsoft Entra ID. + +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-CountriesAndRegions` parameter specifies the countries and regions for the named location policy. +- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. + +## Parameters + +### -OdataType + +Specifies the OData type of a named location policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpRanges + +List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsTrusted + +Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CountriesAndRegions + +Specifies the countries and regions for the named location policy in Microsoft Entra ID. List of countries and/or regions in the two-letter format specified by ISO 3166-2. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeUnknownCountriesAndRegions + +Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [Create namedLocation](/graph/api/conditionalaccessroot-post-namedlocations). + +## Related Links + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md new file mode 100644 index 0000000000..85c6a167e4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md @@ -0,0 +1,188 @@ +--- +title: New-EntraOauth2PermissionGrant +description: This article provides details on the New-EntraOauth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/28/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant + +schema: 2.0.0 +--- + +# New-EntraOauth2PermissionGrant + +## Synopsis + +Create a delegated permission grant using an oAuth2PermissionGrant object. This grant allows a client service principal to access a resource service principal on behalf of a signed-in user, with access restricted to the specified delegated permissions. + +## Syntax + +```powershell +New-EntraOauth2PermissionGrant + -ClientId + -ConsentType + -ResourceId + [-PrincipalId ] + [-Scope ] + [] +``` + +## Description + +The `New-EntraOauth2PermissionGrant` cmdlet creates a delegated permission grant using an oAuth2PermissionGrant object. This grant authorizes a client service principal to access a resource service principal on behalf of a signed-in user, with access limited to the specified delegated permissions. + +## Examples + +### Example 1: To grant authorization to impersonate all users + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" +$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" +$params = @{ + ClientId = $servicePrincipal.Id + ConsentType = 'AllPrincipals' + ResourceId = $graphApp.Id + Scope = 'Directory.Read.All' + StartTime = Get-Date + ExpiryTime = (Get-Date).AddYears(1) +} +New-EntraOauth2PermissionGrant @params +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... + +``` + +This command Grant authorization to impersonate all users. + +### Example 2: To grant authorization to impersonate a specific user + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" +$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + ClientId = $servicePrincipal.Id + ConsentType = 'Principal' + PrincipalId = $user.Id + ResourceId = $graphApp.Id + Scope = 'Directory.Read.All' + StartTime = Get-Date + ExpiryTime = (Get-Date).AddYears(1) +} +New-EntraOauth2PermissionGrant @params +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... +``` + +This command Grant authorization to impersonate a specific user. + +## Parameters + +### -ClientId + +The object ID (not appId) of the client service principal for the application, which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentType + +Indicates whether the client application is authorized to impersonate all users or only a specific user. + +- `AllPrincipals`: Authorizes the application to impersonate all users. +- `Principal`: Authorizes the application to impersonate a specific user. +An administrator can grant consent on behalf of all users. In some cases, non-admin users are authorized to consent on behalf of themselves for certain delegated permissions. This parameter is required and supports the $filter query (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The ID of the resource service principal to which access is authorized. This identifies the API, which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrincipalId + +The ID of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal, If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope + +A space-separated list of the claim values for delegated permissions, which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3,850 characters in length. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## RELATED LINKS + +[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) +[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..2f1cf9baf9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md @@ -0,0 +1,372 @@ +--- +title: New-EntraPermissionGrantConditionSet +description: This article provides details on the New-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# New-EntraPermissionGrantConditionSet + +## Synopsis + +Create a new Microsoft Entra ID permission grant condition set in a given policy. + +## Syntax + +```powershell +New-EntraPermissionGrantConditionSet + -PolicyId + -ConditionSetType + [-Permissions ] + [-ClientApplicationTenantIds ] + [-ClientApplicationIds ] + [-ResourceApplication ] + [-PermissionType ] + [-PermissionClassification ] + [-ClientApplicationsFromVerifiedPublisherOnly ] + [-ClientApplicationPublisherIds ] + [] +``` + +## Description + +Create a new Microsoft Entra ID permission grant condition set object in an existing policy. + +## Examples + +### Example 1: Create a basic permission grant condition set in an existing policy with all build in values + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'includes' +PermissionType = 'delegated' +} + +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions +-- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- +aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {all} +``` + +This command creates a basic permission grant condition set in an existing policy with all build in values. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. + +### Example 2: Create a permission grant condition set in an existing policy that includes specific permissions for a resource application + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'includes' +PermissionType = 'delegated' +Permissions = @($permission) +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +} + +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions +-- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- +aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {8b590... +``` + +This command creates a permission grant condition set in an existing policy that includes specific permissions for a resource application. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. + +### Example 3: Create a permission grant condition set in an existing policy that is excluded + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'excludes' +PermissionType = 'delegated' +Permissions = @('All') +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +PermissionClassification = 'low' +ClientApplicationsFromVerifiedPublisherOnly = $true +ClientApplicationIds = @('All') +ClientApplicationTenantIds = @('All') +ClientApplicationPublisherIds = @('All') +} +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification +-- ------------------------------- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------- +dddd3333-ee44-5555-66ff-777777aaaaaa False {all} {all} {all} True low +``` + +This command creates a permission grant condition set in an existing policy that is excluded. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. + +### Example 4: Create a permission grant condition set in an existing policy that is excluded + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'excludes' +PermissionType = 'delegated' +Permissions = @($permission) +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +PermissionClassification = 'low' +ClientApplicationsFromVerifiedPublisherOnly = $true +ClientApplicationIds = @('00001111-aaaa-2222-bbbb-3333cccc4444', '11112222-bbbb-3333-cccc-4444dddd5555') +ClientApplicationTenantIds = @('aaaabbbb-0000-cccc-1111-dddd2222eeee', 'bbbbcccc-1111-dddd-2222-eeee3333ffff', 'ccccdddd-2222-eeee-3333-ffff4444aaaa') +ClientApplicationPublisherIds = @('33334444-dddd-5555-eeee-6666ffff7777') +} +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +cccccccc-2222-3333-4444-dddddddddddd False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command creates a permission grant condition set in an existing policy that is excluded. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionType + +Specific type of permissions (application, delegated) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionClassification + +Specific classification (all, low, medium, high) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions + +The identifier of the resource application to scope consent operation down to. +It could be @("All") or a list of permission IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationIds + +The set of client application IDs to scope consent operation down to. +It could be @("All") or a list of client application IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationTenantIds + +The set of client application tenant IDs to scope consent operation down to. +It could be @("All") or a list of client application tenant IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationPublisherIds + +The set of client applications publisher IDs to scope consent operation down to. +It could be @("All") or a list of client application publisher IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationsFromVerifiedPublisherOnly + +A value indicates whether to only includes client applications from verified publishers. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceApplication + +The identifier of the resource application to scope consent operation down to. +It could be "Any" or a specific resource application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet + +## Notes + +## Related Links + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..ef81f38eb6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md @@ -0,0 +1,133 @@ +--- +title: New-EntraPermissionGrantPolicy +description: This article provides details on the New-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# New-EntraPermissionGrantPolicy + +## Synopsis + +Creates a permission grant policy. + +## Syntax + +```powershell +New-EntraPermissionGrantPolicy + -Id + [-DisplayName ] + [-Description ] + [] +``` + +## Description + +The `New-EntraPermissionGrantPolicy` cmdlet creates a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Create a permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$params = @{ + Id = 'my_new_permission_grant_policy_id' + DisplayName = 'MyNewPermissionGrantPolicy' + Description = 'My new permission grant policy' +} + +New-EntraPermissionGrantPolicy @params +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + My new permission grant policy MyNewPermissionGrantPolicy my_new_permission_grant_policy_id +``` + +This example creates new permission grant policy in Microsoft Entra ID. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-DisplayName` parameter specifies the display name for the permission grant policy. +- `-Description` parameter specifies the description for the permission grant policy. + +## Parameters + +### -Description + +Specifies the description for the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name for the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md new file mode 100644 index 0000000000..1bbe623503 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md @@ -0,0 +1,254 @@ +--- +title: New-EntraPolicy +description: This article provides details on the New-EntraPolicy command. + + +ms.topic: reference +ms.date: 08/02/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPolicy + +schema: 2.0.0 +--- + +# New-EntraPolicy + +## Synopsis + +Creates a policy. + +## Syntax + +```powershell +New-EntraPolicy + -Definition + -DisplayName + -Type + [-IsOrganizationDefault ] + [] +``` + +## Description + +The `New-EntraPolicy` cmdlet creates a policy in Microsoft Entra ID. Specify `DisplayName`, `Definition` and `Type` parameters for create a new policy. + +## Examples + +### Example 1: Create a new policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') + DisplayName = 'NewPolicy' + Type = 'HomeRealmDiscoveryPolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id IsOrganizationD + efault +---------- --------------- ----------- ----------- -- --------------- +{{"HomeReayPolicy":{"AlternateLoginIDLookup":true, "IncluderIds":["UserID"]}}} NewPolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False +``` + +This command creates a new policy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 2: Create a ClaimsMappingPolicy policy by 'IsOrganizationDefault' parameter + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name\",\"JwtClaimType\":\"upn\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://schemas.microsoft.com/identity/claims/displayname\",\"JwtClaimType\":\"name\"}]}}" ], "displayName": "Custom Claims Issuance Policy", "isOrganizationDefault": false }') + DisplayName ='ClaimstestPolicy' + Type = 'claimsMappingPolicies' + IsOrganizationDefault = $false +} +New-EntraPolicy @params +``` + +```Output +Definition +---------- +{{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLCl… +``` + +This command creates a ClaimsMappingPolicy using 'IsOrganizationDefault' parameter in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` - Parameter specifies the type of policy. In this example, `ClaimsMappingPolicy` + represents the type of policy. + +- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. + +### Example 3: Create a TokenLifetimePolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}') + DisplayName = 'TokenLifetimePolicy' + Type = 'TokenLifetimePolicy' + IsOrganizationDefault = $false +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id IsOrganizatio + nDefault +---------- --------------- ----------- ----------- -- ------------- +{{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}} TokenLifetimePolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False +``` + +This command creates a TokenLifetimePolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 4: Create a TokenIssuancePolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly","EmitSAMLNameFormat":"true"}}') + DisplayName = 'tokenIssuance' + Type = 'TokenIssuancePolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition +---------- +{{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly… +``` + +This command creates a TokenIssuancePolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 5: Create a ActivityBasedTimeoutPolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') + DisplayName = 'ActivityBasedTimeoutPolicyname' + Type = 'ActivityBasedTimeoutPolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} ActivityBasedTimeoutPolicyname aaaaaaaa-0000-1111-2222... + +``` + +This command creates a ActivityBasedTimeoutPolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +## Parameters + +### -Definition + +Specifies an array of JSON that contains all the rules of the policy, for example: -Definition @("{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}"). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +String of the policy name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsOrganizationDefault + +True if this policy is the organizational default. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of policy. +For token lifetimes, specify "TokenLifetimePolicy." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..ab18d1f589 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md @@ -0,0 +1,98 @@ +--- +title: New-EntraTrustedCertificateAuthority +description: This article provides details on the New-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# New-EntraTrustedCertificateAuthority + +## Synopsis + +Creates a trusted certificate authority. + +## Syntax + +```powershell +New-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `New-EntraTrustedCertificateAuthority` cmdlet creates a trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Creates the trusted certificate authorities in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' + +$new_ca = New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation #Create CertificateAuthorityInformation object +$new_ca.AuthorityType = "RootAuthority" +$new_ca.CrlDistributionPoint = "https://example.crl" +$new_ca.DeltaCrlDistributionPoint = "https://deltaexample.crl" +$new_ca.TrustedCertificate = "Path to .cer file(including cer file name)" +New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command creates the trusted certificate authorities in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. +It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..f0703bac66 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraConditionalAccessPolicy +description: This article provides details on the Remove-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Remove-EntraConditionalAccessPolicy + +## Synopsis + +Deletes a conditional access policy in Microsoft Entra ID by Id. + +## Syntax + +```powershell +Remove-EntraConditionalAccessPolicy + -PolicyId + [] +``` + +## Description + +This cmdlet allows an admin to delete a conditional access policy in Microsoft Entra ID by Id. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Deletes a conditional access policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +$policy = Get-EntraConditionalAccessPolicy | Where-Object {$_.DisplayName -eq 'MFA policy'} +Remove-EntraConditionalAccessPolicy -PolicyId $policy.ObjectId +``` + +This command deletes a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of a conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..75ae9347b1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraFeatureRolloutPolicy +description: This article provides details on the Remove-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraBetaFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Remove-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to remove the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +Remove-EntraFeatureRolloutPolicy + -Id + [] +``` + +## Description + +An admin uses `Remove-EntraFeatureRolloutPolicy` cmdlet to remove the cloud authentication roll-out policy and have all users where policy applied to be free of the policy. + +Users in groups that were assigned to the policy falls back to the global authentication method (most common case will be federation). Specify `Id` parameter to remove the cloud authentication roll-out policy. + +## Examples + +### Example 1: Removes the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$Policy = Get-EntraFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policy'" +Remove-EntraFeatureRolloutPolicy -Id $Policy.Id +``` + +This example removes the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` - specifies the unique identifier of the cloud authentication roll-out policy. You can use `Get-EntraFeatureRolloutPolicy` to retrieve policy details. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md new file mode 100644 index 0000000000..03968e43e8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraFeatureRolloutPolicyDirectoryObject +description: This article provides details on the Remove-EntraFeatureRolloutPolicyDirectoryObject command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject + +schema: 2.0.0 +--- + +# Remove-EntraFeatureRolloutPolicyDirectoryObject + +## Synopsis + +Allows an admin to remove a group from the cloud authentication rollout policy in Microsoft Entra ID. +Users in this group revert back to the authenticating using the global policy (in most cases this will be federation). + +## Syntax + +```powershell +Remove-EntraFeatureRolloutPolicyDirectoryObject + -ObjectId + -Id + [] +``` + +## Description + +An admin uses the `Remove-EntraFeatureRolloutPolicyDirectoryObject` cmdlet to remove groups from the cloud authentication roll-out policy. + +Users in these groups start authenticating against the global authentication policy (for example, +federation). Specify `ObjectId` and `Id` parameter to remove groups from the cloud authentication roll-out policy. + +## Examples + +### Example 1: Removes a group from the cloud authentication roll-out policy from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + ObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Remove-EntraFeatureRolloutPolicyDirectoryObject @params +``` + +This command removes a group from the cloud authentication roll-out policy from Microsoft Entra ID. + +- `-Id` Parameter specifies the ID of the cloud authentication roll-out policy. +- `-ObjectId` parameter specifies the ID of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy. + +## Parameters + +### -ID + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +The unique identifier of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md new file mode 100644 index 0000000000..c1982b130d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraIdentityProvider +description: This article provides details on the Remove-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Remove-EntraIdentityProvider + +## Synopsis + +This cmdlet is used to delete an identity provider in the directory. + +## Syntax + +```powershell +Remove-EntraIdentityProvider + -IdentityProviderBaseId + [] +``` + +## Description + +This cmdlet is used to delete an identity provider that has been configured in the directory. + +The identity provider is permanently deleted. + +The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. + +## Examples + +### Example 1: Remove the identity provider in the directory + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +Remove-EntraIdentityProvider -IdentityProviderBaseId 'LinkedIn-OAUTH' +``` + +This command demonstrates how to remove the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. + +## Parameters + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraIdentityProvider](New-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..405c7db5f6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraNamedLocationPolicy +description: This article provides details on the Remove-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Remove-EntraNamedLocationPolicy + +## Synopsis + +Deletes a Microsoft Entra ID named location policy by PolicyId. + +## Syntax + +```powershell +Remove-EntraNamedLocationPolicy + -PolicyId + [] +``` + +## Description + +This cmdlet allows an admin to delete the Microsoft Entra ID named location policy. + +Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. + +## Examples + +### Example 1: Deletes a named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +Remove-EntraNamedLocationPolicy -PolicyId $policy.Id +``` + +This command demonstrates how to delete the named location policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md new file mode 100644 index 0000000000..5b9cce4030 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraOAuth2PermissionGrant +description: This article provides details on the Remove-EntraOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Remove-EntraOAuth2PermissionGrant + +## Synopsis + +Removes an OAuth2PermissionGrant. + +## Syntax + +```powershell +Remove-EntraOAuth2PermissionGrant + -ObjectId + [] +``` + +## Description + +The `Remove-EntraOAuth2PermissionGrant` cmdlet removes an OAuth2PermissionGrant object in Microsoft Entra ID. + +When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted OAuth2PermissionGrant. + +## Examples + +### Example 1: Remove an OAuth2 permission grant + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$SharePointSP = Get-EntraServicePrincipal | Where-Object {$_.DisplayName -eq 'Microsoft.SharePoint'} +$SharePointOA2AllSitesRead = Get-EntraOAuth2PermissionGrant | Where-Object {$_.ResourceId -eq $SharePointSP.ObjectId} | Where-Object {$_.Scope -eq 'AllSites.Read'} +Remove-EntraOAuth2PermissionGrant -ObjectId $SharePointOA2AllSitesRead.ObjectId +``` + +This example shows how to remove an OAuth2PermissionGrant object in Microsoft Entra ID. + +## Parameters + +### -ObjectId + +Specifies the ID of an OAuth2PermissionGrant object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..d46b6e072d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md @@ -0,0 +1,129 @@ +--- +title: Remove-EntraPermissionGrantConditionSet +description: This article provides details on the Remove-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Remove-EntraPermissionGrantConditionSet + +## Synopsis + +Delete a Microsoft Entra ID permission grant condition set by ID. + +## Syntax + +```powershell +Remove-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [] +``` + +## Description + +Delete a Microsoft Entra ID permission grant condition set object by ID. + +## Examples + +### Example 1: Delete a permission grant condition set from a policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$PermissionGrantConditionSetId = '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'excludes' + Id = $PermissionGrantConditionSetId +} +Remove-EntraPermissionGrantConditionSet @params +``` + +This example demonstrates how to remove the Microsoft Entra ID permission grant condition set by ID. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..bd9e0d012a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md @@ -0,0 +1,85 @@ +--- +title: Remove-EntraPermissionGrantPolicy +description: This article provides details on the Remove-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Remove-EntraPermissionGrantPolicy + +## Synopsis + +Removes a permission grant policy. + +## Syntax + +```powershell +Remove-EntraPermissionGrantPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraPermissionGrantPolicy` cmdlet removes a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Remove a permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +Remove-EntraPermissionGrantPolicy -Id 'my_permission_grant_policy_id' +``` + +This command removes the specified permission grant policy in Microsoft Entra ID. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. + +## Parameters + +### -Id + +The unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md new file mode 100644 index 0000000000..b35076fe82 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md @@ -0,0 +1,83 @@ +--- +title: Remove-EntraPolicy +description: This article provides details on the Remove-EntraPolicy command. + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPolicy +schema: 2.0.0 +--- + +# Remove-EntraPolicy + +## Synopsis + +Removes a policy. + +## Syntax + +```powershell +Remove-EntraPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraPolicy` cmdlet removes a policy from Microsoft Entra ID. Specify `Id` parameter to remove a specific policy. + +## Examples + +### Example 1: Remove a policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.ApplicationConfiguration' +Remove-EntraPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This command removes the specified policy from Microsoft Entra ID. + +- `-Id` - specifies the ID of the policy you want to remove. + +## Parameters + +### -Id + +The Id of the policy you want to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[New-EntraPolicy](New-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..dce8b479ed --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraTrustedCertificateAuthority +description: This article provides details on the Remove-EntraTrustedCertificateAuthority command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Remove-EntraTrustedCertificateAuthority + +## Synopsis + +Removes a trusted certificate authority. + +## Syntax + +```powershell +Remove-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `Remove-EntraTrustedCertificateAuthority` cmdlet removes a trusted certificate authority from Microsoft Entra ID. + +## Examples + +### Example 1: Remove the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object +Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command deletes the trusted certificate authorities that are defined in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. +It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md new file mode 100644 index 0000000000..f508974760 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md @@ -0,0 +1,241 @@ +--- +title: Set-EntraAuthorizationPolicy +description: This article provides details on the Set-EntraAuthorizationPolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy + +schema: 2.0.0 +--- + +# Set-EntraAuthorizationPolicy + +## Synopsis + +Updates an authorization policy. + +## Syntax + +```powershell +Set-EntraAuthorizationPolicy + [-BlockMsolPowerShell ] + [-AllowedToSignUpEmailBasedSubscriptions ] + [-AllowEmailVerifiedUsersToJoinOrganization ] + [-DisplayName ] + [-Description ] + [-DefaultUserRolePermissions ] + [-AllowedToUseSSPR ] + [] +``` + +## Description + +The `Set-EntraAuthorizationPolicy` cmdlet updates a Microsoft Entra ID authorization policy. + +For delegated scenarios, the user needs to have the `Privileged Role Administrator` Microsoft Entra role. + +## Examples + +### Example 1: Update an authorization policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' +$params = @{ + DisplayName = 'Updated displayName' + Description = 'Updated Description' + BlockMsolPowerShell = $true + AllowedToUseSSPR = $false + AllowEmailVerifiedUsersToJoinOrganization = $true + AllowedToSignUpEmailBasedSubscriptions = $true +} + +Set-EntraAuthorizationPolicy @params +``` + +This example demonstrates how to update a Microsoft Entra ID authorization policy. + +### Example 2: Update DefaultUserRolePermissions of authorization policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' +$DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions +$DefaultUserRolePermissions.AllowedToCreateApps = $false +$DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $false +$DefaultUserRolePermissions.AllowedToReadOtherUsers = $false +Set-EntraAuthorizationPolicy -DefaultUserRolePermissions $DefaultUserRolePermissions +``` + +This example demonstrates how to update a DefaultUserRolePermissions of authorization policy in Microsoft Entra ID. + +## Parameters + +### -AllowedToSignUpEmailBasedSubscriptions + +Specifies whether users can sign up for email based subscriptions. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowedToUseSSPR + +Specifies whether the Self-Serve Password Reset feature can be used by users on the tenant. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowEmailVerifiedUsersToJoinOrganization + +Specifies whether a user can join the tenant by email validation. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BlockMsolPowerShell + +Specifies whether the user-based access to the legacy service endpoint used by Microsoft Online PowerShell is blocked or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowUserConsentForRiskyApps + +Indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowInvitesFrom + +Indicates who can invite external users to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. Everyone is the default setting for all cloud environments except US Government. + +```yaml +Type: allowInvitesFrom +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultUserRolePermissions + +Contains various customizable default user role permissions. + +```yaml +Type: DefaultUserRolePermissions +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAuthorizationPolicy](Get-EntraAuthorizationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..1c140af2d6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md @@ -0,0 +1,240 @@ +--- +title: Set-EntraConditionalAccessPolicy +description: This article provides details on the Set-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Set-EntraConditionalAccessPolicy + +## Synopsis + +Updates a conditional access policy in Microsoft Entra ID by Id. + +## Syntax + +```powershell +Set-EntraConditionalAccessPolicy + -PolicyId + [-Conditions ] + [-GrantControls ] + [-DisplayName ] + [-Id ] + [-State ] + [-SessionControls ] + [] +``` + +## Description + +This cmdlet allows an admin to update a conditional access policy in Microsoft Entra ID by Id. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Update a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$cond = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$control = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$session = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + DisplayName = 'MFA policy updated' + State = 'Enabled' + Conditions = $cond + GrantControls = $control + SessionControls = $session +} + +Set-EntraConditionalAccessPolicy @params +``` + +The example shows how to update a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +### Example 2: Update display name for a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + DisplayName = 'MFA policy updated' +} + +Set-EntraConditionalAccessPolicy @params +``` + +This command updates a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-DisplayName` parameter specifies the display name of a conditional access policy. + +### Example 3: Update the state for a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + State = 'Enabled' +} + +Set-EntraConditionalAccessPolicy @params +``` + +This command updates a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Conditions + +Specifies the conditions for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessConditionSet +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GrantControls + +Specifies the controls for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessGrantControls +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionControls + +Enables limited experiences within specific cloud applications. + +```yaml +Type: ConditionalAccessSessionControls +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..9f60eb62da --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md @@ -0,0 +1,231 @@ +--- +title: Set-EntraFeatureRolloutPolicy +description: This article provides details on the Set-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Set-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to modify the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraFeatureRolloutPolicy + [-Feature ] + [-IsEnabled ] + -Id + [-IsAppliedToOrganization ] + [-AppliesTo ] + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +An admin uses the `Set-EntraFeatureRolloutPolicy` cmdlet to modify the cloud authentication rollout policy. + +This includes specifying whether the method for cloud authentication is Pass-through Authentication or Password Hash Synchronization, and whether Seamless Single Sign-On (SSO) is enabled. + +Users in groups assigned to the policy will start authenticating using the new method and Seamless SSO, if it is specified. + +## Examples + +### Example 1: Updates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + DisplayName = 'Feature-Rollout-Policytest' + IsEnabled = $false +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` - specifies the ID of cloud authentication roll-out policy. +- `-DisplayName` - specifies the display name of the cloud authentication roll-out policy. +- `-IsEnabled` - specifies the status of cloud authentication roll-out policy. + +### Example 2: Updates the Description + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Description = 'Feature-Rollout-test' +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the `-Description` of policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` Specify the ID of cloud authentication roll-out policy. +- `-Description` Specifies the description of the cloud authentication roll-out policy. + +### Example 3: Updates the IsAppliedToOrganization + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + IsAppliedToOrganization = $false +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the `-IsAppliedToOrganization` parameter of policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` Specify the ID of cloud authentication roll-out policy. +- `-IsAppliedToOrganization` Parameter determines whether a particular feature rollout policy should be applied to the entire organization or not. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Feature + +Specifies a feature assigned to the cloud authentication roll-out policy. + +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +```yaml +Type: FeatureEnum +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies the status of cloud authentication roll-out policy. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliesTo + +Specifies a list of Microsoft Entra ID objects that is assigned to the feature. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAppliedToOrganization + +Specifies if the cloud authentication roll-out policy applied to the entire organization. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md new file mode 100644 index 0000000000..557f8d8cee --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md @@ -0,0 +1,195 @@ +--- +title: Set-EntraIdentityProvider +description: This article provides details on the Set-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Set-EntraIdentityProvider + +## Synopsis + +Update the properties of an existing identity provider configured in the directory. + +## Syntax + +```powershell +Set-EntraIdentityProvider + -IdentityProviderBaseId + [-Type ] + [-ClientSecret ] + [-ClientId ] + [-Name ] + [] +``` + +## Description + +The `Set-EntraIdentityProvider` cmdlet is used to update the properties of an existing identity provider. + +The type of the identity provider can't be modified. + +## Examples + +### Example 1: Update client id of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + ClientId = 'NewClientID' +} +Set-EntraIdentityProvider @params +``` + +This example updates the client ID for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. + +### Example 2: Update client secret of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + ClientSecret = 'NewClientSecret' +} +Set-EntraIdentityProvider @params +``` + +This example updates the client secret for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. + +### Example 3: Update display name of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + Name = 'NewGoogleName' +} +Set-EntraIdentityProvider @params +``` + +This example updates the display name for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-Name` parameter specifies the display name of the identity provider. + +## Parameters + +### -ClientId + +The client identifier for the application, obtained during the application's registration with the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecret + +The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentityProviderBaseId +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Name + +The display name of the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. + +For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraIdentityProvider](New-EntraIdentityProvider.md) + +[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..4f55ee4639 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md @@ -0,0 +1,258 @@ +--- +title: Set-EntraNamedLocationPolicy +description: This article provides details on the Set-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Set-EntraNamedLocationPolicy + +## Synopsis + +Updates a named location policy in Microsoft Entra ID by PolicyId. + +## Syntax + +```powershell +Set-EntraNamedLocationPolicy + -PolicyId + [-OdataType ] + [-IpRanges ] + [-IncludeUnknownCountriesAndRegions ] + [-IsTrusted ] + [-DisplayName ] + [-Id ] + [-CountriesAndRegions ] + [] +``` + +## Description + +This cmdlet allows an admin to update a named location policy in Microsoft Entra ID by PolicyId. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Update an IP named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange +$ipRanges.cidrAddress = '6.5.4.3/32' +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.ipNamedLocation' + IsTrusted = $false + IncludeUnknownCountriesAndRegions = $false + IpRanges = $ipRanges +} +Set-EntraNamedLocationPolicy @params +``` + +This example shows how to update an IP named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. +- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. + +### Example 2: Update a country named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.countryNamedLocation' + IncludeUnknownCountriesAndRegions = $true +} +Set-EntraNamedLocationPolicy @params +``` + +This command updates a country named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. + +### Example 3: Update display name of a named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.ipNamedLocation' + DisplayName = 'NewName' +} +Set-EntraNamedLocationPolicy @params +``` + +This command updates display name of named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OdataType + +Specifies the OData type of a named location policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpRanges + +List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsTrusted + +Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CountriesAndRegions + +Specifies the countries and regions for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeUnknownCountriesAndRegions + +Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the Id of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..45e4ecc72a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md @@ -0,0 +1,309 @@ +--- +title: Set-EntraPermissionGrantConditionSet +description: This article provides details on the Set-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Set-EntraPermissionGrantConditionSet + +## Synopsis + +Update an existing Microsoft Entra ID permission grant condition set. + +## Syntax + +```powershell +Set-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [-Permissions ] + [-ClientApplicationTenantIds ] + [-ClientApplicationIds ] + [-ResourceApplication ] + [-PermissionType ] + [-PermissionClassification ] + [-ClientApplicationsFromVerifiedPublisherOnly ] + [-ClientApplicationPublisherIds ] + [] +``` + +## Description + +Updates a Microsoft Entra ID permission grant condition set object identified by Id. + +## Examples + +### Example 1: Update a permission grant condition set to includes permissions that is classified as low + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' + PermissionClassification = 'low' +} + +Set-EntraPermissionGrantConditionSet @params +``` + +This command updates sets the specified permission grant set to classify as low. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. + +### Example 2: Update a permission grant condition set + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' + PermissionType = 'delegated' + PermissionClassification = 'low' + ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + Permissions = @('All') + ClientApplicationIds = @('All') + ClientApplicationTenantIds = @('All') + ClientApplicationPublisherIds = @('All') + ClientApplicationsFromVerifiedPublisherOnly = $true +} + +Set-EntraPermissionGrantConditionSet @params +``` + +This command updates sets the specified permission grant set. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionType + +Specific type of permissions (application, delegated) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionClassification + +Specific classification (all, low, medium, high) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions + +The identifier of the resource application to scope consent operation down to. +It could be @("All") or a list of permission IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationIds + +The set of client application IDs to scope consent operation down to. +It could be @("All") or a list of client application IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationTenantIds + +The set of client application tenant IDs to scope consent operation down to. +It could be @("All") or a list of client application tenant IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationPublisherIds + +The set of client applications publisher IDs to scope consent operation down to. +It could be @("All") or a list of client application publisher IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationsFromVerifiedPublisherOnly + +A value indicates whether to only includes client applications from verified publishers. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceApplication + +The identifier of the resource application to scope consent operation down to. +It could be "Any" or a specific resource application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..db649bc8da --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md @@ -0,0 +1,143 @@ +--- +title: Set-EntraPermissionGrantPolicy +description: This article provides details on the Set-EntraPermissionGrantPolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Set-EntraPermissionGrantPolicy + +## Synopsis + +Updates a permission grant policy. + +## Syntax + +```powershell +Set-EntraPermissionGrantPolicy + -Id + [-DisplayName ] + [-Description ] + [] +``` + +## Description + +The `Set-EntraPermissionGrantPolicy` command updates a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Update description of permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +$params = @{ + Id = $policy.Id + Description = 'Updated description' +} + +Set-EntraPermissionGrantPolicy @params +``` + +This command updates the description of the specified permission grant policy. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-Description` parameter specifies the description for the permission grant policy. + +### Example 2: Update display name of permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +$params = @{ + Id = $policy.Id + DisplayName = 'Updated DisplayName' +} + +Set-EntraPermissionGrantPolicy @params +``` + +This command updates the display name of the specified permission grant policy. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-DisplayName` parameter specifies the display name for the permission grant policy. + +## Parameters + +### -Description + +Specifies the description of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md new file mode 100644 index 0000000000..9f5e238eb2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md @@ -0,0 +1,211 @@ +--- +title: Set-EntraPolicy +description: This article provides details on the Set-EntraPolicy command. + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Set-EntraPolicy + +## Synopsis + +Updates a policy. + +## Syntax + +```powershell +Set-EntraPolicy + -Id + [-Definition ] + [-DisplayName ] + [-Type ] + [-IsOrganizationDefault ] + [] +``` + +## Description + +The `Set-EntraPolicy` cmdlet sets a policy in Microsoft Entra ID. Specify `Id` parameter to updates specific policy. + +## Examples + +### Example 1: Update a policy display name + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DisplayName = 'NewUpdated' +} +Set-EntraPolicy @params +``` + +This command updates display name of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `DisplayName` specifies the display name. + +### Example 2: Update a policy definition + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') +} +Set-EntraPolicy @params +``` + +This command updates definition of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `Definition` specifies the array of stringified JSON that contains all the rules of the policy. +In this example, `@('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}')` represents definition of the activityBasedTimeoutPolicy. + +### Example 3: Update a policy organization default + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + IsOrganizationDefault = $false +} +Set-EntraPolicy @params +``` + +This command updates organization default of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. + +### Example 4: Update policy type + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Type = 'ActivityBasedTimeoutPolicy' +} +Set-EntraPolicy @params +``` + +This example demonstrates how to update the `type` property of a specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `-Type` specifies the type of policy. In this example, `ActivityBasedTimeoutPolicy` represents the type of policy. + +## Parameters + +### -Definition + +Specifies the array of stringified JSON that contains all the rules of the policy. +For example -Definition @('{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}'). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsOrganizationDefault + +True if this policy is the organizational default. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of policy. +For token lifetimes, use "TokenLifetimePolicy." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The ID of the policy for which you want to set values. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[New-EntraPolicy](New-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..cdfdb92eaf --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md @@ -0,0 +1,92 @@ +--- +title: Set-EntraTrustedCertificateAuthority +description: This article provides details on the Set-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Set-EntraTrustedCertificateAuthority + +## Synopsis + +Updates a trusted certificate authority. + +## Syntax + +```powershell +Set-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation +``` + +## Description + +The `Set-EntraTrustedCertificateAuthority` cmdlet updates a trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Updates the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object +$cer[0].CrlDistributionPoint = "https://example.crl" +Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command updates the trusted certificate authorities that are defined in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md new file mode 100644 index 0000000000..b463aa7035 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md @@ -0,0 +1,426 @@ +--- +title: Get-EntraUser +description: This article provides details on the Get-EntraUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUser + +schema: 2.0.0 +--- + +# Get-EntraUser + +## Synopsis + +Gets a user. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraUser + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraUser + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraUser + -UserId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUser` cmdlet gets a user from Microsoft Entra ID. + +## Examples + +### Example 1: Get top three users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Top 3 +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Angel Brown cccccccc-2222-3333-4444-dddddddddddd AngelB@contoso.com AngelB@contoso.com +Avery Smith dddddddd-3333-4444-5555-eeeeeeeeeeee AveryS@contoso.com AveryS@contoso.com +Sawyer Miller eeeeeeee-4444-5555-6666-ffffffffffff SawyerM@contoso.com SawyerM@contoso.com +``` + +This example demonstrates how to get top three users from Microsoft Entra ID. + +### Example 2: Get a user by ID + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -UserId 'SawyerM@contoso.com' +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc sawyerm@tenant.com sawyerm@tenant.com +``` + +This command gets the specified user. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. + +### Example 3: Search among retrieved users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -SearchString 'New' +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User88 bbbbbbbb-1111-2222-3333-cccccccccccc demo99@tenant.com +New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com +``` + +This cmdlet gets all users that match the value of SearchString against the first characters in DisplayName or UserPrincipalName. + +### Example 4: Get a user by userPrincipalName + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "userPrincipalName eq 'SawyerM@contoso.com'" +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Sawyer Miller cccccccc-2222-3333-4444-dddddddddddd SawyerM@contoso.com +``` + +This command gets the specified user. + +### Example 5: Get a user by MailNickname + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "startswith(MailNickname,'Ada')" +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Mark Adams bbbbbbbb-1111-2222-3333-cccccccccccc Adams@contoso.com Adams@contoso.com +``` + +In this example, we retrieve all users whose MailNickname starts with Ada. + +### Example 6: Get SignInActivity of a User + +```powershell +Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All' +Get-EntraUser -UserId 'SawyerM@contoso.com' -Property 'SignInActivity' | Select-Object -ExpandProperty 'SignInActivity' +``` + +```Output +lastNonInteractiveSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa +lastSignInRequestId : cccccccc-2222-3333-4444-dddddddddddd +lastSuccessfulSignInDateTime : 9/9/2024 1:12:13 PM +lastNonInteractiveSignInDateTime : 9/9/2024 1:12:13 PM +lastSuccessfulSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa +lastSignInDateTime : 9/7/2024 9:15:41 AM +``` + +This example demonstrates how to retrieve the SignInActivity of a specific user by selecting a property. + +### Example 7: List users with disabled accounts + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "accountEnabled eq false" | Select-Object DisplayName, Id, Mail, UserPrincipalName +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com +``` + +This example demonstrates how to retrieve all users with disabled accounts. + +### Example 8: List users based in a specific country + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$usersInCanada = Get-EntraUser -Filter "Country eq 'Canada'" +$usersInCanada | Select-Object Id, DisplayName, UserPrincipalName, OfficeLocation, Country | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName OfficeLocation Country +-- ----------- ----------------- -------------- ------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com 23/2102 Canada +``` + +This example demonstrates how to retrieve all users based in Canada. + +### Example 9: List user count per department + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$departmentCounts = Get-EntraUser -All | Group-Object -Property Department | Select-Object Name, @{Name="MemberCount"; Expression={$_.Count}} +$departmentCounts | Format-Table Name, MemberCount -AutoSize +``` + +```Output +Name MemberCount +---- ----------- + 7 +Engineering 2 +Executive Management 1 +Finance 1 +HR 1 +``` + +This example demonstrates how to retrieve user count in each department. + +### Example 10: List disabled users with active licenses + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$disabledUsersWithLicenses = Get-EntraUser -Filter "accountEnabled eq false" -All | Where-Object { + $_.AssignedLicenses -ne $null -and $_.AssignedLicenses.Count -gt 0 +} +$disabledUsersWithLicenses | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AccountEnabled +-- ----------- ----------------- -------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com False +``` + +This example demonstrates how to retrieve disabled users with active licenses. + +### Example 11: Retrieve guest users with active licenses + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All +$guestUsersWithLicenses = foreach ($guest in $guestUsers) { + if ($guest.AssignedLicenses.Count -gt 0) { + [pscustomobject]@{ + Id = $guest.Id + DisplayName = $guest.DisplayName + UserPrincipalName = $guest.UserPrincipalName + AssignedLicenses = ($guest.AssignedLicenses | ForEach-Object { $_.SkuId }) -join ", " + } + } +} +$guestUsersWithLicenses | Format-Table Id, DisplayName, UserPrincipalName, AssignedLicenses -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AssignedLicenses +-- ----------- ----------------- ---------------- +cccccccc-2222-3333-4444-dddddddddddd Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com c42b9cae-ea4f-4ab7-9717-81576235ccac +``` + +This example demonstrates how to retrieve guest users with active licenses. + +### Example 12: Retrieve users without managers + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$allUsers = Get-EntraUser -All +$usersWithoutManagers = foreach ($user in $allUsers) { + $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue + if (-not $manager) { + [pscustomobject]@{ + Id = $user.Id + DisplayName = $user.DisplayName + UserPrincipalName = $user.UserPrincipalName + } + } +} +$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName +-- ----------- ----------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com +bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com +``` + +This example demonstrates how to retrieve users without managers. + +### Example 13: List failed sign-ins for a user + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" +$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize +``` + +This example demonstrates how to retrieve failed sign-ins for a user. + +### Example 14: List all guest users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All +$guestUsers | Select-Object DisplayName, UserPrincipalName, Id, createdDateTime, creationType, accountEnabled, UserState | Format-Table -AutoSize +``` + +```Output +DisplayName UserPrincipalName Id CreatedDateTime CreationType AccountEnabled UserState +----------- ----------------- -- --------------- ------------ -------------- --------- +Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com bbbbbbbb-1111-2222-3333-cccccccccccc 9/13/2024 6:37:33 PM Invitation True Accepted +``` + +This example demonstrates how to retrieve list all guest users. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. +Details on querying with OData can be [found here](https://learn.microsoft.com/graph/aad-advanced-queries?tabs=powershell). + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a User Principal Name (UPN) or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraUser](New-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..5ad745b39b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md @@ -0,0 +1,184 @@ +--- +title: Get-EntraUserAppRoleAssignment +description: This article provides details on the Get-EntraUserAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraUserAppRoleAssignment + +## Synopsis + +Get a user application role assignment. + +## Syntax + +```powershell +Get-EntraUserAppRoleAssignment + -ObjectId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserAppRoleAssignment` cmdlet gets a user application role assignment. + +## Examples + +### Example 1: Get a user application role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +$UserId = (Get-EntraUser -Top 1).ObjectId +Get-EntraUserAppRoleAssignment -ObjectId $UserId +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 + 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 + 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 + +``` + +This example retrieves a user application role assignment for the user in $UserId. You can use the command `Get-EntraUser` to get Service principal Object ID. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +### Example 2: Get all application role assignments + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -All +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 + 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 + 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 +``` + +This example demonstrates how to retrieve all application role assignment for the specified user. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +### Example 3: Get top two application role assignments + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -Top 2 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 +``` + +This example demonstrates how to retrieve top two application role assignment for the specified user. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) + +[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md new file mode 100644 index 0000000000..56eb9c60b5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraUserCreatedObject +description: This article provides details on the Get-EntraUserCreatedObject Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserCreatedObject + +schema: 2.0.0 +--- + +# Get-EntraUserCreatedObject + +## Synopsis + +Get objects created by the user. + +## Syntax + +```powershell +Get-EntraUserCreatedObject + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserCreatedObject` cmdlet gets objects created by a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get a user-created object + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example retrieves an object created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +### Example 2: Get all user-created objects + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example retrieves all objects created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +### Example 3: Get a top one user-created object + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves top one object created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md new file mode 100644 index 0000000000..0a4ea05e0b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraUserDirectReport +description: This article provides details on the Get-EntraUserDirectReport command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserDirectReport + +schema: 2.0.0 +--- + +# Get-EntraUserDirectReport + +## Synopsis + +Get the user's direct reports. + +## Syntax + +```powershell +Get-EntraUserDirectReport + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserDirectReport` cmdlet gets the direct reports for a user in Microsoft Entra ID. Specify `UserId` parameter gets the direct reports for a user. + +## Examples + +### Example 1: Get a user's direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve direct reports for a user in Microsoft Entra ID. + +- `-UserId` Parameter specifies the ID of a user (UserPrincipalName or UserId). + +### Example 2: Get all direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve all direct reports for a user in Microsoft Entra ID. + +- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). + +### Example 3: Get a top two direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve top five direct reports for a user in Microsoft Entra ID. + +- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user's UserPrincipalName or UserId in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md new file mode 100644 index 0000000000..96b66cd878 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md @@ -0,0 +1,111 @@ +--- +title: Get-EntraUserExtension +description: This article provides details on the Get-EntraUserExtension command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserExtension + +schema: 2.0.0 +--- + +# Get-EntraUserExtension + +## Synopsis + +Gets a user extension. + +## Syntax + +```powershell +Get-EntraUserExtension + -UserId + [-Property ] + [] +``` + +## Description + +The Get-EntraUserExtension cmdlet gets a user extension in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve extension attributes for a user + +```powershell +Connect-Entra -Scopes 'User.Read' +$UserId = (Get-EntraUser -ObjectId 'SawyerM@contoso.com').ObjectId +Get-EntraUserExtension -UserId $UserId +``` + +```Output +onPremisesDistinguishedName : +@odata.context : https://graph.microsoft.com/v1.0/$metadata#users(identities,onPremisesDistinguishedName,employeeId,createdDateTime)/$entity +createdDateTime : 18/07/2024 05:13:40 +employeeId : +identities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} +userIdentities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} +``` + +This example shows how to retrieve the extension attributes for a specified user. You can use the command `Get-EntraUser` to get user object Id. + +- `-UserId` parameter specifies the user object Id. + +## Parameters + +### -UserId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraUserExtension](Remove-EntraUserExtension.md) + +[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md new file mode 100644 index 0000000000..6dbad40666 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md @@ -0,0 +1,105 @@ +--- +title: Get-EntraUserLicenseDetail +description: This article provides details on the Get-EntraUserLicenseDetail command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail + +schema: 2.0.0 +--- + +# Get-EntraUserLicenseDetail + +## Synopsis + +Retrieves license details for a user. + +## Syntax + +```powershell +Get-EntraUserLicenseDetail + -UserId + [-Property ] + [] +``` + +## Description + +This cmdlet retrieves license details for a user. + +## Examples + +### Example 1: Retrieve user license details + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserLicenseDetail -UserId 'SawyerM@contoso.com' +``` + +```Output +Id SkuId SkuPartNumber +-- ----- ------------- +X8Wu1RItQkSNL8zKldQ5DiH6ThjDmF1OlavQcFOpbmc aaaaaaaa-0b0b-1c1c-2d2d-333333333333 INFORMATION_PROTECTION_COMPLIANCE +X8Wu1RItQkSNL8zKldQ5Dk8SXrDMx6BFpqqM94yUaWg bbbbbbbb-1c1c-2d2d-3e3e-444444444444 EMSPREMIUM +X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERPRISEPREMIUM +``` + +This example demonstrates how to retrieve license details for a user from Microsoft Entra ID. + +## Parameters + +### -UserId + +The object ID of the user for which the license details are retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md new file mode 100644 index 0000000000..a72d6f6ddb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraUserManager +description: This article provides details on the Get-EntraUserManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserManager + +schema: 2.0.0 +--- + +# Get-EntraUserManager + +## Synopsis + +Gets the manager of a user. + +## Syntax + +```powershell +Get-EntraUserManager + -UserId + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserManager` cmdlet gets the manager of a user in Microsoft Entra ID. Specify +`UserId` parameter to get the specific manager of user. + +## Examples + +### Example 1: Get the manager of a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserManager -UserId 'SawyerM@contoso.com' +``` + +```Output +DeletedDateTime : +Id : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee +@odata.context : https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity +@odata.type : #microsoft.graph.user +accountEnabled : True +businessPhones : {+1 858 555 0109} +city : San Diego +createdDateTime : 2023-07-07T14:18:05Z +country : United States +department : Sales & Marketing +displayName : Sawyer Miller +``` + +This example demonstrates how to retrieve the manager of a specific user. + +- `-UserId` Parameter specifies UserId or User Principal Name of User. + +### Example 2: Retrieve users without managers + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$allUsers = Get-EntraUser -All +$usersWithoutManagers = foreach ($user in $allUsers) { + $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue + if (-not $manager) { + [pscustomobject]@{ + Id = $user.Id + DisplayName = $user.DisplayName + UserPrincipalName = $user.UserPrincipalName + } + } +} +$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName +-- ----------- ----------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com +bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com +``` + +This example demonstrates how to retrieve users without managers. + +## Parameters + +### -UserId + +The unique identifier of a user in Microsoft Entra ID (User Principal Name or UserId). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraUserManager](Remove-EntraUserManager.md) + +[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md new file mode 100644 index 0000000000..0f685737af --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md @@ -0,0 +1,218 @@ +--- +title: Get-EntraUserMembership +description: This article provides details on the Get-EntraUserMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserMembership + +schema: 2.0.0 +--- + +# Get-EntraUserMembership + +## Synopsis + +Get user memberships. + +## Syntax + +```powershell +Get-EntraUserMembership + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserMembership` cmdlet gets user memberships in Microsoft Entra ID. + +## Examples + +### Example 1: Get user memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +33dd33dd-ee44-ff55-aa66-77bb77bb77bb +44ee44ee-ff55-aa66-bb77-88cc88cc88cc +55ff55ff-aa66-bb77-cc88-99dd99dd99dd +``` + +This example demonstrates how to retrieve user memberships in Microsoft Entra ID. + +### Example 2: Get user memberships with additional details + +```powershell +Connect-Entra -Scopes 'User.Read' +$userMemberships = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' +$membershipDetails = $userMemberships | ForEach-Object { + $membershipDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + odataType = $membershipDetail.'@odata.type' + displayName = $membershipDetail.displayName + Id = $membershipDetail.Id + } +} +$membershipDetails | Select-Object odataType, displayName, Id +``` + +```Output +odataType displayName Id +--------- ----------- -- +#microsoft.graph.group Contoso Group 33dd33dd-ee44-ff55-aa66-77bb77bb77bb +#microsoft.graph.group Helpdesk Group 55ff55ff-aa66-bb77-cc88-99dd99dd99dd +#microsoft.graph.directoryRole Attribute Assignment Reader 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +#microsoft.graph.directoryRole Attribute Definition Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This example demonstrates how to retrieve user memberships in Microsoft Entra ID with more lookup details. + +### Example 3: Get All memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +33dd33dd-ee44-ff55-aa66-77bb77bb77bb +44ee44ee-ff55-aa66-bb77-88cc88cc88cc +55ff55ff-aa66-bb77-cc88-99dd99dd99dd +``` + +This example demonstrates how to retrieve users all memberships in Microsoft Entra ID. + +### Example 4: Get top three memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This example demonstrates how to retrieve users top three memberships in Microsoft Entra ID. + +### Example 5: List groups that Sawyer Miller is a member of + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$groups = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' +$groups | Select-Object DisplayName, Id, GroupTypes, Visibility | Format-Table -AutoSize +``` + +```Output +DisplayName Id GroupTypes Visibility +----------- -- ---------- ---------- +Contoso Group bbbbbbbb-1111-2222-3333-cccccccccccc {Unified} Public +``` + +This example demonstrates how to retrieve the groups that a user is a member of. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md new file mode 100644 index 0000000000..b69676b2e5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md @@ -0,0 +1,201 @@ +--- +title: Get-EntraUserOAuth2PermissionGrant +description: This article provides details on the Get-EntraUserOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraUserOAuth2PermissionGrant + +## Synopsis + +Gets an oAuth2PermissionGrant object. + +## Syntax + +```powershell +Get-EntraUserOAuth2PermissionGrant + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for the specified user in Microsoft Entra ID. Specify `UserId` parameter to retrieve an oAuth2PermissionGrant object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation. + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator +- Directory Readers +- Global Reader +- Guest Inviter + +## Examples + +### Example 1: Retrieve the OAuth2 permission grants for a user + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using the ObjectId parameter. Use the `Get-EntraUser` cmdlet to obtain the `UserId` value. + +### Example 2: Retrieve the OAuth2 permission grants for a user using object ID parameter + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using object ID parameter. + +- `-UserId` parameter specifies the user ID. + +### Example 3: Retrieve the OAuth2 permission grants for a user using All parameter + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using All parameter. + +- `-ObjectId` parameter specifies the user ID. + +### Example 4: Retrieve top one OAuth2 permission grant + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -ObjectId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +``` + +This Example Retrieve top one the OAuth2 permission grant in Microsoft Entra ID. + +- `-UserId` parameter specifies the user ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a User Principal Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md new file mode 100644 index 0000000000..b6f4ade3c7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md @@ -0,0 +1,166 @@ +--- +title: Get-EntraUserOwnedDevice +description: This article provides details on the Get-EntraUserOwnedDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice + +schema: 2.0.0 +--- + +# Get-EntraUserOwnedDevice + +## Synopsis + +Get registered devices owned by a user. + +## Syntax + +```powershell +Get-EntraUserOwnedDevice + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOwnedDevice` cmdlet gets registered devices owned by the specified user in Microsoft Entra ID. + +## Examples + +### Example 1: Get devices owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 +``` + +This command gets the registered devices owned by the specified user. + +### Example 2: Get all devices owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -All +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 +``` + +This command gets all the registered devices owned by the specified user. + +### Example 3: Get top one device owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +``` + +This command gets top one registered device owned by the specified user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md new file mode 100644 index 0000000000..cc4f9de59d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md @@ -0,0 +1,208 @@ +--- +title: Get-EntraUserOwnedObject +description: This article provides details on the Get-EntraUserOwnedObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedObject + +schema: 2.0.0 +--- + +# Get-EntraUserOwnedObject + +## Synopsis + +Get objects owned by a user. + +## Syntax + +```powershell +Get-EntraUserOwnedObject + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOwnedObject` cmdlet gets objects owned by a user in Microsoft Entra ID. Specify `UserId` parameter to get objects owned by user. + +## Examples + +### Example 1: Get objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example retrieves objects owned by the specified user. + +- `-UserId` Parameter specifies the ID of a user as a UserPrincipalName or UserId. + +### Example 2: Get objects owned by a user with additional details + +```powershell +Connect-Entra -Scopes 'User.Read' +$ownedObjects = Get-EntraUserOwnedObject -ObjectId 'SawyerM@contoso.com' + +$objectDetails = $ownedObjects | ForEach-Object { + $objectDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + odataType = $objectDetail.'@odata.type' + displayName = $objectDetail.displayName + Id = $objectDetail.Id + } +} +$objectDetails | Format-Table -Property odataType, displayName, Id -AutoSize +``` + +```Output +odataType displayName Id +--------- ----------- -- +#microsoft.graph.group Contoso FTE Group bbbbbbbb-1111-2222-3333-cccccccccccc +#microsoft.graph.group Digital Engineering Group aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example retrieves objects owned by the specified user with more lookup details. + +### Example 3: Get all objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example retrieves all the objects owned by the specified user. + +- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. + +### Example 4: Get top three objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves the top three objects owned by the specified user. + +- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md new file mode 100644 index 0000000000..c58d964a67 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md @@ -0,0 +1,165 @@ +--- +title: Get-EntraUserRegisteredDevice +description: This article provides details on the Get-EntraUserRegisteredDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice + +schema: 2.0.0 +--- + +# Get-EntraUserRegisteredDevice + +## Synopsis + +Get devices registered by a user. + +## Syntax + +```powershell +Get-EntraUserRegisteredDevice + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserRegisteredDevice` cmdlet gets devices registered by a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get registered devices + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This command gets the devices that are registered to the specified user. + +### Example 2: Get all registered devices + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This command gets all the devices that are registered to the specified user. + +### Example 3: Get one registered device + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +``` + +This command gets the top one device that are registered to the specified user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md new file mode 100644 index 0000000000..3514e4f4ac --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md @@ -0,0 +1,109 @@ +--- +title: Get-EntraUserThumbnailPhoto +description: This article provides details on the Get-EntraUserThumbnailPhoto command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto + +schema: 2.0.0 +--- + +# Get-EntraUserThumbnailPhoto + +## Synopsis + +Retrieve the thumbnail photo of a user. + +## Syntax + +```powershell +Get-EntraUserThumbnailPhoto + -UserId + [-Property ] + [] +``` + +## Description + +Retrieve the thumbnail photo of a user. + +## Examples + +### Example 1: Retrieve thumbnail photo by Id + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserThumbnailPhoto -UserId 'SawyerM@contoso.com' +``` + +```Output +Id Height Width +-- ------ ----- +default 292 278 +``` + +This example shows how to retrieve the thumbnail photo of a user that is specified through the value of the UserId parameter. + +- `-UserId` parameter specifies the user for which the thumbnail photo is retrieved. + +## Parameters + +### -UserId + +The object ID of the user for which the thumbnail photo is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Boolean + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraUserThumbnailPhoto](Set-EntraUserThumbnailPhoto.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md new file mode 100644 index 0000000000..62a06bd347 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md @@ -0,0 +1,816 @@ +--- +title: New-EntraUser +description: This article provides details on the New-EntraUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUser + +schema: 2.0.0 +--- + +# New-EntraUser + +## Synopsis + +Creates a Microsoft Entra ID user. + +## Syntax + +```powershell +New-EntraUser + -DisplayName + -AccountEnabled + -PasswordProfile + [-City ] + [-UserStateChangedOn ] + [-CompanyName ] + [-PreferredLanguage ] + [-FacsimileTelephoneNumber ] + [-GivenName ] + [-Mobile ] + [-UsageLocation ] + [-PostalCode ] + [-AgeGroup ] + [-CreationType ] + [-ExtensionProperty ] + [-ConsentProvidedForMinor ] + [-MailNickName ] + [-ImmutableId ] + [-Country ] + [-SignInNames ] + [-Department ] + [-PasswordPolicies ] + [-JobTitle ] + [-IsCompromised ] + [-UserState ] + [-UserType ] + [-OtherMails ] + [-PhysicalDeliveryOfficeName ] + [-UserPrincipalName ] + [-State ] + [-StreetAddress ] + [-TelephoneNumber ] + [-Surname ] + [-ShowInAddressList ] + [] +``` + +## Description + +The `New-EntraUser` cmdlet creates a user in Microsoft Entra ID. Specify the `DisplayName`,`AccountEnabled`, and `PasswordProfile` parameter to create a user. + +## Examples + +### Example 1: Create a user using MailNickName parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$userParams = @{ + DisplayName = 'Avery Iona' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'AveryI@contoso.com' + AccountEnabled = $true + MailNickName = 'averyi' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Avery Iona AveryI@contoso.com Member +``` + +This command creates a new user. + +### Example 2: Create a user using AgeGroup parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$userParams = @{ + DisplayName = 'Peyton Davis' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'PeytonD@contoso.com' + AccountEnabled = $true + MailNickName = 'PeytonD' + AgeGroup = 'adult' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +bbbbbbbb-1111-2222-3333-cccccccccccc Peyton Davis PeytonD@contoso.com Member +``` + +This command creates a new user. + +### Example 3: Create a user using City parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$userParams = @{ + DisplayName = 'Blake Martin' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'BlakeM@contoso.com' + AccountEnabled = $true + MailNickName = 'BlakeM' + City = 'New York' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +cccccccc-2222-3333-4444-dddddddddddd Blake Martin BlakeM@contoso.com Member +``` + +This command creates a new user. + +### Example 4: Create a user using Department parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$userParams = @{ + DisplayName = 'Parker Jones' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'ParkerJ@contoso.com' + AccountEnabled = $true + MailNickName = 'ParkerJ' + Department = 'IT' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +dddddddd-3333-4444-5555-eeeeeeeeeeee Parker Jones ParkerJ@contoso.com Member +``` + +This command creates a new user. + +### Example 5: Create a user using Mobile parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$UserParams = @{ + DisplayName = 'Sawyer Miller' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'SawyerM@contoso.com' + AccountEnabled = $true + MailNickName = 'SawyerM' + Mobile = '+18989898989' +} + +New-EntraUser @UserParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com Member +``` + +This command creates a new user. + +## Parameters + +### -AccountEnabled + +Indicates whether the user's account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -City + +Specifies the user's city. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country + +Specifies the user's country. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreationType + +Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. +Possible values are "LocalAccount" and null. + +- When user creating a local account, the property is required and you must set it to "LocalAccount". +- When user creating a work or school account, don't specify the property or set it to null. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Department + +Specifies the user's department. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the user's display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProperty + +Add data to custom user properties as the basic **open extensions** or the more versatile **schema extensions**. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GivenName + +Specifies the user's given name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmutableId + +This property is used to associate an on-premises user account to their Microsoft Entra ID user object. +This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. + +Important: The $ and _ characters can't be used when specifying this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompromised + +Indicates whether this user is compromised. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JobTitle + +Specifies the user's job title. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickName + +Specifies the user's mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Mobile + +Specifies the user's mobile phone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OtherMails + +A list of other email addresses for the user; for example: "", "". + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordPolicies + +Specifies password policies for the user. +This value is an enumeration with one possible value being "DisableStrongPassword", which allows weaker passwords than the default policy to be specified. +"DisablePasswordExpiration" can also be specified. +The two might be specified together; for example: "DisablePasswordExpiration, DisableStrongPassword". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordProfile + +Specifies the user's password profile. + +The parameter type for this parameter is "PasswordProfile". + +In order to pass a parameter of this type, you first need to create a variable in PowerShell with that type: + +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + +Then you can proceed to set the value of the password in this variable: + +$PasswordProfile.Password = "\" + +And finally you can pass this variable to the cmdlet: + +New-EntraUser -PasswordProfile $PasswordProfile ... + +Other attributes that can be set in the PasswordProfile are + +- $PasswordProfile.EnforceChangePasswordPolicy - a boolean indicating that the change password policy is enababled or disabled for this user $PasswordProfile. + +- ForceChangePasswordNextLogin - a boolean indicating that the user must change the password at the next sign in. + +```yaml +Type: PasswordProfile +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PhysicalDeliveryOfficeName + +Specifies the user's physical delivery office name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostalCode + +Specifies the user's postal code. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredLanguage + +Specifies the user's preferred language. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShowInAddressList + +If True, show this user in the address list. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInNames + +Specifies the collection of sign-in names for a local account in a Microsoft Entra ID B2C tenant. + +Each sign-in name must be unique across the company/tenant. + +The property must be specified when you create a local account user; don't specify it when you create a work or school account. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the user's state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreetAddress + +Specifies the user's street address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Surname + +Specifies the user's surname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TelephoneNumber + +Specifies a telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsageLocation + +A two letter country code (ISO standard 3166). + +Required for users that are assigned licenses due to legal requirement to check for availability of services in countries. + +Examples include: "US", "JP", and "GB". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPrincipalName + +The user principal name (UPN) of the user. + +The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. + +By convention, this UPN should map to the user's email name. + +The general format is "alias@domain". + +For work or school accounts, the domain must be present in the tenant's collection of verified domains. + +This property is required when a work or school account is created; it's optional for local accounts. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserType + +A string value that can be used to classify user types in your directory, such as "Member" and "Guest". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FacsimileTelephoneNumber + +Specifies the user's telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AgeGroup + +Specifies the user's age group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompanyName + +Specifies the user's company name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentProvidedForMinor + +Sets whether consent was obtained for minors. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserState + +For an external user invited to the tenant using the invitation API, this property represents the invited user's +invitation status. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserStateChangedOn + +Shows the timestamp for the latest change to the userState property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..3ede3eecff --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md @@ -0,0 +1,209 @@ +--- +title: New-EntraUserAppRoleAssignment +description: This article provides details on the New-EntraUserAppRoleAssignment command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraUserAppRoleAssignment + +## Synopsis + +Assigns a user to an application role. + +## Syntax + +```powershell +New-EntraUserAppRoleAssignment + -ObjectId + -PrincipalId + -Id + -ResourceId + [] +``` + +## Description + +The `New-EntraUserAppRoleAssignment` cmdlet assigns a user to an application role in Microsoft Entra ID. + +To grant an app role assignment to a user, you need three identifiers: + +- PrincipalId: The Id of the user to whom you are assigning the app role. + +- ResourceId: The Id of the resource servicePrincipal that has defined the app role. + +- Id: The Id of the appRole (defined on the resource service principal) to assign to the user. + +## Examples + +### Example 1: Assign a user to an application without roles + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$appId = (Get-EntraApplication -SearchString '').AppId +$user = Get-EntraUser -SearchString '' +$servicePrincipal = Get-EntraServicePrincipal -Filter "appId eq '$appId'" + +$params = @{ + ObjectId = $user.ObjectId + PrincipalId = $user.ObjectId + ResourceId = $servicePrincipal.ObjectId + Id = [Guid]::Empty +} + +New-EntraUserAppRoleAssignment @params +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - + A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 18-06-2024 11:22:40 UserPrincipalName aaaaaaaa-bbbb-cccc-1111-222222222222 User App-DisplayName +``` + +This command assigns a user to an application that doesn't have any roles. +You can use the command `Get-EntraUser` to get user object Id. +You can use the command `Get-EntraApplication` to get application Id. +You can use the command `Get-EntraServicePrincipal` to get service principal object Id. + +- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. +- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. + +### Example 2: Assign a user to a specific role within an application + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$userName = 'SawyerM@contoso.com' +$appName = 'Box' +$spo = Get-EntraServicePrincipal -Filter "DisplayName eq '$appName'" +$user = Get-EntraUser -Filter "userPrincipalName eq '$userName'" + +$params = @{ + ObjectId = $user.ObjectId + PrincipalId = $user.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.AppRoles[1].Id +} + +New-EntraUserAppRoleAssignment @params +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 06/18/2024 09:47:00 Sawyer Miller 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 User Box +``` + +This example demonstrates how to assign a user to an application role in Microsoft Entra ID. +You can use the command `Get-EntraUser` to get user object Id. +You can use the command `Get-EntraServicePrincipal` to get service principal object Id. + +- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. +- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. + +## Parameters + +### -Id + +The ID of the app role to assign. + +If application doesn't have any roles while creating new app role assignment then provide an empty guid, or the Id of the role to assign to the user. + +You can retrieve the application's roles by examining the application object's AppRoles property: + +`Get-EntraApplication -SearchString 'Your-Application-DisplayName' | select Approles | Format-List` + +This cmdlet returns the list of roles that are defined in an application: + +AppRoles: {GUID1, GUID2} + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of the user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID to which the new app role is to be assigned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +The object ID of the principal to which the new app role is assigned. + +When assigning a new role to a user, provide the object ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The object ID of the Service Principal for the application to which the user role is assigned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) + +[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md new file mode 100644 index 0000000000..77c8786f2f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraUser +description: This article provides details on the Remove-EntraUser command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUser + +schema: 2.0.0 +--- + +# Remove-EntraUser + +## Synopsis + +Removes a user. + +## Syntax + +```powershell +Remove-EntraUser + -UserId + [] +``` + +## Description + +The `Remove-EntraUser` cmdlet removes a user in Microsoft Entra ID. Specify the `UserId` parameter to remove the specified user in Microsoft Entra ID. + +The calling user must be assigned at least one of the following Microsoft Entra roles: + +- User Administrator + +- Privileged Authentication Administrator + +## Examples + +### Example 1: Remove a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +Remove-EntraUser -UserId 'SawyerM@Contoso.com' +``` + +This command removes the specified user in Microsoft Entra ID. + +## Parameters + +### -UserId + +Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUser](New-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..4a7f77cbf2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraUserAppRoleAssignment +description: This article provides details on the Remove-EntraUserAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraUserAppRoleAssignment + +## Synopsis + +Removes a user application role assignment. + +## Syntax + +```powershell +Remove-EntraUserAppRoleAssignment + -AppRoleAssignmentId + -ObjectId + [] +``` + +## Description + +The `Remove-EntraUserAppRoleAssignment` cmdlet removes a user application role assignment in Microsoft Entra ID. + +## Examples + +### Example 1: Remove user app role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$RemoveAppRoleParams = @{ + ObjectId = 'SawyerM@Contoso.com' + AppRoleAssignmentId = 'C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w' +} +Remove-EntraUserAppRoleAssignment @RemoveAppRoleParams +``` + +This example demonstrates how to Remove the user app role assignment in Microsoft Entra ID. + +- `-ObjectId` parameter specifies the user ID. +- `-AppRoleAssignmentId` parameter specifies the application role assignment ID. + +Use the `Get-EntraUserAppRoleAssignment` cmdlet to get `AppRoleAssignmentId` details. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the ID of an application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID (as a UserPrincipleName or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) + +[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md new file mode 100644 index 0000000000..7e0aae2e20 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md @@ -0,0 +1,130 @@ +--- +title: Remove-EntraUserExtension +description: This article provides details on the Remove-EntraUserExtension command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserExtension + +schema: 2.0.0 +--- + +# Remove-EntraUserExtension + +## Synopsis + +Removes a user extension. + +## Syntax + +### SetMultiple + +```powershell +Remove-EntraUserExtension + -ObjectId + -ExtensionNames + [] +``` + +### SetSingle + +```powershell +Remove-EntraUserExtension + -ObjectId + -ExtensionName + [] +``` + +## Description + +The `Remove-EntraUserExtension` cmdlet removes a user extension from Microsoft Entra ID. Specify `ObjectId` and `ExtensionNames` parameters to remove a user extension. + +## Examples + +### Example 1: Remove the user extension + +```powershell +$Params = @{ + ObjectId = 'SawyerM@Contoso.com' + ExtensionName = 'Test Extension' +} +Remove-EntraUserExtension @Params +``` + +This example demonstrates how to remove a user extension from Microsoft Entra ID. + +- `ObjectId` parameter specifies the user Object ID. +- `ExtensionName` parameter specifies the user ExtentionName. + +## Parameters + +### -ExtensionName + +Specifies the name of an extension. + +```yaml +Type: System.String +Parameter Sets: SetSingle +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExtensionNames + +Specifies an array of extension names. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: SetMultiple +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserExtension](Get-EntraUserExtension.md) + +[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md new file mode 100644 index 0000000000..9d2fac8aa1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md @@ -0,0 +1,82 @@ +--- +title: Remove-EntraUserManager +description: This article provides details on the Remove-EntraUserManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserManager + +schema: 2.0.0 +--- + +# Remove-EntraUserManager + +## Synopsis + +Removes a user's manager. + +## Syntax + +```powershell +Remove-EntraUserManager + -UserId +``` + +## Description + +The `Remove-EntraUserManager` cmdlet removes a user's manager in Microsoft Entra ID. Specify the `UserId` parameter to remove the manager for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Remove the manager of a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@Contoso.com' +Remove-EntraUserManager -UserId $User.ObjectId +``` + +This example shows how to remove a user's manager. + +You can use `Get-EntraUser` command to get the user's details. + +## Parameters + +### -UserId + +Specifies the ID of a user (as a User Principle Name or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUserManager](Get-EntraUserManager.md) + +[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md new file mode 100644 index 0000000000..16500c0669 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md @@ -0,0 +1,677 @@ +--- +title: Set-EntraUser +description: This article provides details on the Set-EntraUser command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUser + +schema: 2.0.0 +--- + +# Set-EntraUser + +## Synopsis + +Updates a user. + +## Syntax + +```powershell +Set-EntraUser + -UserId + [-PostalCode ] + [-CompanyName ] + [-GivenName ] + [-Mobile ] + [-PreferredLanguage ] + [-CreationType ] + [-UsageLocation ] + [-UserType ] + [-AgeGroup ] + [-MailNickName ] + [-ExtensionProperty ] + [-ConsentProvidedForMinor ] + [-ImmutableId ] + [-Country ] + [-SignInNames ] + [-Department ] + [-StreetAddress ] + [-PasswordPolicies ] + [-JobTitle ] + [-City ] + [-OtherMails ] + [-UserPrincipalName ] + [-DisplayName ] + [-AccountEnabled ] + [-PasswordProfile ] + [-State ] + [-TelephoneNumber ] + [-Surname ] + [-ShowInAddressList ] + [] +``` + +## Description + +The `Set-EntraUser` cmdlet updates a user in Microsoft Entra ID. Specify the `UserId` parameter to update a user in Microsoft Entra ID. + +## Examples + +### Example 1: Update a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + UserId = $user.Id + DisplayName = 'Updated user Name' +} +Set-EntraUser @params +``` + +This example updates the specified user's Display name parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. + +### Example 2: Set the specified user's AccountEnabled parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + AccountEnabled = $true +} +Set-EntraUser @params +``` + +This example updates the specified user's AccountEnabled parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-AccountEnabled` Specifies whether the account is enabled. + +### Example 3: Set all but specified users as minors with parental consent + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +Get-EntraUser -All | Where-Object -FilterScript { $_.DisplayName -notmatch '(George|James|Education)' } | +ForEach-Object { Set-EntraUser -UserId $($_.ObjectId) -AgeGroup 'minor' -ConsentProvidedForMinor 'granted' } +``` + +This example updates the specified user's as minors with parental consent. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-ConsentProvidedForMinor` Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. + +### Example 4: Set the specified user's property + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + City = 'Add city name' + CompanyName = 'Microsoft' + Country = 'Add country name' + Department = 'Add department name' + GivenName = 'Mircosoft' + ImmutableId = '#1' + JobTitle = 'Manager' + MailNickName = 'Add mailnickname' + Mobile = '9984534564' + OtherMails = 'test12@M365x99297270.OnMicrosoft.com' + PasswordPolicies = 'DisableStrongPassword' + State = 'UP' + StreetAddress = 'Add address' + UserType = 'Member' +} +Set-EntraUser @params +``` + +This example updates the specified user's property. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-UserType` classify user types in your directory, such as "Member" and "Guest." +- `-PasswordPolicies` Specifies password policies for the user. +- `-OtherMails` Specifies other email addresses for the user + +### Example 5: Set the specified user's PasswordProfile parameter + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$params= @{ +UserId = 'SawyerM@contoso.com' +PasswordProfile = @{ + Password= '*****' + ForceChangePasswordNextLogin = $true + EnforceChangePasswordPolicy = $false + } +} +Set-EntraUser @params +``` + +This example updates the specified user's PasswordProfile parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-PasswordProfile` specifies the user's password profile. + +### Example 6: Set user's usage location for license assignment + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +Set-EntraUser -UserId 'SawyerM@contoso.com' -UsageLocation 'US' +``` + +This example updates the specified user's Usage Location for license management. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-UsageLocation` specifies the user's usage location. Two-letter ISO 3166 country code. Required for licensed users to check service availability. Examples: US, JP, GB. Not nullable. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -City + +Specifies the user's city. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country + +Specifies the user's country. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreationType + +Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. +Possible values are "LocalAccount" and null. +When creating a local account, the property is required and you must set it to "LocalAccount". +When creating a work or school account, don't specify the property or set it to null. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Department + +Specifies the user's department. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the user's display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProperty + +Add data to custom user properties as the basic open extensions or the more versatile schema extensions. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GivenName + +Specifies the user's given name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmutableId + +This property links an on-premises Active Directory user account to its Microsoft Entra ID user object. You must specify this property when creating a new user account in Graph if the user's userPrincipalName uses a federated domain. + +Important: Do not use the $ and _ characters when specifying this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JobTitle + +Specifies the user's job title. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickName + +Specifies a nickname for the user's mail address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Mobile + +Specifies the user's mobile phone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId +Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OtherMails + +Specifies other email addresses for the user. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordPolicies + +Specifies password policies for the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordProfile + +Specifies the user's password profile. + +```yaml +Type: PasswordProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostalCode + +Specifies the user's postal code. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredLanguage + +Specifies the user's preferred language. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShowInAddressList + +Set to True to show this user in the address list. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInNames + +The list of sign in names for this user + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the user's state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreetAddress + +Specifies the user's street address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Surname + +Specifies the user's surname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TelephoneNumber + +Specifies the user's telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsageLocation + +A two letter country or region code (ISO standard 3166). Required for users that assigned licenses due to legal requirement to check for availability of services in country and regions. Examples include: "US," "JP," and "GB." Not nullable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPrincipalName + +Specifies the user's user principal name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserType + +A string value that can be used to classify user types in your directory, such as "Member" and "Guest." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AgeGroup + +Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, minor, notAdult, and adult. See, [legal-age-group](https://learn.microsoft.com/graph/api/resources/user#legal-age-group-property-definitions). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompanyName + +The company name, which the user is associated. This property can be useful for describing the company that an external user comes from. The maximum length of the company name is 64 characters. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentProvidedForMinor + +Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUser](New-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md new file mode 100644 index 0000000000..82ec532e91 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md @@ -0,0 +1,91 @@ +--- +title: Set-EntraUserExtension +description: This article provides details on the Set-EntraUserExtension command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserExtension + +schema: 2.0.0 +--- + +# Set-EntraUserExtension + +## Synopsis + +Sets a user extension. + +## Syntax + +```powershell +Set-EntraUserExtension + -UserId + [] +``` + +## Description + +The `Set-EntraUserExtension` cmdlet updates a user extension in Microsoft Entra ID. + +## Examples + +### Example 1: Set the value of an extension attribute for a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + ExtensionName = 'extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8' + ExtensionValue = 'New Value' +} +Set-EntraUserExtension @params +``` + +This example shows how to update the value of the extension attribute for a specified user. + +- `-UserId` parameter specifies the user Id. +- `-ExtensionName` parameter specifies the name of an extension. +- `-ExtensionValue` parameter specifies the extension name values. + +## Parameters + +### -UserId + +Specifies the ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Get-EntraUserExtension](Get-EntraUserExtension.md) + +[Remove-EntraUserExtension](Remove-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md new file mode 100644 index 0000000000..ff516e1557 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md @@ -0,0 +1,209 @@ +--- +title: Set-EntraUserLicense +description: This article provides details on the Set-EntraUserLicense command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserLicense + +schema: 2.0.0 +--- + +# Set-EntraUserLicense + +## Synopsis + +Adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. + +## Syntax + +```powershell +Set-EntraUserLicense + -UserId + -AssignedLicenses + [] +``` + +## Description + +The `Set-EntraUserLicense` adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Writers +- License Administrator +- User Administrator + +**Note**: Before assigning a license, assign a usage location to the user using: +`Set-EntraUser -ObjectId user@contoso.com -UsageLocation ''`. + +## Examples + +### Example 1: Add a license to a user based on a template user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$LicensedUser = Get-EntraUser -ObjectId 'TemplateUser@contoso.com' +$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License.SkuId = $LicensedUser.AssignedLicenses.SkuId +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.AddLicenses = $License +$Params = @{ + UserId = 'SawyerM@contoso.com' + AssignedLicenses = $Licenses +} +Set-EntraUserLicense @Params +``` + +```Output +Name Value +---- ----- +externalUserStateChangeDateTi… +businessPhones {8976546787} +postalCode 444601 +createdDateTime 06-11-2023 04:48:19 +surname KTETSs +jobTitle Manager +employeeType +otherMails {SawyerM@contoso.com} +isResourceAccount +usageLocation DE +legalAgeGroupClassification Adult +id cccccccc-2222-3333-4444-dddddddddddd +isLicenseReconciliationNeeded False +``` + +This example demonstrates how to assign a license to a user based on a template user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +### Example 2: Add a license to a user by copying license from another user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$LicensedUser = Get-EntraUser -ObjectId 'AdeleV@contoso.com' +$User = Get-EntraUser -ObjectId 'SawyerM@contoso.com' +$License1 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License1.SkuId = $LicensedUser.AssignedLicenses.SkuId[0] +$License2 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License2.SkuId = $LicensedUser.AssignedLicenses.SkuId[1] +$addLicensesArray = @() +$addLicensesArray += $License1 +$addLicensesArray += $License2 +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.AddLicenses = $addLicensesArray +Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses +``` + +```Output +Name Value +---- ----- +externalUserStateChangeDateTi… +businessPhones {8976546787} +postalCode 444601 +createdDateTime 06-11-2023 04:48:19 +surname KTETSs +jobTitle Manager +employeeType +otherMails {SawyerM@contoso.com} +isResourceAccount +usageLocation DE +legalAgeGroupClassification Adult +id cccccccc-2222-3333-4444-dddddddddddd +isLicenseReconciliationNeeded False +``` + +This example demonstrates how to assign a license to a user by copying license from another user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +### Example 3: Remove an assigned User's License + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$UserPrincipalName = 'SawyerM@contoso.com' +$User = Get-EntraUser -ObjectId $UserPrincipalName +$SkuId = (Get-EntraUserLicenseDetail -ObjectId $UserPrincipalName).SkuId +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.RemoveLicenses = $SkuId +Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses +``` + +```Output +Name Value +---- ----- +displayName SawyerM +id cccccccc-2222-3333-4444-dddddddddddd +jobTitle +surname M +mail +userPrincipalName SawyerM@contoso.com +mobilePhone +preferredLanguage +@odata.context https://graph.microsoft.com/v1.0/$metadata#users/$entity +businessPhones {} +officeLocation +givenName Sawyer +``` + +This example demonstrates how to remove a user's license by retrieving the user details. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +## Parameters + +### -AssignedLicenses + +Specifies a list of licenses to assign or remove. + +```yaml +Type: AssignedLicenses +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md new file mode 100644 index 0000000000..f73f6beb1c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md @@ -0,0 +1,101 @@ +--- +title: Set-EntraUserManager +description: This article provides details on the Set-EntraUserManager command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserManager + +schema: 2.0.0 +--- + +# Set-EntraUserManager + +## Synopsis + +Updates a user's manager. + +## Syntax + +```powershell +Set-EntraUserManager + -UserId + -RefObjectId + [] +``` + +## Description + +The `Set-EntraUserManager` cmdlet update the manager for a user in Microsoft Entra ID. Specify the `UserId` and `RefObjectId` parameters to update the manager for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Update a user's manager + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$manager = Get-EntraUser -UserId 'Manager@contoso.com' +$params = @{ + UserId = 'SawyerM@contoso.com' + RefObjectId = $manager.ObjectId +} +Set-EntraUserManager @params +``` + +This example demonstrates how to update the manager for the specified user. + +## Parameters + +### -UserId + +Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUserManager](Get-EntraUserManager.md) + +[Remove-EntraUserManager](Remove-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md new file mode 100644 index 0000000000..8c2db963bf --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md @@ -0,0 +1,164 @@ +--- +title: Set-EntraUserPassword +description: This article provides details on the Set-EntraUserPassword command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserPassword + +schema: 2.0.0 +--- + +# Set-EntraUserPassword + +## Synopsis + +Sets the password of a user. + +## Syntax + +```powershell +Set-EntraUserPassword + [-ForceChangePasswordNextLogin ] + [-EnforceChangePasswordPolicy ] + -UserId + -Password + [] +``` + +## Description + +The `Set-EntraUserPassword` cmdlet sets the password for a user in Microsoft Entra ID. + +Any user can update their password without belonging to any administrator role. + +## Examples + +### Example 1: Set a user's password + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword = '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword +``` + +This command sets the specified user's password. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. + +### Example 2: Set a user's password with EnforceChangePasswordPolicy parameter + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword= '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -EnforceChangePasswordPolicy $True +``` + +This command sets the specified user's password with EnforceChangePasswordPolicy parameter. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. +- `-EnforceChangePasswordPolicy` parameter force the user to change their password, if set to true. + +### Example 3: Set a user's password with ForceChangePasswordNextLogin parameter + +```powershell +connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword= '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -ForceChangePasswordNextLogin $True +``` + +This command sets the specified user's password with ForceChangePasswordNextLogin parameter. + +- `-ObjectId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. +- `-ForceChangePasswordNextLogin` parameter forces a user to change their password during their next log in. + +## Parameters + +### -EnforceChangePasswordPolicy + +If set to true, force the user to change their password. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ForceChangePasswordNextLogin + +Forces a user to change their password during their next sign in. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Password + +Specifies the password. + +```yaml +Type: System.SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md new file mode 100644 index 0000000000..21eef3e9b1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md @@ -0,0 +1,130 @@ +--- +title: Set-EntraUserThumbnailPhoto +description: This article provides details on the Set-EntraUserThumbnailPhoto command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto + +schema: 2.0.0 +--- + +# Set-EntraUserThumbnailPhoto + +## Synopsis + +Set the thumbnail photo for a user. + +## Syntax + +### File (Default) + +```powershell +Set-EntraUserThumbnailPhoto + [-UserId ] + -FilePath + [] +``` + +### Stream + +```powershell +Set-EntraUserThumbnailPhoto + -FileStream + [-UserId ] + [] +``` + +### ByteArray + +```powershell +Set-EntraUserThumbnailPhoto + [-UserId ] + -ImageByteArray + [] +``` + +## Description + +The `Set-EntraUserThumbnailPhoto` cmdlet is used to set the thumbnail photo for a user. + +Updating any user's photo in the organization requires the User.ReadWrite.All permission. Updating only the signed-in user's photo requires the User.ReadWrite permission. + +## Examples + +### Example 1: Sets the thumbnail photo + +```powershell +Connect-Entra -Scopes 'User.ReadWrite','User.ReadWrite.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + FilePath = 'D:\UserThumbnailPhoto.jpg' +} +Set-EntraUserThumbnailPhoto @params +``` + +This example sets the thumbnail photo of the user specified with the UserId parameter to the image specified with the FilePath parameter. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-FilePath` parameter specifies the file path of the image to be uploaded as the user thumbnail photo. + +## Parameters + +### -FilePath + +The file path of the image to be uploaded as the user thumbnail photo. + +```yaml +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +The Object ID of the user for which the user thumbnail photo is set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.IO.Stream System.Byte\[\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraUserThumbnailPhoto](Get-EntraUserThumbnailPhoto.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md new file mode 100644 index 0000000000..1959f83ffc --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md @@ -0,0 +1,106 @@ +--- +title: Update-EntraSignedInUserPassword +description: This article provides details on the Update-EntraSignedInUserPassword command. + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword + +schema: 2.0.0 +--- + +# Update-EntraSignedInUserPassword + +## Synopsis + +Updates the password for the signed-in user. + +## Syntax + +```powershell +Update-EntraSignedInUserPassword + -NewPassword + -CurrentPassword + [] +``` + +## Description + +The `Update-EntraSignedInUserPassword` cmdlet updates the password for the signed-in user in Microsoft Entra ID. + +Enable users to update their own passwords. Any user can change their password without requiring administrator privileges. + +## Examples + +### Example 1: Update a password + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$CurrentPassword = ConvertTo-SecureString '' -AsPlainText -Force +$NewPassword = ConvertTo-SecureString '' -AsPlainText -Force +$params = @{ + CurrentPassword = $CurrentPassword + NewPassword = $NewPassword +} +Update-EntraSignedInUserPassword @params +``` + +This example shows how to update the password for the signed-in user. + +- `-CurrentPassword` parameter specifies the current password of the signed-in user. +- `-NewPassword` parameter specifies the new password for the signed-in user. + +## Parameters + +### -CurrentPassword + +Specifies the current password of the signed-in user. + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NewPassword + +Specifies the new password for the signed-in user. + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [changePassword](https://learn.microsoft.com/graph/api/user-changepassword). + +## Related links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md new file mode 100644 index 0000000000..f300d9f135 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md @@ -0,0 +1,105 @@ +--- +title: Update-EntraUserFromFederated +description: This article provides details on the Update-EntraUserFromFederated command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraUserFromFederated + +schema: 2.0.0 +--- + +# Update-EntraUserFromFederated + +## Synopsis + +Updates a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. + +## Syntax + +```powershell +Update-EntraUserFromFederated + -UserPrincipalName + [-NewPassword ] + [] +``` + +## Description + +The `Update-EntraUserFromFederated` cmdlet is used to update a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. A new password must be provided for the user. + +This process writes the new password to Microsoft Entra ID and, if configured with password writeback, pushes it to on-premises Active Directory. The admin can provide a new password or let the system generate one. The user will be prompted to change their password at their next sign-in. + +For delegated scenarios, the administrator needs at least the Authentication Administrator or Privileged Authentication Administrator Microsoft Entra role. + +Admins with User Administrator, Helpdesk Administrator, or Password Administrator roles can also reset passwords for non-admin users and a limited set of admin roles. + +## Examples + +### Example 1: Update a user in a domain + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All' +Update-EntraUserFromFederated -UserPrincipalName 'pattifuller@contoso.com' +``` + +This command updates a user in a domain. + +- `-UserPrincipalName` parameter specifies the Microsoft Entra ID UserID for the user to convert. + +## Parameters + +### -UserPrincipalName + +The Microsoft Entra ID UserID for the user to convert. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NewPassword + +The new password of the user. + +For tenants using hybrid password scenarios, specifying a new password is required. If you omit the password for a cloud-only account, the system generates one automatically. This generated password is a Unicode string without additional encoding. Before acceptance, the password is validated against the tenant's banned password list and must meet the tenant's cloud and/or on-premises password requirements. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [resetPassword](https://learn.microsoft.com/graph/api/authenticationmethod-resetpassword). + +## Related Links From 6771dc7179377067a6e2e81a392a252dac4645e4 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:35:58 +0300 Subject: [PATCH 062/124] Split Files --- build/Split-Docs.ps1 | 3 ++- module/Entra/config/moduleMapping.json | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 92de312f50..2fe3266ac1 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -7,6 +7,7 @@ . ./common-functions.ps1 + function Split-Docs { param ( [string]$Source = 'Entra', # Default to 'Entra' @@ -39,7 +40,7 @@ function Split-Docs { } # Load the JSON content from the mapping file - $moduleMapping = Get-Content -Path $MappingFilePath | ConvertFrom-Json -AsHashTable + $moduleMapping = Get-Content -Path $MappingFilePath | ConvertFrom-Json # Ensure the root documentation directory exists, create if it doesn't if (-not (Test-Path -Path $TargetRootDirectory -PathType Container)) { diff --git a/module/Entra/config/moduleMapping.json b/module/Entra/config/moduleMapping.json index 99f9b4c37f..174b5022c1 100644 --- a/module/Entra/config/moduleMapping.json +++ b/module/Entra/config/moduleMapping.json @@ -215,7 +215,6 @@ "Set-EntraUserThumbnailPhoto": "Users", "Update-EntraSignedInUserPassword": "Users", "Reset-EntraStrongAuthenticationMethodByUpn": "Authentication", - "Get-EntraDirSyncfeature": "DirectoryManagement", "Get-EntraAttributeSet": "DirectoryManagement", "New-EntraAttributeSet": "DirectoryManagement", "Set-EntraAttributeSet": "DirectoryManagement", From 1f97d2c08c14136ac08725222dd3ace0dd1febee Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:37:53 +0300 Subject: [PATCH 063/124] fix bug --- src/EntraModuleBuilder.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 2599974cb2..c76f75f4d3 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -453,7 +453,7 @@ foreach (`$subModule in `$subModules) { [void] CreateModuleHelp([string] $Module) { if (!(Test-Path $this.OutputDirectory)) { - New-Item -ItemType Directory -Path $this.OutputDurectory | Out-Null + New-Item -ItemType Directory -Path $this.OutputDirectory | Out-Null } # Determine the base docs path based on the specified module From 31db25378bd121d18980ea699eb9d9cdbc22dca5 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 00:20:18 +0300 Subject: [PATCH 064/124] New Split --- ...cipalDelegatedPermissionClassification.ps1 | 44 +- .../Add-EntraServicePrincipalOwner.ps1 | 56 +- .../Enable-EntraAzureADAliases.ps1 | 128 +-- .../Get-EntraApplicationExtensionProperty.ps1 | 44 +- .../Get-EntraApplicationServiceEndpoint.ps1 | 70 +- .../Get-EntraDeletedApplication.ps1 | 12 +- .../Get-EntraServicePrincipal.ps1 | 96 +-- ...EntraServicePrincipalAppRoleAssignedTo.ps1 | 70 +- ...EntraServicePrincipalAppRoleAssignment.ps1 | 70 +- ...Get-EntraServicePrincipalCreatedObject.ps1 | 70 +- ...cipalDelegatedPermissionClassification.ps1 | 52 +- .../Get-EntraServicePrincipalMembership.ps1 | 70 +- ...aServicePrincipalOAuth2PermissionGrant.ps1 | 70 +- .../Get-EntraServicePrincipalOwnedObject.ps1 | 70 +- .../Applications/New-EntraApplication.ps1 | 270 +++--- .../New-EntraApplicationExtensionProperty.ps1 | 56 +- .../Applications/New-EntraApplicationKey.ps1 | 66 +- .../New-EntraApplicationKeyCredential.ps1 | 72 +- .../New-EntraApplicationPassword.ps1 | 70 +- .../New-EntraServicePrincipal.ps1 | 210 ++--- ...EntraServicePrincipalAppRoleAssignment.ps1 | 62 +- .../Applications/Remove-EntraApplication.ps1 | 44 +- ...move-EntraApplicationExtensionProperty.ps1 | 52 +- .../Remove-EntraApplicationKey.ps1 | 56 +- .../Remove-EntraApplicationKeyCredential.ps1 | 52 +- .../Remove-EntraApplicationOwner.ps1 | 56 +- .../Remove-EntraApplicationPassword.ps1 | 52 +- ...ove-EntraApplicationPasswordCredential.ps1 | 52 +- ...move-EntraApplicationVerifiedPublisher.ps1 | 44 +- .../Remove-EntraDeletedApplication.ps1 | 44 +- .../Remove-EntraServicePrincipal.ps1 | 44 +- ...EntraServicePrincipalAppRoleAssignment.ps1 | 48 +- ...ove-EntraServicePrincipalKeyCredential.ps1 | 52 +- .../Restore-EntraDeletedApplication.ps1 | 8 +- ...ntraGroupIdsServicePrincipalIsMemberOf.ps1 | 4 +- .../Set-EntraApplicationVerifiedPublisher.ps1 | 44 +- .../Enable-EntraAzureADAliases.ps1 | 46 +- .../Authentication/Find-EntraPermission.ps1 | 50 -- .../Revoke-EntraUserAllRefreshToken.ps1 | 44 +- .../Add-EntraDeviceRegisteredOwner.ps1 | 56 +- .../Add-EntraDeviceRegisteredUser.ps1 | 56 +- .../Add-EntraDirectoryRoleMember.ps1 | 56 +- .../Confirm-EntraDomain.ps1 | 48 +- .../Enable-EntraAzureADAliases.ps1 | 104 +-- .../Enable-EntraDirectoryRole.ps1 | 36 +- .../Get-EntraContactDirectReport.ps1 | 70 +- .../Get-EntraContactManager.ps1 | 44 +- .../Get-EntraContactMembership.ps1 | 70 +- .../DirectoryManagement/Get-EntraContract.ps1 | 80 +- .../Get-EntraDeletedDirectoryObject.ps1 | 40 +- .../DirectoryManagement/Get-EntraDevice.ps1 | 106 +-- .../Get-EntraDirectoryRole.ps1 | 58 +- .../Get-EntraDirectoryRoleTemplate.ps1 | 36 +- ...-EntraDomainServiceConfigurationRecord.ps1 | 42 +- .../Get-EntraDomainVerificationDnsRecord.ps1 | 42 +- .../Get-EntraExtensionProperty.ps1 | 44 +- .../Get-EntraTenantDetail.ps1 | 6 +- .../DirectoryManagement/New-EntraDevice.ps1 | 148 ++-- .../DirectoryManagement/New-EntraDomain.ps1 | 56 +- .../Remove-EntraContact.ps1 | 44 +- .../Remove-EntraDevice.ps1 | 44 +- .../Remove-EntraDeviceRegisteredOwner.ps1 | 56 +- .../Remove-EntraDeviceRegisteredUser.ps1 | 52 +- .../Remove-EntraDirectoryRoleMember.ps1 | 44 +- .../Remove-EntraDomain.ps1 | 40 +- .../DirectoryManagement/Set-EntraDomain.ps1 | 60 +- .../Set-EntraTenantDetail.ps1 | 10 +- .../Enable-EntraAzureADAlias.ps1 | 360 ++++---- .../Governance/Enable-EntraAzureADAliases.ps1 | 52 +- .../Get-EntraDirectoryRoleAssignment.ps1 | 82 +- .../New-EntraDirectoryRoleAssignment.ps1 | 48 +- .../New-EntraDirectoryRoleDefinition.ps1 | 96 +-- .../Remove-EntraDirectoryRoleAssignment.ps1 | 40 +- .../Remove-EntraDirectoryRoleDefinition.ps1 | 40 +- .../Set-EntraDirectoryRoleDefinition.ps1 | 108 +-- .../Groups/Add-EntraGroupMember.ps1 | 52 +- .../Groups/Add-EntraGroupOwner.ps1 | 56 +- .../Groups/Add-EntraLifecyclePolicyGroup.ps1 | 48 +- .../Groups/Enable-EntraAzureADAliases.ps1 | 80 +- .../Groups/Get-EntraGroup.ps1 | 96 +-- .../Get-EntraGroupAppRoleAssignment.ps1 | 70 +- .../Groups/Get-EntraGroupLifecyclePolicy.ps1 | 40 +- .../Groups/Get-EntraGroupPermissionGrant.ps1 | 40 +- .../Groups/Get-EntraLifecyclePolicyGroup.ps1 | 40 +- .../Groups/Get-EntraObjectSetting.ps1 | 49 ++ .../Groups/New-EntraGroup.ps1 | 88 +- .../New-EntraGroupAppRoleAssignment.ps1 | 66 +- .../Groups/New-EntraGroupLifecyclePolicy.ps1 | 44 +- .../Groups/Remove-EntraGroup.ps1 | 44 +- .../Remove-EntraGroupAppRoleAssignment.ps1 | 48 +- .../Remove-EntraGroupLifecyclePolicy.ps1 | 40 +- .../Groups/Remove-EntraGroupMember.ps1 | 44 +- .../Groups/Remove-EntraGroupOwner.ps1 | 56 +- .../Remove-EntraLifecyclePolicyGroup.ps1 | 48 +- .../Groups/Reset-EntraLifeCycleGroup.ps1 | 40 +- .../Select-EntraGroupIdsContactIsMemberOf.ps1 | 4 +- .../Select-EntraGroupIdsGroupIsMemberOf.ps1 | 4 +- .../Select-EntraGroupIdsUserIsMemberOf.ps1 | 4 +- .../Groups/Set-EntraGroup.ps1 | 90 +- .../Groups/Set-EntraGroupLifecyclePolicy.ps1 | 56 +- .../Enable-EntraAzureADAliases.ps1 | 44 +- .../Invitations/New-EntraInvitation.ps1 | 14 +- .../Migration/Enable-EntraAzureADAliases.ps1 | 44 +- .../Migration/Test-EntraScript.ps1 | 2 +- .../Reports/Enable-EntraAzureADAliases.ps1 | 44 +- .../Reports/Get-EntraAuditSignInLog.ps1 | 2 +- .../SignIns/Enable-EntraAzureADAliases.ps1 | 82 +- .../SignIns/Get-EntraAuthorizationPolicy.ps1 | 55 -- .../Get-EntraConditionalAccessPolicy.ps1 | 40 +- .../SignIns/Get-EntraIdentityProvider.ps1 | 42 +- .../Get-EntraOAuth2PermissionGrant.ps1 | 48 +- .../Get-EntraPermissionGrantConditionSet.ps1 | 6 +- .../Get-EntraPermissionGrantPolicy.ps1 | 40 +- .../Get-EntraTrustedCertificateAuthority.ps1 | 4 +- .../New-EntraConditionalAccessPolicy.ps1 | 116 +-- .../SignIns/New-EntraIdentityProvider.ps1 | 8 +- .../SignIns/New-EntraNamedLocationPolicy.ps1 | 6 +- .../New-EntraPermissionGrantConditionSet.ps1 | 24 +- .../New-EntraPermissionGrantPolicy.ps1 | 48 +- .../Remove-EntraConditionalAccessPolicy.ps1 | 40 +- .../Remove-EntraFeatureRolloutPolicy.ps1 | 50 ++ .../SignIns/Remove-EntraIdentityProvider.ps1 | 40 +- .../Remove-EntraNamedLocationPolicy.ps1 | 40 +- .../Remove-EntraOAuth2PermissionGrant.ps1 | 44 +- ...emove-EntraPermissionGrantConditionSet.ps1 | 6 +- .../Remove-EntraPermissionGrantPolicy.ps1 | 40 +- .../SignIns/Set-EntraAuthorizationPolicy.ps1 | 74 +- .../Set-EntraConditionalAccessPolicy.ps1 | 124 +-- .../SignIns/Set-EntraNamedLocationPolicy.ps1 | 16 +- .../Set-EntraPermissionGrantConditionSet.ps1 | 26 +- .../Set-EntraPermissionGrantPolicy.ps1 | 52 +- .../Users/Enable-EntraAzureADAliases.ps1 | 82 +- .../Users/Get-EntraUserAppRoleAssignment.ps1 | 66 +- .../Users/Get-EntraUserLicenseDetail.ps1 | 44 +- .../Users/Get-EntraUserMembership.ps1 | 70 +- .../Get-EntraUserOAuth2PermissionGrant.ps1 | 70 +- .../Users/Get-EntraUserThumbnailPhoto.ps1 | 62 +- .../Users/New-EntraUser.ps1 | 76 +- .../Users/New-EntraUserAppRoleAssignment.ps1 | 62 +- .../Users/Remove-EntraUser.ps1 | 44 +- .../Remove-EntraUserAppRoleAssignment.ps1 | 48 +- .../Users/Remove-EntraUserExtension.ps1 | 60 +- .../Users/Remove-EntraUserManager.ps1 | 44 +- .../Users/Set-EntraUser.ps1 | 266 +++--- .../Users/Set-EntraUserExtension.ps1 | 73 +- .../Users/Set-EntraUserManager.ps1 | 56 +- .../Users/Set-EntraUserThumbnailPhoto.ps1 | 64 +- .../Update-EntraSignedInUserPassword.ps1 | 4 +- .../Get-EntraDirSyncfeature.ps1 | 0 module/Entra/config/dependencyMapping.json | 10 +- .../Applications/Add-EntraApplicationOwner.md | 102 --- ...ncipalDelegatedPermissionClassification.md | 163 ---- .../Add-EntraServicePrincipalOwner.md | 109 --- .../Applications/Get-EntraApplication.md | 276 ------ .../Get-EntraApplicationExtensionProperty.md | 106 --- .../Get-EntraApplicationKeyCredential.md | 89 -- .../Applications/Get-EntraApplicationLogo.md | 136 --- .../Applications/Get-EntraApplicationOwner.md | 212 ----- .../Get-EntraApplicationPasswordCredential.md | 104 --- .../Get-EntraApplicationServiceEndpoint.md | 167 ---- .../Get-EntraApplicationTemplate.md | 173 ---- .../Get-EntraDeletedApplication.md | 257 ------ .../Applications/Get-EntraServicePrincipal.md | 369 -------- ...-EntraServicePrincipalAppRoleAssignedTo.md | 188 ---- ...-EntraServicePrincipalAppRoleAssignment.md | 192 ----- .../Get-EntraServicePrincipalCreatedObject.md | 155 ---- ...ncipalDelegatedPermissionClassification.md | 204 ----- .../Get-EntraServicePrincipalKeyCredential.md | 91 -- .../Get-EntraServicePrincipalMembership.md | 178 ---- ...raServicePrincipalOAuth2PermissionGrant.md | 169 ---- .../Get-EntraServicePrincipalOwnedObject.md | 195 ----- .../Get-EntraServicePrincipalOwner.md | 217 ----- ...EntraServicePrincipalPasswordCredential.md | 93 -- .../Applications/New-EntraApplication.md | 490 ----------- .../New-EntraApplicationExtensionProperty.md | 215 ----- ...EntraApplicationFromApplicationTemplate.md | 111 --- .../Applications/New-EntraApplicationKey.md | 155 ---- .../New-EntraApplicationKeyCredential.md | 258 ------ .../New-EntraApplicationPassword.md | 121 --- .../New-EntraApplicationPasswordCredential.md | 215 ----- .../Applications/New-EntraServicePrincipal.md | 406 --------- ...-EntraServicePrincipalAppRoleAssignment.md | 230 ----- .../New-EntraServicePrincipalKeyCredential.md | 182 ---- ...EntraServicePrincipalPasswordCredential.md | 168 ---- .../Applications/Remove-EntraApplication.md | 84 -- ...emove-EntraApplicationExtensionProperty.md | 106 --- .../Remove-EntraApplicationKey.md | 133 --- .../Remove-EntraApplicationKeyCredential.md | 108 --- .../Remove-EntraApplicationOwner.md | 106 --- .../Remove-EntraApplicationPassword.md | 106 --- ...move-EntraApplicationPasswordCredential.md | 104 --- ...emove-EntraApplicationVerifiedPublisher.md | 83 -- .../Remove-EntraDeletedApplication.md | 92 -- .../Remove-EntraDeletedDirectoryObject.md | 96 --- .../Remove-EntraServicePrincipal.md | 86 -- ...-EntraServicePrincipalAppRoleAssignment.md | 117 --- ...ncipalDelegatedPermissionClassification.md | 105 --- ...move-EntraServicePrincipalKeyCredential.md | 104 --- .../Remove-EntraServicePrincipalOwner.md | 107 --- ...EntraServicePrincipalPasswordCredential.md | 104 --- .../Restore-EntraDeletedApplication.md | 127 --- ...EntraGroupIdsServicePrincipalIsMemberOf.md | 110 --- .../Applications/Set-EntraApplication.md | 496 ----------- .../Applications/Set-EntraApplicationLogo.md | 126 --- .../Set-EntraApplicationVerifiedPublisher.md | 111 --- .../Applications/Set-EntraServicePrincipal.md | 440 ---------- .../Authentication/Add-EntraEnvironment.md | 119 --- .../Authentication/Connect-Entra.md | 583 ------------- .../Authentication/Disconnect-Entra.md | 78 -- .../Authentication/Find-EntraPermission.md | 239 ----- .../Authentication/Get-EntraContext.md | 130 --- .../Authentication/Get-EntraEnvironment.md | 108 --- ...et-EntraStrongAuthenticationMethodByUpn.md | 79 -- ...Revoke-EntraSignedInUserAllRefreshToken.md | 73 -- .../Revoke-EntraUserAllRefreshToken.md | 90 -- .../Add-EntraAdministrativeUnitMember.md | 111 --- ...SecurityAttributeDefinitionAllowedValue.md | 139 --- .../Add-EntraDeviceRegisteredOwner.md | 107 --- .../Add-EntraDeviceRegisteredUser.md | 112 --- .../Add-EntraDirectoryRoleMember.md | 104 --- .../Add-EntraScopedRoleMembership.md | 135 --- .../Confirm-EntraDomain.md | 112 --- .../Enable-EntraDirectoryRole.md | 96 --- .../Get-CrossCloudVerificationCode.md | 72 -- .../Get-EntraAccountSku.md | 117 --- .../Get-EntraAdministrativeUnit.md | 237 ----- .../Get-EntraAdministrativeUnitMember.md | 193 ----- .../Get-EntraAttributeSet.md | 143 --- .../DirectoryManagement/Get-EntraContact.md | 236 ----- .../Get-EntraContactDirectReport.md | 159 ---- .../Get-EntraContactManager.md | 98 --- .../Get-EntraContactMembership.md | 175 ---- .../Get-EntraContactThumbnailPhoto.md | 150 ---- .../DirectoryManagement/Get-EntraContract.md | 195 ----- ...-EntraCustomSecurityAttributeDefinition.md | 142 --- ...SecurityAttributeDefinitionAllowedValue.md | 187 ---- .../Get-EntraDeletedDirectoryObject.md | 122 --- .../DirectoryManagement/Get-EntraDevice.md | 271 ------ .../Get-EntraDeviceRegisteredOwner.md | 196 ----- .../Get-EntraDeviceRegisteredUser.md | 180 ---- .../Get-EntraDirSyncConfiguration.md | 106 --- .../Get-EntraDirSyncFeature.md | 153 ---- ...ectoryObjectOnPremisesProvisioningError.md | 104 --- .../Get-EntraDirectoryRole.md | 181 ---- .../Get-EntraDirectoryRoleMember.md | 106 --- .../Get-EntraDirectoryRoleTemplate.md | 101 --- .../DirectoryManagement/Get-EntraDomain.md | 147 ---- .../Get-EntraDomainFederationSettings.md | 129 --- .../Get-EntraDomainNameReference.md | 113 --- ...t-EntraDomainServiceConfigurationRecord.md | 112 --- .../Get-EntraDomainVerificationDnsRecord.md | 112 --- .../Get-EntraExtensionProperty.md | 97 --- .../Get-EntraFederationProperty.md | 90 -- .../Get-EntraObjectByObjectId.md | 142 --- .../Get-EntraPartnerInformation.md | 135 --- .../Get-EntraPasswordPolicy.md | 101 --- .../Get-EntraScopedRoleMembership.md | 145 ---- .../Get-EntraSubscribedSku.md | 227 ----- .../Get-EntraTenantDetail.md | 167 ---- .../New-EntraAdministrativeUnit.md | 133 --- .../New-EntraAttributeSet.md | 136 --- ...-EntraCustomSecurityAttributeDefinition.md | 234 ----- .../DirectoryManagement/New-EntraDevice.md | 339 -------- .../DirectoryManagement/New-EntraDomain.md | 158 ---- .../Remove-EntraAdministrativeUnit.md | 87 -- .../Remove-EntraAdministrativeUnitMember.md | 108 --- .../Remove-EntraContact.md | 79 -- .../DirectoryManagement/Remove-EntraDevice.md | 85 -- .../Remove-EntraDeviceRegisteredOwner.md | 101 --- .../Remove-EntraDeviceRegisteredUser.md | 99 --- .../Remove-EntraDirectoryRoleMember.md | 106 --- .../DirectoryManagement/Remove-EntraDomain.md | 91 -- .../Remove-EntraExternalDomainFederation.md | 79 -- .../Remove-EntraScopedRoleMembership.md | 106 --- .../Restore-EntraDeletedDirectoryObject.md | 154 ---- .../Set-EntraAdministrativeUnit.md | 145 ---- .../Set-EntraAttributeSet.md | 147 ---- ...-EntraCustomSecurityAttributeDefinition.md | 149 ---- ...SecurityAttributeDefinitionAllowedValue.md | 126 --- .../DirectoryManagement/Set-EntraDevice.md | 387 --------- .../Set-EntraDirSyncConfiguration.md | 144 ---- .../Set-EntraDirSyncEnabled.md | 140 --- .../Set-EntraDirSyncFeature.md | 187 ---- .../DirectoryManagement/Set-EntraDomain.md | 135 --- .../Set-EntraDomainFederationSettings.md | 290 ------- .../Set-EntraPartnerInformation.md | 242 ------ .../Set-EntraTenantDetail.md | 216 ----- .../Get-EntraDirectoryRoleAssignment.md | 282 ------ .../Get-EntraDirectoryRoleDefinition.md | 273 ------ .../New-EntraDirectoryRoleAssignment.md | 136 --- .../New-EntraDirectoryRoleDefinition.md | 330 ------- .../Remove-EntraDirectoryRoleAssignment.md | 88 -- .../Remove-EntraDirectoryRoleDefinition.md | 93 -- .../Set-EntraDirectoryRoleDefinition.md | 267 ------ .../Groups/Add-EntraGroupMember.md | 102 --- .../Groups/Add-EntraGroupOwner.md | 108 --- .../Groups/Add-EntraLifecyclePolicyGroup.md | 111 --- .../Groups/Get-EntraDeletedGroup.md | 293 ------- .../Groups/Get-EntraGroup.md | 309 ------- .../Groups/Get-EntraGroupAppRoleAssignment.md | 181 ---- .../Groups/Get-EntraGroupLifecyclePolicy.md | 134 --- .../Groups/Get-EntraGroupMember.md | 214 ----- .../Groups/Get-EntraGroupOwner.md | 189 ---- .../Groups/Get-EntraGroupPermissionGrant.md | 106 --- .../Groups/Get-EntraLifecyclePolicyGroup.md | 105 --- .../Groups/Get-EntraObjectSetting.md | 252 ------ .../Groups/New-EntraGroup.md | 346 -------- .../Groups/New-EntraGroupAppRoleAssignment.md | 151 ---- .../Groups/New-EntraGroupLifecyclePolicy.md | 138 --- .../Groups/Remove-EntraGroup.md | 93 -- .../Remove-EntraGroupAppRoleAssignment.md | 99 --- .../Remove-EntraGroupLifecyclePolicy.md | 87 -- .../Groups/Remove-EntraGroupMember.md | 102 --- .../Groups/Remove-EntraGroupOwner.md | 101 --- .../Remove-EntraLifecyclePolicyGroup.md | 117 --- .../Groups/Reset-EntraLifeCycleGroup.md | 84 -- .../Select-EntraGroupIdsContactIsMemberOf.md | 99 --- .../Select-EntraGroupIdsGroupIsMemberOf.md | 101 --- .../Select-EntraGroupIdsUserIsMemberOf.md | 110 --- .../Groups/Set-EntraGroup.md | 313 ------- .../Groups/Set-EntraGroupLifecyclePolicy.md | 160 ---- .../Invitations/New-EntraInvitation.md | 291 ------- .../Migration/Enable-EntraAzureADAlias.md | 57 -- .../Migration/Test-EntraScript.md | 120 --- .../Reports/Get-EntraAuditDirectoryLog.md | 179 ---- .../Reports/Get-EntraAuditSignInLog.md | 213 ----- .../SignIns/Get-EntraAuthorizationPolicy.md | 156 ---- .../Get-EntraConditionalAccessPolicy.md | 135 --- .../SignIns/Get-EntraFeatureRolloutPolicy.md | 212 ----- .../SignIns/Get-EntraIdentityProvider.md | 140 --- .../SignIns/Get-EntraNamedLocationPolicy.md | 138 --- .../SignIns/Get-EntraOAuth2PermissionGrant.md | 190 ---- .../Get-EntraPermissionGrantConditionSet.md | 214 ----- .../SignIns/Get-EntraPermissionGrantPolicy.md | 134 --- .../SignIns/Get-EntraPolicy.md | 196 ----- .../Get-EntraTrustedCertificateAuthority.md | 186 ---- .../New-EntraConditionalAccessPolicy.md | 278 ------ .../SignIns/New-EntraFeatureRolloutPolicy.md | 224 ----- .../SignIns/New-EntraIdentityProvider.md | 170 ---- .../SignIns/New-EntraNamedLocationPolicy.md | 236 ----- .../SignIns/New-EntraOauth2PermissionGrant.md | 188 ---- .../New-EntraPermissionGrantConditionSet.md | 372 -------- .../SignIns/New-EntraPermissionGrantPolicy.md | 133 --- .../SignIns/New-EntraPolicy.md | 254 ------ .../New-EntraTrustedCertificateAuthority.md | 98 --- .../Remove-EntraConditionalAccessPolicy.md | 87 -- .../Remove-EntraFeatureRolloutPolicy.md | 87 -- ...ntraFeatureRolloutPolicyDirectoryObject.md | 105 --- .../SignIns/Remove-EntraIdentityProvider.md | 88 -- .../Remove-EntraNamedLocationPolicy.md | 88 -- .../Remove-EntraOAuth2PermissionGrant.md | 84 -- ...Remove-EntraPermissionGrantConditionSet.md | 129 --- .../Remove-EntraPermissionGrantPolicy.md | 85 -- .../SignIns/Remove-EntraPolicy.md | 83 -- ...Remove-EntraTrustedCertificateAuthority.md | 92 -- .../SignIns/Set-EntraAuthorizationPolicy.md | 241 ------ .../Set-EntraConditionalAccessPolicy.md | 240 ------ .../SignIns/Set-EntraFeatureRolloutPolicy.md | 231 ----- .../SignIns/Set-EntraIdentityProvider.md | 195 ----- .../SignIns/Set-EntraNamedLocationPolicy.md | 258 ------ .../Set-EntraPermissionGrantConditionSet.md | 309 ------- .../SignIns/Set-EntraPermissionGrantPolicy.md | 143 --- .../SignIns/Set-EntraPolicy.md | 211 ----- .../Set-EntraTrustedCertificateAuthority.md | 92 -- .../Users/Get-EntraUser.md | 426 --------- .../Users/Get-EntraUserAppRoleAssignment.md | 184 ---- .../Users/Get-EntraUserCreatedObject.md | 175 ---- .../Users/Get-EntraUserDirectReport.md | 175 ---- .../Users/Get-EntraUserExtension.md | 111 --- .../Users/Get-EntraUserLicenseDetail.md | 105 --- .../Users/Get-EntraUserManager.md | 142 --- .../Users/Get-EntraUserMembership.md | 218 ----- .../Get-EntraUserOAuth2PermissionGrant.md | 201 ----- .../Users/Get-EntraUserOwnedDevice.md | 166 ---- .../Users/Get-EntraUserOwnedObject.md | 208 ----- .../Users/Get-EntraUserRegisteredDevice.md | 165 ---- .../Users/Get-EntraUserThumbnailPhoto.md | 109 --- .../Users/New-EntraUser.md | 816 ------------------ .../Users/New-EntraUserAppRoleAssignment.md | 209 ----- .../Users/Remove-EntraUser.md | 88 -- .../Remove-EntraUserAppRoleAssignment.md | 106 --- .../Users/Remove-EntraUserExtension.md | 130 --- .../Users/Remove-EntraUserManager.md | 82 -- .../Users/Set-EntraUser.md | 677 --------------- .../Users/Set-EntraUserExtension.md | 91 -- .../Users/Set-EntraUserLicense.md | 209 ----- .../Users/Set-EntraUserManager.md | 101 --- .../Users/Set-EntraUserPassword.md | 164 ---- .../Users/Set-EntraUserThumbnailPhoto.md | 130 --- .../Users/Update-EntraSignedInUserPassword.md | 106 --- .../Users/Update-EntraUserFromFederated.md | 105 --- src/EntraModuleBuilder.ps1 | 17 +- 392 files changed, 4290 insertions(+), 44431 deletions(-) delete mode 100644 module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 rename module/Entra/{Microsoft.Graph.Entra/DirectoryManagement => UnMappedFiles}/Get-EntraDirSyncfeature.ps1 (100%) delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 index 6594c093a2..3ffe5d02c8 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 @@ -23,45 +23,49 @@ function Add-EntraServicePrincipalDelegatedPermissionClassification { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Classification"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Classification"] = $PSBoundParameters["Classification"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } + if ($null -ne $PSBoundParameters["Classification"]) + { + $params["Classification"] = $PSBoundParameters["Classification"] + } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PermissionName"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PermissionName"] = $PSBoundParameters["PermissionName"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PermissionName"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PermissionName"] = $PSBoundParameters["PermissionName"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -71,18 +75,14 @@ function Add-EntraServicePrincipalDelegatedPermissionClassification { { $params["PermissionId"] = $PSBoundParameters["PermissionId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 index 4222af4eee..440e91ba33 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 @@ -5,76 +5,76 @@ function Add-EntraServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId + [System.String] $ServicePrincipalId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 index 716d55060f..959c646781 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 @@ -3,91 +3,91 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraApplicationKey -Scope Global -Force + Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraApplicationKey -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraApplicationPassword -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraServicePrincipalCreatedObject -Scope Global -Force - Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force - Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force - Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraApplicationServiceEndpoint -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-EntraServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force Set-Alias -Name Remove-EntraServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-EntraServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 index 0586f64c1d..904f395864 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 @@ -16,58 +16,58 @@ function Get-EntraApplicationExtensionProperty { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) - { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 index 0d26652059..43d2d78430 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 @@ -5,15 +5,15 @@ function Get-EntraApplicationServiceEndpoint { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraApplicationServiceEndpoint { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 index 0a6c5b8763..c6ccc6a58f 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 @@ -6,17 +6,17 @@ function Get-EntraDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 index 4c53a2331e..ec90727804 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 @@ -6,20 +6,20 @@ function Get-EntraServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $SearchString, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,83 +28,83 @@ function Get-EntraServicePrincipal { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["SearchString"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["Filter"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($null -ne $PSBoundParameters["SearchString"]) + if($null -ne $PSBoundParameters["Filter"]) { - $TmpValue = $PSBoundParameters["SearchString"] - $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 index c8ab41fa93..2bf1c275d7 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalAppRoleAssignedTo { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalAppRoleAssignedTo { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 index 75896d85c8..e0db70289c 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 index d5ebb04644..5d9018f2a5 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalCreatedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalCreatedObject { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 index 086970fd94..14f7130b07 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 @@ -22,17 +22,13 @@ function Get-EntraServicePrincipalDelegatedPermissionClassification { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{} - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { @@ -42,26 +38,42 @@ function Get-EntraServicePrincipalDelegatedPermissionClassification { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] @@ -71,18 +83,6 @@ function Get-EntraServicePrincipalDelegatedPermissionClassification { $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 index bac598a209..b5eb9e8abf 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalMembership { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 index 96c754f0c2..88a9244252 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 index 2b0c61fa37..d5dda82477 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalOwnedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalOwnedObject { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 index 04c3764bee..e43cd7410d 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 @@ -7,104 +7,109 @@ function New-EntraApplication { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TokenEncryptionKeyId, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, + [System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GroupMembershipClaims, + [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Tags, + [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, + [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, + [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.WebApplication] $Web, + [System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, + [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, + [System.String] $TokenEncryptionKeyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, + [System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $SignInAudience + [Microsoft.Open.MSGraph.Model.WebApplication] $Web ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if($null -ne $PSBoundParameters["ParentalControlSettings"]) - { - $TmpValue = $PSBoundParameters["ParentalControlSettings"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["ParentalControlSettings"] = $Value - } - if($null -ne $PSBoundParameters["RequiredResourceAccess"]) - { - $TmpValue = $PSBoundParameters["RequiredResourceAccess"] - $Value = $TmpValue | ConvertTo-Json - $params["RequiredResourceAccess"] = $Value - } - if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) - { - $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] - } - if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + if($null -ne $PSBoundParameters["PasswordCredentials"]) { - $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $Temp = $v | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} + $a += $hash + } + + $Value = $a + $params["PasswordCredentials"] = $Value } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["IdentifierUris"]) + if($null -ne $PSBoundParameters["KeyCredentials"]) { - $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + $TmpValue = $PSBoundParameters["KeyCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDateTime + Key= $v.Key + StartDateTime= $v.StartDateTime + Type= $v.Type + Usage= $v.Usage + } + + $a += $hash + } + + $Value = $a + $params["KeyCredentials"] = $Value } if($null -ne $PSBoundParameters["AppRoles"]) { @@ -123,58 +128,59 @@ function New-EntraApplication { $Value = $a $params["AppRoles"] = $Value } - if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) - { - $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] - } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) + if($null -ne $PSBoundParameters["AddIns"]) { - $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] + $TmpValue = $PSBoundParameters["AddIns"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["AddIns"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["RequiredResourceAccess"]) + { + $TmpValue = $PSBoundParameters["RequiredResourceAccess"] + $Value = $TmpValue | ConvertTo-Json + $params["RequiredResourceAccess"] = $Value } if ($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } - if($null -ne $PSBoundParameters["PasswordCredentials"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $TmpValue = $PSBoundParameters["PasswordCredentials"] - $a = @() - $input = $TmpValue - foreach($v in $input) - { - $Temp = $v | ConvertTo-Json - $hash = @{} - - (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} - $a += $hash - } - - $Value = $a - $params["PasswordCredentials"] = $Value + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($null -ne $PSBoundParameters["PublicClient"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $TmpValue = $PSBoundParameters["PublicClient"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ParentalControlSettings"]) + { + $TmpValue = $PSBoundParameters["ParentalControlSettings"] $Temp = $TmpValue | ConvertTo-Json $Value = $Temp - $params["PublicClient"] = $Value + $params["ParentalControlSettings"] = $Value } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Api"]) { @@ -185,33 +191,17 @@ function New-EntraApplication { $Value = $Temp $params["Api"] = $Value } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if($null -ne $PSBoundParameters["Web"]) + if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { - $TmpValue = $PSBoundParameters["Web"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["Web"] = $Value + $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } - if($null -ne $PSBoundParameters["OptionalClaims"]) + if($null -ne $PSBoundParameters["PublicClient"]) { - $TmpValue = $PSBoundParameters["OptionalClaims"] - $Temp = $TmpValue | ConvertTo-Json + $TmpValue = $PSBoundParameters["PublicClient"] + $Temp = $TmpValue | ConvertTo-Json $Value = $Temp - $params["OptionalClaims"] = $Value + $params["PublicClient"] = $Value } if($null -ne $PSBoundParameters["InformationalUrl"]) { @@ -221,43 +211,21 @@ function New-EntraApplication { $Value = $Temp $params["Info"] = $Value } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($null -ne $PSBoundParameters["AddIns"]) + if($null -ne $PSBoundParameters["OptionalClaims"]) { - $TmpValue = $PSBoundParameters["AddIns"] - $Temp = $TmpValue | ConvertTo-Json + $TmpValue = $PSBoundParameters["OptionalClaims"] + $Temp = $TmpValue | ConvertTo-Json $Value = $Temp - $params["AddIns"] = $Value - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OptionalClaims"] = $Value } - if($null -ne $PSBoundParameters["KeyCredentials"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $TmpValue = $PSBoundParameters["KeyCredentials"] - $a = @() - $input = $TmpValue - foreach($v in $input) - { - $hash = @{ - CustomKeyIdentifier= $v.CustomKeyIdentifier - EndDateTime = $v.EndDateTime - Key= $v.Key - StartDateTime= $v.StartDateTime - Type= $v.Type - Usage= $v.Usage - } - - $a += $hash - } - - $Value = $a - $params["KeyCredentials"] = $Value + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["SignInAudience"]) { @@ -267,6 +235,38 @@ function New-EntraApplication { { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } + if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + { + $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) + { + $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + } + if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) + { + $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["IdentifierUris"]) + { + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + } + if($null -ne $PSBoundParameters["Web"]) + { + $TmpValue = $PSBoundParameters["Web"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Web"] = $Value + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 index a1f8f9a7a5..7d4300d54d 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 @@ -5,6 +5,9 @@ function New-EntraApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Name, @@ -13,51 +16,52 @@ function New-EntraApplicationExtensionProperty { [System.Collections.Generic.List`1[System.String]] $TargetObjects, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DataType, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $DataType ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } if ($null -ne $PSBoundParameters["Name"]) { @@ -67,25 +71,21 @@ function New-EntraApplicationExtensionProperty { { $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] } - if ($null -ne $PSBoundParameters["DataType"]) - { - $params["DataType"] = $PSBoundParameters["DataType"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["DataType"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["DataType"] = $PSBoundParameters["DataType"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 index 29c18f2c2c..445216d5f2 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 @@ -6,87 +6,87 @@ function New-EntraApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $Proof, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PasswordCredential"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Proof"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Proof"] = $PSBoundParameters["Proof"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["KeyCredential"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PasswordCredential"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Proof"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Proof"] = $PSBoundParameters["Proof"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["KeyCredential"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) - { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 index d806d8bb00..c2db7345f9 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 @@ -7,106 +7,106 @@ function New-EntraApplicationKeyCredential { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, + [System.String] $Value, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Value, + [System.Nullable`1[System.DateTime]] $StartDate, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ApplicationId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $CustomKeyIdentifier, + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.DateTime]] $EndDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.DateTime]] $StartDate + [System.String] $CustomKeyIdentifier ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Value"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Value"] = $PSBoundParameters["Value"] } - if ($null -ne $PSBoundParameters["Usage"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Usage"] = $PSBoundParameters["Usage"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["Type"]) - { - $params["Type"] = $PSBoundParameters["Type"] - } - if ($null -ne $PSBoundParameters["Value"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Value"] = $PSBoundParameters["Value"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["Type"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Type"] = $PSBoundParameters["Type"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["StartDate"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["StartDate"] = $PSBoundParameters["StartDate"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["EndDate"]) + if ($null -ne $PSBoundParameters["Usage"]) { - $params["EndDate"] = $PSBoundParameters["EndDate"] + $params["Usage"] = $PSBoundParameters["Usage"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["EndDate"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["EndDate"] = $PSBoundParameters["EndDate"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } - if ($null -ne $PSBoundParameters["StartDate"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["StartDate"] = $PSBoundParameters["StartDate"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 index 4513fbd479..bf522a2c2a 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 @@ -5,83 +5,83 @@ function New-EntraApplicationPassword { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["PasswordCredential"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["PasswordCredential"] - $hash = @{} - $TmpValue.PSObject.Properties | ForEach-Object { - if ($_.Value) { - $hash[$_.Name] = $_.Value - } - } - - $Value = $hash - $params["PasswordCredential"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["PasswordCredential"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["PasswordCredential"] + $hash = @{} + $TmpValue.PSObject.Properties | ForEach-Object { + if ($_.Value) { + $hash[$_.Name] = $_.Value + } + } + + $Value = $hash + $params["PasswordCredential"] = $Value } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) - { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 index 5a51fb5f03..33c29a19dd 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 @@ -6,91 +6,111 @@ function New-EntraServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ServicePrincipalType, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ReplyUrls, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, + [System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Tags, + [System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + [System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PublisherName, + [System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ErrorUrl, + [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $AlternativeNames, + [System.String] $PublisherName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AppId, + [System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Homepage, + [System.Collections.Generic.List`1[System.String]] $AlternativeNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $LogoutUrl, + [System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $SamlMetadataUrl, + [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired + [System.String] $ServicePrincipalType ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ServicePrincipalType"]) - { - $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["AppId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["AppId"] = $PSBoundParameters["AppId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["PasswordCredentials"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDate + SecretText= $v.Value + StartDateTime= $v.StartDate + } + + $a += $hash + } + $Value = $a + $params["PasswordCredentials"] = $Value } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($null -ne $PSBoundParameters["KeyCredentials"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $TmpValue = $PSBoundParameters["KeyCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDate + Key= $v.Value + StartDateTime= $v.StartDate + Type= $v.Type + Usage= $v.Usage + } + + $a += $hash + } + $Value = $a + $params["KeyCredentials"] = $Value } if ($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } - if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) - { - $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if($null -ne $PSBoundParameters["AccountEnabled"]) { $TmpValue = $PSBoundParameters["AccountEnabled"] @@ -102,113 +122,93 @@ function New-EntraServicePrincipal { } $params["AccountEnabled"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["LogoutUrl"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ErrorUrl"]) + { + $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] } if ($null -ne $PSBoundParameters["Tags"]) { $params["Tags"] = $PSBoundParameters["Tags"] } - if($null -ne $PSBoundParameters["PasswordCredentials"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $TmpValue = $PSBoundParameters["PasswordCredentials"] - $a = @() - $input = $TmpValue - foreach($v in $input) - { - $hash = @{ - CustomKeyIdentifier= $v.CustomKeyIdentifier - EndDateTime = $v.EndDate - SecretText= $v.Value - StartDateTime= $v.StartDate - } - - $a += $hash - } - $Value = $a - $params["PasswordCredentials"] = $Value + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PublisherName"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PublisherName"] = $PSBoundParameters["PublisherName"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorUrl"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["AlternativeNames"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) { - $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] + $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PublisherName"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PublisherName"] = $PSBoundParameters["PublisherName"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["SamlMetadataUrl"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } - if ($null -ne $PSBoundParameters["AppId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["AppId"] = $PSBoundParameters["AppId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Homepage"]) + if ($null -ne $PSBoundParameters["AlternativeNames"]) { - $params["Homepage"] = $PSBoundParameters["Homepage"] + $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["LogoutUrl"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["Homepage"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Homepage"] = $PSBoundParameters["Homepage"] } - if ($null -ne $PSBoundParameters["SamlMetadataUrl"]) + if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) { - $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] + $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] } - if($null -ne $PSBoundParameters["KeyCredentials"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $TmpValue = $PSBoundParameters["KeyCredentials"] - $a = @() - $input = $TmpValue - foreach($v in $input) - { - $hash = @{ - CustomKeyIdentifier= $v.CustomKeyIdentifier - EndDateTime = $v.EndDate - Key= $v.Value - StartDateTime= $v.StartDate - Type= $v.Type - Usage= $v.Usage - } - - $a += $hash - } - $Value = $a - $params["KeyCredentials"] = $Value + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalType"]) + { + $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 index c8ad2a0e66..b22620196b 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 @@ -6,86 +6,86 @@ function New-EntraServicePrincipalAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId, + [System.String] $Id, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AppRoleId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 index bd042cd176..f1fc7f7548 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 @@ -14,58 +14,58 @@ function Remove-EntraApplication { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) - { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 index 5eb242f5d6..82cd3b9d54 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 @@ -5,73 +5,73 @@ function Remove-EntraApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionPropertyId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionPropertyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } if ($null -ne $PSBoundParameters["ExtensionPropertyId"]) { $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["Debug"] = $PSBoundParameters["Debug"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 index b2da26a94c..1e5f92d8ac 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 @@ -6,51 +6,67 @@ function Remove-EntraApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $KeyId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Proof, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $KeyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Proof"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Proof"] = $PSBoundParameters["Proof"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -60,26 +76,10 @@ function Remove-EntraApplicationKey { { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["Proof"]) - { - $params["Proof"] = $PSBoundParameters["Proof"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) - { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 index 8e25f12ca4..4b7808c20c 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 @@ -5,49 +5,61 @@ function Remove-EntraApplicationKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $KeyId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -57,22 +69,10 @@ function Remove-EntraApplicationKeyCredential { { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) - { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 index b334456de8..ebeb0da6c6 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 @@ -5,73 +5,73 @@ function Remove-EntraApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OwnerId + [System.String] $OwnerId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 index dc8fedf18f..cbc218a2e5 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 @@ -6,48 +6,60 @@ function Remove-EntraApplicationPassword { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $KeyId, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $KeyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -57,22 +69,10 @@ function Remove-EntraApplicationPassword { { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) - { - $params["ApplicationId"] = $PSBoundParameters["ObjectId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 index c0823ef2e9..0baba3ca31 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 @@ -5,49 +5,61 @@ function Remove-EntraApplicationPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $KeyId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -57,22 +69,10 @@ function Remove-EntraApplicationPasswordCredential { { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) - { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 index 5c646f1b96..353765b6df 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 @@ -14,58 +14,58 @@ function Remove-EntraApplicationVerifiedPublisher { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["AppObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["AppObjectId"]) + { + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 index 89edda4a12..abcc21adeb 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 @@ -14,58 +14,58 @@ function Remove-EntraDeletedApplication { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) - { - $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 index b043722b52..5c8c4e43f7 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 @@ -14,58 +14,58 @@ function Remove-EntraServicePrincipal { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 index 2086d55297..a145bc1253 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 @@ -17,62 +17,62 @@ function Remove-EntraServicePrincipalAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 index b8bf8f656d..f80e1a848e 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 @@ -5,49 +5,61 @@ function Remove-EntraServicePrincipalKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $KeyId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId + [System.String] $ServicePrincipalId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -57,22 +69,10 @@ function Remove-EntraServicePrincipalKeyCredential { { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 index 703c5baf03..87eaadc227 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 @@ -6,11 +6,11 @@ function Restore-EntraDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $IdentifierUris, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $IdentifierUris ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 index a1981bcd68..6e7905c73c 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraGroupIdsServicePrincipalIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 index b92430dc5d..dc981a6c9a 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 @@ -17,61 +17,61 @@ function Set-EntraApplicationVerifiedPublisher { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["AppObjectId"]) - { - $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["AppObjectId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 index 375a2c496b..a4d44469e4 100644 --- a/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 @@ -3,40 +3,40 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Connect-AzureAD -Value Connect-Entra -Scope Global -Force Set-Alias -Name Disconnect-AzureAD -Value Disconnect-Entra -Scope Global -Force diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 index e0f9d646c3..8706cc0b67 100644 --- a/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 @@ -100,55 +100,5 @@ function Find-EntraPermission { Find-MgGraphPermission @params } -}function Restore-EntraDeletedDirectoryObject { - [CmdletBinding(DefaultParameterSetName = '')] - param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $AutoReconcileProxyConflict - ) - - PROCESS { - $params = @{} - $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - $params["Uri"] = 'https://graph.microsoft.com/v1.0/directory/deletedItems/' - $params["Method"] = "POST" - if($null -ne $PSBoundParameters["Id"]) - { - $params["Uri"] += $Id+"/microsoft.graph.restore" - } - if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) - { - $params["Body"] = @{ - autoReconcileProxyConflict = $true - } - } - - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug - Write-Debug("=========================================================================`n") - - $response = Invoke-GraphRequest @params -Headers $customHeaders - $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json - $data | ForEach-Object { - if($null -ne $_) { - Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id - - } - } - $userList = @() - foreach ($res in $data) { - $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject - $res.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) - $propertyValue = $_.Value - $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force - } - $userList += $userType - } - $userList - } }# ------------------------------------------------------------------------------ diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 index 4b94247287..7ee97f340c 100644 --- a/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 @@ -14,58 +14,58 @@ function Revoke-EntraUserAllRefreshToken { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) - { - $params["UserId"] = $PSBoundParameters["UserId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 index c592a6900b..cc3c6abeb2 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 @@ -5,76 +5,76 @@ function Add-EntraDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId + [System.String] $DeviceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DeviceId"]) - { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 index 99c0634f16..c39e09efa8 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 @@ -5,76 +5,76 @@ function Add-EntraDeviceRegisteredUser { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId + [System.String] $DeviceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DeviceId"]) - { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 index 166eb52df0..ff52e333d9 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 @@ -5,76 +5,76 @@ function Add-EntraDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DirectoryRoleId + [System.String] $DirectoryRoleId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" - $params["OdataId"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DirectoryRoleId"]) - { - $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 index 38cc10d082..c47e7cd1a8 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 @@ -17,62 +17,62 @@ function Confirm-EntraDomain { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["CrossCloudVerificationCode"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["CrossCloudVerificationCode"] = $PSBoundParameters["CrossCloudVerificationCode"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DomainId"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["CrossCloudVerificationCode"]) + { + $params["CrossCloudVerificationCode"] = $PSBoundParameters["CrossCloudVerificationCode"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 index 4afa422f7f..d046d23267 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 @@ -3,79 +3,79 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraDirectoryRoleTemplate -Scope Global -Force - Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-EntraAdministrativeUnit -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraDirectoryRoleMember -Scope Global -Force Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force - Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraDomain -Scope Global -Force - Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force - Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraDirectoryRole -Scope Global -Force - Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force - Set-Alias -Name Set-AzureADDevice -Value Set-EntraDevice -Scope Global -Force Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force - Set-Alias -Name Get-AzureADContract -Value Get-EntraContract -Scope Global -Force - Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force - Set-Alias -Name New-AzureADDevice -Value New-EntraDevice -Scope Global -Force - Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force - Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraDomainVerificationDnsRecord -Scope Global -Force Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force + Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraDirectoryRoleMember -Scope Global -Force Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADContract -Value Get-EntraContract -Scope Global -Force + Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Set-AzureADDevice -Value Set-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force - Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force + Set-Alias -Name New-AzureADDevice -Value New-EntraDevice -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-EntraRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name Get-EntraRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Add-EntraCustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 index 3c44b0f030..6d172b5085 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 @@ -14,54 +14,54 @@ function Enable-EntraDirectoryRole { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["RoleTemplateId"]) { $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 index 9f242e30aa..92979216c7 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 @@ -5,15 +5,15 @@ function Get-EntraContactDirectReport { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $OrgContactId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraContactDirectReport { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["OrgContactId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 index 56017c250a..74103b4f7f 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 @@ -16,58 +16,58 @@ function Get-EntraContactManager { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) - { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 index 03f423b2fb..38a9c39b4d 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 @@ -5,15 +5,15 @@ function Get-EntraContactMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $OrgContactId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraContactMembership { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["OrgContactId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 index cc36865b67..062b76c106 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 @@ -5,18 +5,18 @@ function Get-EntraContract { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ContractId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ContractId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -25,77 +25,77 @@ function Get-EntraContract { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"} - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ContractId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ContractId"] = $PSBoundParameters["ContractId"] } - if($null -ne $PSBoundParameters["Filter"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["ContractId"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["ContractId"] = $PSBoundParameters["ContractId"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 index f2d13b7830..3c0364d4e3 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 @@ -16,53 +16,53 @@ function Get-EntraDeletedDirectoryObject { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["DirectoryObjectId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DirectoryObjectId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 index 210f20678b..a23ad86547 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 @@ -6,20 +6,20 @@ function Get-EntraDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $SearchString, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $DeviceId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,83 +28,83 @@ function Get-EntraDevice { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["SearchString"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($null -ne $PSBoundParameters["Filter"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($null -ne $PSBoundParameters["SearchString"]) + if($null -ne $PSBoundParameters["Filter"]) { - $TmpValue = $PSBoundParameters["SearchString"] - $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["DeviceId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($null -ne $PSBoundParameters["Property"]) { @@ -119,15 +119,15 @@ function Get-EntraDevice { $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DevicePhysicalIds -Value PhysicalIds + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceTrustType -Value TrustType + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSVersion -Value OperatingSystemVersion - Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime - Add-Member -InputObject $_ -MemberType AliasProperty -Name DevicePhysicalIds -Value PhysicalIds + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled Add-Member -InputObject $_ -MemberType AliasProperty -Name ComplianceExpiryTime -Value ComplianceExpirationDateTime - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceTrustType -Value TrustType Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceObjectVersion -Value DeviceVersion - Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 index fcf3bec5fb..c4b54acde3 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 @@ -5,12 +5,12 @@ function Get-EntraDirectoryRole { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $DirectoryRoleId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -19,42 +19,58 @@ function Get-EntraDirectoryRole { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"} - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] @@ -64,22 +80,6 @@ function Get-EntraDirectoryRole { $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["DirectoryRoleId"]) - { - $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 index 183df10db5..64bbf4e10f 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 @@ -13,53 +13,53 @@ function Get-EntraDirectoryRoleTemplate { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 index 213fadb6b1..a63f43aa9b 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 @@ -16,53 +16,53 @@ function Get-EntraDomainServiceConfigurationRecord { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { @@ -80,8 +80,8 @@ function Get-EntraDomainServiceConfigurationRecord { $response = Get-MgDomainServiceConfigurationRecord @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 index f5011fa6bf..0e2285281a 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 @@ -16,53 +16,53 @@ function Get-EntraDomainVerificationDnsRecord { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { @@ -80,8 +80,8 @@ function Get-EntraDomainVerificationDnsRecord { $response = Get-MgDomainVerificationDnsRecord @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 index 1215395d91..cc443d0838 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 @@ -14,58 +14,58 @@ function Get-EntraExtensionProperty { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["IsSyncedFromOnPremises"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["IsSyncedFromOnPremises"] = $PSBoundParameters["IsSyncedFromOnPremises"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["IsSyncedFromOnPremises"]) - { - $params["IsSyncedFromOnPremises"] = $PSBoundParameters["IsSyncedFromOnPremises"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 index 90c22dd6f7..8882e1bc99 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 @@ -6,11 +6,11 @@ function Get-EntraTenantDetail { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 index 7882e0d6e4..87d68ec86e 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 @@ -7,86 +7,66 @@ function New-EntraDevice { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsManaged, + [System.Nullable`1[System.Boolean]] $IsCompliant, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DeviceId, + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DeviceTrustType, + [System.String] $ProfileType, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DeviceOSVersion, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SystemLabels, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompliant, + [System.Nullable`1[System.Int32]] $DeviceObjectVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $DeviceOSVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Int32]] $DeviceObjectVersion, + [System.String] $DeviceTrustType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DeviceOSType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsManaged, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, + [System.String] $DeviceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DeviceMetadata, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ProfileType, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SystemLabels, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["IsManaged"]) - { - $params["IsManaged"] = $PSBoundParameters["IsManaged"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["DeviceId"]) - { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] - } - if ($null -ne $PSBoundParameters["DeviceTrustType"]) - { - $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] - } - if ($null -ne $PSBoundParameters["DeviceOSVersion"]) + if ($null -ne $PSBoundParameters["IsCompliant"]) { - $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] + $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["IsCompliant"]) + if ($null -ne $PSBoundParameters["DevicePhysicalIds"]) { - $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] + $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { @@ -96,73 +76,93 @@ function New-EntraDevice { { $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) + if ($null -ne $PSBoundParameters["ProfileType"]) { - $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] + $params["ProfileType"] = $PSBoundParameters["ProfileType"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["DeviceOSType"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["SystemLabels"]) + { + $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) + if ($null -ne $PSBoundParameters["DeviceOSVersion"]) { - $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] + $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["DeviceTrustType"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) { $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["DeviceOSType"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] } - if ($null -ne $PSBoundParameters["DeviceMetadata"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProfileType"]) + if ($null -ne $PSBoundParameters["IsManaged"]) { - $params["ProfileType"] = $PSBoundParameters["ProfileType"] + $params["IsManaged"] = $PSBoundParameters["IsManaged"] } - if ($null -ne $PSBoundParameters["SystemLabels"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["DevicePhysicalIds"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DeviceMetadata"]) + { + $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + } + if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) + { + $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 index fe942ef038..c0f2aeb5cb 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 @@ -12,81 +12,81 @@ function New-EntraDomain { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefault, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Name + [System.String] $Name, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefault ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["SupportedServices"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["SupportedServices"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } - if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["IsDefault"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["IsDefault"] = $PSBoundParameters["IsDefault"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["Name"]) { $params["Id"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["IsDefault"]) + { + $params["IsDefault"] = $PSBoundParameters["IsDefault"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 index dab22efd8b..e5be9f34bc 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 @@ -14,58 +14,58 @@ function Remove-EntraContact { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) - { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 index b3befd6328..f10bcc371b 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 @@ -14,58 +14,58 @@ function Remove-EntraDevice { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DeviceId"]) - { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 index 9c72a3fe1c..cb6394608b 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 @@ -5,73 +5,73 @@ function Remove-EntraDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OwnerId + [System.String] $OwnerId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 index 73fcc521d4..84131281e1 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 @@ -17,61 +17,61 @@ function Remove-EntraDeviceRegisteredUser { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 index df8f099878..6afac8cc3b 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 @@ -17,62 +17,62 @@ function Remove-EntraDirectoryRoleMember { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } if ($null -ne $PSBoundParameters["MemberId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DirectoryRoleId"]) - { - $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 index 7b9bab7909..ba128fc4a6 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 @@ -14,53 +14,53 @@ function Remove-EntraDomain { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 index 3a1baae69f..d9f97bb1be 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 @@ -12,81 +12,81 @@ function Set-EntraDomain { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefault, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Name + [System.String] $Name, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefault ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["SupportedServices"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["SupportedServices"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } - if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["IsDefault"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["IsDefault"] = $PSBoundParameters["IsDefault"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["Name"]) { $params["DomainId"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["IsDefault"]) + { + $params["IsDefault"] = $PSBoundParameters["IsDefault"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 index 330e59e310..05f40f8742 100644 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 @@ -7,19 +7,19 @@ function Set-EntraTenantDetail { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationPhones, + [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails, + [System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile, + [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationMails, + [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationPhones, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails + [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 b/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 index 06625c0688..e695210554 100644 --- a/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 @@ -3,219 +3,219 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAlias { - Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraUserOwnedObject -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force - Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force - Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force - Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force + Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraDirectoryRoleTemplate -Scope Global -Force - Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-EntraAdministrativeUnit -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force - Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force Set-Alias -Name Set-AzureADUserManager -Value Set-EntraUserManager -Scope Global -Force - Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraUserPassword -Scope Global -Force - Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraUserExtension -Scope Global -Force Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force - Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraDomain -Scope Global -Force - Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraDirectoryRole -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraDomainVerificationDnsRecord -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force - Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force - Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Set-AzureADDevice -Value Set-EntraDevice -Scope Global -Force - Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force - Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force - Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force - Set-Alias -Name Get-AzureADContract -Value Get-EntraContract -Scope Global -Force - Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force - Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force - Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name New-AzureADDevice -Value New-EntraDevice -Scope Global -Force - Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force - Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force + Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force - Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraUserExtension -Scope Global -Force - Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraUserOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraApplicationKey -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraUserLicense -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraApplicationPassword -Scope Global -Force - Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraUserAllRefreshToken -Scope Global -Force - Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force - Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force - Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force - Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force - Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADGroup -Value Get-EntraGroup -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force + Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraUserAllRefreshToken -Scope Global -Force Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraDomainVerificationDnsRecord -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraUserCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraUserLicenseDetail -Scope Global -Force + Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force - Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraUserMembership -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force + Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraDirectoryRoleMember -Scope Global -Force Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force + Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraUserMembership -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraUserOwnedObject -Scope Global -Force + Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force + Set-Alias -Name Get-AzureADContract -Value Get-EntraContract -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force + Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADDevice -Value Set-EntraDevice -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force - Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADGroup -Value Get-EntraGroup -Scope Global -Force - Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force - Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraUserLicenseDetail -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force - Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADDevice -Value New-EntraDevice -Scope Global -Force Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraApplicationServiceEndpoint -Scope Global -Force - Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Connect-AzureAD -Value Connect-Entra -Scope Global -Force Set-Alias -Name Disconnect-AzureAD -Value Disconnect-Entra -Scope Global -Force Set-Alias -Name Remove-EntraRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 index 18bb52ba45..30a0fd6056 100644 --- a/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 @@ -3,45 +3,45 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-EntraRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name Get-EntraRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name New-EntraRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 index 0f7acf1bca..263008492e 100644 --- a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 @@ -5,21 +5,21 @@ function Get-EntraDirectoryRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, [Alias('Id')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UnifiedRoleAssignmentId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,45 +28,65 @@ function Get-EntraDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{} - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["SearchString"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["SearchString"] = $PSBoundParameters["SearchString"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + { + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] @@ -80,30 +100,10 @@ function Get-EntraDirectoryRoleAssignment { $Value = $TmpValue $params["Filter"] = $Value } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["SearchString"]) - { - $params["SearchString"] = $PSBoundParameters["SearchString"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 index cd1e5451b6..3e21e79746 100644 --- a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 @@ -7,10 +7,10 @@ function New-EntraDirectoryRoleAssignment { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PrincipalId, + [System.String] $RoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $RoleDefinitionId, + [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DirectoryScopeId @@ -20,62 +20,62 @@ function New-EntraDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["DirectoryScopeId"]) { $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 index c9be0cd37f..0e6952a285 100644 --- a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 @@ -6,113 +6,113 @@ function New-EntraDirectoryRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DisplayName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TemplateId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsEnabled, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ResourceScopes, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsEnabled, + [System.String] $TemplateId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ResourceScopes"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["TemplateId"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["TemplateId"] = $PSBoundParameters["TemplateId"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["Version"]) + if($null -ne $PSBoundParameters["RolePermissions"]) { - $params["Version"] = $PSBoundParameters["Version"] + $TmpValue = $PSBoundParameters["RolePermissions"] + $Temp = @{ + allowedResourceActions = $TmpValue.allowedResourceActions + condition = $TmpValue.condition + } + $Value = $Temp + $params["RolePermissions"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ResourceScopes"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Version"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Version"] = $PSBoundParameters["Version"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if ($null -ne $PSBoundParameters["TemplateId"]) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["TemplateId"] = $PSBoundParameters["TemplateId"] } - if($null -ne $PSBoundParameters["RolePermissions"]) + if ($null -ne $PSBoundParameters["Description"]) { - $TmpValue = $PSBoundParameters["RolePermissions"] - $Temp = @{ - allowedResourceActions = $TmpValue.allowedResourceActions - condition = $TmpValue.condition - } - $Value = $Temp - $params["RolePermissions"] = $Value + $params["Description"] = $PSBoundParameters["Description"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 index cd16ac4fc4..56a33b4bb1 100644 --- a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 @@ -14,53 +14,53 @@ function Remove-EntraDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 index 293d53c09d..c21491040d 100644 --- a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 @@ -14,53 +14,53 @@ function Remove-EntraDirectoryRoleDefinition { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 index bf57845b42..6f3387e9e7 100644 --- a/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 @@ -7,109 +7,81 @@ function Set-EntraDirectoryRoleDefinition { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UnifiedRoleDefinitionId, + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TemplateId, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Version, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ResourceScopes, + [System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsEnabled, + [System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions + [System.String] $Description ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ResourceScopes"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } - if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["TemplateId"]) - { - $params["TemplateId"] = $PSBoundParameters["TemplateId"] - } - if ($null -ne $PSBoundParameters["Description"]) - { - $params["Description"] = $PSBoundParameters["Description"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["Version"]) - { - $params["Version"] = $PSBoundParameters["Version"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ResourceScopes"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if($null -ne $PSBoundParameters["RolePermissions"]) { @@ -125,6 +97,34 @@ function Set-EntraDirectoryRoleDefinition { } $params["RolePermissions"] = $Value } + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + { + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["Version"]) + { + $params["Version"] = $PSBoundParameters["Version"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["TemplateId"]) + { + $params["TemplateId"] = $PSBoundParameters["TemplateId"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 index 13b6f20463..cd9fdedd95 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 @@ -5,74 +5,74 @@ function Add-EntraGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["RefObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 index b75d7e6c91..421fc5f4c6 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 @@ -5,76 +5,76 @@ function Add-EntraGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} - $params["BodyParameter"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} + $params["BodyParameter"] = $Value } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 index 576bdcb18a..ba8844e444 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 @@ -17,62 +17,62 @@ function Add-EntraLifecyclePolicyGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 index 3671f5ac83..70ab6ed103 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 @@ -3,63 +3,63 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force - Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force Set-Alias -Name Get-AzureADGroup -Value Get-EntraGroup -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force } diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 index dce890fa05..a23e4a21ad 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 @@ -6,20 +6,20 @@ function Get-EntraGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $SearchString, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $GroupId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,83 +28,83 @@ function Get-EntraGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["SearchString"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" + $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($null -ne $PSBoundParameters["Filter"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($null -ne $PSBoundParameters["SearchString"]) + if($null -ne $PSBoundParameters["Filter"]) { - $TmpValue = $PSBoundParameters["SearchString"] - $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 index b6b2cbd0f2..88656e8da2 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 @@ -5,15 +5,15 @@ function Get-EntraGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $GroupId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraGroupAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 index 2b2bb1ce0e..a6091cc837 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 @@ -16,53 +16,53 @@ function Get-EntraGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 index 9ea2d2fa2c..d649e60802 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 @@ -16,53 +16,53 @@ function Get-EntraGroupPermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 index 5fde4c5d59..84e766a192 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 @@ -16,53 +16,53 @@ function Get-EntraLifecyclePolicyGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 index 854d36fda7..49bf23daad 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 @@ -97,5 +97,54 @@ function Get-EntraObjectSetting { $targetTypeList } +}function Get-EntraAuthorizationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/authorizationPolicy?" + $params["Method"] = "GET" + + if($null -ne $PSBoundParameters["Id"]) + { + $Id = $Id.Substring(0, 1).ToLower() + $Id.Substring(1) + $Filter = "Id eq '$Id'" + $f = '$' + 'Filter' + $params["Uri"] += "&$f=$Filter" + } + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $params["Uri"] += "&$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + if($response){ + $policyList = @() + foreach ($data in $response) { + $policyType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAuthorizationPolicy + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $policyType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $policyList += $policyType + } + $policyList + } + } }# ------------------------------------------------------------------------------ diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 index c64cc58176..f046401457 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 @@ -6,70 +6,66 @@ function New-EntraGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $MailNickname, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.Nullable`1[System.Boolean]] $SecurityEnabled, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $MailEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Visibility, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + [System.Collections.Generic.List`1[System.String]] $GroupTypes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $MailNickname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $GroupTypes + [System.String] $Description ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["MailNickname"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["MailNickname"] = $PSBoundParameters["MailNickname"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["MailEnabled"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { @@ -79,41 +75,45 @@ function New-EntraGroup { { $params["Visibility"] = $PSBoundParameters["Visibility"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["GroupTypes"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GroupTypes"]) + if ($null -ne $PSBoundParameters["MailNickname"]) { - $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + $params["MailNickname"] = $PSBoundParameters["MailNickname"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["MailEnabled"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Description"] = $PSBoundParameters["Description"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 index 1275890e29..286b032f69 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 @@ -5,87 +5,87 @@ function New-EntraGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('Id')] - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AppRoleId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, + [Alias('Id')] + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppRoleId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $ResourceId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["AppRoleId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppRoleId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 index f135d53338..86311467e0 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 @@ -20,61 +20,61 @@ function New-EntraGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 index f933aeed2d..25d32c6dde 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 @@ -14,58 +14,58 @@ function Remove-EntraGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 index 91e1a7a219..144e3df1e2 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 @@ -17,62 +17,62 @@ function Remove-EntraGroupAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 index f3a17f74a8..2e4e021191 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 @@ -14,53 +14,53 @@ function Remove-EntraGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 index 6e9d37af62..fa29dcf564 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 @@ -17,62 +17,62 @@ function Remove-EntraGroupMember { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } if ($null -ne $PSBoundParameters["MemberId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 index 49ce25a572..1e7ad68534 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 @@ -5,73 +5,73 @@ function Remove-EntraGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OwnerId + [System.String] $OwnerId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 index b698ca4877..8cad13aba0 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 @@ -17,62 +17,62 @@ function Remove-EntraLifecyclePolicyGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 index 679810be3d..4025272131 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 @@ -14,53 +14,53 @@ function Reset-EntraLifeCycleGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 index 7641c0ef00..de7c1145f1 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraGroupIdsContactIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 index e7201dc21d..9ba3b673c0 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraGroupIdsGroupIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 index a4e66f7749..0c118f45e9 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraGroupIdsUserIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 index 913e5f6747..b4aaddfe98 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 @@ -7,72 +7,68 @@ function Set-EntraGroup { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, + [System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $SecurityEnabled, + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $GroupTypes, + [System.String] $Visibility, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $MailEnabled, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Visibility, + [System.Collections.Generic.List`1[System.String]] $GroupTypes, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.String] $MailNickname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + [System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickname + [System.String] $Description ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["GroupTypes"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["MailEnabled"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { @@ -82,37 +78,33 @@ function Set-EntraGroup { { $params["Visibility"] = $PSBoundParameters["Visibility"] } - if ($null -ne $PSBoundParameters["Description"]) - { - $params["Description"] = $PSBoundParameters["Description"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["GroupTypes"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { @@ -122,6 +114,14 @@ function Set-EntraGroup { { $params["MailNickname"] = $PSBoundParameters["MailNickname"] } + if ($null -ne $PSBoundParameters["MailEnabled"]) + { + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 index 25167a96a3..6ba19e69ec 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 @@ -8,80 +8,80 @@ function Set-EntraGroupLifecyclePolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $ManagedGroupTypes, - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupLifecyclePolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AlternateNotificationEmails + [System.String] $AlternateNotificationEmails, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) - { - $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 index 8f38ff13ac..552ce042ec 100644 --- a/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 @@ -5,36 +5,36 @@ function Enable-EntraAzureADAliases { Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force } diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 b/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 index 36df233f27..a43fc41789 100644 --- a/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 @@ -10,22 +10,22 @@ function New-EntraInvitation { [System.String] $InvitedUserEmailAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $InvitedUserType, + [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $SendInvitationMessage, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $InvitedUserDisplayName, + [Microsoft.Open.MSGraph.Model.User] $InvitedUser, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.User] $InvitedUser, + [System.Nullable`1[System.Boolean]] $SendInvitationMessage, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $InviteRedirectUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo + [System.String] $InvitedUserType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $InvitedUserDisplayName ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 index 49db31eea3..38cda4bb4b 100644 --- a/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 @@ -4,36 +4,36 @@ # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force } diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 b/module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 index b9bd962b8d..f75a033826 100644 --- a/module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 @@ -135,5 +135,5 @@ function Test-EntraScript { } } } -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 index 91f0f7f55a..72e5f37ebf 100644 --- a/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 @@ -4,37 +4,37 @@ # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-EntraAuditDirectoryLogs -Value Get-EntraAuditDirectoryLog -Scope Global -Force Set-Alias -Name Get-EntraAuditSignInLogs -Value Get-EntraAuditSignInLog -Scope Global -Force diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 index 0d3e8a1751..bfb5dfd323 100644 --- a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 @@ -87,5 +87,5 @@ function Get-EntraAuditSignInLog { } $userList } -} +}# ------------------------------------------------------------------------------ diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 index 92983cb8b9..e1c785cd92 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 @@ -3,64 +3,64 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force } diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 deleted file mode 100644 index 755f4b8eef..0000000000 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 +++ /dev/null @@ -1,55 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraAuthorizationPolicy { - [CmdletBinding(DefaultParameterSetName = '')] - param ( - [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] - [System.String[]] $Property - ) - - PROCESS { - $params = @{} - $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/authorizationPolicy?" - $params["Method"] = "GET" - - if($null -ne $PSBoundParameters["Id"]) - { - $Id = $Id.Substring(0, 1).ToLower() + $Id.Substring(1) - $Filter = "Id eq '$Id'" - $f = '$' + 'Filter' - $params["Uri"] += "&$f=$Filter" - } - if($null -ne $PSBoundParameters["Property"]) - { - $selectProperties = $PSBoundParameters["Property"] - $selectProperties = $selectProperties -Join ',' - $properties = "`$select=$($selectProperties)" - $params["Uri"] += "&$properties" - } - - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug - Write-Debug("=========================================================================`n") - - $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json - if($response){ - $policyList = @() - foreach ($data in $response) { - $policyType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAuthorizationPolicy - $data.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name - $propertyValue = $_.Value - $policyType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force - } - $policyList += $policyType - } - $policyList - } - } -}# ------------------------------------------------------------------------------ - diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 index 139c1049c2..5e41ff8a5f 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 @@ -16,58 +16,58 @@ function Get-EntraConditionalAccessPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 index effecdfde6..131dfd69e9 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 @@ -16,53 +16,53 @@ function Get-EntraIdentityProvider { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { @@ -80,9 +80,9 @@ function Get-EntraIdentityProvider { $response = Get-MgIdentityProvider @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName Add-Member -InputObject $_ -MemberType AliasProperty -Name Type -Value identityProviderType + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 index 493cff9df7..513fd53aca 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 @@ -6,11 +6,11 @@ function Get-EntraOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -19,44 +19,45 @@ function Get-EntraOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -66,13 +67,12 @@ function Get-EntraOAuth2PermissionGrant { { $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 index 3f532c92a0..6c8cefc164 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 @@ -6,14 +6,14 @@ function Get-EntraPermissionGrantConditionSet { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $PolicyId, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 index 352d5e7cee..96ec206000 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 @@ -16,53 +16,53 @@ function Get-EntraPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 index 954f948652..2247263f8d 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 @@ -7,10 +7,10 @@ function Get-EntraTrustedCertificateAuthority { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TrustedIssuer, + [System.String] $TrustedIssuerSki, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TrustedIssuerSki, + [System.String] $TrustedIssuer, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 index 293b86bb15..c699be9467 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 @@ -7,75 +7,51 @@ function New-EntraConditionalAccessPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["Id"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["GrantControls"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["GrantControls"] + $hash = @{} + if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } + if($null -ne $TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } + if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } + if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } + + $Value = $hash + $params["GrantControls"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["State"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["State"] = $PSBoundParameters["State"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if($null -ne $PSBoundParameters["Conditions"]) { @@ -99,9 +75,33 @@ function New-EntraConditionalAccessPolicy { } $params["Conditions"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($null -ne $PSBoundParameters["SessionControls"]) { @@ -122,25 +122,25 @@ function New-EntraConditionalAccessPolicy { } $params["SessionControls"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Id"] = $PSBoundParameters["Id"] } - if($null -ne $PSBoundParameters["GrantControls"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $TmpValue = $PSBoundParameters["GrantControls"] - $hash = @{} - if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } - if($null -ne $TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } - if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } - if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } - - $Value = $hash - $params["GrantControls"] = $Value + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 index 776de0d7b1..7047754749 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 @@ -6,9 +6,6 @@ function New-EntraIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ClientSecret, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $Type, @@ -16,7 +13,10 @@ function New-EntraIdentityProvider { [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ClientId + [System.String] $ClientId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ClientSecret ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 index 77e7927acc..c72608b6bd 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 @@ -9,9 +9,6 @@ function New-EntraNamedLocationPolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, @@ -24,6 +21,9 @@ function New-EntraNamedLocationPolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsTrusted, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges ) diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 index eb9cd0b152..77e696dff1 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 @@ -7,16 +7,10 @@ function New-EntraPermissionGrantConditionSet { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionClassification, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionType, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [System.Collections.Generic.List`1[System.String]] $Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $ResourceApplication, @@ -25,16 +19,22 @@ function New-EntraPermissionGrantConditionSet { [System.String] $ConditionSetType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + [System.String] $PermissionType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Permissions, + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionClassification, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 index f7a8789636..c81f7a5bcf 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 @@ -20,66 +20,66 @@ function New-EntraPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Id"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Id"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 index a476e7caeb..298255ecaf 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 @@ -14,58 +14,58 @@ function Remove-EntraConditionalAccessPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 index 2ac3b06f9c..c99a53e4e2 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 @@ -23,5 +23,55 @@ function Remove-EntraFeatureRolloutPolicy { $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json $response } +}function Restore-EntraDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $AutoReconcileProxyConflict + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = 'https://graph.microsoft.com/v1.0/directory/deletedItems/' + $params["Method"] = "POST" + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] += $Id+"/microsoft.graph.restore" + } + if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) + { + $params["Body"] = @{ + autoReconcileProxyConflict = $true + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $data | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $userList = @() + foreach ($res in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } }# ------------------------------------------------------------------------------ diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 index f3b14538a8..72b60defa1 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 @@ -14,53 +14,53 @@ function Remove-EntraIdentityProvider { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 index c45b8bcf17..85b86671bb 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 @@ -14,58 +14,58 @@ function Remove-EntraNamedLocationPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 index 2295bf84ed..d496b89696 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 @@ -14,58 +14,58 @@ function Remove-EntraOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) - { - $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 index eb29c3c739..10a5f21c16 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 @@ -7,13 +7,13 @@ function Remove-EntraPermissionGrantConditionSet { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $ConditionSetType, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType + [System.String] $PolicyId ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 index 5c8e6d49d0..96e9301a6f 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 @@ -14,53 +14,53 @@ function Remove-EntraPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 index d3d3e6a7db..304f2060d4 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 @@ -7,86 +7,98 @@ function Set-EntraAuthorizationPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, + [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, + [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR + [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Description"] = $PSBoundParameters["Description"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) + if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) { - $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] + $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) { @@ -100,21 +112,9 @@ function Set-EntraAuthorizationPolicy { $Value = $hash $params["DefaultUserRolePermissions"] = $Value } - if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) - { - $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 index 185de36477..0906e35774 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 @@ -7,83 +7,54 @@ function Set-EntraConditionalAccessPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["GrantControls"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $TmpValue = $PSBoundParameters["GrantControls"] + $hash = @{} + if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } + if($TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } + if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } + if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } + $Value = $hash + $params["GrantControls"] = $Value } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Id"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["PolicyId"]) - { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["State"]) - { - $params["State"] = $PSBoundParameters["State"] - } if($null -ne $PSBoundParameters["Conditions"]) { $TmpValue = $PSBoundParameters["Conditions"] @@ -124,9 +95,33 @@ function Set-EntraConditionalAccessPolicy { $Value = $hash $params["Conditions"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($null -ne $PSBoundParameters["SessionControls"]) { @@ -160,24 +155,29 @@ function Set-EntraConditionalAccessPolicy { $Value = $hash $params["SessionControls"] = $Value } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($null -ne $PSBoundParameters["GrantControls"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $TmpValue = $PSBoundParameters["GrantControls"] - $hash = @{} - if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } - if($TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } - if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } - if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } - $Value = $hash - $params["GrantControls"] = $Value + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 index ad3acf8e65..a076a0c1b3 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 @@ -10,25 +10,25 @@ function Set-EntraNamedLocationPolicy { [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $OdataType, + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsTrusted, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 index 840cb0f765..050825f20c 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 @@ -7,16 +7,10 @@ function Set-EntraPermissionGrantConditionSet { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionClassification, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [System.Collections.Generic.List`1[System.String]] $Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $ResourceApplication, @@ -24,20 +18,26 @@ function Set-EntraPermissionGrantConditionSet { [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ConditionSetType, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionType, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + [System.String] $PermissionType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Permissions, + [System.String] $PermissionClassification, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 index 8e080062c3..904eed234a 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 @@ -20,66 +20,66 @@ function Set-EntraPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 index 2d279836f8..12c3c97f41 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 @@ -3,63 +3,63 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraUserOwnedObject -Scope Global -Force - Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force - Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force - Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force Set-Alias -Name Set-AzureADUserManager -Value Set-EntraUserManager -Scope Global -Force Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force - Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force - Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force - Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force - Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraUserExtension -Scope Global -Force - Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraUserLicense -Scope Global -Force - Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force - Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraUserCreatedObject -Scope Global -Force - Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraUserMembership -Scope Global -Force - Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraUserLicenseDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraUserMembership -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraUserOwnedObject -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force + Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force + Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force } diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 index 789aa8cb48..c7f009c7d0 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 @@ -6,14 +6,14 @@ function Get-EntraUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraUserAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 index 5c8950c5dd..46a59d92b1 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 @@ -16,58 +16,58 @@ function Get-EntraUserLicenseDetail { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) - { - $params["UserId"] = $PSBoundParameters["UserId"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 index 723e3acf6f..99e86b2727 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 @@ -5,15 +5,15 @@ function Get-EntraUserMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UserId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraUserMembership { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 index 0380c7289d..39e8c7dfd8 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 @@ -5,15 +5,15 @@ function Get-EntraUserOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UserId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraUserOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 index f4e0406c97..1349a8a703 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 @@ -8,15 +8,15 @@ function Get-EntraUserThumbnailPhoto { [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Boolean] $View, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $FileName, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $FilePath, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -29,21 +29,9 @@ function Get-EntraUserThumbnailPhoto { { $params["View"] = $PSBoundParameters["View"] } - if ($null -ne $PSBoundParameters["FileName"]) - { - $params["FileName"] = $PSBoundParameters["FileName"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { @@ -53,41 +41,53 @@ function Get-EntraUserThumbnailPhoto { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["FilePath"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["FilePath"] = $PSBoundParameters["FilePath"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["FileName"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["FileName"] = $PSBoundParameters["FileName"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["FilePath"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["FilePath"] = $PSBoundParameters["FilePath"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 index eb71b54c3e..1a9dd81a22 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 @@ -7,70 +7,61 @@ function New-EntraUser { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserState, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompromised, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Surname, + [System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + [System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Country, + [System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OtherMails, + [System.String] $UsageLocation, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PostalCode, + [System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PhysicalDeliveryOfficeName, + [System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GivenName, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.Nullable`1[System.Boolean]] $IsCompromised, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserPrincipalName, + [System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreationType, + [System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AgeGroup, + [System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $JobTitle, + [System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ImmutableId, + [System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CompanyName, + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PasswordPolicies, + [System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + [System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TelephoneNumber, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $UserStateChangedOn, @@ -79,34 +70,43 @@ function New-EntraUser { [System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $City, + [System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UsageLocation, + [System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $FacsimileTelephoneNumber, + [System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ShowInAddressList, + [System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Department, + [System.String] $GivenName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserType, + [System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PreferredLanguage, + [System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ConsentProvidedForMinor, + [System.String] $State, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickName, + [System.String] $City, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $StreetAddress + [System.String] $MailNickName ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 index dba7c210ee..20897e6af4 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 @@ -6,86 +6,86 @@ function New-EntraUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId, + [System.String] $Id, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AppRoleId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 index ada0c5ef63..9f7705008c 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 @@ -14,58 +14,58 @@ function Remove-EntraUser { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) - { - $params["UserId"] = $PSBoundParameters["UserId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 index d9b0867b02..77bd14260a 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 @@ -17,62 +17,62 @@ function Remove-EntraUserAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 index 7e304ce936..1b93b758b3 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 @@ -8,78 +8,78 @@ function Remove-EntraUserExtension { [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Collections.Generic.List`1[System.String]] $ExtensionNames, - - [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionName, [Alias('ObjectId')] [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionId + [System.String] $ExtensionId, + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ExtensionNames"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ExtensionName"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ExtensionNames"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ExtensionId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ExtensionId"] = $PSBoundParameters["ExtensionId"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ExtensionId"]) + if ($null -ne $PSBoundParameters["ExtensionName"]) { - $params["ExtensionId"] = $PSBoundParameters["ExtensionId"] + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 index de11c1ce1e..ebdb6541d4 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 @@ -14,58 +14,58 @@ function Remove-EntraUserManager { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) - { - $params["UserId"] = $PSBoundParameters["UserId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 index 0cb69750cb..b14221cd9d 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 @@ -7,194 +7,174 @@ function Set-EntraUser { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserState, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompromised, + [System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Surname, + [System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + [System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Country, + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OtherMails, + [System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PostalCode, + [System.Nullable`1[System.Boolean]] $IsCompromised, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PhysicalDeliveryOfficeName, + [System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GivenName, + [System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserPrincipalName, + [System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreationType, + [System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + [System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AgeGroup, + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $JobTitle, + [System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ImmutableId, + [System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CompanyName, + [System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PasswordPolicies, + [System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + [System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TelephoneNumber, + [System.String] $UserStateChangedOn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserStateChangedOn, + [System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Mobile, + [System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $City, + [System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UsageLocation, + [System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $FacsimileTelephoneNumber, + [System.String] $GivenName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ShowInAddressList, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Department, + [System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserType, + [System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PreferredLanguage, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ConsentProvidedForMinor, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId, + [System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickName, + [System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $StreetAddress + [System.String] $Country, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["SignInNames"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Identities"] = $PSBoundParameters["SignInNames"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["CompanyName"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["CompanyName"] = $PSBoundParameters["CompanyName"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["UserState"]) + if ($null -ne $PSBoundParameters["StreetAddress"]) { - $params["ExternalUserState"] = $PSBoundParameters["UserState"] + $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] } - if ($null -ne $PSBoundParameters["IsCompromised"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Surname"]) + if ($null -ne $PSBoundParameters["UsageLocation"]) { - $params["Surname"] = $PSBoundParameters["Surname"] + $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] } - if ($null -ne $PSBoundParameters["ExtensionProperty"]) + if ($null -ne $PSBoundParameters["AccountEnabled"]) { - $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["Surname"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Surname"] = $PSBoundParameters["Surname"] } - if ($null -ne $PSBoundParameters["Country"]) + if ($null -ne $PSBoundParameters["PasswordPolicies"]) { - $params["Country"] = $PSBoundParameters["Country"] + $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] } - if ($null -ne $PSBoundParameters["OtherMails"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OtherMails"] = $PSBoundParameters["OtherMails"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["State"]) + if ($null -ne $PSBoundParameters["IsCompromised"]) { - $params["State"] = $PSBoundParameters["State"] + $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] } if ($null -ne $PSBoundParameters["PostalCode"]) { $params["PostalCode"] = $PSBoundParameters["PostalCode"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) - { - $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] - } - if ($null -ne $PSBoundParameters["GivenName"]) - { - $params["GivenName"] = $PSBoundParameters["GivenName"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["AccountEnabled"]) - { - $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Department"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Department"] = $PSBoundParameters["Department"] } - if ($null -ne $PSBoundParameters["UserPrincipalName"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["CreationType"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["CreationType"] = $PSBoundParameters["CreationType"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if($null -ne $PSBoundParameters["PasswordProfile"]) { @@ -206,49 +186,57 @@ function Set-EntraUser { } $params["PasswordProfile"] = $Value } - if ($null -ne $PSBoundParameters["AgeGroup"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["JobTitle"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["JobTitle"] = $PSBoundParameters["JobTitle"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ImmutableId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["CreationType"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["CreationType"] = $PSBoundParameters["CreationType"] } - if ($null -ne $PSBoundParameters["CompanyName"]) + if ($null -ne $PSBoundParameters["PreferredLanguage"]) { - $params["CompanyName"] = $PSBoundParameters["CompanyName"] + $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] } - if ($null -ne $PSBoundParameters["PasswordPolicies"]) + if ($null -ne $PSBoundParameters["TelephoneNumber"]) { - $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] + $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] } - if ($null -ne $PSBoundParameters["SignInNames"]) + if ($null -ne $PSBoundParameters["ExtensionProperty"]) { - $params["Identities"] = $PSBoundParameters["SignInNames"] + $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ShowInAddressList"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] } - if ($null -ne $PSBoundParameters["TelephoneNumber"]) + if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) { - $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] + $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ImmutableId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["UserPrincipalName"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["MailNickName"]) + { + $params["MailNickName"] = $PSBoundParameters["MailNickName"] } if ($null -ne $PSBoundParameters["UserStateChangedOn"]) { @@ -258,57 +246,69 @@ function Set-EntraUser { { $params["MobilePhone"] = $PSBoundParameters["Mobile"] } - if ($null -ne $PSBoundParameters["City"]) + if ($null -ne $PSBoundParameters["OtherMails"]) { - $params["City"] = $PSBoundParameters["City"] + $params["OtherMails"] = $PSBoundParameters["OtherMails"] } - if ($null -ne $PSBoundParameters["UsageLocation"]) + if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) { - $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] + $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] } - if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] } - if ($null -ne $PSBoundParameters["ShowInAddressList"]) + if ($null -ne $PSBoundParameters["UserType"]) { - $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] + $params["UserType"] = $PSBoundParameters["UserType"] } - if ($null -ne $PSBoundParameters["Department"]) + if ($null -ne $PSBoundParameters["GivenName"]) { - $params["Department"] = $PSBoundParameters["Department"] + $params["GivenName"] = $PSBoundParameters["GivenName"] } - if ($null -ne $PSBoundParameters["UserType"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["UserType"] = $PSBoundParameters["UserType"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PreferredLanguage"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + if ($null -ne $PSBoundParameters["UserState"]) { - $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] + $params["ExternalUserState"] = $PSBoundParameters["UserState"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["AgeGroup"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["State"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["State"] = $PSBoundParameters["State"] } - if ($null -ne $PSBoundParameters["MailNickName"]) + if ($null -ne $PSBoundParameters["JobTitle"]) { - $params["MailNickName"] = $PSBoundParameters["MailNickName"] + $params["JobTitle"] = $PSBoundParameters["JobTitle"] } - if ($null -ne $PSBoundParameters["StreetAddress"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["City"]) + { + $params["City"] = $PSBoundParameters["City"] + } + if ($null -ne $PSBoundParameters["Country"]) + { + $params["Country"] = $PSBoundParameters["Country"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 index e73e84fc34..f6f995957b 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 @@ -5,88 +5,87 @@ function Set-EntraUserExtension { [CmdletBinding(DefaultParameterSetName = '')] param ( + [Alias('ObjectId')] + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionNameValues, - [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionName, - [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ExtensionValue, - [Alias('ObjectId')] + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id + [System.String] $ExtensionName ) - PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ExtensionNameValues"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ExtensionNameValues"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ExtensionValue"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["ExtensionName"]) { $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["ExtensionValue"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Id"] = $PSBoundParameters["Id"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } Write-Debug("============================ TRANSFORMATIONS ============================") @@ -96,11 +95,11 @@ function Set-EntraUserExtension { $response = Update-MgUserExtension @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserId -Value Id } } $response - } + } } diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 index e060847812..2d9a1c9b33 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 @@ -5,76 +5,76 @@ function Set-EntraUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId + [System.String] $UserId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} - $params["BodyParameter"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} + $params["BodyParameter"] = $Value } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) - { - $params["UserId"] = $PSBoundParameters["UserId"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 index 2d793b6226..b0f96ec709 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 @@ -6,9 +6,6 @@ function Set-EntraUserThumbnailPhoto { [CmdletBinding(DefaultParameterSetName = 'File')] param ( - [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FilePath, - [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.IO.Stream] $FileStream, @@ -19,76 +16,79 @@ function Set-EntraUserThumbnailPhoto { [Parameter(ParameterSetName = "Stream")] [Parameter(ParameterSetName = "File")] [Parameter(ParameterSetName = "ByteArray")] - [System.String] $UserId + [System.String] $UserId, + + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["FilePath"]) - { - $params["InFile"] = $PSBoundParameters["FilePath"] - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["FileStream"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["FileStream"] = $PSBoundParameters["FileStream"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ImageByteArray"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["FileStream"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["FileStream"] = $PSBoundParameters["FileStream"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ImageByteArray"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["FilePath"]) + { + $params["InFile"] = $PSBoundParameters["FilePath"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 index 6188a142ae..72d01e4b7f 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 +++ b/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 @@ -7,10 +7,10 @@ function Update-EntraSignedInUserPassword { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Security.SecureString] $NewPassword, + [System.Security.SecureString] $CurrentPassword, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Security.SecureString] $CurrentPassword + [System.Security.SecureString] $NewPassword ) PROCESS { diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncfeature.ps1 b/module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncfeature.ps1 rename to module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 diff --git a/module/Entra/config/dependencyMapping.json b/module/Entra/config/dependencyMapping.json index dd089a7bb4..8306ef14d4 100644 --- a/module/Entra/config/dependencyMapping.json +++ b/module/Entra/config/dependencyMapping.json @@ -1,11 +1,11 @@ { - "Microsoft.Graph.Entra.User":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], + "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], "Microsoft.Graph.Entra.Authentication":["Microsoft.Graph.Authentication"], - "Microsoft.Graph.Entra.Directory":["Microsoft.Graph.DirectoryObjects"], - "Microsoft.Graph.Entra.Group":["Microsoft.Graph.Groups"], + "Microsoft.Graph.Entra.Groups":["Microsoft.Graph.Groups"], "Microsoft.Graph.Entra.DirectoryManagement":["Microsoft.Graph.DirectoryManagement"], "Microsoft.Graph.Entra.Governance":["Microsoft.Graph.Governance"], "Microsoft.Graph.Entra.SignIns":["Microsoft.Graph.SigIns"], - "Microsoft.Graph.Entra.Application":["Microsoft.Graph.Applications"], - "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"] + "Microsoft.Graph.Entra.Applications":["Microsoft.Graph.Applications"], + "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"], + "Microsoft.Graph.Entra.Invitations":["Microsoft.Graph.Identity.SignIns"] } \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md deleted file mode 100644 index c9bfb8a7fa..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Add-EntraApplicationOwner -description: This article provides details on the Add-EntraApplicationOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraApplicationOwner - -schema: 2.0.0 ---- - -# Add-EntraApplicationOwner - -## Synopsis - -Adds an owner to an application. - -## Syntax - -```powershell -Add-EntraApplicationOwner - -ApplicationId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraApplicationOwner` cmdlet adds an owner to a Microsoft Entra ID application. - -## Examples - -### Example 1: Add a user as an owner to an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$ApplicationId = (Get-EntraApplication -Top 1).ObjectId -$UserObjectId = (Get-EntraUser -UserId 'SawyerM@contoso.com').ObjectId -Add-EntraApplicationOwner -ApplicationId $ApplicationId -RefObjectId $UserObjectId -``` - -This example demonstrates how to add an owner to an application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the ID of an application. -- `-RefObjectId` parameter specifies the ID of a user. - -## Parameters - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) - -[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md deleted file mode 100644 index 9cb637423c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -title: Add-EntraServicePrincipalDelegatedPermissionClassification -description: This article provides details on the Add-EntraServicePrincipalDelegatedPermissionClassification command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification - -schema: 2.0.0 ---- - -# Add-EntraServicePrincipalDelegatedPermissionClassification - -## Synopsis - -Add a classification for a delegated permission. - -## Syntax - -```powershell -Add-EntraServicePrincipalDelegatedPermissionClassification - -ServicePrincipalId - -PermissionId - -Classification - -PermissionName - [] -``` - -## Description - -The `Add-EntraServicePrincipalDelegatedPermissionClassification` cmdlet creates a delegated permission classification for the given permission on service principal. - -## Examples - -### Example 1: Create Delegated Permission Classification - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$PermissionId = $ServicePrincipal.PublishedPermissionScopes[0].Id -$PermissionName = $ServicePrincipal.PublishedPermissionScopes[0].Value - -$params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - PermissionId = $PermissionId - Classification = 'Low' - PermissionName = $PermissionName -} - -Add-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -```Output -Id Classification PermissionId PermissionName --- -------------- ------------ -------------- -T2qU_E28O0GgkLLIYRPsTwE low fc946a4f-bc4d-413b-a090-b2c86113ec4f LicenseManager.AccessAsUser -``` - -This command creates a delegated permission classification for the given permission on the service principal. You can use the command `Get-EntraServicePrincipal` to get service principal ID. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. -- `-PermissionId` parameter specifies the ID for a delegated permission. -- `-Classification` parameter specifies the classification for a delegated permission. -- `-PermissionName` parameter specifies the name for a delegated permission. - -## Parameters - -### -ServicePrincipalId - -The unique identifier of a service principal object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PermissionId - -The ID for a delegated permission. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PermissionName - -The name for a delegated permission. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Classification - -The classification for a delegated permission. -This parameter can take one of the following values: - -- Low: Specifies a classification for a permission as low impact. - -- Medium: Specifies a classification for a permission as medium impact. - -- High: Specifies a classification for a permission as high impact. - -```yaml -Type: ClassificationEnum -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.DelegatedPermissionClassification - -## Notes - -## Related Links - -[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) - -[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md deleted file mode 100644 index e526f2d41a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Add-EntraServicePrincipalOwner -description: This article provides details on the Add-EntraServicePrincipalOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner - -schema: 2.0.0 ---- - -# Add-EntraServicePrincipalOwner - -## Synopsis - -Adds an owner to a service principal. - -## Syntax - -```powershell -Add-EntraServicePrincipalOwner - -ServicePrincipalId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraServicePrincipalOwner` cmdlet adds an owner to a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Add a user as an owner to a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId -$OwnerId = (Get-EntraUser -Top 1).ObjectId -$Params = @{ - ServicePrincipalId = $ServicePrincipalId - RefObjectId = $OwnerId -} -Add-EntraServicePrincipalOwner @Params -``` - -This example demonstrates how to add an owner to a service principal. - -- `-ServicePrincipalId` parameter specifies the service principal ID. -- `-RefObjectId` parameter specifies the user object ID. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) - -[Get-EntraUser](Get-EntraUser.md) - -[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md deleted file mode 100644 index d8cdda2c35..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md +++ /dev/null @@ -1,276 +0,0 @@ ---- -title: Get-EntraApplication -description: This article provides details on the Get-EntraApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplication - -schema: 2.0.0 ---- - -# Get-EntraApplication - -## Synopsis - -Gets an application. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraApplication - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraApplication - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraApplication - -ApplicationId - [-Property ] - [-All] - [] -``` - -## Description - -The `Get-EntraApplication` cmdlet gets a Microsoft Entra ID application. - -## Examples - -### Example 1: Get an application by ApplicationId - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -ApplicationId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -ToGraph_443democc3c aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -``` - -This example demonstrates how to retrieve specific application by providing ID. - -### Example 2: Get all applications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -All -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -test app aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADandPersonalMicrosoftAccount contoso.com -ToGraph_443DEM cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -test adms eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADandPersonalMicrosoftAccount contoso.com -test adms app azure gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADandPersonalMicrosoftAccount contoso.com -test adms2 iiiiiiii-aaaa-bbbb-cccc-jjjjjjjjjjjj jjjjjjjj-bbbb-cccc-dddd-kkkkkkkkkkkk AzureADandPersonalMicrosoftAccount contoso.com -``` - -This example demonstrates how to get all applications from Microsoft Entra ID. - -### Example 3: Get applications with expiring secrets - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication | - Where-Object { - $_.PasswordCredentials.keyId -ne $null -and - $_.PasswordCredentials.EndDateTime -lt (Get-Date).AddDays(30) - } | - ForEach-Object { - $_.DisplayName, - $_.Id, - $_.PasswordCredentials - } -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - AppOne 8/19/2024 9:00:00 PM 1jQ aaaaaaaa-0b0b-1c1c-2d2d-333333333333 8/6/2024 6:07:47 PM -``` - -This example retrieves applications with expiring secrets within 30 days. - -### Example 4: Get an application by display name - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -Filter "DisplayName eq 'ToGraph_443DEMO'" -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -ToGraph_443DEMO cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -``` - -In this example, we retrieve application by its display name from Microsoft Entra ID. - -### Example 5: Search among retrieved applications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -SearchString 'My new application 2' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -My new application 2 kkkkkkkk-cccc-dddd-eeee-llllllllllll llllllll-dddd-eeee-ffff-mmmmmmmmmmmm AzureADandPersonalMicrosoftAccount contoso.com -``` - -This example demonstrates how to retrieve applications for specific string from Microsoft Entra ID. - -### Example 6: Retrieve an application by identifierUris - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -Filter "identifierUris/any(uri:uri eq 'https://wingtips.wingtiptoysonline.com')" -``` - -This example demonstrates how to retrieve applications by its identifierUris from Microsoft Entra ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplication](New-EntraApplication.md) - -[Remove-EntraApplication](Remove-EntraApplication.md) - -[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md deleted file mode 100644 index bce69cd889..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Get-EntraApplicationExtensionProperty -description: This article provides details on the Get-EntraApplicationExtensionProperty command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty - -schema: 2.0.0 ---- - -# Get-EntraApplicationExtensionProperty - -## Synopsis - -Gets application extension properties. - -## Syntax - -```powershell -Get-EntraApplicationExtensionProperty - -ApplicationId - [-Property ] - [] -``` - -## Description - -The `Get-EntraApplicationExtensionProperty` cmdlet gets application extension properties in Microsoft Entra ID. - -## Examples - -### Example 1: Get extension properties - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$Application = Get-EntraApplication -SearchString '' -Get-EntraApplicationExtensionProperty -ApplicationId $Application.Id -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ------------- ---------------------- ---- ------------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Boolean False False extension_c371a443f6734a3e8982a26357fb7d59_NewAttribute {User} -``` - -This command gets the extension properties for the specified application in Microsoft Entra ID. You cane use the command `Get-EntraApplication` to get application ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. - -## Parameters - -### -ApplicationId - -Specifies the unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) - -[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md deleted file mode 100644 index b0b5a7e66b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Get-EntraApplicationKeyCredential -description: This article provides details on the Get-EntraApplicationKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential - -schema: 2.0.0 ---- - -# Get-EntraApplicationKeyCredential - -## Synopsis - -Gets the key credentials for an application. - -## Syntax - -```powershell -Get-EntraApplicationKeyCredential - -ObjectId - [] -``` - -## Description - -The `Get-EntraApplicationKeyCredential` cmdlet retrieves the key credentials for an application. Specify `ObjectId` parameter to retrieve the key credentials for an application. - -## Examples - -### Example 1: Get key credentials - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationKeyCredential -ObjectId $application.ObjectId -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage -------------------- ----------- ----------- --- ----- ------------- ---- ----- -{116, 101, 115, 116…} MyApp Cert 6/27/2024 11:49:17 AM bbbbbbbb-1c1c-2d2d-3e3e-444444444444 6/27/2023 11:29:17 AM AsymmetricX509Cert Verify -``` - -This command gets the key credentials for the specified application. - -`-ObjectId` parameter specifies the ID of an application object in Microsoft Entra ID. - -## Parameters - -### -ObjectId - -Specifies a unique ID of an application in Microsoft Entra ID to retrieve key credentials. Use `Get-EntraApplication` for more details. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) - -[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md deleted file mode 100644 index 166508d887..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: Get-EntraApplicationLogo -description: This article provides details on the Get-EntraApplicationLogo command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationLogo - -schema: 2.0.0 ---- - -# Get-EntraApplicationLogo - -## Synopsis - -Retrieve the logo of an application. - -## Syntax - -```powershell -Get-EntraApplicationLogo - -ApplicationId - [-FileName ] - [-View ] - [-FilePath ] - [] -``` - -## Description - -The `Get-EntraApplicationLogo` cmdlet retrieves the logo that is set for an application. Specify the `ApplicationId` parameter to get a specific application logo for an application. - -## Examples - -### Example 1: Get an application logo for an application by ID - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplicationLogo -ApplicationId 'bbbbbbbb-1111-1111-1111-cccccccccccc' -FilePath 'D:\outfile1.jpg' -``` - -This example shows how to retrieve the application logo for an application that is specified through the Object ID parameter. - -## Parameters - -### -FileName - -If provided, the application logo is saved to the file using the specified file name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -FilePath - -If provided, the application logo is copied with a random filename to the file path that is specified in this parameter. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -The ApplicationId of the application for which the logo is to be retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -View - -If set to $true, the application's logo is displayed in a new window on the screen. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -### System.Boolean - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Set-EntraApplicationLogo](Set-EntraApplicationLogo.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md deleted file mode 100644 index 80b78d9283..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: Get-EntraApplicationOwner -description: This article provides details on the Get-EntraApplicationOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationOwner - -schema: 2.0.0 ---- - -# Get-EntraApplicationOwner - -## Synopsis - -Gets the owner of an application. - -## Syntax - -```powershell -Get-EntraApplicationOwner - -ApplicationId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraApplicationOwner` cmdlet get an owner of an Microsoft Entra ID application. - -## Examples - -### Example 1: Get the owner of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -``` - -This example demonstrates how to get the owners of an application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. - -### Example 2: Get the details about the owner of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -SearchString '' -$applicationOwners = Get-EntraApplicationOwner -ObjectId $application.ObjectId -$ownerDetails = $applicationOwners | ForEach-Object { - $ownerDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id - [PSCustomObject]@{ - displayName = $ownerDetail.displayName - Id = $ownerDetail.Id - UserPrincipalName = $ownerDetail.UserPrincipalName - UserType = $ownerDetail.UserType - accountEnabled = $ownerDetail.accountEnabled - } -} -$ownerDetails | Format-Table -Property displayName, Id, UserPrincipalName, UserType, accountEnabled -AutoSize -``` - -```Output -displayName Id UserPrincipalName UserType accountEnabled ------------ -- ----------------- -------- -------------- -Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc SawyerM@contoso.com Member True -Adele Vance ec5813fb-346e-4a33-a014-b55ffee3662b AdeleV@contoso.com Member True -``` - -This example demonstrates how to get the owners of an application in Microsoft Entra ID with more owner lookup details. - -### Example 3: Get all owners of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -``` - -This example demonstrates how to get the all owners of a specified application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. - -### Example 4: Get top two owners of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example demonstrates how to get the two owners of a specified application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) - -[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md deleted file mode 100644 index f82b444191..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Get-EntraApplicationPasswordCredential -description: This article provides details on the Get-EntraApplicationPasswordCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential - -schema: 2.0.0 ---- - -# Get-EntraApplicationPasswordCredential - -## Synopsis - -Gets the password credential for an application. - -## Syntax - -```powershell -Get-EntraApplicationPasswordCredential - -ApplicationId - [-Property ] - [] -``` - -## Description - -The `Get-EntraApplicationPasswordCredential` cmdlet receives the password credentials for a Microsoft Entra ID application. Specify `ApplicationId` parameter to cmdlet receives the password credentials. - -## Examples - -### Example 1: Get password credential for specified application - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationPasswordCredential -ApplicationId $application.ObjectId -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- -{100, 101, 109, 111} demo 26/07/2025 10:34:40 Ap6 bbbbbbbb-1111-2222-3333-cccccccccccc 26/07/2024 10:34:40 -``` - -This example shows how to retrieve the password credential for specified application. - -- `-ApplicationId` specifies the ID of an application object in Microsoft Entra ID. - -## Parameters - -### -ApplicationId - -The ApplicationId of the application for which to get the password credential. Use `Get-EntraApplication` for more details. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md deleted file mode 100644 index 69df671ca9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: Get-EntraApplicationServiceEndpoint -description: This article provides details on the Get-EntraApplicationServiceEndpoint command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint - -schema: 2.0.0 ---- - -# Get-EntraApplicationServiceEndpoint - -## Synopsis - -Retrieve the service endpoint of an application. - -## Syntax - -```powershell -Get-EntraApplicationServiceEndpoint - -ApplicationId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraApplicationServiceEndpoint` cmdlet retrieves the service endpoint(s) of an application. - -The service endpoint entity contains service discovery information. The serviceEndpoints property of the Application entity is of type ServiceEndpoint. - -Other services can use the information stored in the ServiceEndpoint entity to find this service and its addressable endpoints. - -## Examples - -### Example 1: Retrieve the application service endpoint by ID - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -``` - -This example demonstrates how to retrieve service endpoint of the application that is specified through the Object ID parameter. - -`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. - -### Example 2: Get all service endpoints - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -All -``` - -This example demonstrates how to retrieve all service endpoints of a specified application. - -`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. - -### Example 3: Get top five service endpoints - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -Top 5 -``` - -This example demonstrates how to retrieve five service endpoints of a specified application. - -`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. - -## Parameters - -### -All - -Return all service endpoints. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the object ID of the application for which the service endpoint is retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of results that are returned. -The default is 100. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md deleted file mode 100644 index 3ef510d43f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: Get-EntraApplicationTemplate -description: This article provides details on the Get-EntraApplicationTemplate command. - - -ms.topic: reference -ms.date: 07/17/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationTemplate -schema: 2.0.0 ---- - -# Get-EntraApplicationTemplate - -## Synopsis - -Retrieve a list of applicationTemplate objects. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraApplicationTemplate - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraApplicationTemplate - -Id - [] -``` - -## Description - -The `Get-EntraApplicationTemplate` cmdlet allows users to get a list of all the application templates or a specific application template. - -## Examples - -### Example 1. Gets a list of application template objects - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplicationTemplate -``` - -This command gets all the application template objects - -### Example 2. Gets an application template object - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplicationTemplate -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -Id Categories Description --- ---------- ----------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {businessMgmt, productivity, projectManagement} Cube is perfect for businesses -``` - -This command gets an application template object for the given id. - -- `-Id` Specifies the unique identifier of an application template. - -## Parameters - -### -Id - -The unique identifier of an application template. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.ApplicationTemplate - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md deleted file mode 100644 index 74cdce0fb3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -title: Get-EntraDeletedApplication -description: This article provides details on the Get-EntraDeletedApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedApplication - -schema: 2.0.0 ---- - -# Get-EntraDeletedApplication - -## Synopsis - -Retrieves the list of previously deleted applications. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDeletedApplication - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraDeletedApplication - [-SearchString ] - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDeletedApplication` cmdlet Retrieves the list of previously deleted applications. - -Note: Deleted security groups are permanently removed and cannot be retrieved. - -## Examples - -### Example 1: Get list of deleted applications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com -TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com -``` - -This cmdlet retrieves the list of deleted applications. - -### Example 2: Get list of deleted applications using All parameter - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -All -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com -TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com -``` - -This cmdlet retrieves the list of deleted applications using All parameter. - -### Example 3: Get top two deleted applications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -Top 2 -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -``` - -This cmdlet retrieves top two deleted applications. - -### Example 4: Get deleted applications using SearchString parameter - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -SearchString 'TestApp1' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -``` - -This cmdlet retrieves deleted applications using SearchString parameter. - -### Example 5: Get deleted applications filter by display name - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -Filter "DisplayName eq 'TestApp1'" -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -``` - -This cmdlet retrieves deleted applications having specified display name. - -### Example 6: Get deleted applications with deletion age in days - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication | - Select-Object DisplayName, Id, AppId, SignInAudience, PublisherDomain, DeletedDateTime, - @{Name='DeletionAgeInDays'; Expression={(Get-Date) - $_.DeletedDateTime | Select-Object -ExpandProperty Days}} | - Format-Table -AutoSize -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain DeletedDateTime DeletionAgeInDays ------------ -- ----- -------------- --------------- --------------- ----------------- -Entra PowerShell App aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com 9/18/2024 7:41:44 AM 1 -``` - -This cmdlet retrieves deleted applications with deletion age in days. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Retrieve only those deleted applications that satisfy the filter. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Retrieve only those applications that satisfy the -SearchString value. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -The maximum number of applications returned by this cmdlet. -The default value is 100. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md deleted file mode 100644 index 3f6ed52f43..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md +++ /dev/null @@ -1,369 +0,0 @@ ---- -title: Get-EntraServicePrincipal -description: This article provides details on the Get-EntraServicePrincipal command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipal - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipal - -## Synopsis - -Gets a service principal. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraServicePrincipal - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetVague - -```powershell -Get-EntraServicePrincipal - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraServicePrincipal - -ServicePrincipalId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipal` cmdlet gets a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve all service principal from the directory - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -``` - -```Output -ObjectId AppId DisplayName --------- ----- ----------- -bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 Demo App -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22223333-cccc-4444-dddd-5555eeee6666 Demo Two App -dddddddd-3333-4444-5555-eeeeeeeeeeee 33334444-dddd-5555-eeee-6666ffff7777 ProjectWorkManagement -``` - -This example retrieves all service principals from the directory. - -### Example 2: Retrieve a service principal by ServicePrincipalId - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -ServicePrincipalId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -``` - -This command retrieves specific service principal. - -- `-ServicePrincipalId` Parameter specifies the ID of a service principal. - -### Example 3: Retrieve all service principals from the directory - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -All -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application -ProvisioningPowerBi cccccccc-2222-3333-4444-dddddddddddd 22223333-cccc-4444-dddd-5555eeee6666 Application -``` - -This example retrieves all service principals from the directory. - -### Example 4: Retrieve top two service principal from the directory - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Top 2 -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application -``` - -This command retrieves top two service principals from the directory. - -### Example 5: Get a service principal by display name - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "DisplayName eq 'M365 License Manager'" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -``` - -This example gets a service principal by its display name. - -### Example 6: Retrieve a list of all service principal, which has a display name that contains "M365 License Manager" - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -SearchString 'M365 License Manager' -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -``` - -This example gets a list of service principal, which has the specified display name. - -### Example 7: Retrieve all Enterprise apps - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryIntegratedApp')" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Enterprise App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -Enterprise App2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application -``` - -This example demonstrates how to retrieve all enterprise apps. - -### Example 8: Retrieve all App proxy apps - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryOnPremApp')" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -App proxy 1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -App proxy 2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application -``` - -This example demonstrates how to retrieve all app proxy apps. - -### Example 9: Retrieve all disabled apps - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "accountEnabled eq false" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Disabled App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -``` - -This example demonstrates how to retrieve all disabled apps. - -### Example 10: Retrieve all Global Secure Access apps - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'PrivateAccessNonWebApplication') or tags/Any(x: x eq 'NetworkAccessManagedApplication')" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Global secure access app 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -``` - -This example demonstrates how to retrieve all Global secure access apps. - -### Example 11: List all applications without user assignment - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -All | Where-Object {$_.appRoleAssignmentRequired -ne 'true'} -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -App without user assignment 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -``` - -This example demonstrates how to retrieve all applications without user assignment. - -### Example 12: List all SAML application details - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "PreferredSingleSignOnMode eq 'saml'" -$servicePrincipal | Select-Object Id, DisplayName, AccountEnabled, AppId, PreferredSingleSignOnMode, AppRoleAssignmentRequired, SignInAudience, NotificationEmailAddresses, PreferredTokenSigningKeyEndDateTime, PreferredTokenSigningKeyValid, ReplyUrls,LoginUrl, LogoutUrl | Format-Table -AutoSize -``` - -```Output -Id DisplayName AccountEnabled AppId PreferredSingleSignOnMode AppRoleAssignmentRequired SignInAudience NotificationEmailAddresses --- ----------- -------------- ----- ------------------------- ------------------------- -------------- -------------- -00001111-aaaa-2222-bbbb-3333cccc4444 SAML App True 33334444-dddd-5555-eeee-6666ffff7777 saml True AzureADMyOrg {admin@Contoso} -``` - -This example demonstrates how to retrieve all SAML application details. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) - -[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md deleted file mode 100644 index 891274acdb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: Get-EntraServicePrincipalAppRoleAssignedTo -description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignedTo command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalAppRoleAssignedTo - -## Synopsis - -Gets app role assignments for this app or service, granted to users, groups and other service principals. - -## Syntax - -```powershell -Get-EntraServicePrincipalAppRoleAssignedTo - -ServicePrincipalId - [-All ] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalAppRoleAssignedTo` cmdlet gets app role assignments for this app or service, granted to users, groups and other service principals. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. - -- Directory Synchronization Accounts -- Directory Writer -- Hybrid Identity Administrator -- Identity Governance Administrator -- Privileged Role Administrator -- User Administrator -- Application Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Retrieve the app role assignments - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId - Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipalId -``` - -This example shows how to get app role assignments for an app or service, granted to users, groups and other service principals. - -- The first command gets the ID of a service principal and stores it in the $ServicePrincipalId variable. - -- The second command gets the app role assignments for the service principal granted to users, groups and other service principals. - -### Example 2: Get all app role assignments - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -All -``` - -```output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 -``` - -This command gets the all app role assignments for the service principal granted to users, groups and other service principals. - -### Example 3: Get five app role assignments - -```powershell - Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -Top 5 -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 -``` - -This command gets the five app role assignments for the service principal granted to users, groups and other service principals. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -`Get-EntraServiceAppRoleAssignedTo` is an alias for `Get-EntraServicePrincipalAppRoleAssignedTo`. - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md deleted file mode 100644 index 971849856a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md +++ /dev/null @@ -1,192 +0,0 @@ ---- -title: Get-EntraServicePrincipalAppRoleAssignment -description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalAppRoleAssignment - -## Synopsis - -Gets a service principal application role assignment. - -## Syntax - -```powershell -Get-EntraServicePrincipalAppRoleAssignment - -ServicePrincipalId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalAppRoleAssignment` cmdlet gets a role assignment for a service principal application in Microsoft Entra ID. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. -- Directory Synchronization Accounts -- Directory Writer -- Hybrid Identity Administrator -- Identity Governance Administrator -- Privileged Role Administrator -- User Administrator -- Application Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Retrieve the application role assignments for a service principal - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId - Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipalId -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 29-02-2024 05:53:00 Ask HR aaaaaaaa-bbbb-cccc-1111-222222222222 Group M365 License Manager -``` - -This command gets application role assignments for specified service principal. - -- The first command gets the ID of a service principal by using the Get-EntraServicePrincipal (./Get-EntraServicePrincipal.md) cmdlet. The command stores the ID in the $ServicePrincipalId variable. - -- The second command gets the application role assignments for the service principal in identified by $ServicePrincipalId. - -### Example 2: Retrieve all application role assignments for a service principal - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 -``` - -This command gets all application role assignments for specified service principal. - -### Example 3: Retrieve the top five application role assignments for a service principal - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 3 -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 -``` - -This command gets three application role assignments for specified service principal. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`Get-EntraServiceAppRoleAssignment` is an alias for `Get-EntraServicePrincipalAppRoleAssignment`. - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) - -[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md deleted file mode 100644 index 8a607194b9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: Get-EntraServicePrincipalCreatedObject -description: This article provides details on the Get-EntraServicePrincipalCreatedObject command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalCreatedObject - -## Synopsis - -Get objects created by a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalCreatedObject - -ServicePrincipalId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalCreatedObject` cmdlet gets an object created by a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the objects that created by a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -This example gets objects created by the service principal identified by $ServicePrincipalId. You can use the command `Get-EntraServicePrincipal` to get service principal ID. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -### Example 2: Retrieve the all objects created by a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All -``` - -This example demonstrates how to get the all object created by a specified service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -### Example 3: Retrieve the top two objects created by a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 -``` - -This example demonstrates how to get the top two object created by a specified service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md deleted file mode 100644 index a236c7769c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -title: Get-EntraServicePrincipalDelegatedPermissionClassification -description: This article provides details on the Get-EntraServicePrincipalDelegatedPermissionClassification command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalDelegatedPermissionClassification - -## Synopsis - -Retrieve the delegated permission classification objects on a service principal. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraServicePrincipalDelegatedPermissionClassification - -ServicePrincipalId - [-Filter ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraServicePrincipalDelegatedPermissionClassification - -ServicePrincipalId - -Id - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalDelegatedPermissionClassification` cmdlet retrieves the delegated permission classifications from a service principal. - -## Examples - -### Example 1: Get a list of delegated permission classifications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId -} -Get-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -```Output -Id Classification PermissionId PermissionName --- -------------- ------------ -------------- -bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All -cccccccc-8888-9999-0000-dddddddddddd low dddd3333-ee44-5555-66ff-777777aaaaaa profile -``` - -This command retrieves all delegated permission classifications from the service principal. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. - -### Example 2: Get a delegated permission classifications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - Id = '5XBeIKarUkypdm0tRsSAQwE' -} -Get-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -```Output -Id Classification PermissionId PermissionName --- -------------- ------------ -------------- -bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All -``` - -This command retrieves the delegated permission classification by Id from the service principal. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. -- `-Id` parameter specifies the delegated permission classification object Id. - -### Example 3: Get a delegated permission classification with filter - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - Filter = "PermissionName eq 'Sites.Read.All'" -} -Get-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -```Output -Id Classification PermissionId PermissionName --- -------------- ------------ -------------- -bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All -``` - -This command retrieves the filtered delegated permission classifications from the service principal. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. -- `-Id` parameter specifies the delegated permission classification object Id. - -## Parameters - -### -ServicePrincipalId - -The unique identifier of a service principal object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a delegated permission classification object ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.DelegatedPermissionClassification - -## Notes - -## Related Links - -[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) - -[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md deleted file mode 100644 index 3dcf28a491..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Get-EntraServicePrincipalKeyCredential -description: This article provides details on the Get-EntraServicePrincipalKeyCredential Command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalKeyCredential - -## Synopsis - -Get key credentials for a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalKeyCredential - -ServicePrincipalId - [] -``` - -## Description - -The `Get-EntraServicePrincipalKeyCredential` cmdlet gets the key credentials for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the key credential of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage -------------------- ----------- ----------- --- ----- ------------- ---- ----- - 08-02-2025 09:57:08 68b45e27-fef8-4f0d-bc7a-76bd949c16d1 08-02-2024 09:57:08 Symmetric Sign -``` - -This example retrieves the key credentials for specified service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal object Id. - -- `-ServicePrincipalId` parameter specifies the service principal Id. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of the application for which to get the password credential. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) - -[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md deleted file mode 100644 index 4fcb1f99c2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -title: Get-EntraServicePrincipalMembership -description: This article provides details on the Get-EntraServicePrincipalMembership command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalMembership - -## Synopsis - -Get a service principal membership. - -## Syntax - -```powershell -Get-EntraServicePrincipalMembership - -ServicePrincipalId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalMembership` cmdlet gets the memberships of a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the memberships of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -11112222-aaaa-3333-bbbb-4444cccc5555 -``` - -This cmdlet retrieves a specified service principal memberships in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal ID. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -### Example 2: Retrieve all memberships of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -11112222-aaaa-3333-bbbb-4444cccc5555 -22223333-cccc-4444-dddd-5555eeee6666 -33334444-dddd-5555-eeee-6666ffff7777 -``` - -This command gets all memberships of a specified service principal. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -### Example 3: Retrieve top two memberships of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -11112222-aaaa-3333-bbbb-4444cccc5555 -22223333-cccc-4444-dddd-5555eeee6666 - -``` - -This command gets top two memberships of a specified service principal. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md deleted file mode 100644 index aaa8e79db5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: Get-EntraServicePrincipalOAuth2PermissionGrant -description: This article provides details on the Get-EntraServicePrincipalOAuth2PermissionGrant command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalOAuth2PermissionGrant - -## Synopsis - -Gets an oAuth2PermissionGrant object. - -## Syntax - -```powershell -Get-EntraServicePrincipalOAuth2PermissionGrant --ServicePrincipalId -[-All] -[-Top ] -[-Property ] -[] -``` - -## Description - -The `Get-EntraServicePrincipalOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the OAuth2 permission grants of a service principal - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId -Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId $ServicePrincipalId -``` - -```output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... -``` - -This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. - -### Example 2: Get all OAuth2 permission grants of a service principal - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All -``` - -```Output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals A1bC2dE3f... openid profile U... -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 996d39aa-fdac-4d97-aa3d-c81fb47362ac aaaaaaaa-bbbb-cccc-1111-222222222222 PrivilegedAccess... -``` - -This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. - -### Example 3: Get two OAuth2 permission grants of a service principal - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 2 -``` - -```Output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... -``` - -This example demonstrates how to get top two oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md deleted file mode 100644 index 890f1d9a67..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: Get-EntraServicePrincipalOwnedObject -description: This article provides details on the Get-EntraServicePrincipalOwnedObject Command. - - -ms.topic: reference -ms.date: 07/22/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalOwnedObject - -## Synopsis - -Gets an object owned by a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalOwnedObject - [-All] - -ServicePrincipalId - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalOwnedObject` cmdlet retrieves an object owned by a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the owned objects of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -The command retrieves the owned objects of a service principal. - -- `-ServicePrincipalId` Parameter specifies the ID of a service principal. - -### Example 2: Retrieve the all owned objects of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipalId = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").ObjectId -Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipalId -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example retrieves an object owned by a service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal Id. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. - -### Example 2: Retrieve all owned objects of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -The command receives the all owned objects of a service principal. - -- `-ServicePrincipalId` Parameter specifies the ID of a service principal. - -### Example 3: Retrieve top one owned object of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 1 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example retrieves the top one owned object of a specified service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md deleted file mode 100644 index 2270323cb2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md +++ /dev/null @@ -1,217 +0,0 @@ ---- -title: Get-EntraServicePrincipalOwner -description: This article provides details on the Get-EntraServicePrincipalOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalOwner - -## Synopsis - -Get the owner of a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalOwner - -ServicePrincipalId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalOwner` cmdlet gets the owners of a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the owner of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example gets the owners of a specified service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. - -### Example 2: Retrieve all the owners of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This command gets all the owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. - -### Example 3: Retrieve top two owners of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This command gets top two owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. - -### Example 4: Retrieve service principal owner details - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -# Get the owners of the service principal -$owners = Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All -$result = @() - -# Loop through each owner and get their UserPrincipalName and DisplayName -foreach ($owner in $owners) { - $userId = $owner.Id - $user = Get-EntraUser -UserId $userId - $userDetails = [PSCustomObject]@{ - Id = $owner.Id - UserPrincipalName = $user.UserPrincipalName - DisplayName = $user.DisplayName - } - $result += $userDetails -} - -# Output the result in a table format -$result | Format-Table -AutoSize -``` - -```Output -Id UserPrincipalName DisplayName --- ----------------- ----------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AlexW@contoso.com Alex Wilber -bbbbbbbb-1111-2222-3333-cccccccccccc AdeleV@contoso.com Adele Vance -``` - -This example shows how to retrieve more details of a service principal owner such as displayName, userPrincipalName. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md deleted file mode 100644 index 32f7613b31..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Get-EntraServicePrincipalPasswordCredential -description: This article provides details on the Get-EntraServicePrincipalPasswordCredential Command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalPasswordCredential - -## Synopsis - -Get credentials for a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalPasswordCredential - -ServicePrincipalId - [] -``` - -## Description - -The `Get-EntraServicePrincipalPasswordCredential` cmdlet gets the password credentials for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the password credential of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - 17-04-2025 07:32:41 gjW bdf6a3df-cc9b-4612-b948-e32804ee88f7 17-04-2024 07:32:41 - 21-03-2025 08:12:08 4fl 7f4414ec-8f72-49a8-b949-70d635899656 21-03-2024 08:12:08 - 12-12-2024 08:39:07 mjl 0fff6b21-0a20-4f7c-93ba-26ed9b648344 12-12-2023 08:39:10 -``` - -This example retrieves the password credentials for specified service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the object ID of a service principal. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of the service principal for which to get password credentials. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) - -[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md deleted file mode 100644 index f8b75c0061..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md +++ /dev/null @@ -1,490 +0,0 @@ ---- -title: New-EntraApplication -description: This article provides details on the New-EntraApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplication - -schema: 2.0.0 ---- - -# New-EntraApplication - -## Synopsis - -Creates (registers) a new application object. - -## Syntax - -```powershell -New-EntraApplication - -DisplayName - [-AddIns ] - [-PasswordCredentials ] - [-TokenEncryptionKeyId ] - [-SignInAudience ] - [-KeyCredentials ] - [-ParentalControlSettings ] - [-IdentifierUris ] - [-AppRoles ] - [-PublicClient ] - [-InformationalUrl ] - [-Tags ] - [-Api ] - [-OptionalClaims ] - [-GroupMembershipClaims ] - [-Web ] - [-IsFallbackPublicClient ] - [-IsDeviceOnlyAuthSupported ] - [-RequiredResourceAccess ] - [] -``` - -## Description - -Creates (registers) a new application object. Specify the `DisplayName` parameter to create a new application. - -## Examples - -### Example 1: Create an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -New-EntraApplication -DisplayName 'My new application' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com -``` - -This command creates an application in Microsoft Entra ID. - -### Example 2: Create an application using IdentifierUris parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -New-EntraApplication -DisplayName 'My new application' -IdentifierUris 'https://mynewapp.contoso.com' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com -``` - -This command creates an application in Microsoft Entra ID. - -### Example 3: Create an application using AddIns parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$addin = New-Object Microsoft.Open.MSGraph.Model.AddIn -$addin.Type = 'testtype' -$addinproperties = New-Object System.collections.Generic.List[Microsoft.Open.MSGraph.Model.KeyValue] -$addinproperties.Add([Microsoft.Open.MSGraph.Model.KeyValue]@{ Key = "key"; Value = "value" }) -$addin.Properties = $addinproperties -New-EntraApplication -DisplayName 'My new application' -AddIns $addin -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com -``` - -This command creates an application in Microsoft Entra ID. - -## Parameters - -### -AddIns - -Defines custom behavior that a consuming service can use to call an app in specific contexts. - -For example, applications that can render file streams may set the addIns property for its "FileHandler" functionality. - -This will let services like Office 365 call the application in the context of a document the user is working on. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Api - -Specifies settings for an application that implements a web API. - -```yaml -Type: ApiApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppRoles - -The collection of application roles that an application might declare. -These roles can be assigned to users, groups, or service principals. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupMembershipClaims - -Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentifierUris - -User-defined URI(s) that uniquely identify a Web application within its Microsoft Entra ID tenant, or within a verified custom domain (see "Domains" tab in the Azure classic portal) if the application is multi-tenant. - -The first element is populated from the Web application's "APP ID URI" field if updated via the Azure classic portal (or respective Microsoft Entra ID PowerShell cmdlet parameter). - -Extra URIs can be added via the application manifest; see Understanding the Microsoft Entra ID Application Manifest for details. - -This collection is also used to populate the Web application's servicePrincipalNames collection. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InformationalUrl - -Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. - -The terms of service and privacy statement are surfaced to users through the user consent experience. - -```yaml -Type: InformationalUrl -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsDeviceOnlyAuthSupported - -Specifies if the application supports authentication using a device token. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsFallbackPublicClient - -Specifies the fallback application type as public client, such as an installed application running on a mobile device. - -The default value is false that means the fallback application type is confidential client such as web app. - -There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). - -In those cases Microsoft Entra ID interprets the application type based on the value of this property. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -KeyCredentials - -The collection of key credentials associated with the application. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OptionalClaims - -Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. - -```yaml -Type: OptionalClaims -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ParentalControlSettings - -Specifies parental control settings for an application. - -```yaml -Type: ParentalControlSettings -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordCredentials - -The collection of password credentials associated with the application. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublicClient - -Specifies whether this application is a public client (such as an installed application running on a mobile device). -Default is false. - -```yaml -Type: PublicClientApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredResourceAccess - -Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. - -This pre-configuration of required resource access drives the consent experience. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignInAudience - -Specifies what Microsoft accounts are supported for the current application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Custom strings that can be used to categorize and identify the application. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TokenEncryptionKeyId - -Specifies the keyId of a public key from the keyCredentials collection. - -When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. - -The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Web - -Specifies settings for a web application. - -```yaml -Type: WebApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### Boolean - -### Microsoft.Open.MSGraph.Model.ApiApplication - -### Microsoft.Open.MSGraph.Model.InformationalUrl - -### Microsoft.Open.MSGraph.Model.OptionalClaims - -### Microsoft.Open.MSGraph.Model.ParentalControlSettings - -### Microsoft.Open.MSGraph.Model.PublicClientApplication - -### Microsoft.Open.MSGraph.Model.WebApplication - -### String - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.Add-in] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] - -### System.Collections.Generic.List`1[System.String] - -### System. Nullable`1[System.Boolean] - -## Outputs - -### Microsoft.Open.MSGraph.Model.MsApplication - -## Notes - -- See more details - - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[Remove-EntraApplication](Remove-EntraApplication.md) - -[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md deleted file mode 100644 index 3635b5b70b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: New-EntraApplicationExtensionProperty -description: This article provides details on the New-EntraApplicationExtensionProperty command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty - -schema: 2.0.0 ---- - -# New-EntraApplicationExtensionProperty - -## Synopsis - -Creates an application extension property. - -## Syntax - -```powershell -New-EntraApplicationExtensionProperty - -ApplicationId - -Name - [-DataType ] - [-TargetObjects ] - [] -``` - -## Description - -The `New-EntraApplicationExtensionProperty` cmdlet creates an application extension property for an object in Microsoft Entra ID. - -## Examples - -### Example 1: Create an extension property - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -$params = @{ - ApplicationId = $Application.ObjectId - Name = 'NewAttribute' -} - -New-EntraApplicationExtensionProperty @params -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ---------------------- ---- ------------- - 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} -``` - -This command creates an application extension property of the string type for the specified object. - -- `-ApplicationId` parameter specifies the unique identifier of an application. -- `-Name` parameter specifies the name of the extension property. - -### Example 2: Create an extension property with data type parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -$params = @{ - ApplicationId = $Application.ObjectId - Name = 'NewAttribute' - DataType = 'Boolean' -} - -New-EntraApplicationExtensionProperty @params -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ---------------------- ---- ------------- - 11112222-bbbb-3333-cccc-4444dddd5555 My new test app Boolean False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} -``` - -This command creates an application extension property of the specified data type for the specified object. - -- `-ApplicationId` parameter specifies the unique identifier of an application. -- `-Name` parameter specifies the name of the extension property. -- `-DataType` parameter specifies the data type of the value the extension property can hold. - -### Example 3: Create an extension property with targets parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -$targets = New-Object System.Collections.Generic.List[System.String] -$targets.Add('User') -$params = @{ - ApplicationId = $Application.ObjectId - Name = 'NewAttribute' - TargetObjects = $targets -} - -New-EntraApplicationExtensionProperty @params -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ---------------------- ---- ------------- - 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {User} -``` - -The example shows how to create an application extension property with the specified target objects for the specified object. - -- `-ApplicationId` parameter specifies the unique identifier of an application. -- `-Name` parameter specifies the name of the extension property. -- `-TargetObjects` parameter specifies the Microsoft Graph resources that use the extension property. All values must be in PascalCase. - -## Parameters - -### -DataType - -Specifies the data type of the value the extension property can hold. Following values are supported. - -- Binary - 256 bytes maximum -- Boolean -- DateTime - Must be specified in ISO 8601 format. Will be stored in UTC. -- Integer - 32-bit value. -- LargeInteger - 64-bit value. -- String - 256 characters maximum - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies the name of the extension property. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies a unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -TargetObjects - -Specifies the Microsoft Graph resources that can use the extension property. All values must be in PascalCase. The following values are supported. - -- User -- Group -- AdministrativeUnit -- Application -- Device -- Organization - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) - -[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md deleted file mode 100644 index 3c8821a907..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: New-EntraApplicationFromApplicationTemplate -description: This article provides details on the New-EntraApplicationFromApplicationTemplate command. - - -ms.service: entra -ms.topic: reference -ms.date: 07/10/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate -schema: 2.0.0 ---- - -# New-EntraApplicationFromApplicationTemplate - -## Synopsis - -Add an instance of an application from the Microsoft Entra application gallery into your directory. - -## Syntax - -```powershell -New-EntraApplicationFromApplicationTemplate - -Id - -DisplayName - [] -``` - -## Description - -The `New-EntraApplicationFromApplicationTemplate` cmdlet adds an instance of an application from the Microsoft Entra application gallery into your directory. - -The application template with ID `8adf8e6e-67b2-4cf2-a259-e3dc5476c621` can be used to add a non-gallery app that you can configure different single-sign on (SSO) modes like SAML SSO and password-based SSO. - -## Examples - -### Example 1: Creates an application from application template - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - DisplayName = 'ApplicationTemplate' -} -New-EntraApplicationFromApplicationTemplate @params -``` - -```Output -@odata.context servicePrincipal --------------- ---------------- -https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.applicationServicePrincipal @{oauth2PermissionScopes=System.Object[]; servicePrincipalType=Application; displ...} -``` - -This command instantiates a new application based on application template referenced by the ID. - -- `-Id` specifies Application TemplateId. -- `-DisplayName` specifies application template display name. - -## Parameters - -### -Id - -The Id parameter specifies Application TemplateId. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DisplayName - -Application template display name. - -```yaml -Type: System.ApplicationTemplateDisplayName -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.ApplicationTemplateCopy - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md deleted file mode 100644 index 0f5ed02cf9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: New-EntraApplicationKey -description: This article provides details on the New-EntraApplicationKey command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKey - -schema: 2.0.0 ---- - -# New-EntraApplicationKey - -## Synopsis - -Adds a new key to an application. - -## Syntax - -```powershell -New-EntraApplicationKey - -ObjectId - -KeyCredential - -PasswordCredential ] - -Proof - [] -``` - -## Description - -Adds a new key to an application. - -## Examples - -### Example 1: Add a key credential to an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$app = Get-EntraApplication -Filter "DisplayName eq ''" -$params = @{ - ObjectId = $app.ObjectId - KeyCredential = @{ key=[System.Convert]::FromBase64String('{base64cert}') } - PasswordCredential = @{ DisplayName = 'mypassword' } - Proof = '{token}' -} - -New-EntraApplicationKey @params -``` - -This command adds a key credential to an specified application. - -- `-ObjectId` parameter specifies the unique identifier of an application. -- `-KeyCredential` parameter specifies the application key credential to add. -- `-PasswordCredential` parameter specifies the application password credential to add. -- `-Proof` parameter specifies the signed JWT token used as a proof of possession of the existing keys. - -## Parameters - -### -KeyCredential - -The application key credential to add. - -NOTES: keyId value should be null. - -```yaml -Type: KeyCredential -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -The unique identifier of the application object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PasswordCredential - -The application password credential to add. - -NOTES: keyId value should be null. - -```yaml -Type: PasswordCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proof - -A signed JWT token used as a proof of possession of the existing keys. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -### Microsoft.Open.MSGraph.Model.KeyCredential - -### Microsoft.Open.MSGraph.Model.PasswordCredential - -## Outputs - -### Microsoft.Open.MSGraph.Model.KeyCredential - -## Notes - -## Related Links - -[Remove-EntraApplicationKey](Remove-EntraApplicationKey.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md deleted file mode 100644 index 4d347c6251..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md +++ /dev/null @@ -1,258 +0,0 @@ ---- -title: New-EntraApplicationKeyCredential -description: This article provides details on the New-EntraApplicationKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential - -schema: 2.0.0 ---- - -# New-EntraApplicationKeyCredential - -## Synopsis - -Creates a key credential for an application. - -## Syntax - -```powershell -New-EntraApplicationKeyCredential - -ApplicationId - [-CustomKeyIdentifier ] - [-Type ] - [-Usage ] - [-Value ] - [-EndDate ] - [-StartDate ] - [] -``` - -## Description - -The `New-EntraApplicationKeyCredential` cmdlet creates a key credential for an application. - -An application can use this command along with `Remove-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. - -As part of the request validation, proof of possession of an existing key is verified before the action can be performed. - -## Examples - -### Example 1: Create a new application key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' - -$AppId = (Get-EntraApplication -Top 1).Objectid -$params = @{ - ApplicationId = $AppId - CustomKeyIdentifier = 'EntraPowerShellKey' - StartDate = '2024-03-21T14:14:14Z' - Type = 'Symmetric' - Usage = 'Sign' - Value = '' -} - -New-EntraApplicationKeyCredential @params -``` - -```Output -CustomKeyIdentifier : {84, 101, 115, 116} -EndDate : 2024-03-21T14:14:14Z -KeyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 -StartDate : 2025-03-21T14:14:14Z -Type : Symmetric -Usage : Sign -Value : {49, 50, 51} -``` - -This example shows how to create an application key credential. - -- `-ApplicationId` Specifies a unique ID of an application -- `-CustomKeyIdentifier` Specifies a custom key ID. -- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. -- `-Type` Specifies the type of the key. -- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. -- `-Value` Specifies the value for the key. - -You can use the `Get-EntraApplication` cmdlet to retrieve the application Object ID. - -### Example 2: Use a certificate to add an application key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' - -$cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 #create a new certificate object -$cer.Import('C:\Users\ContosoUser\appcert.cer') -$bin = $cer.GetRawCertData() -$base64Value = [System.Convert]::ToBase64String($bin) -$bin = $cer.GetCertHash() -$base64Thumbprint = [System.Convert]::ToBase64String($bin) -$keyid = [System.Guid]::NewGuid().ToString() - -$params = @{ - ApplicationId = '22223333-cccc-4444-dddd-5555eeee6666' - CustomKeyIdentifier = $base64Thumbprint - Type = 'AsymmetricX509Cert' - Usage = 'Verify' - Value = $base64Value - StartDate = $cer.GetEffectiveDateString() - EndDate = $cer.GetExpirationDateString() -} - -New-EntraApplicationKeyCredential @params -``` - -This example shows how to create an application key credential. - -- `-ApplicationId` Specifies a unique ID of an application -- `-CustomKeyIdentifier` Specifies a custom key ID. -- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. -- `-EndDate` Specifies the time when the key becomes invalid as a DateTime object. -- `-Type` Specifies the type of the key. -- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. -- `-Value` Specifies the value for the key. - -## Parameters - -### -CustomKeyIdentifier - -Specifies a custom key ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -EndDate - -Specifies the time when the key becomes invalid as a DateTime object. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies a unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -StartDate - -Specifies the time when the key becomes valid as a DateTime object. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Type - -Specifies the type of the key. - -```yaml -Type: KeyType -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Usage - -Specifies the key usage. - -- `AsymmetricX509Cert`: The usage must be `Verify`. -- `X509CertAndPassword`: The usage must be `Sign`. - -```yaml -Type: KeyUsage -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Value - -Specifies the value for the key. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) - -[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md deleted file mode 100644 index 155f17e3fe..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: New-EntraApplicationPassword -description: This article provides details on the New-EntraApplicationPassword command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPassword - -schema: 2.0.0 ---- - -# New-EntraApplicationPassword - -## Synopsis - -Adds a strong password to an application. - -## Syntax - -```powershell -New-EntraApplicationPassword - -ObjectId - -PasswordCredential - [] -``` - -## Description - -Adds a strong password to an application. - -## Examples - -### Example 1: Add a password to an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' -$Application = Get-EntraBetaApplication -SearchString '' -$PasswordCredential= New-Object Microsoft.Open.MSGraph.Model.PasswordCredential -$PasswordCredential.StartDateTime = Get-Date -Year 2024 -Month 12 -Day 28 -$PasswordCredential.EndDateTime = Get-Date -Year 2025 -Month 2 -Day 28 -$PasswordCredential.KeyId = 'bbbbbbbb-1c1c-2d2d-3e3e-444444444444' -$PasswordCredential.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('a') -$PasswordCredential.Hint = 'b' -$params = @{ - ObjectId = $Application.ObjectId - PasswordCredential = $PasswordCredential -} - -New-EntraApplicationPassword @params -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- -{97} 2/28/2025 7:05:39 AM nnW bbbbbbbb-1c1c-2d2d-3e3e-444444444444 12/28/2024 7:05:39 AM -``` - -This example adds a password to the specified application. - -- `-ObjectId` parameter specifies the unique identifier of the application. -- `-PasswordCredential` parameter specifies a password credential associated with an application or a service principal. - -## Parameters - -### -ObjectId - -The unique identifier of the application object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PasswordCredential - -Represents a password credential associated with an application or a service principal. - -```yaml -Type: PasswordCredential -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -### Microsoft.Open.MSGraph.Model.PasswordCredential - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraApplicationPassword](Remove-EntraApplicationPassword.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md deleted file mode 100644 index 55f8da01e5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: New-EntraApplicationPasswordCredential -description: This article provides details on the New-EntraApplicationPasswordCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential - -schema: 2.0.0 ---- - -# New-EntraApplicationPasswordCredential - -## Synopsis - -Creates a password credential for an application. - -## Syntax - -```powershell -New-EntraApplicationPasswordCredential - -ApplicationId - [-CustomKeyIdentifier ] - [-StartDate ] - [-EndDate ] - [] -``` - -## Description - -The `New-EntraApplicationPasswordCredential` cmdlet creates a password credential for an application in Microsoft Entra ID. - -## Examples - -### Example 1: Create a password credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -New-EntraApplicationPasswordCredential -ApplicationId $application.Id -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM -``` - -This command creates new password credential for specified application. - -- `-ApplicationId` Specifies the ID of an application. - -### Example 2: Create a password credential using CustomKeyIdentifier parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -$params = @{ - ApplicationId = $application.Id - CustomKeyIdentifier = '' -} - -New-EntraApplicationPasswordCredential @params -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- -100 101 109 111 demo 8/2/2026 11:47:53 AM 8Mw tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 8/2/2024 11:47:53 AM -``` - -This command creates new password credential for specified application. - -- `-ApplicationId` Specifies the ID of an application. -- `-CustomKeyIdentifier` Speicifies unique binary identifier. - -### Example 3: Create a password credential using StartDate parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -$params = @{ - ApplicationId = $application.Id - StartDate = (Get-Date).AddYears(0) - CustomKeyIdentifier = '' -} - -New-EntraApplicationPasswordCredential @params -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM -``` - -This command creates new password credential for specified application. - -- `-ApplicationId` Specifies the ID of an application. -- `-StartDate` Speicifies the date and time at which the password becomes valid. - -### Example 4: Create a password credential using EndDate parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -$params = @{ - ApplicationId = $application.Id - EndDate = (Get-Date).AddYears(2) - CustomKeyIdentifier = '' -} - -New-EntraApplicationPasswordCredential @params -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM -``` - -This command creates new password credential for specified application. - -- `-ApplicationId` Specifies the ID of an application. -- `-EndDate` Speicifies The date and time at which the password expires. - -## Parameters - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -CustomKeyIdentifier - -A unique binary identifier. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -StartDate - -The date and time at which the password becomes valid. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -EndDate - -The date and time at which the password expires. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) - -[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md deleted file mode 100644 index 278ad45ebb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md +++ /dev/null @@ -1,406 +0,0 @@ ---- -title: New-EntraServicePrincipal -description: This article provides details on the New-EntraServicePrincipal command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipal - -schema: 2.0.0 ---- - -# New-EntraServicePrincipal - -## Synopsis - -Creates a service principal. - -## Syntax - -```powershell -New-EntraServicePrincipal - -AppId - [-KeyCredentials ] - [-Homepage ] - [-LogoutUrl ] - [-ServicePrincipalType ] - [-AlternativeNames ] - [-PasswordCredentials ] - [-Tags ] - [-AccountEnabled ] - [-ServicePrincipalNames ] - [-AppRoleAssignmentRequired ] - [-DisplayName ] - [-ReplyUrls ] - [] -``` - -## Description - -Create a new service Principal. - -For multitenant apps, the calling user must also be in at least one of the following Microsoft Entra roles: - -- Application Administrator -- Cloud Application Administrator - -For single-tenant apps where the calling user is a non-admin user but is the owner of the backing application, the user must have the Application Developer role. - -## Examples - -### Example 1: Create a new service principal using DisplayName, AccountEnabled, Tags, and AppRoleAssignmentRequired - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") -$params = @{ - AccountEnabled = $true - AppId = $MyApp.AppId - AppRoleAssignmentRequired = $true - DisplayName = $MyApp.DisplayName - Tags = {WindowsAzureActiveDirectoryIntegratedApp} -} -New-EntraServicePrincipal @params -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application -``` - -This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. - -The tag `-Tags {WindowsAzureActiveDirectoryIntegratedApp}` is used to have this service principal show up in the list of Integrated Applications in the Admin Portal. - -- `-AccountEnabled` parameter specifies true if the service principal account is enabled, otherwise false. -- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). -- `-DisplayName` parameter specifies the service principal display name. -- `-AppRoleAssignmentRequired` parameter indicates whether an application role assignment is required. - -### Example 2: Create a new service principal using Homepage, logoutUrl, and ReplyUrls - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") -$params = @{ - AppId = $MyApp.AppId - Homepage = 'https://localhost/home' - LogoutUrl = 'htpp://localhost/logout' - ReplyUrls = 'https://localhost/redirect' -} -New-EntraServicePrincipal @params -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application -``` - -This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. - -- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). -- `-Homepage` parameter specifies the home page or landing page of the application. -- `-LogoutUrl` parameter specifies the logout URL. -- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. - -### Example 3: Create a new service principal by KeyCredentials - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential -$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') -$startdate = Get-Date -Year 2023 -Month 10 -Day 23 -$creds.StartDate = $startdate -$creds.Type = 'Symmetric' -$creds.Usage = 'Sign' -$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('strong-cred-value') -$creds.EndDate = Get-Date -Year 2024 -Month 10 -Day 23 -$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") -$params = @{ - AppId = $MyApp.AppId - KeyCredentials = $creds -} -New-EntraServicePrincipal @params -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application -``` - -This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. - -- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). -- `-KeyCredentials` parameter specifies the collection of key credentials associated with the service principal. - -### Example 4: Create a new service principal by AlternativeNames, ServicePrincipalType, and ServicePrincipalName - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") -$params = @{ - AppId = $MyApp.AppId - AlternativeNames = 'sktest2' - ServicePrincipalType = 'Application' - ServicePrincipalNames = $MyApp.AppId -} -New-EntraServicePrincipal @params -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADandPersonalMicrosoftAccount Application -``` - -This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. - -- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). -- `-AlternativeNames` parameter specifies the alternative names for this service principal. -- `-ServicePrincipalType` parameter specifies the type of the service principal. -- `-ServicePrincipalNames` parameter specifies an array of service principal names. - -## Parameters - -### -AccountEnabled - -True if the service principal account is enabled; otherwise, false. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AlternativeNames - -The alternative names for this service principal. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppId - -The unique identifier for the associated application (its appId property). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppRoleAssignmentRequired - -Indicates whether an application role assignment is required. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the service principal display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Homepage - -Home page or landing page of the application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -KeyCredentials - -The collection of key credentials associated with the service principal. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LogoutUrl - -Specifies the logout URL. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordCredentials - -The collection of password credentials associated with the application. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplyUrls - -The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalNames - -Specifies an array of service principal names. -Based on the identifierURIs collection, plus the application's appId property, these URIs are used to reference an application's service principal. -A client uses ServicePrincipalNames to: - -- populate requiredResourceAccess, via "Permissions to other applications" in the Azure classic portal. -- Specify a resource URI to acquire an access token, which is the URI returned in the claim. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalType - -The type of the service principal. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Tags linked to this service principal. - -Note that if you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) - -[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md deleted file mode 100644 index 5a44ce185e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md +++ /dev/null @@ -1,230 +0,0 @@ ---- -title: New-EntraServicePrincipalAppRoleAssignment -description: This article provides details on the New-EntraServicePrincipalAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment - -schema: 2.0.0 ---- - -# New-EntraServicePrincipalAppRoleAssignment - -## Synopsis - -Assigns a service principal to an application role. - -## Syntax - -```powershell -New-EntraServicePrincipalAppRoleAssignment - -ObjectId - -PrincipalId - -Id - -ResourceId - [] -``` - -## Description - -The `New-EntraServicePrincipalAppRoleAssignment` cmdlet assigns a service principal to an application role in Microsoft Entra ID. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. - -- Directory Synchronization Accounts -- Directory Writer -- Hybrid Identity Administrator -- Identity Governance Administrator -- Privileged Role Administrator -- User Administrator -- Application Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Assign an app role to another service principal - -```powershell - Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' - $appname = 'Box' - $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" - $params = @{ - ObjectId = $spo.ObjectId - ResourceId = $spo.ObjectId - Id = $spo.Approles[1].Id - PrincipalId = $spo.ObjectId -} - -New-EntraServicePrincipalAppRoleAssignment @params -``` - -```Output -Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId --- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- -1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box aaaa0000-bb11-2222-33cc-444444dddddd -``` - -This example demonstrates how to assign an app role to another service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. - -- `-ObjectId` parameter specifies the ObjectId of a client service principal to which you're assigning the app role. -- `-ResourceId`parameter specifies the ObjectId of the resource service principal. -- `-Id` parameter specifies the Id of the app role (defined on the resource service principal) to assign to the client service principal. If no app roles are defined on the resource app, you can use `00000000-0000-0000-0000-000000000000`. -- `-PrincipalId` parameter specifies the ObjectId of the client service principal to which you're assigning the app role. - -### Example 2: Assign an app role to a user - -```powershell - Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' - $appname = 'Box' - $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" - $user = Get-EntraUser -SearchString 'Test Contoso' - - $params = @{ - ObjectId = $spo.ObjectId - ResourceId = $spo.ObjectId - Id = $spo.Approles[1].Id - PrincipalId = $user.ObjectId -} - -New-EntraServicePrincipalAppRoleAssignment @params -``` - -```Output -Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId --- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- -2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box bbbb1111-cc22-3333-44dd-555555eeeeee -``` - -This example demonstrates how to assign an app role to a user in Microsoft Entra ID. -You can use the command `Get-EntraServicePrincipal` to get a service principal Id. -You can use the command `Get-EntraUser` to get a user Id. - -- `-ObjectId` parameter specifies the ObjectId of the app's service principal. -- `-ResourceId`parameter specifies the ObjectId of the app's service principal. -- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the user. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the user. -- `-PrincipalId` parameter specifies the ObjectId of a user to which you're assigning the app role. - -### Example 3: Assign an app role to a group - -```powershell - Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' - $appname = 'Box' - $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" - $group = Get-EntraGroup -SearchString 'testGroup' - - $params = @{ - ObjectId = $spo.ObjectId - ResourceId = $spo.ObjectId - Id = $spo.Approles[1].Id - PrincipalId = $group.ObjectId - } - - New-EntraServicePrincipalAppRoleAssignment @params -``` - -```Output -Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId --- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- -3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box cccc2222-dd33-4444-55ee-666666ffffff -``` - -This example demonstrates how to assign an app role to a group in Microsoft Entra ID. -You can use the command `Get-EntraServicePrincipal` to get a service principal Id. -You can use the command `Get-EntraGroup` to get a group Id. - -- `-ObjectId` parameter specifies the ObjectId of the app's service principal. -- `-ResourceId`parameter specifies the ObjectId of the app's service principal. -- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the group. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the group. -- `-PrincipalId` parameter specifies the ObjectId of a group to which you're assigning the app role. - -## Parameters - -### -Id - -Specifies the ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PrincipalId - -Specifies a principal ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId - -Specifies a resource ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`New-EntraServiceAppRoleAssignment` is an alias for `New-EntraServicePrincipalAppRoleAssignment`. - -## Related Links - -[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) - -[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md deleted file mode 100644 index 74a1a50f71..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -title: New-EntraServicePrincipalKeyCredential -description: This article provides details on the New-EntraServicePrincipalKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential - -schema: 2.0.0 ---- - -# New-EntraServicePrincipalKeyCredential - -## Synopsis - -Creates a password credential for a service principal. - -## Syntax - -```powershell -New-EntraServicePrincipalKeyCredential - -ObjectId - [-CustomKeyIdentifier ] - [-StartDate ] - [-EndDate ] - [-Type ] - [-Usage ] - [-Value ] - [] -``` - -## Description - -The New-EntraServicePrincipalKeyCredential cmdlet creates a key credential for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Create a key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -New-EntraServicePrincipalKeyCredential -``` - -This command creates a key credential for a service principal. - -## Parameters - -### -CustomKeyIdentifier - -Specifies a custom key ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -EndDate - -Specifies the time when the key becomes invalid as a DateTime object. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies an object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -StartDate - -Specifies the time when the key becomes valid as a DateTime object. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Type - -Specifies the type of the key. - -```yaml -Type: KeyType -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Usage - -Specifies the key usage. - -```yaml -Type: KeyUsage -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Value - -Specifies the value for the key. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) - -[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md deleted file mode 100644 index a8377771c4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: New-EntraServicePrincipalPasswordCredential -description: This article provides details on the New-EntraServicePrincipalPasswordCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential - -schema: 2.0.0 ---- - -# New-EntraServicePrincipalPasswordCredential - -## Synopsis - -Creates a password credential for a service principal. - -## Syntax - -```powershell -New-EntraServicePrincipalPasswordCredential - -ServicePrincipalId - [-EndDate ] - [-StartDate ] - [] -``` - -## Description - -The `New-EntraServicePrincipalPasswordCredential` cmdlet creates a password credential for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Create a password credential with StartDate - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$Params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - StartDate = '2024-04-21T14:14:14Z' -} -New-EntraServicePrincipalPasswordCredential @Params -``` - -```Output -secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u -@odata.type : #microsoft.graph.servicePrincipal -endDateTime : 08-08-2026 10:30:00 -hint : LY. -customKeyIdentifier : -startDateTime : 08-08-2024 14:14:14 -keyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 -@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword -displayName : -StartDate : 08-08-2024 14:14:14 -EndDate : 08-08-2026 10:30:00 -``` - -This example demonstrates how to create a password credential with StartDate for a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-StarteDate` parameter specifies the date and time at which the password becomes valid. - -### Example 2: Create a password credential with EndtDate - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$Params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - EndDate = '2030-03-21T14:14:14Z' -} -New-EntraServicePrincipalPasswordCredential @Params -``` - -```Output -secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u -@odata.type : #microsoft.graph.servicePrincipal -endDateTime : 08-08-2026 10:30:00 -hint : LY. -customKeyIdentifier : -startDateTime : 08-08-2024 14:14:14 -keyId : bbbbbbbb-1c1c-2d2d-3e3e-444444444444 -@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword -displayName : -StartDate : 08-08-2024 14:14:14 -EndDate : 08-08-2026 10:30:00 -``` - -This example demonstrates how to create a password credential with EndDate for a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-EndDate` parameter specifies the date and time at which the password expires represented using ISO 8601 format and is always in UTC time. - -## Parameters - -### -EndDate - -The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of the service principal. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -StartDate - -The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) - -[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md deleted file mode 100644 index bb06d0fd75..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Remove-EntraApplication -description: This article provides details on the Remove-EntraApplication command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplication - -schema: 2.0.0 ---- - -# Remove-EntraApplication - -## Synopsis - -Deletes an application object. - -## Syntax - -```powershell -Remove-EntraApplication - -ApplicationId - [] -``` - -## Description - -The `Remove-EntraApplication` cmdlet deletes an application object identified by ApplicationId. Specify the `ApplicationId` parameter to delete an application object. - -## Examples - -### Example 1: Remove an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$Application = Get-EntraApplication -SearchString '' -Remove-EntraApplication -ApplicationId $Application.ObjectId -``` - -This example demonstrates how to delete an application object. - -## Parameters - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[New-EntraApplication](New-EntraApplication.md) - -[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md deleted file mode 100644 index 3ff1288b6e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraApplicationExtensionProperty -description: This article provides details on the Remove-EntraApplicationExtensionProperty command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty - -schema: 2.0.0 ---- - -# Remove-EntraApplicationExtensionProperty - -## Synopsis - -Removes an application extension property. - -## Syntax - -```powershell -Remove-EntraApplicationExtensionProperty - -ExtensionPropertyId - -ApplicationId - [] -``` - -## Description - -The `Remove-EntraApplicationExtensionProperty` cmdlet removes an application extension property for an object in Microsoft Entra ID. - -## Examples - -### Example 1: Remove an application extension property - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -$params = @{ - ApplicationId = $Application.ObjectId - ExtensionPropertyId = 'cccc2222-dd33-4444-55ee-666666ffffff' -} - -Remove-EntraApplicationExtensionProperty @params -``` - -This example removes the extension property that has the specified ID from an application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. -- `-ExtensionPropertyId` parameter specifies the unique identifier of the extension property to remove. - -## Parameters - -### -ExtensionPropertyId - -Specifies the unique ID of the extension property to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) - -[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md deleted file mode 100644 index 9f0e4a9325..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Remove-EntraApplicationKey -description: This article provides details on the Remove-EntraApplicationKey command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKey - -schema: 2.0.0 ---- - -# Remove-EntraApplicationKey - -## Synopsis - -Removes a key from an application. - -## Syntax - -```powershell -Remove-EntraApplicationKey - -ObjectId - [-Proof ] - [-KeyId ] - [] -``` - -## Description - -Removes a key from an application. - -## Examples - -### Example 1: Removes a key credential from an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' -$app = Get-EntraApplication -Filter "DisplayName eq ''" -$params = @{ - ObjectId = $app.ObjectId - KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' - Proof = {token} -} - -Remove-EntraApplicationKey @params -``` - -This command removes the specified key credential from the specified application. - -- `-ObjectId` parameter specifies the unique identifier of an application. -- `-KeyId` parameter specifies the key Id corresponding to the key object to be removed. -- `-Proof` parameter specifies the JWT token provided as a proof of possession. - -## Parameters - -### -ObjectId - -Specifies the unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -KeyId - -The key Id corresponding to the key object to be removed. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proof - -The JWT token provided as a proof of possession. - -A self-signed JWT token used as a proof of possession of the existing keys. This JWT token must be signed with a private key that corresponds to one of the existing valid certificates associated with the application. The token should contain the following claims: - -- `aud`: Audience needs to be 00000002-0000-0000-c000-000000000000. -- `iss`: Issuer needs to be the ID of the application that initiates the request. -- `nbf`: Not before time. -- `exp`: Expiration time should be the value of nbf + 10 minutes. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplicationKey](New-EntraApplicationKey.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md deleted file mode 100644 index 944d130412..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Remove-EntraApplicationKeyCredential -description: This article provides details on the Remove-EntraApplicationKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential - -schema: 2.0.0 ---- - -# Remove-EntraApplicationKeyCredential - -## Synopsis - -Removes a key credential from an application. - -## Syntax - -```powershell -Remove-EntraApplicationKeyCredential - -ApplicationId - -KeyId - [] -``` - -## Description - -The `Remove-EntraApplicationKeyCredential` cmdlet removes a key credential from an application. - -An application can use this command along with `New-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. - -## Examples - -### Example 1: Remove a key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -$params = @{ - ApplicationId = $application.Id - KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' -} - -Remove-EntraApplicationKeyCredential @params -``` - -This command removes the specified key credential from the specified application. - -- `-ApplicationId` Specifies the ID of an application. -- `-KeyId` Specifies a custom key ID. Use `Get-EntraApplicationKeyCredential` to get the keyId details. - -## Parameters - -### -KeyId - -Specifies a custom key ID. The unique identifier for the password. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies a unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) - -[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md deleted file mode 100644 index a8a9019f62..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraApplicationOwner -description: This article provides details on the Remove-EntraApplicationOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationOwner - -schema: 2.0.0 ---- - -# Remove-EntraApplicationOwner - -## Synopsis - -Removes an owner from an application. - -## Syntax - -```powershell -Remove-EntraApplicationOwner - -OwnerId - -ApplicationId - [] -``` - -## Description - -The `Remove-EntraApplicationOwner` cmdlet removes an owner from an application in Microsoft Entra ID. - -## Examples - -### Example 1: Remove an owner from an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$Application = Get-EntraApplication -SearchString '' -$params = @{ - ApplicationId = $Application.ObjectId - OwnerId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' -} - -Remove-EntraApplicationOwner @params -``` - -This example removes the specified owner from the specified application. You can use the command `Get-EntraApplication` to get application Id. - -- `-ApplicationId` parameter specifies the the unique identifier of a application. -- `-OwnerId` parameter specifies the ID of the owner. - -## Parameters - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OwnerId - -Specifies the ID of the owner. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, -`InformationVariable`, `-OutVariable`, -`OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) - -[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md deleted file mode 100644 index b63496136c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraApplicationPassword -description: This article provides details on the Remove-EntraApplicationPassword command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPassword - -schema: 2.0.0 ---- - -# Remove-EntraApplicationPassword - -## Synopsis - -Remove a password from an application. - -## Syntax - -```powershell -Remove-EntraApplicationPassword - -ObjectId - [-KeyId ] - [] -``` - -## Description - -Remove a password from an application. - -## Examples - -### Example 1: Removes a password from an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq ''" -$params = @{ - ObjectId = $application.Id - KeyId = 'cccccccc-2d2d-3e3e-4f4f-555555555555' -} - -Remove-EntraApplicationPassword @params -``` - -This example removes the specified password from the specified application. - -- `-ObjectId` parameter specifies the unique identifier of the application. -- `-KeyId` parameter specifies the unique identifier of the PasswordCredential. - -## Parameters - -### -ObjectId - -The unique identifier of the application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -KeyId - -The unique identifier for the key. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplicationPassword](New-EntraApplicationPassword.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md deleted file mode 100644 index 72d34ae5ff..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Remove-EntraApplicationPasswordCredential -description: This article provides details on the Remove-EntraApplicationPasswordCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential - -schema: 2.0.0 ---- - -# Remove-EntraApplicationPasswordCredential - -## Synopsis - -Removes a password credential from an application. - -## Syntax - -```powershell -Remove-EntraApplicationPasswordCredential - -ApplicationId - -KeyId - [] -``` - -## Description - -The `Remove-EntraApplicationPasswordCredential` cmdlet removes a password credential from an application in Microsoft Entra ID. - -## Examples - -### Example 1: Remove an application password credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq 'Contoso Helpdesk App'" -$KeyIDs = Get-EntraApplicationPasswordCredential -ApplicationId $application.Id -Remove-EntraApplicationPasswordCredential -ApplicationId $application.Id -KeyId $KeyIds[0].KeyId -``` - -This example demonstrates how to remove the password credential for an application. - -- `ApplicationId` Specifies the ID of the application. Use `Get-EntraApplication` to get application ObjectId value. -- `KeyId` Specifies the ID of the password credential. Use `Get-EntraApplicationPasswordCredential` to retrieve a specific credential details. - -## Parameters - -### -KeyId - -Specifies the ID of the password credential. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the ID of the application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) - -[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md deleted file mode 100644 index d34578e6cb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Remove-EntraApplicationVerifiedPublisher -description: This article provides details on the Remove-EntraApplicationVerifiedPublisher command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher - -schema: 2.0.0 ---- - -# Remove-EntraApplicationVerifiedPublisher - -## Synopsis - -Removes the verified publisher from an application. - -## Syntax - -```powershell -Remove-EntraApplicationVerifiedPublisher - -AppObjectId - [] -``` - -## Description - -Removes the verified publisher from an application. - -## Examples - -### Example 1: Remove the verified publisher from an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$app = Get-EntraApplication -Filter "DisplayName eq ''" -Remove-EntraApplicationVerifiedPublisher -AppObjectId $app.ObjectId -``` - -This command demonstrates how to remove the verified publisher from an application. - -- `-AppObjectId` parameter specifies the unique identifier of an application. - -## Parameters - -### -AppObjectId - -The unique identifier of a Microsoft Entra ID Application object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[Set-EntraApplicationVerifiedPublisher](Set-EntraApplicationVerifiedPublisher.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md deleted file mode 100644 index fb083eb0aa..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Remove-EntraDeletedApplication -description: This article provides details on the Remove-EntraDeletedApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedApplication - -schema: 2.0.0 ---- - -# Remove-EntraDeletedApplication - -## Synopsis - -Permanently delete a recently deleted application object from deleted items. - -## Syntax - -```powershell -Remove-EntraDeletedApplication - [-ObjectId] - [] -``` - -## Description - -Permanently delete a recently deleted application object from deleted items. After an item is permanently deleted, it can't be restored. - -For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. - -- To permanently delete deleted applications or service principals: Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. - -## Examples - -### Example 1: Remove deleted application object - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$App = Get-EntraDeletedApplication -SearchString 'My PowerShell Application' -Remove-EntraDeletedApplication -ObjectId $App.ObjectId -``` - -This command removes recently deleted application. You can use the command `Get-EntraDeletedApplication` to get deleted application Id. - -- `-ObjectId` parameter specifies the Id of a deleted application. - -## Parameters - -### -ObjectId - -The unique identifier of deleted application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) - -[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md deleted file mode 100644 index 9860be4fb3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Remove-EntraDeletedDirectoryObject -description: This article provides details on the Remove-EntraDeletedDirectoryObject command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject - -schema: 2.0.0 ---- - -# Remove-EntraDeletedDirectoryObject - -## Synopsis - -Permanently delete a previously deleted directory object. - -## Syntax - -```powershell -Remove-EntraDeletedDirectoryObject - -DirectoryObjectId - [] -``` - -## Description - -The `Remove-EntraDeletedDirectoryObject` cmdlet is used to permanently delete a previously deleted directory object. - -When a directory object is permanently deleted, it can no longer be restored. - -For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. - -- To permanently delete deleted applications or service principals: `Application Administrator`, `Cloud Application Administrator`, or `Hybrid Identity Administrator`. -- To permanently delete deleted users: `User Administrator`. -- To permanently delete deleted groups: `Groups Administrator`. - -## Examples - -### Example 1: Delete a previously deleted directory object - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Group.ReadWrite.All','Application.ReadWrite.All','User.ReadWrite.All' - -Remove-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -This example demonstrates how to permanently delete a previously deleted directory object by DirectoryObjectId. - -- `-DirectoryObjectId` parameter specifies the Id of the directory object that is permanently deleted. - -## Parameters - -### -DirectoryObjectId - -The DirectoryObjectId of the directory object that is permanently deleted. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) - -[Restore-EntraDeletedDirectoryObject](Restore-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md deleted file mode 100644 index 65cf9d1a54..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Remove-EntraServicePrincipal -description: This article provides details on the Remove-EntraServicePrincipal command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipal - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipal - -## Synopsis - -Removes a service principal. - -## Syntax - -```powershell -Remove-EntraServicePrincipal - -ServicePrincipalId - [] -``` - -## Description - -The `Remove-EntraServicePrincipal` cmdlet removes a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Removes a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Remove-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId -``` - -This example demonstrates how to remove a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the service principal Id. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipal](New-EntraServicePrincipal.md) - -[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md deleted file mode 100644 index 333bf29a33..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Remove-EntraServicePrincipalAppRoleAssignment -description: This article provides details on the Remove-EntraServicePrincipalAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalAppRoleAssignment - -## Synopsis - -Removes a service principal application role assignment. - -## Syntax - -```powershell -Remove-EntraServicePrincipalAppRoleAssignment - -AppRoleAssignmentId - -ServicePrincipalId - [] -``` - -## Description - -The `Remove-EntraServicePrincipalAppRoleAssignment` cmdlet removes a service principal application role assignment in Microsoft Entra ID. - -App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. - -- Directory Synchronization Accounts -- Directory Writer -- Hybrid Identity Administrator -- Identity Governance Administrator -- Privileged Role Administrator -- User Administrator -- Application Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Removes a service principal application role assignment - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $servicePrincipal.Id -AppRoleAssignmentId '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' -``` - -This example demonstrates how to remove a service principal application role assignment in Microsoft Entra ID. - -- `-ServicePrincipalId` - specifies the unique identifier (Object ID) of the service principal or user from which you want to remove an app role assignment. -- `-AppRoleAssignmentId` - specifies the unique identifier (ID) of the app role assignment that you want to remove. The value `2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6` represents the ID of the specific app role assignment to be removed. - -## Parameters - -### -AppRoleAssignmentId - -Specifies the ID of the application role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`Remove-EntraServiceAppRoleAssignment` is an alias for `Remove-EntraServicePrincipalAppRoleAssignment`. - -## Related Links - -[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) - -[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md deleted file mode 100644 index 6f2490f9fd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Remove-EntraServicePrincipalDelegatedPermissionClassification -description: This article provides details on the Remove-EntraServicePrincipalDelegatedPermissionClassification command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalDelegatedPermissionClassification - -## Synopsis - -Remove delegated permission classification. - -## Syntax - -```powershell -Remove-EntraServicePrincipalDelegatedPermissionClassification - -ServicePrincipalId - -Id - [] -``` - -## Description - -The `Remove-EntraServicePrincipalDelegatedPermissionClassification` cmdlet deletes the given delegated permission classification by Id from service principal. - -## Examples - -### Example 1: Remove a delegated permission classification - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' -} -Remove-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -This command deletes the delegated permission classification by Id from the service principal. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. -- `-Id` parameter specifies the unique identifier of a delegated permission classification object Id. - -## Parameters - -### -ServicePrincipalId - -The unique identifier of a service principal object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a delegated permission classification object Id. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) - -[Add-EntraServicePrincipalDelegatedPermissionClassification](Add-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md deleted file mode 100644 index 18477f4493..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Remove-EntraServicePrincipalKeyCredential -description: This article provides details on the Remove-EntraServicePrincipalKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalKeyCredential - -## Synopsis - -Removes a key credential from a service principal. - -## Syntax - -```powershell -Remove-EntraServicePrincipalKeyCredential - -ServicePrincipalId - -KeyId - [] -``` - -## Description - -The Remove-EntraServicePrincipalKeyCredential cmdlet removes a key credential from a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Remove a key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' #Delegated Permission -Connect-Entra -Scopes 'Application.ReadWrite.OwnedBy' #Application Permission -$SPObjectID = (Get-EntraServicePrincipal -SearchString 'Entra Multi-Factor Auth Client').ObjectID -Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID -Remove-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID -KeyId -``` - -This example demonstrates how to remove a key credential from a service principal in Microsoft Entra ID. - -- First command stores the ObjectID of your service principal in the $SPObjectID variable. -- The second command gets all the Key Credentials for the service principal. Copy the preferred KeyID associated with the certificate to be removed and paste it at the in the third command. -- The last command removes the certificate (key credential) from the service principal configuration. - -## Parameters - -### -KeyId - -Specifies the ID of a key credential. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) - -[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md deleted file mode 100644 index 685585aa07..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: Remove-EntraServicePrincipalOwner -description: This article provides details on the Remove-EntraServicePrincipalOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalOwner - -## Synopsis - -Removes an owner from a service principal. - -## Syntax - -```powershell -Remove-EntraServicePrincipalOwner - -OwnerId - -ServicePrincipalId - [] -``` - -## Description - -The `Remove-EntraServicePrincipalOwner` cmdlet removes an owner from a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Removes an owner from a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$owner = Get-EntraUser -UserId 'SawyerM@contoso.com' - -$params= @{ - ServicePrincipalId = $servicePrincipal.Id - OwnerId = $owner.Id -} -Remove-EntraServicePrincipalOwner @params -``` - -This example demonstrates how to remove an owner from a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the service principal Id. -- `-OwnerId` parameter specifies the service principal owner Id. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of a service principal. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OwnerId - -Specifies the ID of the owner. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) - -[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md deleted file mode 100644 index 6706517f45..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Remove-EntraServicePrincipalPasswordCredential -description: This article provides details on the Remove-EntraServicePrincipalPasswordCredential command. - -ms.topic: reference -ms.date: 08/20/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalPasswordCredential - -## Synopsis - -Removes a password credential from a service principal. - -## Syntax - -```powershell -Remove-EntraServicePrincipalPasswordCredential - -ServicePrincipalId - -KeyId - [] -``` - -## Description - -The `Remove-EntraServicePrincipalPasswordCredential` cmdlet removes a password credential from a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Remove a password credential from a service principal in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$Params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' -} -Remove-EntraServicePrincipalPasswordCredential @Params -``` - -This example demonstrates how to remove a password credential from a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ServicePrincipalId of a specified Service Principal Password Credential. -- `-KeyId` parameter specifies the unique identifier of a Password Credential. - -## Parameters - -### -KeyId - -Specifies the unique identifier of password credential. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) - -[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md deleted file mode 100644 index a3c04f906a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: Restore-EntraDeletedApplication -description: This article provides details on the Restore-EntraDeletedApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedApplication - -schema: 2.0.0 ---- - -# Restore-EntraDeletedApplication - -## Synopsis - -Restores a previously deleted application. - -## Syntax - -```powershell -Restore-EntraDeletedApplication - [-IdentifierUris ] - -ObjectId - [] -``` - -## Description - -This cmdlet restores a previously deleted application. - -Restoring an application doesn't restore the associated service principal automatically. You must explicitly restore the deleted service principal. - -For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. - -- Application Administrator -- Cloud Application Administrator -- Hybrid Identity Administrator - -## Examples - -### Example 1: Restores a previously deleted application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$application = Get-EntraApplication -SearchString 'New Entra Application' - -# Delete a specific application -Remove-EntraApplication -ObjectId $application.ObjectId - -# Confirm deleted application -Get-EntraDeletedApplication -Filter "DisplayName eq 'New Entra Application'" - -# Restore a deleted application -Restore-EntraDeletedApplication -ObjectId $application.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa -``` - -This example shows how an application is deleted, then the deleted application is retrieved using the `Get-EntraDeletedApplication` cmdlet, and subsequently the application is restored by specifying the application's Object ID in the `Restore-EntraDeletedApplication` cmdlet. - -- `-ObjectId` parameter specifies the ObjectId of the deleted application that is to be restored. - -## Parameters - -### -IdentifierUris - -The IdentifierUris of the application that is to be restored. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -The ObjectId of the deleted application that is to be restored. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) - -[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md deleted file mode 100644 index 570791b14e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Select-EntraGroupIdsServicePrincipalIsMemberOf -description: This article provides details on the Select-EntraGroupIdsServicePrincipalIsMemberOf command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf - -schema: 2.0.0 ---- - -# Select-EntraGroupIdsServicePrincipalIsMemberOf - -## Synopsis - -Selects the groups in which a service principal is a member. - -## Syntax - -```powershell -Select-EntraGroupIdsServicePrincipalIsMemberOf - -ObjectId - -GroupIdsForMembershipCheck - [] -``` - -## Description - -The `Select-EntraGroupIdsServicePrincipalIsMemberOf` cmdlet selects the groups in which a service principal is a member in Microsoft Entra ID. - -## Examples - -### Example 1: Get the group membership of a group for a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck -$Groups.GroupIds = (Get-EntraGroup -Top 10).ObjectId -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ObjectId = $ServicePrincipal.ObjectId - GroupIdsForMembershipCheck = $Groups -} -Select-EntraGroupIdsServicePrincipalIsMemberOf @params -``` - -```Output -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command gets the group membership of a group for a specified service principal. -You can use the command `Get-EntraGroup` to get group Id. -You can use the command `Get-EntraServicePrincipal` to get service principal Id. - -- `-ObjectId` parameter specifies the service principal Id. -- `-GroupIdsForMembershipCheck` parameter specifies the array of group object IDs. - -## Parameters - -### -GroupIdsForMembershipCheck - -Specifies an array of group object IDs. - -```yaml -Type: GroupIdsForMembershipCheck -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md deleted file mode 100644 index a79faa2c1f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md +++ /dev/null @@ -1,496 +0,0 @@ ---- -title: Set-EntraApplication -description: This article provides details on the Set-EntraApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplication - -schema: 2.0.0 ---- - -# Set-EntraApplication - -## Synopsis - -Updates the properties of an application object. - -## Syntax - -```powershell -Set-EntraApplication - -ApplicationId - [-PasswordCredentials ] - [-TokenEncryptionKeyId ] - [-SignInAudience ] - [-KeyCredentials ] - [-ParentalControlSettings ] - [-IdentifierUris ] - [-AppRoles ] - [-PublicClient ] - [-InformationalUrl ] - [-Tags ] - [-Api ] - [-OptionalClaims ] - [-GroupMembershipClaims ] - [-Web ] - [-DisplayName ] - [-IsFallbackPublicClient ] - [-IsDeviceOnlyAuthSupported ] - [-RequiredResourceAccess ] - [] -``` - -## Description - -Updates the properties of an application object. - -## Examples - -### Example 1: Update an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - DisplayName = 'New Demo Application' -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -### Example 2: Update an application using IdentifierUris parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - IdentifierUris = 'https://mynewapp.contoso.com' -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -### Example 3: Update an application using GroupMembershipClaims parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - GroupMembershipClaims = 'SecurityGroup' -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -### Example 4: Update an application using IsDeviceOnlyAuthSupported parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - IsDeviceOnlyAuthSupported = $false -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -### Example 5: Update an application using Tags parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - Tags = 'mytag' -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -## Parameters - -### -Api - -Specifies settings for an application that implements a web API. - -```yaml -Type: ApiApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppRoles - -The collection of application roles that an application might declare. - -These roles can be assigned to users, groups, or service principals. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupMembershipClaims - -Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentifierUris - -Specifies identifier Uniform Resource Identifiers (URIs). - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InformationalUrl - -Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. - -The terms of service and privacy statement are surfaced to users through the user consent experience. - -```yaml -Type: InformationalUrl -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsDeviceOnlyAuthSupported - -Specifies if the application supports authentication using a device token. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsFallbackPublicClient - -Specifies the fallback application type as public client, such as an installed application running on a mobile device. - -The default value is `false` that means the fallback application type is confidential client such as web app. - -There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). - -In those cases Microsoft Entra ID interprets the application type based on the value of this property. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -KeyCredentials - -Specifies key credentials. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OptionalClaims - -Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. - -```yaml -Type: OptionalClaims -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ParentalControlSettings - -Specifies parental control settings for an application. - -```yaml -Type: ParentalControlSettings -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordCredentials - -Specifies password credentials. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublicClient - -Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is `false`. - -```yaml -Type: PublicClientApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredResourceAccess - -Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. - -This pre-configuration of required resource access drives the consent experience. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignInAudience - -Specifies what Microsoft accounts are supported for the current application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Custom strings that can be used to categorize and identify the application. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TokenEncryptionKeyId - -Specifies the keyId of a public key from the keyCredentials collection. - -When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. - -The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Web - -Specifies settings for a web application. - -```yaml -Type: WebApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### Boolean - -### Microsoft.Open.MSGraph.Model.ApiApplication - -### Microsoft.Open.MSGraph.Model.InformationalUrl - -### Microsoft.Open.MSGraph.Model.OptionalClaims - -### Microsoft.Open.MSGraph.Model.ParentalControlSettings - -### Microsoft.Open.MSGraph.Model.PublicClientApplication - -### Microsoft.Open.MSGraph.Model.WebApplication - -### String - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] - -### System.Collections.Generic.List`1[System.String] - -### System.Nullable`1[System.Boolean] - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[New-EntraApplication](New-EntraApplication.md) - -[Remove-EntraApplication](Remove-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md deleted file mode 100644 index a029dc0470..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: Set-EntraApplicationLogo -description: This article provides details on the Set-EntraApplicationLogo command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationLogo - -schema: 2.0.0 ---- - -# Set-EntraApplicationLogo - -## Synopsis - -Sets the logo for an Application - -## Syntax - -### File (Default) - -```powershell -Set-EntraApplicationLogo - -ApplicationId - -FilePath - [] -``` - -### Stream - -```powershell -Set-EntraApplicationLogo - -ApplicationId - [] -``` - -### ByteArray - -```powershell -Set-EntraApplicationLogo - -ApplicationId - [] -``` - -## Description - -The `Set-EntraApplicationLogo` cmdlet is used to set the logo for an application. - -## Examples - -### Example 1: Sets the application logo for the application specified by the ApplicationId parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Demo Application'" -$params = @{ - ObjectId = $application.ObjectId - FilePath = 'D:\applogo.jpg' -} -Set-EntraApplicationLogo @params -``` - -This cmdlet sets the application logo for the application specified by the `-ApplicationId` parameter to the image specified with the `-FilePath` parameter. - -## Parameters - -### -FilePath - -The file path of the file that is to be uploaded as the application logo. - -```yamlset-EntraApplicationLogo -Type: System.String -Parameter Sets: File -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -The ApplicationId of the Application for which the logo is set. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.IO.Stream System.Byte\[\] - -## Outputs - -### System.Object - -## Notes - -File uploads must be smaller than 500KB. - -## Related Links - -[Get-EntraApplicationLogo](Get-EntraApplicationLogo.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md deleted file mode 100644 index 722021d35c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Set-EntraApplicationVerifiedPublisher -description: This article provides details on the Set-EntraApplicationVerifiedPublisher command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher - -schema: 2.0.0 ---- - -# Set-EntraApplicationVerifiedPublisher - -## Synopsis - -Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. - -## Syntax - -```powershell -Set-EntraApplicationVerifiedPublisher - -AppObjectId - -SetVerifiedPublisherRequest - [] -``` - -## Description - -Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. - -## Examples - -### Example 1: Set the verified publisher of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$app = Get-EntraApplication -Filter "DisplayName eq ''" -$appObjId = $app.ObjectId -$mpnId = '0433167' -$req = @{verifiedPublisherId = $mpnId} -$params = @{ - AppObjectId = $appObjId - SetVerifiedPublisherRequest = $req -} -Set-EntraApplicationVerifiedPublisher @params -``` - -This command sets the verified publisher of an application. - -The Microsoft Partner Network ID (MPNID) of the verified publisher can be obtained from the publisher's Partner Center account. - -- `-AppObjectId` parameter specifies the unique identifier of a Microsoft Entra ID Application. -- `-SetVerifiedPublisherRequest` parameter specifies the request body object containing the verifiedPublisherId property with it's the MPNID value. - -## Parameters - -### -AppObjectId - -The unique identifier of a Microsoft Entra ID Application object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SetVerifiedPublisherRequest - -A request body object containing the verifiedPublisherId property it's the MPNID value. - -```yaml -Type: SetVerifiedPublisherRequest -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraApplicationVerifiedPublisher](Remove-EntraApplicationVerifiedPublisher.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md deleted file mode 100644 index b2dd1e4636..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md +++ /dev/null @@ -1,440 +0,0 @@ ---- -title: Set-EntraServicePrincipal -description: This article provides details on the Set-EntraServicePrincipal command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraServicePrincipal - -schema: 2.0.0 ---- - -# Set-EntraServicePrincipal - -## Synopsis - -Updates a service principal. - -## Syntax - -```powershell -Set-EntraServicePrincipal - -ServicePrincipalId - [-KeyCredentials ] - [-Homepage ] - [-AppId ] - [-LogoutUrl ] - [-ServicePrincipalType ] - [-AlternativeNames ] - [-PasswordCredentials ] - [-PreferredSingleSignOnMode ] - [-Tags ] - [-AccountEnabled ] - [-ServicePrincipalNames ] - [-AppRoleAssignmentRequired ] - [-DisplayName ] - [-ReplyUrls ] - [] -``` - -## Description - -The `Set-EntraServicePrincipal` cmdlet updates a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Disable the account of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - AccountEnabled = $False -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update `AccountEnabled` of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-AccountEnabled` parameter specifies indicates whether the account is enabled. - -### Example 2: Update AppId and Homepage of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - AppId = '22223333-cccc-4444-dddd-5555eeee6666' - Homepage = 'https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z' -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update `AppId` and Homepage of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-AppId` parameter specifies the application ID. -- `-Homepage` parameter specifies the home page or landing page of the application. - -### Example 3: Update AlternativeNames and DisplayName of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - AlternativeNames = 'Service Principal Demo' - DisplayName = 'NewName' -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update AlternativeNames and DisplayName of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. - -### Example 4: Update LogoutUrl and ReplyUrls of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - LogoutUrl = 'https://securescore.office.com/SignOut' - ReplyUrls = 'https://admin.contoso.com' -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update LogoutUrl and ReplyUrls of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-LogoutUrl` parameter specifies the sign out URL. -- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. - -### Example 5: Update ServicePrincipalType and AppRoleAssignmentRequired of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - ServicePrincipalType = 'Application' - AppRoleAssignmentRequired = $True -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update `ServicePrincipalType` and `AppRoleAssignmentRequired` of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-ServicePrincipalType` parameter specifies the service principal type. -- `-AppRoleAssignmentRequired` parameter specifies indicates whether an application role assignment is required. - -### Example 6: Update KeyCredentials of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential -$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') -$startdate = Get-Date -Year 2024 -Month 10 -Day 10 -$creds.StartDate = $startdate -$creds.Type = 'Symmetric' -$creds.Usage = 'Sign' -$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('A') -$creds.EndDate = Get-Date -Year 2025 -Month 12 -Day 20 -Set-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId -KeyCredentials $creds -``` - -This example demonstrates how to update KeyCredentials of a service principal in Microsoft Entra ID. - -Use the `New-EntraServicePrincipalPasswordCredential` and `Remove-EntraServicePrincipalPasswordCredential` cmdlets to update the password or secret for a servicePrincipal. - -### Example 7: Update PreferredSingleSignOnMode of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - PreferredSingleSignOnMode = 'saml' -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update `PreferredSingleSignOnMode` of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-PreferredSingleSignOnMode` parameter specifies the single sign-on mode configured for this application. - -## Parameters - -### -AccountEnabled - -Indicates whether the account is enabled. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AlternativeNames - -The alternative names for this service principal. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppId - -Specifies the application ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppRoleAssignmentRequired - -Indicates whether an application role assignment is required. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Homepage - -Specifies the home page or landing page of the application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -KeyCredentials - -Specifies key credentials. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LogoutUrl - -Specifies the sign out URL. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Species the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PasswordCredentials - -Specifies password credentials. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PreferredSingleSignOnMode - -Specifies the single sign-on mode configured for this application. Microsoft Entra ID uses the preferred single sign-on mode to launch the application from Microsoft 365 or the My Apps portal. The supported values are password, saml, notSupported, and oidc. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplyUrls - -The URLs that user tokens are sent to for sign in with the associated application, or the redirect Uniform Resource Identifiers that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalNames - -Specifies service principal names. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalType - -The service principal type. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Specifies an array of tags. - -If you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipal](New-EntraServicePrincipal.md) - -[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md deleted file mode 100644 index 7b5c34637f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: Add-EntraEnvironment -description: This article provides details on the Add-EntraEnvironment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraEnvironment - -schema: 2.0.0 ---- - -# Add-EntraEnvironment - -## Synopsis - -Adds Microsoft Entra environment to the settings file. - -## Syntax - -### Add Entra Environment Name - -```powershell -Add-EntraEnvironment - [-Name] - [-AzureADEndpoint] - [-GraphEndpoint] - [-ProgressAction ] - [-WhatIf] - [-Confirm] - [] -``` - -## Description - -Adds Microsoft Entra environment to the settings file. - -## Examples - -### Example 1: Add a user defined environment - -```powershell -$params = @{ - Name = 'Canary' - GraphEndpoint = 'https://canary.graph.microsoft.com' - AzureADEndpoint = 'https://login.microsoftonline.com' -} - -Add-EntraEnvironment @params -``` - -```Output -Name AzureADEndpoint GraphEndpoint Type ----- --------------- ------------- ---- -Canary https://login.microsoftonline.com https://microsoftgraph.com User-defined {} -``` - -Adds a user-defined Entra environment to the settings file. - -## Parameters - -### -Name - -Specifies the name of an environment - -```yaml - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GraphEndpoint - -Specifies the GraphEndpoint URL of an environment - -```yaml - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -AzueADEndpoint - -Specifies the AzureADEndpoint URL of an environment - -```yaml - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraEnvironment](Get-EntraEnvironment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md deleted file mode 100644 index 1322d7b844..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md +++ /dev/null @@ -1,583 +0,0 @@ ---- -title: Connect-Entra -description: This article provides details on the Connect-Entra Command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi254 -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Connect-Entra - -schema: 2.0.0 ---- - -# Connect-Entra - -## Synopsis - -Connect to Microsoft Entra ID with an authenticated account. - -## Syntax - -### UserParameterSet (Default) - -```powershell -Connect-Entra -[[-Scopes] ] -[[-ClientId] ] -[-TenantId ] -[-ContextScope ] -[-Environment ] -[-UseDeviceCode] -[-ClientTimeout ] -[-NoWelcome] -[] -``` - -### AppCertificateParameterSet - -```powershell -Connect-Entra -[-ClientId] -[[-CertificateSubjectName] ] -[[-CertificateThumbprint] ] -[-Certificate ] -[-TenantId ] -[-ContextScope ] -[-Environment ] -[-ClientTimeout ] -[-NoWelcome] -[] -``` - -### IdentityParameterSet - -```powershell -Connect-Entra -[[-ClientId] ] -[-ContextScope ] -[-Environment ] -[-ClientTimeout ] -[-Identity] -[-NoWelcome] -[] -``` - -### AppSecretCredentialParameterSet - -```powershell -Connect-Entra -[-ClientSecretCredential ] -[-TenantId ] -[-ContextScope ] -[-Environment ] -[-ClientTimeout ] -[-NoWelcome] -[] -``` - -### AccessTokenParameterSet - -```powershell -Connect-Entra -[-AccessToken] -[-Environment ] -[-ClientTimeout ] -[-NoWelcome] -[] -``` - -### EnvironmentVariableParameterSet - -```powershell -Connect-Entra -[-ContextScope ] -[-Environment ] -[-ClientTimeout ] -[-EnvironmentVariable] -[-NoWelcome] -[] -``` - -## Description - -The `Connect-Entra` cmdlet connects to Microsoft Entra ID with an authenticated account. - -Several authentication scenarios are supported based on your use case, such as delegated (interactive) and app-only (non-interactive). - -`Connect-Entra` is an alias for `Connect-MgGraph`. - -## Examples - -### Example 1: Delegated access: Connect a PowerShell session to a tenant - -```powershell -Connect-Entra -``` - -This example shows how to connect your current PowerShell session to a Microsoft Entra ID tenant using credentials. - -### Example 2: Delegated access: Connect a PowerShell session to a tenant with required scopes - -```powershell -Connect-Entra -Scopes 'User.Read.All', 'Group.ReadWrite.All' -``` - -```Output -Welcome to Microsoft Graph! - -``` - -This example shows how to authenticate to Microsoft Entra ID with scopes. - -### Example 3: Delegated access: Using an access token - -```powershell -$secureString = ConvertTo-SecureString -String $AccessToken -AsPlainText -Force -Connect-Entra -AccessToken $secureString -``` - -```Output -Welcome to Microsoft Graph! -``` - -This example shows how to interactively authenticate to Microsoft Entra ID using an access token. - -For more information on how to get or create access token, see [Request an access token](https://learn.microsoft.com/graph/auth-v2-user#3-request-an-access-token). - -### Example 4: Delegated access: Using device code flow - -```powershell -Connect-Entra -UseDeviceCode -``` - -```Output -To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code A1B2CDEFGH to authenticate. -``` - -This example shows how to interactively authenticate to Microsoft Entra ID using device code flow. - -For more information, see [Device Code flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-device-code). - -### Example 5: App-only access: Using client credential with a Certificate thumbprint - -```powershell -$connectParams = @{ - TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' - ApplicationId = '00001111-aaaa-2222-bbbb-3333cccc4444' - CertificateThumbprint = 'AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00' -} - -Connect-Entra @connectParams -``` - -```Output -Welcome to Microsoft Graph! -``` - -This example shows how to authenticate using an ApplicationId and CertificateThumbprint. - -For more information on how to get or create CertificateThumbprint, see [Authenticate with app-only access](https://learn.microsoft.com/powershell/entra-powershell/app-only-access-auth). - -### Example 6: App-only access: Using client credential with a certificate name - -```powershell -$params = @{ - ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' - TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' - CertificateName = 'YOUR_CERT_SUBJECT' -} - -Connect-Entra @params -``` - -```powershell - $Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint - Connect-Entra -ClientId '' -TenantId '' -Certificate $Cert -``` - -You can find the certificate subject by running the above command. - -### Example 7: App-only access: Using client credential with a certificate - -```powershell -$Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint -$params = @{ - ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' - TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' - Certificate = $Cert -} - -Connect-Entra @params -``` - -### Example 8: App-only access: Using client secret credentials - -```powershell -$ClientSecretCredential = Get-Credential -Credential '00001111-aaaa-2222-bbbb-3333cccc4444' -# Enter client_secret in the password prompt. -Connect-Entra -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -ClientSecretCredential $ClientSecretCredential -``` - -This authentication method is ideal for background interactions. - -For more information on how to get credential, see [Get-Credential](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential) command. - -### Example 9: App-only access: Using managed identity: System-assigned managed identity - -```powershell -Connect-Entra -Identity -``` - -Uses an automatically managed identity on a service instance. The identity is tied to the lifecycle of a service instance. - -### Example 10: App-only access: Using managed identity: User-assigned managed identity - -```powershell -Connect-Entra -Identity -ClientId 'User_Assigned_Managed_identity_Client_Id' -``` - -Uses a user created managed identity as a standalone Azure resource. - -### Example 11: Connecting to an environment as a different identity - -```powershell -Connect-Entra -ContextScope 'Process' -``` - -```Output -Welcome to Microsoft Graph! -``` - -To connect as a different identity other than CurrentUser, specify the ContextScope parameter with the value Process. - -For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/microsoft.graph.entra/get-entracontext) command. - -### Example 12: Connecting to an environment or cloud - -```powershell -Get-EntraEnvironment -``` - -```Output -Name AzureADEndpoint GraphEndpoint Type ----- --------------- ------------- ---- -China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in -Global https://login.microsoftonline.com https://graph.microsoft.com Built-in -USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in -USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in -``` - -```powershell -Connect-Entra -Environment 'Global' -``` - -When you use Connect-Entra, you can choose to target other environments. By default, Connect-Entra targets the global public cloud. - -### Example 13: Sets the HTTP client timeout in seconds - -```powershell - Connect-Entra -ClientTimeout 60 -``` - -```Output -Welcome to Microsoft Graph! -``` - -This example Sets the HTTP client timeout in seconds. - -### Example 14: Hides the welcome message - -```powershell -Connect-Entra -NoWelcome -``` - -This example hides the welcome message. - -### Example 15: Allows for authentication using environment variables - -```powershell -Connect-Entra -EnvironmentVariable -``` - -This example allows for authentication using environment variables. - -## Parameters - -### -CertificateThumbprint - -Specifies the certificate thumbprint of a digital public key X.509 certificate of a user account that has permission to perform this action. - -```yaml -Type: System.String -Parameter Sets: AppCertificateParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientId - -Specifies the application ID of the service principal. - -```yaml -Type: System.String -Parameter Sets: UserParameterSet, IdentityParameterSet -Aliases: AppId, ApplicationId - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -```yaml -Type: System.String -Parameter Sets: AppCertificateParameterSet -Aliases: AppId, ApplicationId - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TenantId - -Specifies the ID of a tenant. - -If you don't specify this parameter, the account is authenticated with the home tenant. - -You must specify the TenantId parameter to authenticate as a service principal or when using Microsoft account. - -```yaml -Type: System.String -Parameter Sets: UserParameterSet, AppCertificateParameterSet, AppSecretCredentialParameterSet -Aliases: Audience, Tenant - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AccessToken - -Specifies a bearer token for Microsoft Entra service. Access tokens do time out and you have to handle their refresh. - -```yaml -Type: SecureString -Parameter Sets: AccessTokenParameterSet -Aliases: -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientTimeout - -Sets the HTTP client timeout in seconds. - -```yaml -Type: System.Double -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ContextScope - -Determines the scope of authentication context. This ContextScope accepts `Process` for the current process, or `CurrentUser` for all sessions started by user. - -```yaml -Type: ContextScope -Accepted values: Process, CurrentUser -Parameter Sets: UserParameterSet, AppCertificateParameterSet, IdentityParameterSet, AppSecretCredentialParameterSet, EnvironmentVariableParameterSet -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Environment - -The name of the national cloud environment to connect to. By default global cloud is used. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: EnvironmentName, NationalCloud -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoWelcome - -Hides the welcome message. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scopes - -An array of delegated permissions to consent to. - -```yaml -Type: System.String[] -Parameter Sets: UserParameterSet -Aliases: -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UseDeviceCode - -Use device code authentication instead of a browser control. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: UserParameterSet -Aliases: UseDeviceAuthentication, DeviceCode, DeviceAuth, Device -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Certificate - -An X.509 certificate supplied during invocation. - -```yaml -Type: X509Certificate2 -Parameter Sets: AppCertificateParameterSet -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CertificateSubjectName - -The subject distinguished name of a certificate. The certificate is retrieved from the current user's certificate store. - -```yaml -Type: System.String -Parameter Sets: AppCertificateParameterSet -Aliases: CertificateSubject, CertificateName -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientSecretCredential - -The PSCredential object provides the application ID and client secret for service principal credentials. For more information about the PSCredential object, type Get-Help Get-Credential. - -```yaml -Type: PSCredential -Parameter Sets: AppSecretCredentialParameterSet -Aliases: SecretCredential, Credential -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnvironmentVariable - -Allows for authentication using environment variables configured on the host machine. See - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: EnvironmentVariableParameterSet -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Identity - -Sign-in using a managed identity - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: IdentityParameterSet -Aliases: ManagedIdentity, ManagedServiceIdentity, MSI -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction - -The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break. - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Disconnect-Entra](Disconnect-Entra.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md deleted file mode 100644 index 4cf9324306..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Disconnect-Entra -description: This article provides details on the Disconnect-Entra Command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Disconnect-Entra - -schema: 2.0.0 ---- - -# Disconnect-Entra - -## Synopsis - -Disconnects the current session from a Microsoft Entra ID tenant. - -## Syntax - -```powershell -Disconnect-Entra - [] -``` - -## Description - -The Disconnect-Entra cmdlet disconnects the current session from a Microsoft Entra ID tenant. - -## Examples - -### Example 1: Disconnect your session from a tenant - -```powershell - Disconnect-Entra -``` - -```output -ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 -TenantId : bbbbcccc-1111-dddd-2222-eeee3333ffff -Scopes : {Agreement.ReadWrite.All, CustomSecAttributeDefinition.ReadWrite.All, TeamMember.Read.All...} -AuthType : AppOnly -TokenCredentialType : ClientCertificate -CertificateThumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00 -CertificateSubjectName : -Account : -AppName : MG_graph_auth -ContextScope : Process -Certificate : -PSHostVersion : 5.1.22621.2506 -ManagedIdentityId : -ClientSecret : -Environment : Global -``` - -This command disconnects your session from a tenant. - -## Parameters - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Connect-Entra](Connect-Entra.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md deleted file mode 100644 index 8ef326b326..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: Find-EntraPermission -description: This article provides details on the Find-EntraPermission command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Find-EntraPermission - -schema: 2.0.0 ---- - -# Find-EntraPermission - -## Synopsis - -Helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. - -## Syntax - -### Search - -```powershell -Find-EntraPermission - [-SearchString] - [-ExactMatch] - [-PermissionType ] - [-Online] - [-ProgressAction ] - [] -``` - -### All - -```powershell -Find-EntraPermission - [-PermissionType ] - [-Online] - [-All] - [-ProgressAction ] - [] -``` - -## Description - -The `Find-EntraPermission` cmdlet helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. - -## Examples - -### Example 1: Get a list of all Application permissions - -```powershell -Find-EntraPermission application -``` - -```Output -PermissionType: Delegated - -Id Consent Name Description --- ------- ---- ----------- -c79f8feb-a9db-4090-85f9-90d820caa0eb Admin Application.Read.All Allows the app to read applications and service principals on behalf of the signed-in user. -bdfbf15f-ee85-4955-8675-146e8e5296b5 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. - -PermissionType: Application - -Id Consent Name Description --- ------- ---- ----------- -9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 Admin Application.Read.All Allows the app to read all applications and service principals without a signed-in user. -1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals without a signed-in user. Does not allow management of consent grants. -18a4783c-866b-4cc7-a460-3d5e5662c884 Admin Application.ReadWrite.OwnedBy Allows the app to create other applications, and fully manage those applications (read, update, update application secrets and delete), without a signed-in user... -``` - -### Example 2. Get a list of permissions for the Read permissions - -```powershell -Find-EntraPermission application.Read | Format-List -``` - -```Output -Id : c79f8feb-a9db-4090-85f9-90d820caa0eb -PermissionType : Delegated -Consent : Admin -Name : Application.Read.All -Description : Allows the app to read applications and service principals on behalf of the signed-in user. - -Id : bdfbf15f-ee85-4955-8675-146e8e5296b5 -PermissionType : Delegated -Consent : Admin -Name : Application.ReadWrite.All -Description : Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. - -Id : 9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 -PermissionType : Application -Consent : Admin -Name : Application.Read.All -Description : Allows the app to read all applications and service principals without a signed-in user. -``` - -### Example 3. Search for permissions with exact match - -```powershell -Find-EntraPermission -SearchString 'User.Read.All' -ExactMatch -``` - -```Output - PermissionType: Delegated - -Id Consent Name Description --- ------- ---- ----------- -a154be20-db9c-4678-8ab7-66f6cc099a59 Admin User.Read.All Allows the app to read the full set of profile properties, reports, and ma… - - PermissionType: Application - -Id Consent Name Description --- ------- ---- ----------- -df021288-bdef-4463-88db-98f22de89214 Admin User.Read.All Allows the app to read user profiles without a signed in user. -``` - -This example demonstrates how to search for permissions that exactly match a specified permission name. - -### Example 4. Get all permissions of the specified type - -```powershell -Find-EntraPermission -PermissionType 'Delegated' -``` - -```Output -Id Consent Name Description --- ------- ---- ----------- -ebfcd32b-babb-40f4-a14b-42706e83bd28 Admin AccessReview.Read.All Allows the app to read access re… -e4aa47b9-9a69-4109-82ed-36ec70d85ff1 Admin AccessReview.ReadWrite.All Allows the app to read, update, … -5af8c3f5-baca-439a-97b0-ea58a435e269 Admin AccessReview.ReadWrite.Membership Allows the app to read, -``` - -This example shows how to get all permissions of a specified type, for example, `Delegated` or `Application` permissions. - -## Parameters - -### -SearchString - -Specifies the filter for the permissions, for example, domain and scope. - -```yaml - -Type: System.String -Required: True -Position: Named -Default value: None -Accept pipeline input: True -Accept wildcard characters: False -``` - -### -All - -Sets if the cmdlet returns all parameters. - -```yaml - -Type: System.Management.Automation.SwitchParameter -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExactMatch - -Sets if Search String should be an exact match. - -```yaml - -Type: System.Management.Automation.SwitchParameter -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Online - -Use the -Online parameter with -SearchString in Find-MgGraphPermission to fetch the latest permissions from Microsoft Graph before searching. This ensures Find-MgGraphPermission returns accurate results by including any new permissions added for recent APIs. The command uses the existing Microsoft Graph connection established by Connect-MgGraph. If your connection lacks permissions to access this data or if there’s no network connectivity, the command fails. Once updated, Find-MgGraphPermission will continue using the refreshed permission list for future searches, even without the -Online parameter. - -```yaml - -Type: System.Management.Automation.SwitchParameter -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PermissionType - -Specifies the type of Permission, for example, Delegated or Application. - -```yaml - -Type: System.String -Required: False -Position: Named -Default value: Any -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction - -Specifics the progra option. - -```yaml -Type: System.Management.Automation.SwitchParameter -Aliases: progra -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md deleted file mode 100644 index 86085f8469..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Get-EntraContext -description: This article provides details on the Get-EntraContext command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContext - -schema: 2.0.0 ---- - -# Get-EntraContext - -## Synopsis - -Retrieve information about your current session - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraContext - [-ProgressAction ] - [] -``` - -## Description - -`Get-EntraContext` is used to retrieve the details about your current session, which include: - -- ClientID -- TenantID -- Certificate Thumbprint -- Scopes consented to -- AuthType: Delegated or app-only -- AuthProviderType -- CertificateName -- Account -- AppName -- ContextScope -- Certificate -- PSHostVersion -- ClientTimeOut. - -`Get-EntraCurrentSessionInfo` is an alias for `Get-EntraContext`. - -## Examples - -### Example 1: Get the current session - -```powershell -Get-EntraContext -``` - -```Output -ClientId : 11112222-bbbb-3333-cccc-4444dddd5555 -TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee -CertificateThumbprint : -Scopes : {User.ReadWrite.All,...} -AuthType : Delegated -AuthProviderType : InteractiveAuthenticationProvider -CertificateName : -Account : SawyerM@Contoso.com -AppName : Microsoft Graph PowerShell -ContextScope : CurrentUser -Certificate : -PSHostVersion : 5.1.17763.1 -ClientTimeout : 00:05:00 -``` - -This example demonstrates how to retrieve the details of the current session. - -### Example 2: Get the current session scopes - -```powershell -Get-EntraContext | Select -ExpandProperty Scopes -``` - -```Output -AppRoleAssignment.ReadWrite.All -Directory.AccessAsUser.All -EntitlementManagement.ReadWrite.All -Group.ReadWrite.All -openid -Organization.Read.All -profile -RoleManagement.ReadWrite.Directory -User.Read -User.ReadWrite.All -``` - -Retrieves all scopes. - -## Parameters - -### -ProgressAction - -Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md deleted file mode 100644 index c5cf3a9139..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Get-EntraEnvironment -description: This article provides details on the Get-EntraEnvironment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraEnvironment - -schema: 2.0.0 ---- - -# Get-EntraEnvironment - -## Synopsis - -Gets global public Environments. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraEnvironment - [] -``` - -### GetByName - -```powershell -Get-EntraEnvironment - -Name - [] -``` - -## Description - -When you use `Connect-Entra`, you can choose to target other environments. By default, `Connect-Entra` targets the global public cloud. - -## Examples - -### Example 1: Get a list of public cloud environments - -```powershell -Get-EntraEnvironment -``` - -```Output -Name AzureADEndpoint GraphEndpoint Type ----- --------------- ------------- ---- -Global https://login.microsoftonline.com https://graph.microsoft.com Built-in -China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in -USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in -USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in -Germany https://login.microsoftonline.de https://graph.microsoft.de Built-in -Canary https://login.microsoftonline.com https://canary.graph.microsoft.com User-defined -``` - -This command retrieves a list of global public Environments. - -### Example 2: Get a specific environment created - -```powershell -Get-EntraEnvironment -Name 'Global' -``` - -```Output -Name AzureADEndpoint GraphEndpoint Type ----- --------------- ------------- ---- -Global https://login.microsoftonline.com https://graph.microsoft.com Built-in -``` - -This command retrieves an environment with the specified name. - -## Parameters - -### -Name - -Specifies the name of an environment - -```yaml - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraEnvironment](Add-EntraEnvironment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md deleted file mode 100644 index 2017e7aa8a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Reset-EntraStrongAuthenticationMethodByUpn -description: This article provides details on the Reset-EntraStrongAuthenticationMethodByUpn command. - - -ms.topic: reference -ms.date: 08/20/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn - -schema: 2.0.0 ---- - -# Reset-EntraStrongAuthenticationMethodByUpn - -## Synopsis - -Resets the strong authentication method using the User Principal Name (UPN). - -## Syntax - -```powershell -Reset-EntraStrongAuthenticationMethodByUpn - -UserPrincipalName - [] -``` - -## Description - -The `Reset-EntraStrongAuthenticationMethodByUpn` cmdlet resets the strong authentication method by using the User Principal Name (UPN). - -## Examples - -### Example 1: Resets the strong authentication method by using the User Principal Name - -```powershell -Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite', 'UserAuthenticationMethod.ReadWrite.All' -Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'SawyerM@contoso.com' -``` - -This example demonstrates how to reset the strong authentication method by using the User Principal Name (UPN). - -- `-UserPrincipalName` parameter specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. - -## Parameters - -### -UserPrincipalName - -Specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md deleted file mode 100644 index 3a375cf615..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Revoke-EntraSignedInUserAllRefreshToken -description: This article provides details on the Revoke-EntraSignedInUserAllRefreshToken command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken - -schema: 2.0.0 ---- - -# Revoke-EntraSignedInUserAllRefreshToken - -## Synopsis - -Invalidates the refresh tokens issued to applications for the current user. - -## Syntax - -```powershell -Revoke-EntraSignedInUserAllRefreshToken - [] -``` - -## Description - -The `Revoke-EntraSignedInUserAllRefreshToken` cmdlet invalidates all the refresh tokens issued to applications for a user (and session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. - -The user or an administrator typically performs this operation if the user's device is lost or stolen. This action prevents access to the organization's data on the device by requiring the user to sign in again to all previously consented applications, regardless of the device. - -Note: If the application attempts to redeem a delegated access token for this user using an invalidated refresh token, the application receives an error. When this happens, the application needs to acquire a new refresh token by making a request to the authorized endpoint, which forces the user to sign in. - -After you run this command, a small delay of a few minutes can occur before tokens are revoked. - -## Examples - -### Example 1: Revoke refresh tokens for the current user - -```powershell -Connect-Entra -Scopes 'User.RevokeSessions.All' -Revoke-EntraSignedInUserAllRefreshToken -``` - -```Output -Value ------ -True -``` - -This command revokes the tokens for the current user. - -## Parameters - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Revoke-EntraUserAllRefreshToken](Revoke-EntraUserAllRefreshToken.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md deleted file mode 100644 index 364ce1fa3a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Revoke-EntraUserAllRefreshToken -description: This article provides details on the Revoke-EntraUserAllRefreshToken command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken -schema: 2.0.0 ---- - -# Revoke-EntraUserAllRefreshToken - -## Synopsis - -Invalidates the refresh tokens issued to applications for a user. - -## Syntax - -```powershell -Revoke-EntraUserAllRefreshToken - -UserId - [] -``` - -## Description - -The `Revoke-EntraUserAllRefreshToken` cmdlet invalidates the refresh tokens issued to applications for a user. - -The cmdlet also invalidates tokens issued to session cookies in a browser for the user. - -The cmdlet operates by resetting the refreshTokensValidFromDateTime user property to the current date and time. - -This operation is usually performed by the user or an administrator if the user's device is lost or stolen. It blocks access to the organization's data by requiring the user to sign in again to all previously authorized applications, regardless of the device. - -## Examples - -### Example 1: Revoke refresh tokens for a user - -```powershell -Connect-Entra -Scopes 'User.RevokeSessions.All' -Revoke-EntraUserAllRefreshToken -UserId 'SawyerM@contoso.com' -``` - -```Output -Value ------ -True -``` - -This example demonstrates how to revoke the tokens for the specified user. - -- `-UserId` parameter specifies the unique identifier of a user. - -## Parameters - -### -UserId - -Specifies the unique ID of a user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Revoke-EntraSignedInUserAllRefreshToken](Revoke-EntraSignedInUserAllRefreshToken.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md deleted file mode 100644 index 7049899b74..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Add-EntraAdministrativeUnitMember -description: This article provides details on the Add-EntraAdministrativeUnitMember command. - - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember - -schema: 2.0.0 ---- - -# Add-EntraAdministrativeUnitMember - -## Synopsis - -Adds an administrative unit member. - -## Syntax - -```powershell -Add-EntraAdministrativeUnitMember - -RefObjectId - -AdministrativeUnitId - [] -``` - -## Description - -The `Add-EntraAdministrativeUnitMember` cmdlet adds a Microsoft Entra ID administrative unit member. - -Administrative units enable more granular management of permissions and access, particularly in large organizations or where administrative responsibilities are divided across departments or regions. - -To add a user, group, or device to an administrative unit, the calling principal must be assigned at least the Privileged Role Administrator Microsoft Entra role. - -## Examples - -### Example 1: Add user as an administrative unit member - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$User = Get-EntraUser -UserId 'SawyerM@contoso.com' -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - RefObjectId = $User.ObjectId -} -Add-EntraAdministrativeUnitMember @params -``` - -This example shows how to add an administrative unit member. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit ID. You can use the command `Get-EntraUser` to get user ID. - -- `AdministrativeUnitId` parameter specifies the ID of an administrative unit. -- `RefObjectId` parameter specifies the ID of the user or group you want to add as a member of the administrative unit. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of a Microsoft Entra ID administrative unit. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the unique ID of the specific Microsoft Entra ID object that are as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) - -[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md deleted file mode 100644 index 59f40bdbf9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: Add-EntraCustomSecurityAttributeDefinitionAllowedValue -description: This article provides details on the Add-EntraCustomSecurityAttributeDefinitionAllowedValue command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue -schema: 2.0.0 ---- - -# Add-EntraCustomSecurityAttributeDefinitionAllowedValue - -## Synopsis - -Adds a predefined value for a custom security attribute definition. - -## Syntax - -```powershell -Add-EntraCustomSecurityAttributeDefinitionAllowedValue - -CustomSecurityAttributeDefinitionId - -Id - -IsActive - [] -``` - -## Description - -The `Add-EntraCustomSecurityAttributeDefinitionAllowedValue` adds a predefined value for a Microsoft Entra ID custom security attribute definition. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. - -## Examples - -### Example 1: Add a predefined value for a Microsoft Entra ID custom security attribute definition - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$CustomSecurityAttributeDefinitionId = (Get-EntraCustomSecurityAttributeDefinition -Id '').Id -$params = @{ - CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinitionId - Id = 'Alpine' - IsActive = $true -} -Add-EntraCustomSecurityAttributeDefinitionAllowedValue @params -``` - -```Output - -Id IsActive --- -------- -Alpine True -``` - -This example adds a predefined value to a custom security attribute definition. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use the command `Get-EntraCustomSecurityAttributeDefinition` to get the ID. -- `-Id` parameter specifies the identifier for the predefined value. -- `-IsActive` parameter specifies the predefined value is active or deactivated. - -## Parameters - -### -CustomSecurityAttributeDefinitionId - -The unique identifier for a custom security attribute definition in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters aren't. This identifier is case sensitive, can't be changed later, and is required. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsActive - -Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any another supported directory objects. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -`Add-EntraCustomSecurityAttributeDefinitionAllowedValues` is an alias for `Add-EntraCustomSecurityAttributeDefinitionAllowedValue`. - -## Related Links - -[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) - -[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md deleted file mode 100644 index b0f4c794f1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: Add-EntraDeviceRegisteredOwner -description: This article provides details on the Add-EntraDeviceRegisteredOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner - -schema: 2.0.0 ---- - -# Add-EntraDeviceRegisteredOwner - -## Synopsis - -Adds a registered owner for a device. - -## Syntax - -```powershell -Add-EntraDeviceRegisteredOwner - -DeviceId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraDeviceRegisteredOwner` cmdlet adds a registered owner for a Microsoft Entra ID device. - -## Examples - -### Example 1: Add a user as a registered user - -```powershell -Connect-Entra -Scopes 'Device.ReadWrite.All' -$User = Get-EntraUser -UserId 'SawyerM@contoso.com' -$Device = Get-EntraDevice -SearchString '' -$params = @{ - DeviceId = $Device.ObjectId - RefObjectId = $User.ObjectId -} -Add-EntraDeviceRegisteredOwner @params -``` - -This example shows how to add a registered user to a device. - -- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. - -- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. - -## Parameters - -### -DeviceId - -Specifies the object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Active Directory object to add. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) - -[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md deleted file mode 100644 index 354cbf34c6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Add-EntraDeviceRegisteredUser -description: This article provides details on the Add-EntraDeviceRegisteredUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser - -schema: 2.0.0 ---- - -# Add-EntraDeviceRegisteredUser - -## Synopsis - -Adds a registered user for a device. - -## Syntax - -```powershell -Add-EntraDeviceRegisteredUser - -DeviceId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraDeviceRegisteredUser` cmdlet adds a registered user for a Microsoft Entra ID device. - -## Examples - -### Example 1: Add a user as a registered user - -```powershell -Connect-Entra -Scopes 'Device.ReadWrite.All' -$User = Get-EntraUser -UserId 'SawyerM@contoso.com' -$Device = Get-EntraDevice -SearchString '' -$params = @{ - DeviceId = $Device.ObjectId - RefObjectId = $User.ObjectId -} -Add-EntraDeviceRegisteredUser @params -``` - -This example shows how to add a registered user to a device. - -- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. - -- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. - -## Parameters - -### -DeviceId - -Specifies the ID of the device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDevice](Get-EntraDevice.md) - -[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) - -[Get-EntraUser](Get-EntraUser.md) - -[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md deleted file mode 100644 index d163b40171..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Add-EntraDirectoryRoleMember -description: This article provides details on the Add-EntraDirectoryRoleMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember - -schema: 2.0.0 ---- - -# Add-EntraDirectoryRoleMember - -## Synopsis - -Adds a member to a directory role. - -## Syntax - -```powershell -Add-EntraDirectoryRoleMember - -DirectoryRoleId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraDirectoryRoleMember` cmdlet adds a member to a Microsoft Entra ID role. - -## Examples - -### Example 1: Add a member to a Microsoft Entra ID role - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$params = @{ - DirectoryRoleId = '019ea7a2-1613-47c9-81cb-20ba35b1ae48' - RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' -} -Add-EntraDirectoryRoleMember @params -``` - -This example adds a member to a directory role. - -- `DirectoryRoleId` parameter specifies the ID of the directory role to which the member is added. Use the Get-EntraDirectoryRole command to retrieve the details of the directory role. -- `RefObjectId` parameter specifies the ID of Microsoft Entra ID object to assign as owner/manager/member. - -## Parameters - -### -DirectoryRoleId - -Specifies the ID of a directory role in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) - -[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md deleted file mode 100644 index 2919fc8285..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Add-EntraScopedRoleMembership -description: This article provides details on the Add-EntraScopedRoleMembership command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership - -schema: 2.0.0 ---- - -# Add-EntraScopedRoleMembership - -## Synopsis - -Assign a Microsoft Entra role with an administrative unit scope. - -## Syntax - -```powershell -Add-EntraScopedRoleMembership - -AdministrativeUnitId - [-RoleObjectId ] - [-RoleMemberInfo ] - [] -``` - -## Description - -The `Add-EntraScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership. - -For delegated scenarios, the calling user needs at least the Privileged Role Administrator Microsoft Entra role. - -## Examples - -### Example 1: Add a scoped role membership to an administrative unit - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$User = Get-EntraUser -SearchString 'MarkWood' -$Role = Get-EntraDirectoryRole -Filter "DisplayName eq ''" -$Unit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo -$RoleMember.ObjectId = $User.ObjectId -$params = @{ - AdministrativeUnitId = $Unit.ObjectId - RoleObjectId = $Role.ObjectId - RoleMemberInfo = $RoleMember -} -Add-EntraScopedRoleMembership @params -``` - -```Output -Id AdministrativeUnitId RoleId --- -------------------- ------ -dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -The example shows how to add a user to the specified role within the specified administrative unit. - -- `-AdministrativeUnitId` Parameter specifies the ID of an administrative unit. -- `-RoleObjectId` Parameter specifies the ID of a directory role. -- `-RoleMemberInfo` Parameter specifies a RoleMemberInfo object. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RoleMemberInfo - -Specifies a RoleMemberInfo object. - -```yaml -Type: System.RoleMemberInfo -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RoleObjectId - -Specifies the ID of a directory role. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) - -[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md deleted file mode 100644 index da02de22be..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Confirm-EntraDomain -description: This article provides details on the Confirm-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Confirm-EntraDomain - -schema: 2.0.0 ---- - -# Confirm-EntraDomain - -## Synopsis - -Validate the ownership of a domain. - -## Syntax - -```powershell -Confirm-EntraDomain - -Name - [-CrossCloudVerificationCode ] - [] -``` - -## Description - -The `Confirm-EntraDomain` cmdlet validates the ownership of a Microsoft Entra ID domain. - -The work or school account needs to belong to at least the **Domain Name Administrator** Microsoft Entra role. - -## Examples - -### Example 1: Confirm the domain - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Confirm-EntraDomain -Name Contoso.com -``` - -This example verifies a domain and updates its status to `verified`. - -### Example 2: Confirm the domain with a cross cloud verification code - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Confirm-EntraDomain -Name Contoso.com -CrossCloudVerificationCode ms84324896 -``` - -This example confirms a domain in dual federation scenarios. - -## Parameters - -### -Name - -Specifies the name of the domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -CrossCloudVerificationCode - -The cross-cloud domain verification code. - -```yaml -Type: CrossCloudVerificationCodeBody -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDomain](Get-EntraDomain.md) - -[New-EntraDomain](New-EntraDomain.md) - -[Remove-EntraDomain](Remove-EntraDomain.md) - -[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md deleted file mode 100644 index f1d4bcccd1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Enable-EntraDirectoryRole -description: This article provides details on the Enable-EntraDirectoryRole command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraDirectoryRole - -schema: 2.0.0 ---- - -# Enable-EntraDirectoryRole - -## Synopsis - -Activates an existing directory role in Microsoft Entra ID. - -## Syntax - -```powershell -Enable-EntraDirectoryRole - [-RoleTemplateId ] - [] -``` - -## Description - -The `Enable-EntraDirectoryRole` cmdlet activates an existing directory role in Microsoft Entra ID. - -The Company Administrators and the default user directory roles (User, Guest User, and Restricted Guest User) are activated by default. To access and assign members to other directory roles, you must first activate them using their corresponding directory role template ID. - -## Examples - -### Example 1: Enable a directory role - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$InviterRole = Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Guest Inviter'} -Enable-EntraDirectoryRole -RoleTemplateId $InviterRole.ObjectId -``` - -```Output -DeletedDateTime Id Description DisplayName RoleTemplateId ---------------- -- ----------- ----------- -------------- - b5baa59b-86ab-4053-ac3a-0396116d1924 Guest Inviter has access to invite guest users. Guest Inviter 92ed04bf-c94a-4b82-9729-b799a7a4c178 -``` - -The example shows how to enable the directory role. - -You can use `Get-EntraDirectoryRoleTemplate` to fetch a specific directory role to activate. - -- `RoleTemplateId` parameter specifies the ID of the role template to enable. - -## Parameters - -### -RoleTemplateId - -The ID of the Role template to enable. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For additional details see [Activate directoryRole](/graph/api/directoryrole-post-directoryroles). - -## Related Links - -[Get-EntraDirectoryRole](Get-EntraDirectoryRole.md) - -[Get-EntraDirectoryRoleTemplate](Get-EntraDirectoryRoleTemplate.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md deleted file mode 100644 index 9271fdef45..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Get-CrossCloudVerificationCode -description: This article provides details on the Get-CrossCloudVerificationCode command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode - -schema: 2.0.0 ---- - -# Get-CrossCloudVerificationCode - -## Synopsis -Gets the verification code used to validate the ownership of the domain in another connected cloud. -Important: Only applies to a verified domain. - -## Syntax - -```powershell -Get-CrossCloudVerificationCode - -Name - [] -``` - -## Description - -## Examples - -### Example 1: Get the cross cloud verification code -```powershell -PS C:\>Get-CrossCloudVerificationCode -Name Contoso.com -``` - -This command returns a string that can be used to enable cross cloud federation scenarios. - -## Parameters - -### -Name -Specifies the name of a domain. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.GetCrossCloudVerificationCodeResponse -## Notes - -## RELATED LINKS \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md deleted file mode 100644 index d6e6628eca..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Get-EntraAccountSku -description: This article provides details on the Get-EntraAccountSku command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAccountSku - -schema: 2.0.0 ---- - -# Get-EntraAccountSku - -## Synopsis - -Retrieves all the SKUs for a company. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraAccountSku - [] -``` - -### GetById - -```powershell -Get-EntraAccountSku - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraAccountSku` retrieves the list of commercial subscriptions acquired by an organization. - -For a list of license names in the Microsoft Entra or Microsoft 365 admin centers and their corresponding Microsoft Graph `skuId` and `skuPartNumber` properties, refer to the [mapping information](https://learn.microsoft.com/entra/identity/users/licensing-service-plan-reference). - -## Examples - -### Example 1: Gets a list of SKUs - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraAccountSku -``` - -```Output -Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber --- --------- ----------- --------- ---------------- ------------- ----- ------- -eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… -ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… -dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… -``` - -This command returns a list of SKUs. - -### Example 2: Gets a list of SKUs by TenantId - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraAccountSku -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -``` - -```Output -Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber --- --------- ----------- --------- ---------------- ------------- ----- ------- -eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… -ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… -dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… -``` - -This command returns a list of SKUs for a specified tenant. - -- `-TenantId` parameter specifies the unique ID of the tenant. - -## Parameters - -### -TenantId - -The unique ID of the tenant to perform the operation on. -If this isn't provided, then the value will default to the tenant of the current user. -This parameter is only applicable to partner users. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md deleted file mode 100644 index 0c85fb6da1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md +++ /dev/null @@ -1,237 +0,0 @@ ---- -title: Get-EntraAdministrativeUnit -description: This article provides details on the Get-EntraAdministrativeUnit command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit -schema: 2.0.0 ---- - -# Get-EntraAdministrativeUnit - -## Synopsis - -Gets an administrative unit. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraAdministrativeUnit - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraAdministrativeUnit - -AdministrativeUnitId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraAdministrativeUnit` cmdlet gets a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameter to get a specific administrative unit. - -## Examples - -### Example 1: Get all administrative units - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName - cccccccc-2222-3333-4444-dddddddddddd testdemo test1 - bbbbbbbb-1111-2222-3333-cccccccccccc TestAU - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 -``` - -This command gets all the administrative units. - -### Example 2: Get all administrative units using '-All' parameter - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -All -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName - cccccccc-2222-3333-4444-dddddddddddd testdemo test1 - bbbbbbbb-1111-2222-3333-cccccccccccc TestAU - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 -``` - -This command gets all the administrative units. - -### Example 3: Get a specific administrative unit - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -AdministrativeUnitId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName -``` - -This example returns the details of the specified administrative unit. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -### Example 4: Get administrative units filter by display name - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -Filter "DisplayName eq 'DAU-Test'" -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test -``` - -This example list of administrative units containing display name with the specified name. - -### Example 5: Get top one administrative unit - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -Top 1 -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test -``` - -This example returns the specified top administrative units. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter filters which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) - -[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) - -[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md deleted file mode 100644 index 99c4fe82d9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md +++ /dev/null @@ -1,193 +0,0 @@ ---- -title: Get-EntraAdministrativeUnitMember -description: This article provides details on the Get-EntraAdministrativeUnitMember command. - - -ms.topic: reference -ms.date: 07/30/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember - -schema: 2.0.0 ---- - -# Get-EntraAdministrativeUnitMember - -## Synopsis - -Gets a member of an administrative unit. - -## Syntax - -```powershell -Get-EntraAdministrativeUnitMember - -AdministrativeUnitId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraAdministrativeUnitMember` cmdlet gets a member of a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameters to retrieve an administrative unit member. - -In delegated scenarios with work or school accounts, the signed-in user must either be a member user or be assigned a supported Microsoft Entra role, or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: - -- Directory Readers: Read basic properties on administrative units -- Global Reader: Read all properties of administrative units, including members -- Privileged Role Administrator: Create and manage administrative units (including members) - -## Examples - -### Example 1: Get an administrative unit member by AdministrativeUnitId - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -ffffffff-5555-6666-7777-aaaaaaaaaaaa -``` - -This example returns the list of administrative unit members from specified administrative unit AdministrativeUnitId. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -### Example 2: Get all administrative unit members by AdministrativeUnitId - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -ffffffff-5555-6666-7777-aaaaaaaaaaaa -``` - -This example returns the list of all administrative unit members from specified administrative unit AdministrativeUnitId. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -### Example 3: Get top three administrative unit members by AdministrativeUnitId - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -Top 3 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example returns top three administrative unit members from specified administrative unit AdministrativeUnitId. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) - -[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md deleted file mode 100644 index 7b235ab88d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: Get-EntraAttributeSet -description: This article provides details on the Get-EntraAttributeSet command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAttributeSet - -schema: 2.0.0 ---- - -# Get-EntraAttributeSet - -## Synopsis - -Gets a list of attribute sets. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraAttributeSet - [] -``` - -### GetById - -```powershell -Get-EntraAttributeSet - -AttributeSetId - [] -``` - -## Description - -The `Get-EntraAttributeSet` cmdlet gets a list of Microsoft Entra ID attribute sets. - -In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The supported roles for this operation are: - -- Attribute Assignment Reader -- Attribute Definition Reader -- Attribute Assignment Administrator -- Attribute Definition Administrator - -By default, other administrator roles cannot read, define, or assign custom security attributes. - -## Examples - -### Example 1: Get an all attribute sets - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -Get-EntraAttributeSet -``` - -```Output -Id Description MaxAttributesPerSet --- ----------- ------------------- -Engineering Attributes for cloud engineering team 25 -Contoso Attributes for Contoso 25 -``` - -This example returns all attribute sets. - -### Example 2: Get an attribute sets - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -Get-EntraAttributeSet -AttributeSetId 'Testing' -``` - -```Output -Id Description MaxAttributesPerSet --- ----------- ------------------- -Testing Attributes for engineering team 10 -``` - -This example demonstrates how to retrieve an attribute set by Id. - -- `AttributeSetId` parameter specifies the unique identifier for the attribute set within a tenant. - -## Parameters - -### -AttributeSetId - -Unique identifier for the attribute set within a tenant. - -This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraAttributeSet](New-EntraAttributeSet.md) - -[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md deleted file mode 100644 index fb0bcb0cb5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: Get-EntraContact -description: This article provides details on the Get-EntraContact command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContact - -schema: 2.0.0 ---- - -# Get-EntraContact - -## Synopsis - -Gets a contact from Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraContact - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraContact - -OrgContactId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraContact` cmdlet gets a contact from Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve all contact objects in the directory - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 -Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 -Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 -``` - -This example retrieves all contact objects in the directory. - -### Example 2: Retrieve specific contact object in the directory - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -OrgContactId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -``` - -This example retrieves specified contact in the directory. - -- `-OrgContactId` parameter specifies the contact Id. - -### Example 3: Retrieve all contacts objects in the directory - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -All -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 -Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 -Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 -``` - -This example retrieves all the contacts in the directory. - -### Example 4: Retrieve top two contacts objects in the directory - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -Top 2 -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 -``` - -This example retrieves top two contacts in the directory. - -### Example 5: Retrieve all contacts objects in the directory filter by DisplayName - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 -Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 -Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 -``` - -This example retrieves contacts having the specified display name. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OrgContactId - -Specifies the ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraContact](Remove-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md deleted file mode 100644 index 5ba96a392d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -title: Get-EntraContactDirectReport -description: This article provides details on the Get-EntraContactDirectReport command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactDirectReport - -schema: 2.0.0 ---- - -# Get-EntraContactDirectReport - -## Synopsis - -Get the direct reports for a contact. - -## Syntax - -```powershell -Get-EntraContactDirectReport - -OrgContactId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraContactDirectReport` cmdlet gets the direct reports for a contact. - -## Examples - -### Example 1: Get the direct reports of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraBetaContact -Top 1 -Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -``` - -This example shows how to retrieve direct reports for an organizational contact. - -You can use the command `Get-EntraBetaContact` to get organizational contact. - -- `-OrgContactId` parameter specifies the contact Id. - -### Example 2: Get all direct reports of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraBetaContact -Top 1 -Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -All -``` - -This example shows how to retrieve all direct reports for an organizational contact. - -- `-OrgContactId` parameter specifies the contact Id. - -### Example 3: Get top two direct reports of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraBetaContact -Top 1 -Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -Top 2 -``` - -This example shows how to retrieve top two direct reports for an organizational contact. - -- `-OrgContactId` parameter specifies the contact Id. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OrgContactId - -Specifies the ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md deleted file mode 100644 index 9aba156048..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: Get-EntraContactManager -description: This article provides details on the Get-EntraContactManager command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactManager - -schema: 2.0.0 ---- - -# Get-EntraContactManager - -## Synopsis - -Gets the manager of a contact. - -## Syntax - -```powershell -Get-EntraContactManager - -OrgContactId - [-Property ] - [] -``` - -## Description - -The `Get-EntraContactManager` cmdlet gets the manager of a contact in Microsoft Entra ID. - -## Examples - -### Example 1: Get the manager of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Top 1 -Get-EntraContactManager -OrgContactId $Contact.ObjectId -``` - -The example demonstrates how to retrieve the manager of a contact. You can use the command `Get-EntraContact` to get organizational contact. - -- `-OrgContactId` parameter specifies the contact Id. - -## Parameters - -### -OrgContactId - -Specifies the ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: OrgContactId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md deleted file mode 100644 index e09631eec8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: Get-EntraContactMembership -description: This article provides details on the Get-EntraContactMembership command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactMembership - -schema: 2.0.0 ---- - -# Get-EntraContactMembership - -## Synopsis - -Get a contact membership. - -## Syntax - -```powershell -Get-EntraContactMembership - -OrgContactId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraContactMembership` cmdlet gets a contact membership in Microsoft Entra ID. - -This command is useful to administrators who need to understand which groups, roles, or administrative units a particular contact belongs to. This can be important for troubleshooting access issues, auditing memberships, and ensuring that contact memberships are correctly configured. - -## Examples - -### Example 1: Get the memberships of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -Get-EntraContactMembership -OrgContactId $Contact.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb -bbbbbbbb-7777-8888-9999-cccccccccccc -``` - -This command gets all the memberships for specified contact. - -### Example 2: Get all memberships of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -Get-EntraContactMembership -OrgContactId $Contact.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb -bbbbbbbb-7777-8888-9999-cccccccccccc -``` - -This command gets all the memberships for specified contact. - -### Example 3: Get top two memberships of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -Get-EntraContactMembership -OrgContactId $Contact.ObjectId -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb -``` - -This command gets top two memberships for specified contact. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OrgContactId - -Specifies the ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md deleted file mode 100644 index ab173d765b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -title: Get-EntraContactThumbnailPhoto -description: This article provides details on the Get-EntraContactThumbnailPhoto command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto - -schema: 2.0.0 ---- - -# Get-EntraContactThumbnailPhoto - -## Synopsis - -Retrieves the thumbnail photo of a contact. - -## Syntax - -```powershell -Get-EntraContactThumbnailPhoto - -ObjectId - [-FilePath ] - [-FileName ] - [-View ] - [] -``` - -## Description - -Retrieves the thumbnail photo of a contact. - -## Examples - -### Example 1: Get the memberships of a contact - -```powershell -Connect-Entra -Scopes 'Contacts.Read' -Get-EntraContactThumbnailPhoto -ObjectId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```output -Tag : -PhysicalDimension : {Width=279, Height=390} -Size : {Width=279, Height=390} -Width : 279 -Height : 390 -HorizontalResolution : 96 -VerticalResolution : 96 -Flags : 77840 -RawFormat : [ImageFormat: aaaa0000-bb11-2222-33cc-444444dddddd] -PixelFormat : Format24bppRgb -Palette : System.Drawing.Imaging.ColorPalette -FrameDimensionsList : {eeee4444-ff55-6666-77aa-888888bbbbbb} -PropertyIdList : {274, 305, 306, 36867...} -PropertyItems : {274, 305, 306, 36867...} -``` - -This example retrieves the thumbnail photo of the contact object specified with the object ID parameter. - -## Parameters - -### -FileName - -When provided, the cmdlet writes a copy of the thumbnail photo to this filename. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -FilePath - -When provided, the cmdlet writes a copy of the thumbnail photo to this file path using a random filename. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -The object ID of the contact for which the thumbnail photo is retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -View - -If this parameter value is set to $True, display the retrieved thumbnail photo in a new window. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Boolean - -## Outputs - -### System.Object - -## Notes - -## RELATED LINKS diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md deleted file mode 100644 index c65dae7c2b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: Get-EntraContract -description: This article provides details on the Get-EntraContract command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContract - -schema: 2.0.0 ---- - -# Get-EntraContract - -## Synopsis - -Gets a contract. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraContract - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraContract - -ContractId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraContract` cmdlet gets a contract information associated to a partner tenant. - -The contract object contains the following attributes: - -- `contractType` - type of the contract. - -Possible values are: - -1. SyndicationPartner - indicates a partner that exclusively resells and manages O365 and Intune for this customer. -They resell and support their customers. -1. BreadthPartner - indicates that the partner has the ability to provide administrative support for this customer. -However the partner isn't allowed to resell to the customer. -1. ResellerPartner - indicates a partner that is similar to a syndication partner, except that it doesn't have exclusive access to a tenant. In the syndication case, the customer can't buy additional direct subscriptions from Microsoft or from other partners. - -- `customerContextId` - unique identifier for the customer tenant referenced by this partnership. - -Corresponds to the ObjectId property of the customer tenant's TenantDetail object. - -- `defaultDomainName` - a copy of the customer tenant's default domain name. -The copy is made when the partnership with the customer is established. -It isn't automatically updated if the customer tenant's default domain name changes. - -- `deletionTimestamp` - this property isn't valid for contracts and always returns null. - -- `displayName` - a copy of the customer tenant's display name. -The copy is made when the partnership with the customer is established. -It isn't automatically updated if the customer tenant's display name changes. - -- `objectType` - a string that identifies the object type. The value is always `Contract`. - -- `ContractId` - the unique identifier for the partnership. - -## Examples - -### Example 1: Get all contracts in the directory - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraContract -``` - -This command gets all contracts in the Microsoft Entra ID. - -### Example 2: Get top two contracts in the directory - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraContract -Top 2 -``` - -This command gets top two contracts in the Microsoft Entra ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ContractId - -Specifies the ID of a contract. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md deleted file mode 100644 index ec88ceccfd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: Get-EntraCustomSecurityAttributeDefinition -description: This article provides details on the Get-EntraCustomSecurityAttributeDefinition command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition -schema: 2.0.0 ---- - -# Get-EntraCustomSecurityAttributeDefinition - -## Synopsis - -Gets a list of custom security attribute definitions. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraCustomSecurityAttributeDefinition - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraCustomSecurityAttributeDefinition - -Id - [-Property ] - [] -``` - -## Description - -Gets a list of Microsoft Entra ID custom security attribute definitions. Specify `Id` parameter to get a list of custom security attribute definitions. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following privileged roles are supported for this operation: - -- Attribute Assignment Reader -- Attribute Definition Reader -- Attribute Assignment Administrator -- Attribute Definition Administrator - -## Examples - -### Example 1: Get a list of all custom security attribute definitions - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' -Get-EntraCustomSecurityAttributeDefinition -``` - -```Output -Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly --- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- -Engineering_newvalue Engineering New Eng Value True True NewValue Available String False -Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False -``` - -This example returns all custom security attribute definitions. - -### Example 2: Get a specific custom security attribute definition - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' -Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_ProjectDate' -``` - -```Output -Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly --- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- -Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False -``` - - This example returns a specific custom security attribute definition. - -- `Id` parameter specifies the custom security attribute definition object ID. - -## Parameters - -### -Id - -The unique identifier of a Microsoft Entra ID custom security attribute definition object. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) - -[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md deleted file mode 100644 index e043e38f4b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: Get-EntraCustomSecurityAttributeDefinitionAllowedValue -description: This article provides details on the Get-EntraCustomSecurityAttributeDefinitionAllowedValue command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue -schema: 2.0.0 ---- - -# Get-EntraCustomSecurityAttributeDefinitionAllowedValue - -## Synopsis - -Gets the predefined value for a custom security attribute definition. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraCustomSecurityAttributeDefinitionAllowedValue - -CustomSecurityAttributeDefinitionId - [-Filter ] - [] -``` - -### GetById - -```powershell -Get-EntraCustomSecurityAttributeDefinitionAllowedValue - -CustomSecurityAttributeDefinitionId - -Id - [] -``` - -## Description - -The `Get-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdley gets the predefined value for a Microsoft Entra ID custom security attribute definition. Specify `CustomSecurityAttributeDefinitionId` parameter to get the predefined value custom security attribute definition. - -The signed-in user must be assigned one of the following directory roles: - -- Attribute Definition Reader -- Attribute Definition Administrator - -## Examples - -### Example 1: Get all predefined values - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' -Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $CustomSecurityAttributeDefinition.Id -``` - -```Output -Id IsActive --- -------- -Apline True -``` - -This example retrieves an all predefined values. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. - -### Example 2: Get predefined value with ID parameter - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' -$params = @{ - CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id - Id = 'Alpine' -} -Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params -``` - -```Output -id isActive --- -------- -Apline True -``` - -This example retrieves a specific predefined value. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. -- `-Id` parameter specifies the ID of Microsoft Entra ID Object. - -### Example 3: Get predefined value with Filter parameter - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' -$params = @{ - CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id - Filter = "Id eq 'Apline'" -} -Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params -``` - -```Output -id isActive --- -------- -Apline True -``` - -This example Get a predefined value with Filter. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. - -## Parameters - -### -CustomSecurityAttributeDefinitionId - -The unique identifier of a custom security attribute definition in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -Filter items by property values. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters are not. This identifier is case sensitive, cannot be changed later, and is required. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) - -[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md deleted file mode 100644 index 099bb99475..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: Get-EntraDeletedDirectoryObject -description: This article provides details on the Get-EntraDeletedDirectoryObject command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject - -schema: 2.0.0 ---- - -# Get-EntraDeletedDirectoryObject - -## Synopsis - -Retrieves a soft deleted directory object from the directory. - -## Syntax - -```powershell -Get-EntraDeletedDirectoryObject - -DirectoryObjectId - [-Property ] - [] -``` - -## Description - -The `Get-EntraDeletedDirectoryObject` cmdlet retrieves a soft deleted directory object from the directory. -Note that soft delete for groups is currently only implemented for Unified Groups (also known as -Office 365 Groups). - -## Examples - -### Example 1: Retrieve a deleted directory object. - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' -Get-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 2/2/2024 5:33:56 AM -``` - -This example shows how to retrieve the deleted directory object from the directory. - -- `-DirectoryObjectId` parameter specifies the Id of the directory object to retrieve. - -### Example 2: Retrieve a deleted directory object with more details. - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' -Get-EntraDeletedDirectoryObject -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' | Format-Table -Property Id, displayName, '@odata.type' -AutoSize -``` - -```Output -Id displayName @odata.type --- ----------- ----------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Entra PowerShell App #microsoft.graph.application -``` - -This example shows how to retrieve the deleted directory object details from the directory. - -- `-Id` parameter specifies the Id of the directory object to retrieve. - -## Parameters - -### -DirectoryObjectId - -The Id of the directory object to retrieve. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md deleted file mode 100644 index 9d6749d3d4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md +++ /dev/null @@ -1,271 +0,0 @@ ---- -title: Get-EntraDevice -description: This article provides details on the Get-EntraDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDevice - -schema: 2.0.0 ---- - -# Get-EntraDevice - -## Synopsis - -Gets a device from Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDevice - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraDevice - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDevice - -DeviceId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDevice` cmdlet gets a device from Microsoft Entra ID. Specify the `DeviceId` parameter to get a specific device. - -## Examples - -### Example 1: Get a device by ID - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example shows how to retrieve a device using its ID. - -### Example 2: Get all devices - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData - cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example demonstrates how to retrieve all devices from Microsoft Entra ID. - -### Example 3: Get top two devices - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -Top 2 -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData - cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example demonstrates how to retrieve top two devices from Microsoft Entra ID. - -### Example 4: Get a device by display name - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example demonstrates how to retrieve device using the display name. - -### Example 5: Get a device using display name - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -Filter "startsWith(DisplayName,'Woodgrove')" -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example demonstrates how to retrieve all the devices whose display name starts with the word `Woodgrove`. - -### Example 6: Search among retrieved devices - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -SearchString 'DESKTOP' -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example shows how to retrieve devices containing the word 'DESKTOP.' - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies the OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies the ID of a device in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetValue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraDevice](New-EntraDevice.md) - -[Remove-EntraDevice](Remove-EntraDevice.md) - -[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md deleted file mode 100644 index 1149f5438e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -title: Get-EntraDeviceRegisteredOwner -description: This article provides details on the Get-EntraDeviceRegisteredOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner - -schema: 2.0.0 ---- - -# Get-EntraDeviceRegisteredOwner - -## Synopsis - -Gets the registered owner of a device. - -## Syntax - -```powershell -Get-EntraDeviceRegisteredOwner - -DeviceId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDeviceRegisteredOwner` cmdlet gets the registered owner of a device in Microsoft Entra ID. Specify `DeviceId` parameter gets the registered owner of a device. - -## Examples - -### Example 1: Retrieve the registered owner of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -$DevId = (Get-EntraDevice -Top 1).ObjectId -Get-EntraDeviceRegisteredOwner -DeviceId $DevId -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example shows how to find the registered owner of a device.. - -- `-DeviceId` parameter specifies the device's ID. - -### Example 2: Retrieve the registered owner of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -cccccccc-2222-3333-4444-dddddddddddd -``` - -This command gets the registered owner of a device. - -- `-DeviceId` parameter specifies the device's ID - -### Example 3: Retrieve all the registered owners of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -All -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -cccccccc-2222-3333-4444-dddddddddddd -``` - -This command retrieves all the registered owners of a device. - -- `-DeviceId` parameter specifies the device's ID. - -### Example 4: Retrieve top one registered owner of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -Top 1 -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command retrieves all the registered owners of a device. - -- `-DeviceId` parameter specifies the device's ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies the ID of an object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) - -[Get-EntraDevice](Get-EntraDevice.md) - -[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md deleted file mode 100644 index 810e5ec600..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md +++ /dev/null @@ -1,180 +0,0 @@ ---- -title: Get-EntraDeviceRegisteredUser -description: This article provides details on the Get-EntraDeviceRegisteredUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser - -schema: 2.0.0 ---- - -# Get-EntraDeviceRegisteredUser - -## Synopsis - -Retrieve a list of users that are registered users of the device. - -## Syntax - -```powershell -Get-EntraDeviceRegisteredUser - -DeviceId - [-All ] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDeviceRegisteredUser` cmdlet gets a registered user for a Microsoft Entra ID device. Specify `DeviceId` parameter to get a registered user for a Microsoft Entra ID device. - -## Examples - -### Example 1: Retrieve the registered user of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -$DevId = (Get-EntraDevice -Top 1).ObjectId -Get-EntraDeviceRegisteredUser -DeviceId $DevId -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -``` - -This example demonstrates how to retrieve registered user for a specific Microsoft Entra ID device. - -### Example 2: Get all registered users of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -``` - -This example demonstrates how to retrieve all registered users for a specified device. - -- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. - -### Example 3: Get top two registered users of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example demonstrates how to retrieve top two registered users for the specified device. - -- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies an object ID of a device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) - -[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md deleted file mode 100644 index a771858b4b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Get-EntraDirSyncConfiguration -description: This article provides details on the Get-EntraDirSyncConfiguration command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration - -schema: 2.0.0 ---- - -# Get-EntraDirSyncConfiguration - -## Synopsis - -Gets the directory synchronization settings. - -## Syntax - -```powershell -Get-EntraDirSyncConfiguration - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraDirSyncConfiguration` cmdlet gets the directory synchronization settings. - -For delegated scenarios, the user needs to be assigned the Global Administrator role. - -## Examples - -### Example 1: Get directory synchronization settings - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -Get-EntraDirSyncConfiguration -``` - -```Output -AccidentalDeletionThreshold DeletionPreventionType ---------------------------- ---------------------- - 500 enabledForCount -``` - -This example gets directory synchronization settings. - -### Example 2: Get directory synchronization settings by TenantId - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -Get-EntraDirSyncConfiguration -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -``` - -```Output -AccidentalDeletionThreshold DeletionPreventionType ---------------------------- ---------------------- - 500 enabledForCount -``` - -This example gets directory synchronization settings by TenantId. - -- `-TenantId` Specifies the unique ID of the tenant. - -## Parameters - -### -TenantId - -The unique ID of the tenant for the operation. If TenantId isn't provided, it defaults to the current user's tenant. This parameter applies only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - -## Outputs - -## Notes - -## Related Links - -[Set-EntraDirSyncConfiguration](Set-EntraDirSyncConfiguration.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md deleted file mode 100644 index 6b0d0dcab6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: Get-EntraDirSyncFeature -description: This article provides details on the Get-EntraDirSyncFeature command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncFeature - -schema: 2.0.0 ---- - -# Get-EntraDirSyncFeature - -## Synopsis - -Checks the status of directory synchronization features for a tenant. - -## Syntax - -```powershell -Get-EntraDirSyncFeature - [-TenantId ] - [-Feature ] - [] -``` - -## Description - -The `Get-EntraDirSyncFeature` cmdlet checks the status of directory synchronization features for a tenant. - -Some of the features that can be used with this cmdlet include: - -- **DeviceWriteback** -- **DirectoryExtensions** -- **DuplicateProxyAddressResiliency** -- **DuplicateUPNResiliency** -- **EnableSoftMatchOnUpn** -- **PasswordSync** -- **SynchronizeUpnForManagedUsers** -- **UnifiedGroupWriteback** -- **UserWriteback** - -The cmdlet can be run without specifying any features, in which case it returns a list of all features and their enabled or disabled status. - -For delegated scenarios, the user needs to be assigned the Global Administrator role. - -## Examples - -### Example 1: Return a list of all directory synchronization features - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' -Get-EntraDirSyncFeature -``` - -```Output -Enabled DirSyncFeature -------- -------------- - False BlockCloudObjectTakeoverThroughHardMatch - False BlockSoftMatch - False BypassDirSyncOverrides - False CloudPasswordPolicyForPasswordSyncedUsers - False ConcurrentCredentialUpdate - True ConcurrentOrgIdProvisioning - False DeviceWriteback - False DirectoryExtensions - False FopeConflictResolution - False GroupWriteBack - False PasswordSync - False PasswordWriteback - True QuarantineUponProxyAddressesConflict - True QuarantineUponUpnConflict - True SoftMatchOnUpn - True SynchronizeUpnForManagedUsers - False UnifiedGroupWriteback - False UserForcePasswordChangeOnLogon - False UserWriteback -``` - -This example gets a list of all directory synchronization features and shows if they are enabled (True) or disabled (False). - -### Example 2: Return the PasswordSync feature status - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' -Get-EntraDirSyncFeature -Feature 'PasswordSync' -``` - -```Output -Enabled DirSyncFeature -------- -------------- - False PasswordSync -``` - -This example shows if PasswordSync is enabled (True) or disabled (False) for the tenant. - -- `-Feature` specifies the directory synchronization feature to check the status of. - -## Parameters - -### -TenantId - -The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Feature - -The directory synchronization feature to check the status of. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Set-EntraDirSyncFeature](Set-EntraDirSyncFeature.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md deleted file mode 100644 index 4bbd98ed43..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Get-EntraDirectoryObjectOnPremisesProvisioningError -description: This article provides details on the Get-EntraDirectoryObjectOnPremisesProvisioningError command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError - -schema: 2.0.0 ---- - -# Get-EntraDirectoryObjectOnPremisesProvisioningError - -## Synopsis - -Returns whether Microsoft Entra ID has objects with DirSync provisioning error. - -## Syntax - -```powershell -Get-EntraDirectoryObjectOnPremisesProvisioningError - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraDirectoryObjectOnPremisesProvisioningError` returns whether Microsoft Entra ID has objects with DirSync provisioning error. - -## Examples - -### Example 1: Return whether Microsoft Entra ID has objects with DirSync provisioning error - -```powershell -Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' - -Get-EntraDirectoryObjectOnPremisesProvisioningError -``` - -```Output -False -``` - -This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. - -### Example 2: Return whether Microsoft Entra ID has objects with DirSync provisioning error - -```powershell -Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' - -Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId '0000aaaa-11bb-cccc-dd22-eeeeee333333' -``` - -```Output -False -``` - -This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. - -- `-TenantId` Specifies the unique ID of the tenant. - -## Parameters - -### -TenantId - -The unique ID of the tenant to perform the operation on. - -If this isn't provided then the value defaults to the tenant of the current user. - -This parameter is only applicable to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md deleted file mode 100644 index aac3e91b9d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Get-EntraDirectoryRole -description: This article provides details on the Get-EntraDirectoryRole command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRole - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRole - -## Synopsis - -Gets a directory role. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDirectoryRole - [-Filter ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDirectoryRole - -DirectoryRoleId - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRole` cmdlet gets a directory role from Microsoft Entra ID. Specify `ObjectId` parameter to get a directory role. - -## Examples - -### Example 1: Get a directory role by ID - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRole -DirectoryRoleId '019ea7a2-1613-47c9-81cb-20ba35b1ae48' -``` - -```Output -ObjectId DisplayName Description --------- ----------- ----------- -019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. -``` - -This command gets the specified directory role. - -- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. - -### Example 2: Get all directory roles - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRole -``` - -```Output -DeletedDateTime Id Description ---------------- -- ----------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Perform all migration functionality to migrate content to Microsoft 365 usin... - aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb Can manage all aspects of users and groups, including resetting passwords fo... - bbbbbbbb-7777-8888-9999-cccccccccccc Can read basic directory information. Commonly used to grant directory read ... - cccccccc-8888-9999-0000-dddddddddddd Can read and write basic directory information. For granting access to appli... -``` - -This command gets all the directory roles. - -### Example 3: Get a directory role filter by ObjectId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRole -Filter "ObjectId eq '019ea7a2-1613-47c9-81cb-20ba35b1ae48'" -``` - -```Output -ObjectId DisplayName Description --------- ----------- ----------- -019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. -``` - -This command gets the directory role by ObjectId. - -- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. - -### Example 4: Get a directory role filter by displayName - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRole -Filter "displayName eq 'Helpdesk Administrator'" -``` - -```Output -DeletedDateTime Id Description ---------------- -- ----------- - 56644e28-bf8b-4dad-8595-24448ffa3cb8 Perform all migration functionality to migrate content to Microsoft 365 usin... -``` - -This command gets the directory role by display name. - -## Parameters - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DirectoryRoleId - -Specifies the ID of a directory role in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Enable-EntraDirectoryRole](Enable-EntraDirectoryRole.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md deleted file mode 100644 index 3238d3cb09..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Get-EntraDirectoryRoleMember -description: This article provides details on the Get-EntraDirectoryRoleMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRoleMember - -## Synopsis - -Gets members of a directory role. - -## Syntax - -```powershell -Get-EntraDirectoryRoleMember - -DirectoryRoleId - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRoleMember` cmdlet retrieves the members of a directory role in Microsoft Entra ID. To obtain the members of a specific directory role, specify the `DirectoryRoleId`. Use the `Get-EntraDirectoryRole` cmdlet to get the `DirectoryRoleId` value. - -## Examples - -### Example 1: Get members by role ID - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRoleMember -DirectoryRoleId '1d73e796-aac5-4b3a-b7e7-74a3d1926a85' -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-7777-8888-9999-cccccccccccc -``` - -This example retrieves the members of the specified role. - -- `-DirectoryRoleId` parameter specifies directory role ID. - -## Parameters - -### -DirectoryRoleId - -Specifies the ID of a directory role in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) - -[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md deleted file mode 100644 index 6ea213a233..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Get-EntraDirectoryRoleTemplate -description: This article provides details on the Get-EntraDirectoryRoleTemplate command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRoleTemplate - -## Synopsis - -Gets directory role templates. - -## Syntax - -```powershell -Get-EntraDirectoryRoleTemplate - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRoleTemplate` cmdlet gets directory role templates in Microsoft Entra ID. - -## Examples - -### Example 1: Get role templates - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRoleTemplate -``` - -```Output -DeletedDateTime Id Description ---------------- -- ----------- - 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identities. - 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. - 2af84b1e-32c8-42b7-82bc-daa82404023b Default role for guest users with restricted access. Can read a limited set of directory information. - 95e79109-95c0-4d8e-aee3-d01accf2d47b Can invite guest users independent of the 'members can invite guests' setting. - fe930be7-5e62-47db-91af-98c3a49a38b1 Can manage all aspects of users and groups, including resetting passwords for limited admins. -``` - -This example retrieves the role templates in Microsoft Entra ID. - -### Example 2: Get a specific role template - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Helpdesk Administrator'} -``` - -```Output -DeletedDateTime Id Description DisplayName ---------------- -- ----------- ----------- - 729827e3-9c14-49f7-bb1b-9608f156bbb8 Can reset passwords for non-administrators and Helpdesk Administrators. Helpdesk Administrator -``` - -This example retrieves a Helpdesk role template. - -## Parameters - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md deleted file mode 100644 index 6a9d0258f3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: Get-EntraDomain -description: This article provides details on the Get-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomain - -schema: 2.0.0 ---- - -# Get-EntraDomain - -## Synopsis - -Gets a domain. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDomain - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDomain - -Name - [-Property ] - [] -``` - -## Description - -The `Get-EntraDomain` cmdlet gets a domain in Microsoft Entra ID. - -The work or school account must be assigned to at least one of the following Microsoft Entra roles: - -- User Administrator -- Helpdesk Administrator -- Service Support Administrator -- Directory Readers -- AdHoc License Administrator -- Application Administrator -- Security Reader -- Security Administrator -- Privileged Role Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Get a list of Domains that are created - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomain -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays --- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- -test22.com Managed True False False False False 13 -test33.com Managed True False False False False 15 -test44.com Managed True False False False False 17 -``` - -This command retrieves a list of domains. - -### Example 2: Get a specific Domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomain -Name TEST22.com -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays --- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- -test22.com Managed True False False False False 13 -``` - -This command retrieves a domain with the specified name. - -## Parameters - -### -Name - -Specifies the name of a domain. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Confirm-EntraDomain](Confirm-EntraDomain.md) - -[New-EntraDomain](New-EntraDomain.md) - -[Remove-EntraDomain](Remove-EntraDomain.md) - -[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md deleted file mode 100644 index 2381a779d4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: Get-EntraDomainFederationSettings -description: This article provides details on the Get-EntraDomainFederationSettings command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings - -schema: 2.0.0 ---- - -# Get-EntraDomainFederationSettings - -## Synopsis - -Retrieves settings for a federated domain. - -## Syntax - -```powershell -Get-EntraDomainFederationSettings - -DomainName - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraDomainFederationSettings` cmdlet gets key settings from Microsoft Entra ID. - -Use the `Get-EntraFederationProperty` cmdlet to get settings for both Microsoft Entra ID and the Entra ID Federation Services server. - -For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: - -- Global Reader -- Security Reader -- Domain Name Administrator -- External Identity Provider Administrator -- Hybrid Identity Administrator -- Security Administrator - -## Examples - -### Example 1: Get federation settings for specified domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomainFederationSettings -DomainName 'contoso.com' -``` - -This command gets federation settings for specified domain. - -- `-DomainName` parameter specifies the fully qualified domain name to retrieve. - -## Parameters - -### -DomainName - -The fully qualified domain name to retrieve. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId - -The unique ID of the tenant to perform the operation on. -If this isn't provided, then the value will default to the tenant of the current user. -This parameter is only applicable to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.DomainFederationSettings - -### This cmdlet returns the following settings - -### ActiveLogOnUri - -### FederationBrandName - -### IssuerUri - -### LogOffUri - -### MetadataExchangeUri - -### NextSigningCertificate - -### PassiveLogOnUri - -### SigningCertificate - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md deleted file mode 100644 index d6e7a88bf0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: Get-EntraDomainNameReference -description: This article provides details on the Get-EntraDomainNameReference command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainNameReference - -schema: 2.0.0 ---- - -# Get-EntraDomainNameReference - -## Synopsis - -Retrieves the objects that are referenced by a given domain name. - -## Syntax - -```powershell -Get-EntraDomainNameReference - -Name - [-Property ] - [] -``` - -## Description - -The `Get-EntraDomainNameReference` cmdlet retrieves the objects that are referenced with a given domain name. Specify `Name` parameter retrieve the objects. - -The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. - -## Examples - -### Example 1: Retrieve the domain name reference objects for a domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomainNameReference -Name contoso.com -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -hhhhhhhh-5555-6666-7777-iiiiiiiiiiii -``` - -This example shows how to retrieve the domain name reference objects for a domain that is specified through the -Name parameter. - -- `-Name` parameter specifies the name of the domain name for which the referenced objects are retrieved. - -## Parameters - -### -Name - -The name of the domain name for which the referenced objects are retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md deleted file mode 100644 index df14887de6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Get-EntraDomainServiceConfigurationRecord -description: This article provides details on the Get-EntraDomainServiceConfigurationRecord command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord - -schema: 2.0.0 ---- - -# Get-EntraDomainServiceConfigurationRecord - -## Synopsis - -Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. - -## Syntax - -```powershell -Get-EntraDomainServiceConfigurationRecord - -Name - [-Property ] - [] -``` - -## Description - -Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. - -After you have successfully verified the ownership of a domain and you have indicated what services you plan to use with the domain, you can request Microsoft Entra ID to return you a set of DNS records which you need to add to the zone file of the domain so that the services can work properly with your domain. - -## Examples - -### Example 1: Retrieve domain service configuration records by Name - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomainServiceConfigurationRecord -Name 'test.mail.contoso.com' -``` - -```Output -Id IsOptional Label RecordType SupportedService Ttl --- ---------- ----- ---------- ---------------- --- -aaaa0000-bb11-2222-33cc-444444dddddd False test.mail.contoso.com Mx Email 3600 -bbbb1111-cc22-3333-44dd-555555eeeeee False test.mail.contoso.com Txt Email 3600 -cccc2222-dd33-4444-55ee-666666ffffff False autodiscover.test.mail.contoso.com CName Email 3600 -dddd3333-ee44-5555-66ff-777777aaaaaa False msoid.test.mail.contoso.com CName OrgIdAuthentication 3600 -eeee4444-ff55-6666-77aa-888888bbbbbb False enterpriseregistration.test.mail.contoso.com CName Intune 3600 -ffff5555-aa66-7777-88bb-999999cccccc False enterpriseenrollment.test.mail.contoso.com CName Intune 3600 -``` - -This example shows how to retrieve the Domain service configuration records for a domain with the given name. - -- `-Name` parameter specifies domain name for which the domain service configuration records are to be retrieved. - -## Parameters - -### -Name - -The name of the domain for which the domain service configuration records are to be retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md deleted file mode 100644 index cd3821fc66..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Get-EntraDomainVerificationDnsRecord -description: This article provides details on the Get-EntraDomainVerificationDnsRecord command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord - -schema: 2.0.0 ---- - -# Get-EntraDomainVerificationDnsRecord - -## Synopsis - -Retrieve the domain verification DNS record for a domain. - -## Syntax - -```powershell -Get-EntraDomainVerificationDnsRecord - -Name - [-Property ] - [] -``` - -## Description - -Gets the domain's verification records from the `verificationDnsRecords` navigation property. - -You can't use the domain with your Microsoft Entra ID tenant until you have successfully verified that you own the domain. - -To verify the ownership of the domain, you need to first retrieve a set of domain verification records that you need to add to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. - -Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. - -The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. - -## Examples - -### Example 1: Retrieve the domain verification DNS record - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomainVerificationDnsRecord -Name mail.contoso.com -``` - -```Output -Id IsOptional Label RecordType SupportedService Ttl --- ---------- ----- ---------- ---------------- --- -aaaa0000-bb11-2222-33cc-444444dddddd False mail.contoso.com Txt Email 3600 -bbbb1111-cc22-3333-44dd-555555eeeeee False mail.contoso.com Mx Email 3600 -``` - -This example shows how to retrieve the Domain verification DNS records for a domain with the given name. - -## Parameters - -### -Name - -The domain name for which the domain verification Domain Name System (DNS) records are to be retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md deleted file mode 100644 index 0b48a4f8c1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Get-EntraExtensionProperty -description: This article provides details on the Get-EntraExtensionProperty command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraExtensionProperty - -schema: 2.0.0 ---- - -# Get-EntraExtensionProperty - -## Synopsis - -Gets extension properties registered with Microsoft Entra ID. - -## Syntax - -```powershell -Get-EntraExtensionProperty - [-IsSyncedFromOnPremises ] - [] -``` - -## Description - -The Get-EntraExtensionProperty cmdlet gets a collection that contains the extension properties registered with Microsoft Entra ID through Microsoft Entra ID Connect. - -You can get extension properties that are synced with on-premises Microsoft Entra ID that aren't synced with on-premises Microsoft Entra ID or both types. - -This command returns all directory extension definitions registered in a directory, including those from multitenant apps. The following entities support extension properties: - -- User -- Group -- AdministrativeUnit -- Application -- Device -- Organization - -## Examples - -### Example 1: Get extension properties synced from on-premises Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraExtensionProperty -IsSyncedFromOnPremises $True -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ------------- ---------------------- ---- ------------- - aaaabbbb-0000-cccc-1111-dddd2222eeee Tenant Schema Extension App String False True extension_aaaabbbb-0000-cccc-1111-dddd2222eeee_extensionAttribute1 {User} -``` - -This command gets extension properties that have sync from on-premises Microsoft Entra ID. - -## Parameters - -### -IsSyncedFromOnPremises - -Specifies whether this cmdlet gets extension properties that are synced or not synced. - -- `$True` - get extension properties that are synced from the on-premises Microsoft Entra ID. -- `$False` - get extension properties that aren't synced from the on-premises Microsoft Entra ID. -- `No value` - get all extension properties (both synced and nonsynced). - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md deleted file mode 100644 index 615248b150..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Get-EntraFederationProperty -description: This article provides details on the Get-EntraFederationProperty command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFederationProperty - -schema: 2.0.0 ---- - -# Get-EntraFederationProperty - -## Synopsis - -Displays the properties of the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. - -## Syntax - -```powershell -Get-EntraFederationProperty - -DomainName - [] -``` - -## Description - -The `Get-EntraFederationProperty` cmdlet gets key settings from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. - -You can use this information to troubleshoot authentication problems caused by mismatched settings between the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. - -For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: - -- Global Reader -- Security Reader -- Domain Name Administrator -- External Identity Provider Administrator -- Hybrid Identity Administrator -- Security Administrator - -## Examples - -### Example 1: Display properties for specified domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraFederationProperty -DomainName contoso.com -``` - -This command displays properties for specified domain. - -- `-DomainName` Specifies the domain name. - -## Parameters - -### -DomainName - -The domain name for which the properties from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online are displayed. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md deleted file mode 100644 index 813b97fb34..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: Get-EntraObjectByObjectId -description: This article provides details on the Get-EntraObjectByObjectId command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectByObjectId - -schema: 2.0.0 ---- - -# Get-EntraObjectByObjectId - -## Synopsis - -Retrieves the objects specified by the ObjectIds parameter. - -## Syntax - -```powershell -Get-EntraObjectByObjectId - -ObjectIds - [-Types ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraObjectByObjectId` cmdlet retrieves the objects specified by the ObjectIds parameter. - -## Examples - -### Example 1: Get an object One or more object IDs - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' , 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example demonstrates how to retrieve objects for a specified object Ids. - -- `ObjectIds` parameter specifies the One or more object IDs. - -### Example 2: Get an object by types - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Types User -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example demonstrates how to retrieve objects for a specified object type. - -- `-ObjectIds` parameter specifies the One or more object IDs. -- `-Types` parameter specifies the type of object ID. - -## Parameters - -### -ObjectIds - -One or more object IDs's, separated by commas, for which the objects are retrieved. The IDs are GUIDs, represented as strings. You can specify up to 1,000 IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Types - -Specifies the type of objects that the cmdlet returns. If not specified, the default is directoryObject, which includes all resource types defined in the directory. You can specify any object derived from directoryObject in the collection, such as user, group, and device objects. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md deleted file mode 100644 index c2338d2a49..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Get-EntraPartnerInformation -description: This article provides details on the Get-EntraPartnerInformation command. - -ms.topic: reference -ms.date: 09/25/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPartnerInformation - -schema: 2.0.0 ---- - -# Get-EntraPartnerInformation - -## Synopsis - -Retrieves company-level information for partners. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPartnerInformation - [] -``` - -### GetById - -```powershell -Get-EntraPartnerInformation - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraPartnerInformation` cmdlet is used to retrieve partner-specific information. -This cmdlet should only be used for partner tenants. - -## Examples - -### Example 1: Retrieve partner information - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraPartnerInformation -``` - -```Output -PartnerCompanyName : Contoso -companyType : -PartnerSupportTelephones : {12123, +1911} -PartnerSupportEmails : {} -PartnerHelpUrl : http://www.help.contoso.com -PartnerCommerceUrl : -ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc -PartnerSupportUrl : -``` - -This command retrieves partner-specific information. - -### Example 2: Retrieve partner information with specific TenantId - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -$tenantId = (Get-EntraContext).TenantId -Get-EntraPartnerInformation -TenantId $tenantId -``` - -```Output -PartnerCompanyName : Contoso -companyType : -PartnerSupportTelephones : {12123, +1911} -PartnerSupportEmails : {} -PartnerHelpUrl : http://www.help.contoso.com -PartnerCommerceUrl : -ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc -PartnerSupportUrl : -``` - -This command retrieves partner-specific information. - -`-TenantId` Parameter specifies unique ID of the tenant to perform the operation on. - -## Parameters - -### -TenantId - -The unique ID of the tenant to perform the operation on. -If this is not provided, then the value will default to the tenant of the current user. -This parameter is only applicable to partner users. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Company level information outputs - -- CompanyType: The type of this company (can be partner or regular tenant) -- DapEnabled: Flag to determine if the partner has delegated admin privileges -- PartnerCompanyName: The name of the company -- PartnerSupportTelephones: Support Telephone numbers for the partner -- PartnerSupportEmails: Support E-Mail address for the partner -- PartnerCommerceUrl: URL for the partner's commerce web site -- PartnerSupportUrl: URL for the Partner's support website -- PartnerHelpUrl: URL for the partner's help web site - -## Notes - -## Related Links - -[Set-EntraPartnerInformation](Set-EntraPartnerInformation.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md deleted file mode 100644 index ea27374f11..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Get-EntraPasswordPolicy -description: This article provides details on the Get-EntraPasswordPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPasswordPolicy - -schema: 2.0.0 ---- - -# Get-EntraPasswordPolicy - -## Synopsis - -Retrieves the current password policy for the tenant or the specified domain. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPasswordPolicy - [] -``` - -### GetById - -```powershell -Get-EntraPasswordPolicy - -DomainName - [] -``` - -## Description - -The `Get-EntraPasswordPolicy` cmdlet can be used to retrieve the values associated with the Password Expiry -window or Password Expiry Notification window for a tenant or specified domain. - -When a domain name is specified, it must be a verified domain for the company. - -The work or school account needs to belong to one of the following Microsoft Entra roles: - -- Domain Name Administrator - -## Examples - -### Example 1: Get password policy for a specified domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraPasswordPolicy -DomainName 'contoso.com' -``` - -```Output -NotificationDays ValidityPeriod ----------------- -------------- - 90 180 -``` - -Returns the password policy for the specified domain. - -- `-DomainName` parameter specifies the fully qualified domain name to retrieve. - -## Parameters - -### -DomainName - -The fully qualified name of the domain to be retrieved. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md deleted file mode 100644 index 3d2a8293a7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: Get-EntraScopedRoleMembership -description: This article provides details on the Get-EntraScopedRoleMembership command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership - -schema: 2.0.0 ---- - -# Get-EntraScopedRoleMembership - -## Synopsis - -List Microsoft Entra role assignments with administrative unit scope. - -## Syntax - -```powershell -Get-EntraScopedRoleMembership - -AdministrativeUnitId - [-ScopedRoleMembershipId ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraScopedRoleMembership` cmdlet lists Microsoft Entra role assignments with an administrative unit scope. Use the `ObjectId` parameter to retrieve a specific scoped role membership. - -## Examples - -### Example 1: Get Scoped Role Administrator - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' -} -Get-EntraScopedRoleMembership @params -``` - -```Output -Id AdministrativeUnitId RoleId --- -------------------- ------ -dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example gets scoped role administrator. You cane use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. -- `-ScopedRoleMembershipId` parameter specifies the scoped role membership Id. - -### Example 2: List scoped administrators for administrative unit by ObjectId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Get-EntraScopedRoleMembership -ObjectId $AdministrativeUnit.ObjectId -``` - -```Output -Id AdministrativeUnitId RoleId --- -------------------- ------ -dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example list scoped administrators with objectId. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ScopedRoleMembershipId - -Specifies the ID of a scoped role membership. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) - -[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md deleted file mode 100644 index bcf1591a2e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: Get-EntraSubscribedSku -description: This article provides details on the Get-EntraSubscribedSku command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraSubscribedSku - -schema: 2.0.0 ---- - -# Get-EntraSubscribedSku - -## Synopsis - -Gets subscribed SKUs to Microsoft services. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraSubscribedSku - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraSubscribedSku - -SubscribedSkuId - [-Property ] - [] -``` - -## Description - -The `Get-EntraSubscribedSku` cmdlet gets subscribed SKUs to Microsoft services. - -## Examples - -### Example 1: Get subscribed SKUs - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraSubscribedSku -``` - -```Output -Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber --- --------- ----------- --------- ---------------- ------------- ----- ------- -aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... -bbbb1111-cc22-3333-44dd-555555eeeeee 1111bbbb-22cc-dddd-ee33-ffffff444444 M365x99297270 User Enabled 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTE... -cccc2222-dd33-4444-55ee-666666ffffff 2222cccc-33dd-eeee-ff44-aaaaaa555555 M365x99297270 User Enabled 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTE... -``` - -This example demonstrates how to retrieve subscribed SKUs to Microsoft services. - -### Example 2: Get subscribed SKUs by SubscribedSkuId - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraSubscribedSku -SubscribedSkuId 'abcdefgh-1111-2222-bbbb-cccc33333333_dddddddd-4444-5555-eeee-666666666666' -``` - -```Output -Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber --- --------- ----------- --------- ---------------- ------------- ----- ------- -aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... -``` - -This example demonstrates how to retrieve specified subscribed SKUs to Microsoft services. - -- `-SubscribedSkuId` parameter specifies the ID of the SKU (Stock Keeping Unit). - -### Example 3: Get available license plans - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Organization.Read.All' -Get-EntraSubscribedSku | Select-Object -Property Sku*, ConsumedUnits -ExpandProperty PrepaidUnits -``` - -```Output -Enabled : 5 -LockedOut : 0 -Suspended : 0 -Warning : 0 -AdditionalProperties : -SkuId : efccb6f7-5641-4e0e-bd10-b4976e1bf68e -SkuPartNumber : EMS -ConsumedUnits : 3 -``` - -This example demonstrates how to retrieve available license plans. - -### Example 4: Retrieve all users assigned a specific license - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -$sku = Get-EntraSubscribedSku | Where-Object { $_.SkuPartNumber -eq 'DEVELOPERPACK_E5' } -$skuId = $sku.SkuId -$usersWithDeveloperPackE5 = Get-EntraUser -All | Where-Object { - $_.AssignedLicenses -and ($_.AssignedLicenses.SkuId -contains $skuId) -} -$usersWithDeveloperPackE5 | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled, UserType | Format-Table -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName AccountEnabled UserType --- ----------- ----------------- -------------- -------- -cccccccc-2222-3333-4444-dddddddddddd Angel Brown AngelB@contoso.com True Member -dddddddd-3333-4444-5555-eeeeeeeeeeee Avery Smith AveryS@contoso.com True Member -eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com True Member -``` - -This example demonstrates how to retrieve all users assigned a specific license. - -### Example 5: Get a list of users, their assigned licenses, and licensing source - -```powershell -Connect-Entra -Scopes 'Organization.Read.All','User.Read.All','Group.Read.All' - -# Get all users with specified properties -$Users = Get-EntraUser -All -Property AssignedLicenses, LicenseAssignmentStates, DisplayName, UserPrincipalName, ObjectId - -$SelectedUsers = $Users | Select-Object ObjectId, UserPrincipalName, DisplayName, AssignedLicenses -ExpandProperty LicenseAssignmentStates - -# Group Name lookup -$GroupDisplayNames = @{} - -# Sku Part Number lookup -$SkuPartNumbers = @{} - -# Populate the hashtable with group display names and SKU part numbers -foreach ($User in $SelectedUsers) { - $AssignedByGroup = $User.AssignedByGroup - $SkuId = $User.SkuId - - try { - # Check if the group display name is already in the hashtable - if (-not $GroupDisplayNames.ContainsKey($AssignedByGroup)) { - $Group = Get-EntraGroup -GroupId $AssignedByGroup - $GroupDisplayNames[$AssignedByGroup] = $Group.DisplayName - } - - $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue $GroupDisplayNames[$AssignedByGroup] - } catch { - $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue 'N/A (Direct Assignment)' - } - - try { - # Check if the SKU part number is already in the hashtable - if (-not $SkuPartNumbers.ContainsKey($SkuId)) { - $Sku = Get-EntraSubscribedSku | Where-Object { $_.SkuId -eq $SkuId } | Select-Object -ExpandProperty SkuPartNumber - $SkuPartNumbers[$SkuId] = $Sku - } - - $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue $SkuPartNumbers[$SkuId] - } catch { - $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue 'N/A' - } -} - -$SelectedUsers | Format-Table UserPrincipalName, DisplayName, AssignedByGroup, GroupDisplayName, SkuId, SkuPartNumber, State, Error -AutoSize -``` - -```Output -userPrincipalName displayName assignedByGroup GroupDisplayName skuId SkuPartNumber state error ------------------ ----------- --------------- ---------------- ----- ------------- ----- ----- -averyh@contoso.com Avery Howard cccccccc-2222-3333-4444-dddddddddddd Contoso Team abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None -devont@contoso.com Devon Torres ffffffff-5555-6666-7777-aaaaaaaaaaaa Retail abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None -``` - -This example shows a list of users, their licenses, and the source of the license such as directly assigned or group assigned. - -## Parameters - -### -SubscribedSkuId - -The object ID of the SKU (Stock Keeping Unit). - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md deleted file mode 100644 index 7bf50037c6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: Get-EntraTenantDetail -description: This article provides details on the Get-EntraTenantDetail command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTenantDetail - -schema: 2.0.0 ---- - -# Get-EntraTenantDetail - -## Synopsis - -Gets the details of a tenant. - -## Syntax - -```powershell -Get-EntraTenantDetail - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraTenantDetail` cmdlet gets the details of a tenant in Microsoft Entra ID. - -In delegated scenarios involving work or school accounts, the signed-in user must be assigned either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation: - -- Application Administrator -- Authentication Administrator -- Cloud Application Administrator -- Directory Readers -- Directory Reviewer -- Global Reader -- Helpdesk Administrator -- Security Administrator -- Security Operator -- Security Reader -- Service Support Administrator -- User Administrator -- Privileged Role Administrator - -## Examples - -### Example 1: Get all tenant details - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTenantDetail -All -``` - -```Output -DisplayName Id TenantType CountryLetterCode VerifiedDomains ------------ -- ---------- ----------------- --------------- -Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AAD NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Mana... -``` - -This example shows how to retrieve all tenant details. - -### Example 2: Get top one tenant details - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTenantDetail -Top 1 -``` - -```Output -DisplayName Id CountryLetterCode VerifiedDomains ------------ -- ----------------- --------------- -Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}} -``` - -This example shows how to retrieve details of a top one tenant in Microsoft Entra ID. - -### Example 3: Get directory tenant size quota - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -(Get-EntraTenantDetail).AdditionalProperties.directorySizeQuota -``` - -```Output -Key Value ---- ----- -used 339 -total 50000 -``` - -This example shows how to retrieve the directory tenant size quota. - -A directory quota represents the maximum number of objects allowed in a tenant, including user accounts, app registrations, and groups. Once this limit is reached, attempts to create new objects will result in an error. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Set-EntraTenantDetail](Set-EntraTenantDetail.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md deleted file mode 100644 index f5effc7db0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: New-EntraAdministrativeUnit -description: This article provides details on the New-EntraAdministrativeUnit command. - - -ms.topic: reference -ms.date: 07/25/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAdministrativeUnit - -schema: 2.0.0 ---- - -# New-EntraAdministrativeUnit - -## Synopsis - -Creates an administrative unit. - -## Syntax - -```powershell -New-EntraAdministrativeUnit - [-Description ] - -DisplayName - [] -``` - -## Description - -The `New-EntraAdministrativeUnit` cmdlet creates an administrative unit in Microsoft Entra ID. Specify `DisplayName` parameter to create an administrative unit. - -In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that includes the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. The Privileged Role Administrator role is the least privileged role that meets this requirement. - -## Examples - -### Example 1: Create an administrative unit - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -New-EntraAdministrativeUnit -DisplayName 'TestAU' -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - bbbbbbbb-1111-2222-3333-cccccccccccc TestAU -``` - -This example demonstrates how to create an administrative unit. - -- `-DisplayName` parameter specifies the display name for the Administrative unit object. - -### Example 2: Create an administrative unit using '-Description' parameter - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$params = @{ - DisplayName = 'Pacific Administrative Unit' - Description = 'Administrative Unit for Pacific region' -} - -New-EntraAdministrativeUnit @params -``` - -```Output -DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility ---------------- -- ----------- ----------- ---------------------------- ---------- - bbbbbbbb-1111-2222-3333-cccccccccccc Pacific Administrative Unit test111 False -``` - -This example demonstrates how to create an administrative unit. - -- `-DisplayName` parameter specifies the display name for the Administrative unit object. -- `-Description` parameter specifies a description for the Administrative unit object. - -## Parameters - -### -Description - -Specifies a description for the new administrative unit. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the new administrative unit. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) - -[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) - -[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md deleted file mode 100644 index 8a6f2ea0bf..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: New-EntraAttributeSet -description: This article provides details on the New-EntraAttributeSet command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAttributeSet - -schema: 2.0.0 ---- - -# New-EntraAttributeSet - -## Synopsis - -Adds a new attribute set. - -## Syntax - -```powershell -New-EntraAttributeSet - [-AttributeSetId ] - [-Description ] - [-MaxAttributesPerSet ] - [] -``` - -## Description - -Adds a new Microsoft Entra ID attribute set object. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. - -## Examples - -### Example 1: Add a single attribute set - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - AttributeSetId = 'NewCustomAttributeSet' - Description = 'Attributes for engineering team' - MaxAttributesPerSet = 10 -} - -New-EntraAttributeSet @params -``` - -```Output -Id Description MaxAttributesPerSet --- ----------- ------------------- -Testing Attributes for engineering team 10 -``` - -This example demonstrates hoe to add a single attribute set. - -- `-Id` parameter specifies the name of the attribute set. -- `-Description` parameter specifies the description for the attribute set. -- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. - -## Parameters - -### -Description - -Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AttributeSetId - -Name of the attribute set. Unique identifier for the attribute set within a tenant, up to 32 Unicode characters. It can't contain spaces or special characters, is case sensitive, and can't be changed later. Required. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaxAttributesPerSet - -Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraAttributeSet](Get-EntraAttributeSet.md) - -[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md deleted file mode 100644 index 6e1299f5b0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md +++ /dev/null @@ -1,234 +0,0 @@ ---- -title: New-EntraCustomSecurityAttributeDefinition -description: This article provides details on the New-EntraCustomSecurityAttributeDefinition command. - - -ms.topic: reference -ms.date: 07/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition - -schema: 2.0.0 ---- - -# New-EntraCustomSecurityAttributeDefinition - -## Synopsis - -Create a new customSecurityAttributeDefinition object. - -## Syntax - -```powershell -New-EntraCustomSecurityAttributeDefinition - -IsSearchable - [-Description ] - -IsCollection - -AttributeSet - -Type - -Name - -Status - -UsePreDefinedValuesOnly - [] -``` - -## Description - -The `New-EntraCustomSecurityAttributeDefinition` cmdlet creates a new customSecurityAttributeDefinition object. Specify `IsSearchable`, `IsCollection`, `AttributeSet`, `Type`, `Name`, `Status` and `UsePreDefinedValuesOnly` parameters for create a new custom security attribute definition. - -You can define up to 500 active objects in a tenant. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. - -## Examples - -### Example 1: Add a custom security attribute - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All','CustomSecAttributeDefinition.ReadWrite.All' -$AttributeSet = Get-EntraAttributeSet -Id '' -$params = @{ - Name = 'ProjectTest' - Description = 'Target completion' - Type = 'String' - Status = 'Available' - AttributeSet = $AttributeSet.Id - IsCollection = $False - IsSearchable = $True - UsePreDefinedValuesOnly = $True -} -New-EntraCustomSecurityAttributeDefinition @params -``` - -```Output -Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly --- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- -Test_ProjectTest Test Target completion False True ProjectTest Available String False -``` - -This example demonstrates how to add a custom security attribute. - -- `-Name` parameter specifies the name of the custom security attribute. -- `-Description` parameter specifies the description of the custom security attribute. -- `-Type` parameter specifies the data type for the custom security attribute values. -- `-Status` parameter specifies the custom security attribute is active or deactivated. -- `-AttributeSet` parameter specifies the name of attribute set. -- `-IsCollection` parameter specifies the allows multiple values can be assigned to the custom security attribute. -- `-IsSearchable` parameter specifies the custom security attribute values are indexed for searching on objects. -- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. - -## Parameters - -### -AttributeSet - -Name of the attribute set. Case insensitive. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCollection - -Indicates whether multiple values can be assigned to the custom security attribute. Can't be changed later. If type is set to Boolean, isCollection can't be set to true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsSearchable - -Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Can't be changed later. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Can't contain spaces or special characters. Can't be changed later. Case insensitive. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Status - -Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Can't be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UsePreDefinedValuesOnly - -Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) - -[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md deleted file mode 100644 index d81f8e00ad..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md +++ /dev/null @@ -1,339 +0,0 @@ ---- -title: New-EntraDevice -description: This article provides details on the New-EntraDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDevice - -schema: 2.0.0 ---- - -# New-EntraDevice - -## Synopsis - -Creates a device. - -## Syntax - -```powershell -New-EntraDevice - -DisplayName - -DeviceOSType - -AccountEnabled - -DeviceId - -DeviceOSVersion - -AlternativeSecurityIds - [-DevicePhysicalIds ] - [-DeviceTrustType ] - [-DeviceMetadata ] - [-ApproximateLastLogonTimeStamp ] - [-IsManaged ] - [-DeviceObjectVersion ] - [-IsCompliant ] - [-ProfileType ] - [-SystemLabels ] - [] -``` - -## Description - -The `New-EntraDevice` cmdlet creates a device in Microsoft Entra ID. - -The calling user must be in one of the following Microsoft Entra roles: Intune Administrator or Windows 365 Administrator. - -## Examples - -### Example 1: Create a device - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' - -$params = @{ - AccountEnabled = $true - DisplayName = 'My new device' - AlternativeSecurityIds = $altsecid - DeviceId = $guid - DeviceOSType = 'OS/2' - DeviceOSVersion = '9.3' -} - -New-EntraDevice @params -``` - -```Output -ObjectId DeviceId DisplayName --------- -------- ----------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb dddddddd-3333-4444-5555-eeeeeeeeeeee My new device -``` - -This command creates a new device. - -## Parameters - -### -AccountEnabled - -Indicates whether the account is enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AlternativeSecurityIds - -Specifies alternative security IDs. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApproximateLastLogonTimeStamp - -Specifies last sign-in date time. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies the ID of the device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceMetadata - -The metadata for this device - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceObjectVersion - -Specifies the object version of the device. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceOSType - -Specifies the operating system type of the new device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceOSVersion - -Specifies the operating system version of the new device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DevicePhysicalIds - -Specifies the physical ID. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceTrustType - -The trust type for this device - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the new device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCompliant - -True if the device complies with Mobile Device Management (MDM) policies; otherwise, false. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsManaged - -True if the device is managed by a Mobile Device Management (MDM) app such as Intune; otherwise, false. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileType - -Specifies profile type of the device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SystemLabels - -Specifies labels for the device. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDevice](Get-EntraDevice.md) - -[Remove-EntraDevice](Remove-EntraDevice.md) - -[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md deleted file mode 100644 index bba50a37cd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: New-EntraDomain -description: This article provides details on the New-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDomain - -schema: 2.0.0 ---- - -# New-EntraDomain - -## Synopsis - -Creates a domain. - -## Syntax - -```powershell -New-EntraDomain - -Name - [-IsDefault ] - [-SupportedServices ] - [] -``` - -## Description - -The `New-EntraDomain` cmdlet creates a domain in Microsoft Entra ID. - -The work or school account needs to belong to at least the Domain Name Administrator role. - -## Examples - -### Example 1: Create a new Domain - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -New-EntraDomain -Name testingDemo.com -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices --- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- -testingDemo.com Managed True False False False False {} -``` - -This example demonstrates how to create a new domain in Microsoft Entra ID. - -### Example 2: Create a new Domain with a list of domain capabilities - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -New-EntraDomain -Name testingDemo1.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices --- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- -testingDemo1.com Managed True False False False False {} -``` - -This example demonstrates how to create a new domain with the specified services in Microsoft Entra ID. - -### Example 3: Create a new Domain and make if the default new user creation - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -New-EntraDomain -Name testingDemo2.com -IsDefault $True -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices --- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- -testingDemo2.com Managed True False False False False {} -``` - -This example demonstrates how to create a new domain in Microsoft Entra ID and marks it as the default to be used for new user creation. - -## Parameters - -### -IsDefault - -Indicates whether or not this is the default domain that is used for user creation. - -There is only one default domain per company. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -The fully qualified name of the domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SupportedServices - -The capabilities assigned to the domain. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Confirm-EntraDomain](Confirm-EntraDomain.md) - -[Get-EntraDomain](Get-EntraDomain.md) - -[Remove-EntraDomain](Remove-EntraDomain.md) - -[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md deleted file mode 100644 index 2b4e4d8f3b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Remove-EntraAdministrativeUnit -description: This article provides details on the Remove-EntraAdministrativeUnit command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit - -schema: 2.0.0 ---- - -# Remove-EntraAdministrativeUnit - -## Synopsis - -Removes an administrative unit. - -## Syntax - -```powershell -Remove-EntraAdministrativeUnit - -AdministrativeUnitId - [] -``` - -## Description - -The `Remove-EntraAdministrativeUnit` cmdlet removes an administrative unit from Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to delete an administrative unit. - -To delete an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. - -## Examples - -### Example 1: Remove an administrative unit - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Remove-EntraAdministrativeUnit -ObjectId $AdministrativeUnit.ObjectId -``` - -This command removes the specified administrative unit from Microsoft Entra ID. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) - -[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) - -[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md deleted file mode 100644 index 306fdee2a1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Remove-EntraAdministrativeUnitMember -description: This article provides details on the Remove-EntraAdministrativeUnitMember command. - -ms.topic: reference -ms.date: 07/17/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember - -schema: 2.0.0 ---- - -# Remove-EntraAdministrativeUnitMember - -## Synopsis - -Removes an administrative unit member. - -## Syntax - -```powershell -Remove-EntraAdministrativeUnitMember - -AdministrativeUnitId - -MemberId - [] -``` - -## Description - -The `Remove-EntraAdministrativeUnitMember` cmdlet removes an administrative unit member in Microsoft Entra ID. Specify `AdministrativeUnitId` and `MemberId` to remove an administrative unit member. - -To remove a member from an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. - -## Examples - -### Example 1: Remove an administrative unit member - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - MemberId = 'eeeeeeee-4444-5555-6666-ffffffffffff' -} -Remove-EntraAdministrativeUnitMember @params -``` - -This command removes a specified member (user or group) from a specified administrative unit. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. -- `-MemberId` parameter specifies the ID of the administrative unit member. - -## Parameters - -### -MemberId - -Specifies the ID of the administrative unit member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) - -[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) - -[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md deleted file mode 100644 index 9d5b0e222a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Remove-EntraContact -description: This article provides details on the Remove-EntraContact command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraContact - -schema: 2.0.0 ---- - -# Remove-EntraContact - -## Synopsis - -Removes a contact. - -## Syntax - -```powershell -Remove-EntraContact - -OrgContactId - [] -``` - -## Description - -The `Remove-EntraContact` removes a contact from Microsoft Entra ID. - -## Examples - -### Example 1: Remove a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -Remove-EntraContact -OrgContactId $Contact.ObjectId -``` - -The example shows how to remove a contact. - -## Parameters - -### -OrgContactId - -Specifies the object ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md deleted file mode 100644 index bacb0d4a0c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Remove-EntraDevice -description: This article provides details on the Remove-EntraDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDevice - -schema: 2.0.0 ---- - -# Remove-EntraDevice - -## Synopsis - -Deletes a device. - -## Syntax - -```powershell -Remove-EntraDevice - -DeviceId - [] -``` - -## Description - -The `Remove-EntraDevice` cmdlet removes a device from Microsoft Entra ID. - -The calling user must be in one of the following Microsoft Entra roles: Intune Administrator, Windows 365 Administrator, or Cloud Device Administrator. - -## Examples - -### Example 1: Remove a device - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -$Device = Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" -Remove-EntraDevice -DeviceId $Device.ObjectId -``` - -This command removes the specified device. - -## Parameters - -### -DeviceId - -Specifies the object ID of a device in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDevice](Get-EntraDevice.md) - -[New-EntraDevice](New-EntraDevice.md) - -[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md deleted file mode 100644 index ec6b3a8a33..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Remove-EntraDeviceRegisteredOwner -description: This article provides details on the Remove-EntraDeviceRegisteredOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner - -schema: 2.0.0 ---- - -# Remove-EntraDeviceRegisteredOwner - -## Synopsis - -Removes the registered owner of a device. - -## Syntax - -```powershell -Remove-EntraDeviceRegisteredOwner - -OwnerId - -DeviceId - [] -``` - -## Description - -The `Remove-EntraDeviceRegisteredOwner` cmdlet removes the registered owner of a device in Microsoft Entra ID. - -## Examples - -### Example 1: Remove an owner from a device - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$Device = Get-EntraDevice -Top 1 -$Owner = Get-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId -Remove-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId -OwnerId $Owner.ObjectId -``` - -This examples shows how to remove the owner of a device. - -## Parameters - -### -DeviceId - -Specifies an object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OwnerId - -Specifies an owner ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) - -[Get-EntraDevice](Get-EntraDevice.md) - -[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md deleted file mode 100644 index ec9ca2ff64..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Remove-EntraDeviceRegisteredUser -description: This article provides details on the Remove-EntraDeviceRegisteredUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser - -schema: 2.0.0 ---- - -# Remove-EntraDeviceRegisteredUser - -## Synopsis - -Removes a registered user from a device. - -## Syntax - -```powershell -Remove-EntraDeviceRegisteredUser - -DeviceId - -UserId - [] -``` - -## Description - -The `Remove-EntraDeviceRegisteredUser` cmdlet removes a registered user from a Microsoft Entra ID device. - -## Examples - -### Example 1: Remove a registered user from a device - -```Powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$Device = Get-EntraDevice -Top 1 -$User = Get-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId -Remove-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId -UserId $User.ObjectId -``` - -This example shows how to remove the registered user from device. - -## Parameters - -### -DeviceId - -Specifies the ID of an object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) - -[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md deleted file mode 100644 index 4b888305c9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraDirectoryRoleMember -description: This article provides details on the Remove-EntraDirectoryRoleMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember - -schema: 2.0.0 ---- - -# Remove-EntraDirectoryRoleMember - -## Synopsis - -Removes a member of a directory role. - -## Syntax - -```powershell -Remove-EntraDirectoryRoleMember - -DirectoryRoleId - -MemberId - [] -``` - -## Description - -The `Remove-EntraDirectoryRoleMember` cmdlet removes a member from a directory role in Microsoft Entra ID. - -## Examples - -### Example 1: Remove a member from a directory role - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$params = @{ - DirectoryRoleId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' - MemberId = '11bb11bb-cc22-dd33-ee44-55ff55ff55ff' -} - -Remove-EntraDirectoryRoleMember @params -``` - -This example removes the specified member from the specified role. - -- `-DirectoryRoleId` - specifies the unique identifier (ObjectId) of the directory role from which the member will be removed. - -- `-MemberId` - specifies the unique identifier (MemberId) of the member (user, group, or service principal) that is to be removed from the specified directory role. - -## Parameters - -### -MemberId - -Specifies the object ID of a role member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DirectoryRoleId - -Specifies the object ID of a directory role in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) - -[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md deleted file mode 100644 index cfd13d0926..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Remove-EntraDomain -description: This article provides details on the Remove-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDomain - -schema: 2.0.0 ---- - -# Remove-EntraDomain - -## Synopsis - -Removes a domain. - -## Syntax - -```powershell -Remove-EntraDomain - -Name - [] -``` - -## Description - -The `Remove-EntraDomain` cmdlet removes a domain from Microsoft Entra ID. - -Important: - -- Deleted domains are not recoverable. -- Attempts to delete will fail if there are any resources or objects still dependent on the domain. - -The work or school account needs to belong to at least the `Domain Name Administrator` Microsoft Entra role. - -## Examples - -### Example 1: Remove a domain - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Remove-EntraDomain -Name Contoso.com -``` - -This command removes a domain from Microsoft Entra ID. - -## Parameters - -### -Name - -Specifies the name of the domain to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Confirm-EntraDomain](Confirm-EntraDomain.md) - -[Get-EntraDomain](Get-EntraDomain.md) - -[New-EntraDomain](New-EntraDomain.md) - -[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md deleted file mode 100644 index f0b6781699..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Remove-EntraExternalDomainFederation -description: This article provides details on the Remove-EntraExternalDomainFederation command. - - -ms.topic: reference -ms.date: 06/11/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra - -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation - -schema: 2.0.0 ---- - -# Remove-EntraExternalDomainFederation - -## Synopsis - -Delete an externalDomainFederation by external domain name. - -## Syntax - -```powershell -Remove-EntraExternalDomainFederation - -ExternalDomainName - [] -``` - -## Description - -This `Remove-EntraExternalDomainFederation` cmdlet removes an externalDomainFederation by external domain name. - -## Examples - -### Example 1: Deletes an external domain federation setting for a given external domain - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Remove-EntraExternalDomainFederation -ExternalDomainName 'test.com' -``` - -This command deletes an external domain federation setting. - -- `ExternalDomainName` Parameter specifies unique identifer of an externalDomainFederation. - -## Parameters - -### -ExternalDomainName - -The unique identifer of an externalDomainFederation in Microsoft Entra ID - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md deleted file mode 100644 index 498ce84d81..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraScopedRoleMembership -description: This article provides details on the Remove-EntraScopedRoleMembership command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership - -schema: 2.0.0 ---- - -# Remove-EntraScopedRoleMembership - -## Synopsis - -Removes a scoped role membership. - -## Syntax - -```powershell -Remove-EntraScopedRoleMembership - -AdministrativeUnitId - -ScopedRoleMembershipId - [] -``` - -## Description - -The `Remove-EntraScopedRoleMembership` cmdlet removes a scoped role membership from Microsoft Entra ID. Specify `AdministrativeUnitId` and `ScopedRoleMembershipId` parameter to remove a scoped role membership. - -## Examples - -### Example 1: Remove a scoped role membership - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.AdministrativeUnitId - ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' -} -Remove-EntraScopedRoleMembership @params -``` - -This cmdlet removes a specific scoped role membership from Microsoft Entra ID. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. -- `-ScopedRoleMembershipId` parameter specifies the ID of the scoped role membership to remove. To obtain the details of a scoped role membership, you can use the `Get-EntraScopedRoleMembership` command. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ScopedRoleMembershipId - -Specifies the ID of the scoped role membership to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) - -[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md deleted file mode 100644 index ce69a357d3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: Restore-EntraDeletedDirectoryObject -description: This article provides details on the Restore-EntraDeletedDirectoryObject command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject - -schema: 2.0.0 ---- - -# Restore-EntraDeletedDirectoryObject - -## Synopsis - -Restore a previously deleted object. - -## Syntax - -```powershell -Restore-EntraDeletedDirectoryObject - -Id - [] -``` - -## Description - -The `Restore-EntraDeletedDirectoryObject` cmdlet is used to restore previously deleted objects, such as application, group, service principal, administrative unit, or user objects. - -When a group or application is deleted, it is initially soft deleted and can be recovered within the first 30 days. After 30 days, the deleted object is permanently deleted and cannot be recovered. - -**Notes:** - -- Only Unified Groups (also known as Office 365 Groups) can be restored; Security groups cannot be restored. -- Restoring an application does not automatically restore its associated service principal. You must explicitly use this cmdlet to restore the deleted service principal. - -For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles: - -- **To restore deleted applications or service principals:** Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. -- **To restore deleted users:** User Administrator. - - However, to restore users with privileged administrator roles: - - In delegated scenarios, the app must be assigned the `Directory.AccessAsUser.All` delegated permission, and the calling user must also be assigned a higher privileged administrator role. - - In app-only scenarios, in addition to being granted the `User.ReadWrite.All` application permission, the app must be assigned a higher privileged administrator role. -- **To restore deleted groups:** Groups Administrator. - - However, to restore role-assignable groups, the calling user must be assigned the Privileged Role Administrator role. - -## Examples - -### Example 1: Restore a deleted object with ID - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' #administrativeUnit resource -Connect-Entra -Scopes 'Application.ReadWrite.All' #application resource -Connect-Entra -Scopes 'Group.ReadWrite.All' #group resource -Connect-Entra -Scopes 'Application.ReadWrite.All' #servicePrincipal resource -Connect-Entra -Scopes 'User.ReadWrite.All' #user resource -Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -``` - -```Output -Id DeletedDateTime --- --------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example shows how to restore a deleted object in Microsoft Entra ID. - -- `-Id` parameter specifies the Id of the directory object to restore. - -### Example 2: Restoring a Soft-Deleted User and Removing Conflicting Proxy Addresses - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -AutoReconcileProxyConflict -``` - -```Output -Id DeletedDateTime --- --------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example shows how to restore a deleted object in Microsoft Entra ID. - -- `-Id` parameter specifies the Id of the directory object to restore. -- `-AutoReconcileProxyConflict` parameter removes any conflicting proxy addresses while restoring a soft-deleted user whose one or more proxy addresses are currently used for an active user. - -## Parameters - -### -Id - -The Id of the directory object to restore. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -AutoReconcileProxyConflict - -Specifies whether Microsoft Entra ID should remove conflicting proxy addresses when restoring a soft-deleted user, if any of the user's proxy addresses are currently in use by an active user. This parameter applies only when restoring a soft-deleted user. The default value is `false`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) - -[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) - -[Remove-EntraDeletedDirectoryObject](Remove-EntraDeletedDirectoryObject.md) - -[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) - -[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md deleted file mode 100644 index 9087e6ebfb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: Set-EntraAdministrativeUnit -description: This article provides details on the Set-EntraAdministrativeUnit command. - -ms.topic: reference -ms.date: 06/19/2023 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit - -schema: 2.0.0 ---- - -# Set-EntraAdministrativeUnit - -## Synopsis - -Updates an administrative unit. - -## Syntax - -```powershell -Set-EntraAdministrativeUnit - -AdministrativeUnitId - [-Description ] - [-DisplayName ] - [] -``` - -## Description - -The `Set-EntraAdministrativeUnit` cmdlet updates an administrative unit in Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to update a specific administrative unit. - -In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. - -The Privileged Role Administrator is the least privileged role required for this operation. - -## Examples - -### Example 1: Update DisplayName - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - DisplayName = 'UpdatedAU' -} -Set-EntraAdministrativeUnit @params -``` - -This Command update DisplayName of specific administrative unit. - -- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. -- `-DisplayName` parameter specifies the display name for the administrative unit. - -### Example 2: Update Description - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - Description = 'Updated AU Description' -} -Set-EntraAdministrativeUnit @params -``` - -This example shows how to update the description of a specific administrative unit. - -- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. -- `-Description` parameter specifies the description for the administrative unit. - -## Parameters - -### -Description - -Specifies a description. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AdministrativeUnitId - -Specifies the Id of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) - -[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) - -[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md deleted file mode 100644 index 71c1d09ff0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: Set-EntraAttributeSet -description: This article provides details on the Set-EntraAttributeSet command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAttributeSet - -schema: 2.0.0 ---- - -# Set-EntraAttributeSet - -## Synopsis - -Updates an existing attribute set. - -## Syntax - -```powershell -Set-EntraAttributeSet - -AttributeSetId - [-Description ] - [-MaxAttributesPerSet ] - [] -``` - -## DESCRIPTION - -The `Set-EntraAttributeSet` cmdlet updates a Microsoft Entra ID attribute set object specified by its ID. Specify `AttributeSetId` parameter to Update a Microsoft Entra ID attribute set object. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. - -Note: Only the Attribute Definition Administrator role is supported for this operation. Ensure the signed-in user is assigned this role. - -You can only update the `description` and `maxAttributesPerSet` properties. - -## Examples - -### Example 1: Update an attribute set - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - AttributeSetId = 'Engineering' - Description = 'Attributes for cloud engineering team' -} -Set-EntraAttributeSet @params -``` - -This example update an attribute set. - -- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. -- `-Description` parameter specifies the description for the attribute set. - -### Example 2: Update an attribute set using MaxAttributesPerSet - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - AttributeSetId = 'Engineering' - MaxAttributesPerSet = 10 -} -Set-EntraAttributeSet @params -``` - -This example update an attribute set using MaxAttributesPerSet. - -- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. -- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. - -## Parameters - -### -Description - -Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AttributeSetId - -Name of the attribute set. Unique identifier for the attribute set within a tenant. This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MaxAttributesPerSet - -Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraAttributeSet](New-EntraAttributeSet.md) - -[Get-EntraAttributeSet](Get-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md deleted file mode 100644 index d91b797cc7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: Set-EntraCustomSecurityAttributeDefinition -description: This article provides details on the Set-EntraCustomSecurityAttributeDefinition command. - - -ms.topic: reference -ms.date: 07/11/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition - -schema: 2.0.0 ---- - -# Set-EntraCustomSecurityAttributeDefinition - -## Synopsis - -Update the properties of a customSecurityAttributeDefinition object. - -## Syntax - -```powershell -Set-EntraCustomSecurityAttributeDefinition - -Id - [-Description ] - [-Status ] - [-UsePreDefinedValuesOnly ] - [] -``` - -## Description - -Update the properties of a customSecurityAttributeDefinition object. Specify `Id` parameter to update a custom security attribute definition. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. - -## Examples - -### Example 1: Update a custom security attribute - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - Id = 'Engineering_ProjectDate' - Description = 'Add-description' - Status = 'Available' - UsePreDefinedValuesOnly = $False -} -Set-EntraCustomSecurityAttributeDefinition @params -``` - -This example update a custom security attribute. - -- `-Id` parameter specifies the custom security attribute definition object ID. -- `-Description` parameter specifies the description of the custom security attribute. -- `-Status` parameter specifies the custom security attribute is active or deactivated. -- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. - -## Parameters - -### -Description - -Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a Microsoft Entra ID custom security attribute definition object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Status - -Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UsePreDefinedValuesOnly - -Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) - -[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md deleted file mode 100644 index a2b37457d9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: Set-EntraCustomSecurityAttributeDefinitionAllowedValue -description: This article provides details on the Set-EntraCustomSecurityAttributeDefinitionAllowedValue command. - -ms.topic: reference -ms.date: 07/11/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue - -schema: 2.0.0 ---- - -# Set-EntraCustomSecurityAttributeDefinitionAllowedValue - -## Synopsis - -Updates an existing custom security attribute definition predefined value. - -## Syntax - -```powershell -Set-EntraCustomSecurityAttributeDefinitionAllowedValue - [-IsActive ] - -CustomSecurityAttributeDefinitionId - -Id [] -``` - -## Description - -The `Set-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdlet update a Microsoft Entra ID custom security attribute definition predefined value object identified by ID. Specify `CustomSecurityAttributeDefinitionId` and `Id` parameter to update a Microsoft Entra ID custom security attribute definition predefined value. - -## Examples - -### Example 1: Update a custom security attribute definition predefined value - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - CustomSecurityAttributeDefinitionId = 'Engineering_Project' - Id = 'Alpine' - IsActive = $true -} -Set-EntraCustomSecurityAttributeDefinitionAllowedValue @params -``` - -This example update a custom security attribute definition predefined value. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. -- `-Id` parameter specifies the ID of Microsoft Entra ID Object. -- `-IsActive` parameter specifies the predefined value is active or deactivated. - -## Parameters - -### -CustomSecurityAttributeDefinitionId - -The unique identifier of customSecurityAttributeDefinition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. This field is optional. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -IsActive - -Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any other supported directory objects. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) - -[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md deleted file mode 100644 index 2e21b12941..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md +++ /dev/null @@ -1,387 +0,0 @@ ---- -title: Set-EntraDevice -description: This article provides details on the Set-EntraDevice command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDevice - -schema: 2.0.0 ---- - -# Set-EntraDevice - -## Synopsis - -Updates a device. - -## Syntax - -```powershell -Set-EntraDevice - -DeviceObjectId - [-DevicePhysicalIds ] - [-DeviceOSType ] - [-DeviceTrustType ] - [-DisplayName ] - [-DeviceMetadata ] - [-ApproximateLastLogonTimeStamp ] - [-AccountEnabled ] - [-IsManaged ] - [-DeviceId ] - [-DeviceObjectVersion ] - [-IsCompliant ] - [-DeviceOSVersion ] - [-AlternativeSecurityIds ] - [-ProfileType ] - [-SystemLabels ] - [] -``` - -## Description - -The `Set-EntraDevice` cmdlet updates a device in Microsoft Entra ID. - -The calling user must have at least the Intune Administrator role in Microsoft Entra. A user with the Cloud Device Administrator role can only enable or disable devices, while a user with the Windows 365 Administrator role can only update basic device properties. - -## Examples - -### Example 1: Update a device display name - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName 'My OS/2 computer' -``` - -This example shows how to update a display name of a specified. - -### Example 2: Update a device alternative security ID - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -$NewId= New-Object Microsoft.Open.AzureAD.Model.AlternativeSecurityId -$NewId.Key =[System.Text.Encoding]::UTF8.GetBytes('test') -$NewId.type = 2 -Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AlternativeSecurityIds $NewId -``` - -This example shows how to update an alternative security ID of a specified device. - -### Example 3: Update a device account enabled - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AccountEnabled $true -``` - -This example shows how to update an account enabled of a specified device. - -### Example 4: Update a device OS type - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DeviceOSType Windows -``` - -This example shows how to update an OS type of a specified device. - -### Example 5: Update a device - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' - -$params = @{ - DeviceObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - DeviceMetadata = 'Testdevice' - DeviceObjectVersion = 4 - DevicePhysicalIds = '[GID]:g:1234567890123456' - IsCompliant = $false -} - -Set-EntraDevice @params -``` - -This example shows how to update multiple properties of a specified device. - -## Parameters - -### -AccountEnabled - -Indicates whether the account is enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AlternativeSecurityIds - -Specifies alternative security IDs. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApproximateLastLogonTimeStamp - -The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderby. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies the device ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceMetadata - -The device metadata for this device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceObjectVersion - -Specifies the object version of the device. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceOSType - -Specifies the operating system. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceOSVersion - -Specifies the operating system version. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DevicePhysicalIds - -Specifies the physical ID. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceTrustType - -Specifies the device trust type. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCompliant - -Indicates whether the device is compliant. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsManaged - -Indicates whether the device is managed. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceObjectId - -Specifies the object ID of a device in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ProfileType - -Specifies the profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SystemLabels - -Specifies list of labels applied to the device by the system. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDevice](Get-EntraDevice.md) - -[New-EntraDevice](New-EntraDevice.md) - -[Remove-EntraDevice](Remove-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md deleted file mode 100644 index 1226207ac6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: Set-EntraDirSyncConfiguration -description: This article provides details on the Set-EntraDirSyncConfiguration command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration - -schema: 2.0.0 ---- - -# Set-EntraDirSyncConfiguration - -## Synopsis - -Modifies the directory synchronization settings. - -## Syntax - -```powershell -Set-EntraDirSyncConfiguration - -AccidentalDeletionThreshold - [-Force] - [-TenantId ] - [] -``` - -## Description - -The `Set-EntraDirSyncConfiguration` cmdlet modifies the directory synchronization settings. - -## Examples - -### Example 1: Set directory synchronization settings - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold 600 -Force -``` - -This command sets directory synchronization settings. - -- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. -- `-Force` Forces the command to run without asking for user confirmation. - -### Example 2: Set directory synchronization settings for a Tenant - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -$tenantID = (Get-EntraContext).TenantId -$params = @{ - AccidentalDeletionThreshold = 600 - TenantId = $tenantID - Force = $true -} - -Set-EntraDirSyncConfiguration @params -``` - -This command sets directory synchronization settings. - -- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. -- `-Force` Forces the command to run without asking for user confirmation. -- `-TenantId` Specifies the unique ID of the tenant. - -## Parameters - -### -AccidentalDeletionThreshold - -Specifies the accidental deletion prevention configuration for a tenant. - -```yaml -Type: System.UInt32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -Forces the command to run without asking for user confirmation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TenantId - -The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. - -```yaml -Type: System.String -Parameter Sets: SetAccidentalDeletionThreshold -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.UInt32 - -### System.Guid - -## Outputs - -### System.Object - -## Notes - -- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). - -## Related Links - -[Get-EntraDirSyncConfiguration](Get-EntraDirSyncConfiguration.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md deleted file mode 100644 index 75055a97f0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Set-EntraDirSyncEnabled -description: This article provides details on the Set-EntraDirSyncEnabled command. - - -ms.topic: reference -ms.date: 09/27/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled - -schema: 2.0.0 ---- - -# Set-EntraDirSyncEnabled - -## Synopsis - -Turns directory synchronization on or off for a company. - -## Syntax - -```powershell -Set-EntraDirSyncEnabled - -EnableDirSync - [-Force] - [-TenantId ] - [] -``` - -## Description - -The `Set-EntraDirSyncEnabled` cmdlet turns directory synchronization on or off for a company. ->[!IMPORTANT] ->It may take up to 72 hours to complete deactivation once you have disabled DirSync through this cmdlet. The time depends on the number of objects that are in your cloud service subscription account. **You cannot cancel the disable action**. It will need to complete before you can take any other action, including re-enabling of DirSync. If you choose to re-enable DirSync, a full synchronization of your synced objects will happen. This may take a considerable time depending on the number of objects in your Microsoft Entra ID. ->[!NOTE] ->If you disable DirSync and you decide to re-enable it, and you have enabled the BlockCloudObjectTakeoverThroughHardMatch feature, OnPrem to cloud object takeover/update for all objects mastered in the Microsoft Entra ID will be blocked. If this is the case and you want to resume syncing Microsoft Entra ID mastered objects with Microsoft Entra ID, set **BlockCloudObjectTakeoverThroughHardMatch** feature to false. - -## Examples - -### Example 1: Turn on directory synchronization - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' -$params = @{ - EnableDirsync = $True - Force = $True -} -Set-EntraDirSyncEnabled @params -``` - -This example turns on directory synchronization for a company. - -- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. -- `-Force` Forces the command to run without asking for user confirmation. - -### Example 2: Turn off directory synchronization - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' -$params = @{ - EnableDirsync = $False - TenantId = 'aaaaaaaa-1111-1111-1111-000000000000' - Force = $True - -} -Set-EntraDirSyncEnabled @params -``` - -This example turns off directory synchronization for a company. - -- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. -- `-Force` Forces the command to run without asking for user confirmation. -- `-TenantId` Specifies the unique ID of the tenant on which to perform the operation. - -## Parameters - -### -EnableDirsync - -Specifies whether to turn on directory synchronization on for your company. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId - -Specifies the unique ID of the tenant on which to perform the operation. -The default value is the tenant of the current user. -This parameter applies only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -Forces the command to run without asking for user confirmation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md deleted file mode 100644 index 7dcceca78b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: Set-EntraDirSyncFeature -description: This article provides details on the Set-EntraDirSyncFeature command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncFeature - -schema: 2.0.0 ---- - -# Set-EntraDirSyncFeature - -## Synopsis - -Used to set identity synchronization features for a tenant. - -## Syntax - -```powershell -Set-EntraDirSyncFeature - -Feature - -Enabled - [-TenantId ] - [-Force] - [] -``` - -## Description - -The `Set-EntraDirSyncFeature` cmdlet sets identity synchronization features for a tenant. - -You can use the following synchronization features with this cmdlet: - -- **EnableSoftMatchOnUpn**: Soft match is the process used to link an object being synced from on-premises for the first time with one that already exists in the cloud. When this feature is enabled, soft match is attempted using the standard logic, based on the primary SMTP address. If a match isn't found based on primary SMTP, then a match is attempted based on UserPrincipalName. Once this feature is enabled, it can't be disabled. -- **PasswordSync**: Used to indicate on-premise password synchronization. -- **SynchronizeUpnForManagedUsers**: Allows for the synchronization of UserPrincipalName updates from on-premises for managed (nonfederated) users that are assigned a license. These updates are blocked if this feature isn't enabled. Once this feature is enabled, it can't be disabled. -- **BlockSoftMatch**: When this feature is enabled, it blocks the soft match feature. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching is completed and is no longer needed. -- **BlockCloudObjectTakeoverThroughHardMatch**: Used to block cloud object takeover via source anchor hard match. - -Enabling some of these features, such as EnableSoftMatchOnUpn and SynchronizationUpnForManagedUsers, is a permanent operation. -You can't disable these features once they're enabled. - -## Examples - -### Example 1: Enable a feature for the tenant - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -$params = @{ - Feature = 'BlockCloudObjectTakeoverThroughHardMatch' - Enable = $True -} -Set-EntraDirSyncFeature @params -``` - -This command enables the SoftMatchOnUpn feature for the tenant. - -- `-Feature` specifies the directory synchronization feature to turn on or off. -- `-Enable` specifies whether the specified features are turned on for the company. -- `-Force` Forces the command to run without asking for user confirmation. - -### Example 2: Block Soft Matching for the tenant - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -$params = @{ - Feature = 'BlockSoftMatch' - Enable = $True -} - -Set-EntraDirSyncFeature @params -``` - -This command enables the BlockSoftMatch feature for the tenant - effectively blocking the Soft Matching feature in the tenant. - -- `-Feature` specifies the directory synchronization feature to turn on or off. -- `-Enable` specifies whether the specified features are turned on for the company. - -### Example 3: Block Cloud object takeover through Hard Matching for the tenant - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -$params = @{ - Feature = 'BlockCloudObjectTakeoverThroughHardMatch' - Enable = $True -} - -Set-EntraDirSyncFeature @params -``` - -This command enables the BlockCloudObjectTakeoverThroughHardMatch feature for the tenant - effectively blocking the Hard Match object takeover. - -- `-Feature` specifies the directory synchronization feature to turn on or off. -- `-Enable` specifies whether the specified features are turned on for the company. -- `-TenantId` Specifies the unique ID of the tenant. - -## Parameters - -### -Feature - -The DirSync feature to turn on or off. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Enable - -Indicates whether the specified features are turned on for the company. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId - -The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -Forces the command to run without asking for user confirmation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). -- For the feature list see the [onPremisesDirectorySynchronizationFeature resource type](https://learn.microsoft.com/graph/api/resources/onpremisesdirectorysynchronizationfeature). - -## Related Links - -[Get-EntraDirSyncFeature](Get-EntraDirSyncFeature.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md deleted file mode 100644 index d2000341f7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Set-EntraDomain -description: This article provides details on the Set-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomain - -schema: 2.0.0 ---- - -# Set-EntraDomain - -## Synopsis - -Updates a domain. - -## Syntax - -```powershell -Set-EntraDomain - -Name - [-IsDefault ] - [-SupportedServices ] - [] -``` - -## Description - -The `Set-EntraDomain` cmdlet updates a verified domain in Microsoft Entra ID. - -The work or school account needs to belong to at least one of the following Microsoft Entra roles: - -- Domain Name Administrator -- Security Administrator -- External Identity Provider Administrator - -## Examples - -### Example 1: Set the domain as the default domain for new user account creation - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Set-EntraDomain -Name Contoso.com -IsDefault $true -``` - -This example demonstrates how to set default domain for new user account in Microsoft Entra ID. - -### Example 2: Set the list of domain capabilities - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Set-EntraDomain -Name Contoso.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') -``` - -This example demonstrates how to set domain capabilities for new user account in Microsoft Entra ID. - -## Parameters - -### -IsDefault - -Indicates whether or not this is the default domain that is used for user creation. -There's only one default domain per company. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -The fully qualified name of the domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SupportedServices - -The capabilities assigned to the domain. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Confirm-EntraDomain](Confirm-EntraDomain.md) - -[Get-EntraDomain](Get-EntraDomain.md) - -[New-EntraDomain](New-EntraDomain.md) - -[Remove-EntraDomain](Remove-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md deleted file mode 100644 index 21dbb0f668..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md +++ /dev/null @@ -1,290 +0,0 @@ ---- -title: Set-EntraDomainFederationSettings -description: This article provides details on the Set-EntraDomainFederationSettings command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings - -schema: 2.0.0 ---- - -# Set-EntraDomainFederationSettings - -## Synopsis - -Updates settings for a federated domain. - -## Syntax - -```powershell -Set-EntraDomainFederationSettings - -DomainName - [-SigningCertificate ] - [-NextSigningCertificate ] - [-LogOffUri ] - [-PassiveLogOnUri ] - [-ActiveLogOnUri ] - [-IssuerUri ] - [-FederationBrandName ] - [-MetadataExchangeUri ] - [-PreferredAuthenticationProtocol ] - [-SigningCertificateUpdateStatus ] - [-PromptLoginBehavior ] - [] -``` - -## Description - -The `Set-EntraDomainFederationSettings` cmdlet is used to update the settings of a single sign-on domain. - -For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: - -- Domain Name Administrator -- External Identity Provider Administrator -- Hybrid Identity Administrator -- Security Administrator - -## Examples - -### Example 1: Set the PromptLoginBehavior - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' - -$params = @{ - DomainName = 'contoso.com' - PreferredAuthenticationProtocol = 'WsFed' - PromptLoginBehavior = 'TranslateToFreshPasswordAuth' # Or 'NativeSupport' or 'Disabled', depending on the requirement -} -Set-EntraDomainFederationSettings @params -``` - -This command updates the `PromptLoginBehavior` to either `TranslateToFreshPasswordAuth`, `NativeSupport`, or `Disabled`. These possible values are described: - -- `TranslateToFreshPasswordAuth` - means the default Microsoft Entra ID behavior of translating `prompt=login` to `wauth=https://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password` and `wfresh=0`. -- `NativeSupport` - means that the `prompt=login` parameter is sent as is to ADFS. -- `Disabled` - means that only wfresh=0 is sent to ADFS - -Use the `Get-EntraDomainFederationSettings -DomainName | Format-List *` to get the values for `PreferredAuthenticationProtocol` and `PromptLoginBehavior` for the federated domain. - -- `-DomainName` parameter specifies the fully qualified domain name to retrieve. -- `-PreferredAuthenticationProtocol` parameter specifies the preferred authentication protocol. -- `-PromptLoginBehavior` parameter specifies the prompt sign-in behavior. - -## Parameters - -### -DomainName - -The fully qualified domain name (FQDN) to update. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -SigningCertificate - -The current certificate used to sign tokens passed to the Microsoft Entra ID Identity platform. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NextSigningCertificate - -The next token signing certificate that will be used to sign tokens when the primary signing certificate expires. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -LogOffUri - -The URL clients are redirected to when they sign out of Microsoft Entra ID services. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PassiveLogOnUri - -The URL that web-based clients will be directed to when signing in to Microsoft Entra ID services. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ActiveLogOnUri - -A URL that specifies the end point used by active clients when authenticating with domains set up for single sign-on (also known as identity federation) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -IssuerUri - -The unique identifier of the domain in the Microsoft Entra ID Identity platform derived from the federation server. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -FederationBrandName - -The name of the string value shown to users when signing in to Microsoft Entra ID. -We recommend that customers use something that is familiar to -users such as "Contoso Inc." - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 8 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MetadataExchangeUri - -The URL that specifies the metadata exchange end point used for authentication from rich client applications such as Lync Online. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 9 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PreferredAuthenticationProtocol - -Specifies the preferred authentication protocol. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 10 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SigningCertificateUpdateStatus - -Specifies the update status of the signing certificate. - -```yaml -Type: System.Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 11 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PromptLoginBehavior - -Specifies the prompt login behavior. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 12 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDomainFederationSettings](Get-EntraDomainFederationSettings.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md deleted file mode 100644 index 1a4ad58b18..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md +++ /dev/null @@ -1,242 +0,0 @@ ---- -title: Set-EntraPartnerInformation -description: This article provides details on the Set-EntraPartnerInformation command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPartnerInformation - -schema: 2.0.0 ---- - -# Set-EntraPartnerInformation - -## Synopsis - -Sets company information for partners. - -## Syntax - -```powershell -Set-EntraPartnerInformation - [-CompanyType ] - [-PartnerCompanyName ] - [-PartnerSupportTelephones ] - [-PartnerSupportEmails ] - [-PartnerCommerceUrl ] - [-PartnerSupportUrl ] - [-PartnerHelpUrl ] - [-TenantId ] - [] -``` - -## Description - -The `Set-EntraPartnerInformation` cmdlet is used by partners to set partner-specific properties. - -These properties can view by all tenants that the partner has access to. - -## Examples - -### Example 1: Update the help URL - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraPartnerInformation -PartnerHelpUrl 'http://www.help.contoso.com' -``` - -This example shows how to update the help URL. - -### Example 2: Update the Support URL - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraPartnerInformation -PartnerSupportUrl 'http://www.test1.com' -``` - -This example shows how to update the support URL. - -### Example 3: Update the Commerce URL - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraPartnerInformation -PartnerCommerceUrl 'http://www.test1.com' -``` - -This example shows how to update the commerce URL. - -### Example 4: Update the SupportEmails - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraPartnerInformation -PartnerSupportEmails 'contoso@example.com' -``` - -This example shows how to update the support email addresses. - -### Example 5: Update the SupportTelephones - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -$tenantId = (Get-EntraContext).TenantId -$params = @{ - PartnerSupportTelephones = '234234234' - TenantId = $tenantId -} -Set-EntraPartnerInformation @params -``` - -This example shows how to update support telephone numbers. - -## Parameters - -### -PartnerCommerceUrl - -Specifies the URL for the partner's commerce website. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerHelpUrl - -Specifies the URL for the partner's Help website. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerSupportEmails - -Specifies the support email address for the partner. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerSupportTelephones - -Specifies the support telephone numbers for the partner. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerSupportUrl - -Specifies the URL for the partner's support website. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId - -Specifies the unique ID of the tenant on which to perform the operation. -The default value is the tenant of the current user. -This parameter applies only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -CompanyType - -Specifies the partner's company type. - -```yaml -Type: CompanyType -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerCompanyName - -Specifies the partner's company name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPartnerInformation](Get-EntraPartnerInformation.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md deleted file mode 100644 index 24191c6eb6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md +++ /dev/null @@ -1,216 +0,0 @@ ---- -title: Set-EntraTenantDetail -description: This article provides details on the Set-EntraTenantDetail command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTenantDetail - -schema: 2.0.0 ---- - -# Set-EntraTenantDetail - -## Synopsis - -Set contact details for a tenant. - -## Syntax - -```powershell -Set-EntraTenantDetail - [-PrivacyProfile ] - [-MarketingNotificationEmails ] - [-TechnicalNotificationMails ] - [-SecurityComplianceNotificationMails ] - [-SecurityComplianceNotificationPhones ] - [] -``` - -## Description - -This cmdlet is used to set various contact details for a tenant. - -For delegated scenarios, the signed-in user must have at least one of the following Microsoft Entra roles. - -- Application Administrator -- Cloud Application Administrator -- Privileged Role Administrator -- User Administrator -- Helpdesk Administrator - -## Examples - -### Example 1: Set contact details for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -$params = @{ - MarketingNotificationEmails = @('amy@contoso.com', 'henry@contoso.com') - SecurityComplianceNotificationMails = @('john@contoso.com', 'mary@contoso.com') - SecurityComplianceNotificationPhones = @('1-555-625-9999', '1-555-233-5544') - TechnicalNotificationMails = 'peter@contoso.com' -} - -Set-EntraTenantDetail @params -``` - -This example demonstrates how to set various contact details for a tenant. - -- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. -- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. -- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. -- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. - -### Example 2: Set MarketingNotificationEmails for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraTenantDetail -MarketingNotificationEmails @('amy@contoso.com','henry@contoso.com') -``` - -This example demonstrates how to set MarketingNotificationEmails detail for a tenant. - -- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. - -### Example 3: Set SecurityComplianceNotificationMails for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraTenantDetail -SecurityComplianceNotificationMails @('john@contoso.com','mary@contoso.com') -``` - -This example demonstrates how to set SecurityComplianceNotificationMails detail for a tenant. - -- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. - -### Example 4: Set -SecurityComplianceNotificationPhones for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraTenantDetail -SecurityComplianceNotificationPhones @('1-555-625-9999', '1-555-233-5544') -``` - -This example demonstrates how to set MarketingNotificationEmails detail for a tenant. - -- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. - -### Example 5: Set TechnicalNotificationMails for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraTenantDetail -TechnicalNotificationMails 'peter@contoso.com' -``` - -This example demonstrates how to set TechnicalNotificationMails detail for a tenant. - -- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. - -## Parameters - -### -MarketingNotificationEmails - -The email addresses that are used to send marketing notification emails. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityComplianceNotificationMails - -The email addresses that are used to send security compliance emails. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityComplianceNotificationPhones - -One or more phone numbers that are used for security compliance. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TechnicalNotificationMails - -The email addresses that are used for technical notification emails. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivacyProfile - -Represents a company's privacy profile, which includes a privacy statement URL and a contact person for questions regarding the privacy statement. - -```yaml -Type: PrivacyProfile -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -- For more details see [Update organization](https://learn.microsoft.com/graph/api/organization-update). - -## Related Links - -[Get-EntraTenantDetail](Get-EntraTenantDetail.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md deleted file mode 100644 index 7c86ba6f95..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md +++ /dev/null @@ -1,282 +0,0 @@ ---- -title: Get-EntraDirectoryRoleAssignment -description: This article provides details on the Get-EntraDirectoryRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRoleAssignment - -## Synopsis - -Get a Microsoft Entra ID roleAssignment. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDirectoryRoleAssignment - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetValue - -```powershell -Get-EntraDirectoryRoleAssignment - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDirectoryRoleAssignment - -UnifiedRoleAssignmentId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRoleAssignment` cmdlet gets information about role assignments in Microsoft Entra ID. To get a role assignment, specify the `UnifiedRoleAssignmentId` parameter. Specify the `SearchString` or `Filter` parameter to find a particular role assignment. - -In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: - -- microsoft.directory/roleAssignments/standard/read (least privileged) -- microsoft.directory/roleAssignments/allProperties/read -- microsoft.directory/roleAssignments/allProperties/allTasks - -The least privileged roles for this operation, from least to most privileged, are: - -- Directory Readers -- Global Reader -- Privileged Role Administrator - -## Examples - -### Example 1: Get role assignments - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets the role assignments in Microsoft Entra ID. - -### Example 2: Get role assignments using 'All' parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -All -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets all the role assignments in Microsoft Entra ID. - -### Example 3: Get role assignments by Id - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId '00001111-aaaa-2222-bbbb-3333cccc4444' -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets the role assignments using specified roleAssignment Id. - -- `UnifiedRoleAssignmentId` parameter specifies the roleAssignment object ID. - -### Example 4: Get role assignments filter by principalId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -Filter "principalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets the role assignments containing the specified principalId. - -### Example 5: Get role assignments filter by roleDefinitionId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -Filter "roleDefinitionId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets the role assignments containing the specified roleDefinitionId. - -### Example 6: Get top two role assignments - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -Top 2 -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets top two role assignments. - -## Parameters - -### -UnifiedRoleAssignmentId - -The unique identifier of a Microsoft Entra ID roleAssignment object. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment - -## Notes - -`Get-EntraRoleAssignment` is an alias for `Get-EntraDirectoryRoleAssignment`. - -## Related Links - -[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) - -[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md deleted file mode 100644 index 7fcd4cd5a8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: Get-EntraDirectoryRoleDefinition -description: This article provides details on the Get-EntraDirectoryRoleDefinition command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRoleDefinition - -## Synopsis - -Gets information about role definitions in Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDirectoryRoleDefinition - [-All] - [-Top ] - [-Filter ] - [-Property ] - [] -``` - -### GetVague - -```powershell -Get-EntraDirectoryRoleDefinition - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDirectoryRoleDefinition - -UnifiedRoleDefinitionId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRoleDefinition` cmdlet gets information about role definitions in Microsoft Entra ID. To get a role definition, specify the `UnifiedRoleDefinitionId` parameter. Specify the `SearchString` or `Filter` parameter to find particular role definition. - -In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: - -- microsoft.directory/roleAssignments/standard/read (least privileged) -- microsoft.directory/roleAssignments/allProperties/read -- microsoft.directory/roleAssignments/allProperties/allTasks - -The least privileged roles for this operation, from least to most privileged, are: - -- Directory Readers -- Global Reader -- Privileged Role Administrator - -## Examples - -### Example 1: Get all role definitions - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -``` - -```Output -DisplayName Id TemplateId Description ------------ -- ---------- ----------- -Guest User 10dae51f-b6af-4016-8d66-8c2a99b929b3 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. -Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. -``` - -This command returns all the role definitions present. - -### Example 2: Get a role definition by UnifiedRoleDefinitionId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId '1a327991-10cb-4266-877a-998fb4df78ec' -``` - -```Output -DisplayName Id TemplateId Description ------------ -- ---------- ----------- -Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. -``` - -This command returns a specified role definition. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. - -### Example 3: Filter role definitions by display name - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -Filter "startsWith(displayName, 'Restricted')" -``` - -```Output -DisplayName Id TemplateId Description ------------ -- ---------- ----------- -Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. -``` - -This command return all the role definitions containing the specified display name. - -### Example 4: Get top two role definition - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -Top 2 -``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -Restricted Guest User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. True True -``` - -This command return top two the role definitions in Microsoft Entra DirectoryRoleId. - -### Example 5: Filter role definitions by display name - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -SearchString 'Global' - ``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -Global Administrator 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identit… -Global Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff f2ef992c-3afb-46b9-b7cf-a126ee74c451 Can read everything that a Global Administrator can, but not update anything. -``` - -This command return all the role definitions containing the specified display name. - -## Parameters - -### -UnifiedRoleDefinitionId - -Specifies the UnifiedRoleDefinitionId of the role definition. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records that this cmdlet gets. The default value is 100. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter string to match a set of role definitions. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -`Get-EntraRoleDefinition` is an alias for `Get-EntraDirectoryRoleDefintion`. - -## Related Links - -[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) - -[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) - -[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md deleted file mode 100644 index aae90daa6d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: New-EntraDirectoryRoleAssignment -description: This article provides details on the New-EntraDirectoryRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment - -schema: 2.0.0 ---- - -# New-EntraDirectoryRoleAssignment - -## Synopsis - -Create a new Microsoft Entra ID roleAssignment. - -## Syntax - -```powershell -New-EntraDirectoryRoleAssignment - -PrincipalId - -RoleDefinitionId - [-DirectoryScopeId ] - [] -``` - -## Description - -The `New-EntraDirectoryRoleAssignment` cmdlet creates a new Microsoft Entra role assignment. - -## Examples - -### Example 1: Create a new Microsoft Entra ID role assignment - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' -$params = @{ - RoleDefinitionId = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' - PrincipalId = 'aaaaaaaa-bbbb-cccc-1111-222222222222' - DirectoryScopeId = '/' - } - -New-EntraDirectoryRoleAssignment @params -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command creates a new role assignment in Microsoft Entra ID. - -- `-RoleDefinitionId` parameter specifies the ID of the role definition that you want to assign. Role definitions describe the permissions that are granted to users or groups by the role. This is the Identifier of the `unifiedRoleDefinition` the assignment is for. - -- `-PrincipalId` parameter specifies the ID of the principal (user, group, or service principal) to whom the role is being assigned. - -- `-DirectoryScopeId` parameter specifies the scope of the directory over which the role assignment is effective. The '/' value typically represents the root scope, meaning the role assignment is applicable across the entire directory. - -## Parameters - -### -DirectoryScopeId - -Specifies the scope for the role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrincipalId - -Specifies the principal for role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RoleDefinitionId - -Specifies the role definition for role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment - -## Notes - -`New-EntraRoleAssignment` is an alias for `New-EntraDirectoryRoleAssignment`. - -## Related Links - -[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) - -[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md deleted file mode 100644 index d55868d7d6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md +++ /dev/null @@ -1,330 +0,0 @@ ---- -title: New-EntraDirectoryRoleDefinition -description: This article provides details on the New-EntraDirectoryRoleDefinition command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition - -schema: 2.0.0 ---- - -# New-EntraDirectoryRoleDefinition - -## Synopsis - -Create a new Microsoft Entra ID roleDefinition. - -## Syntax - -```powershell -New-EntraDirectoryRoleDefinition - [-TemplateId ] - -DisplayName - -RolePermissions - [-Description ] - [-Version ] - -IsEnabled - [-ResourceScopes ] - [] -``` - -## Description - -Create a new Microsoft Entra ID roleDefinition object. - -## Examples - -### Example 1: Creates a new role definition - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output - -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 93ff7659-04bd-4d97-8add-b6c992cce98e False False - -``` - -This command creates a new role definition in Microsoft Entra ID. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. - -### Example 2: Creates a new role definition with Description parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' - Description = 'Role Definition demo' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output - -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 e14cb8e2-d696-4756-bd7f-c7df25271f3d Role Definition demo False False - -``` - -This command creates a new role definition with Description parameter. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-Description` parameter specifies the description for the role definition. - -### Example 3: Creates a new role definition with ResourceScopes parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' - ResourceScopes = '/' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 2bc29892-ca2e-457e-b7c0-03257a0bcd0c False False - -``` - -This command creates a new role definition with ResourceScopes parameter. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-ResourceScopes` parameter specifies the resource scopes for the role definition. - -### Example 4: Creates a new role definition with TemplateId parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' - TemplateId = '4dd5aa9c-cf4d-4895-a993-740d342802b9' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 4dd5aa9c-cf4d-4895-a993-740d342802b9 False False - -``` - -This command creates a new role definition with TemplateId parameter. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-TemplateId` parameter specifies the template ID for the role definition. - -### Example 5: Creates a new role definition with Version parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' - Version = '2' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 b69d16e9-b3f9-4289-a87f-8f796bd9fa28 False False - -``` - -This command creates a new role definition with Version parameter. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-Version` parameter specifies the version for the role definition. - -## Parameters - -### -Description - -Specifies a description for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsEnabled - -Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role isn't available for assignment. Read-only when `isBuiltIn` is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceScopes - -Specifies the resource scopes for the role definition. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RolePermissions - -Specifies permissions for the role definition. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TemplateId - -Specifies the template ID for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Version - -Specifies version for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition - -## Notes - -`New-EntraRoleDefinition` is an alias for `New-EntraDirectoryRoleDefintion`. - -## Related Links - -[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) - -[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) - -[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md deleted file mode 100644 index ba9841b7cd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Remove-EntraDirectoryRoleAssignment -description: This article provides details on the Remove-EntraDirectoryRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment - -schema: 2.0.0 ---- - -# Remove-EntraDirectoryRoleAssignment - -## Synopsis - -Delete a Microsoft Entra ID roleAssignment. - -## Syntax - -```powershell -Remove-EntraDirectoryRoleAssignment - -UnifiedRoleAssignmentId - [] -``` - -## Description - -The `Remove-EntraDirectoryRoleAssignment` cmdlet removes a role assignment from Microsoft Entra ID. - -## Examples - -### Example 1: Remove a role assignment - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' -Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId Y1vFBcN4i0e3ngdNDocmngJAWGnAbFVAnJQyBBLv1lM-1 -``` - -This example removes the specified role assignment from Microsoft Entra ID. - -- `-Id` parameter specifies the role assignment ID. - -## Parameters - -### -UnifiedRoleAssignmentId - -The unique identifier of an object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -`Remove-EntraRoleAssignment` is an alias for `Remove-EntraDirectoryRoleAssignment`. - -## Related Links - -[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) - -[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md deleted file mode 100644 index d80058e54d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Remove-EntraDirectoryRoleDefinition -description: This article provides details on the Remove-EntraDirectoryRoleDefinition command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition - -schema: 2.0.0 ---- - -# Remove-EntraDirectoryRoleDefinition - -## Synopsis - -Delete a Microsoft Entra ID Directory roleDefinition object. - -## Syntax - -```powershell -Remove-EntraDirectoryRoleDefinition - -UnifiedRoleDefinitionId - [] -``` - -## Description - -Delete a Microsoft Entra ID Directory roleDefinition object by ID. - -You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. - -## Examples - -### Example 1: Remove a specified role definition - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 -``` - -This example demonstrates how to remove the specified role definition from Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. - -## Parameters - -### -UnifiedRoleDefinitionId - -The unique identifier of an object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -`Remove-EntraRoleDefinition` is an alias for `Remove-EntraDirectoryRoleDefintion`. - -## Related Links - -[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) - -[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) - -[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md deleted file mode 100644 index d00e0c6818..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md +++ /dev/null @@ -1,267 +0,0 @@ ---- -title: Set-EntraDirectoryRoleDefinition -description: This article provides details on the Set-EntraDirectoryRoleDefinition command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition - -schema: 2.0.0 ---- - -# Set-EntraDirectoryRoleDefinition - -## Synopsis - -Update an existing Microsoft Entra ID roleDefinition. - -## Syntax - -```powershell -Set-EntraDirectoryRoleDefinition - [-TemplateId ] - [-DisplayName ] - [-RolePermissions ] - -UnifiedRoleDefinitionId - [-Description ] - [-Version ] - [-IsEnabled ] - [-ResourceScopes ] - [] -``` - -## Description - -Updates a Microsoft Entra roleDefinition object identified by ID. You can't update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. - -## Examples - -### Example 1: Update an roleDefinition - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" -Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -DisplayName 'UpdatedDisplayName' -``` - -This example updates the specified role definition in Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. -- `-DisplayName` parameter specifies the display name for the role definition. - -### Example 2: Update an roleDefinition with Description - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" -Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -Description 'MYROLEUPDATE1S' -``` - -This example updates the Description of specified role definition in Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. -- `-Description` parameter specifies the description for the role definition. - -### Example 3: Update an roleDefinition with IsEnabled - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" -Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -IsEnabled $true -``` - -This example updates the IsEnabled of specified role definition in Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. -- `-IsEnabled` parameter specifies whether the role definition is enabled. - -### Example 4: Update an roleDefinition - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/standard/read") -$params = @{ - UnifiedRoleDefinitionId = $roleDefinition.Id - Description = 'Update' - DisplayName = 'Update' - ResourceScopes = '/' - IsEnabled = $false - RolePermissions = $RolePermissions - TemplateId = '54d418b2-4cc0-47ee-9b39-e8f84ed8e073' - Version = 2 -} - -Set-EntraDirectoryRoleDefinition @params -``` - -This example updates the RolePermissions, TemplateId, TemplateId, ResourceScopes of specified role definition in Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-Description` parameter specifies the description for the role definition. -- `-ResourceScopes` parameter specifies the resource scopes for the role definition. -- `-TemplateId` parameter specifies the template ID for the role definition. -- `-Version` parameter specifies the version for the role definition. - -## Parameters - -### -UnifiedRoleDefinitionId - -Specifies the roleDefinition object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Description - -Specifies a description for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsEnabled - -Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role is not available for assignment. Read-only when `isBuiltIn` is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceScopes - -Specifies the resource scopes for the role definition. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RolePermissions - -Specifies permissions for the role definition. List of permissions included in the role. Read-only when `isBuiltIn` is `true`. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TemplateId - -Specifies the template ID for the role definition. A custom template ID can be set when `isBuiltIn` is `false`. This ID is typically used to keep the same identifier across different directories. It is read-only when `isBuiltIn` is `true`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Version - -Specifies version for the role definition. Indicates version of the role definition. Read-only when `isBuiltIn` is `true`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -`Set-EntraRoleDefinition` is an alias for `Set-EntraDirectoryRoleDefintion`. - -## Related Links - -[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) - -[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md deleted file mode 100644 index cca67243d0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Add-EntraGroupMember -description: This article explains the Add-EntraGroupMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupMember - -schema: 2.0.0 ---- - -# Add-EntraGroupMember - -## Synopsis - -Adds a member to a group. - -## Syntax - -```powershell -Add-EntraGroupMember - -GroupId - -RefObjectId - [] -``` - -## Description - -The Add-EntraGroupMember cmdlet adds a member to a group. - -## Examples - -### Example 1: Add a member to a group - -```powershell -Connect-Entra -Scopes 'GroupMember.ReadWrite.All' -$params = @{ - GroupId = 'dddddddd-2222-3333-5555-rrrrrrrrrrrr' - RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' -} - -Add-EntraGroupMember @params -``` - -This example demonstrates how to add a member to a group. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object that is assigned as an owner, manager, or member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroupMember](Get-EntraGroupMember.md) - -[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md deleted file mode 100644 index 2e74ae568b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Add-EntraGroupOwner -description: This article explains the Add-EntraGroupOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupOwner - -schema: 2.0.0 ---- - -# Add-EntraGroupOwner - -## Synopsis - -Adds an owner to a group. - -## Syntax - -```powershell -Add-EntraGroupOwner - -GroupId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraGroupOwner` cmdlet adds an owner to a Microsoft Entra ID group. Specify the `GroupId` and `RefObjectId` parameters to add an owner to a group. - -`-GroupId` - specifies the unique identifier (Object ID) of the group to which you want to add an owner. - -`-RefObjectId` - specifies the unique identifier (Object ID) of the owner to be added to the group. - -## Examples - -### Example 1: Add an owner to a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$user = Get-EntraUser -UserId 'SawyerM@contoso.com' -$params = @{ - GroupId = $group.ObjectId - RefObjectId = $user.ObjectId -} - -Add-EntraGroupOwner @params -``` - -This example demonstrates how to add an owner to a group. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object that will be assigned as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroupOwner](Get-EntraGroupOwner.md) - -[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md deleted file mode 100644 index df79fef7d9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Add-EntraLifecyclePolicyGroup -description: This article provides details on the Add-EntraLifecyclePolicyGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup - -schema: 2.0.0 ---- - -# Add-EntraLifecyclePolicyGroup - -## Synopsis - -Adds a group to a lifecycle policy. - -## Syntax - -```powershell -Add-EntraLifecyclePolicyGroup - -GroupId - -GroupLifecyclePolicyId - [] -``` - -## Description - -The `Add-EntraLifecyclePolicyGroup` cmdlet adds a group to a lifecycle policy in Microsoft Entra ID. - -## Examples - -### Example 1: Add a group to the lifecycle policy - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" -$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 -$params = @{ - GroupLifecyclePolicyId = $policy.Id - groupId = $group.ObjectId -} -Add-EntraLifecyclePolicyGroup @params -``` - -This example adds a group to the lifecycle policy. - -- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy add to the group. -- `-GroupId` parameter specifies the ID of the group add to the Lifecycle Policy. - -## Parameters - -### -GroupId - -Specifies the ID of an Office365 group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifecyclePolicyId - -Specifies the ID of the lifecycle policy object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) - -[Remove-EntraLifecyclePolicyGroup](Remove-EntraLifecyclePolicyGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md deleted file mode 100644 index f85a857377..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md +++ /dev/null @@ -1,293 +0,0 @@ ---- -title: Get-EntraDeletedGroup -description: This article provides details on the Get-EntraDeletedGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedGroup - -schema: 2.0.0 ---- - -# Get-EntraDeletedGroup - -## Synopsis - -This cmdlet is used to retrieve the soft deleted groups in a Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDeletedGroup - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraDeletedGroup - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDeletedGroup - -GroupId - [-All] - [-Property ] - [] -``` - -### GetVague - -```powershell -Get-EntraBetaDeletedGroup - [-All] - [-SearchString ] - [-Property ] - [] -``` - -## Description - -This cmdlet retrieves soft-deleted groups from a directory. When a group is deleted, it is soft deleted and can be recovered within 30 days. After 30 days, the group is permanently deleted and cannot be recovered. - -Please note that soft delete currently applies only to Unified Groups (also known as Office 365 Groups). - -## Examples - -### Example 1: Get deleted groups in the directory - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} -test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} -test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} -``` - -This cmdlet retrieves all recoverable deleted groups in the Microsoft Entra ID. - -### Example 2: Get deleted groups in the directory using All parameter - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -All -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} -test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} -test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} -``` - -This cmdlet retrieves all recoverable deleted groups in the directory, using All parameter. - -### Example 3: Get top two deleted groups - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -Top 2 -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} -``` - -This cmdlet retrieves top two deleted groups in the directory. - -### Example 4: Get deleted groups containing string 'test2' - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -SearchString 'test2' -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} -test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} -test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} -``` - -This cmdlet retrieves deleted groups in the directory, containing the specified string. - -### Example 5: Get deleted groups filter by display name - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -Filter "displayName eq 'test21'" -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -``` - -This cmdlet retrieves deleted groups in the directory, having the specified display name. - -### Example 6: Get deleted group by GroupId - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -GroupId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -``` - -This cmdlet retrieves the deleted group specified by GroupId. - -- `-GroupId` parameter specifies the deleted group GroupId. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GroupId - -The GroupId of the deleted group to be retrieved. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md deleted file mode 100644 index 62d509e6c3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md +++ /dev/null @@ -1,309 +0,0 @@ ---- -title: Get-EntraGroup -description: This article explains the Get-EntraGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroup - -schema: 2.0.0 ---- - -# Get-EntraGroup - -## Synopsis - -Gets a group. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraGroup - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraGroup - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraGroup - -GroupId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroup` cmdlet gets a group in Microsoft Entra ID. Specify the `ObjectId` parameter to get a specific group. - -## Examples - -### Example 1: Get all groups - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -``` - -```Output -DisplayName Id MailNickname Description ------------ -- ------------ ----------- -SimpleTestGrp aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NickName -SimpleGroup bbbbbbbb-1111-2222-3333-cccccccccccc NickName -testGroupInAU10 cccccccc-2222-3333-4444-dddddddddddd testGroupInAU10 testGroupInAU10 -My new group dddddddd-3333-4444-5555-eeeeeeeeeeee NotSet New created group -SimpleGroup eeeeeeee-4444-5555-6666-ffffffffffff NickName -``` - -This example demonstrates how to get all groups from Microsoft Entra ID. - -### Example 2: Get a specific group by using an GroupId - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -GroupId 'pppppppp-4444-0000-8888-yyyyyyyyyyyy' -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneaglegroup Crimson Eagle Group {Unified} -``` - -This example demonstrates how to retrieve specific group by providing ID. - -### Example 3: Get top five groups - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -Top 5 -``` - -```Output -DisplayName Id MailNickname Description ------------ -- ------------ ----------- -Contoso Group hhhhhhhh-3333-5555-3333-qqqqqqqqqqqq contosogroup Contoso Group -Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneagle Crimson Eagle Group -Bold Falcon tttttttt-0000-3333-9999-mmmmmmmmmmmm boldfalcon Bold Falcon Group -Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda -Misty Fox kkkkkkkk-3333-5555-1111-nnnnnnnnnnnn mistyfox Misty Fox Group -``` - -This example demonstrates how to get top five groups. - -### Example 4: Get a group by DisplayName - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -Filter "DisplayName eq 'Azure Panda'" -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda {Unified} -``` - -In this example, we retrieve group using the Display Name. - -### Example 5: Get groups that contain a search string - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -SearchString 'New' -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -New Sparkling Deer bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq newsparklingdeer New Sparkling Deer Group {Unified} -New Golden Fox xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb newgoldenfox New Golden Fox {DynamicMembership} -``` - -This example demonstrates how to retrieve groups that include the text new in their display names from Microsoft Entra ID. - -### Example 6: Listing ownerless groups - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -$allGroups = Get-EntraGroup -All -$groupsWithoutOwners = foreach ($group in $allGroups) { - $owners = Get-EntraGroupOwner -ObjectId $group.Id - if ($owners.Count -eq 0) { - $group - } -} -$groupsWithoutOwners | Format-Table DisplayName, Id, GroupTypes -``` - -```Output -DisplayName Id GroupTypes ------------ -- ---------- -My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} -HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} -``` - -This example demonstrates how to retrieve groups without owners. By identifying ownerless groups, IT admins can improve overall governance and operational efficiency. - -### Example 7: Listing empty groups - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -$allGroups = Get-EntraGroup -All -$groupsWithoutMembers = foreach ($group in $allGroups) { - $members = Get-EntraGroupMember -ObjectId $group.Id - if ($members.Count -eq 0) { - $group - } -} -$groupsWithoutMembers | Format-Table DisplayName, Id, GroupTypes -``` - -```Output -DisplayName Id GroupTypes ------------ -- ---------- -My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} -HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} -``` - -This example demonstrates how to retrieve groups without members. By identifying memberless groups, IT admins can identify and clean up unused or obsolete groups that no longer serve a purpose. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GroupId - -The unique identifier of a group in Microsoft Entra ID (GroupId) - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetValue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraGroup](New-EntraGroup.md) - -[Remove-EntraGroup](Remove-EntraGroup.md) - -[Set-EntraGroup](Set-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md deleted file mode 100644 index 724b696cec..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Get-EntraGroupAppRoleAssignment -description: This article provides details on the Get-EntraGroupAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment - -schema: 2.0.0 ---- - -# Get-EntraGroupAppRoleAssignment - -## Synopsis - -Gets a group application role assignment. - -## Syntax - -```powershell -Get-EntraGroupAppRoleAssignment - -GroupId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroupAppRoleAssignment` cmdlet gets a group application role assignment in Microsoft Entra ID. Specify the `GroupId` parameter to get a group application role assignment. - -## Examples - -### Example 1: Retrieve application role assignments of a group - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$GroupId = (Get-EntraGroup -Top 1).ObjectId -Get-EntraGroupAppRoleAssignment -GroupId $GroupId -``` - -```Output -ObjectId ResourceDisplayName PrincipalDisplayName --------- ------------------- -------------------- -MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR -MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR -MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR -``` - -This example retrieves the application role assignments of a group. - -- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. - -### Example 2: Retrieve all application role assignments of a group - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -All -``` - -```Output -ObjectId ResourceDisplayName PrincipalDisplayName --------- ------------------- -------------------- -MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR -MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR -MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR -``` - -This example retrieves all application role assignments of the specified group. - -- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. - -### Example 3: Retrieve top two application role assignments of a group - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -Top 2 -``` - -```Output -ObjectId ResourceDisplayName PrincipalDisplayName --------- ------------------- -------------------- -MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR -MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR -``` - -This example retrieves top two application role assignments of the specified group. - -- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) - -[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) - -[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md deleted file mode 100644 index 9df4ac2bb7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Get-EntraGroupLifecyclePolicy -description: This article provides details on the Get-EntraGroupLifecyclePolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy - -schema: 2.0.0 ---- - -# Get-EntraGroupLifecyclePolicy - -## Synopsis - -Retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. -If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraGroupLifecyclePolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraGroupLifecyclePolicy - -GroupLifecyclePolicyId - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroupLifecyclePolicy` command retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. Specify the `-GroupLifecyclePolicyId` parameter to get the group lifecycle policy. -If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. - -## Examples - -### Example 1: Retrieve all groupLifecyclePolicies - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraGroupLifecyclePolicy -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -eeeeeeee-4444-5555-6666-ffffffffffff example@contoso.com 200 Selected -``` - -This example demonstrates how to retrieve the properties and relationships of all groupLifecyclePolicies in Microsoft Entra ID. - -### Example 2: Retrieve properties of an groupLifecyclePolicy - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 Selected -``` - -This command is used to retrieve a specific Microsoft Group Lifecycle Policy. - -- `-GroupLifecyclePolicyId` parameter specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. - -## Parameters - -### -GroupLifecyclePolicyId - -Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md deleted file mode 100644 index bdd0673a08..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: Get-EntraGroupMember -description: This article provides details on the Get-EntraGroupMember command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupMember - -schema: 2.0.0 ---- - -# Get-EntraGroupMember - -## Synopsis - -Gets a member of a group. - -## Syntax - -```powershell -Get-EntraGroupMember - -GroupId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroupMember` cmdlet gets a member of a group in Microsoft Entra ID. Specify the `GroupId` parameter to get a member of a group. - -In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: `microsoft.directory/groups/members/read`, `microsoft.directory/groups/members/limitedRead`, or `microsoft.directory/groups/hiddenMembers/read` (for hidden members). The following least privileged roles support this operation: - -- Group owners -- "Member" users -- "Guest" users (with limited read permissions) -- Directory Readers -- Directory Writers -- Groups Administrator -- User Administrator (includes hidden members) -- Exchange Administrator (includes hidden members) -- SharePoint Administrator (includes hidden members) -- Intune Administrator (includes hidden members) -- Teams Administrator (includes hidden members) -- Yammer Administrator (includes hidden members) - -To list members of a hidden group, the `Member.Read.Hidden` permission is also required. - -## Examples - -### Example 1: Get a group member by ID - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupMember -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-7777-8888-9999-cccccccccccc -``` - -This example demonstrates how to retrieve group member by ID. - -- `-GroupId` Specifies the ID of a group. - -### Example 2: Get two group member - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupMember -GroupId 'hhhhhhhh-8888-9999-8888-cccccccccccc' -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -``` - -This example demonstrates how to retrieve top two groups from Microsoft Entra ID. - -- `-GroupId` specifies the ID of a group. - -### Example 3: Get all members within a group by group ID - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' -All -``` - -```Output -Id DeletedDateTime --- --------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb -bbbbbbbb-7777-8888-9999-cccccccccccc -cccccccc-8888-9999-0000-dddddddddddd -``` - -This example retrieves all members within a group by group ID. - -- `-GroupId` specifies the ID of a group. - -### Example 4: Retrieve and Select Group Member Properties - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' | Select-Object DisplayName, '@odata.type' -``` - -```Output -displayName @odata.type ------------ ----------- -test1 #microsoft.graph.user -test2 #microsoft.graph.user -test2 #microsoft.graph.servicePrincipal -test3 #microsoft.graph.servicePrincipal -``` - -This example retrieves the members of a specified group by its `GroupId` and selects only the `DisplayName` and `@odata.type` properties for each member. - -- `-GroupId` specifies the ID of a group. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraGroupMember](Add-EntraGroupMember.md) - -[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md deleted file mode 100644 index 340e3463a9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -title: Get-EntraGroupOwner -description: This article provides details on the Get-EntraGroupOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupOwner - -schema: 2.0.0 ---- - -# Get-EntraGroupOwner - -## Synopsis - -Gets an owner of a group. - -## Syntax - -```powershell -Get-EntraGroupOwner - -GroupId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroupOwner` cmdlet gets an owner of a group in Microsoft Entra ID. Specify `GroupId` parameter gets an owner of a group. - -In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with the `microsoft.directory/groups/owners/read` permission. The following least privileged roles support this operation: - -- Group owners -- Directory Readers -- Directory Writers -- Groups Administrator -- User Administrator - -## Examples - -### Example 1: Get a group owner by ID - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupOwner -GroupId 'vvvvvvvv-7777-9999-7777-jjjjjjjjjjjj' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example demonstrates how to retrieve the owner of a specific group. - -- `-GroupId` Parameter specifies the ID of a group. - -### Example 2: Gets all group owners - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupOwner -GroupId 'zzzzzzzz-6666-8888-9999-pppppppppppp' -All -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example demonstrates how to retrieve the all owner of a specific group. - -- `-GroupId` Parameter specifies the ID of a group. - -### Example 3: Gets two group owners - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupOwner -GroupId 'vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj' -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example demonstrates how to retrieve the top two owners of a specific group. - -- `-GroupId` parameter specifies the ID of a group. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraGroupOwner](Add-EntraGroupOwner.md) - -[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md deleted file mode 100644 index 51986bf57f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Get-EntraGroupPermissionGrant -description: This article provides details on the Get-EntraGroupPermissionGrant command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant - -schema: 2.0.0 ---- - -# Get-EntraGroupPermissionGrant - -## Synopsis - -Retrieves a list of permission grants consented to for a group. - -## Syntax - -```powershell -Get-EntraGroupPermissionGrant - -GroupId - [-Property ] - [] -``` - -## Description - -Retrieves a list of permission grants consented to for a group. - -## Examples - -### Example 1: List existing permission grants for the group - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupPermissionGrant -GroupId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' -``` - -```Output - Id : CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3 - ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 - ClientAppId : 44445555-eeee-6666-ffff-7777aaaa8888 - ResourceAppId : bbbb1111-cc22-3333-44dd-555555eeeeee - PermissionType : Application - Permission : Member.Read.Group -``` - -This cmdlet list existing permission grants for the specified group. - -## Parameters - -### -GroupId - -The unique identifier of group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -### Microsoft.Open.MSGraph.Model.GetMSGroupPermissionGrantsResponse - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md deleted file mode 100644 index 1555496573..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Get-EntraLifecyclePolicyGroup -description: This article provides details on the Get-EntraLifecyclePolicyGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup - -schema: 2.0.0 ---- - -# Get-EntraLifecyclePolicyGroup - -## Synopsis - -Retrieves the lifecycle policy object to which a group belongs. - -## Syntax - -```powershell -Get-EntraLifecyclePolicyGroup - -GroupId - [-Property ] - [] -``` - -## Description - -The `Get-EntraLifecyclePolicyGroup` retrieves the lifecycle policy object to which a group belongs. Specify the `-GroupId` parameter to get the lifecycle policy object to which a group belongs. - -## Examples - -### Example 1: Retrieve lifecycle policy object - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraLifecyclePolicyGroup -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -bbbbbbbb-1111-2222-3333-cccccccccccc admingroup@contoso.com 200 All -``` - -This example demonstrates how to retrieve lifecycle policy object by Id in Microsoft Entra ID. - -- `-GroupId` - specifies the ID of a group. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md deleted file mode 100644 index 3973de997e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md +++ /dev/null @@ -1,252 +0,0 @@ ---- -title: Get-EntraObjectSetting -description: This article provides details on the Get-EntraObjectSetting command. - - -ms.topic: reference -ms.date: 07/03/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectSetting -schema: 2.0.0 ---- - -# Get-EntraObjectSetting - -## Synopsis - -Gets an object setting. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraObjectSetting - [-Top ] - [-All] - -TargetType - -TargetObjectId - [] -``` - -### GetById - -```powershell -Get-EntraObjectSetting - -Id [-All] - -TargetType - -TargetObjectId - [] -``` - -## Description - -The `Get-EntraObjectSetting` cmdlet retrieves an object setting from Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve object setting from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$params = @{ - TargetType = 'Groups' - TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' -} -Get-EntraObjectSetting @params -``` - -```Output -Id DisplayName TemplateId --- ----------- ---------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This command retrieves object setting from Microsoft Entra ID. - -- `-TargetType` Parameter specifies the target type. -- `-TargetObjectId` Parameter specifies the ID of the target object. - -### Example 2: Retrieve a specific object setting from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$params = @{ - TargetType = 'Groups' - TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' - Id ='aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -} -Get-EntraObjectSetting @params -``` - -```Output -Id DisplayName TemplateId --- ----------- ---------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This command retrieves Specific object setting from Microsoft Entra ID. - -- `-TargetType` Parameter specifies the target type. -- `-TargetObjectId` Parameter specifies the ID of the target object. -- `-Id` Parameter specifies the ID of a settings object. - -### Example 3: Retrieve top one object setting from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$params = @{ - TargetType = 'Groups' - TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' -} -Get-EntraObjectSetting @params -Top 1 -``` - -```Output -Id DisplayName TemplateId --- ----------- ---------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This command retrieves top one object setting from Microsoft Entra ID. - -- `-TargetType` Parameter specifies the target type. -- `-TargetObjectId` Parameter specifies the ID of the target object. - -### Example 4: Retrieve all object setting from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$params = @{ - TargetType = 'Groups' - TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' -} -Get-EntraObjectSetting @params -All -``` - -```Output -Id DisplayName TemplateId --- ----------- ---------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This command retrieves all records of object setting from Microsoft Entra ID. - -- `-TargetType` Parameter specifies the target type. -- `-TargetObjectId` Parameter specifies the ID of the target object. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the ID of a settings object. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -TargetObjectId - -Specifies the ID of the target object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -TargetType - -Specifies the target type. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md deleted file mode 100644 index 22a87355e6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md +++ /dev/null @@ -1,346 +0,0 @@ ---- -title: New-EntraGroup -description: This article provides details on the New-EntraGroup command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroup - -schema: 2.0.0 ---- - -# New-EntraGroup - -## Synopsis - -Creates a Microsoft Entra ID group. - -## Syntax - -```powershell -New-EntraGroup - -DisplayName - [-GroupTypes ] - -SecurityEnabled - [-Description ] - -MailEnabled - -MailNickname - [-Visibility ] - [-IsAssignableToRole ] - [] -``` - -## Description - -The `New-EntraGroup` cmdlet creates a Microsoft Entra ID group. Specify the `DisplayName`, `MailNickname`, `MailEnabled` and `SecurityEnabled` parameters for creating a Microsoft Entra ID group. - -For information about creating dynamic groups, see: [Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership). - -**Notes on permissions:** - -- To create the group with users as owners or members, the app must have at least the `User.Read.All` permission. -- To create the group with other service principals as owners or members, the app must have at least the `Application.Read.All` permission. -- To create the group with either users or service principals as owners or members, the app must have at least the `Directory.Read.All` permission. - -## Examples - -### Example 1: Create a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group2' - MailEnabled = $False - MailNickname = 'helpDeskAdminGroup' - SecurityEnabled = $True -} - -New-EntraGroup @params -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group2 bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq helpDeskAdminGroup {} -``` - -This example demonstrates how to create the new group. - -### Example 2: Create a group with Description parameter - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group' - MailEnabled = $false - MailNickname = 'helpDeskAdminGroup' - SecurityEnabled = $true - Description = 'Group assignable to role' -} - -New-EntraGroup @params -``` - -```Output - -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group zzzzzzzz-6666-8888-9999-pppppppppppp helpDeskAdminGroup Group assignable to role {} - -``` - -This example demonstrates how to create the new group with description parameter. - -### Example 3: Create a group with IsAssignableToRole parameter - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group2' - Description = 'Group assignable to role' - MailEnabled = $False - MailNickname = 'helpDeskAdminGroup' - SecurityEnabled = $True - IsAssignableToRole = $True -} - -New-EntraGroup @params -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group2 vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj helpDeskAdminGroup Group assignable to role {} -``` - -This example demonstrates how to create the new group with IsAssignableToRole parameter. - -### Example 4: Create a group with Visibility parameter - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group2' - Description = 'Group assignable to role' - MailEnabled = $False - MailNickname = 'helpDeskAdminGroup' - SecurityEnabled = $True - Visibility = 'Private' -} - -New-EntraGroup @params -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group2 gggggggg-0000-4444-3333-llllllllllll helpDeskAdminGroup Group assignable to role {} -``` - -This example demonstrates how to create the new group with Visibility parameter. - -### Example 5: Create a group with GroupTypes parameter - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group3' - Description = 'group des' - MailEnabled = $False - MailNickname = 'helpDeskAdminGroup1' - SecurityEnabled = $True - GroupTypes = 'Unified' -} - -New-EntraGroup @params -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group3 xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb helpDeskAdminGroup1 group des {Unified} -``` - -This example demonstrates how to create the new group with GroupTypes parameter. - -## Parameters - -### -Description - -Specifies a description for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailEnabled - -Specifies whether this group is mail enabled. - -Currently, you can't create mail enabled groups in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailNickname - -Specifies a mail nickname for the group. -If MailEnabled is $False, you must still specify a mail nickname. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityEnabled - -Specifies whether the group is security enabled. -For security groups, this value must be $True. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupTypes - -Specifies that the group is a unified or dynamic group. - -Notes: - -- This parameter currently can't be used to create dynamic groups. To create a dynamic group in PowerShell, you must use the Entra module. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Visibility - -This parameter determines the visibility of the group's content and members list. - -This parameter can take one of the following values: - -- "Public" - Anyone can view the contents of the group -- "Private" - Only members can view the content of the group -- "HiddenMembership" - Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator and Helpdesk Administrators can view the members list of the group. - -If no value is provided, the default value is "Public". - -Notes: - -- This parameter is only valid for groups that have the groupType set to "Unified". -- If a group has this attribute set to "HiddenMembership", it can't be changed later. -- Anyone can join a group that has this attribute set to "Public". If the attribute is set to Private or HiddenMembership, only owners can add new members to the group and requests to join the group need approval of the owners. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsAssignableToRole - -Indicates whether group can be assigned to a role. This property can only be set at the time of group creation and can't be modified on an existing group. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) - -[Remove-EntraGroup](Remove-EntraGroup.md) - -[Set-EntraGroup](Set-EntraGroup.md) - -[Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md deleted file mode 100644 index d70bac714b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: New-EntraGroupAppRoleAssignment -description: This article provides details on the New-EntraGroupAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment - -schema: 2.0.0 ---- - -# New-EntraGroupAppRoleAssignment - -## Synopsis - -Assign a group of users to an application role. - -## Syntax - -```powershell -New-EntraGroupAppRoleAssignment - -GroupId - -PrincipalId - -AppRoleId - -ResourceId - [] -``` - -## Description - -The `New-EntraGroupAppRoleAssignment` cmdlet assigns a group of users to an application role in Microsoft Entra ID. - -## Examples - -### Example 1: Assign a group of users to an application - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$appname = 'Box' -$spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" -$group = Get-EntraGroup -SearchString 'Contoso Team' -New-EntraGroupAppRoleAssignment -GroupId $group.ObjectId -PrincipalId $group.ObjectId -ResourceId $spo.ObjectId -AppRoleId $spo.Approles[1].id -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - AaBbCcDdEeFfGgHhIiJjKkLlMmNnOo1 00000000-0000-0000-0000-000000000000 3/13/2024 4:41:43 AM Contoso Team aaaaaaaa-bbbb-cccc-1111-222222222222 -3/13/2024 4:45:00 AM BbCcDdEeFfGgHhIiJjKkLlMmNnOoPp2 00000000-0000-0000-0000-000000000000 3/13/2024 4:45:00 AM Finance Group bbbbbbbb-cccc-dddd-2222-333333333333 -``` - -This example demonstrates how to assign a group of users to an application role in Microsoft Entra ID. - -- `GroupId`: The ID of the group to which you're assigning the app role. - -- `PrincipalId`: The ID of the group to which you're assigning the app role. - -- `ResourceId`: The ID of the resource service Principal, which has defined the app role. - -- `AppRoleId`: The ID of the appRole (defined on the resource service principal) to assign to the group. - -## Parameters - -### -AppRoleId - -Specifies the ID of the app role (defined on the resource service principal) to assign. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PrincipalId - -Specifies the principal ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId - -The unique identifier (ID) for the resource service principal for which the assignment is made. -Required on create. Supports $filter (eq only). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) - -[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md deleted file mode 100644 index 78e3bb4b9f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: New-EntraGroupLifecyclePolicy -description: This article provides details on the New-EntraGroupLifecyclePolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy - -schema: 2.0.0 ---- - -# New-EntraGroupLifecyclePolicy - -## Synopsis - -Creates a new groupLifecyclePolicy. - -## Syntax - -```powershell -New-EntraGroupLifecyclePolicy - -ManagedGroupTypes - -GroupLifetimeInDays - -AlternateNotificationEmails - [] -``` - -## Description - -Creates a new groupLifecyclePolicy in Microsoft Entra ID. - -## Examples - -### Example 1: Creates a new groupLifecyclePolicy - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$Params = @{ - GroupLifetimeInDays = 99 - ManagedGroupTypes = 'Selected' - AlternateNotificationEmails = 'example@contoso.com' -} -New-EntraGroupLifecyclePolicy @params -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb example@contoso.com 99 Selected -``` - -This example creates a new groupLifecyclePolicy with a group lifetime of 99 days for a selected set of Office 365 groups. Renewal notification emails are sent to for groups without owners. - -- `-GroupLifetimeInDays` parameter specifies the number of days a group can exist before it needs to be renewed. -- `-ManagedGroupTypes` parameter allows the admin to select which office 365 groups the policy applies to. -- `-AlternateNotificationEmails` parameter specifies notification emails for group. - -## Parameters - -### -AlternateNotificationEmails - -Notification emails for groups without owners are sent to these email addresses, separated by a ';'. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifetimeInDays - -The number of days a group can exist before it needs to be renewed. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ManagedGroupTypes - -This parameter allows the admin to select which Office 365 groups the policy applies to. -'None' creates the policy in a disabled state. -'All' applies the policy to every Office 365 group in the tenant. -'Selected' allows the admin to choose specific Office 365 groups to which the policy applies. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) - -[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) - -[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md deleted file mode 100644 index ae746e39ed..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Remove-EntraGroup -description: This article provides details on the Remove-EntraGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroup - -schema: 2.0.0 ---- - -# Remove-EntraGroup - -## Synopsis - -Removes a group. - -## Syntax - -```powershell -Remove-EntraGroup - -GroupId - [] -``` - -## Description - -The `Remove-EntraGroup` cmdlet removes a group from Microsoft Entra ID. Specify the `GroupId` parameter removes a group. - -Unified Group can be restored withing 30 days after deletion using the `Restore-EntraBetaDeletedDirectoryObject` cmdlet. Security groups can't be restored after deletion. - -**Notes on permissions:** - -The following conditions apply for apps to delete role-assignable groups: - -- For delegated scenarios, the app must be assigned the `RoleManagement.ReadWrite.Directory` delegated permission, and the calling user must be the creator of the group or be assigned at least the Privileged Role Administrator Microsoft Entra role. -- For app-only scenarios, the calling app must be the owner of the group or be assigned the `RoleManagement.ReadWrite.Directory` application permission or be assigned at least the Privileged Role Administrator Microsoft Entra role. - -## Examples - -### Example 1: Remove a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -Remove-EntraGroup -GroupId $group.Id -``` - -This example demonstrates how to remove a group in Microsoft Entra ID. - -- `GroupId` parameter specifies the group ID . - -## Parameters - -### -GroupId - -Specifies the object ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) - -[New-EntraGroup](New-EntraGroup.md) - -[Set-EntraGroup](Set-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md deleted file mode 100644 index c5306735b7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Remove-EntraGroupAppRoleAssignment -description: This article provides details on the Remove-EntraGroupAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment - -schema: 2.0.0 ---- - -# Remove-EntraGroupAppRoleAssignment - -## Synopsis - -Delete a group application role assignment. - -## Syntax - -```powershell -Remove-EntraGroupAppRoleAssignment - -AppRoleAssignmentId - -GroupId -[] -``` - -## Description - -The `Remove-EntraGroupAppRoleAssignment` cmdlet removes a group application role assignment from Microsoft Entra ID. - -## Examples - -### Example 1: Remove group app role assignment - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -Remove-EntraGroupAppRoleAssignment -GroupId $group.Id -AppRoleAssignmentId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' -``` - -This example demonstrates how to remove the specified group application role assignment. -GroupId - Specifies the object ID of a group. -AppRoleAssignmentId - Specifies the object ID of the group application role assignment. - -## Parameters - -### -AppRoleAssignmentId - -Specifies the object ID of the group application role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the object ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) - -[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md deleted file mode 100644 index d60bc7953d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Remove-EntraGroupLifecyclePolicy -description: This article provides details on the Remove-EntraGroupLifecyclePolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy - -schema: 2.0.0 ---- - -# Remove-EntraGroupLifecyclePolicy - -## Synopsis - -Deletes a groupLifecyclePolicies object - -## Syntax - -```powershell -Remove-EntraGroupLifecyclePolicy - -GroupLifecyclePolicyId - [] -``` - -## Description - -The `Remove-EntraGroupLifecyclePolicy` command deletes a groupLifecyclePolicies object in Microsoft Entra ID. Specify `Id` parameter deletes the groupLifecyclePolicies object. - -## Examples - -### Example 1: Remove a groupLifecyclePolicies - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' -``` - -This example demonstrates how to delete the groupLifecyclePolicies object that has the specified ID. You can use `Get-EntraGroupLifecyclePolicy` to get Id details. - -## Parameters - -### -GroupLifecyclePolicyId - -Specifies the ID of the groupLifecyclePolicies object that this cmdlet removes. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related links - -[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) - -[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) - -[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md deleted file mode 100644 index ca01328299..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Remove-EntraGroupMember -description: This article provides details on the Remove-EntraGroupMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupMember - -schema: 2.0.0 ---- - -# Remove-EntraGroupMember - -## Synopsis - -Removes a member from a group. - -## Syntax - -```powershell -Remove-EntraGroupMember - -GroupId - -MemberId - [] -``` - -## Description - -The `Remove-EntraGroupMember` cmdlet removes a member from a group in Microsoft Entra ID. Specify the `ObjectId` and `MemberId` parameters to remove a member from a group. - -## Examples - -### Example 1: Remove a member - -```powershell -Connect-Entra -Scopes 'GroupMember.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -Remove-EntraGroupMember -GroupId $group.Id -MemberId 'zzzzzzzz-6666-8888-9999-pppppppppppp' -``` - -This command removes the specified member from the specified group. - -GroupId - Specifies the object ID of a group in Microsoft Entra ID. - -MemberId - Specifies the ID of the member to remove. - -## Parameters - -### -MemberId - -Specifies the ID of the member to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the object ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraGroupMember](Add-EntraGroupMember.md) - -[Get-EntraGroupMember](Get-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md deleted file mode 100644 index 759c736651..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Remove-EntraGroupOwner -description: This article provides details on the Remove-EntraGroupOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupOwner - -schema: 2.0.0 ---- - -# Remove-EntraGroupOwner - -## Synopsis - -Removes an owner from a group. - -## Syntax - -```powershell -Remove-EntraGroupOwner - -OwnerId - -GroupId - [] -``` - -## Description - -The `Remove-EntraGroupOwner` cmdlet removes an owner from a group in Microsoft Entra ID. Specify the `GroupId` and `OwnerId` parameters to remove an owner from a group. - -## Examples - -### Example 1: Remove an owner - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -Remove-EntraGroupOwner -GroupId $group.Id -OwnerId 'xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb' -``` - -This example demonstrates how to remove an owner from a group in Microsoft Entra ID. - -GroupId - Specifies the ID of a group in Microsoft Entra ID. - -- `OwnerId` specifies the ID of an owner. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OwnerId - -Specifies the ID of an owner. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related links - -[Add-EntraGroupOwner](Add-EntraGroupOwner.md) - -[Get-EntraGroupOwner](Get-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md deleted file mode 100644 index 888872cd48..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Remove-EntraLifecyclePolicyGroup -description: This article provides details on the Remove-EntraLifecyclePolicyGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup - -schema: 2.0.0 ---- - -# Remove-EntraLifecyclePolicyGroup - -## Synopsis - -Removes a group from a lifecycle policy. - -## Syntax - -```powershell -Remove-EntraLifecyclePolicyGroup - -GroupId - -GroupLifecyclePolicyId - [] -``` - -## Description - -The `Remove-EntraLifecyclePolicyGroup` cmdlet removes a group from a lifecycle policy in Microsoft Entra ID. - -## Examples - -### Example 1: Remove lifecycle policy group - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" -$policy = Get-EntraLifecyclePolicyGroup -Id $group.ObjectId -$params = @{ - GroupLifecyclePolicyId = $policy.Id - GroupId = $group.ObjectId -} -Remove-EntraLifecyclePolicyGroup @params -``` - -```Output -Value ------ -True -``` - -This example demonstrates how to remove a group from a lifecycle policy in Microsoft Entra ID with specified Id and groupId. - -- `-GroupLifecyclePolicyId` parameter specifies the lifecycle policy object ID. -- `-GroupId` parameter specifies the ID of Office365 group. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifecyclePolicyId - -Specifies the ID of the lifecycle policy object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) - -[Add-EntraLifecyclePolicyGroup](Add-EntraLifecyclePolicyGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md deleted file mode 100644 index b8aeaa6a36..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Reset-EntraLifeCycleGroup -description: This article provides details on the Reset-EntraLifeCycleGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup - -schema: 2.0.0 ---- - -# Reset-EntraLifeCycleGroup - -## Synopsis - -Renews a group by updating the RenewedDateTime property on a group to the current DateTime. - -## Syntax - -```powershell -Reset-EntraLifeCycleGroup - -Id - [] -``` - -## Description - -The `Reset-EntraLifeCycleGroup` renews a group by updating the RenewedDateTime property on a group to the current DateTime. -When a group is renewed, the group expiration is extended by the number of days defined in the policy. - -## Examples - -### Example 1: Renew a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -Reset-EntraLifeCycleGroup -Id 'hhhhhhhh-8888-9999-8888-cccccccccccc' -``` - -This example demonstrates how to renew a specified group. - -- `-Id` - Specifies the lifecycle policy object ID. - -## Parameters - -### -Id - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md deleted file mode 100644 index 80f5ee8ca8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Select-EntraGroupIdsContactIsMemberOf -description: This article provides details on the Select-EntraGroupIdsContactIsMemberOf command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf - -schema: 2.0.0 ---- - -# Select-EntraGroupIdsContactIsMemberOf - -## Synopsis - -Get groups in which a contact is a member. - -## Syntax - -```powershell -Select-EntraGroupIdsContactIsMemberOf - -ObjectId - -GroupIdsForMembershipCheck - [] -``` - -## Description - -The `Select-EntraGroupIdsContactIsMemberOf` cmdlet gets groups in Microsoft Entra ID in which a contact is a member. - -## Examples - -### Example 1: Get groups in which a contact is a member - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All,Group.Read.All' -$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck -$Groups.GroupIds = (Get-EntraGroup -Filter "DisplayName eq 'Entra PowerShell Group'").ObjectId -$UserID = (Get-EntraContact -ObjectId 'hhhhhhhh-8888-9999-8888-cccccccccccc').ObjectId -Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups -``` - -This example demonstrates how to get groups in which a contact is a member. - -- `-ObjectId` parameter specifies the contact Object ID. -- `-GroupIdsForMembershipCheck` parameter specifies the group Object ID. - -## Parameters - -### -GroupIdsForMembershipCheck - -Specifies an array of group object IDs. - -```yaml -Type: GroupIdsForMembershipCheck -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the object ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md deleted file mode 100644 index f0eabc7873..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Select-EntraGroupIdsGroupIsMemberOf -description: This article provides details on the Select-EntraGroupIdsGroupIsMemberOf command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf - -schema: 2.0.0 ---- - -# Select-EntraGroupIdsGroupIsMemberOf - -## Synopsis - -Gets group IDs that a group is a member of. - -## Syntax - -```powershell -Select-EntraGroupIdsGroupIsMemberOf - -ObjectId - -GroupIdsForMembershipCheck - [] -``` - -## Description - -The `Select-EntraGroupIdsGroupIsMemberOf` cmdlet gets the groups that a specified group is a member of in Microsoft Entra ID. - -## Examples - -### Example 1: Get the group membership of a group for a group - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck -$Groups.GroupIds = (Get-EntraGroup -Top 1).ObjectId -$GroupId = (Get-EntraGroup -Top 1).ObjectId -Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupId -GroupIdsForMembershipCheck $Groups -``` - -This example gets the group membership of a group identified by $GroupId. Use `Get-EntraGroup` cmdlet to obtain group `ObjectId` value. - -- `-ObjectId` parameter specifies the group ID. -- `-GroupIdsForMembershipCheck` Specifies an array of group object IDs. - -## Parameters - -### -GroupIdsForMembershipCheck - -Specifies an array of group object IDs. - -```yaml -Type: GroupIdsForMembershipCheck -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md deleted file mode 100644 index d5cb471ca8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Select-EntraGroupIdsUserIsMemberOf -description: This article provides details on the Select-EntraGroupIdsUserIsMemberOf command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf - -schema: 2.0.0 ---- - -# Select-EntraGroupIdsUserIsMemberOf - -## Synopsis - -Selects the groups that a user is a member of. - -## Syntax - -```powershell -Select-EntraGroupIdsUserIsMemberOf - -ObjectId - -GroupIdsForMembershipCheck - [] -``` - -## Description - -The `Select-EntraGroupIdsUserIsMemberOf` cmdlet selects the groups that a user is a member of in Microsoft Entra ID. - -## Examples - -### Example 1: Get the group membership of a group for a user - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$myGroup = Get-EntraGroup -Filter "DisplayName eq ''" -$UserId = 'SawyerM@contoso.com' -$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck -$Groups.GroupIds = $myGroup.ObjectId -$Params = @{ - ObjectId = $UserId - GroupIdsForMembershipCheck = $Groups -} -Select-EntraGroupIdsUserIsMemberOf @Params -``` - -```Output -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example retrieves the group membership of a group for a user. - -- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). -- `-GroupIdsForMembershipCheck` parameter specifies the group Object Ids. - -## Parameters - -### -GroupIdsForMembershipCheck - -Specifies an array of group object IDs. - -```yaml -Type: GroupIdsForMembershipCheck -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md deleted file mode 100644 index 1886cefa89..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md +++ /dev/null @@ -1,313 +0,0 @@ ---- -title: Set-EntraGroup -description: This article provides details on the Set-EntraGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroup - -schema: 2.0.0 ---- - -# Set-EntraGroup - -## Synopsis - -Sets the properties for an existing Microsoft Entra ID group. - -## Syntax - -```powershell -Set-EntraGroup - -GroupId - [-DisplayName ] - [-GroupTypes ] - [-SecurityEnabled ] - [-Description ] - [-MailEnabled ] - [-MailNickname ] - [-Visibility ] - [-IsAssignableToRole ] - [] -``` - -## Description - -The `Set-EntraGroup` cmdlet sets the properties for an existing Microsoft Entra ID group. Specify the `GroupId` parameter to set the properties for an existing Microsoft Entra ID group. - -## Examples - -### Example 1: Update a group display name - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - DisplayName = 'UPDATE HelpDesk Team Leaders' -} -Set-EntraGroup @params -``` - -This command updates the display name of a specified group in Microsoft Entra ID. - -### Example 2: Update a group description - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - Description = 'This is my new group' -} -Set-EntraGroup @params -``` - -This example demonstrates how to update a group description. - -### Example 3: Update a group mail nickname - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - MailNickName = 'newnickname' -} -Set-EntraGroup @params -``` - -This command updates the mail nickname of a specified group in Microsoft Entra ID. - -### Example 4: Update a group security enabled - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - SecurityEnabled = $true -} -Set-EntraGroup @params -``` - -This command updates the security enabled of a specified group in Microsoft Entra ID. - -### Example 5: Update a group mail enabled - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - MailEnabled = $false -} -Set-EntraGroup @params -``` - -This example demonstrates how to update a group main enabled. - -### Example 6: Update a property for a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - Visibility = 'Private' - GroupTypes = 'DynamicMembership' - IsAssignableToRole = $true -} -Set-EntraGroup @params -``` - -This example demonstrates how to update a property for an existing Microsoft Entra ID group. - -## Parameters - -### -Description - -Specifies a description for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupTypes - -Specifies that the group is a dynamic group. -To create a dynamic group, specify a value of DynamicMembership. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the object ID of a group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MailEnabled - -Indicates whether this group is mail enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailNickname - -Specifies a mail nickname for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityEnabled - -Indicates whether the group is security enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Visibility - -Specifies the visibility of the group's content and members list. -This parameter can take one of the following values: - -* "Public": Anyone can view the contents of the group. -* "Private": Only members can view the content of the group. -* "HiddenMembership": Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator, and Helpdesk Administrators can view the members list of the group. - -If no value is provided, the default value is "Public." - -Notes: - -* This parameter is only valid for groups that have the groupType set to "Unified." -* If a group has this attribute set to "HiddenMembership," it can't be changed later. -* Anyone can join a group that has this attribute set to "Public." If the attribute is set to Private or HiddenMembership, only owner can add new members to the group and requests to join the group need approval of the owner. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsAssignableToRole - -This property can only be set at the time of group creation and can't be modified on an existing group. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related links - -[Get-EntraGroup](Get-EntraGroup.md) - -[New-EntraGroup](New-EntraGroup.md) - -[Remove-EntraGroup](Remove-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md deleted file mode 100644 index df8b9a3a99..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: Set-EntraGroupLifecyclePolicy -description: This article provides details on the Set-EntraGroupLifecyclePolicy command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy - -schema: 2.0.0 ---- - -# Set-EntraGroupLifecyclePolicy - -## Synopsis - -Updates a specific group Lifecycle Policy in Microsoft Entra ID. - -## Syntax - -```powershell -Set-EntraGroupLifecyclePolicy - -GroupLifecyclePolicyId - [-AlternateNotificationEmails ] - [-GroupLifetimeInDays ] - [-ManagedGroupTypes ] - [] -``` - -## Description - -The `Set-EntraGroupLifecyclePolicy` command updates a specific group Lifecycle Policy in Microsoft Entra ID. - -## Examples - -### Example 1: Updates group lifecycle policy - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 -$params = @{ - GroupLifecyclePolicyId = $policy.Id - GroupLifetimeInDays = 200 - AlternateNotificationEmails = 'example@contoso.com' - ManagedGroupTypes = 'All' -} -Set-EntraGroupLifecyclePolicy @params -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 All -``` - -This example updates the specified groupLifecyclePolicy in Microsoft Entra ID. - -- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy to be modified. -- `-GroupLifetimeInDays` parameter specifies the lifetime of the groups in the policy to 200 days. The GroupLifetimeInDays represents the number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. -- `-AlternateNotificationEmails` parameter specifies the email address that receives notifications about the policy. Multiple email address can be defined by separating email address with a semicolon. -- `-ManagedGroupTypes` parameter specifies which office 365 groups the policy applies to. Possible values are `All`, `Selected`, or `None`. -In this case, 'All' suggests that the policy manages all types of groups. - -## Parameters - -### -AlternateNotificationEmails - -Notification emails for groups that have no owners are sent to these email addresses. -List of email addresses separated by a ";". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifetimeInDays - -The number of days a group can exist before it needs to be renewed. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifecyclePolicyId - -Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ManagedGroupTypes - -Allows the admin to select which office 365 groups the policy applies to. - -- "None" will create the policy in a disabled state. -- "All" will apply the policy to every Office 365 group in the tenant. -- "Selected" will allow the admin to choose specific Office 365 groups that the policy applies to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) - -[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) - -[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md deleted file mode 100644 index df6ead8bb6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md +++ /dev/null @@ -1,291 +0,0 @@ ---- -title: New-EntraInvitation -description: This article provides details on the New-EntraInvitation command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraInvitation - -schema: 2.0.0 ---- - -# New-EntraInvitation - -## Synopsis - -This cmdlet is used to invite a new external user to your directory. - -## Syntax - -```powershell -New-EntraInvitation - [-InvitedUser ] - [-InvitedUserType ] - -InvitedUserEmailAddress - [-SendInvitationMessage ] --InviteRedirectUrl - [-InvitedUserMessageInfo ] [-InvitedUserDisplayName ] - [] -``` - -## Description - -This cmdlet is used to invite a new external user to your directory. - -Invitation adds an external user to the organization. When creating a new invitation, you have several options available: - -- On invitation creation, Microsoft Graph can automatically send an invitation email directly to the invited user, or your app can use the inviteRedeemUrl returned in the response to craft your own invitation (through your communication mechanism of choice) to the invited user. If you decide to have Microsoft Graph send an invitation email automatically, you can specify the content and language of the email by using invitedUserMessageInfo. - -- When the user is invited, a user entity (of userType Guest) is created and can be used to control access to resources. The invited user has to go through the redemption process to access any resources they have been invited to. - -To reset the redemption status for a guest user, the User.ReadWrite.All permission is the minimum required. - -For delegated scenarios, the signed-in user must have at least one of the following roles: Guest Inviter, Directory Writers, or User Administrator. Additionally, to reset the redemption status, the signed-in user must have the Helpdesk Administrator or User Administrator role. - -## Examples - -### Example 1: Invite a new external user to your directory - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.onmicrosoft.com' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example sent an email to the user who's email address is in the `-InvitedUserEmailAddress` parameter. - -When the user accepts the invitation, they're forwarded to the url as specified in the `-InviteRedirectUrl` parameter. - -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. - -### Example 2: Invite a new external user to your directory with InvitedUserDisplayName parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.onmicrosoft.com' - InvitedUserDisplayName = 'microsoftuser' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with `-InvitedUserDisplayName` parameter. - -- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user -- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. -- `-InvitedUserDisplayName`Parameter specifies the display name of the user. - -### Example 3: Invite a new external user to your directory with InvitedUserMessageInfo parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$a= New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo -$a.CustomizedMessageBody = 'Hi there, how are you' -$a.MessageLanguage = 'EN' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.microsoft.com' - InvitedUserMessageInfo = $a -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with InvitedUserMessageInfo parameter. - -- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. -- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. -- `-InvitedUserMessageInfo`Parameter specifies addition information to specify how the invitation message is sent. - -### Example 4: Invite a new external user to your directory with InvitedUserType parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.microsoft.com' - InvitedUserType = 'Guest' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -9e2b9f02-c2cb-4832-920d-81959f44e397 https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with InvitedUserType parameter. - -## Parameters - -### -InvitedUserDisplayName - -The display name of the user as it appears in your directory. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserEmailAddress - -The Email address to which the invitation is sent. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserMessageInfo - -Addition information to specify how the invitation message is sent. - -```yaml -Type: InvitedUserMessageInfo -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUser - -An existing user object in the directory that you want to add or update the B2B credentials for. - -```yaml -Type: User -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserType - -The userType of the user being invited. By default, this is Guest. - -You can invite as Member if you are company administrator. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InviteRedirectUrl - -The URL to which the invited user is forwarded after accepting the invitation. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SendInvitationMessage - -A Boolean parameter that indicates whether or not an invitation message sent to the invited user. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -- See more information - . - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md deleted file mode 100644 index 7667dcb6b1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Enable-EntraAzureADAlias -description: This article provides details on the Enable-EntraAzureADAlias command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraAzureADAlias - -schema: 2.0.0 ---- - -# Enable-EntraAzureADAlias - -## Synopsis - -Enables aliases for AzureAD commands. - -## Syntax - -```powershell -Enable-EntraAzureADAlias -``` - -## Description - -Enables Azure AD command aliases in the current PowerShell session. - -## Examples - -### Example 1: Enable aliasing - -```powershell -Enable-EntraAzureADAlias -``` - -Enables all Azure AD prefixes for the current PowerShell session. - -## Parameters - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md deleted file mode 100644 index bdc29b6526..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: Test-EntraScript -description: This article provides details on the Test-EntraScript command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Test-EntraScript - -schema: 2.0.0 ---- - -# Test-EntraScript - -## Synopsis - -Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. - -## Syntax - -```powershell -Test-EntraScript - -Path - [-Content ] - [-Quiet] - [] -``` - -## Description - -Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. - -## Examples - -### Example 1 - -```powershell -Test-EntraScript -Path .\usercreation.ps1 -Quiet -``` - -Returns whether the script `usercreation.ps1` could run under Microsoft.Graph.Entra. - -### Example 2 - -```powershell -Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript -``` - -Returns a list of all scripts that wouldn't run under the Microsoft.Graph.Entra module, listing each issue with line and code. - -## Parameters - -### -Path - -Path to one or more script files to scan. -Or name of the content, when also specifying -Content - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: FullName, Name - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Content - -Code content to scan. -Used when scanning code that has no file representation (for example, -straight from a repository). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Quiet - -Only return $true or $ false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($ false) - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md deleted file mode 100644 index 640ed63b0e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: Get-EntraAuditDirectoryLog -description: This article provides details on the Get-EntraAuditDirectoryLog command. - - -ms.topic: reference -ms.date: 07/01/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: -schema: 2.0.0 ---- - -# Get-EntraAuditDirectoryLog - -## Synopsis - -Get directory audit logs. - -## Syntax - -```powershell -Get-EntraAuditDirectoryLog -[-All] -[-Top ] -[-Filter ] -[] -``` - -## Description - -The `Get-EntraAuditDirectoryLog` cmdlet gets a Microsoft Entra ID audit log. - -Retrieve audit logs from Microsoft Entra ID, covering logs from various services such as user, app, device, and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (SSPR and admin resets), and self-service group management. - -## Examples - -### Example 1: Get all logs - -```powershell - Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' - Get-EntraAuditDirectoryLog -All -``` - -```Output -Id ActivityDateTime ActivityDisplayName Category CorrelationId --- ---------------- ------------------- -------- ------------- -Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd -Directory_bbbbbbbb-1111-2222-3333-cccccccccccc 17/07/2024 07:31:54 Update user UserManagement bbbb1111-cc22-3333-44dd-555555eeeeee -SSGM_cccccccc-2222-3333-4444-dddddddddddd 17/07/2024 07:13:08 GroupsODataV4_GetgroupLifecyclePolicies GroupManagement cccc2222-dd33-4444-55ee-666666ffffff - -``` - -This command gets all audit logs. - -### Example 2: Get first n logs - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' -Get-EntraAuditDirectoryLog -Top 1 -``` - -```Output -Id ActivityDateTime ActivityDisplayName Category CorrelationId LoggedB - yServic - e --- ---------------- ------------------- -------- ------------- ------- -Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb_8IAPT_617717139 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd Core... - -``` - -This example returns the first N logs. - -### Example 3: Get audit logs containing a given ActivityDisplayName - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' -Get-EntraAuditDirectoryLog -Filter "ActivityDisplayName eq 'Update rollout policy of feature'" -Top 1 -``` - -```Output -Id ActivityDateTime ActivityDisplayName Category CorrelationId --- ---------------- ------------------- -------- ------------- -Application Proxy_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 16/07/2024 05:13:49 Update rollout policy of feature Authentication aaaa0000-bb11-2222-33cc-444444dddddd -``` - -This command shows how to get audit logs by ActivityDisplayName. - -### Example 4: Get all audit logs with a given result - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' -Get-EntraAuditDirectoryLog -Filter "result eq 'failure'" -All -``` - -This command shows how to get audit logs by the result. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`Get-EntraAuditDirectoryLogs` is an alias for `Get-EntraAuditDirectoryLog`. - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md deleted file mode 100644 index 5f710b7c0d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md +++ /dev/null @@ -1,213 +0,0 @@ ---- -title: Get-EntraAuditSignInLog -description: This article provides details on the Get-EntraAuditSignInLog command. - - -ms.topic: reference -ms.date: 07/15/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: -schema: 2.0.0 ---- - -# Get-EntraAuditSignInLog - -## Synopsis - -Get audit logs of sign-ins. - -## Syntax - -```powershell -Get-EntraAuditSignInLog - [-SignInId] - [-All] - [-Top ] - [-Filter ] - [] -``` - -## Description - -The `Get-EntraAuditSignInLog` cmdlet gets the Microsoft Entra ID sign-in log. - -In addition to delegated permissions, the signed-in user must belong to at least one of the following Microsoft Entra roles to read sign-in reports: - -- Global Reader -- Reports Reader -- Security Administrator -- Security Operator -- Security Reader - -## Examples - -### Example 1: Get all logs - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -Get-EntraAuditSignInLog -All -``` - -```Output -Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol --- -------------- ----- ------------------------ ------------------------- ---------------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none -bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none -cccccccc-2222-3333-4444-dddddddddddd Azure Active Directory PowerShell 22223333-cccc-4444-dddd-5555eeee6666 {} none -dddddddd-3333-4444-5555-eeeeeeeeeeee Azure Active Directory PowerShell 33334444-dddd-5555-eeee-6666ffff7777 {} none -``` - -This example returns all audit logs of sign-ins. - -### Example 2: Get the first two logs - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -Get-EntraAuditSignInLog -Top 2 -``` - -```Output -Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol --- -------------- ----- ------------------------ ------------------------- ---------------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none -bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none -``` - -This example returns the first two audit logs of sign-ins. - -### Example 3: Get audit logs containing a given AppDisplayName - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -Get-EntraAuditSignInLog -Filter "AppDisplayName eq 'Graph Explorer'" -Top 1 -``` - -```Output -Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol --- -------------- ----- ------------------------ ------------------------- ---------------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 -``` - -This example demonstrates how to retrieve sign-in logs by AppDisplayName. - -### Example 4: Get all sign-in logs between dates - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -Get-EntraAuditSignInLog -Filter "createdDateTime ge 2024-07-01T00:00:00Z and createdDateTime le 2024-07-14T23:59:59Z" -``` - -This example shows how to retrieve sign-in logs between dates. - -### Example 5: List failed sign-ins for a user - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" -$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize -``` - -This example demonstrates how to retrieve failed sign-ins for a user. - -## Parameters - -### -SignInId - -Specifies unique ID of the Audit Log. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`Get-EntraAuditSignInLogs` is an alias for `Get-EntraAuditSignInLog`. - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md deleted file mode 100644 index c735ee4d6c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: Get-EntraAuthorizationPolicy -description: This article provides details on the Get-EntraAuthorizationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy - -schema: 2.0.0 ---- - -# Get-EntraAuthorizationPolicy - -## Synopsis - -Gets an authorization policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraAuthorizationPolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraAuthorizationPolicy - -Id - [-Property ] - [] -``` - -## Description - -The `Get-EntraAuthorizationPolicy` cmdlet gets a Microsoft Entra ID authorization policy. - -## Examples - -### Example 1: Get all policies - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraAuthorizationPolicy -``` - -```Output -DeletedDateTime Description DisplayName Id AllowEmailVerifiedUsersToJoinOrganization AllowI - nvites - From ---------------- ----------- ----------- -- ----------------------------------------- ------ - Used to manage authorization related settings across the company. Authorization Policy authorizationPolicy True every… -``` - -This example gets the Microsoft Entra ID authorization policy. - -### Example 2: Get an authorization policy by ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraAuthorizationPolicy -Id 'authorizationPolicy' | Format-List -``` - -```Output -allowInvitesFrom : everyone -allowUserConsentForRiskyApps : -id : authorizationPolicy -defaultUserRolePermissions : @{allowedToCreateSecurityGroups=True; allowedToReadBitlockerKeysForOwnedDevice=True; allowedToCreateTenants=True; - allowedToReadOtherUsers=True; allowedToCreateApps=False; permissionGrantPoliciesAssigned=System.Object[]} -blockMsolPowerShell : False -guestUserRoleId : a0b1b346-4d3e-4e8b-98f8-753987be4970 -displayName : Authorization Policy -@odata.context : https://graph.microsoft.com/v1.0/$metadata#policies/authorizationPolicy/$entity -allowedToSignUpEmailBasedSubscriptions : True -description : Used to manage authorization related settings across the company. -allowEmailVerifiedUsersToJoinOrganization : True -allowedToUseSSPR : True -DeletedDateTime : -AdditionalProperties : {} -``` - -This example gets the Microsoft Entra ID authorization policy. - -- `-Id` parameter specifies the unique identifier of the authorization policy. - -The response properties are: - -- `allowedToSignUpEmailBasedSubscriptions` - indicates whether users can sign up for email based subscriptions. -- `allowedToUseSSPR` - indicates whether administrators of the tenant can use the Self-Service Password Reset (SSPR). -- `allowEmailVerifiedUsersToJoinOrganization` - indicates whether a user can join the tenant by email validation. -- `allowInvitesFrom` - indicates who can invite guests to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. `everyone` is the default setting for all cloud environments except US Government. -- `allowUserConsentForRiskyApps` - indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. -- `blockMsolPowerShell` - to disable the use of the MSOnline PowerShell module set this property to `true`. This also disables user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This doesn't affect Microsoft Entra Connect or Microsoft Graph. -- `defaultUserRolePermissions` - specifies certain customizable permissions for default user role. -- `description` - description of this policy. -- `displayName` - display name for this policy. -- `enabledPreviewFeatures` - list of features enabled for private preview on the tenant. -- `guestUserRoleId` -represents role templateId for the role that should be granted to guests. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). -- `permissionGrantPolicyIdsAssignedToDefaultUserRole` - indicates if user consent to apps is allowed, and if it is, the app consent policy that governs the permission for users to grant consent. Values should be in the format `managePermissionGrantsForSelf.{id}` for user consent policies or `managePermissionGrantsForOwnedResource.{id}` for resource-specific consent policies, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. - -## Parameters - -### -Id - -Specifies the unique identifier of the authorization policy. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Set-EntraAuthorizationPolicy](Set-EntraAuthorizationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md deleted file mode 100644 index 406c7ef223..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Get-EntraConditionalAccessPolicy -description: This article provides details on the Get-EntraConditionalAccessPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy - -schema: 2.0.0 ---- - -# Get-EntraConditionalAccessPolicy - -## Synopsis - -Gets a Microsoft Entra ID conditional access policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraConditionalAccessPolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraConditionalAccessPolicy - -PolicyId - [-Property ] - [] -``` - -## Description - -This cmdlet allows an admin to get the Microsoft Entra ID conditional access policy. -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Retrieves a list of all conditional access policies in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraConditionalAccessPolicy -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled -ffffffff-5555-6666-7777-aaaaaaaaaaaa 2/27/2024 6:26:00 AM ConditionalAccessPolicy 2/29/2024 2:41:34 PM disabled -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 2/27/2024 6:30:48 AM ConditionalAccessPolicy 2/29/2024 2:43:53 PM disabled -``` - -This example retrieves a list of all conditional access policies in Microsoft Entra ID. - -### Example 2: Retrieves a conditional access policy in Microsoft Entra ID with given ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraConditionalAccessPolicy -PolicyId 'eeeeeeee-4444-5555-6666-ffffffffffff' -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled -``` - -This example retrieves a specified conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of a conditional access policy. - -## Parameters - -### -PolicyId - -Specifies the ID of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) - -[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) - -[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md deleted file mode 100644 index b4dd3a5fd2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: Get-EntraFeatureRolloutPolicy -description: This article provides details on the Get-EntraFeatureRolloutPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy -schema: 2.0.0 ---- - -# Get-EntraFeatureRolloutPolicy - -## Synopsis - -Gets the policy for cloud authentication roll-out in Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraFeatureRolloutPolicy - [-Filter ] - [-Property ] - [] -``` - -### GetVague - -```powershell -Get-EntraFeatureRolloutPolicy - [-SearchString ] - [] -``` - -### GetById - -```powershell -Get-EntraFeatureRolloutPolicy - -Id - [] -``` - -## Description - -The `Get-EntraFeatureRolloutPolicy` cmdlet allows an admin to get the policy for cloud authentication rollout (users moving from federation to cloud auth) in Microsoft Entra ID. - -This policy consists of one or two FeatureRolloutPolicy objects. These objects hold the groups assigned for cloud authentication (Pass-through authentication or Password Hash Sync) and groups assigned for Seamless single sign-on. - -## Examples - -### Example 1: Retrieves a list of all cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Get-EntraFeatureRolloutPolicy -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False True -bbbbbbbb-1111-2222-3333-cccccccccccc Feature-Rollout-Policy change emailAsAlternateId False False -``` - -This command retrieves a list of all cloud authentication roll-out policies in Microsoft Entra ID. - -### Example 2: Retrieves cloud authentication roll-out in Microsoft Entra ID with given ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Get-EntraFeatureRolloutPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output - -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False - -``` - -This example retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. - -- `-Id` - Specify The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -### Example 3: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Search String - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Get-EntraFeatureRolloutPolicy -SearchString 'Feature-Rollout-Policy' -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False -``` - -This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. - -### Example 4: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Filter parameter - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Get-EntraFeatureRolloutPolicy -Filter "Description eq 'Feature-Rollout-Policy'" -``` - -```Output - -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False - -``` - -This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. - -## Parameters - -### -Id - -The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.MsFeatureRolloutPolicy - -## Notes - -## Related Links - -[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) - -[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) - -[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md deleted file mode 100644 index 358563649f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Get-EntraIdentityProvider -description: This article provides details on the Get-EntraIdentityProvider command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraIdentityProvider - -schema: 2.0.0 ---- - -# Get-EntraIdentityProvider - -## Synopsis - -This cmdlet is used to retrieve the configured identity providers in the directory. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraIdentityProvider - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraIdentityProvider - -IdentityProviderBaseId - [-Property ] - [] -``` - -## Description - -The `Get-EntraIdentityProvider` cmdlet is used to retrieve the identity providers that have been configured in the directory. -These identity providers can be used to allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C. - -Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. -For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. -The Gmail user will use their Google account credentials to authenticate and access the documents. - -The current set of identity providers can be Microsoft, Google, Facebook, Amazon, or LinkedIn. - -## Examples - -### Example 1: Retrieve all identity providers - -```powershell -Connect-Entra -Scopes 'IdentityProvider.Read.All' -Get-EntraIdentityProvider -``` - -```Output -Id DisplayName --- ----------- -AADSignup-OAUTH Directory Sign up -Google-OAUTH Test -EmailOtpSignup-OAUTH Email One Time Passcode -MSASignup-OAUTH Microsoft Account -``` - -This example retrieves the list of all configured identity providers and their properties. - -### Example 2: Retrieve identity provider by Id - -```powershell -Connect-Entra -Scopes 'IdentityProvider.Read.All' -Get-EntraIdentityProvider -IdentityProviderBaseId Google-OAUTH -``` - -```Output -Id DisplayName --- ----------- -Google-OAUTH GoogleName -``` - -This example retrieves the properties for the specified identity provider. - -- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. - -## Parameters - -### -IdentityProviderBaseId - -The unique identifier for an identity provider. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md deleted file mode 100644 index edab5a7bd4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: Get-EntraNamedLocationPolicy -description: This article provides details on the Get-EntraNamedLocationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy - -schema: 2.0.0 ---- - -# Get-EntraNamedLocationPolicy - -## Synopsis - -Gets a Microsoft Entra ID named location policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraNamedLocationPolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraNamedLocationPolicy - -PolicyId - [-Property ] - [] -``` - -## Description - -This cmdlet allows an admin to get the Microsoft Entra ID named location policies. - -Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. - -## Examples - -### Example 1: Retrieves a list of all named location policies in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraNamedLocationPolicy -``` - -```Output -Id CreatedDateTime DisplayName ModifiedDateTime --- --------------- ----------- ---------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee 31/07/2024 9:53:10 NamedLocation 31/07/2024 9:53:10 -eeeeeeee-4444-5555-6666-ffffffffffff 31/07/2024 4:38:42 NamedLocation1 31/07/2024 4:38:42 -ffffffff-5555-6666-7777-aaaaaaaaaaaa 01/08/2024 4:39:42 NamedLocation2 01/08/2024 4:39:42 -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 01/08/2024 4:57:03 NamedLocation3 01/08/2024 4:57:03 -``` - -This command retrieves a list of all named location policies in Microsoft Entra ID. - -### Example 2: Retrieves a named location policy by Id - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraNamedLocationPolicy -PolicyId 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -``` - -```Output -Id CreatedDateTime DisplayName ModifiedDateTime --- --------------- ----------- ---------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee 3/1/2024 9:53:10 AM NamedLocation 3/1/2024 9:53:10 AM -``` - -This example retrieves a specified named location policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the policy Id of a named location policy. - -## Parameters - -### -PolicyId - -Specifies the ID of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) - -[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) - -[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md deleted file mode 100644 index 7d77a9299d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -title: Get-EntraOAuth2PermissionGrant -description: This article provides details on the Get-EntraOAuth2PermissionGrant Command. - - -ms.topic: reference -ms.date: 10/16/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant - -schema: 2.0.0 ---- - -# Get-EntraOAuth2PermissionGrant - -## Synopsis - -Gets OAuth2PermissionGrant entities. - -## Syntax - -```powershell -Get-EntraOAuth2PermissionGrant - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraOAuth2PermissionGrant` cmdlet gets OAuth2PermissionGrant entities in Microsoft Entra ID. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: - -- Application Administrator -- Application Developer -- Cloud Application Administrator -- Directory Writers -- Privileged Role Administrator -- User Administrator -- Directory Readers -- Global Reader - -## Examples - -### Example 1: Get the OAuth2 permission grants - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraOAuth2PermissionGrant -``` - -```Output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All -C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read -E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read -H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read -``` - -This command gets the OAuth2 permission grants. - -### Example 2: Get all the OAuth2 permission grants - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraOAuth2PermissionGrant -All -``` - -```Output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All -C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read -E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read -H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read -``` - -This command gets all the OAuth2 permission grants. - -### Example 3: Get OAuth2 permission grants for a user in a service principal - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$user = Get-EntraUser -UserId 'SawyerM@contoso.com' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Helpdesk Application'" -Get-EntraOAuth2PermissionGrant | Where-Object {$_.ClientId -eq $servicePrincipal.Id -and $_.PrincipalId -eq $user.Id} | Format-List -``` - -```Output -ObjectId : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 -ClientId : 22223333-cccc-4444-dddd-5555eeee6666 -ConsentType : Principal -Id : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 -PrincipalId : aaaaaaaa-bbbb-cccc-1111-222222222222 -ResourceId : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 -Scope : User.Read.All openid profile offline_access Organization.Read.All User.ReadWrite.All Device.Read.All Device.ReadWrite.All Directory.Read.All User.Read RoleManagement.ReadWrite.Directory Group.ReadWrite.All -AdditionalProperties : {} -``` - -This example gets the OAuth2 permission grants for a user in a service principal. - - -### Example 4: Get top 2 OAuth2 permission grants record - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraOAuth2PermissionGrant -Top 2 -``` - -```output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All -C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read -``` - -This command retrieves the top 2 OAuth2 permission grant records. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) -[New-EntraOAuth2PermissionGrant](New-EntraOauth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md deleted file mode 100644 index 35e31777dd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: Get-EntraPermissionGrantConditionSet -description: This article provides details on the Get-EntraPermissionGrantConditionSet command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet - -schema: 2.0.0 ---- - -# Get-EntraPermissionGrantConditionSet - -## Synopsis - -Get a Microsoft Entra ID permission grant condition set by ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPermissionGrantConditionSet - -ConditionSetType - -PolicyId - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraPermissionGrantConditionSet - -ConditionSetType - -Id - -PolicyId - [-Property ] - [] -``` - -## Description - -Get a Microsoft Entra ID permission grant condition set object by ID. - -## Examples - -### Example 1: Get all permission grant condition sets that are included in the permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'includes' -} - -Get-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds --- ------------------------------- -------------------- ----------------------------- -------------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -``` - -This command gets all permission grant condition sets that are included in the policy. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. - -### Example 2: Get all permission grant condition sets that are excluded in the permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'excludes' -} - -Get-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds --- ------------------------------- -------------------- ----------------------------- -------------------- -bbbbbbbb-1111-2222-3333-cccccccccccc False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -cccccccc-2222-3333-4444-dddddddddddd False {44445555-eeee-6666-ffff-7777gggg8888} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -``` - -This command gets all permission grant condition sets that are excluded in the policy. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. - -### Example 3: Get a permission grant condition set - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'includes' - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -} - -Get-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds --- ------------------------------- -------------------- ----------------------------- -------------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -``` - -This command gets a permission grant condition set specified by Id. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-Id` parameter specifies the unique identifier of the permission grant condition set object. - -## Parameters - -### -PolicyId - -The unique identifier of a Microsoft Entra ID permission grant policy object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ConditionSetType - -The value indicates whether the condition sets are included in the policy or excluded. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a Microsoft Entra ID permission grant condition set object. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet - -## Notes - -## Related Links - -[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) - -[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) - -[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md deleted file mode 100644 index 800032dcc0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Get-EntraPermissionGrantPolicy -description: This article provides details on the Get-EntraPermissionGrantPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy - -schema: 2.0.0 ---- - -# Get-EntraPermissionGrantPolicy - -## Synopsis - -Gets a permission grant policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPermissionGrantPolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraPermissionGrantPolicy - -Id - [-Property ] - [] -``` - -## Description - -The `Get-EntraPermissionGrantPolicy` cmdlet gets a Microsoft Entra ID permission grant policy. - -## Examples - -### Example 1: Get all permission grant policies - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -Get-EntraPermissionGrantPolicy -``` - -```Output -DeletedDateTime Description ---------------- ----------- - Includes all application permissions (app roles), for all APIs, for any client application. - Includes all chat resoruce-specific application permissions, for all APIs, for any client application. - (Deprecated) Includes all team resource-specific application permissions, for all APIs, for any client application. -``` - -This command gets all the permission grant policies. - -### Example 2: Get a permission grant policy by ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -Get-EntraPermissionGrantPolicy -Id 'testtenant-sampleapp-permissions' -``` - -```Output -DeletedDateTime Description DisplayName Id ---------------- ----------- ----------- -- - Permissions for sample app in test tenant Sample app permissions testtenant-sampleapp-permissions -``` - -This command gets the specified permission grant policy. - -- `Id` parameter specifies the permission grant policy ID. - -## Parameters - -### -Id - -Specifies the unique identifier of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) - -[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) - -[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md deleted file mode 100644 index 77785c64c1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -title: Get-EntraPolicy -description: This article provides details on the Get-EntraPolicy command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPolicy - -schema: 2.0.0 ---- - -# Get-EntraPolicy - -## Synopsis - -Gets a policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPolicy - [-Top ] - [-All] - [] -``` - -### GetById - -```powershell -Get-EntraPolicy - -Id - [-All] - [] -``` - -## Description - -The `Get-EntraPolicy` cmdlet gets a policy in Microsoft Entra ID. Specify `Id` parameter to get a policy. - -## Examples - -### Example 1: Get all policies - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy -``` - -```Output -Definition DeletedDateTime Description DisplayName Id ----------- --------------- ----------- ----------- -- -{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc -{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 -``` - -This example shows how to return all policies. - -### Example 2: Get policy using Display Name - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} -``` - -```Output -DeletedDateTime Description DisplayName Id ---------------- ----------- ----------- -- - Permissions consentable based on Microsoft's current recommendations. Microsoft User Default Recommended Policy microsoft-user-default-recommended -``` - -This example shows how to get a specific policy using Display Name. - -### Example 3: Get a policy with specific ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy -Id 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True -``` - -This example demonstrated how to receive policy with specific ID. - -- `Id` parameter specifies the unique policy ID, which you want to receive. In this example, `bbbbbbbb-1111-2222-3333-cccccccccccc` represents the ID of the policy. - -### Example 4: Get all policies - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy -All -``` - -```Output -Definition DeletedDateTime Description DisplayName Id ----------- --------------- ----------- ----------- -- -{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc -{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 -``` - -This example demonstrates how to retrieve all policies in Microsoft Entra ID. - -### Example 5: Get the top one policy - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy -Top 1 -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True -``` - -This example demonstrates how to retrieve top one policies in Microsoft Entra ID. - -## Parameters - -### -Id - -The Id of the policy you want to retrieve. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all policies. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraPolicy](New-EntraPolicy.md) - -[Remove-EntraPolicy](Remove-EntraPolicy.md) - -[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md deleted file mode 100644 index a26bfd778e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: Get-EntraTrustedCertificateAuthority -description: This article provides details on the Get-EntraTrustedCertificateAuthority command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority - -schema: 2.0.0 ---- - -# Get-EntraTrustedCertificateAuthority - -## Synopsis - -Gets the trusted certificate authority. - -## Syntax - -```powershell -Get-EntraTrustedCertificateAuthority - [-TrustedIssuerSki ] - [-TrustedIssuer ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraTrustedCertificateAuthority` cmdlet gets the trusted certificate authority in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the trusted certificate authorities that are defined in your directory - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTrustedCertificateAuthority -``` - -```Output -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl1 -DeltaCrlDistributionPoint : -TrustedCertificate : {48, 130, 3, 4...} -TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A - -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl -DeltaCrlDistributionPoint : https://deltaexample.crl -TrustedCertificate : {48, 130, 3, 4...} -TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C - -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl -DeltaCrlDistributionPoint : -TrustedCertificate : {48, 130, 3, 0...} -TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD -``` - -This command retrieves the trusted certificate authorities that are defined in your directory. - -### Example 2: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuer - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTrustedCertificateAuthority -TrustedIssuer 'CN=mscmdlet' -``` - -```Output -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl1 -DeltaCrlDistributionPoint : -TrustedCertificate : {48, 130, 3, 4...} -TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A - -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl -DeltaCrlDistributionPoint : https://deltaexample.crl -TrustedCertificate : {48, 130, 3, 4...} -TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C -``` - -This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuer. - -- `-TrustedIssuer` parameter specifies the trusted issuer. - -### Example 3: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTrustedCertificateAuthority -TrustedIssuerSki 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD -``` - -```Output -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl -DeltaCrlDistributionPoint : -TrustedCertificate : {48, 130, 3, 0...} -TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD -``` - -This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki. - -- `-TrustedIssuerSki` parameter specifies the trusted issuer ski. - -## Parameters - -### -TrustedIssuer - -Specifies a trusted issuer. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -TrustedIssuerSki - -Specifies a trusted issuer ski. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) - -[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) - -[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md deleted file mode 100644 index 3b9cb44f36..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md +++ /dev/null @@ -1,278 +0,0 @@ ---- -title: New-EntraConditionalAccessPolicy -description: This article provides details on the New-EntraConditionalAccessPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy - -schema: 2.0.0 ---- - -# New-EntraConditionalAccessPolicy - -## Synopsis - -Creates a new conditional access policy in Microsoft Entra ID. - -## Syntax - -```powershell -New-EntraConditionalAccessPolicy - [-Id ] - [-DisplayName ] - [-State ] - [-Conditions ] - [-GrantControls ] - [-SessionControls ] - [] -``` - -## Description - -This cmdlet allows an admin to create new conditional access policy in Microsoft Entra ID. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Creates a new conditional access policy in Microsoft Entra ID that require MFA to access Exchange Online - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet -$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition -$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' -$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition -$conditions.Users.IncludeUsers = 'all' -$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls -$controls._Operator = 'OR' -$controls.BuiltInControls = 'mfa' - -$params = @{ - DisplayName = 'MFA policy' - State = 'Enabled' - Conditions = $conditions - GrantControls = $controls -} - -New-EntraConditionalAccessPolicy @params -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:29:09 MFA policy enabled -``` - -This command creates a new conditional access policy in Microsoft Entra ID that requires MFA to access Exchange Online. - -- `-DisplayName` parameter specifies the display name of a conditional access policy. -- `-State` parameter specifies the enabled or disabled state of the conditional access policy. -- `-Conditions` parameter specifies the conditions for the conditional access policy. -- `-GrantControls` parameter specifies the controls for the conditional access policy. -- `-SessionControls` parameter Enables limited experiences within specific cloud applications. - -### Example 2: Creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet -$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition -$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' -$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition -$conditions.Users.IncludeUsers = 'all' -$conditions.Locations = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition -$conditions.Locations.IncludeLocations = '5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9' -$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls -$controls._Operator = 'OR' -$controls.BuiltInControls = 'block' - -$params = @{ - DisplayName = 'MFA policy' - State = 'Enabled' - Conditions = $conditions - GrantControls = $controls -} - -New-EntraConditionalAccessPolicy @params -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 MFA policy enabled -``` - -This command creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions. - -- `-DisplayName` parameter specifies the display name of a conditional access policy. -- `-State` parameter specifies the enabled or disabled state of the conditional access policy. -- `-Conditions` parameter specifies the conditions for the conditional access policy. -- `-GrantControls` parameter specifies the controls for the conditional access policy. - -### Example 3: Use all conditions and controls - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' - -$Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet -$Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") -$Condition.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition -$Condition.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" -$Condition.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition -$Condition.Users.IncludeUsers = "all" - -$Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls -$Controls._Operator = "AND" -$Controls.BuiltInControls = @("mfa") - -$SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls -$ApplicationEnforcedRestrictions = New-Object Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions -$ApplicationEnforcedRestrictions.IsEnabled = $true -$SessionControls.applicationEnforcedRestrictions = $ApplicationEnforcedRestrictions -$params = @{ - DisplayName = "ConditionalAccessPolicy" - Conditions = $conditions - GrantControls = $controls - SessionControls = $SessionControls - } -New-EntraConditionalAccessPolicy @params -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 ConditionalAccessPolicy enabled -``` - -This example creates new conditional access policy in Microsoft Entra ID with all the conditions and controls. - -- `-DisplayName` parameter specifies the display name of a conditional access policy. -- `-Conditions` parameter specifies the conditions for the conditional access policy. -- `-GrantControls` parameter specifies the controls for the conditional access policy. -- `-SessionControls` parameter Enables limited experiences within specific cloud applications. - -## Parameters - -### -DisplayName - -Specifies the display name of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State - -Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Conditions - -Specifies the conditions for the conditional access policy in Microsoft Entra ID. - -```yaml -Type: ConditionalAccessConditionSet -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GrantControls - -Specifies the controls for the conditional access policy in Microsoft Entra ID. - -```yaml -Type: ConditionalAccessGrantControls -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the policy Id of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SessionControls - -Enables limited experiences within specific cloud applications. - -```yaml -Type: ConditionalAccessSessionControls -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) - -[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) - -[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md deleted file mode 100644 index e276f16fd8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -title: New-EntraFeatureRolloutPolicy -description: This article provides details on the New-EntraFeatureRolloutPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy - -schema: 2.0.0 ---- - -# New-EntraFeatureRolloutPolicy - -## Synopsis - -Allows an admin to create the policy for cloud authentication roll-out in Microsoft Entra ID. - -## Syntax - -```powershell -New-EntraFeatureRolloutPolicy - -Feature - -IsEnabled - [-Description ] - [-IsAppliedToOrganization ] - [-AppliesTo ] - -DisplayName - [] -``` - -## Description - -The `New-EntraFeatureRolloutPolicy` cmdlet allows an admin to create the policy for cloud authentication roll-out (users moving from federation to cloud auth) in Microsoft Entra ID. - -The policy admin can identify whether the users authenticate using password hashes in Microsoft Entra ID (Password hash-sync) or Microsoft Entra ID on-premises directly (Pass-through authentication). - -## Examples - -### Example 1: Creates the policy for cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Feature = 'PassthroughAuthentication' - DisplayName = 'FeatureRolloutPolicy' - IsEnabled = $false -} -New-EntraFeatureRolloutPolicy @params -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False - -``` - -This example creates the policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. -Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. - -- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. - -- `-IsEnabled` specifies the status of cloud authentication roll-out policy. - -### Example 2: Creates the policy for cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Feature = 'PassthroughAuthentication' - DisplayName = 'FeatureRolloutPolicy' - IsEnabled = $false - IsAppliedToOrganization = $false -} -New-EntraFeatureRolloutPolicy @params -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False - -``` - -This command creates the policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. -Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. - -- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. - -- `-IsEnabled` specifies the status of cloud authentication roll-out policy. - -- `-IsAppliedToOrganization` specifies if the cloud authentication roll-out policy applied to the entire organization. - -## Parameters - -### -DisplayName - -Specifies the display name of the cloud authentication roll-out policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Feature - -Specifies a feature assigned to the cloud authentication roll-out policy. - -Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. - -```yaml -Type: FeatureEnum -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsEnabled - -Specifies the status of cloud authentication roll-out policy. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies the description of the cloud authentication roll-out policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppliesTo - -Specifies a list of Microsoft Entra ID objects that is assigned to the feature. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsAppliedToOrganization - -Specifies if the cloud authentication roll-out policy applied to the entire organization. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.MsFeatureRolloutPolicy - -## Notes - -## Related Links - -[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) - -[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) - -[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md deleted file mode 100644 index 246056cf38..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -title: New-EntraIdentityProvider -description: This article provides details on the New-EntraIdentityProvider command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraIdentityProvider - -schema: 2.0.0 ---- - -# New-EntraIdentityProvider - -## Synopsis - -Configure a new identity provider in the directory. - -## Syntax - -```powershell -New-EntraIdentityProvider - -Type - -ClientSecret - -ClientId - [-Name ] - [] -``` - -## Description - -The `New-EntraIdentityProvider` cmdlet is used to configure an identity provider in the directory. - -Adding an identity provider will allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C using the identity provider. - -Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. - -For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. The Gmail user will use their Google account credentials to authenticate and access the documents. - -The current set of identity providers can be: - -- Microsoft -- Google -- Facebook -- Amazon -- LinkedIn - -The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. - -## Examples - -### Example 1: Add LinkedIn identity provider - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -$params = @{ - Type = 'LinkedIn' - Name = 'LinkedInName' - ClientId = 'LinkedInAppClientId' - ClientSecret = 'LinkedInAppClientSecret' -} - -New-EntraIdentityProvider @params -``` - -```Output -Id DisplayName --- ----------- -LinkedIn-OAUTH LinkedInName -``` - -This example adds a LinkedIn identity provider. - -- `-Type` parameter specifies the identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. -- `-Name` parameter specifies the display name of the identity provider. -- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. -- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. - -## Parameters - -### -ClientId - -The client identifier for the application, obtained during the application's registration with the identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientSecret - -The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -The display name of the identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. - -For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md deleted file mode 100644 index 997bf4368b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: New-EntraNamedLocationPolicy -description: This article provides details on the New-EntraNamedLocationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy - -schema: 2.0.0 ---- - -# New-EntraNamedLocationPolicy - -## Synopsis - -Creates a new named location policy in Microsoft Entra ID. - -## Syntax - -```powershell -New-EntraNamedLocationPolicy - [-OdataType ] - [-Id ] - [-DisplayName ] - [-IpRanges ] - [-IsTrusted ] - [-CountriesAndRegions ] - [-IncludeUnknownCountriesAndRegions ] - [] -``` - -## Description - -This cmdlet allows an admin to create new named location policy in Microsoft Entra ID. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Creates a new Ip named location policy in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange -$ipRanges.cidrAddress = '6.5.4.3/32' -$params = @{ - OdataType = '#microsoft.graph.ipNamedLocation' - DisplayName = 'IP named location policy' - IsTrusted = $false - IpRanges = $ipRanges -} - -New-EntraNamedLocationPolicy @params -``` - -```Output -Id CreatedDateTime DisplayName ModifiedDateTime --- --------------- ----------- ---------------- -bbbbbbbb-1111-2222-3333-cccccccccccc 31-07-2024 10:45:27 IP named location policy 31-07-2024 10:45:27 -``` - -This command creates a new country named location policy in Microsoft Entra ID. - -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-DisplayName` parameter specifies the display name of a named location policy. -- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. -- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. - -### Example 2: Creates a new country named location policy in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$params = @{ - OdataType = '#microsoft.graph.countryNamedLocation' - DisplayName = 'Country named location policy' - CountriesAndRegions = 'IN' - IncludeUnknownCountriesAndRegions = $false -} - -New-EntraNamedLocationPolicy @params -``` - -```Output -Id CreatedDateTime DisplayName ModifiedDateTime --- --------------- ----------- ---------------- -cccccccc-2222-3333-4444-dddddddddddd 31-07-2024 10:46:16 Country named location policy 31-07-2024 10:46:16 -``` - -This command creates a new country named location policy in Microsoft Entra ID. - -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-DisplayName` parameter specifies the display name of a named location policy. -- `-CountriesAndRegions` parameter specifies the countries and regions for the named location policy. -- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. - -## Parameters - -### -OdataType - -Specifies the OData type of a named location policy object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IpRanges - -List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsTrusted - -Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CountriesAndRegions - -Specifies the countries and regions for the named location policy in Microsoft Entra ID. List of countries and/or regions in the two-letter format specified by ISO 3166-2. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeUnknownCountriesAndRegions - -Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the ID of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For more information, see [Create namedLocation](/graph/api/conditionalaccessroot-post-namedlocations). - -## Related Links - -[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) - -[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) - -[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md deleted file mode 100644 index 85c6a167e4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: New-EntraOauth2PermissionGrant -description: This article provides details on the New-EntraOauth2PermissionGrant command. - - -ms.topic: reference -ms.date: 06/28/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant - -schema: 2.0.0 ---- - -# New-EntraOauth2PermissionGrant - -## Synopsis - -Create a delegated permission grant using an oAuth2PermissionGrant object. This grant allows a client service principal to access a resource service principal on behalf of a signed-in user, with access restricted to the specified delegated permissions. - -## Syntax - -```powershell -New-EntraOauth2PermissionGrant - -ClientId - -ConsentType - -ResourceId - [-PrincipalId ] - [-Scope ] - [] -``` - -## Description - -The `New-EntraOauth2PermissionGrant` cmdlet creates a delegated permission grant using an oAuth2PermissionGrant object. This grant authorizes a client service principal to access a resource service principal on behalf of a signed-in user, with access limited to the specified delegated permissions. - -## Examples - -### Example 1: To grant authorization to impersonate all users - -```powershell -Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" -$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" -$params = @{ - ClientId = $servicePrincipal.Id - ConsentType = 'AllPrincipals' - ResourceId = $graphApp.Id - Scope = 'Directory.Read.All' - StartTime = Get-Date - ExpiryTime = (Get-Date).AddYears(1) -} -New-EntraOauth2PermissionGrant @params -``` - -```Output -Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope --- -------- ----------- ---------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... - -``` - -This command Grant authorization to impersonate all users. - -### Example 2: To grant authorization to impersonate a specific user - -```powershell -Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" -$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" -$user = Get-EntraUser -UserId 'SawyerM@contoso.com' -$params = @{ - ClientId = $servicePrincipal.Id - ConsentType = 'Principal' - PrincipalId = $user.Id - ResourceId = $graphApp.Id - Scope = 'Directory.Read.All' - StartTime = Get-Date - ExpiryTime = (Get-Date).AddYears(1) -} -New-EntraOauth2PermissionGrant @params -``` - -```Output -Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope --- -------- ----------- ---------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... -``` - -This command Grant authorization to impersonate a specific user. - -## Parameters - -### -ClientId - -The object ID (not appId) of the client service principal for the application, which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConsentType - -Indicates whether the client application is authorized to impersonate all users or only a specific user. - -- `AllPrincipals`: Authorizes the application to impersonate all users. -- `Principal`: Authorizes the application to impersonate a specific user. -An administrator can grant consent on behalf of all users. In some cases, non-admin users are authorized to consent on behalf of themselves for certain delegated permissions. This parameter is required and supports the $filter query (eq only). - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId - -The ID of the resource service principal to which access is authorized. This identifies the API, which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrincipalId - -The ID of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal, If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scope - -A space-separated list of the claim values for delegated permissions, which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3,850 characters in length. - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## RELATED LINKS - -[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) -[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md deleted file mode 100644 index 2f1cf9baf9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md +++ /dev/null @@ -1,372 +0,0 @@ ---- -title: New-EntraPermissionGrantConditionSet -description: This article provides details on the New-EntraPermissionGrantConditionSet command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet - -schema: 2.0.0 ---- - -# New-EntraPermissionGrantConditionSet - -## Synopsis - -Create a new Microsoft Entra ID permission grant condition set in a given policy. - -## Syntax - -```powershell -New-EntraPermissionGrantConditionSet - -PolicyId - -ConditionSetType - [-Permissions ] - [-ClientApplicationTenantIds ] - [-ClientApplicationIds ] - [-ResourceApplication ] - [-PermissionType ] - [-PermissionClassification ] - [-ClientApplicationsFromVerifiedPublisherOnly ] - [-ClientApplicationPublisherIds ] - [] -``` - -## Description - -Create a new Microsoft Entra ID permission grant condition set object in an existing policy. - -## Examples - -### Example 1: Create a basic permission grant condition set in an existing policy with all build in values - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ -PolicyId = $permissionGrantPolicyId -ConditionSetType = 'includes' -PermissionType = 'delegated' -} - -New-EntraPermissionGrantConditionSet @params -``` - -```Output -Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions --- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- -aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {all} -``` - -This command creates a basic permission grant condition set in an existing policy with all build in values. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. - -### Example 2: Create a permission grant condition set in an existing policy that includes specific permissions for a resource application - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id -$params = @{ -PolicyId = $permissionGrantPolicyId -ConditionSetType = 'includes' -PermissionType = 'delegated' -Permissions = @($permission) -ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' -} - -New-EntraPermissionGrantConditionSet @params -``` - -```Output -Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions --- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- -aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {8b590... -``` - -This command creates a permission grant condition set in an existing policy that includes specific permissions for a resource application. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. -- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. -- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. - -### Example 3: Create a permission grant condition set in an existing policy that is excluded - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ -PolicyId = $permissionGrantPolicyId -ConditionSetType = 'excludes' -PermissionType = 'delegated' -Permissions = @('All') -ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' -PermissionClassification = 'low' -ClientApplicationsFromVerifiedPublisherOnly = $true -ClientApplicationIds = @('All') -ClientApplicationTenantIds = @('All') -ClientApplicationPublisherIds = @('All') -} -New-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification --- ------------------------------- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------- -dddd3333-ee44-5555-66ff-777777aaaaaa False {all} {all} {all} True low -``` - -This command creates a permission grant condition set in an existing policy that is excluded. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. -- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. -- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. -- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. -- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. -- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. -- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. -- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. - -### Example 4: Create a permission grant condition set in an existing policy that is excluded - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id -$params = @{ -PolicyId = $permissionGrantPolicyId -ConditionSetType = 'excludes' -PermissionType = 'delegated' -Permissions = @($permission) -ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' -PermissionClassification = 'low' -ClientApplicationsFromVerifiedPublisherOnly = $true -ClientApplicationIds = @('00001111-aaaa-2222-bbbb-3333cccc4444', '11112222-bbbb-3333-cccc-4444dddd5555') -ClientApplicationTenantIds = @('aaaabbbb-0000-cccc-1111-dddd2222eeee', 'bbbbcccc-1111-dddd-2222-eeee3333ffff', 'ccccdddd-2222-eeee-3333-ffff4444aaaa') -ClientApplicationPublisherIds = @('33334444-dddd-5555-eeee-6666ffff7777') -} -New-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds --- ------------------------------- -------------------- ----------------------------- -------------------- -cccccccc-2222-3333-4444-dddddddddddd False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -``` - -This command creates a permission grant condition set in an existing policy that is excluded. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. -- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. -- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. -- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. -- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. -- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. -- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. -- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. - -## Parameters - -### -PolicyId - -The unique identifier of a Microsoft Entra ID permission grant policy object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ConditionSetType - -The value indicates whether the condition sets are included in the policy or excluded. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PermissionType - -Specific type of permissions (application, delegated) to scope consent operation down to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PermissionClassification - -Specific classification (all, low, medium, high) to scope consent operation down to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Permissions - -The identifier of the resource application to scope consent operation down to. -It could be @("All") or a list of permission IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationIds - -The set of client application IDs to scope consent operation down to. -It could be @("All") or a list of client application IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationTenantIds - -The set of client application tenant IDs to scope consent operation down to. -It could be @("All") or a list of client application tenant IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationPublisherIds - -The set of client applications publisher IDs to scope consent operation down to. -It could be @("All") or a list of client application publisher IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationsFromVerifiedPublisherOnly - -A value indicates whether to only includes client applications from verified publishers. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceApplication - -The identifier of the resource application to scope consent operation down to. -It could be "Any" or a specific resource application ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet - -## Notes - -## Related Links - -[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) - -[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) - -[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md deleted file mode 100644 index ef81f38eb6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: New-EntraPermissionGrantPolicy -description: This article provides details on the New-EntraPermissionGrantPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy - -schema: 2.0.0 ---- - -# New-EntraPermissionGrantPolicy - -## Synopsis - -Creates a permission grant policy. - -## Syntax - -```powershell -New-EntraPermissionGrantPolicy - -Id - [-DisplayName ] - [-Description ] - [] -``` - -## Description - -The `New-EntraPermissionGrantPolicy` cmdlet creates a Microsoft Entra ID permission grant policy. - -## Examples - -### Example 1: Create a permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$params = @{ - Id = 'my_new_permission_grant_policy_id' - DisplayName = 'MyNewPermissionGrantPolicy' - Description = 'My new permission grant policy' -} - -New-EntraPermissionGrantPolicy @params -``` - -```Output -DeletedDateTime Description DisplayName Id ---------------- ----------- ----------- -- - My new permission grant policy MyNewPermissionGrantPolicy my_new_permission_grant_policy_id -``` - -This example creates new permission grant policy in Microsoft Entra ID. - -- `-Id` parameter specifies the unique identifier of the permission grant policy. -- `-DisplayName` parameter specifies the display name for the permission grant policy. -- `-Description` parameter specifies the description for the permission grant policy. - -## Parameters - -### -Description - -Specifies the description for the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name for the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the unique identifier of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) - -[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) - -[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md deleted file mode 100644 index 1bbe623503..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -title: New-EntraPolicy -description: This article provides details on the New-EntraPolicy command. - - -ms.topic: reference -ms.date: 08/02/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPolicy - -schema: 2.0.0 ---- - -# New-EntraPolicy - -## Synopsis - -Creates a policy. - -## Syntax - -```powershell -New-EntraPolicy - -Definition - -DisplayName - -Type - [-IsOrganizationDefault ] - [] -``` - -## Description - -The `New-EntraPolicy` cmdlet creates a policy in Microsoft Entra ID. Specify `DisplayName`, `Definition` and `Type` parameters for create a new policy. - -## Examples - -### Example 1: Create a new policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') - DisplayName = 'NewPolicy' - Type = 'HomeRealmDiscoveryPolicy' -} -New-EntraPolicy @params -``` - -```Output -Definition DeletedDateTime Description DisplayName Id IsOrganizationD - efault ----------- --------------- ----------- ----------- -- --------------- -{{"HomeReayPolicy":{"AlternateLoginIDLookup":true, "IncluderIds":["UserID"]}}} NewPolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False -``` - -This command creates a new policy in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` Parameter specifies the type of policy. - -### Example 2: Create a ClaimsMappingPolicy policy by 'IsOrganizationDefault' parameter - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name\",\"JwtClaimType\":\"upn\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://schemas.microsoft.com/identity/claims/displayname\",\"JwtClaimType\":\"name\"}]}}" ], "displayName": "Custom Claims Issuance Policy", "isOrganizationDefault": false }') - DisplayName ='ClaimstestPolicy' - Type = 'claimsMappingPolicies' - IsOrganizationDefault = $false -} -New-EntraPolicy @params -``` - -```Output -Definition ----------- -{{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLCl… -``` - -This command creates a ClaimsMappingPolicy using 'IsOrganizationDefault' parameter in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` - Parameter specifies the type of policy. In this example, `ClaimsMappingPolicy` - represents the type of policy. - -- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. - -### Example 3: Create a TokenLifetimePolicy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}') - DisplayName = 'TokenLifetimePolicy' - Type = 'TokenLifetimePolicy' - IsOrganizationDefault = $false -} -New-EntraPolicy @params -``` - -```Output -Definition DeletedDateTime Description DisplayName Id IsOrganizatio - nDefault ----------- --------------- ----------- ----------- -- ------------- -{{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}} TokenLifetimePolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False -``` - -This command creates a TokenLifetimePolicy in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` Parameter specifies the type of policy. - -### Example 4: Create a TokenIssuancePolicy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly","EmitSAMLNameFormat":"true"}}') - DisplayName = 'tokenIssuance' - Type = 'TokenIssuancePolicy' -} -New-EntraPolicy @params -``` - -```Output -Definition ----------- -{{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly… -``` - -This command creates a TokenIssuancePolicy in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` Parameter specifies the type of policy. - -### Example 5: Create a ActivityBasedTimeoutPolicy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') - DisplayName = 'ActivityBasedTimeoutPolicyname' - Type = 'ActivityBasedTimeoutPolicy' -} -New-EntraPolicy @params -``` - -```Output -Definition DeletedDateTime Description DisplayName Id ----------- --------------- ----------- ----------- -- -{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} ActivityBasedTimeoutPolicyname aaaaaaaa-0000-1111-2222... - -``` - -This command creates a ActivityBasedTimeoutPolicy in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` Parameter specifies the type of policy. - -## Parameters - -### -Definition - -Specifies an array of JSON that contains all the rules of the policy, for example: -Definition @("{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}"). - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -String of the policy name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsOrganizationDefault - -True if this policy is the organizational default. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies the type of policy. -For token lifetimes, specify "TokenLifetimePolicy." - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPolicy](Get-EntraPolicy.md) - -[Remove-EntraPolicy](Remove-EntraPolicy.md) - -[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md deleted file mode 100644 index ab18d1f589..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: New-EntraTrustedCertificateAuthority -description: This article provides details on the New-EntraTrustedCertificateAuthority command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority - -schema: 2.0.0 ---- - -# New-EntraTrustedCertificateAuthority - -## Synopsis - -Creates a trusted certificate authority. - -## Syntax - -```powershell -New-EntraTrustedCertificateAuthority - -CertificateAuthorityInformation - [] -``` - -## Description - -The `New-EntraTrustedCertificateAuthority` cmdlet creates a trusted certificate authority in Microsoft Entra ID. - -## Examples - -### Example 1: Creates the trusted certificate authorities in your directory - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' - -$new_ca = New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation #Create CertificateAuthorityInformation object -$new_ca.AuthorityType = "RootAuthority" -$new_ca.CrlDistributionPoint = "https://example.crl" -$new_ca.DeltaCrlDistributionPoint = "https://deltaexample.crl" -$new_ca.TrustedCertificate = "Path to .cer file(including cer file name)" -New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca -``` - -```Output -Id --- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command creates the trusted certificate authorities in your directory. - -- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. -It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. - -## Parameters - -### -CertificateAuthorityInformation - -Specifies a CertificateAuthorityInformation object. - -```yaml -Type: CertificateAuthorityInformation -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) - -[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) - -[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md deleted file mode 100644 index f0703bac66..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Remove-EntraConditionalAccessPolicy -description: This article provides details on the Remove-EntraConditionalAccessPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy - -schema: 2.0.0 ---- - -# Remove-EntraConditionalAccessPolicy - -## Synopsis - -Deletes a conditional access policy in Microsoft Entra ID by Id. - -## Syntax - -```powershell -Remove-EntraConditionalAccessPolicy - -PolicyId - [] -``` - -## Description - -This cmdlet allows an admin to delete a conditional access policy in Microsoft Entra ID by Id. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Deletes a conditional access policy in Microsoft Entra ID by PolicyId - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -$policy = Get-EntraConditionalAccessPolicy | Where-Object {$_.DisplayName -eq 'MFA policy'} -Remove-EntraConditionalAccessPolicy -PolicyId $policy.ObjectId -``` - -This command deletes a conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of a conditional access policy. - -## Parameters - -### -PolicyId - -Specifies the policy Id of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) - -[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) - -[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md deleted file mode 100644 index 75ae9347b1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Remove-EntraFeatureRolloutPolicy -description: This article provides details on the Remove-EntraFeatureRolloutPolicy command. - - -ms.topic: reference -ms.date: 07/22/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraBetaFeatureRolloutPolicy -schema: 2.0.0 ---- - -# Remove-EntraFeatureRolloutPolicy - -## Synopsis - -Allows an admin to remove the policy for cloud authentication roll-out in Microsoft Entra ID. - -## Syntax - -```powershell -Remove-EntraFeatureRolloutPolicy - -Id - [] -``` - -## Description - -An admin uses `Remove-EntraFeatureRolloutPolicy` cmdlet to remove the cloud authentication roll-out policy and have all users where policy applied to be free of the policy. - -Users in groups that were assigned to the policy falls back to the global authentication method (most common case will be federation). Specify `Id` parameter to remove the cloud authentication roll-out policy. - -## Examples - -### Example 1: Removes the policy for cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$Policy = Get-EntraFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policy'" -Remove-EntraFeatureRolloutPolicy -Id $Policy.Id -``` - -This example removes the policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Id` - specifies the unique identifier of the cloud authentication roll-out policy. You can use `Get-EntraFeatureRolloutPolicy` to retrieve policy details. - -## Parameters - -### -Id - -The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) - -[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) - -[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md deleted file mode 100644 index 03968e43e8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Remove-EntraFeatureRolloutPolicyDirectoryObject -description: This article provides details on the Remove-EntraFeatureRolloutPolicyDirectoryObject command. - - -ms.topic: reference -ms.date: 07/22/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject - -schema: 2.0.0 ---- - -# Remove-EntraFeatureRolloutPolicyDirectoryObject - -## Synopsis - -Allows an admin to remove a group from the cloud authentication rollout policy in Microsoft Entra ID. -Users in this group revert back to the authenticating using the global policy (in most cases this will be federation). - -## Syntax - -```powershell -Remove-EntraFeatureRolloutPolicyDirectoryObject - -ObjectId - -Id - [] -``` - -## Description - -An admin uses the `Remove-EntraFeatureRolloutPolicyDirectoryObject` cmdlet to remove groups from the cloud authentication roll-out policy. - -Users in these groups start authenticating against the global authentication policy (for example, -federation). Specify `ObjectId` and `Id` parameter to remove groups from the cloud authentication roll-out policy. - -## Examples - -### Example 1: Removes a group from the cloud authentication roll-out policy from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - ObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -} -Remove-EntraFeatureRolloutPolicyDirectoryObject @params -``` - -This command removes a group from the cloud authentication roll-out policy from Microsoft Entra ID. - -- `-Id` Parameter specifies the ID of the cloud authentication roll-out policy. -- `-ObjectId` parameter specifies the ID of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy. - -## Parameters - -### -ID - -The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -The unique identifier of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md deleted file mode 100644 index c1982b130d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Remove-EntraIdentityProvider -description: This article provides details on the Remove-EntraIdentityProvider command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraIdentityProvider - -schema: 2.0.0 ---- - -# Remove-EntraIdentityProvider - -## Synopsis - -This cmdlet is used to delete an identity provider in the directory. - -## Syntax - -```powershell -Remove-EntraIdentityProvider - -IdentityProviderBaseId - [] -``` - -## Description - -This cmdlet is used to delete an identity provider that has been configured in the directory. - -The identity provider is permanently deleted. - -The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. - -## Examples - -### Example 1: Remove the identity provider in the directory - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -Remove-EntraIdentityProvider -IdentityProviderBaseId 'LinkedIn-OAUTH' -``` - -This command demonstrates how to remove the specified identity provider. - -- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. - -## Parameters - -### -IdentityProviderBaseId - -The unique identifier for an identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraIdentityProvider](New-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md deleted file mode 100644 index 405c7db5f6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Remove-EntraNamedLocationPolicy -description: This article provides details on the Remove-EntraNamedLocationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy - -schema: 2.0.0 ---- - -# Remove-EntraNamedLocationPolicy - -## Synopsis - -Deletes a Microsoft Entra ID named location policy by PolicyId. - -## Syntax - -```powershell -Remove-EntraNamedLocationPolicy - -PolicyId - [] -``` - -## Description - -This cmdlet allows an admin to delete the Microsoft Entra ID named location policy. - -Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. - -## Examples - -### Example 1: Deletes a named location policy in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} -Remove-EntraNamedLocationPolicy -PolicyId $policy.Id -``` - -This command demonstrates how to delete the named location policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of named location policy. - -## Parameters - -### -PolicyId - -Specifies the ID of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) - -[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) - -[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md deleted file mode 100644 index 5b9cce4030..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Remove-EntraOAuth2PermissionGrant -description: This article provides details on the Remove-EntraOAuth2PermissionGrant command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant - -schema: 2.0.0 ---- - -# Remove-EntraOAuth2PermissionGrant - -## Synopsis - -Removes an OAuth2PermissionGrant. - -## Syntax - -```powershell -Remove-EntraOAuth2PermissionGrant - -ObjectId - [] -``` - -## Description - -The `Remove-EntraOAuth2PermissionGrant` cmdlet removes an OAuth2PermissionGrant object in Microsoft Entra ID. - -When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted OAuth2PermissionGrant. - -## Examples - -### Example 1: Remove an OAuth2 permission grant - -```powershell -Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' -$SharePointSP = Get-EntraServicePrincipal | Where-Object {$_.DisplayName -eq 'Microsoft.SharePoint'} -$SharePointOA2AllSitesRead = Get-EntraOAuth2PermissionGrant | Where-Object {$_.ResourceId -eq $SharePointSP.ObjectId} | Where-Object {$_.Scope -eq 'AllSites.Read'} -Remove-EntraOAuth2PermissionGrant -ObjectId $SharePointOA2AllSitesRead.ObjectId -``` - -This example shows how to remove an OAuth2PermissionGrant object in Microsoft Entra ID. - -## Parameters - -### -ObjectId - -Specifies the ID of an OAuth2PermissionGrant object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md deleted file mode 100644 index d46b6e072d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: Remove-EntraPermissionGrantConditionSet -description: This article provides details on the Remove-EntraPermissionGrantConditionSet command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet - -schema: 2.0.0 ---- - -# Remove-EntraPermissionGrantConditionSet - -## Synopsis - -Delete a Microsoft Entra ID permission grant condition set by ID. - -## Syntax - -```powershell -Remove-EntraPermissionGrantConditionSet - -ConditionSetType - -Id - -PolicyId - [] -``` - -## Description - -Delete a Microsoft Entra ID permission grant condition set object by ID. - -## Examples - -### Example 1: Delete a permission grant condition set from a policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$PermissionGrantConditionSetId = '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'excludes' - Id = $PermissionGrantConditionSetId -} -Remove-EntraPermissionGrantConditionSet @params -``` - -This example demonstrates how to remove the Microsoft Entra ID permission grant condition set by ID. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-Id` parameter specifies the unique identifier of a permission grant condition set object. - -## Parameters - -### -PolicyId - -The unique identifier of a Microsoft Entra ID permission grant policy object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ConditionSetType - -The value indicates whether the condition sets are included in the policy or excluded. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a Microsoft Entra ID permission grant condition set object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) - -[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) - -[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md deleted file mode 100644 index bd9e0d012a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Remove-EntraPermissionGrantPolicy -description: This article provides details on the Remove-EntraPermissionGrantPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy - -schema: 2.0.0 ---- - -# Remove-EntraPermissionGrantPolicy - -## Synopsis - -Removes a permission grant policy. - -## Syntax - -```powershell -Remove-EntraPermissionGrantPolicy - -Id - [] -``` - -## Description - -The `Remove-EntraPermissionGrantPolicy` cmdlet removes a Microsoft Entra ID permission grant policy. - -## Examples - -### Example 1: Remove a permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -Remove-EntraPermissionGrantPolicy -Id 'my_permission_grant_policy_id' -``` - -This command removes the specified permission grant policy in Microsoft Entra ID. - -- `-Id` parameter specifies the unique identifier of the permission grant policy. - -## Parameters - -### -Id - -The unique identifier of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) - -[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) - -[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md deleted file mode 100644 index b35076fe82..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Remove-EntraPolicy -description: This article provides details on the Remove-EntraPolicy command. - -ms.topic: reference -ms.date: 07/16/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPolicy -schema: 2.0.0 ---- - -# Remove-EntraPolicy - -## Synopsis - -Removes a policy. - -## Syntax - -```powershell -Remove-EntraPolicy - -Id - [] -``` - -## Description - -The `Remove-EntraPolicy` cmdlet removes a policy from Microsoft Entra ID. Specify `Id` parameter to remove a specific policy. - -## Examples - -### Example 1: Remove a policy - -```powershell -Connect-Entra -Scopes 'Policy.Read.ApplicationConfiguration' -Remove-EntraPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -This command removes the specified policy from Microsoft Entra ID. - -- `-Id` - specifies the ID of the policy you want to remove. - -## Parameters - -### -Id - -The Id of the policy you want to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPolicy](Get-EntraPolicy.md) - -[New-EntraPolicy](New-EntraPolicy.md) - -[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md deleted file mode 100644 index dce8b479ed..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Remove-EntraTrustedCertificateAuthority -description: This article provides details on the Remove-EntraTrustedCertificateAuthority command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority - -schema: 2.0.0 ---- - -# Remove-EntraTrustedCertificateAuthority - -## Synopsis - -Removes a trusted certificate authority. - -## Syntax - -```powershell -Remove-EntraTrustedCertificateAuthority - -CertificateAuthorityInformation - [] -``` - -## Description - -The `Remove-EntraTrustedCertificateAuthority` cmdlet removes a trusted certificate authority from Microsoft Entra ID. - -## Examples - -### Example 1: Remove the trusted certificate authorities that are defined in your directory - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object -Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] -``` - -```Output -Id --- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command deletes the trusted certificate authorities that are defined in your directory. - -- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. -It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. - -## Parameters - -### -CertificateAuthorityInformation - -Specifies a CertificateAuthorityInformation object. - -```yaml -Type: CertificateAuthorityInformation -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) - -[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) - -[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md deleted file mode 100644 index f508974760..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md +++ /dev/null @@ -1,241 +0,0 @@ ---- -title: Set-EntraAuthorizationPolicy -description: This article provides details on the Set-EntraAuthorizationPolicy command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy - -schema: 2.0.0 ---- - -# Set-EntraAuthorizationPolicy - -## Synopsis - -Updates an authorization policy. - -## Syntax - -```powershell -Set-EntraAuthorizationPolicy - [-BlockMsolPowerShell ] - [-AllowedToSignUpEmailBasedSubscriptions ] - [-AllowEmailVerifiedUsersToJoinOrganization ] - [-DisplayName ] - [-Description ] - [-DefaultUserRolePermissions ] - [-AllowedToUseSSPR ] - [] -``` - -## Description - -The `Set-EntraAuthorizationPolicy` cmdlet updates a Microsoft Entra ID authorization policy. - -For delegated scenarios, the user needs to have the `Privileged Role Administrator` Microsoft Entra role. - -## Examples - -### Example 1: Update an authorization policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' -$params = @{ - DisplayName = 'Updated displayName' - Description = 'Updated Description' - BlockMsolPowerShell = $true - AllowedToUseSSPR = $false - AllowEmailVerifiedUsersToJoinOrganization = $true - AllowedToSignUpEmailBasedSubscriptions = $true -} - -Set-EntraAuthorizationPolicy @params -``` - -This example demonstrates how to update a Microsoft Entra ID authorization policy. - -### Example 2: Update DefaultUserRolePermissions of authorization policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' -$DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions -$DefaultUserRolePermissions.AllowedToCreateApps = $false -$DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $false -$DefaultUserRolePermissions.AllowedToReadOtherUsers = $false -Set-EntraAuthorizationPolicy -DefaultUserRolePermissions $DefaultUserRolePermissions -``` - -This example demonstrates how to update a DefaultUserRolePermissions of authorization policy in Microsoft Entra ID. - -## Parameters - -### -AllowedToSignUpEmailBasedSubscriptions - -Specifies whether users can sign up for email based subscriptions. -The initial default value is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowedToUseSSPR - -Specifies whether the Self-Serve Password Reset feature can be used by users on the tenant. -The initial default value is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowEmailVerifiedUsersToJoinOrganization - -Specifies whether a user can join the tenant by email validation. -The initial default value is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -BlockMsolPowerShell - -Specifies whether the user-based access to the legacy service endpoint used by Microsoft Online PowerShell is blocked or not. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -allowUserConsentForRiskyApps - -Indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -allowInvitesFrom - -Indicates who can invite external users to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. Everyone is the default setting for all cloud environments except US Government. - -```yaml -Type: allowInvitesFrom -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultUserRolePermissions - -Contains various customizable default user role permissions. - -```yaml -Type: DefaultUserRolePermissions -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies the description of the authorization policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the authorization policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions - -## Outputs - -## Notes - -## Related Links - -[Get-EntraAuthorizationPolicy](Get-EntraAuthorizationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md deleted file mode 100644 index 1c140af2d6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -title: Set-EntraConditionalAccessPolicy -description: This article provides details on the Set-EntraConditionalAccessPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy - -schema: 2.0.0 ---- - -# Set-EntraConditionalAccessPolicy - -## Synopsis - -Updates a conditional access policy in Microsoft Entra ID by Id. - -## Syntax - -```powershell -Set-EntraConditionalAccessPolicy - -PolicyId - [-Conditions ] - [-GrantControls ] - [-DisplayName ] - [-Id ] - [-State ] - [-SessionControls ] - [] -``` - -## Description - -This cmdlet allows an admin to update a conditional access policy in Microsoft Entra ID by Id. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Update a conditional access policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$cond = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet -$control = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls -$session = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls -$params = @{ - PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' - DisplayName = 'MFA policy updated' - State = 'Enabled' - Conditions = $cond - GrantControls = $control - SessionControls = $session -} - -Set-EntraConditionalAccessPolicy @params -``` - -The example shows how to update a conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of conditional access policy. -- `-DisplayName` parameter specifies the display name of a conditional access policy. -- `-State` parameter specifies the enabled or disabled state of the conditional access policy. -- `-Conditions` parameter specifies the conditions for the conditional access policy. -- `-GrantControls` parameter specifies the controls for the conditional access policy. -- `-SessionControls` parameter Enables limited experiences within specific cloud applications. - -### Example 2: Update display name for a conditional access policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$params = @{ - PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' - DisplayName = 'MFA policy updated' -} - -Set-EntraConditionalAccessPolicy @params -``` - -This command updates a conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of conditional access policy. -- `-DisplayName` parameter specifies the display name of a conditional access policy. - -### Example 3: Update the state for a conditional access policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$params = @{ - PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' - State = 'Enabled' -} - -Set-EntraConditionalAccessPolicy @params -``` - -This command updates a conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of conditional access policy. -- `-State` parameter specifies the enabled or disabled state of the conditional access policy. - -## Parameters - -### -PolicyId - -Specifies the policy Id of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State - -Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Conditions - -Specifies the conditions for the conditional access policy in Microsoft Entra ID. - -```yaml -Type: ConditionalAccessConditionSet -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GrantControls - -Specifies the controls for the conditional access policy in Microsoft Entra ID. - -```yaml -Type: ConditionalAccessGrantControls -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the policy Id of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SessionControls - -Enables limited experiences within specific cloud applications. - -```yaml -Type: ConditionalAccessSessionControls -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) - -[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) - -[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md deleted file mode 100644 index 9f60eb62da..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md +++ /dev/null @@ -1,231 +0,0 @@ ---- -title: Set-EntraFeatureRolloutPolicy -description: This article provides details on the Set-EntraFeatureRolloutPolicy command. - - -ms.topic: reference -ms.date: 07/16/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy -schema: 2.0.0 ---- - -# Set-EntraFeatureRolloutPolicy - -## Synopsis - -Allows an admin to modify the policy for cloud authentication roll-out in Microsoft Entra ID. - -## Syntax - -```powershell -Set-EntraFeatureRolloutPolicy - [-Feature ] - [-IsEnabled ] - -Id - [-IsAppliedToOrganization ] - [-AppliesTo ] - [-Description ] - [-DisplayName ] - [] -``` - -## Description - -An admin uses the `Set-EntraFeatureRolloutPolicy` cmdlet to modify the cloud authentication rollout policy. - -This includes specifying whether the method for cloud authentication is Pass-through Authentication or Password Hash Synchronization, and whether Seamless Single Sign-On (SSO) is enabled. - -Users in groups assigned to the policy will start authenticating using the new method and Seamless SSO, if it is specified. - -## Examples - -### Example 1: Updates the policy for cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' - DisplayName = 'Feature-Rollout-Policytest' - IsEnabled = $false -} -Set-EntraFeatureRolloutPolicy @params -``` - -This command updates the policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Id` - specifies the ID of cloud authentication roll-out policy. -- `-DisplayName` - specifies the display name of the cloud authentication roll-out policy. -- `-IsEnabled` - specifies the status of cloud authentication roll-out policy. - -### Example 2: Updates the Description - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Description = 'Feature-Rollout-test' -} -Set-EntraFeatureRolloutPolicy @params -``` - -This command updates the `-Description` of policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Id` Specify the ID of cloud authentication roll-out policy. -- `-Description` Specifies the description of the cloud authentication roll-out policy. - -### Example 3: Updates the IsAppliedToOrganization - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' - IsAppliedToOrganization = $false -} -Set-EntraFeatureRolloutPolicy @params -``` - -This command updates the `-IsAppliedToOrganization` parameter of policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Id` Specify the ID of cloud authentication roll-out policy. -- `-IsAppliedToOrganization` Parameter determines whether a particular feature rollout policy should be applied to the entire organization or not. - -## Parameters - -### -Id - -The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the cloud authentication roll-out policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Feature - -Specifies a feature assigned to the cloud authentication roll-out policy. - -Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. - -```yaml -Type: FeatureEnum -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsEnabled - -Specifies the status of cloud authentication roll-out policy. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies the description of the cloud authentication roll-out policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppliesTo - -Specifies a list of Microsoft Entra ID objects that is assigned to the feature. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsAppliedToOrganization - -Specifies if the cloud authentication roll-out policy applied to the entire organization. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) - -[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) - -[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md deleted file mode 100644 index 557f8d8cee..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: Set-EntraIdentityProvider -description: This article provides details on the Set-EntraIdentityProvider command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraIdentityProvider - -schema: 2.0.0 ---- - -# Set-EntraIdentityProvider - -## Synopsis - -Update the properties of an existing identity provider configured in the directory. - -## Syntax - -```powershell -Set-EntraIdentityProvider - -IdentityProviderBaseId - [-Type ] - [-ClientSecret ] - [-ClientId ] - [-Name ] - [] -``` - -## Description - -The `Set-EntraIdentityProvider` cmdlet is used to update the properties of an existing identity provider. - -The type of the identity provider can't be modified. - -## Examples - -### Example 1: Update client id of an identity provider - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -$params = @{ - IdentityProviderBaseId = 'Google-OAuth' - ClientId = 'NewClientID' -} -Set-EntraIdentityProvider @params -``` - -This example updates the client ID for the specified identity provider. - -- `-Id` parameter specifies the unique identifier of the identity provider. -- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. - -### Example 2: Update client secret of an identity provider - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -$params = @{ - IdentityProviderBaseId = 'Google-OAuth' - ClientSecret = 'NewClientSecret' -} -Set-EntraIdentityProvider @params -``` - -This example updates the client secret for the specified identity provider. - -- `-Id` parameter specifies the unique identifier of the identity provider. -- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. - -### Example 3: Update display name of an identity provider - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -$params = @{ - IdentityProviderBaseId = 'Google-OAuth' - Name = 'NewGoogleName' -} -Set-EntraIdentityProvider @params -``` - -This example updates the display name for the specified identity provider. - -- `-Id` parameter specifies the unique identifier of the identity provider. -- `-Name` parameter specifies the display name of the identity provider. - -## Parameters - -### -ClientId - -The client identifier for the application, obtained during the application's registration with the identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientSecret - -The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentityProviderBaseId -The unique identifier for an identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name - -The display name of the identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. - -For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraIdentityProvider](New-EntraIdentityProvider.md) - -[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md deleted file mode 100644 index 4f55ee4639..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md +++ /dev/null @@ -1,258 +0,0 @@ ---- -title: Set-EntraNamedLocationPolicy -description: This article provides details on the Set-EntraNamedLocationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy - -schema: 2.0.0 ---- - -# Set-EntraNamedLocationPolicy - -## Synopsis - -Updates a named location policy in Microsoft Entra ID by PolicyId. - -## Syntax - -```powershell -Set-EntraNamedLocationPolicy - -PolicyId - [-OdataType ] - [-IpRanges ] - [-IncludeUnknownCountriesAndRegions ] - [-IsTrusted ] - [-DisplayName ] - [-Id ] - [-CountriesAndRegions ] - [] -``` - -## Description - -This cmdlet allows an admin to update a named location policy in Microsoft Entra ID by PolicyId. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Update an IP named location policy in Microsoft Entra ID by PolicyId - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} -$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange -$ipRanges.cidrAddress = '6.5.4.3/32' -$params = @{ - PolicyId = $policy.Id - OdataType = '#microsoft.graph.ipNamedLocation' - IsTrusted = $false - IncludeUnknownCountriesAndRegions = $false - IpRanges = $ipRanges -} -Set-EntraNamedLocationPolicy @params -``` - -This example shows how to update an IP named location policy in Microsoft Entra ID by PolicyId. - -- `-PolicyId` parameter specifies the Id of a named location policy. -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-DisplayName` parameter specifies the display name of a named location policy. -- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. -- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. - -### Example 2: Update a country named location policy in Microsoft Entra ID by PolicyId - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} -$params = @{ - PolicyId = $policy.Id - OdataType = '#microsoft.graph.countryNamedLocation' - IncludeUnknownCountriesAndRegions = $true -} -Set-EntraNamedLocationPolicy @params -``` - -This command updates a country named location policy in Microsoft Entra ID by PolicyId. - -- `-PolicyId` parameter specifies the Id of a named location policy. -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. - -### Example 3: Update display name of a named location policy in Microsoft Entra ID by PolicyId - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} -$params = @{ - PolicyId = $policy.Id - OdataType = '#microsoft.graph.ipNamedLocation' - DisplayName = 'NewName' -} -Set-EntraNamedLocationPolicy @params -``` - -This command updates display name of named location policy in Microsoft Entra ID by PolicyId. - -- `-PolicyId` parameter specifies the Id of a named location policy. -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-DisplayName` parameter specifies the display name of a named location policy. - -## Parameters - -### -PolicyId - -Specifies the ID of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OdataType - -Specifies the OData type of a named location policy object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IpRanges - -List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsTrusted - -Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CountriesAndRegions - -Specifies the countries and regions for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeUnknownCountriesAndRegions - -Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the Id of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) - -[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) - -[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md deleted file mode 100644 index 45e4ecc72a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md +++ /dev/null @@ -1,309 +0,0 @@ ---- -title: Set-EntraPermissionGrantConditionSet -description: This article provides details on the Set-EntraPermissionGrantConditionSet command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet - -schema: 2.0.0 ---- - -# Set-EntraPermissionGrantConditionSet - -## Synopsis - -Update an existing Microsoft Entra ID permission grant condition set. - -## Syntax - -```powershell -Set-EntraPermissionGrantConditionSet - -ConditionSetType - -Id - -PolicyId - [-Permissions ] - [-ClientApplicationTenantIds ] - [-ClientApplicationIds ] - [-ResourceApplication ] - [-PermissionType ] - [-PermissionClassification ] - [-ClientApplicationsFromVerifiedPublisherOnly ] - [-ClientApplicationPublisherIds ] - [] -``` - -## Description - -Updates a Microsoft Entra ID permission grant condition set object identified by Id. - -## Examples - -### Example 1: Update a permission grant condition set to includes permissions that is classified as low - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'includes' - Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' - PermissionClassification = 'low' -} - -Set-EntraPermissionGrantConditionSet @params -``` - -This command updates sets the specified permission grant set to classify as low. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-Id` parameter specifies the unique identifier of a permission grant condition set object. -- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. - -### Example 2: Update a permission grant condition set - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'includes' - Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' - PermissionType = 'delegated' - PermissionClassification = 'low' - ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' - Permissions = @('All') - ClientApplicationIds = @('All') - ClientApplicationTenantIds = @('All') - ClientApplicationPublisherIds = @('All') - ClientApplicationsFromVerifiedPublisherOnly = $true -} - -Set-EntraPermissionGrantConditionSet @params -``` - -This command updates sets the specified permission grant set. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-Id` parameter specifies the unique identifier of a permission grant condition set object. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. -- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. -- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. -- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. -- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. -- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. -- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. -- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. - -## Parameters - -### -PolicyId - -The unique identifier of a Microsoft Entra ID permission grant policy object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ConditionSetType - -The value indicates whether the condition sets are included in the policy or excluded. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a Microsoft Entra ID permission grant condition set object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PermissionType - -Specific type of permissions (application, delegated) to scope consent operation down to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PermissionClassification - -Specific classification (all, low, medium, high) to scope consent operation down to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Permissions - -The identifier of the resource application to scope consent operation down to. -It could be @("All") or a list of permission IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationIds - -The set of client application IDs to scope consent operation down to. -It could be @("All") or a list of client application IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationTenantIds - -The set of client application tenant IDs to scope consent operation down to. -It could be @("All") or a list of client application tenant IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationPublisherIds - -The set of client applications publisher IDs to scope consent operation down to. -It could be @("All") or a list of client application publisher IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationsFromVerifiedPublisherOnly - -A value indicates whether to only includes client applications from verified publishers. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceApplication - -The identifier of the resource application to scope consent operation down to. -It could be "Any" or a specific resource application ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) - -[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) - -[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md deleted file mode 100644 index db649bc8da..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: Set-EntraPermissionGrantPolicy -description: This article provides details on the Set-EntraPermissionGrantPolicy command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy - -schema: 2.0.0 ---- - -# Set-EntraPermissionGrantPolicy - -## Synopsis - -Updates a permission grant policy. - -## Syntax - -```powershell -Set-EntraPermissionGrantPolicy - -Id - [-DisplayName ] - [-Description ] - [] -``` - -## Description - -The `Set-EntraPermissionGrantPolicy` command updates a Microsoft Entra ID permission grant policy. - -## Examples - -### Example 1: Update description of permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} -$params = @{ - Id = $policy.Id - Description = 'Updated description' -} - -Set-EntraPermissionGrantPolicy @params -``` - -This command updates the description of the specified permission grant policy. - -- `-Id` parameter specifies the unique identifier of the permission grant policy. -- `-Description` parameter specifies the description for the permission grant policy. - -### Example 2: Update display name of permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} -$params = @{ - Id = $policy.Id - DisplayName = 'Updated DisplayName' -} - -Set-EntraPermissionGrantPolicy @params -``` - -This command updates the display name of the specified permission grant policy. - -- `-Id` parameter specifies the unique identifier of the permission grant policy. -- `-DisplayName` parameter specifies the display name for the permission grant policy. - -## Parameters - -### -Description - -Specifies the description of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the unique identifier of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) - -[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) - -[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md deleted file mode 100644 index 9f5e238eb2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: Set-EntraPolicy -description: This article provides details on the Set-EntraPolicy command. - -ms.topic: reference -ms.date: 07/22/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: -schema: 2.0.0 ---- - -# Set-EntraPolicy - -## Synopsis - -Updates a policy. - -## Syntax - -```powershell -Set-EntraPolicy - -Id - [-Definition ] - [-DisplayName ] - [-Type ] - [-IsOrganizationDefault ] - [] -``` - -## Description - -The `Set-EntraPolicy` cmdlet sets a policy in Microsoft Entra ID. Specify `Id` parameter to updates specific policy. - -## Examples - -### Example 1: Update a policy display name - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - DisplayName = 'NewUpdated' -} -Set-EntraPolicy @params -``` - -This command updates display name of the specified policy in Microsoft Entra ID. - -- `-Id` specifies the ID of the policy for which you want to set values. - -- `DisplayName` specifies the display name. - -### Example 2: Update a policy definition - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') -} -Set-EntraPolicy @params -``` - -This command updates definition of the specified policy in Microsoft Entra ID. - -- `-Id` specifies the ID of the policy for which you want to set values. - -- `Definition` specifies the array of stringified JSON that contains all the rules of the policy. -In this example, `@('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}')` represents definition of the activityBasedTimeoutPolicy. - -### Example 3: Update a policy organization default - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - IsOrganizationDefault = $false -} -Set-EntraPolicy @params -``` - -This command updates organization default of the specified policy in Microsoft Entra ID. - -- `-Id` specifies the ID of the policy for which you want to set values. - -- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. - -### Example 4: Update policy type - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Type = 'ActivityBasedTimeoutPolicy' -} -Set-EntraPolicy @params -``` - -This example demonstrates how to update the `type` property of a specified policy in Microsoft Entra ID. - -- `-Id` specifies the ID of the policy for which you want to set values. - -- `-Type` specifies the type of policy. In this example, `ActivityBasedTimeoutPolicy` represents the type of policy. - -## Parameters - -### -Definition - -Specifies the array of stringified JSON that contains all the rules of the policy. -For example -Definition @('{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}'). - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsOrganizationDefault - -True if this policy is the organizational default. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies the type of policy. -For token lifetimes, use "TokenLifetimePolicy." - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -The ID of the policy for which you want to set values. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPolicy](Get-EntraPolicy.md) - -[New-EntraPolicy](New-EntraPolicy.md) - -[Remove-EntraPolicy](Remove-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md deleted file mode 100644 index cdfdb92eaf..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Set-EntraTrustedCertificateAuthority -description: This article provides details on the Set-EntraTrustedCertificateAuthority command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority - -schema: 2.0.0 ---- - -# Set-EntraTrustedCertificateAuthority - -## Synopsis - -Updates a trusted certificate authority. - -## Syntax - -```powershell -Set-EntraTrustedCertificateAuthority - -CertificateAuthorityInformation -``` - -## Description - -The `Set-EntraTrustedCertificateAuthority` cmdlet updates a trusted certificate authority in Microsoft Entra ID. - -## Examples - -### Example 1: Updates the trusted certificate authorities that are defined in your directory - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object -$cer[0].CrlDistributionPoint = "https://example.crl" -Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] -``` - -```Output -Id --- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command updates the trusted certificate authorities that are defined in your directory. - -- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. - -## Parameters - -### -CertificateAuthorityInformation - -Specifies a CertificateAuthorityInformation object. - -```yaml -Type: CertificateAuthorityInformation -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) - -[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) - -[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md deleted file mode 100644 index b463aa7035..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md +++ /dev/null @@ -1,426 +0,0 @@ ---- -title: Get-EntraUser -description: This article provides details on the Get-EntraUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUser - -schema: 2.0.0 ---- - -# Get-EntraUser - -## Synopsis - -Gets a user. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraUser - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraUser - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraUser - -UserId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUser` cmdlet gets a user from Microsoft Entra ID. - -## Examples - -### Example 1: Get top three users - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -Top 3 -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -Angel Brown cccccccc-2222-3333-4444-dddddddddddd AngelB@contoso.com AngelB@contoso.com -Avery Smith dddddddd-3333-4444-5555-eeeeeeeeeeee AveryS@contoso.com AveryS@contoso.com -Sawyer Miller eeeeeeee-4444-5555-6666-ffffffffffff SawyerM@contoso.com SawyerM@contoso.com -``` - -This example demonstrates how to get top three users from Microsoft Entra ID. - -### Example 2: Get a user by ID - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -UserId 'SawyerM@contoso.com' -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc sawyerm@tenant.com sawyerm@tenant.com -``` - -This command gets the specified user. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. - -### Example 3: Search among retrieved users - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -SearchString 'New' -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -New User88 bbbbbbbb-1111-2222-3333-cccccccccccc demo99@tenant.com -New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com -``` - -This cmdlet gets all users that match the value of SearchString against the first characters in DisplayName or UserPrincipalName. - -### Example 4: Get a user by userPrincipalName - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -Filter "userPrincipalName eq 'SawyerM@contoso.com'" -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -Sawyer Miller cccccccc-2222-3333-4444-dddddddddddd SawyerM@contoso.com -``` - -This command gets the specified user. - -### Example 5: Get a user by MailNickname - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -Filter "startswith(MailNickname,'Ada')" -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -Mark Adams bbbbbbbb-1111-2222-3333-cccccccccccc Adams@contoso.com Adams@contoso.com -``` - -In this example, we retrieve all users whose MailNickname starts with Ada. - -### Example 6: Get SignInActivity of a User - -```powershell -Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All' -Get-EntraUser -UserId 'SawyerM@contoso.com' -Property 'SignInActivity' | Select-Object -ExpandProperty 'SignInActivity' -``` - -```Output -lastNonInteractiveSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa -lastSignInRequestId : cccccccc-2222-3333-4444-dddddddddddd -lastSuccessfulSignInDateTime : 9/9/2024 1:12:13 PM -lastNonInteractiveSignInDateTime : 9/9/2024 1:12:13 PM -lastSuccessfulSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa -lastSignInDateTime : 9/7/2024 9:15:41 AM -``` - -This example demonstrates how to retrieve the SignInActivity of a specific user by selecting a property. - -### Example 7: List users with disabled accounts - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -Filter "accountEnabled eq false" | Select-Object DisplayName, Id, Mail, UserPrincipalName -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com -``` - -This example demonstrates how to retrieve all users with disabled accounts. - -### Example 8: List users based in a specific country - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$usersInCanada = Get-EntraUser -Filter "Country eq 'Canada'" -$usersInCanada | Select-Object Id, DisplayName, UserPrincipalName, OfficeLocation, Country | Format-Table -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName OfficeLocation Country --- ----------- ----------------- -------------- ------- -cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com 23/2102 Canada -``` - -This example demonstrates how to retrieve all users based in Canada. - -### Example 9: List user count per department - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$departmentCounts = Get-EntraUser -All | Group-Object -Property Department | Select-Object Name, @{Name="MemberCount"; Expression={$_.Count}} -$departmentCounts | Format-Table Name, MemberCount -AutoSize -``` - -```Output -Name MemberCount ----- ----------- - 7 -Engineering 2 -Executive Management 1 -Finance 1 -HR 1 -``` - -This example demonstrates how to retrieve user count in each department. - -### Example 10: List disabled users with active licenses - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$disabledUsersWithLicenses = Get-EntraUser -Filter "accountEnabled eq false" -All | Where-Object { - $_.AssignedLicenses -ne $null -and $_.AssignedLicenses.Count -gt 0 -} -$disabledUsersWithLicenses | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled | Format-Table -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName AccountEnabled --- ----------- ----------------- -------------- -cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com False -``` - -This example demonstrates how to retrieve disabled users with active licenses. - -### Example 11: Retrieve guest users with active licenses - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All -$guestUsersWithLicenses = foreach ($guest in $guestUsers) { - if ($guest.AssignedLicenses.Count -gt 0) { - [pscustomobject]@{ - Id = $guest.Id - DisplayName = $guest.DisplayName - UserPrincipalName = $guest.UserPrincipalName - AssignedLicenses = ($guest.AssignedLicenses | ForEach-Object { $_.SkuId }) -join ", " - } - } -} -$guestUsersWithLicenses | Format-Table Id, DisplayName, UserPrincipalName, AssignedLicenses -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName AssignedLicenses --- ----------- ----------------- ---------------- -cccccccc-2222-3333-4444-dddddddddddd Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com c42b9cae-ea4f-4ab7-9717-81576235ccac -``` - -This example demonstrates how to retrieve guest users with active licenses. - -### Example 12: Retrieve users without managers - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$allUsers = Get-EntraUser -All -$usersWithoutManagers = foreach ($user in $allUsers) { - $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue - if (-not $manager) { - [pscustomobject]@{ - Id = $user.Id - DisplayName = $user.DisplayName - UserPrincipalName = $user.UserPrincipalName - } - } -} -$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName --- ----------- ----------------- -cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com -bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com -``` - -This example demonstrates how to retrieve users without managers. - -### Example 13: List failed sign-ins for a user - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" -$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize -``` - -This example demonstrates how to retrieve failed sign-ins for a user. - -### Example 14: List all guest users - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All -$guestUsers | Select-Object DisplayName, UserPrincipalName, Id, createdDateTime, creationType, accountEnabled, UserState | Format-Table -AutoSize -``` - -```Output -DisplayName UserPrincipalName Id CreatedDateTime CreationType AccountEnabled UserState ------------ ----------------- -- --------------- ------------ -------------- --------- -Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com bbbbbbbb-1111-2222-3333-cccccccccccc 9/13/2024 6:37:33 PM Invitation True Accepted -``` - -This example demonstrates how to retrieve list all guest users. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. -Details on querying with OData can be [found here](https://learn.microsoft.com/graph/aad-advanced-queries?tabs=powershell). - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID (as a User Principal Name (UPN) or UserId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetValue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraUser](New-EntraUser.md) - -[Remove-EntraUser](Remove-EntraUser.md) - -[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md deleted file mode 100644 index 5ad745b39b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: Get-EntraUserAppRoleAssignment -description: This article provides details on the Get-EntraUserAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment - -schema: 2.0.0 ---- - -# Get-EntraUserAppRoleAssignment - -## Synopsis - -Get a user application role assignment. - -## Syntax - -```powershell -Get-EntraUserAppRoleAssignment - -ObjectId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserAppRoleAssignment` cmdlet gets a user application role assignment. - -## Examples - -### Example 1: Get a user application role assignment - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' -$UserId = (Get-EntraUser -Top 1).ObjectId -Get-EntraUserAppRoleAssignment -ObjectId $UserId -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 - 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 - 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 - 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 - -``` - -This example retrieves a user application role assignment for the user in $UserId. You can use the command `Get-EntraUser` to get Service principal Object ID. - -- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). - -### Example 2: Get all application role assignments - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' -Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -All -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 - 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 - 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 - 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 -``` - -This example demonstrates how to retrieve all application role assignment for the specified user. - -- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). - -### Example 3: Get top two application role assignments - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' -Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -Top 2 -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 - 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 -``` - -This example demonstrates how to retrieve top two application role assignment for the specified user. - -- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) - -[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md deleted file mode 100644 index 56eb9c60b5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: Get-EntraUserCreatedObject -description: This article provides details on the Get-EntraUserCreatedObject Command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserCreatedObject - -schema: 2.0.0 ---- - -# Get-EntraUserCreatedObject - -## Synopsis - -Get objects created by the user. - -## Syntax - -```powershell -Get-EntraUserCreatedObject - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserCreatedObject` cmdlet gets objects created by a user in Microsoft Entra ID. - -## Examples - -### Example 1: Get a user-created object - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -``` - -This example retrieves an object created by the specified user. - -- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). - -### Example 2: Get all user-created objects - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -``` - -This example retrieves all objects created by the specified user. - -- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). - -### Example 3: Get a top one user-created object - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -Top 1 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example retrieves top one object created by the specified user. - -- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md deleted file mode 100644 index 0a4ea05e0b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: Get-EntraUserDirectReport -description: This article provides details on the Get-EntraUserDirectReport command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserDirectReport - -schema: 2.0.0 ---- - -# Get-EntraUserDirectReport - -## Synopsis - -Get the user's direct reports. - -## Syntax - -```powershell -Get-EntraUserDirectReport - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserDirectReport` cmdlet gets the direct reports for a user in Microsoft Entra ID. Specify `UserId` parameter gets the direct reports for a user. - -## Examples - -### Example 1: Get a user's direct reports - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example demonstrates how to retrieve direct reports for a user in Microsoft Entra ID. - -- `-UserId` Parameter specifies the ID of a user (UserPrincipalName or UserId). - -### Example 2: Get all direct reports - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example demonstrates how to retrieve all direct reports for a user in Microsoft Entra ID. - -- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). - -### Example 3: Get a top two direct reports - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example demonstrates how to retrieve top five direct reports for a user in Microsoft Entra ID. - -- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user's UserPrincipalName or UserId in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md deleted file mode 100644 index 96b66cd878..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Get-EntraUserExtension -description: This article provides details on the Get-EntraUserExtension command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserExtension - -schema: 2.0.0 ---- - -# Get-EntraUserExtension - -## Synopsis - -Gets a user extension. - -## Syntax - -```powershell -Get-EntraUserExtension - -UserId - [-Property ] - [] -``` - -## Description - -The Get-EntraUserExtension cmdlet gets a user extension in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve extension attributes for a user - -```powershell -Connect-Entra -Scopes 'User.Read' -$UserId = (Get-EntraUser -ObjectId 'SawyerM@contoso.com').ObjectId -Get-EntraUserExtension -UserId $UserId -``` - -```Output -onPremisesDistinguishedName : -@odata.context : https://graph.microsoft.com/v1.0/$metadata#users(identities,onPremisesDistinguishedName,employeeId,createdDateTime)/$entity -createdDateTime : 18/07/2024 05:13:40 -employeeId : -identities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} -userIdentities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} -``` - -This example shows how to retrieve the extension attributes for a specified user. You can use the command `Get-EntraUser` to get user object Id. - -- `-UserId` parameter specifies the user object Id. - -## Parameters - -### -UserId - -Specifies the ID of an object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[Remove-EntraUserExtension](Remove-EntraUserExtension.md) - -[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md deleted file mode 100644 index 6dbad40666..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Get-EntraUserLicenseDetail -description: This article provides details on the Get-EntraUserLicenseDetail command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail - -schema: 2.0.0 ---- - -# Get-EntraUserLicenseDetail - -## Synopsis - -Retrieves license details for a user. - -## Syntax - -```powershell -Get-EntraUserLicenseDetail - -UserId - [-Property ] - [] -``` - -## Description - -This cmdlet retrieves license details for a user. - -## Examples - -### Example 1: Retrieve user license details - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserLicenseDetail -UserId 'SawyerM@contoso.com' -``` - -```Output -Id SkuId SkuPartNumber --- ----- ------------- -X8Wu1RItQkSNL8zKldQ5DiH6ThjDmF1OlavQcFOpbmc aaaaaaaa-0b0b-1c1c-2d2d-333333333333 INFORMATION_PROTECTION_COMPLIANCE -X8Wu1RItQkSNL8zKldQ5Dk8SXrDMx6BFpqqM94yUaWg bbbbbbbb-1c1c-2d2d-3e3e-444444444444 EMSPREMIUM -X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERPRISEPREMIUM -``` - -This example demonstrates how to retrieve license details for a user from Microsoft Entra ID. - -## Parameters - -### -UserId - -The object ID of the user for which the license details are retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md deleted file mode 100644 index a72d6f6ddb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: Get-EntraUserManager -description: This article provides details on the Get-EntraUserManager command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserManager - -schema: 2.0.0 ---- - -# Get-EntraUserManager - -## Synopsis - -Gets the manager of a user. - -## Syntax - -```powershell -Get-EntraUserManager - -UserId - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserManager` cmdlet gets the manager of a user in Microsoft Entra ID. Specify -`UserId` parameter to get the specific manager of user. - -## Examples - -### Example 1: Get the manager of a user - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserManager -UserId 'SawyerM@contoso.com' -``` - -```Output -DeletedDateTime : -Id : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee -@odata.context : https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity -@odata.type : #microsoft.graph.user -accountEnabled : True -businessPhones : {+1 858 555 0109} -city : San Diego -createdDateTime : 2023-07-07T14:18:05Z -country : United States -department : Sales & Marketing -displayName : Sawyer Miller -``` - -This example demonstrates how to retrieve the manager of a specific user. - -- `-UserId` Parameter specifies UserId or User Principal Name of User. - -### Example 2: Retrieve users without managers - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$allUsers = Get-EntraUser -All -$usersWithoutManagers = foreach ($user in $allUsers) { - $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue - if (-not $manager) { - [pscustomobject]@{ - Id = $user.Id - DisplayName = $user.DisplayName - UserPrincipalName = $user.UserPrincipalName - } - } -} -$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName --- ----------- ----------------- -cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com -bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com -``` - -This example demonstrates how to retrieve users without managers. - -## Parameters - -### -UserId - -The unique identifier of a user in Microsoft Entra ID (User Principal Name or UserId). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraUserManager](Remove-EntraUserManager.md) - -[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md deleted file mode 100644 index 0f685737af..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md +++ /dev/null @@ -1,218 +0,0 @@ ---- -title: Get-EntraUserMembership -description: This article provides details on the Get-EntraUserMembership command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserMembership - -schema: 2.0.0 ---- - -# Get-EntraUserMembership - -## Synopsis - -Get user memberships. - -## Syntax - -```powershell -Get-EntraUserMembership - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserMembership` cmdlet gets user memberships in Microsoft Entra ID. - -## Examples - -### Example 1: Get user memberships - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -22cc22cc-dd33-ee44-ff55-66aa66aa66aa -33dd33dd-ee44-ff55-aa66-77bb77bb77bb -44ee44ee-ff55-aa66-bb77-88cc88cc88cc -55ff55ff-aa66-bb77-cc88-99dd99dd99dd -``` - -This example demonstrates how to retrieve user memberships in Microsoft Entra ID. - -### Example 2: Get user memberships with additional details - -```powershell -Connect-Entra -Scopes 'User.Read' -$userMemberships = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' -$membershipDetails = $userMemberships | ForEach-Object { - $membershipDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id - [PSCustomObject]@{ - odataType = $membershipDetail.'@odata.type' - displayName = $membershipDetail.displayName - Id = $membershipDetail.Id - } -} -$membershipDetails | Select-Object odataType, displayName, Id -``` - -```Output -odataType displayName Id ---------- ----------- -- -#microsoft.graph.group Contoso Group 33dd33dd-ee44-ff55-aa66-77bb77bb77bb -#microsoft.graph.group Helpdesk Group 55ff55ff-aa66-bb77-cc88-99dd99dd99dd -#microsoft.graph.directoryRole Attribute Assignment Reader 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -#microsoft.graph.directoryRole Attribute Definition Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff -``` - -This example demonstrates how to retrieve user memberships in Microsoft Entra ID with more lookup details. - -### Example 3: Get All memberships - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -22cc22cc-dd33-ee44-ff55-66aa66aa66aa -33dd33dd-ee44-ff55-aa66-77bb77bb77bb -44ee44ee-ff55-aa66-bb77-88cc88cc88cc -55ff55ff-aa66-bb77-cc88-99dd99dd99dd -``` - -This example demonstrates how to retrieve users all memberships in Microsoft Entra ID. - -### Example 4: Get top three memberships - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -Top 3 -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This example demonstrates how to retrieve users top three memberships in Microsoft Entra ID. - -### Example 5: List groups that Sawyer Miller is a member of - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$groups = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' -$groups | Select-Object DisplayName, Id, GroupTypes, Visibility | Format-Table -AutoSize -``` - -```Output -DisplayName Id GroupTypes Visibility ------------ -- ---------- ---------- -Contoso Group bbbbbbbb-1111-2222-3333-cccccccccccc {Unified} Public -``` - -This example demonstrates how to retrieve the groups that a user is a member of. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a User Principal Name or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md deleted file mode 100644 index b69676b2e5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md +++ /dev/null @@ -1,201 +0,0 @@ ---- -title: Get-EntraUserOAuth2PermissionGrant -description: This article provides details on the Get-EntraUserOAuth2PermissionGrant command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant - -schema: 2.0.0 ---- - -# Get-EntraUserOAuth2PermissionGrant - -## Synopsis - -Gets an oAuth2PermissionGrant object. - -## Syntax - -```powershell -Get-EntraUserOAuth2PermissionGrant - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for the specified user in Microsoft Entra ID. Specify `UserId` parameter to retrieve an oAuth2PermissionGrant object. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation. - -- Application Administrator -- Application Developer -- Cloud Application Administrator -- Directory Writers -- Privileged Role Administrator -- User Administrator -- Directory Readers -- Global Reader -- Guest Inviter - -## Examples - -### Example 1: Retrieve the OAuth2 permission grants for a user - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -``` - -```Output -Id ClientId ConsentType ExpiryTime --- -------- ----------- ---------- -HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... -9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... -``` - -This example retrieves the OAuth2 permission grants for a user using the ObjectId parameter. Use the `Get-EntraUser` cmdlet to obtain the `UserId` value. - -### Example 2: Retrieve the OAuth2 permission grants for a user using object ID parameter - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -``` - -```Output -Id ClientId ConsentType ExpiryTime --- -------- ----------- ---------- -HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... -9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... -``` - -This example retrieves the OAuth2 permission grants for a user using object ID parameter. - -- `-UserId` parameter specifies the user ID. - -### Example 3: Retrieve the OAuth2 permission grants for a user using All parameter - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id ClientId ConsentType ExpiryTime --- -------- ----------- ---------- -HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... -9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... -``` - -This example retrieves the OAuth2 permission grants for a user using All parameter. - -- `-ObjectId` parameter specifies the user ID. - -### Example 4: Retrieve top one OAuth2 permission grant - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraUserOAuth2PermissionGrant -ObjectId 'SawyerM@contoso.com' -Top 1 -``` - -```Output -Id ClientId ConsentType ExpiryTime --- -------- ----------- ---------- -HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... -``` - -This Example Retrieve top one the OAuth2 permission grant in Microsoft Entra ID. - -- `-UserId` parameter specifies the user ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID (as a User Principal Name or ObjectId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md deleted file mode 100644 index b6f4ade3c7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: Get-EntraUserOwnedDevice -description: This article provides details on the Get-EntraUserOwnedDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice - -schema: 2.0.0 ---- - -# Get-EntraUserOwnedDevice - -## Synopsis - -Get registered devices owned by a user. - -## Syntax - -```powershell -Get-EntraUserOwnedDevice - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserOwnedDevice` cmdlet gets registered devices owned by the specified user in Microsoft Entra ID. - -## Examples - -### Example 1: Get devices owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -``` - -```Output -ObjectId DeviceId DisplayName --------- -------- ----------- -bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 -cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 -``` - -This command gets the registered devices owned by the specified user. - -### Example 2: Get all devices owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -All -``` - -```Output -ObjectId DeviceId DisplayName --------- -------- ----------- -bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 -cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 -``` - -This command gets all the registered devices owned by the specified user. - -### Example 3: Get top one device owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -Top 1 -``` - -```Output -ObjectId DeviceId DisplayName --------- -------- ----------- -bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 -``` - -This command gets top one registered device owned by the specified user. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md deleted file mode 100644 index cc4f9de59d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -title: Get-EntraUserOwnedObject -description: This article provides details on the Get-EntraUserOwnedObject command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedObject - -schema: 2.0.0 ---- - -# Get-EntraUserOwnedObject - -## Synopsis - -Get objects owned by a user. - -## Syntax - -```powershell -Get-EntraUserOwnedObject - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserOwnedObject` cmdlet gets objects owned by a user in Microsoft Entra ID. Specify `UserId` parameter to get objects owned by user. - -## Examples - -### Example 1: Get objects owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -hhhhhhhh-5555-6666-7777-iiiiiiiiiiii -``` - -This example retrieves objects owned by the specified user. - -- `-UserId` Parameter specifies the ID of a user as a UserPrincipalName or UserId. - -### Example 2: Get objects owned by a user with additional details - -```powershell -Connect-Entra -Scopes 'User.Read' -$ownedObjects = Get-EntraUserOwnedObject -ObjectId 'SawyerM@contoso.com' - -$objectDetails = $ownedObjects | ForEach-Object { - $objectDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id - [PSCustomObject]@{ - odataType = $objectDetail.'@odata.type' - displayName = $objectDetail.displayName - Id = $objectDetail.Id - } -} -$objectDetails | Format-Table -Property odataType, displayName, Id -AutoSize -``` - -```Output -odataType displayName Id ---------- ----------- -- -#microsoft.graph.group Contoso FTE Group bbbbbbbb-1111-2222-3333-cccccccccccc -#microsoft.graph.group Digital Engineering Group aaaaaaaa-1111-1111-1111-000000000000 -``` - -This example retrieves objects owned by the specified user with more lookup details. - -### Example 3: Get all objects owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -hhhhhhhh-5555-6666-7777-iiiiiiiiiiii -``` - -This example retrieves all the objects owned by the specified user. - -- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. - -### Example 4: Get top three objects owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -Top 3 -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example retrieves the top three objects owned by the specified user. - -- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md deleted file mode 100644 index c58d964a67..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: Get-EntraUserRegisteredDevice -description: This article provides details on the Get-EntraUserRegisteredDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice - -schema: 2.0.0 ---- - -# Get-EntraUserRegisteredDevice - -## Synopsis - -Get devices registered by a user. - -## Syntax - -```powershell -Get-EntraUserRegisteredDevice - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserRegisteredDevice` cmdlet gets devices registered by a user in Microsoft Entra ID. - -## Examples - -### Example 1: Get registered devices - -```Powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -``` - -This command gets the devices that are registered to the specified user. - -### Example 2: Get all registered devices - -```Powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -``` - -This command gets all the devices that are registered to the specified user. - -### Example 3: Get one registered device - -```Powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -Top 1 -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -``` - -This command gets the top one device that are registered to the specified user. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md deleted file mode 100644 index 3514e4f4ac..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Get-EntraUserThumbnailPhoto -description: This article provides details on the Get-EntraUserThumbnailPhoto command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto - -schema: 2.0.0 ---- - -# Get-EntraUserThumbnailPhoto - -## Synopsis - -Retrieve the thumbnail photo of a user. - -## Syntax - -```powershell -Get-EntraUserThumbnailPhoto - -UserId - [-Property ] - [] -``` - -## Description - -Retrieve the thumbnail photo of a user. - -## Examples - -### Example 1: Retrieve thumbnail photo by Id - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserThumbnailPhoto -UserId 'SawyerM@contoso.com' -``` - -```Output -Id Height Width --- ------ ----- -default 292 278 -``` - -This example shows how to retrieve the thumbnail photo of a user that is specified through the value of the UserId parameter. - -- `-UserId` parameter specifies the user for which the thumbnail photo is retrieved. - -## Parameters - -### -UserId - -The object ID of the user for which the thumbnail photo is retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Boolean - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Set-EntraUserThumbnailPhoto](Set-EntraUserThumbnailPhoto.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md deleted file mode 100644 index 62a06bd347..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: New-EntraUser -description: This article provides details on the New-EntraUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUser - -schema: 2.0.0 ---- - -# New-EntraUser - -## Synopsis - -Creates a Microsoft Entra ID user. - -## Syntax - -```powershell -New-EntraUser - -DisplayName - -AccountEnabled - -PasswordProfile - [-City ] - [-UserStateChangedOn ] - [-CompanyName ] - [-PreferredLanguage ] - [-FacsimileTelephoneNumber ] - [-GivenName ] - [-Mobile ] - [-UsageLocation ] - [-PostalCode ] - [-AgeGroup ] - [-CreationType ] - [-ExtensionProperty ] - [-ConsentProvidedForMinor ] - [-MailNickName ] - [-ImmutableId ] - [-Country ] - [-SignInNames ] - [-Department ] - [-PasswordPolicies ] - [-JobTitle ] - [-IsCompromised ] - [-UserState ] - [-UserType ] - [-OtherMails ] - [-PhysicalDeliveryOfficeName ] - [-UserPrincipalName ] - [-State ] - [-StreetAddress ] - [-TelephoneNumber ] - [-Surname ] - [-ShowInAddressList ] - [] -``` - -## Description - -The `New-EntraUser` cmdlet creates a user in Microsoft Entra ID. Specify the `DisplayName`,`AccountEnabled`, and `PasswordProfile` parameter to create a user. - -## Examples - -### Example 1: Create a user using MailNickName parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' -$userParams = @{ - DisplayName = 'Avery Iona' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'AveryI@contoso.com' - AccountEnabled = $true - MailNickName = 'averyi' -} - -New-EntraUser @userParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Avery Iona AveryI@contoso.com Member -``` - -This command creates a new user. - -### Example 2: Create a user using AgeGroup parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' - -$userParams = @{ - DisplayName = 'Peyton Davis' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'PeytonD@contoso.com' - AccountEnabled = $true - MailNickName = 'PeytonD' - AgeGroup = 'adult' -} - -New-EntraUser @userParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -bbbbbbbb-1111-2222-3333-cccccccccccc Peyton Davis PeytonD@contoso.com Member -``` - -This command creates a new user. - -### Example 3: Create a user using City parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' - -$userParams = @{ - DisplayName = 'Blake Martin' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'BlakeM@contoso.com' - AccountEnabled = $true - MailNickName = 'BlakeM' - City = 'New York' -} - -New-EntraUser @userParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -cccccccc-2222-3333-4444-dddddddddddd Blake Martin BlakeM@contoso.com Member -``` - -This command creates a new user. - -### Example 4: Create a user using Department parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' -$userParams = @{ - DisplayName = 'Parker Jones' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'ParkerJ@contoso.com' - AccountEnabled = $true - MailNickName = 'ParkerJ' - Department = 'IT' -} - -New-EntraUser @userParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -dddddddd-3333-4444-5555-eeeeeeeeeeee Parker Jones ParkerJ@contoso.com Member -``` - -This command creates a new user. - -### Example 5: Create a user using Mobile parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' - -$UserParams = @{ - DisplayName = 'Sawyer Miller' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'SawyerM@contoso.com' - AccountEnabled = $true - MailNickName = 'SawyerM' - Mobile = '+18989898989' -} - -New-EntraUser @UserParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com Member -``` - -This command creates a new user. - -## Parameters - -### -AccountEnabled - -Indicates whether the user's account is enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -City - -Specifies the user's city. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Country - -Specifies the user's country. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CreationType - -Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. -Possible values are "LocalAccount" and null. - -- When user creating a local account, the property is required and you must set it to "LocalAccount". -- When user creating a work or school account, don't specify the property or set it to null. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Department - -Specifies the user's department. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the user's display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExtensionProperty - -Add data to custom user properties as the basic **open extensions** or the more versatile **schema extensions**. - -```yaml -Type: System.Collections.Generic.Dictionary`2[System.String,System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GivenName - -Specifies the user's given name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ImmutableId - -This property is used to associate an on-premises user account to their Microsoft Entra ID user object. -This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. - -Important: The $ and _ characters can't be used when specifying this property. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCompromised - -Indicates whether this user is compromised. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JobTitle - -Specifies the user's job title. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailNickName - -Specifies the user's mail nickname. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Mobile - -Specifies the user's mobile phone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OtherMails - -A list of other email addresses for the user; for example: "", "". - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordPolicies - -Specifies password policies for the user. -This value is an enumeration with one possible value being "DisableStrongPassword", which allows weaker passwords than the default policy to be specified. -"DisablePasswordExpiration" can also be specified. -The two might be specified together; for example: "DisablePasswordExpiration, DisableStrongPassword". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordProfile - -Specifies the user's password profile. - -The parameter type for this parameter is "PasswordProfile". - -In order to pass a parameter of this type, you first need to create a variable in PowerShell with that type: - -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile - -Then you can proceed to set the value of the password in this variable: - -$PasswordProfile.Password = "\" - -And finally you can pass this variable to the cmdlet: - -New-EntraUser -PasswordProfile $PasswordProfile ... - -Other attributes that can be set in the PasswordProfile are - -- $PasswordProfile.EnforceChangePasswordPolicy - a boolean indicating that the change password policy is enababled or disabled for this user $PasswordProfile. - -- ForceChangePasswordNextLogin - a boolean indicating that the user must change the password at the next sign in. - -```yaml -Type: PasswordProfile -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PhysicalDeliveryOfficeName - -Specifies the user's physical delivery office name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PostalCode - -Specifies the user's postal code. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PreferredLanguage - -Specifies the user's preferred language. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ShowInAddressList - -If True, show this user in the address list. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignInNames - -Specifies the collection of sign-in names for a local account in a Microsoft Entra ID B2C tenant. - -Each sign-in name must be unique across the company/tenant. - -The property must be specified when you create a local account user; don't specify it when you create a work or school account. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State - -Specifies the user's state. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -StreetAddress - -Specifies the user's street address. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Surname - -Specifies the user's surname. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TelephoneNumber - -Specifies a telephone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UsageLocation - -A two letter country code (ISO standard 3166). - -Required for users that are assigned licenses due to legal requirement to check for availability of services in countries. - -Examples include: "US", "JP", and "GB". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserPrincipalName - -The user principal name (UPN) of the user. - -The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. - -By convention, this UPN should map to the user's email name. - -The general format is "alias@domain". - -For work or school accounts, the domain must be present in the tenant's collection of verified domains. - -This property is required when a work or school account is created; it's optional for local accounts. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserType - -A string value that can be used to classify user types in your directory, such as "Member" and "Guest". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FacsimileTelephoneNumber - -Specifies the user's telephone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AgeGroup - -Specifies the user's age group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CompanyName - -Specifies the user's company name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConsentProvidedForMinor - -Sets whether consent was obtained for minors. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserState - -For an external user invited to the tenant using the invitation API, this property represents the invited user's -invitation status. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserStateChangedOn - -Shows the timestamp for the latest change to the userState property. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[Remove-EntraUser](Remove-EntraUser.md) - -[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md deleted file mode 100644 index 3ede3eecff..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: New-EntraUserAppRoleAssignment -description: This article provides details on the New-EntraUserAppRoleAssignment command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment - -schema: 2.0.0 ---- - -# New-EntraUserAppRoleAssignment - -## Synopsis - -Assigns a user to an application role. - -## Syntax - -```powershell -New-EntraUserAppRoleAssignment - -ObjectId - -PrincipalId - -Id - -ResourceId - [] -``` - -## Description - -The `New-EntraUserAppRoleAssignment` cmdlet assigns a user to an application role in Microsoft Entra ID. - -To grant an app role assignment to a user, you need three identifiers: - -- PrincipalId: The Id of the user to whom you are assigning the app role. - -- ResourceId: The Id of the resource servicePrincipal that has defined the app role. - -- Id: The Id of the appRole (defined on the resource service principal) to assign to the user. - -## Examples - -### Example 1: Assign a user to an application without roles - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$appId = (Get-EntraApplication -SearchString '').AppId -$user = Get-EntraUser -SearchString '' -$servicePrincipal = Get-EntraServicePrincipal -Filter "appId eq '$appId'" - -$params = @{ - ObjectId = $user.ObjectId - PrincipalId = $user.ObjectId - ResourceId = $servicePrincipal.ObjectId - Id = [Guid]::Empty -} - -New-EntraUserAppRoleAssignment @params -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - - A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 18-06-2024 11:22:40 UserPrincipalName aaaaaaaa-bbbb-cccc-1111-222222222222 User App-DisplayName -``` - -This command assigns a user to an application that doesn't have any roles. -You can use the command `Get-EntraUser` to get user object Id. -You can use the command `Get-EntraApplication` to get application Id. -You can use the command `Get-EntraServicePrincipal` to get service principal object Id. - -- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. -- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. -- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. -- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. - -### Example 2: Assign a user to a specific role within an application - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$userName = 'SawyerM@contoso.com' -$appName = 'Box' -$spo = Get-EntraServicePrincipal -Filter "DisplayName eq '$appName'" -$user = Get-EntraUser -Filter "userPrincipalName eq '$userName'" - -$params = @{ - ObjectId = $user.ObjectId - PrincipalId = $user.ObjectId - ResourceId = $spo.ObjectId - Id = $spo.AppRoles[1].Id -} - -New-EntraUserAppRoleAssignment @params -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 06/18/2024 09:47:00 Sawyer Miller 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 User Box -``` - -This example demonstrates how to assign a user to an application role in Microsoft Entra ID. -You can use the command `Get-EntraUser` to get user object Id. -You can use the command `Get-EntraServicePrincipal` to get service principal object Id. - -- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. -- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. -- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. -- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. - -## Parameters - -### -Id - -The ID of the app role to assign. - -If application doesn't have any roles while creating new app role assignment then provide an empty guid, or the Id of the role to assign to the user. - -You can retrieve the application's roles by examining the application object's AppRoles property: - -`Get-EntraApplication -SearchString 'Your-Application-DisplayName' | select Approles | Format-List` - -This cmdlet returns the list of roles that are defined in an application: - -AppRoles: {GUID1, GUID2} - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of the user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID to which the new app role is to be assigned. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PrincipalId - -The object ID of the principal to which the new app role is assigned. - -When assigning a new role to a user, provide the object ID of the user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId - -The object ID of the Service Principal for the application to which the user role is assigned. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) - -[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md deleted file mode 100644 index 77c8786f2f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Remove-EntraUser -description: This article provides details on the Remove-EntraUser command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUser - -schema: 2.0.0 ---- - -# Remove-EntraUser - -## Synopsis - -Removes a user. - -## Syntax - -```powershell -Remove-EntraUser - -UserId - [] -``` - -## Description - -The `Remove-EntraUser` cmdlet removes a user in Microsoft Entra ID. Specify the `UserId` parameter to remove the specified user in Microsoft Entra ID. - -The calling user must be assigned at least one of the following Microsoft Entra roles: - -- User Administrator - -- Privileged Authentication Administrator - -## Examples - -### Example 1: Remove a user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -Remove-EntraUser -UserId 'SawyerM@Contoso.com' -``` - -This command removes the specified user in Microsoft Entra ID. - -## Parameters - -### -UserId - -Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[New-EntraUser](New-EntraUser.md) - -[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md deleted file mode 100644 index 4a7f77cbf2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraUserAppRoleAssignment -description: This article provides details on the Remove-EntraUserAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment - -schema: 2.0.0 ---- - -# Remove-EntraUserAppRoleAssignment - -## Synopsis - -Removes a user application role assignment. - -## Syntax - -```powershell -Remove-EntraUserAppRoleAssignment - -AppRoleAssignmentId - -ObjectId - [] -``` - -## Description - -The `Remove-EntraUserAppRoleAssignment` cmdlet removes a user application role assignment in Microsoft Entra ID. - -## Examples - -### Example 1: Remove user app role assignment - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$RemoveAppRoleParams = @{ - ObjectId = 'SawyerM@Contoso.com' - AppRoleAssignmentId = 'C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w' -} -Remove-EntraUserAppRoleAssignment @RemoveAppRoleParams -``` - -This example demonstrates how to Remove the user app role assignment in Microsoft Entra ID. - -- `-ObjectId` parameter specifies the user ID. -- `-AppRoleAssignmentId` parameter specifies the application role assignment ID. - -Use the `Get-EntraUserAppRoleAssignment` cmdlet to get `AppRoleAssignmentId` details. - -## Parameters - -### -AppRoleAssignmentId - -Specifies the ID of an application role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID (as a UserPrincipleName or ObjectId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) - -[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md deleted file mode 100644 index 7e0aae2e20..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Remove-EntraUserExtension -description: This article provides details on the Remove-EntraUserExtension command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserExtension - -schema: 2.0.0 ---- - -# Remove-EntraUserExtension - -## Synopsis - -Removes a user extension. - -## Syntax - -### SetMultiple - -```powershell -Remove-EntraUserExtension - -ObjectId - -ExtensionNames - [] -``` - -### SetSingle - -```powershell -Remove-EntraUserExtension - -ObjectId - -ExtensionName - [] -``` - -## Description - -The `Remove-EntraUserExtension` cmdlet removes a user extension from Microsoft Entra ID. Specify `ObjectId` and `ExtensionNames` parameters to remove a user extension. - -## Examples - -### Example 1: Remove the user extension - -```powershell -$Params = @{ - ObjectId = 'SawyerM@Contoso.com' - ExtensionName = 'Test Extension' -} -Remove-EntraUserExtension @Params -``` - -This example demonstrates how to remove a user extension from Microsoft Entra ID. - -- `ObjectId` parameter specifies the user Object ID. -- `ExtensionName` parameter specifies the user ExtentionName. - -## Parameters - -### -ExtensionName - -Specifies the name of an extension. - -```yaml -Type: System.String -Parameter Sets: SetSingle -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ExtensionNames - -Specifies an array of extension names. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: SetMultiple -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies an object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUserExtension](Get-EntraUserExtension.md) - -[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md deleted file mode 100644 index 9d2fac8aa1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Remove-EntraUserManager -description: This article provides details on the Remove-EntraUserManager command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserManager - -schema: 2.0.0 ---- - -# Remove-EntraUserManager - -## Synopsis - -Removes a user's manager. - -## Syntax - -```powershell -Remove-EntraUserManager - -UserId -``` - -## Description - -The `Remove-EntraUserManager` cmdlet removes a user's manager in Microsoft Entra ID. Specify the `UserId` parameter to remove the manager for a user in Microsoft Entra ID. - -## Examples - -### Example 1: Remove the manager of a user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$User = Get-EntraUser -UserId 'SawyerM@Contoso.com' -Remove-EntraUserManager -UserId $User.ObjectId -``` - -This example shows how to remove a user's manager. - -You can use `Get-EntraUser` command to get the user's details. - -## Parameters - -### -UserId - -Specifies the ID of a user (as a User Principle Name or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related links - -[Get-EntraUserManager](Get-EntraUserManager.md) - -[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md deleted file mode 100644 index 16500c0669..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md +++ /dev/null @@ -1,677 +0,0 @@ ---- -title: Set-EntraUser -description: This article provides details on the Set-EntraUser command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUser - -schema: 2.0.0 ---- - -# Set-EntraUser - -## Synopsis - -Updates a user. - -## Syntax - -```powershell -Set-EntraUser - -UserId - [-PostalCode ] - [-CompanyName ] - [-GivenName ] - [-Mobile ] - [-PreferredLanguage ] - [-CreationType ] - [-UsageLocation ] - [-UserType ] - [-AgeGroup ] - [-MailNickName ] - [-ExtensionProperty ] - [-ConsentProvidedForMinor ] - [-ImmutableId ] - [-Country ] - [-SignInNames ] - [-Department ] - [-StreetAddress ] - [-PasswordPolicies ] - [-JobTitle ] - [-City ] - [-OtherMails ] - [-UserPrincipalName ] - [-DisplayName ] - [-AccountEnabled ] - [-PasswordProfile ] - [-State ] - [-TelephoneNumber ] - [-Surname ] - [-ShowInAddressList ] - [] -``` - -## Description - -The `Set-EntraUser` cmdlet updates a user in Microsoft Entra ID. Specify the `UserId` parameter to update a user in Microsoft Entra ID. - -## Examples - -### Example 1: Update a user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' -$user = Get-EntraUser -UserId 'SawyerM@contoso.com' -$params = @{ - UserId = $user.Id - DisplayName = 'Updated user Name' -} -Set-EntraUser @params -``` - -This example updates the specified user's Display name parameter. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. - -### Example 2: Set the specified user's AccountEnabled parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' -$params = @{ - UserId = 'SawyerM@contoso.com' - AccountEnabled = $true -} -Set-EntraUser @params -``` - -This example updates the specified user's AccountEnabled parameter. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-AccountEnabled` Specifies whether the account is enabled. - -### Example 3: Set all but specified users as minors with parental consent - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' -Get-EntraUser -All | Where-Object -FilterScript { $_.DisplayName -notmatch '(George|James|Education)' } | -ForEach-Object { Set-EntraUser -UserId $($_.ObjectId) -AgeGroup 'minor' -ConsentProvidedForMinor 'granted' } -``` - -This example updates the specified user's as minors with parental consent. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-ConsentProvidedForMinor` Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. - -### Example 4: Set the specified user's property - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' -$params = @{ - UserId = 'SawyerM@contoso.com' - City = 'Add city name' - CompanyName = 'Microsoft' - Country = 'Add country name' - Department = 'Add department name' - GivenName = 'Mircosoft' - ImmutableId = '#1' - JobTitle = 'Manager' - MailNickName = 'Add mailnickname' - Mobile = '9984534564' - OtherMails = 'test12@M365x99297270.OnMicrosoft.com' - PasswordPolicies = 'DisableStrongPassword' - State = 'UP' - StreetAddress = 'Add address' - UserType = 'Member' -} -Set-EntraUser @params -``` - -This example updates the specified user's property. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-UserType` classify user types in your directory, such as "Member" and "Guest." -- `-PasswordPolicies` Specifies password policies for the user. -- `-OtherMails` Specifies other email addresses for the user - -### Example 5: Set the specified user's PasswordProfile parameter - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$params= @{ -UserId = 'SawyerM@contoso.com' -PasswordProfile = @{ - Password= '*****' - ForceChangePasswordNextLogin = $true - EnforceChangePasswordPolicy = $false - } -} -Set-EntraUser @params -``` - -This example updates the specified user's PasswordProfile parameter. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-PasswordProfile` specifies the user's password profile. - -### Example 6: Set user's usage location for license assignment - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -Set-EntraUser -UserId 'SawyerM@contoso.com' -UsageLocation 'US' -``` - -This example updates the specified user's Usage Location for license management. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-UsageLocation` specifies the user's usage location. Two-letter ISO 3166 country code. Required for licensed users to check service availability. Examples: US, JP, GB. Not nullable. - -## Parameters - -### -AccountEnabled - -Indicates whether the account is enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -City - -Specifies the user's city. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Country - -Specifies the user's country. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CreationType - -Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. -Possible values are "LocalAccount" and null. -When creating a local account, the property is required and you must set it to "LocalAccount". -When creating a work or school account, don't specify the property or set it to null. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Department - -Specifies the user's department. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the user's display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExtensionProperty - -Add data to custom user properties as the basic open extensions or the more versatile schema extensions. - -```yaml -Type: System.Collections.Generic.Dictionary`2[System.String,System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GivenName - -Specifies the user's given name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ImmutableId - -This property links an on-premises Active Directory user account to its Microsoft Entra ID user object. You must specify this property when creating a new user account in Graph if the user's userPrincipalName uses a federated domain. - -Important: Do not use the $ and _ characters when specifying this property. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JobTitle - -Specifies the user's job title. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailNickName - -Specifies a nickname for the user's mail address. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Mobile - -Specifies the user's mobile phone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId -Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OtherMails - -Specifies other email addresses for the user. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordPolicies - -Specifies password policies for the user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordProfile - -Specifies the user's password profile. - -```yaml -Type: PasswordProfile -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PostalCode - -Specifies the user's postal code. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PreferredLanguage - -Specifies the user's preferred language. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ShowInAddressList - -Set to True to show this user in the address list. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignInNames - -The list of sign in names for this user - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State - -Specifies the user's state. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -StreetAddress - -Specifies the user's street address. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Surname - -Specifies the user's surname. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TelephoneNumber - -Specifies the user's telephone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UsageLocation - -A two letter country or region code (ISO standard 3166). Required for users that assigned licenses due to legal requirement to check for availability of services in country and regions. Examples include: "US," "JP," and "GB." Not nullable. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserPrincipalName - -Specifies the user's user principal name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserType - -A string value that can be used to classify user types in your directory, such as "Member" and "Guest." - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AgeGroup - -Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, minor, notAdult, and adult. See, [legal-age-group](https://learn.microsoft.com/graph/api/resources/user#legal-age-group-property-definitions). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CompanyName - -The company name, which the user is associated. This property can be useful for describing the company that an external user comes from. The maximum length of the company name is 64 characters. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConsentProvidedForMinor - -Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related links - -[Get-EntraUser](Get-EntraUser.md) - -[New-EntraUser](New-EntraUser.md) - -[Remove-EntraUser](Remove-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md deleted file mode 100644 index 82ec532e91..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Set-EntraUserExtension -description: This article provides details on the Set-EntraUserExtension command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserExtension - -schema: 2.0.0 ---- - -# Set-EntraUserExtension - -## Synopsis - -Sets a user extension. - -## Syntax - -```powershell -Set-EntraUserExtension - -UserId - [] -``` - -## Description - -The `Set-EntraUserExtension` cmdlet updates a user extension in Microsoft Entra ID. - -## Examples - -### Example 1: Set the value of an extension attribute for a user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$params = @{ - UserId = 'SawyerM@contoso.com' - ExtensionName = 'extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8' - ExtensionValue = 'New Value' -} -Set-EntraUserExtension @params -``` - -This example shows how to update the value of the extension attribute for a specified user. - -- `-UserId` parameter specifies the user Id. -- `-ExtensionName` parameter specifies the name of an extension. -- `-ExtensionValue` parameter specifies the extension name values. - -## Parameters - -### -UserId - -Specifies the ID of the user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[Get-EntraUserExtension](Get-EntraUserExtension.md) - -[Remove-EntraUserExtension](Remove-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md deleted file mode 100644 index ff516e1557..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: Set-EntraUserLicense -description: This article provides details on the Set-EntraUserLicense command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserLicense - -schema: 2.0.0 ---- - -# Set-EntraUserLicense - -## Synopsis - -Adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. - -## Syntax - -```powershell -Set-EntraUserLicense - -UserId - -AssignedLicenses - [] -``` - -## Description - -The `Set-EntraUserLicense` adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. - -- Directory Writers -- License Administrator -- User Administrator - -**Note**: Before assigning a license, assign a usage location to the user using: -`Set-EntraUser -ObjectId user@contoso.com -UsageLocation ''`. - -## Examples - -### Example 1: Add a license to a user based on a template user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$LicensedUser = Get-EntraUser -ObjectId 'TemplateUser@contoso.com' -$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense -$License.SkuId = $LicensedUser.AssignedLicenses.SkuId -$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses -$Licenses.AddLicenses = $License -$Params = @{ - UserId = 'SawyerM@contoso.com' - AssignedLicenses = $Licenses -} -Set-EntraUserLicense @Params -``` - -```Output -Name Value ----- ----- -externalUserStateChangeDateTi… -businessPhones {8976546787} -postalCode 444601 -createdDateTime 06-11-2023 04:48:19 -surname KTETSs -jobTitle Manager -employeeType -otherMails {SawyerM@contoso.com} -isResourceAccount -usageLocation DE -legalAgeGroupClassification Adult -id cccccccc-2222-3333-4444-dddddddddddd -isLicenseReconciliationNeeded False -``` - -This example demonstrates how to assign a license to a user based on a template user. - -- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). -- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. - -### Example 2: Add a license to a user by copying license from another user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$LicensedUser = Get-EntraUser -ObjectId 'AdeleV@contoso.com' -$User = Get-EntraUser -ObjectId 'SawyerM@contoso.com' -$License1 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense -$License1.SkuId = $LicensedUser.AssignedLicenses.SkuId[0] -$License2 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense -$License2.SkuId = $LicensedUser.AssignedLicenses.SkuId[1] -$addLicensesArray = @() -$addLicensesArray += $License1 -$addLicensesArray += $License2 -$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses -$Licenses.AddLicenses = $addLicensesArray -Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses -``` - -```Output -Name Value ----- ----- -externalUserStateChangeDateTi… -businessPhones {8976546787} -postalCode 444601 -createdDateTime 06-11-2023 04:48:19 -surname KTETSs -jobTitle Manager -employeeType -otherMails {SawyerM@contoso.com} -isResourceAccount -usageLocation DE -legalAgeGroupClassification Adult -id cccccccc-2222-3333-4444-dddddddddddd -isLicenseReconciliationNeeded False -``` - -This example demonstrates how to assign a license to a user by copying license from another user. - -- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). -- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. - -### Example 3: Remove an assigned User's License - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$UserPrincipalName = 'SawyerM@contoso.com' -$User = Get-EntraUser -ObjectId $UserPrincipalName -$SkuId = (Get-EntraUserLicenseDetail -ObjectId $UserPrincipalName).SkuId -$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses -$Licenses.RemoveLicenses = $SkuId -Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses -``` - -```Output -Name Value ----- ----- -displayName SawyerM -id cccccccc-2222-3333-4444-dddddddddddd -jobTitle -surname M -mail -userPrincipalName SawyerM@contoso.com -mobilePhone -preferredLanguage -@odata.context https://graph.microsoft.com/v1.0/$metadata#users/$entity -businessPhones {} -officeLocation -givenName Sawyer -``` - -This example demonstrates how to remove a user's license by retrieving the user details. - -- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). -- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. - -## Parameters - -### -AssignedLicenses - -Specifies a list of licenses to assign or remove. - -```yaml -Type: AssignedLicenses -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md deleted file mode 100644 index f73f6beb1c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Set-EntraUserManager -description: This article provides details on the Set-EntraUserManager command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserManager - -schema: 2.0.0 ---- - -# Set-EntraUserManager - -## Synopsis - -Updates a user's manager. - -## Syntax - -```powershell -Set-EntraUserManager - -UserId - -RefObjectId - [] -``` - -## Description - -The `Set-EntraUserManager` cmdlet update the manager for a user in Microsoft Entra ID. Specify the `UserId` and `RefObjectId` parameters to update the manager for a user in Microsoft Entra ID. - -## Examples - -### Example 1: Update a user's manager - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$manager = Get-EntraUser -UserId 'Manager@contoso.com' -$params = @{ - UserId = 'SawyerM@contoso.com' - RefObjectId = $manager.ObjectId -} -Set-EntraUserManager @params -``` - -This example demonstrates how to update the manager for the specified user. - -## Parameters - -### -UserId - -Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related links - -[Get-EntraUserManager](Get-EntraUserManager.md) - -[Remove-EntraUserManager](Remove-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md deleted file mode 100644 index 8c2db963bf..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Set-EntraUserPassword -description: This article provides details on the Set-EntraUserPassword command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserPassword - -schema: 2.0.0 ---- - -# Set-EntraUserPassword - -## Synopsis - -Sets the password of a user. - -## Syntax - -```powershell -Set-EntraUserPassword - [-ForceChangePasswordNextLogin ] - [-EnforceChangePasswordPolicy ] - -UserId - -Password - [] -``` - -## Description - -The `Set-EntraUserPassword` cmdlet sets the password for a user in Microsoft Entra ID. - -Any user can update their password without belonging to any administrator role. - -## Examples - -### Example 1: Set a user's password - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$newPassword = '' -$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force -Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -``` - -This command sets the specified user's password. - -- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. -- `-Password` parameter specifies the password to set. - -### Example 2: Set a user's password with EnforceChangePasswordPolicy parameter - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$newPassword= '' -$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force -Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -EnforceChangePasswordPolicy $True -``` - -This command sets the specified user's password with EnforceChangePasswordPolicy parameter. - -- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. -- `-Password` parameter specifies the password to set. -- `-EnforceChangePasswordPolicy` parameter force the user to change their password, if set to true. - -### Example 3: Set a user's password with ForceChangePasswordNextLogin parameter - -```powershell -connect-Entra -Scopes 'Directory.AccessAsUser.All' -$newPassword= '' -$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force -Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -ForceChangePasswordNextLogin $True -``` - -This command sets the specified user's password with ForceChangePasswordNextLogin parameter. - -- `-ObjectId` parameter specifies the ID of a user in Microsoft Entra ID. -- `-Password` parameter specifies the password to set. -- `-ForceChangePasswordNextLogin` parameter forces a user to change their password during their next log in. - -## Parameters - -### -EnforceChangePasswordPolicy - -If set to true, force the user to change their password. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ForceChangePasswordNextLogin - -Forces a user to change their password during their next sign in. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Password - -Specifies the password. - -```yaml -Type: System.SecureString -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md deleted file mode 100644 index 21eef3e9b1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Set-EntraUserThumbnailPhoto -description: This article provides details on the Set-EntraUserThumbnailPhoto command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto - -schema: 2.0.0 ---- - -# Set-EntraUserThumbnailPhoto - -## Synopsis - -Set the thumbnail photo for a user. - -## Syntax - -### File (Default) - -```powershell -Set-EntraUserThumbnailPhoto - [-UserId ] - -FilePath - [] -``` - -### Stream - -```powershell -Set-EntraUserThumbnailPhoto - -FileStream - [-UserId ] - [] -``` - -### ByteArray - -```powershell -Set-EntraUserThumbnailPhoto - [-UserId ] - -ImageByteArray - [] -``` - -## Description - -The `Set-EntraUserThumbnailPhoto` cmdlet is used to set the thumbnail photo for a user. - -Updating any user's photo in the organization requires the User.ReadWrite.All permission. Updating only the signed-in user's photo requires the User.ReadWrite permission. - -## Examples - -### Example 1: Sets the thumbnail photo - -```powershell -Connect-Entra -Scopes 'User.ReadWrite','User.ReadWrite.All' -$params = @{ - UserId = 'SawyerM@contoso.com' - FilePath = 'D:\UserThumbnailPhoto.jpg' -} -Set-EntraUserThumbnailPhoto @params -``` - -This example sets the thumbnail photo of the user specified with the UserId parameter to the image specified with the FilePath parameter. - -- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. -- `-FilePath` parameter specifies the file path of the image to be uploaded as the user thumbnail photo. - -## Parameters - -### -FilePath - -The file path of the image to be uploaded as the user thumbnail photo. - -```yaml -Type: System.String -Parameter Sets: File -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -The Object ID of the user for which the user thumbnail photo is set. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.IO.Stream System.Byte\[\] - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraUserThumbnailPhoto](Get-EntraUserThumbnailPhoto.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md deleted file mode 100644 index 1959f83ffc..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Update-EntraSignedInUserPassword -description: This article provides details on the Update-EntraSignedInUserPassword command. - -ms.topic: reference -ms.date: 08/20/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword - -schema: 2.0.0 ---- - -# Update-EntraSignedInUserPassword - -## Synopsis - -Updates the password for the signed-in user. - -## Syntax - -```powershell -Update-EntraSignedInUserPassword - -NewPassword - -CurrentPassword - [] -``` - -## Description - -The `Update-EntraSignedInUserPassword` cmdlet updates the password for the signed-in user in Microsoft Entra ID. - -Enable users to update their own passwords. Any user can change their password without requiring administrator privileges. - -## Examples - -### Example 1: Update a password - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$CurrentPassword = ConvertTo-SecureString '' -AsPlainText -Force -$NewPassword = ConvertTo-SecureString '' -AsPlainText -Force -$params = @{ - CurrentPassword = $CurrentPassword - NewPassword = $NewPassword -} -Update-EntraSignedInUserPassword @params -``` - -This example shows how to update the password for the signed-in user. - -- `-CurrentPassword` parameter specifies the current password of the signed-in user. -- `-NewPassword` parameter specifies the new password for the signed-in user. - -## Parameters - -### -CurrentPassword - -Specifies the current password of the signed-in user. - -```yaml -Type: SecureString -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NewPassword - -Specifies the new password for the signed-in user. - -```yaml -Type: SecureString -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For more information, see [changePassword](https://learn.microsoft.com/graph/api/user-changepassword). - -## Related links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md deleted file mode 100644 index f300d9f135..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Update-EntraUserFromFederated -description: This article provides details on the Update-EntraUserFromFederated command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraUserFromFederated - -schema: 2.0.0 ---- - -# Update-EntraUserFromFederated - -## Synopsis - -Updates a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. - -## Syntax - -```powershell -Update-EntraUserFromFederated - -UserPrincipalName - [-NewPassword ] - [] -``` - -## Description - -The `Update-EntraUserFromFederated` cmdlet is used to update a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. A new password must be provided for the user. - -This process writes the new password to Microsoft Entra ID and, if configured with password writeback, pushes it to on-premises Active Directory. The admin can provide a new password or let the system generate one. The user will be prompted to change their password at their next sign-in. - -For delegated scenarios, the administrator needs at least the Authentication Administrator or Privileged Authentication Administrator Microsoft Entra role. - -Admins with User Administrator, Helpdesk Administrator, or Password Administrator roles can also reset passwords for non-admin users and a limited set of admin roles. - -## Examples - -### Example 1: Update a user in a domain - -```powershell -Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All' -Update-EntraUserFromFederated -UserPrincipalName 'pattifuller@contoso.com' -``` - -This command updates a user in a domain. - -- `-UserPrincipalName` parameter specifies the Microsoft Entra ID UserID for the user to convert. - -## Parameters - -### -UserPrincipalName - -The Microsoft Entra ID UserID for the user to convert. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NewPassword - -The new password of the user. - -For tenants using hybrid password scenarios, specifying a new password is required. If you omit the password for a cloud-only account, the system generates one automatically. This generated password is a Unicode string without additional encoding. Before acceptance, the password is validated against the tenant's banned password list and must meet the tenant's cloud and/or on-premises password requirements. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For more information, see [resetPassword](https://learn.microsoft.com/graph/api/authenticationmethod-resetpassword). - -## Related Links diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index c76f75f4d3..dfcb440dc2 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -393,7 +393,7 @@ foreach (`$subModule in `$subModules) { $requiredModules = @() if (Test-Path $dependencyMappingPath) { $jsonContent = Get-Content -Path $dependencyMappingPath -Raw | ConvertFrom-Json - Write-Host "Dependency Mapping: $jsonContent" -ForegroundColor Green + Log-Message "Dependency Mapping: $jsonContent" # Convert JSON to Hashtable $dependencyMapping = @{} foreach ($key in $jsonContent.PSObject.Properties.Name) { @@ -404,7 +404,9 @@ foreach (`$subModule in `$subModules) { if ($dependencyMapping.ContainsKey($keyModuleName)) { foreach ($dependency in $dependencyMapping[$keyModuleName]) { + Log-Message "$content.requiredModulesVersion" -Level 'WARNING' $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } + Log-Message $requiredModules.Count } } } @@ -437,11 +439,17 @@ foreach (`$subModule in `$subModules) { # Create and update the module manifest Log-Message "[EntraModuleBuilder] Creating manifest for $moduleName at $manifestPath" - New-ModuleManifest @moduleSettings + try{ + New-ModuleManifest @moduleSettings Update-ModuleManifest -Path $manifestPath -PrivateData $PSData # Log completion for this module Log-Message "[EntraModuleBuilder] Manifest for $moduleName created successfully" -Level 'SUCCESS' + + }catch{ + Log-Message $_.Exception.Message -Level 'ERROR' + } + } #Create the Root Module Manifest @@ -474,13 +482,12 @@ foreach (`$subModule in `$subModules) { } # Get all subdirectories within the base docs path - $subDirectories = Get-ChildItem -Path $docsPath -Directory - Write-Host "SubDirs: $subDirectories" -ForegroundColor Blue + $subDirectories = Get-ChildItem -Path $docsPath foreach ($subDirectory in $subDirectories) { # Get all markdown files in the current subdirectory $markdownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" - if ($markdownFiles.Count -eq 0) { + if ($null -ne $markDownFiles -and $markdownFiles.Count -eq 0) { Log-Message "No markdown files found in $($subDirectory.FullName)." -Level 'ERROR' continue } From 66f01f22c29c82b6a76326a06d490ae95627a87c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 00:21:49 +0300 Subject: [PATCH 065/124] resplit docs --- build/Split-Docs.ps1 | 1 + .../Applications/Add-EntraApplicationOwner.md | 102 +++ ...ncipalDelegatedPermissionClassification.md | 163 ++++ .../Add-EntraServicePrincipalOwner.md | 109 +++ .../Applications/Get-EntraApplication.md | 276 ++++++ .../Get-EntraApplicationExtensionProperty.md | 106 +++ .../Get-EntraApplicationKeyCredential.md | 89 ++ .../Applications/Get-EntraApplicationLogo.md | 136 +++ .../Applications/Get-EntraApplicationOwner.md | 212 +++++ .../Get-EntraApplicationPasswordCredential.md | 104 +++ .../Get-EntraApplicationServiceEndpoint.md | 167 ++++ .../Get-EntraApplicationTemplate.md | 173 ++++ .../Get-EntraDeletedApplication.md | 257 ++++++ .../Applications/Get-EntraServicePrincipal.md | 369 ++++++++ ...-EntraServicePrincipalAppRoleAssignedTo.md | 188 ++++ ...-EntraServicePrincipalAppRoleAssignment.md | 192 +++++ .../Get-EntraServicePrincipalCreatedObject.md | 155 ++++ ...ncipalDelegatedPermissionClassification.md | 204 +++++ .../Get-EntraServicePrincipalKeyCredential.md | 91 ++ .../Get-EntraServicePrincipalMembership.md | 178 ++++ ...raServicePrincipalOAuth2PermissionGrant.md | 169 ++++ .../Get-EntraServicePrincipalOwnedObject.md | 195 +++++ .../Get-EntraServicePrincipalOwner.md | 217 +++++ ...EntraServicePrincipalPasswordCredential.md | 93 ++ .../Applications/New-EntraApplication.md | 490 +++++++++++ .../New-EntraApplicationExtensionProperty.md | 215 +++++ ...EntraApplicationFromApplicationTemplate.md | 111 +++ .../Applications/New-EntraApplicationKey.md | 155 ++++ .../New-EntraApplicationKeyCredential.md | 258 ++++++ .../New-EntraApplicationPassword.md | 121 +++ .../New-EntraApplicationPasswordCredential.md | 215 +++++ .../Applications/New-EntraServicePrincipal.md | 406 +++++++++ ...-EntraServicePrincipalAppRoleAssignment.md | 230 +++++ .../New-EntraServicePrincipalKeyCredential.md | 182 ++++ ...EntraServicePrincipalPasswordCredential.md | 168 ++++ .../Applications/Remove-EntraApplication.md | 84 ++ ...emove-EntraApplicationExtensionProperty.md | 106 +++ .../Remove-EntraApplicationKey.md | 133 +++ .../Remove-EntraApplicationKeyCredential.md | 108 +++ .../Remove-EntraApplicationOwner.md | 106 +++ .../Remove-EntraApplicationPassword.md | 106 +++ ...move-EntraApplicationPasswordCredential.md | 104 +++ ...emove-EntraApplicationVerifiedPublisher.md | 83 ++ .../Remove-EntraDeletedApplication.md | 92 ++ .../Remove-EntraDeletedDirectoryObject.md | 96 +++ .../Remove-EntraServicePrincipal.md | 86 ++ ...-EntraServicePrincipalAppRoleAssignment.md | 117 +++ ...ncipalDelegatedPermissionClassification.md | 105 +++ ...move-EntraServicePrincipalKeyCredential.md | 104 +++ .../Remove-EntraServicePrincipalOwner.md | 107 +++ ...EntraServicePrincipalPasswordCredential.md | 104 +++ .../Restore-EntraDeletedApplication.md | 127 +++ ...EntraGroupIdsServicePrincipalIsMemberOf.md | 110 +++ .../Applications/Set-EntraApplication.md | 496 +++++++++++ .../Applications/Set-EntraApplicationLogo.md | 126 +++ .../Set-EntraApplicationVerifiedPublisher.md | 111 +++ .../Applications/Set-EntraServicePrincipal.md | 440 ++++++++++ .../Authentication/Add-EntraEnvironment.md | 119 +++ .../Authentication/Connect-Entra.md | 583 +++++++++++++ .../Authentication/Disconnect-Entra.md | 78 ++ .../Authentication/Find-EntraPermission.md | 239 +++++ .../Authentication/Get-EntraContext.md | 130 +++ .../Authentication/Get-EntraEnvironment.md | 108 +++ ...et-EntraStrongAuthenticationMethodByUpn.md | 79 ++ ...Revoke-EntraSignedInUserAllRefreshToken.md | 73 ++ .../Revoke-EntraUserAllRefreshToken.md | 90 ++ .../Add-EntraAdministrativeUnitMember.md | 111 +++ ...SecurityAttributeDefinitionAllowedValue.md | 139 +++ .../Add-EntraDeviceRegisteredOwner.md | 107 +++ .../Add-EntraDeviceRegisteredUser.md | 112 +++ .../Add-EntraDirectoryRoleMember.md | 104 +++ .../Add-EntraScopedRoleMembership.md | 135 +++ .../Confirm-EntraDomain.md | 112 +++ .../Enable-EntraDirectoryRole.md | 96 +++ .../Get-CrossCloudVerificationCode.md | 72 ++ .../Get-EntraAccountSku.md | 117 +++ .../Get-EntraAdministrativeUnit.md | 237 +++++ .../Get-EntraAdministrativeUnitMember.md | 193 +++++ .../Get-EntraAttributeSet.md | 143 +++ .../DirectoryManagement/Get-EntraContact.md | 236 +++++ .../Get-EntraContactDirectReport.md | 159 ++++ .../Get-EntraContactManager.md | 98 +++ .../Get-EntraContactMembership.md | 175 ++++ .../Get-EntraContactThumbnailPhoto.md | 150 ++++ .../DirectoryManagement/Get-EntraContract.md | 195 +++++ ...-EntraCustomSecurityAttributeDefinition.md | 142 +++ ...SecurityAttributeDefinitionAllowedValue.md | 187 ++++ .../Get-EntraDeletedDirectoryObject.md | 122 +++ .../DirectoryManagement/Get-EntraDevice.md | 271 ++++++ .../Get-EntraDeviceRegisteredOwner.md | 196 +++++ .../Get-EntraDeviceRegisteredUser.md | 180 ++++ .../Get-EntraDirSyncConfiguration.md | 106 +++ .../Get-EntraDirSyncFeature.md | 153 ++++ ...ectoryObjectOnPremisesProvisioningError.md | 104 +++ .../Get-EntraDirectoryRole.md | 181 ++++ .../Get-EntraDirectoryRoleMember.md | 106 +++ .../Get-EntraDirectoryRoleTemplate.md | 101 +++ .../DirectoryManagement/Get-EntraDomain.md | 147 ++++ .../Get-EntraDomainFederationSettings.md | 129 +++ .../Get-EntraDomainNameReference.md | 113 +++ ...t-EntraDomainServiceConfigurationRecord.md | 112 +++ .../Get-EntraDomainVerificationDnsRecord.md | 112 +++ .../Get-EntraExtensionProperty.md | 97 +++ .../Get-EntraFederationProperty.md | 90 ++ .../Get-EntraObjectByObjectId.md | 142 +++ .../Get-EntraPartnerInformation.md | 135 +++ .../Get-EntraPasswordPolicy.md | 101 +++ .../Get-EntraScopedRoleMembership.md | 145 ++++ .../Get-EntraSubscribedSku.md | 227 +++++ .../Get-EntraTenantDetail.md | 167 ++++ .../New-EntraAdministrativeUnit.md | 133 +++ .../New-EntraAttributeSet.md | 136 +++ ...-EntraCustomSecurityAttributeDefinition.md | 234 +++++ .../DirectoryManagement/New-EntraDevice.md | 339 ++++++++ .../DirectoryManagement/New-EntraDomain.md | 158 ++++ .../Remove-EntraAdministrativeUnit.md | 87 ++ .../Remove-EntraAdministrativeUnitMember.md | 108 +++ .../Remove-EntraContact.md | 79 ++ .../DirectoryManagement/Remove-EntraDevice.md | 85 ++ .../Remove-EntraDeviceRegisteredOwner.md | 101 +++ .../Remove-EntraDeviceRegisteredUser.md | 99 +++ .../Remove-EntraDirectoryRoleMember.md | 106 +++ .../DirectoryManagement/Remove-EntraDomain.md | 91 ++ .../Remove-EntraExternalDomainFederation.md | 79 ++ .../Remove-EntraScopedRoleMembership.md | 106 +++ .../Restore-EntraDeletedDirectoryObject.md | 154 ++++ .../Set-EntraAdministrativeUnit.md | 145 ++++ .../Set-EntraAttributeSet.md | 147 ++++ ...-EntraCustomSecurityAttributeDefinition.md | 149 ++++ ...SecurityAttributeDefinitionAllowedValue.md | 126 +++ .../DirectoryManagement/Set-EntraDevice.md | 387 +++++++++ .../Set-EntraDirSyncConfiguration.md | 144 ++++ .../Set-EntraDirSyncEnabled.md | 140 +++ .../Set-EntraDirSyncFeature.md | 187 ++++ .../DirectoryManagement/Set-EntraDomain.md | 135 +++ .../Set-EntraDomainFederationSettings.md | 290 +++++++ .../Set-EntraPartnerInformation.md | 242 ++++++ .../Set-EntraTenantDetail.md | 216 +++++ .../Get-EntraDirectoryRoleAssignment.md | 282 ++++++ .../Get-EntraDirectoryRoleDefinition.md | 273 ++++++ .../New-EntraDirectoryRoleAssignment.md | 136 +++ .../New-EntraDirectoryRoleDefinition.md | 330 +++++++ .../Remove-EntraDirectoryRoleAssignment.md | 88 ++ .../Remove-EntraDirectoryRoleDefinition.md | 93 ++ .../Set-EntraDirectoryRoleDefinition.md | 267 ++++++ .../Groups/Add-EntraGroupMember.md | 102 +++ .../Groups/Add-EntraGroupOwner.md | 108 +++ .../Groups/Add-EntraLifecyclePolicyGroup.md | 111 +++ .../Groups/Get-EntraDeletedGroup.md | 293 +++++++ .../Groups/Get-EntraGroup.md | 309 +++++++ .../Groups/Get-EntraGroupAppRoleAssignment.md | 181 ++++ .../Groups/Get-EntraGroupLifecyclePolicy.md | 134 +++ .../Groups/Get-EntraGroupMember.md | 214 +++++ .../Groups/Get-EntraGroupOwner.md | 189 ++++ .../Groups/Get-EntraGroupPermissionGrant.md | 106 +++ .../Groups/Get-EntraLifecyclePolicyGroup.md | 105 +++ .../Groups/Get-EntraObjectSetting.md | 252 ++++++ .../Groups/New-EntraGroup.md | 346 ++++++++ .../Groups/New-EntraGroupAppRoleAssignment.md | 151 ++++ .../Groups/New-EntraGroupLifecyclePolicy.md | 138 +++ .../Groups/Remove-EntraGroup.md | 93 ++ .../Remove-EntraGroupAppRoleAssignment.md | 99 +++ .../Remove-EntraGroupLifecyclePolicy.md | 87 ++ .../Groups/Remove-EntraGroupMember.md | 102 +++ .../Groups/Remove-EntraGroupOwner.md | 101 +++ .../Remove-EntraLifecyclePolicyGroup.md | 117 +++ .../Groups/Reset-EntraLifeCycleGroup.md | 84 ++ .../Select-EntraGroupIdsContactIsMemberOf.md | 99 +++ .../Select-EntraGroupIdsGroupIsMemberOf.md | 101 +++ .../Select-EntraGroupIdsUserIsMemberOf.md | 110 +++ .../Groups/Set-EntraGroup.md | 313 +++++++ .../Groups/Set-EntraGroupLifecyclePolicy.md | 160 ++++ .../Invitations/New-EntraInvitation.md | 291 +++++++ .../Migration/Enable-EntraAzureADAlias.md | 57 ++ .../Migration/Test-EntraScript.md | 120 +++ .../Reports/Get-EntraAuditDirectoryLog.md | 179 ++++ .../Reports/Get-EntraAuditSignInLog.md | 213 +++++ .../SignIns/Get-EntraAuthorizationPolicy.md | 156 ++++ .../Get-EntraConditionalAccessPolicy.md | 135 +++ .../SignIns/Get-EntraFeatureRolloutPolicy.md | 212 +++++ .../SignIns/Get-EntraIdentityProvider.md | 140 +++ .../SignIns/Get-EntraNamedLocationPolicy.md | 138 +++ .../SignIns/Get-EntraOAuth2PermissionGrant.md | 190 ++++ .../Get-EntraPermissionGrantConditionSet.md | 214 +++++ .../SignIns/Get-EntraPermissionGrantPolicy.md | 134 +++ .../SignIns/Get-EntraPolicy.md | 196 +++++ .../Get-EntraTrustedCertificateAuthority.md | 186 ++++ .../New-EntraConditionalAccessPolicy.md | 278 ++++++ .../SignIns/New-EntraFeatureRolloutPolicy.md | 224 +++++ .../SignIns/New-EntraIdentityProvider.md | 170 ++++ .../SignIns/New-EntraNamedLocationPolicy.md | 236 +++++ .../SignIns/New-EntraOauth2PermissionGrant.md | 188 ++++ .../New-EntraPermissionGrantConditionSet.md | 372 ++++++++ .../SignIns/New-EntraPermissionGrantPolicy.md | 133 +++ .../SignIns/New-EntraPolicy.md | 254 ++++++ .../New-EntraTrustedCertificateAuthority.md | 98 +++ .../Remove-EntraConditionalAccessPolicy.md | 87 ++ .../Remove-EntraFeatureRolloutPolicy.md | 87 ++ ...ntraFeatureRolloutPolicyDirectoryObject.md | 105 +++ .../SignIns/Remove-EntraIdentityProvider.md | 88 ++ .../Remove-EntraNamedLocationPolicy.md | 88 ++ .../Remove-EntraOAuth2PermissionGrant.md | 84 ++ ...Remove-EntraPermissionGrantConditionSet.md | 129 +++ .../Remove-EntraPermissionGrantPolicy.md | 85 ++ .../SignIns/Remove-EntraPolicy.md | 83 ++ ...Remove-EntraTrustedCertificateAuthority.md | 92 ++ .../SignIns/Set-EntraAuthorizationPolicy.md | 241 ++++++ .../Set-EntraConditionalAccessPolicy.md | 240 ++++++ .../SignIns/Set-EntraFeatureRolloutPolicy.md | 231 +++++ .../SignIns/Set-EntraIdentityProvider.md | 195 +++++ .../SignIns/Set-EntraNamedLocationPolicy.md | 258 ++++++ .../Set-EntraPermissionGrantConditionSet.md | 309 +++++++ .../SignIns/Set-EntraPermissionGrantPolicy.md | 143 +++ .../SignIns/Set-EntraPolicy.md | 211 +++++ .../Set-EntraTrustedCertificateAuthority.md | 92 ++ .../Users/Get-EntraUser.md | 426 +++++++++ .../Users/Get-EntraUserAppRoleAssignment.md | 184 ++++ .../Users/Get-EntraUserCreatedObject.md | 175 ++++ .../Users/Get-EntraUserDirectReport.md | 175 ++++ .../Users/Get-EntraUserExtension.md | 111 +++ .../Users/Get-EntraUserLicenseDetail.md | 105 +++ .../Users/Get-EntraUserManager.md | 142 +++ .../Users/Get-EntraUserMembership.md | 218 +++++ .../Get-EntraUserOAuth2PermissionGrant.md | 201 +++++ .../Users/Get-EntraUserOwnedDevice.md | 166 ++++ .../Users/Get-EntraUserOwnedObject.md | 208 +++++ .../Users/Get-EntraUserRegisteredDevice.md | 165 ++++ .../Users/Get-EntraUserThumbnailPhoto.md | 109 +++ .../Users/New-EntraUser.md | 816 ++++++++++++++++++ .../Users/New-EntraUserAppRoleAssignment.md | 209 +++++ .../Users/Remove-EntraUser.md | 88 ++ .../Remove-EntraUserAppRoleAssignment.md | 106 +++ .../Users/Remove-EntraUserExtension.md | 130 +++ .../Users/Remove-EntraUserManager.md | 82 ++ .../Users/Set-EntraUser.md | 677 +++++++++++++++ .../Users/Set-EntraUserExtension.md | 91 ++ .../Users/Set-EntraUserLicense.md | 209 +++++ .../Users/Set-EntraUserManager.md | 101 +++ .../Users/Set-EntraUserPassword.md | 164 ++++ .../Users/Set-EntraUserThumbnailPhoto.md | 130 +++ .../Users/Update-EntraSignedInUserPassword.md | 106 +++ .../Users/Update-EntraUserFromFederated.md | 105 +++ 242 files changed, 40142 insertions(+) create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md create mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 2fe3266ac1..2ad44b1484 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -75,3 +75,4 @@ function Split-Docs { Log-Message -Message "Markdown file copying complete." -Level 'INFO' } +Split-Docs -Source 'Entra' \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md new file mode 100644 index 0000000000..c9bfb8a7fa --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md @@ -0,0 +1,102 @@ +--- +title: Add-EntraApplicationOwner +description: This article provides details on the Add-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Add-EntraApplicationOwner + +## Synopsis + +Adds an owner to an application. + +## Syntax + +```powershell +Add-EntraApplicationOwner + -ApplicationId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraApplicationOwner` cmdlet adds an owner to a Microsoft Entra ID application. + +## Examples + +### Example 1: Add a user as an owner to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$ApplicationId = (Get-EntraApplication -Top 1).ObjectId +$UserObjectId = (Get-EntraUser -UserId 'SawyerM@contoso.com').ObjectId +Add-EntraApplicationOwner -ApplicationId $ApplicationId -RefObjectId $UserObjectId +``` + +This example demonstrates how to add an owner to an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the ID of an application. +- `-RefObjectId` parameter specifies the ID of a user. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) + +[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..9cb637423c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,163 @@ +--- +title: Add-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Add-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Add-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Add a classification for a delegated permission. + +## Syntax + +```powershell +Add-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -PermissionId + -Classification + -PermissionName + [] +``` + +## Description + +The `Add-EntraServicePrincipalDelegatedPermissionClassification` cmdlet creates a delegated permission classification for the given permission on service principal. + +## Examples + +### Example 1: Create Delegated Permission Classification + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$PermissionId = $ServicePrincipal.PublishedPermissionScopes[0].Id +$PermissionName = $ServicePrincipal.PublishedPermissionScopes[0].Value + +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + PermissionId = $PermissionId + Classification = 'Low' + PermissionName = $PermissionName +} + +Add-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +T2qU_E28O0GgkLLIYRPsTwE low fc946a4f-bc4d-413b-a090-b2c86113ec4f LicenseManager.AccessAsUser +``` + +This command creates a delegated permission classification for the given permission on the service principal. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. +- `-PermissionId` parameter specifies the ID for a delegated permission. +- `-Classification` parameter specifies the classification for a delegated permission. +- `-PermissionName` parameter specifies the name for a delegated permission. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionId + +The ID for a delegated permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionName + +The name for a delegated permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Classification + +The classification for a delegated permission. +This parameter can take one of the following values: + +- Low: Specifies a classification for a permission as low impact. + +- Medium: Specifies a classification for a permission as medium impact. + +- High: Specifies a classification for a permission as high impact. + +```yaml +Type: ClassificationEnum +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DelegatedPermissionClassification + +## Notes + +## Related Links + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..e526f2d41a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md @@ -0,0 +1,109 @@ +--- +title: Add-EntraServicePrincipalOwner +description: This article provides details on the Add-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Add-EntraServicePrincipalOwner + +## Synopsis + +Adds an owner to a service principal. + +## Syntax + +```powershell +Add-EntraServicePrincipalOwner + -ServicePrincipalId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraServicePrincipalOwner` cmdlet adds an owner to a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Add a user as an owner to a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId +$OwnerId = (Get-EntraUser -Top 1).ObjectId +$Params = @{ + ServicePrincipalId = $ServicePrincipalId + RefObjectId = $OwnerId +} +Add-EntraServicePrincipalOwner @Params +``` + +This example demonstrates how to add an owner to a service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. +- `-RefObjectId` parameter specifies the user object ID. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md new file mode 100644 index 0000000000..d8cdda2c35 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md @@ -0,0 +1,276 @@ +--- +title: Get-EntraApplication +description: This article provides details on the Get-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplication + +schema: 2.0.0 +--- + +# Get-EntraApplication + +## Synopsis + +Gets an application. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraApplication + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraApplication + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraApplication + -ApplicationId + [-Property ] + [-All] + [] +``` + +## Description + +The `Get-EntraApplication` cmdlet gets a Microsoft Entra ID application. + +## Examples + +### Example 1: Get an application by ApplicationId + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -ApplicationId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +ToGraph_443democc3c aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This example demonstrates how to retrieve specific application by providing ID. + +### Example 2: Get all applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -All +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +test app aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADandPersonalMicrosoftAccount contoso.com +ToGraph_443DEM cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +test adms eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADandPersonalMicrosoftAccount contoso.com +test adms app azure gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADandPersonalMicrosoftAccount contoso.com +test adms2 iiiiiiii-aaaa-bbbb-cccc-jjjjjjjjjjjj jjjjjjjj-bbbb-cccc-dddd-kkkkkkkkkkkk AzureADandPersonalMicrosoftAccount contoso.com +``` + +This example demonstrates how to get all applications from Microsoft Entra ID. + +### Example 3: Get applications with expiring secrets + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication | + Where-Object { + $_.PasswordCredentials.keyId -ne $null -and + $_.PasswordCredentials.EndDateTime -lt (Get-Date).AddDays(30) + } | + ForEach-Object { + $_.DisplayName, + $_.Id, + $_.PasswordCredentials + } +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + AppOne 8/19/2024 9:00:00 PM 1jQ aaaaaaaa-0b0b-1c1c-2d2d-333333333333 8/6/2024 6:07:47 PM +``` + +This example retrieves applications with expiring secrets within 30 days. + +### Example 4: Get an application by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -Filter "DisplayName eq 'ToGraph_443DEMO'" +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +ToGraph_443DEMO cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +``` + +In this example, we retrieve application by its display name from Microsoft Entra ID. + +### Example 5: Search among retrieved applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -SearchString 'My new application 2' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application 2 kkkkkkkk-cccc-dddd-eeee-llllllllllll llllllll-dddd-eeee-ffff-mmmmmmmmmmmm AzureADandPersonalMicrosoftAccount contoso.com +``` + +This example demonstrates how to retrieve applications for specific string from Microsoft Entra ID. + +### Example 6: Retrieve an application by identifierUris + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -Filter "identifierUris/any(uri:uri eq 'https://wingtips.wingtiptoysonline.com')" +``` + +This example demonstrates how to retrieve applications by its identifierUris from Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplication](New-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..bce69cd889 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraApplicationExtensionProperty +description: This article provides details on the Get-EntraApplicationExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# Get-EntraApplicationExtensionProperty + +## Synopsis + +Gets application extension properties. + +## Syntax + +```powershell +Get-EntraApplicationExtensionProperty + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationExtensionProperty` cmdlet gets application extension properties in Microsoft Entra ID. + +## Examples + +### Example 1: Get extension properties + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationExtensionProperty -ApplicationId $Application.Id +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ------------- ---------------------- ---- ------------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Boolean False False extension_c371a443f6734a3e8982a26357fb7d59_NewAttribute {User} +``` + +This command gets the extension properties for the specified application in Microsoft Entra ID. You cane use the command `Get-EntraApplication` to get application ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +## Parameters + +### -ApplicationId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) + +[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..b0b5a7e66b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md @@ -0,0 +1,89 @@ +--- +title: Get-EntraApplicationKeyCredential +description: This article provides details on the Get-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# Get-EntraApplicationKeyCredential + +## Synopsis + +Gets the key credentials for an application. + +## Syntax + +```powershell +Get-EntraApplicationKeyCredential + -ObjectId + [] +``` + +## Description + +The `Get-EntraApplicationKeyCredential` cmdlet retrieves the key credentials for an application. Specify `ObjectId` parameter to retrieve the key credentials for an application. + +## Examples + +### Example 1: Get key credentials + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationKeyCredential -ObjectId $application.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage +------------------- ----------- ----------- --- ----- ------------- ---- ----- +{116, 101, 115, 116…} MyApp Cert 6/27/2024 11:49:17 AM bbbbbbbb-1c1c-2d2d-3e3e-444444444444 6/27/2023 11:29:17 AM AsymmetricX509Cert Verify +``` + +This command gets the key credentials for the specified application. + +`-ObjectId` parameter specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -ObjectId + +Specifies a unique ID of an application in Microsoft Entra ID to retrieve key credentials. Use `Get-EntraApplication` for more details. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) + +[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md new file mode 100644 index 0000000000..166508d887 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md @@ -0,0 +1,136 @@ +--- +title: Get-EntraApplicationLogo +description: This article provides details on the Get-EntraApplicationLogo command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationLogo + +schema: 2.0.0 +--- + +# Get-EntraApplicationLogo + +## Synopsis + +Retrieve the logo of an application. + +## Syntax + +```powershell +Get-EntraApplicationLogo + -ApplicationId + [-FileName ] + [-View ] + [-FilePath ] + [] +``` + +## Description + +The `Get-EntraApplicationLogo` cmdlet retrieves the logo that is set for an application. Specify the `ApplicationId` parameter to get a specific application logo for an application. + +## Examples + +### Example 1: Get an application logo for an application by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationLogo -ApplicationId 'bbbbbbbb-1111-1111-1111-cccccccccccc' -FilePath 'D:\outfile1.jpg' +``` + +This example shows how to retrieve the application logo for an application that is specified through the Object ID parameter. + +## Parameters + +### -FileName + +If provided, the application logo is saved to the file using the specified file name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FilePath + +If provided, the application logo is copied with a random filename to the file path that is specified in this parameter. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +The ApplicationId of the application for which the logo is to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -View + +If set to $true, the application's logo is displayed in a new window on the screen. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +### System.Boolean + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraApplicationLogo](Set-EntraApplicationLogo.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md new file mode 100644 index 0000000000..80b78d9283 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md @@ -0,0 +1,212 @@ +--- +title: Get-EntraApplicationOwner +description: This article provides details on the Get-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Get-EntraApplicationOwner + +## Synopsis + +Gets the owner of an application. + +## Syntax + +```powershell +Get-EntraApplicationOwner + -ApplicationId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationOwner` cmdlet get an owner of an Microsoft Entra ID application. + +## Examples + +### Example 1: Get the owner of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to get the owners of an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +### Example 2: Get the details about the owner of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -SearchString '' +$applicationOwners = Get-EntraApplicationOwner -ObjectId $application.ObjectId +$ownerDetails = $applicationOwners | ForEach-Object { + $ownerDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + displayName = $ownerDetail.displayName + Id = $ownerDetail.Id + UserPrincipalName = $ownerDetail.UserPrincipalName + UserType = $ownerDetail.UserType + accountEnabled = $ownerDetail.accountEnabled + } +} +$ownerDetails | Format-Table -Property displayName, Id, UserPrincipalName, UserType, accountEnabled -AutoSize +``` + +```Output +displayName Id UserPrincipalName UserType accountEnabled +----------- -- ----------------- -------- -------------- +Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc SawyerM@contoso.com Member True +Adele Vance ec5813fb-346e-4a33-a014-b55ffee3662b AdeleV@contoso.com Member True +``` + +This example demonstrates how to get the owners of an application in Microsoft Entra ID with more owner lookup details. + +### Example 3: Get all owners of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to get the all owners of a specified application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +### Example 4: Get top two owners of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to get the two owners of a specified application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) + +[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..f82b444191 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Get-EntraApplicationPasswordCredential +description: This article provides details on the Get-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# Get-EntraApplicationPasswordCredential + +## Synopsis + +Gets the password credential for an application. + +## Syntax + +```powershell +Get-EntraApplicationPasswordCredential + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationPasswordCredential` cmdlet receives the password credentials for a Microsoft Entra ID application. Specify `ApplicationId` parameter to cmdlet receives the password credentials. + +## Examples + +### Example 1: Get password credential for specified application + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationPasswordCredential -ApplicationId $application.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +{100, 101, 109, 111} demo 26/07/2025 10:34:40 Ap6 bbbbbbbb-1111-2222-3333-cccccccccccc 26/07/2024 10:34:40 +``` + +This example shows how to retrieve the password credential for specified application. + +- `-ApplicationId` specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -ApplicationId + +The ApplicationId of the application for which to get the password credential. Use `Get-EntraApplication` for more details. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md new file mode 100644 index 0000000000..69df671ca9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md @@ -0,0 +1,167 @@ +--- +title: Get-EntraApplicationServiceEndpoint +description: This article provides details on the Get-EntraApplicationServiceEndpoint command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint + +schema: 2.0.0 +--- + +# Get-EntraApplicationServiceEndpoint + +## Synopsis + +Retrieve the service endpoint of an application. + +## Syntax + +```powershell +Get-EntraApplicationServiceEndpoint + -ApplicationId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationServiceEndpoint` cmdlet retrieves the service endpoint(s) of an application. + +The service endpoint entity contains service discovery information. The serviceEndpoints property of the Application entity is of type ServiceEndpoint. + +Other services can use the information stored in the ServiceEndpoint entity to find this service and its addressable endpoints. + +## Examples + +### Example 1: Retrieve the application service endpoint by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId +``` + +This example demonstrates how to retrieve service endpoint of the application that is specified through the Object ID parameter. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +### Example 2: Get all service endpoints + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -All +``` + +This example demonstrates how to retrieve all service endpoints of a specified application. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +### Example 3: Get top five service endpoints + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -Top 5 +``` + +This example demonstrates how to retrieve five service endpoints of a specified application. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -All + +Return all service endpoints. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the object ID of the application for which the service endpoint is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of results that are returned. +The default is 100. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md new file mode 100644 index 0000000000..3ef510d43f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md @@ -0,0 +1,173 @@ +--- +title: Get-EntraApplicationTemplate +description: This article provides details on the Get-EntraApplicationTemplate command. + + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationTemplate +schema: 2.0.0 +--- + +# Get-EntraApplicationTemplate + +## Synopsis + +Retrieve a list of applicationTemplate objects. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraApplicationTemplate + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraApplicationTemplate + -Id + [] +``` + +## Description + +The `Get-EntraApplicationTemplate` cmdlet allows users to get a list of all the application templates or a specific application template. + +## Examples + +### Example 1. Gets a list of application template objects + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationTemplate +``` + +This command gets all the application template objects + +### Example 2. Gets an application template object + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationTemplate -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id Categories Description +-- ---------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {businessMgmt, productivity, projectManagement} Cube is perfect for businesses +``` + +This command gets an application template object for the given id. + +- `-Id` Specifies the unique identifier of an application template. + +## Parameters + +### -Id + +The unique identifier of an application template. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.ApplicationTemplate + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md new file mode 100644 index 0000000000..74cdce0fb3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md @@ -0,0 +1,257 @@ +--- +title: Get-EntraDeletedApplication +description: This article provides details on the Get-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Get-EntraDeletedApplication + +## Synopsis + +Retrieves the list of previously deleted applications. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDeletedApplication + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDeletedApplication + [-SearchString ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeletedApplication` cmdlet Retrieves the list of previously deleted applications. + +Note: Deleted security groups are permanently removed and cannot be retrieved. + +## Examples + +### Example 1: Get list of deleted applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com +TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com +``` + +This cmdlet retrieves the list of deleted applications. + +### Example 2: Get list of deleted applications using All parameter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -All +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com +TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com +``` + +This cmdlet retrieves the list of deleted applications using All parameter. + +### Example 3: Get top two deleted applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -Top 2 +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +``` + +This cmdlet retrieves top two deleted applications. + +### Example 4: Get deleted applications using SearchString parameter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -SearchString 'TestApp1' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This cmdlet retrieves deleted applications using SearchString parameter. + +### Example 5: Get deleted applications filter by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -Filter "DisplayName eq 'TestApp1'" +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This cmdlet retrieves deleted applications having specified display name. + +### Example 6: Get deleted applications with deletion age in days + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication | + Select-Object DisplayName, Id, AppId, SignInAudience, PublisherDomain, DeletedDateTime, + @{Name='DeletionAgeInDays'; Expression={(Get-Date) - $_.DeletedDateTime | Select-Object -ExpandProperty Days}} | + Format-Table -AutoSize +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain DeletedDateTime DeletionAgeInDays +----------- -- ----- -------------- --------------- --------------- ----------------- +Entra PowerShell App aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com 9/18/2024 7:41:44 AM 1 +``` + +This cmdlet retrieves deleted applications with deletion age in days. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Retrieve only those deleted applications that satisfy the filter. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Retrieve only those applications that satisfy the -SearchString value. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of applications returned by this cmdlet. +The default value is 100. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md new file mode 100644 index 0000000000..3f6ed52f43 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md @@ -0,0 +1,369 @@ +--- +title: Get-EntraServicePrincipal +description: This article provides details on the Get-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipal + +## Synopsis + +Gets a service principal. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraServicePrincipal + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraServicePrincipal + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraServicePrincipal + -ServicePrincipalId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipal` cmdlet gets a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve all service principal from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal +``` + +```Output +ObjectId AppId DisplayName +-------- ----- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 Demo App +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22223333-cccc-4444-dddd-5555eeee6666 Demo Two App +dddddddd-3333-4444-5555-eeeeeeeeeeee 33334444-dddd-5555-eeee-6666ffff7777 ProjectWorkManagement +``` + +This example retrieves all service principals from the directory. + +### Example 2: Retrieve a service principal by ServicePrincipalId + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -ServicePrincipalId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This command retrieves specific service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 3: Retrieve all service principals from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -All +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +ProvisioningPowerBi cccccccc-2222-3333-4444-dddddddddddd 22223333-cccc-4444-dddd-5555eeee6666 Application +``` + +This example retrieves all service principals from the directory. + +### Example 4: Retrieve top two service principal from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Top 2 +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +``` + +This command retrieves top two service principals from the directory. + +### Example 5: Get a service principal by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "DisplayName eq 'M365 License Manager'" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This example gets a service principal by its display name. + +### Example 6: Retrieve a list of all service principal, which has a display name that contains "M365 License Manager" + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -SearchString 'M365 License Manager' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This example gets a list of service principal, which has the specified display name. + +### Example 7: Retrieve all Enterprise apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryIntegratedApp')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Enterprise App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +Enterprise App2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application +``` + +This example demonstrates how to retrieve all enterprise apps. + +### Example 8: Retrieve all App proxy apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryOnPremApp')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +App proxy 1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +App proxy 2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application +``` + +This example demonstrates how to retrieve all app proxy apps. + +### Example 9: Retrieve all disabled apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "accountEnabled eq false" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Disabled App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all disabled apps. + +### Example 10: Retrieve all Global Secure Access apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'PrivateAccessNonWebApplication') or tags/Any(x: x eq 'NetworkAccessManagedApplication')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Global secure access app 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all Global secure access apps. + +### Example 11: List all applications without user assignment + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -All | Where-Object {$_.appRoleAssignmentRequired -ne 'true'} +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +App without user assignment 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all applications without user assignment. + +### Example 12: List all SAML application details + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "PreferredSingleSignOnMode eq 'saml'" +$servicePrincipal | Select-Object Id, DisplayName, AccountEnabled, AppId, PreferredSingleSignOnMode, AppRoleAssignmentRequired, SignInAudience, NotificationEmailAddresses, PreferredTokenSigningKeyEndDateTime, PreferredTokenSigningKeyValid, ReplyUrls,LoginUrl, LogoutUrl | Format-Table -AutoSize +``` + +```Output +Id DisplayName AccountEnabled AppId PreferredSingleSignOnMode AppRoleAssignmentRequired SignInAudience NotificationEmailAddresses +-- ----------- -------------- ----- ------------------------- ------------------------- -------------- -------------- +00001111-aaaa-2222-bbbb-3333cccc4444 SAML App True 33334444-dddd-5555-eeee-6666ffff7777 saml True AzureADMyOrg {admin@Contoso} +``` + +This example demonstrates how to retrieve all SAML application details. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md new file mode 100644 index 0000000000..891274acdb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md @@ -0,0 +1,188 @@ +--- +title: Get-EntraServicePrincipalAppRoleAssignedTo +description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignedTo command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalAppRoleAssignedTo + +## Synopsis + +Gets app role assignments for this app or service, granted to users, groups and other service principals. + +## Syntax + +```powershell +Get-EntraServicePrincipalAppRoleAssignedTo + -ServicePrincipalId + [-All ] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalAppRoleAssignedTo` cmdlet gets app role assignments for this app or service, granted to users, groups and other service principals. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Retrieve the app role assignments + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipalId +``` + +This example shows how to get app role assignments for an app or service, granted to users, groups and other service principals. + +- The first command gets the ID of a service principal and stores it in the $ServicePrincipalId variable. + +- The second command gets the app role assignments for the service principal granted to users, groups and other service principals. + +### Example 2: Get all app role assignments + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -All +``` + +```output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets the all app role assignments for the service principal granted to users, groups and other service principals. + +### Example 3: Get five app role assignments + +```powershell + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -Top 5 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets the five app role assignments for the service principal granted to users, groups and other service principals. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +`Get-EntraServiceAppRoleAssignedTo` is an alias for `Get-EntraServicePrincipalAppRoleAssignedTo`. + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..971849856a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,192 @@ +--- +title: Get-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Gets a service principal application role assignment. + +## Syntax + +```powershell +Get-EntraServicePrincipalAppRoleAssignment + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalAppRoleAssignment` cmdlet gets a role assignment for a service principal application in Microsoft Entra ID. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Retrieve the application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipalId +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 29-02-2024 05:53:00 Ask HR aaaaaaaa-bbbb-cccc-1111-222222222222 Group M365 License Manager +``` + +This command gets application role assignments for specified service principal. + +- The first command gets the ID of a service principal by using the Get-EntraServicePrincipal (./Get-EntraServicePrincipal.md) cmdlet. The command stores the ID in the $ServicePrincipalId variable. + +- The second command gets the application role assignments for the service principal in identified by $ServicePrincipalId. + +### Example 2: Retrieve all application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets all application role assignments for specified service principal. + +### Example 3: Retrieve the top five application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 3 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets three application role assignments for specified service principal. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraServiceAppRoleAssignment` is an alias for `Get-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) + +[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md new file mode 100644 index 0000000000..8a607194b9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md @@ -0,0 +1,155 @@ +--- +title: Get-EntraServicePrincipalCreatedObject +description: This article provides details on the Get-EntraServicePrincipalCreatedObject command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalCreatedObject + +## Synopsis + +Get objects created by a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalCreatedObject + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalCreatedObject` cmdlet gets an object created by a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the objects that created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +This example gets objects created by the service principal identified by $ServicePrincipalId. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Retrieve the all objects created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +This example demonstrates how to get the all object created by a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Retrieve the top two objects created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +This example demonstrates how to get the top two object created by a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..a236c7769c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,204 @@ +--- +title: Get-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Get-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Retrieve the delegated permission classification objects on a service principal. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalDelegatedPermissionClassification` cmdlet retrieves the delegated permission classifications from a service principal. + +## Examples + +### Example 1: Get a list of delegated permission classifications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +cccccccc-8888-9999-0000-dddddddddddd low dddd3333-ee44-5555-66ff-777777aaaaaa profile +``` + +This command retrieves all delegated permission classifications from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. + +### Example 2: Get a delegated permission classifications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + Id = '5XBeIKarUkypdm0tRsSAQwE' +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +``` + +This command retrieves the delegated permission classification by Id from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. +- `-Id` parameter specifies the delegated permission classification object Id. + +### Example 3: Get a delegated permission classification with filter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + Filter = "PermissionName eq 'Sites.Read.All'" +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +``` + +This command retrieves the filtered delegated permission classifications from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. +- `-Id` parameter specifies the delegated permission classification object Id. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a delegated permission classification object ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DelegatedPermissionClassification + +## Notes + +## Related Links + +[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..3dcf28a491 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,91 @@ +--- +title: Get-EntraServicePrincipalKeyCredential +description: This article provides details on the Get-EntraServicePrincipalKeyCredential Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalKeyCredential + +## Synopsis + +Get key credentials for a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalKeyCredential + -ServicePrincipalId + [] +``` + +## Description + +The `Get-EntraServicePrincipalKeyCredential` cmdlet gets the key credentials for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the key credential of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage +------------------- ----------- ----------- --- ----- ------------- ---- ----- + 08-02-2025 09:57:08 68b45e27-fef8-4f0d-bc7a-76bd949c16d1 08-02-2024 09:57:08 Symmetric Sign +``` + +This example retrieves the key credentials for specified service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal object Id. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of the application for which to get the password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) + +[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md new file mode 100644 index 0000000000..4fcb1f99c2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md @@ -0,0 +1,178 @@ +--- +title: Get-EntraServicePrincipalMembership +description: This article provides details on the Get-EntraServicePrincipalMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalMembership + +## Synopsis + +Get a service principal membership. + +## Syntax + +```powershell +Get-EntraServicePrincipalMembership + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalMembership` cmdlet gets the memberships of a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +``` + +This cmdlet retrieves a specified service principal memberships in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Retrieve all memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +22223333-cccc-4444-dddd-5555eeee6666 +33334444-dddd-5555-eeee-6666ffff7777 +``` + +This command gets all memberships of a specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Retrieve top two memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +22223333-cccc-4444-dddd-5555eeee6666 + +``` + +This command gets top two memberships of a specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md new file mode 100644 index 0000000000..aaa8e79db5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md @@ -0,0 +1,169 @@ +--- +title: Get-EntraServicePrincipalOAuth2PermissionGrant +description: This article provides details on the Get-EntraServicePrincipalOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOAuth2PermissionGrant + +## Synopsis + +Gets an oAuth2PermissionGrant object. + +## Syntax + +```powershell +Get-EntraServicePrincipalOAuth2PermissionGrant +-ServicePrincipalId +[-All] +[-Top ] +[-Property ] +[] +``` + +## Description + +The `Get-EntraServicePrincipalOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId $ServicePrincipalId +``` + +```output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +``` + +This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +### Example 2: Get all OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals A1bC2dE3f... openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 996d39aa-fdac-4d97-aa3d-c81fb47362ac aaaaaaaa-bbbb-cccc-1111-222222222222 PrivilegedAccess... +``` + +This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +### Example 3: Get two OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 2 +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +``` + +This example demonstrates how to get top two oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md new file mode 100644 index 0000000000..890f1d9a67 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md @@ -0,0 +1,195 @@ +--- +title: Get-EntraServicePrincipalOwnedObject +description: This article provides details on the Get-EntraServicePrincipalOwnedObject Command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOwnedObject + +## Synopsis + +Gets an object owned by a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalOwnedObject + [-All] + -ServicePrincipalId + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalOwnedObject` cmdlet retrieves an object owned by a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +The command retrieves the owned objects of a service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 2: Retrieve the all owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipalId = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").ObjectId +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipalId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves an object owned by a service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal Id. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 2: Retrieve all owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +The command receives the all owned objects of a service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 3: Retrieve top one owned object of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves the top one owned object of a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..2270323cb2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md @@ -0,0 +1,217 @@ +--- +title: Get-EntraServicePrincipalOwner +description: This article provides details on the Get-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOwner + +## Synopsis + +Get the owner of a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalOwner + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalOwner` cmdlet gets the owners of a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the owner of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example gets the owners of a specified service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 2: Retrieve all the owners of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command gets all the owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 3: Retrieve top two owners of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This command gets top two owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 4: Retrieve service principal owner details + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +# Get the owners of the service principal +$owners = Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All +$result = @() + +# Loop through each owner and get their UserPrincipalName and DisplayName +foreach ($owner in $owners) { + $userId = $owner.Id + $user = Get-EntraUser -UserId $userId + $userDetails = [PSCustomObject]@{ + Id = $owner.Id + UserPrincipalName = $user.UserPrincipalName + DisplayName = $user.DisplayName + } + $result += $userDetails +} + +# Output the result in a table format +$result | Format-Table -AutoSize +``` + +```Output +Id UserPrincipalName DisplayName +-- ----------------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AlexW@contoso.com Alex Wilber +bbbbbbbb-1111-2222-3333-cccccccccccc AdeleV@contoso.com Adele Vance +``` + +This example shows how to retrieve more details of a service principal owner such as displayName, userPrincipalName. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..32f7613b31 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,93 @@ +--- +title: Get-EntraServicePrincipalPasswordCredential +description: This article provides details on the Get-EntraServicePrincipalPasswordCredential Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalPasswordCredential + +## Synopsis + +Get credentials for a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + [] +``` + +## Description + +The `Get-EntraServicePrincipalPasswordCredential` cmdlet gets the password credentials for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the password credential of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 17-04-2025 07:32:41 gjW bdf6a3df-cc9b-4612-b948-e32804ee88f7 17-04-2024 07:32:41 + 21-03-2025 08:12:08 4fl 7f4414ec-8f72-49a8-b949-70d635899656 21-03-2024 08:12:08 + 12-12-2024 08:39:07 mjl 0fff6b21-0a20-4f7c-93ba-26ed9b648344 12-12-2023 08:39:10 +``` + +This example retrieves the password credentials for specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the object ID of a service principal. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of the service principal for which to get password credentials. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) + +[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md new file mode 100644 index 0000000000..f8b75c0061 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md @@ -0,0 +1,490 @@ +--- +title: New-EntraApplication +description: This article provides details on the New-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplication + +schema: 2.0.0 +--- + +# New-EntraApplication + +## Synopsis + +Creates (registers) a new application object. + +## Syntax + +```powershell +New-EntraApplication + -DisplayName + [-AddIns ] + [-PasswordCredentials ] + [-TokenEncryptionKeyId ] + [-SignInAudience ] + [-KeyCredentials ] + [-ParentalControlSettings ] + [-IdentifierUris ] + [-AppRoles ] + [-PublicClient ] + [-InformationalUrl ] + [-Tags ] + [-Api ] + [-OptionalClaims ] + [-GroupMembershipClaims ] + [-Web ] + [-IsFallbackPublicClient ] + [-IsDeviceOnlyAuthSupported ] + [-RequiredResourceAccess ] + [] +``` + +## Description + +Creates (registers) a new application object. Specify the `DisplayName` parameter to create a new application. + +## Examples + +### Example 1: Create an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +New-EntraApplication -DisplayName 'My new application' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 2: Create an application using IdentifierUris parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +New-EntraApplication -DisplayName 'My new application' -IdentifierUris 'https://mynewapp.contoso.com' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 3: Create an application using AddIns parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$addin = New-Object Microsoft.Open.MSGraph.Model.AddIn +$addin.Type = 'testtype' +$addinproperties = New-Object System.collections.Generic.List[Microsoft.Open.MSGraph.Model.KeyValue] +$addinproperties.Add([Microsoft.Open.MSGraph.Model.KeyValue]@{ Key = "key"; Value = "value" }) +$addin.Properties = $addinproperties +New-EntraApplication -DisplayName 'My new application' -AddIns $addin +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +## Parameters + +### -AddIns + +Defines custom behavior that a consuming service can use to call an app in specific contexts. + +For example, applications that can render file streams may set the addIns property for its "FileHandler" functionality. + +This will let services like Office 365 call the application in the context of a document the user is working on. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Api + +Specifies settings for an application that implements a web API. + +```yaml +Type: ApiApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoles + +The collection of application roles that an application might declare. +These roles can be assigned to users, groups, or service principals. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupMembershipClaims + +Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentifierUris + +User-defined URI(s) that uniquely identify a Web application within its Microsoft Entra ID tenant, or within a verified custom domain (see "Domains" tab in the Azure classic portal) if the application is multi-tenant. + +The first element is populated from the Web application's "APP ID URI" field if updated via the Azure classic portal (or respective Microsoft Entra ID PowerShell cmdlet parameter). + +Extra URIs can be added via the application manifest; see Understanding the Microsoft Entra ID Application Manifest for details. + +This collection is also used to populate the Web application's servicePrincipalNames collection. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InformationalUrl + +Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. + +The terms of service and privacy statement are surfaced to users through the user consent experience. + +```yaml +Type: InformationalUrl +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsDeviceOnlyAuthSupported + +Specifies if the application supports authentication using a device token. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsFallbackPublicClient + +Specifies the fallback application type as public client, such as an installed application running on a mobile device. + +The default value is false that means the fallback application type is confidential client such as web app. + +There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). + +In those cases Microsoft Entra ID interprets the application type based on the value of this property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +The collection of key credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OptionalClaims + +Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. + +```yaml +Type: OptionalClaims +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentalControlSettings + +Specifies parental control settings for an application. + +```yaml +Type: ParentalControlSettings +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +The collection of password credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicClient + +Specifies whether this application is a public client (such as an installed application running on a mobile device). +Default is false. + +```yaml +Type: PublicClientApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequiredResourceAccess + +Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. + +This pre-configuration of required resource access drives the consent experience. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInAudience + +Specifies what Microsoft accounts are supported for the current application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Custom strings that can be used to categorize and identify the application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TokenEncryptionKeyId + +Specifies the keyId of a public key from the keyCredentials collection. + +When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. + +The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Web + +Specifies settings for a web application. + +```yaml +Type: WebApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Boolean + +### Microsoft.Open.MSGraph.Model.ApiApplication + +### Microsoft.Open.MSGraph.Model.InformationalUrl + +### Microsoft.Open.MSGraph.Model.OptionalClaims + +### Microsoft.Open.MSGraph.Model.ParentalControlSettings + +### Microsoft.Open.MSGraph.Model.PublicClientApplication + +### Microsoft.Open.MSGraph.Model.WebApplication + +### String + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.Add-in] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] + +### System.Collections.Generic.List`1[System.String] + +### System. Nullable`1[System.Boolean] + +## Outputs + +### Microsoft.Open.MSGraph.Model.MsApplication + +## Notes + +- See more details - + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..3635b5b70b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md @@ -0,0 +1,215 @@ +--- +title: New-EntraApplicationExtensionProperty +description: This article provides details on the New-EntraApplicationExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# New-EntraApplicationExtensionProperty + +## Synopsis + +Creates an application extension property. + +## Syntax + +```powershell +New-EntraApplicationExtensionProperty + -ApplicationId + -Name + [-DataType ] + [-TargetObjects ] + [] +``` + +## Description + +The `New-EntraApplicationExtensionProperty` cmdlet creates an application extension property for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Create an extension property + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} +``` + +This command creates an application extension property of the string type for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. + +### Example 2: Create an extension property with data type parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' + DataType = 'Boolean' +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app Boolean False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} +``` + +This command creates an application extension property of the specified data type for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. +- `-DataType` parameter specifies the data type of the value the extension property can hold. + +### Example 3: Create an extension property with targets parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$targets = New-Object System.Collections.Generic.List[System.String] +$targets.Add('User') +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' + TargetObjects = $targets +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {User} +``` + +The example shows how to create an application extension property with the specified target objects for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. +- `-TargetObjects` parameter specifies the Microsoft Graph resources that use the extension property. All values must be in PascalCase. + +## Parameters + +### -DataType + +Specifies the data type of the value the extension property can hold. Following values are supported. + +- Binary - 256 bytes maximum +- Boolean +- DateTime - Must be specified in ISO 8601 format. Will be stored in UTC. +- Integer - 32-bit value. +- LargeInteger - 64-bit value. +- String - 256 characters maximum + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +Specifies the name of the extension property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjects + +Specifies the Microsoft Graph resources that can use the extension property. All values must be in PascalCase. The following values are supported. + +- User +- Group +- AdministrativeUnit +- Application +- Device +- Organization + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) + +[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md new file mode 100644 index 0000000000..3c8821a907 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md @@ -0,0 +1,111 @@ +--- +title: New-EntraApplicationFromApplicationTemplate +description: This article provides details on the New-EntraApplicationFromApplicationTemplate command. + + +ms.service: entra +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate +schema: 2.0.0 +--- + +# New-EntraApplicationFromApplicationTemplate + +## Synopsis + +Add an instance of an application from the Microsoft Entra application gallery into your directory. + +## Syntax + +```powershell +New-EntraApplicationFromApplicationTemplate + -Id + -DisplayName + [] +``` + +## Description + +The `New-EntraApplicationFromApplicationTemplate` cmdlet adds an instance of an application from the Microsoft Entra application gallery into your directory. + +The application template with ID `8adf8e6e-67b2-4cf2-a259-e3dc5476c621` can be used to add a non-gallery app that you can configure different single-sign on (SSO) modes like SAML SSO and password-based SSO. + +## Examples + +### Example 1: Creates an application from application template + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DisplayName = 'ApplicationTemplate' +} +New-EntraApplicationFromApplicationTemplate @params +``` + +```Output +@odata.context servicePrincipal +-------------- ---------------- +https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.applicationServicePrincipal @{oauth2PermissionScopes=System.Object[]; servicePrincipalType=Application; displ...} +``` + +This command instantiates a new application based on application template referenced by the ID. + +- `-Id` specifies Application TemplateId. +- `-DisplayName` specifies application template display name. + +## Parameters + +### -Id + +The Id parameter specifies Application TemplateId. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Application template display name. + +```yaml +Type: System.ApplicationTemplateDisplayName +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.ApplicationTemplateCopy + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md new file mode 100644 index 0000000000..0f5ed02cf9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md @@ -0,0 +1,155 @@ +--- +title: New-EntraApplicationKey +description: This article provides details on the New-EntraApplicationKey command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKey + +schema: 2.0.0 +--- + +# New-EntraApplicationKey + +## Synopsis + +Adds a new key to an application. + +## Syntax + +```powershell +New-EntraApplicationKey + -ObjectId + -KeyCredential + -PasswordCredential ] + -Proof + [] +``` + +## Description + +Adds a new key to an application. + +## Examples + +### Example 1: Add a key credential to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $app.ObjectId + KeyCredential = @{ key=[System.Convert]::FromBase64String('{base64cert}') } + PasswordCredential = @{ DisplayName = 'mypassword' } + Proof = '{token}' +} + +New-EntraApplicationKey @params +``` + +This command adds a key credential to an specified application. + +- `-ObjectId` parameter specifies the unique identifier of an application. +- `-KeyCredential` parameter specifies the application key credential to add. +- `-PasswordCredential` parameter specifies the application password credential to add. +- `-Proof` parameter specifies the signed JWT token used as a proof of possession of the existing keys. + +## Parameters + +### -KeyCredential + +The application key credential to add. + +NOTES: keyId value should be null. + +```yaml +Type: KeyCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +The unique identifier of the application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredential + +The application password credential to add. + +NOTES: keyId value should be null. + +```yaml +Type: PasswordCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Proof + +A signed JWT token used as a proof of possession of the existing keys. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +### Microsoft.Open.MSGraph.Model.KeyCredential + +### Microsoft.Open.MSGraph.Model.PasswordCredential + +## Outputs + +### Microsoft.Open.MSGraph.Model.KeyCredential + +## Notes + +## Related Links + +[Remove-EntraApplicationKey](Remove-EntraApplicationKey.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..4d347c6251 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md @@ -0,0 +1,258 @@ +--- +title: New-EntraApplicationKeyCredential +description: This article provides details on the New-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# New-EntraApplicationKeyCredential + +## Synopsis + +Creates a key credential for an application. + +## Syntax + +```powershell +New-EntraApplicationKeyCredential + -ApplicationId + [-CustomKeyIdentifier ] + [-Type ] + [-Usage ] + [-Value ] + [-EndDate ] + [-StartDate ] + [] +``` + +## Description + +The `New-EntraApplicationKeyCredential` cmdlet creates a key credential for an application. + +An application can use this command along with `Remove-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. + +As part of the request validation, proof of possession of an existing key is verified before the action can be performed. + +## Examples + +### Example 1: Create a new application key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' + +$AppId = (Get-EntraApplication -Top 1).Objectid +$params = @{ + ApplicationId = $AppId + CustomKeyIdentifier = 'EntraPowerShellKey' + StartDate = '2024-03-21T14:14:14Z' + Type = 'Symmetric' + Usage = 'Sign' + Value = '' +} + +New-EntraApplicationKeyCredential @params +``` + +```Output +CustomKeyIdentifier : {84, 101, 115, 116} +EndDate : 2024-03-21T14:14:14Z +KeyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 +StartDate : 2025-03-21T14:14:14Z +Type : Symmetric +Usage : Sign +Value : {49, 50, 51} +``` + +This example shows how to create an application key credential. + +- `-ApplicationId` Specifies a unique ID of an application +- `-CustomKeyIdentifier` Specifies a custom key ID. +- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. +- `-Type` Specifies the type of the key. +- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. +- `-Value` Specifies the value for the key. + +You can use the `Get-EntraApplication` cmdlet to retrieve the application Object ID. + +### Example 2: Use a certificate to add an application key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' + +$cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 #create a new certificate object +$cer.Import('C:\Users\ContosoUser\appcert.cer') +$bin = $cer.GetRawCertData() +$base64Value = [System.Convert]::ToBase64String($bin) +$bin = $cer.GetCertHash() +$base64Thumbprint = [System.Convert]::ToBase64String($bin) +$keyid = [System.Guid]::NewGuid().ToString() + +$params = @{ + ApplicationId = '22223333-cccc-4444-dddd-5555eeee6666' + CustomKeyIdentifier = $base64Thumbprint + Type = 'AsymmetricX509Cert' + Usage = 'Verify' + Value = $base64Value + StartDate = $cer.GetEffectiveDateString() + EndDate = $cer.GetExpirationDateString() +} + +New-EntraApplicationKeyCredential @params +``` + +This example shows how to create an application key credential. + +- `-ApplicationId` Specifies a unique ID of an application +- `-CustomKeyIdentifier` Specifies a custom key ID. +- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. +- `-EndDate` Specifies the time when the key becomes invalid as a DateTime object. +- `-Type` Specifies the type of the key. +- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. +- `-Value` Specifies the value for the key. + +## Parameters + +### -CustomKeyIdentifier + +Specifies a custom key ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +Specifies the time when the key becomes invalid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +Specifies the time when the key becomes valid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of the key. + +```yaml +Type: KeyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Usage + +Specifies the key usage. + +- `AsymmetricX509Cert`: The usage must be `Verify`. +- `X509CertAndPassword`: The usage must be `Sign`. + +```yaml +Type: KeyUsage +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Value + +Specifies the value for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) + +[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md new file mode 100644 index 0000000000..155f17e3fe --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md @@ -0,0 +1,121 @@ +--- +title: New-EntraApplicationPassword +description: This article provides details on the New-EntraApplicationPassword command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPassword + +schema: 2.0.0 +--- + +# New-EntraApplicationPassword + +## Synopsis + +Adds a strong password to an application. + +## Syntax + +```powershell +New-EntraApplicationPassword + -ObjectId + -PasswordCredential + [] +``` + +## Description + +Adds a strong password to an application. + +## Examples + +### Example 1: Add a password to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$Application = Get-EntraBetaApplication -SearchString '' +$PasswordCredential= New-Object Microsoft.Open.MSGraph.Model.PasswordCredential +$PasswordCredential.StartDateTime = Get-Date -Year 2024 -Month 12 -Day 28 +$PasswordCredential.EndDateTime = Get-Date -Year 2025 -Month 2 -Day 28 +$PasswordCredential.KeyId = 'bbbbbbbb-1c1c-2d2d-3e3e-444444444444' +$PasswordCredential.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('a') +$PasswordCredential.Hint = 'b' +$params = @{ + ObjectId = $Application.ObjectId + PasswordCredential = $PasswordCredential +} + +New-EntraApplicationPassword @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +{97} 2/28/2025 7:05:39 AM nnW bbbbbbbb-1c1c-2d2d-3e3e-444444444444 12/28/2024 7:05:39 AM +``` + +This example adds a password to the specified application. + +- `-ObjectId` parameter specifies the unique identifier of the application. +- `-PasswordCredential` parameter specifies a password credential associated with an application or a service principal. + +## Parameters + +### -ObjectId + +The unique identifier of the application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredential + +Represents a password credential associated with an application or a service principal. + +```yaml +Type: PasswordCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +### Microsoft.Open.MSGraph.Model.PasswordCredential + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraApplicationPassword](Remove-EntraApplicationPassword.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..55f8da01e5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md @@ -0,0 +1,215 @@ +--- +title: New-EntraApplicationPasswordCredential +description: This article provides details on the New-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# New-EntraApplicationPasswordCredential + +## Synopsis + +Creates a password credential for an application. + +## Syntax + +```powershell +New-EntraApplicationPasswordCredential + -ApplicationId + [-CustomKeyIdentifier ] + [-StartDate ] + [-EndDate ] + [] +``` + +## Description + +The `New-EntraApplicationPasswordCredential` cmdlet creates a password credential for an application in Microsoft Entra ID. + +## Examples + +### Example 1: Create a password credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +New-EntraApplicationPasswordCredential -ApplicationId $application.Id +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. + +### Example 2: Create a password credential using CustomKeyIdentifier parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +100 101 109 111 demo 8/2/2026 11:47:53 AM 8Mw tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 8/2/2024 11:47:53 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-CustomKeyIdentifier` Speicifies unique binary identifier. + +### Example 3: Create a password credential using StartDate parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + StartDate = (Get-Date).AddYears(0) + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-StartDate` Speicifies the date and time at which the password becomes valid. + +### Example 4: Create a password credential using EndDate parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + EndDate = (Get-Date).AddYears(2) + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-EndDate` Speicifies The date and time at which the password expires. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -CustomKeyIdentifier + +A unique binary identifier. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +The date and time at which the password becomes valid. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +The date and time at which the password expires. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) + +[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md new file mode 100644 index 0000000000..278ad45ebb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md @@ -0,0 +1,406 @@ +--- +title: New-EntraServicePrincipal +description: This article provides details on the New-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipal + +schema: 2.0.0 +--- + +# New-EntraServicePrincipal + +## Synopsis + +Creates a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipal + -AppId + [-KeyCredentials ] + [-Homepage ] + [-LogoutUrl ] + [-ServicePrincipalType ] + [-AlternativeNames ] + [-PasswordCredentials ] + [-Tags ] + [-AccountEnabled ] + [-ServicePrincipalNames ] + [-AppRoleAssignmentRequired ] + [-DisplayName ] + [-ReplyUrls ] + [] +``` + +## Description + +Create a new service Principal. + +For multitenant apps, the calling user must also be in at least one of the following Microsoft Entra roles: + +- Application Administrator +- Cloud Application Administrator + +For single-tenant apps where the calling user is a non-admin user but is the owner of the backing application, the user must have the Application Developer role. + +## Examples + +### Example 1: Create a new service principal using DisplayName, AccountEnabled, Tags, and AppRoleAssignmentRequired + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AccountEnabled = $true + AppId = $MyApp.AppId + AppRoleAssignmentRequired = $true + DisplayName = $MyApp.DisplayName + Tags = {WindowsAzureActiveDirectoryIntegratedApp} +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +The tag `-Tags {WindowsAzureActiveDirectoryIntegratedApp}` is used to have this service principal show up in the list of Integrated Applications in the Admin Portal. + +- `-AccountEnabled` parameter specifies true if the service principal account is enabled, otherwise false. +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-DisplayName` parameter specifies the service principal display name. +- `-AppRoleAssignmentRequired` parameter indicates whether an application role assignment is required. + +### Example 2: Create a new service principal using Homepage, logoutUrl, and ReplyUrls + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + Homepage = 'https://localhost/home' + LogoutUrl = 'htpp://localhost/logout' + ReplyUrls = 'https://localhost/redirect' +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-Homepage` parameter specifies the home page or landing page of the application. +- `-LogoutUrl` parameter specifies the logout URL. +- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. + +### Example 3: Create a new service principal by KeyCredentials + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential +$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') +$startdate = Get-Date -Year 2023 -Month 10 -Day 23 +$creds.StartDate = $startdate +$creds.Type = 'Symmetric' +$creds.Usage = 'Sign' +$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('strong-cred-value') +$creds.EndDate = Get-Date -Year 2024 -Month 10 -Day 23 +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + KeyCredentials = $creds +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-KeyCredentials` parameter specifies the collection of key credentials associated with the service principal. + +### Example 4: Create a new service principal by AlternativeNames, ServicePrincipalType, and ServicePrincipalName + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + AlternativeNames = 'sktest2' + ServicePrincipalType = 'Application' + ServicePrincipalNames = $MyApp.AppId +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADandPersonalMicrosoftAccount Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-AlternativeNames` parameter specifies the alternative names for this service principal. +- `-ServicePrincipalType` parameter specifies the type of the service principal. +- `-ServicePrincipalNames` parameter specifies an array of service principal names. + +## Parameters + +### -AccountEnabled + +True if the service principal account is enabled; otherwise, false. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeNames + +The alternative names for this service principal. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppId + +The unique identifier for the associated application (its appId property). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoleAssignmentRequired + +Indicates whether an application role assignment is required. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the service principal display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Homepage + +Home page or landing page of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +The collection of key credentials associated with the service principal. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoutUrl + +Specifies the logout URL. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +The collection of password credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplyUrls + +The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalNames + +Specifies an array of service principal names. +Based on the identifierURIs collection, plus the application's appId property, these URIs are used to reference an application's service principal. +A client uses ServicePrincipalNames to: + +- populate requiredResourceAccess, via "Permissions to other applications" in the Azure classic portal. +- Specify a resource URI to acquire an access token, which is the URI returned in the claim. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalType + +The type of the service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Tags linked to this service principal. + +Note that if you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..5a44ce185e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,230 @@ +--- +title: New-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the New-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Assigns a service principal to an application role. + +## Syntax + +```powershell +New-EntraServicePrincipalAppRoleAssignment + -ObjectId + -PrincipalId + -Id + -ResourceId + [] +``` + +## Description + +The `New-EntraServicePrincipalAppRoleAssignment` cmdlet assigns a service principal to an application role in Microsoft Entra ID. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Assign an app role to another service principal + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $spo.ObjectId +} + +New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box aaaa0000-bb11-2222-33cc-444444dddddd +``` + +This example demonstrates how to assign an app role to another service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. + +- `-ObjectId` parameter specifies the ObjectId of a client service principal to which you're assigning the app role. +- `-ResourceId`parameter specifies the ObjectId of the resource service principal. +- `-Id` parameter specifies the Id of the app role (defined on the resource service principal) to assign to the client service principal. If no app roles are defined on the resource app, you can use `00000000-0000-0000-0000-000000000000`. +- `-PrincipalId` parameter specifies the ObjectId of the client service principal to which you're assigning the app role. + +### Example 2: Assign an app role to a user + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $user = Get-EntraUser -SearchString 'Test Contoso' + + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $user.ObjectId +} + +New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box bbbb1111-cc22-3333-44dd-555555eeeeee +``` + +This example demonstrates how to assign an app role to a user in Microsoft Entra ID. +You can use the command `Get-EntraServicePrincipal` to get a service principal Id. +You can use the command `Get-EntraUser` to get a user Id. + +- `-ObjectId` parameter specifies the ObjectId of the app's service principal. +- `-ResourceId`parameter specifies the ObjectId of the app's service principal. +- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the user. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the user. +- `-PrincipalId` parameter specifies the ObjectId of a user to which you're assigning the app role. + +### Example 3: Assign an app role to a group + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $group = Get-EntraGroup -SearchString 'testGroup' + + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $group.ObjectId + } + + New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box cccc2222-dd33-4444-55ee-666666ffffff +``` + +This example demonstrates how to assign an app role to a group in Microsoft Entra ID. +You can use the command `Get-EntraServicePrincipal` to get a service principal Id. +You can use the command `Get-EntraGroup` to get a group Id. + +- `-ObjectId` parameter specifies the ObjectId of the app's service principal. +- `-ResourceId`parameter specifies the ObjectId of the app's service principal. +- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the group. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the group. +- `-PrincipalId` parameter specifies the ObjectId of a group to which you're assigning the app role. + +## Parameters + +### -Id + +Specifies the ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies a principal ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +Specifies a resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`New-EntraServiceAppRoleAssignment` is an alias for `New-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) + +[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..74a1a50f71 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,182 @@ +--- +title: New-EntraServicePrincipalKeyCredential +description: This article provides details on the New-EntraServicePrincipalKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalKeyCredential + +## Synopsis + +Creates a password credential for a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipalKeyCredential + -ObjectId + [-CustomKeyIdentifier ] + [-StartDate ] + [-EndDate ] + [-Type ] + [-Usage ] + [-Value ] + [] +``` + +## Description + +The New-EntraServicePrincipalKeyCredential cmdlet creates a key credential for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Create a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +New-EntraServicePrincipalKeyCredential +``` + +This command creates a key credential for a service principal. + +## Parameters + +### -CustomKeyIdentifier + +Specifies a custom key ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +Specifies the time when the key becomes invalid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +Specifies the time when the key becomes valid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of the key. + +```yaml +Type: KeyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Usage + +Specifies the key usage. + +```yaml +Type: KeyUsage +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Value + +Specifies the value for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) + +[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..a8377771c4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,168 @@ +--- +title: New-EntraServicePrincipalPasswordCredential +description: This article provides details on the New-EntraServicePrincipalPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalPasswordCredential + +## Synopsis + +Creates a password credential for a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + [-EndDate ] + [-StartDate ] + [] +``` + +## Description + +The `New-EntraServicePrincipalPasswordCredential` cmdlet creates a password credential for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Create a password credential with StartDate + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + StartDate = '2024-04-21T14:14:14Z' +} +New-EntraServicePrincipalPasswordCredential @Params +``` + +```Output +secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u +@odata.type : #microsoft.graph.servicePrincipal +endDateTime : 08-08-2026 10:30:00 +hint : LY. +customKeyIdentifier : +startDateTime : 08-08-2024 14:14:14 +keyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 +@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword +displayName : +StartDate : 08-08-2024 14:14:14 +EndDate : 08-08-2026 10:30:00 +``` + +This example demonstrates how to create a password credential with StartDate for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-StarteDate` parameter specifies the date and time at which the password becomes valid. + +### Example 2: Create a password credential with EndtDate + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + EndDate = '2030-03-21T14:14:14Z' +} +New-EntraServicePrincipalPasswordCredential @Params +``` + +```Output +secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u +@odata.type : #microsoft.graph.servicePrincipal +endDateTime : 08-08-2026 10:30:00 +hint : LY. +customKeyIdentifier : +startDateTime : 08-08-2024 14:14:14 +keyId : bbbbbbbb-1c1c-2d2d-3e3e-444444444444 +@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword +displayName : +StartDate : 08-08-2024 14:14:14 +EndDate : 08-08-2026 10:30:00 +``` + +This example demonstrates how to create a password credential with EndDate for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-EndDate` parameter specifies the date and time at which the password expires represented using ISO 8601 format and is always in UTC time. + +## Parameters + +### -EndDate + +The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of the service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) + +[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md new file mode 100644 index 0000000000..bb06d0fd75 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraApplication +description: This article provides details on the Remove-EntraApplication command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplication + +schema: 2.0.0 +--- + +# Remove-EntraApplication + +## Synopsis + +Deletes an application object. + +## Syntax + +```powershell +Remove-EntraApplication + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplication` cmdlet deletes an application object identified by ApplicationId. Specify the `ApplicationId` parameter to delete an application object. + +## Examples + +### Example 1: Remove an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$Application = Get-EntraApplication -SearchString '' +Remove-EntraApplication -ApplicationId $Application.ObjectId +``` + +This example demonstrates how to delete an application object. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[New-EntraApplication](New-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..3ff1288b6e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationExtensionProperty +description: This article provides details on the Remove-EntraApplicationExtensionProperty command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# Remove-EntraApplicationExtensionProperty + +## Synopsis + +Removes an application extension property. + +## Syntax + +```powershell +Remove-EntraApplicationExtensionProperty + -ExtensionPropertyId + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplicationExtensionProperty` cmdlet removes an application extension property for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an application extension property + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + ExtensionPropertyId = 'cccc2222-dd33-4444-55ee-666666ffffff' +} + +Remove-EntraApplicationExtensionProperty @params +``` + +This example removes the extension property that has the specified ID from an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-ExtensionPropertyId` parameter specifies the unique identifier of the extension property to remove. + +## Parameters + +### -ExtensionPropertyId + +Specifies the unique ID of the extension property to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) + +[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md new file mode 100644 index 0000000000..9f0e4a9325 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md @@ -0,0 +1,133 @@ +--- +title: Remove-EntraApplicationKey +description: This article provides details on the Remove-EntraApplicationKey command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKey + +schema: 2.0.0 +--- + +# Remove-EntraApplicationKey + +## Synopsis + +Removes a key from an application. + +## Syntax + +```powershell +Remove-EntraApplicationKey + -ObjectId + [-Proof ] + [-KeyId ] + [] +``` + +## Description + +Removes a key from an application. + +## Examples + +### Example 1: Removes a key credential from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $app.ObjectId + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' + Proof = {token} +} + +Remove-EntraApplicationKey @params +``` + +This command removes the specified key credential from the specified application. + +- `-ObjectId` parameter specifies the unique identifier of an application. +- `-KeyId` parameter specifies the key Id corresponding to the key object to be removed. +- `-Proof` parameter specifies the JWT token provided as a proof of possession. + +## Parameters + +### -ObjectId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KeyId + +The key Id corresponding to the key object to be removed. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Proof + +The JWT token provided as a proof of possession. + +A self-signed JWT token used as a proof of possession of the existing keys. This JWT token must be signed with a private key that corresponds to one of the existing valid certificates associated with the application. The token should contain the following claims: + +- `aud`: Audience needs to be 00000002-0000-0000-c000-000000000000. +- `iss`: Issuer needs to be the ID of the application that initiates the request. +- `nbf`: Not before time. +- `exp`: Expiration time should be the value of nbf + 10 minutes. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationKey](New-EntraApplicationKey.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..944d130412 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md @@ -0,0 +1,108 @@ +--- +title: Remove-EntraApplicationKeyCredential +description: This article provides details on the Remove-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# Remove-EntraApplicationKeyCredential + +## Synopsis + +Removes a key credential from an application. + +## Syntax + +```powershell +Remove-EntraApplicationKeyCredential + -ApplicationId + -KeyId + [] +``` + +## Description + +The `Remove-EntraApplicationKeyCredential` cmdlet removes a key credential from an application. + +An application can use this command along with `New-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. + +## Examples + +### Example 1: Remove a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +} + +Remove-EntraApplicationKeyCredential @params +``` + +This command removes the specified key credential from the specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-KeyId` Specifies a custom key ID. Use `Get-EntraApplicationKeyCredential` to get the keyId details. + +## Parameters + +### -KeyId + +Specifies a custom key ID. The unique identifier for the password. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) + +[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md new file mode 100644 index 0000000000..a8a9019f62 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationOwner +description: This article provides details on the Remove-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Remove-EntraApplicationOwner + +## Synopsis + +Removes an owner from an application. + +## Syntax + +```powershell +Remove-EntraApplicationOwner + -OwnerId + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplicationOwner` cmdlet removes an owner from an application in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an owner from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + OwnerId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} + +Remove-EntraApplicationOwner @params +``` + +This example removes the specified owner from the specified application. You can use the command `Get-EntraApplication` to get application Id. + +- `-ApplicationId` parameter specifies the the unique identifier of a application. +- `-OwnerId` parameter specifies the ID of the owner. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, -`InformationVariable`, `-OutVariable`, -`OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) + +[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md new file mode 100644 index 0000000000..b63496136c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationPassword +description: This article provides details on the Remove-EntraApplicationPassword command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPassword + +schema: 2.0.0 +--- + +# Remove-EntraApplicationPassword + +## Synopsis + +Remove a password from an application. + +## Syntax + +```powershell +Remove-EntraApplicationPassword + -ObjectId + [-KeyId ] + [] +``` + +## Description + +Remove a password from an application. + +## Examples + +### Example 1: Removes a password from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $application.Id + KeyId = 'cccccccc-2d2d-3e3e-4f4f-555555555555' +} + +Remove-EntraApplicationPassword @params +``` + +This example removes the specified password from the specified application. + +- `-ObjectId` parameter specifies the unique identifier of the application. +- `-KeyId` parameter specifies the unique identifier of the PasswordCredential. + +## Parameters + +### -ObjectId + +The unique identifier of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KeyId + +The unique identifier for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationPassword](New-EntraApplicationPassword.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..72d34ae5ff --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraApplicationPasswordCredential +description: This article provides details on the Remove-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# Remove-EntraApplicationPasswordCredential + +## Synopsis + +Removes a password credential from an application. + +## Syntax + +```powershell +Remove-EntraApplicationPasswordCredential + -ApplicationId + -KeyId + [] +``` + +## Description + +The `Remove-EntraApplicationPasswordCredential` cmdlet removes a password credential from an application in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an application password credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq 'Contoso Helpdesk App'" +$KeyIDs = Get-EntraApplicationPasswordCredential -ApplicationId $application.Id +Remove-EntraApplicationPasswordCredential -ApplicationId $application.Id -KeyId $KeyIds[0].KeyId +``` + +This example demonstrates how to remove the password credential for an application. + +- `ApplicationId` Specifies the ID of the application. Use `Get-EntraApplication` to get application ObjectId value. +- `KeyId` Specifies the ID of the password credential. Use `Get-EntraApplicationPasswordCredential` to retrieve a specific credential details. + +## Parameters + +### -KeyId + +Specifies the ID of the password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of the application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) + +[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md new file mode 100644 index 0000000000..d34578e6cb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md @@ -0,0 +1,83 @@ +--- +title: Remove-EntraApplicationVerifiedPublisher +description: This article provides details on the Remove-EntraApplicationVerifiedPublisher command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher + +schema: 2.0.0 +--- + +# Remove-EntraApplicationVerifiedPublisher + +## Synopsis + +Removes the verified publisher from an application. + +## Syntax + +```powershell +Remove-EntraApplicationVerifiedPublisher + -AppObjectId + [] +``` + +## Description + +Removes the verified publisher from an application. + +## Examples + +### Example 1: Remove the verified publisher from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +Remove-EntraApplicationVerifiedPublisher -AppObjectId $app.ObjectId +``` + +This command demonstrates how to remove the verified publisher from an application. + +- `-AppObjectId` parameter specifies the unique identifier of an application. + +## Parameters + +### -AppObjectId + +The unique identifier of a Microsoft Entra ID Application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[Set-EntraApplicationVerifiedPublisher](Set-EntraApplicationVerifiedPublisher.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md new file mode 100644 index 0000000000..fb083eb0aa --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraDeletedApplication +description: This article provides details on the Remove-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Remove-EntraDeletedApplication + +## Synopsis + +Permanently delete a recently deleted application object from deleted items. + +## Syntax + +```powershell +Remove-EntraDeletedApplication + [-ObjectId] + [] +``` + +## Description + +Permanently delete a recently deleted application object from deleted items. After an item is permanently deleted, it can't be restored. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- To permanently delete deleted applications or service principals: Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. + +## Examples + +### Example 1: Remove deleted application object + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$App = Get-EntraDeletedApplication -SearchString 'My PowerShell Application' +Remove-EntraDeletedApplication -ObjectId $App.ObjectId +``` + +This command removes recently deleted application. You can use the command `Get-EntraDeletedApplication` to get deleted application Id. + +- `-ObjectId` parameter specifies the Id of a deleted application. + +## Parameters + +### -ObjectId + +The unique identifier of deleted application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) + +[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..9860be4fb3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md @@ -0,0 +1,96 @@ +--- +title: Remove-EntraDeletedDirectoryObject +description: This article provides details on the Remove-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Remove-EntraDeletedDirectoryObject + +## Synopsis + +Permanently delete a previously deleted directory object. + +## Syntax + +```powershell +Remove-EntraDeletedDirectoryObject + -DirectoryObjectId + [] +``` + +## Description + +The `Remove-EntraDeletedDirectoryObject` cmdlet is used to permanently delete a previously deleted directory object. + +When a directory object is permanently deleted, it can no longer be restored. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- To permanently delete deleted applications or service principals: `Application Administrator`, `Cloud Application Administrator`, or `Hybrid Identity Administrator`. +- To permanently delete deleted users: `User Administrator`. +- To permanently delete deleted groups: `Groups Administrator`. + +## Examples + +### Example 1: Delete a previously deleted directory object + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Group.ReadWrite.All','Application.ReadWrite.All','User.ReadWrite.All' + +Remove-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This example demonstrates how to permanently delete a previously deleted directory object by DirectoryObjectId. + +- `-DirectoryObjectId` parameter specifies the Id of the directory object that is permanently deleted. + +## Parameters + +### -DirectoryObjectId + +The DirectoryObjectId of the directory object that is permanently deleted. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) + +[Restore-EntraDeletedDirectoryObject](Restore-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md new file mode 100644 index 0000000000..65cf9d1a54 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md @@ -0,0 +1,86 @@ +--- +title: Remove-EntraServicePrincipal +description: This article provides details on the Remove-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipal + +## Synopsis + +Removes a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipal + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipal` cmdlet removes a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Removes a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Remove-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId +``` + +This example demonstrates how to remove a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipal](New-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..333bf29a33 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,117 @@ +--- +title: Remove-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the Remove-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Removes a service principal application role assignment. + +## Syntax + +```powershell +Remove-EntraServicePrincipalAppRoleAssignment + -AppRoleAssignmentId + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalAppRoleAssignment` cmdlet removes a service principal application role assignment in Microsoft Entra ID. + +App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Removes a service principal application role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $servicePrincipal.Id -AppRoleAssignmentId '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' +``` + +This example demonstrates how to remove a service principal application role assignment in Microsoft Entra ID. + +- `-ServicePrincipalId` - specifies the unique identifier (Object ID) of the service principal or user from which you want to remove an app role assignment. +- `-AppRoleAssignmentId` - specifies the unique identifier (ID) of the app role assignment that you want to remove. The value `2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6` represents the ID of the specific app role assignment to be removed. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the ID of the application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Remove-EntraServiceAppRoleAssignment` is an alias for `Remove-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) + +[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..6f2490f9fd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Remove-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Remove delegated permission classification. + +## Syntax + +```powershell +Remove-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -Id + [] +``` + +## Description + +The `Remove-EntraServicePrincipalDelegatedPermissionClassification` cmdlet deletes the given delegated permission classification by Id from service principal. + +## Examples + +### Example 1: Remove a delegated permission classification + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' +} +Remove-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +This command deletes the delegated permission classification by Id from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. +- `-Id` parameter specifies the unique identifier of a delegated permission classification object Id. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a delegated permission classification object Id. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Add-EntraServicePrincipalDelegatedPermissionClassification](Add-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..18477f4493 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraServicePrincipalKeyCredential +description: This article provides details on the Remove-EntraServicePrincipalKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalKeyCredential + +## Synopsis + +Removes a key credential from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalKeyCredential + -ServicePrincipalId + -KeyId + [] +``` + +## Description + +The Remove-EntraServicePrincipalKeyCredential cmdlet removes a key credential from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' #Delegated Permission +Connect-Entra -Scopes 'Application.ReadWrite.OwnedBy' #Application Permission +$SPObjectID = (Get-EntraServicePrincipal -SearchString 'Entra Multi-Factor Auth Client').ObjectID +Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID +Remove-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID -KeyId +``` + +This example demonstrates how to remove a key credential from a service principal in Microsoft Entra ID. + +- First command stores the ObjectID of your service principal in the $SPObjectID variable. +- The second command gets all the Key Credentials for the service principal. Copy the preferred KeyID associated with the certificate to be removed and paste it at the in the third command. +- The last command removes the certificate (key credential) from the service principal configuration. + +## Parameters + +### -KeyId + +Specifies the ID of a key credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) + +[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..685585aa07 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md @@ -0,0 +1,107 @@ +--- +title: Remove-EntraServicePrincipalOwner +description: This article provides details on the Remove-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalOwner + +## Synopsis + +Removes an owner from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalOwner + -OwnerId + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalOwner` cmdlet removes an owner from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Removes an owner from a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$owner = Get-EntraUser -UserId 'SawyerM@contoso.com' + +$params= @{ + ServicePrincipalId = $servicePrincipal.Id + OwnerId = $owner.Id +} +Remove-EntraServicePrincipalOwner @params +``` + +This example demonstrates how to remove an owner from a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal Id. +- `-OwnerId` parameter specifies the service principal owner Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) + +[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..6706517f45 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraServicePrincipalPasswordCredential +description: This article provides details on the Remove-EntraServicePrincipalPasswordCredential command. + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalPasswordCredential + +## Synopsis + +Removes a password credential from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + -KeyId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalPasswordCredential` cmdlet removes a password credential from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a password credential from a service principal in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +} +Remove-EntraServicePrincipalPasswordCredential @Params +``` + +This example demonstrates how to remove a password credential from a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ServicePrincipalId of a specified Service Principal Password Credential. +- `-KeyId` parameter specifies the unique identifier of a Password Credential. + +## Parameters + +### -KeyId + +Specifies the unique identifier of password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) + +[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md new file mode 100644 index 0000000000..a3c04f906a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md @@ -0,0 +1,127 @@ +--- +title: Restore-EntraDeletedApplication +description: This article provides details on the Restore-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Restore-EntraDeletedApplication + +## Synopsis + +Restores a previously deleted application. + +## Syntax + +```powershell +Restore-EntraDeletedApplication + [-IdentifierUris ] + -ObjectId + [] +``` + +## Description + +This cmdlet restores a previously deleted application. + +Restoring an application doesn't restore the associated service principal automatically. You must explicitly restore the deleted service principal. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- Application Administrator +- Cloud Application Administrator +- Hybrid Identity Administrator + +## Examples + +### Example 1: Restores a previously deleted application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraApplication -SearchString 'New Entra Application' + +# Delete a specific application +Remove-EntraApplication -ObjectId $application.ObjectId + +# Confirm deleted application +Get-EntraDeletedApplication -Filter "DisplayName eq 'New Entra Application'" + +# Restore a deleted application +Restore-EntraDeletedApplication -ObjectId $application.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example shows how an application is deleted, then the deleted application is retrieved using the `Get-EntraDeletedApplication` cmdlet, and subsequently the application is restored by specifying the application's Object ID in the `Restore-EntraDeletedApplication` cmdlet. + +- `-ObjectId` parameter specifies the ObjectId of the deleted application that is to be restored. + +## Parameters + +### -IdentifierUris + +The IdentifierUris of the application that is to be restored. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +The ObjectId of the deleted application that is to be restored. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md new file mode 100644 index 0000000000..570791b14e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md @@ -0,0 +1,110 @@ +--- +title: Select-EntraGroupIdsServicePrincipalIsMemberOf +description: This article provides details on the Select-EntraGroupIdsServicePrincipalIsMemberOf command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsServicePrincipalIsMemberOf + +## Synopsis + +Selects the groups in which a service principal is a member. + +## Syntax + +```powershell +Select-EntraGroupIdsServicePrincipalIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsServicePrincipalIsMemberOf` cmdlet selects the groups in which a service principal is a member in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Top 10).ObjectId +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $ServicePrincipal.ObjectId + GroupIdsForMembershipCheck = $Groups +} +Select-EntraGroupIdsServicePrincipalIsMemberOf @params +``` + +```Output +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command gets the group membership of a group for a specified service principal. +You can use the command `Get-EntraGroup` to get group Id. +You can use the command `Get-EntraServicePrincipal` to get service principal Id. + +- `-ObjectId` parameter specifies the service principal Id. +- `-GroupIdsForMembershipCheck` parameter specifies the array of group object IDs. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md new file mode 100644 index 0000000000..a79faa2c1f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md @@ -0,0 +1,496 @@ +--- +title: Set-EntraApplication +description: This article provides details on the Set-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplication + +schema: 2.0.0 +--- + +# Set-EntraApplication + +## Synopsis + +Updates the properties of an application object. + +## Syntax + +```powershell +Set-EntraApplication + -ApplicationId + [-PasswordCredentials ] + [-TokenEncryptionKeyId ] + [-SignInAudience ] + [-KeyCredentials ] + [-ParentalControlSettings ] + [-IdentifierUris ] + [-AppRoles ] + [-PublicClient ] + [-InformationalUrl ] + [-Tags ] + [-Api ] + [-OptionalClaims ] + [-GroupMembershipClaims ] + [-Web ] + [-DisplayName ] + [-IsFallbackPublicClient ] + [-IsDeviceOnlyAuthSupported ] + [-RequiredResourceAccess ] + [] +``` + +## Description + +Updates the properties of an application object. + +## Examples + +### Example 1: Update an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + DisplayName = 'New Demo Application' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 2: Update an application using IdentifierUris parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + IdentifierUris = 'https://mynewapp.contoso.com' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 3: Update an application using GroupMembershipClaims parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + GroupMembershipClaims = 'SecurityGroup' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 4: Update an application using IsDeviceOnlyAuthSupported parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + IsDeviceOnlyAuthSupported = $false +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 5: Update an application using Tags parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + Tags = 'mytag' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +## Parameters + +### -Api + +Specifies settings for an application that implements a web API. + +```yaml +Type: ApiApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoles + +The collection of application roles that an application might declare. + +These roles can be assigned to users, groups, or service principals. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupMembershipClaims + +Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentifierUris + +Specifies identifier Uniform Resource Identifiers (URIs). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InformationalUrl + +Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. + +The terms of service and privacy statement are surfaced to users through the user consent experience. + +```yaml +Type: InformationalUrl +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsDeviceOnlyAuthSupported + +Specifies if the application supports authentication using a device token. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsFallbackPublicClient + +Specifies the fallback application type as public client, such as an installed application running on a mobile device. + +The default value is `false` that means the fallback application type is confidential client such as web app. + +There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). + +In those cases Microsoft Entra ID interprets the application type based on the value of this property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +Specifies key credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OptionalClaims + +Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. + +```yaml +Type: OptionalClaims +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentalControlSettings + +Specifies parental control settings for an application. + +```yaml +Type: ParentalControlSettings +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +Specifies password credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicClient + +Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is `false`. + +```yaml +Type: PublicClientApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequiredResourceAccess + +Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. + +This pre-configuration of required resource access drives the consent experience. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInAudience + +Specifies what Microsoft accounts are supported for the current application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Custom strings that can be used to categorize and identify the application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TokenEncryptionKeyId + +Specifies the keyId of a public key from the keyCredentials collection. + +When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. + +The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Web + +Specifies settings for a web application. + +```yaml +Type: WebApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Boolean + +### Microsoft.Open.MSGraph.Model.ApiApplication + +### Microsoft.Open.MSGraph.Model.InformationalUrl + +### Microsoft.Open.MSGraph.Model.OptionalClaims + +### Microsoft.Open.MSGraph.Model.ParentalControlSettings + +### Microsoft.Open.MSGraph.Model.PublicClientApplication + +### Microsoft.Open.MSGraph.Model.WebApplication + +### String + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] + +### System.Collections.Generic.List`1[System.String] + +### System.Nullable`1[System.Boolean] + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[New-EntraApplication](New-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md new file mode 100644 index 0000000000..a029dc0470 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md @@ -0,0 +1,126 @@ +--- +title: Set-EntraApplicationLogo +description: This article provides details on the Set-EntraApplicationLogo command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationLogo + +schema: 2.0.0 +--- + +# Set-EntraApplicationLogo + +## Synopsis + +Sets the logo for an Application + +## Syntax + +### File (Default) + +```powershell +Set-EntraApplicationLogo + -ApplicationId + -FilePath + [] +``` + +### Stream + +```powershell +Set-EntraApplicationLogo + -ApplicationId + [] +``` + +### ByteArray + +```powershell +Set-EntraApplicationLogo + -ApplicationId + [] +``` + +## Description + +The `Set-EntraApplicationLogo` cmdlet is used to set the logo for an application. + +## Examples + +### Example 1: Sets the application logo for the application specified by the ApplicationId parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Demo Application'" +$params = @{ + ObjectId = $application.ObjectId + FilePath = 'D:\applogo.jpg' +} +Set-EntraApplicationLogo @params +``` + +This cmdlet sets the application logo for the application specified by the `-ApplicationId` parameter to the image specified with the `-FilePath` parameter. + +## Parameters + +### -FilePath + +The file path of the file that is to be uploaded as the application logo. + +```yamlset-EntraApplicationLogo +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +The ApplicationId of the Application for which the logo is set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.IO.Stream System.Byte\[\] + +## Outputs + +### System.Object + +## Notes + +File uploads must be smaller than 500KB. + +## Related Links + +[Get-EntraApplicationLogo](Get-EntraApplicationLogo.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md new file mode 100644 index 0000000000..722021d35c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md @@ -0,0 +1,111 @@ +--- +title: Set-EntraApplicationVerifiedPublisher +description: This article provides details on the Set-EntraApplicationVerifiedPublisher command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher + +schema: 2.0.0 +--- + +# Set-EntraApplicationVerifiedPublisher + +## Synopsis + +Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. + +## Syntax + +```powershell +Set-EntraApplicationVerifiedPublisher + -AppObjectId + -SetVerifiedPublisherRequest + [] +``` + +## Description + +Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. + +## Examples + +### Example 1: Set the verified publisher of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$appObjId = $app.ObjectId +$mpnId = '0433167' +$req = @{verifiedPublisherId = $mpnId} +$params = @{ + AppObjectId = $appObjId + SetVerifiedPublisherRequest = $req +} +Set-EntraApplicationVerifiedPublisher @params +``` + +This command sets the verified publisher of an application. + +The Microsoft Partner Network ID (MPNID) of the verified publisher can be obtained from the publisher's Partner Center account. + +- `-AppObjectId` parameter specifies the unique identifier of a Microsoft Entra ID Application. +- `-SetVerifiedPublisherRequest` parameter specifies the request body object containing the verifiedPublisherId property with it's the MPNID value. + +## Parameters + +### -AppObjectId + +The unique identifier of a Microsoft Entra ID Application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SetVerifiedPublisherRequest + +A request body object containing the verifiedPublisherId property it's the MPNID value. + +```yaml +Type: SetVerifiedPublisherRequest +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraApplicationVerifiedPublisher](Remove-EntraApplicationVerifiedPublisher.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md new file mode 100644 index 0000000000..b2dd1e4636 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md @@ -0,0 +1,440 @@ +--- +title: Set-EntraServicePrincipal +description: This article provides details on the Set-EntraServicePrincipal command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Set-EntraServicePrincipal + +## Synopsis + +Updates a service principal. + +## Syntax + +```powershell +Set-EntraServicePrincipal + -ServicePrincipalId + [-KeyCredentials ] + [-Homepage ] + [-AppId ] + [-LogoutUrl ] + [-ServicePrincipalType ] + [-AlternativeNames ] + [-PasswordCredentials ] + [-PreferredSingleSignOnMode ] + [-Tags ] + [-AccountEnabled ] + [-ServicePrincipalNames ] + [-AppRoleAssignmentRequired ] + [-DisplayName ] + [-ReplyUrls ] + [] +``` + +## Description + +The `Set-EntraServicePrincipal` cmdlet updates a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Disable the account of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AccountEnabled = $False +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `AccountEnabled` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-AccountEnabled` parameter specifies indicates whether the account is enabled. + +### Example 2: Update AppId and Homepage of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AppId = '22223333-cccc-4444-dddd-5555eeee6666' + Homepage = 'https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `AppId` and Homepage of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-AppId` parameter specifies the application ID. +- `-Homepage` parameter specifies the home page or landing page of the application. + +### Example 3: Update AlternativeNames and DisplayName of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AlternativeNames = 'Service Principal Demo' + DisplayName = 'NewName' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update AlternativeNames and DisplayName of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 4: Update LogoutUrl and ReplyUrls of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + LogoutUrl = 'https://securescore.office.com/SignOut' + ReplyUrls = 'https://admin.contoso.com' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update LogoutUrl and ReplyUrls of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-LogoutUrl` parameter specifies the sign out URL. +- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. + +### Example 5: Update ServicePrincipalType and AppRoleAssignmentRequired of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + ServicePrincipalType = 'Application' + AppRoleAssignmentRequired = $True +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `ServicePrincipalType` and `AppRoleAssignmentRequired` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-ServicePrincipalType` parameter specifies the service principal type. +- `-AppRoleAssignmentRequired` parameter specifies indicates whether an application role assignment is required. + +### Example 6: Update KeyCredentials of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential +$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') +$startdate = Get-Date -Year 2024 -Month 10 -Day 10 +$creds.StartDate = $startdate +$creds.Type = 'Symmetric' +$creds.Usage = 'Sign' +$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('A') +$creds.EndDate = Get-Date -Year 2025 -Month 12 -Day 20 +Set-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId -KeyCredentials $creds +``` + +This example demonstrates how to update KeyCredentials of a service principal in Microsoft Entra ID. + +Use the `New-EntraServicePrincipalPasswordCredential` and `Remove-EntraServicePrincipalPasswordCredential` cmdlets to update the password or secret for a servicePrincipal. + +### Example 7: Update PreferredSingleSignOnMode of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + PreferredSingleSignOnMode = 'saml' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `PreferredSingleSignOnMode` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-PreferredSingleSignOnMode` parameter specifies the single sign-on mode configured for this application. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeNames + +The alternative names for this service principal. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppId + +Specifies the application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoleAssignmentRequired + +Indicates whether an application role assignment is required. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Homepage + +Specifies the home page or landing page of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +Specifies key credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoutUrl + +Specifies the sign out URL. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Species the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredentials + +Specifies password credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredSingleSignOnMode + +Specifies the single sign-on mode configured for this application. Microsoft Entra ID uses the preferred single sign-on mode to launch the application from Microsoft 365 or the My Apps portal. The supported values are password, saml, notSupported, and oidc. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplyUrls + +The URLs that user tokens are sent to for sign in with the associated application, or the redirect Uniform Resource Identifiers that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalNames + +Specifies service principal names. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalType + +The service principal type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Specifies an array of tags. + +If you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipal](New-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md new file mode 100644 index 0000000000..7b5c34637f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md @@ -0,0 +1,119 @@ +--- +title: Add-EntraEnvironment +description: This article provides details on the Add-EntraEnvironment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraEnvironment + +schema: 2.0.0 +--- + +# Add-EntraEnvironment + +## Synopsis + +Adds Microsoft Entra environment to the settings file. + +## Syntax + +### Add Entra Environment Name + +```powershell +Add-EntraEnvironment + [-Name] + [-AzureADEndpoint] + [-GraphEndpoint] + [-ProgressAction ] + [-WhatIf] + [-Confirm] + [] +``` + +## Description + +Adds Microsoft Entra environment to the settings file. + +## Examples + +### Example 1: Add a user defined environment + +```powershell +$params = @{ + Name = 'Canary' + GraphEndpoint = 'https://canary.graph.microsoft.com' + AzureADEndpoint = 'https://login.microsoftonline.com' +} + +Add-EntraEnvironment @params +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Canary https://login.microsoftonline.com https://microsoftgraph.com User-defined {} +``` + +Adds a user-defined Entra environment to the settings file. + +## Parameters + +### -Name + +Specifies the name of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GraphEndpoint + +Specifies the GraphEndpoint URL of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AzueADEndpoint + +Specifies the AzureADEndpoint URL of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraEnvironment](Get-EntraEnvironment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md new file mode 100644 index 0000000000..1322d7b844 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md @@ -0,0 +1,583 @@ +--- +title: Connect-Entra +description: This article provides details on the Connect-Entra Command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi254 +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Connect-Entra + +schema: 2.0.0 +--- + +# Connect-Entra + +## Synopsis + +Connect to Microsoft Entra ID with an authenticated account. + +## Syntax + +### UserParameterSet (Default) + +```powershell +Connect-Entra +[[-Scopes] ] +[[-ClientId] ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-UseDeviceCode] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### AppCertificateParameterSet + +```powershell +Connect-Entra +[-ClientId] +[[-CertificateSubjectName] ] +[[-CertificateThumbprint] ] +[-Certificate ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### IdentityParameterSet + +```powershell +Connect-Entra +[[-ClientId] ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-Identity] +[-NoWelcome] +[] +``` + +### AppSecretCredentialParameterSet + +```powershell +Connect-Entra +[-ClientSecretCredential ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### AccessTokenParameterSet + +```powershell +Connect-Entra +[-AccessToken] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### EnvironmentVariableParameterSet + +```powershell +Connect-Entra +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-EnvironmentVariable] +[-NoWelcome] +[] +``` + +## Description + +The `Connect-Entra` cmdlet connects to Microsoft Entra ID with an authenticated account. + +Several authentication scenarios are supported based on your use case, such as delegated (interactive) and app-only (non-interactive). + +`Connect-Entra` is an alias for `Connect-MgGraph`. + +## Examples + +### Example 1: Delegated access: Connect a PowerShell session to a tenant + +```powershell +Connect-Entra +``` + +This example shows how to connect your current PowerShell session to a Microsoft Entra ID tenant using credentials. + +### Example 2: Delegated access: Connect a PowerShell session to a tenant with required scopes + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Group.ReadWrite.All' +``` + +```Output +Welcome to Microsoft Graph! + +``` + +This example shows how to authenticate to Microsoft Entra ID with scopes. + +### Example 3: Delegated access: Using an access token + +```powershell +$secureString = ConvertTo-SecureString -String $AccessToken -AsPlainText -Force +Connect-Entra -AccessToken $secureString +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example shows how to interactively authenticate to Microsoft Entra ID using an access token. + +For more information on how to get or create access token, see [Request an access token](https://learn.microsoft.com/graph/auth-v2-user#3-request-an-access-token). + +### Example 4: Delegated access: Using device code flow + +```powershell +Connect-Entra -UseDeviceCode +``` + +```Output +To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code A1B2CDEFGH to authenticate. +``` + +This example shows how to interactively authenticate to Microsoft Entra ID using device code flow. + +For more information, see [Device Code flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-device-code). + +### Example 5: App-only access: Using client credential with a Certificate thumbprint + +```powershell +$connectParams = @{ + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + ApplicationId = '00001111-aaaa-2222-bbbb-3333cccc4444' + CertificateThumbprint = 'AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00' +} + +Connect-Entra @connectParams +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example shows how to authenticate using an ApplicationId and CertificateThumbprint. + +For more information on how to get or create CertificateThumbprint, see [Authenticate with app-only access](https://learn.microsoft.com/powershell/entra-powershell/app-only-access-auth). + +### Example 6: App-only access: Using client credential with a certificate name + +```powershell +$params = @{ + ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + CertificateName = 'YOUR_CERT_SUBJECT' +} + +Connect-Entra @params +``` + +```powershell + $Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint + Connect-Entra -ClientId '' -TenantId '' -Certificate $Cert +``` + +You can find the certificate subject by running the above command. + +### Example 7: App-only access: Using client credential with a certificate + +```powershell +$Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint +$params = @{ + ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + Certificate = $Cert +} + +Connect-Entra @params +``` + +### Example 8: App-only access: Using client secret credentials + +```powershell +$ClientSecretCredential = Get-Credential -Credential '00001111-aaaa-2222-bbbb-3333cccc4444' +# Enter client_secret in the password prompt. +Connect-Entra -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -ClientSecretCredential $ClientSecretCredential +``` + +This authentication method is ideal for background interactions. + +For more information on how to get credential, see [Get-Credential](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential) command. + +### Example 9: App-only access: Using managed identity: System-assigned managed identity + +```powershell +Connect-Entra -Identity +``` + +Uses an automatically managed identity on a service instance. The identity is tied to the lifecycle of a service instance. + +### Example 10: App-only access: Using managed identity: User-assigned managed identity + +```powershell +Connect-Entra -Identity -ClientId 'User_Assigned_Managed_identity_Client_Id' +``` + +Uses a user created managed identity as a standalone Azure resource. + +### Example 11: Connecting to an environment as a different identity + +```powershell +Connect-Entra -ContextScope 'Process' +``` + +```Output +Welcome to Microsoft Graph! +``` + +To connect as a different identity other than CurrentUser, specify the ContextScope parameter with the value Process. + +For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/microsoft.graph.entra/get-entracontext) command. + +### Example 12: Connecting to an environment or cloud + +```powershell +Get-EntraEnvironment +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in +USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in +``` + +```powershell +Connect-Entra -Environment 'Global' +``` + +When you use Connect-Entra, you can choose to target other environments. By default, Connect-Entra targets the global public cloud. + +### Example 13: Sets the HTTP client timeout in seconds + +```powershell + Connect-Entra -ClientTimeout 60 +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example Sets the HTTP client timeout in seconds. + +### Example 14: Hides the welcome message + +```powershell +Connect-Entra -NoWelcome +``` + +This example hides the welcome message. + +### Example 15: Allows for authentication using environment variables + +```powershell +Connect-Entra -EnvironmentVariable +``` + +This example allows for authentication using environment variables. + +## Parameters + +### -CertificateThumbprint + +Specifies the certificate thumbprint of a digital public key X.509 certificate of a user account that has permission to perform this action. + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientId + +Specifies the application ID of the service principal. + +```yaml +Type: System.String +Parameter Sets: UserParameterSet, IdentityParameterSet +Aliases: AppId, ApplicationId + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: AppId, ApplicationId + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the ID of a tenant. + +If you don't specify this parameter, the account is authenticated with the home tenant. + +You must specify the TenantId parameter to authenticate as a service principal or when using Microsoft account. + +```yaml +Type: System.String +Parameter Sets: UserParameterSet, AppCertificateParameterSet, AppSecretCredentialParameterSet +Aliases: Audience, Tenant + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AccessToken + +Specifies a bearer token for Microsoft Entra service. Access tokens do time out and you have to handle their refresh. + +```yaml +Type: SecureString +Parameter Sets: AccessTokenParameterSet +Aliases: +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientTimeout + +Sets the HTTP client timeout in seconds. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContextScope + +Determines the scope of authentication context. This ContextScope accepts `Process` for the current process, or `CurrentUser` for all sessions started by user. + +```yaml +Type: ContextScope +Accepted values: Process, CurrentUser +Parameter Sets: UserParameterSet, AppCertificateParameterSet, IdentityParameterSet, AppSecretCredentialParameterSet, EnvironmentVariableParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Environment + +The name of the national cloud environment to connect to. By default global cloud is used. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EnvironmentName, NationalCloud +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWelcome + +Hides the welcome message. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scopes + +An array of delegated permissions to consent to. + +```yaml +Type: System.String[] +Parameter Sets: UserParameterSet +Aliases: +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseDeviceCode + +Use device code authentication instead of a browser control. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UserParameterSet +Aliases: UseDeviceAuthentication, DeviceCode, DeviceAuth, Device +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Certificate + +An X.509 certificate supplied during invocation. + +```yaml +Type: X509Certificate2 +Parameter Sets: AppCertificateParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSubjectName + +The subject distinguished name of a certificate. The certificate is retrieved from the current user's certificate store. + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: CertificateSubject, CertificateName +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecretCredential + +The PSCredential object provides the application ID and client secret for service principal credentials. For more information about the PSCredential object, type Get-Help Get-Credential. + +```yaml +Type: PSCredential +Parameter Sets: AppSecretCredentialParameterSet +Aliases: SecretCredential, Credential +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnvironmentVariable + +Allows for authentication using environment variables configured on the host machine. See + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: EnvironmentVariableParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Identity + +Sign-in using a managed identity + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: IdentityParameterSet +Aliases: ManagedIdentity, ManagedServiceIdentity, MSI +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction + +The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break. + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Disconnect-Entra](Disconnect-Entra.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md new file mode 100644 index 0000000000..4cf9324306 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md @@ -0,0 +1,78 @@ +--- +title: Disconnect-Entra +description: This article provides details on the Disconnect-Entra Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Disconnect-Entra + +schema: 2.0.0 +--- + +# Disconnect-Entra + +## Synopsis + +Disconnects the current session from a Microsoft Entra ID tenant. + +## Syntax + +```powershell +Disconnect-Entra + [] +``` + +## Description + +The Disconnect-Entra cmdlet disconnects the current session from a Microsoft Entra ID tenant. + +## Examples + +### Example 1: Disconnect your session from a tenant + +```powershell + Disconnect-Entra +``` + +```output +ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 +TenantId : bbbbcccc-1111-dddd-2222-eeee3333ffff +Scopes : {Agreement.ReadWrite.All, CustomSecAttributeDefinition.ReadWrite.All, TeamMember.Read.All...} +AuthType : AppOnly +TokenCredentialType : ClientCertificate +CertificateThumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00 +CertificateSubjectName : +Account : +AppName : MG_graph_auth +ContextScope : Process +Certificate : +PSHostVersion : 5.1.22621.2506 +ManagedIdentityId : +ClientSecret : +Environment : Global +``` + +This command disconnects your session from a tenant. + +## Parameters + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Connect-Entra](Connect-Entra.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md new file mode 100644 index 0000000000..8ef326b326 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md @@ -0,0 +1,239 @@ +--- +title: Find-EntraPermission +description: This article provides details on the Find-EntraPermission command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Find-EntraPermission + +schema: 2.0.0 +--- + +# Find-EntraPermission + +## Synopsis + +Helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. + +## Syntax + +### Search + +```powershell +Find-EntraPermission + [-SearchString] + [-ExactMatch] + [-PermissionType ] + [-Online] + [-ProgressAction ] + [] +``` + +### All + +```powershell +Find-EntraPermission + [-PermissionType ] + [-Online] + [-All] + [-ProgressAction ] + [] +``` + +## Description + +The `Find-EntraPermission` cmdlet helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. + +## Examples + +### Example 1: Get a list of all Application permissions + +```powershell +Find-EntraPermission application +``` + +```Output +PermissionType: Delegated + +Id Consent Name Description +-- ------- ---- ----------- +c79f8feb-a9db-4090-85f9-90d820caa0eb Admin Application.Read.All Allows the app to read applications and service principals on behalf of the signed-in user. +bdfbf15f-ee85-4955-8675-146e8e5296b5 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. + +PermissionType: Application + +Id Consent Name Description +-- ------- ---- ----------- +9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 Admin Application.Read.All Allows the app to read all applications and service principals without a signed-in user. +1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals without a signed-in user. Does not allow management of consent grants. +18a4783c-866b-4cc7-a460-3d5e5662c884 Admin Application.ReadWrite.OwnedBy Allows the app to create other applications, and fully manage those applications (read, update, update application secrets and delete), without a signed-in user... +``` + +### Example 2. Get a list of permissions for the Read permissions + +```powershell +Find-EntraPermission application.Read | Format-List +``` + +```Output +Id : c79f8feb-a9db-4090-85f9-90d820caa0eb +PermissionType : Delegated +Consent : Admin +Name : Application.Read.All +Description : Allows the app to read applications and service principals on behalf of the signed-in user. + +Id : bdfbf15f-ee85-4955-8675-146e8e5296b5 +PermissionType : Delegated +Consent : Admin +Name : Application.ReadWrite.All +Description : Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. + +Id : 9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 +PermissionType : Application +Consent : Admin +Name : Application.Read.All +Description : Allows the app to read all applications and service principals without a signed-in user. +``` + +### Example 3. Search for permissions with exact match + +```powershell +Find-EntraPermission -SearchString 'User.Read.All' -ExactMatch +``` + +```Output + PermissionType: Delegated + +Id Consent Name Description +-- ------- ---- ----------- +a154be20-db9c-4678-8ab7-66f6cc099a59 Admin User.Read.All Allows the app to read the full set of profile properties, reports, and ma… + + PermissionType: Application + +Id Consent Name Description +-- ------- ---- ----------- +df021288-bdef-4463-88db-98f22de89214 Admin User.Read.All Allows the app to read user profiles without a signed in user. +``` + +This example demonstrates how to search for permissions that exactly match a specified permission name. + +### Example 4. Get all permissions of the specified type + +```powershell +Find-EntraPermission -PermissionType 'Delegated' +``` + +```Output +Id Consent Name Description +-- ------- ---- ----------- +ebfcd32b-babb-40f4-a14b-42706e83bd28 Admin AccessReview.Read.All Allows the app to read access re… +e4aa47b9-9a69-4109-82ed-36ec70d85ff1 Admin AccessReview.ReadWrite.All Allows the app to read, update, … +5af8c3f5-baca-439a-97b0-ea58a435e269 Admin AccessReview.ReadWrite.Membership Allows the app to read, +``` + +This example shows how to get all permissions of a specified type, for example, `Delegated` or `Application` permissions. + +## Parameters + +### -SearchString + +Specifies the filter for the permissions, for example, domain and scope. + +```yaml + +Type: System.String +Required: True +Position: Named +Default value: None +Accept pipeline input: True +Accept wildcard characters: False +``` + +### -All + +Sets if the cmdlet returns all parameters. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExactMatch + +Sets if Search String should be an exact match. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Online + +Use the -Online parameter with -SearchString in Find-MgGraphPermission to fetch the latest permissions from Microsoft Graph before searching. This ensures Find-MgGraphPermission returns accurate results by including any new permissions added for recent APIs. The command uses the existing Microsoft Graph connection established by Connect-MgGraph. If your connection lacks permissions to access this data or if there’s no network connectivity, the command fails. Once updated, Find-MgGraphPermission will continue using the refreshed permission list for future searches, even without the -Online parameter. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionType + +Specifies the type of Permission, for example, Delegated or Application. + +```yaml + +Type: System.String +Required: False +Position: Named +Default value: Any +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction + +Specifics the progra option. + +```yaml +Type: System.Management.Automation.SwitchParameter +Aliases: progra +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md new file mode 100644 index 0000000000..86085f8469 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md @@ -0,0 +1,130 @@ +--- +title: Get-EntraContext +description: This article provides details on the Get-EntraContext command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContext + +schema: 2.0.0 +--- + +# Get-EntraContext + +## Synopsis + +Retrieve information about your current session + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContext + [-ProgressAction ] + [] +``` + +## Description + +`Get-EntraContext` is used to retrieve the details about your current session, which include: + +- ClientID +- TenantID +- Certificate Thumbprint +- Scopes consented to +- AuthType: Delegated or app-only +- AuthProviderType +- CertificateName +- Account +- AppName +- ContextScope +- Certificate +- PSHostVersion +- ClientTimeOut. + +`Get-EntraCurrentSessionInfo` is an alias for `Get-EntraContext`. + +## Examples + +### Example 1: Get the current session + +```powershell +Get-EntraContext +``` + +```Output +ClientId : 11112222-bbbb-3333-cccc-4444dddd5555 +TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee +CertificateThumbprint : +Scopes : {User.ReadWrite.All,...} +AuthType : Delegated +AuthProviderType : InteractiveAuthenticationProvider +CertificateName : +Account : SawyerM@Contoso.com +AppName : Microsoft Graph PowerShell +ContextScope : CurrentUser +Certificate : +PSHostVersion : 5.1.17763.1 +ClientTimeout : 00:05:00 +``` + +This example demonstrates how to retrieve the details of the current session. + +### Example 2: Get the current session scopes + +```powershell +Get-EntraContext | Select -ExpandProperty Scopes +``` + +```Output +AppRoleAssignment.ReadWrite.All +Directory.AccessAsUser.All +EntitlementManagement.ReadWrite.All +Group.ReadWrite.All +openid +Organization.Read.All +profile +RoleManagement.ReadWrite.Directory +User.Read +User.ReadWrite.All +``` + +Retrieves all scopes. + +## Parameters + +### -ProgressAction + +Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md new file mode 100644 index 0000000000..c5cf3a9139 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md @@ -0,0 +1,108 @@ +--- +title: Get-EntraEnvironment +description: This article provides details on the Get-EntraEnvironment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraEnvironment + +schema: 2.0.0 +--- + +# Get-EntraEnvironment + +## Synopsis + +Gets global public Environments. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraEnvironment + [] +``` + +### GetByName + +```powershell +Get-EntraEnvironment + -Name + [] +``` + +## Description + +When you use `Connect-Entra`, you can choose to target other environments. By default, `Connect-Entra` targets the global public cloud. + +## Examples + +### Example 1: Get a list of public cloud environments + +```powershell +Get-EntraEnvironment +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in +USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in +USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in +Germany https://login.microsoftonline.de https://graph.microsoft.de Built-in +Canary https://login.microsoftonline.com https://canary.graph.microsoft.com User-defined +``` + +This command retrieves a list of global public Environments. + +### Example 2: Get a specific environment created + +```powershell +Get-EntraEnvironment -Name 'Global' +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +``` + +This command retrieves an environment with the specified name. + +## Parameters + +### -Name + +Specifies the name of an environment + +```yaml + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraEnvironment](Add-EntraEnvironment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md new file mode 100644 index 0000000000..2017e7aa8a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md @@ -0,0 +1,79 @@ +--- +title: Reset-EntraStrongAuthenticationMethodByUpn +description: This article provides details on the Reset-EntraStrongAuthenticationMethodByUpn command. + + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn + +schema: 2.0.0 +--- + +# Reset-EntraStrongAuthenticationMethodByUpn + +## Synopsis + +Resets the strong authentication method using the User Principal Name (UPN). + +## Syntax + +```powershell +Reset-EntraStrongAuthenticationMethodByUpn + -UserPrincipalName + [] +``` + +## Description + +The `Reset-EntraStrongAuthenticationMethodByUpn` cmdlet resets the strong authentication method by using the User Principal Name (UPN). + +## Examples + +### Example 1: Resets the strong authentication method by using the User Principal Name + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite', 'UserAuthenticationMethod.ReadWrite.All' +Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'SawyerM@contoso.com' +``` + +This example demonstrates how to reset the strong authentication method by using the User Principal Name (UPN). + +- `-UserPrincipalName` parameter specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. + +## Parameters + +### -UserPrincipalName + +Specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md new file mode 100644 index 0000000000..3a375cf615 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md @@ -0,0 +1,73 @@ +--- +title: Revoke-EntraSignedInUserAllRefreshToken +description: This article provides details on the Revoke-EntraSignedInUserAllRefreshToken command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken + +schema: 2.0.0 +--- + +# Revoke-EntraSignedInUserAllRefreshToken + +## Synopsis + +Invalidates the refresh tokens issued to applications for the current user. + +## Syntax + +```powershell +Revoke-EntraSignedInUserAllRefreshToken + [] +``` + +## Description + +The `Revoke-EntraSignedInUserAllRefreshToken` cmdlet invalidates all the refresh tokens issued to applications for a user (and session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. + +The user or an administrator typically performs this operation if the user's device is lost or stolen. This action prevents access to the organization's data on the device by requiring the user to sign in again to all previously consented applications, regardless of the device. + +Note: If the application attempts to redeem a delegated access token for this user using an invalidated refresh token, the application receives an error. When this happens, the application needs to acquire a new refresh token by making a request to the authorized endpoint, which forces the user to sign in. + +After you run this command, a small delay of a few minutes can occur before tokens are revoked. + +## Examples + +### Example 1: Revoke refresh tokens for the current user + +```powershell +Connect-Entra -Scopes 'User.RevokeSessions.All' +Revoke-EntraSignedInUserAllRefreshToken +``` + +```Output +Value +----- +True +``` + +This command revokes the tokens for the current user. + +## Parameters + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Revoke-EntraUserAllRefreshToken](Revoke-EntraUserAllRefreshToken.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md new file mode 100644 index 0000000000..364ce1fa3a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md @@ -0,0 +1,90 @@ +--- +title: Revoke-EntraUserAllRefreshToken +description: This article provides details on the Revoke-EntraUserAllRefreshToken command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken +schema: 2.0.0 +--- + +# Revoke-EntraUserAllRefreshToken + +## Synopsis + +Invalidates the refresh tokens issued to applications for a user. + +## Syntax + +```powershell +Revoke-EntraUserAllRefreshToken + -UserId + [] +``` + +## Description + +The `Revoke-EntraUserAllRefreshToken` cmdlet invalidates the refresh tokens issued to applications for a user. + +The cmdlet also invalidates tokens issued to session cookies in a browser for the user. + +The cmdlet operates by resetting the refreshTokensValidFromDateTime user property to the current date and time. + +This operation is usually performed by the user or an administrator if the user's device is lost or stolen. It blocks access to the organization's data by requiring the user to sign in again to all previously authorized applications, regardless of the device. + +## Examples + +### Example 1: Revoke refresh tokens for a user + +```powershell +Connect-Entra -Scopes 'User.RevokeSessions.All' +Revoke-EntraUserAllRefreshToken -UserId 'SawyerM@contoso.com' +``` + +```Output +Value +----- +True +``` + +This example demonstrates how to revoke the tokens for the specified user. + +- `-UserId` parameter specifies the unique identifier of a user. + +## Parameters + +### -UserId + +Specifies the unique ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Revoke-EntraSignedInUserAllRefreshToken](Revoke-EntraSignedInUserAllRefreshToken.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..7049899b74 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md @@ -0,0 +1,111 @@ +--- +title: Add-EntraAdministrativeUnitMember +description: This article provides details on the Add-EntraAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Add-EntraAdministrativeUnitMember + +## Synopsis + +Adds an administrative unit member. + +## Syntax + +```powershell +Add-EntraAdministrativeUnitMember + -RefObjectId + -AdministrativeUnitId + [] +``` + +## Description + +The `Add-EntraAdministrativeUnitMember` cmdlet adds a Microsoft Entra ID administrative unit member. + +Administrative units enable more granular management of permissions and access, particularly in large organizations or where administrative responsibilities are divided across departments or regions. + +To add a user, group, or device to an administrative unit, the calling principal must be assigned at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add user as an administrative unit member + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraAdministrativeUnitMember @params +``` + +This example shows how to add an administrative unit member. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit ID. You can use the command `Get-EntraUser` to get user ID. + +- `AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `RefObjectId` parameter specifies the ID of the user or group you want to add as a member of the administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of a Microsoft Entra ID administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the unique ID of the specific Microsoft Entra ID object that are as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) + +[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..59f40bdbf9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,139 @@ +--- +title: Add-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Add-EntraCustomSecurityAttributeDefinitionAllowedValue command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue +schema: 2.0.0 +--- + +# Add-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Adds a predefined value for a custom security attribute definition. + +## Syntax + +```powershell +Add-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + -Id + -IsActive + [] +``` + +## Description + +The `Add-EntraCustomSecurityAttributeDefinitionAllowedValue` adds a predefined value for a Microsoft Entra ID custom security attribute definition. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a predefined value for a Microsoft Entra ID custom security attribute definition + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinitionId = (Get-EntraCustomSecurityAttributeDefinition -Id '').Id +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinitionId + Id = 'Alpine' + IsActive = $true +} +Add-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output + +Id IsActive +-- -------- +Alpine True +``` + +This example adds a predefined value to a custom security attribute definition. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use the command `Get-EntraCustomSecurityAttributeDefinition` to get the ID. +- `-Id` parameter specifies the identifier for the predefined value. +- `-IsActive` parameter specifies the predefined value is active or deactivated. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier for a custom security attribute definition in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters aren't. This identifier is case sensitive, can't be changed later, and is required. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsActive + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any another supported directory objects. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Add-EntraCustomSecurityAttributeDefinitionAllowedValues` is an alias for `Add-EntraCustomSecurityAttributeDefinitionAllowedValue`. + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..b0f4c794f1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md @@ -0,0 +1,107 @@ +--- +title: Add-EntraDeviceRegisteredOwner +description: This article provides details on the Add-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Add-EntraDeviceRegisteredOwner + +## Synopsis + +Adds a registered owner for a device. + +## Syntax + +```powershell +Add-EntraDeviceRegisteredOwner + -DeviceId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDeviceRegisteredOwner` cmdlet adds a registered owner for a Microsoft Entra ID device. + +## Examples + +### Example 1: Add a user as a registered user + +```powershell +Connect-Entra -Scopes 'Device.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$Device = Get-EntraDevice -SearchString '' +$params = @{ + DeviceId = $Device.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraDeviceRegisteredOwner @params +``` + +This example shows how to add a registered user to a device. + +- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. + +- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. + +## Parameters + +### -DeviceId + +Specifies the object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Active Directory object to add. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) + +[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..354cbf34c6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md @@ -0,0 +1,112 @@ +--- +title: Add-EntraDeviceRegisteredUser +description: This article provides details on the Add-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Add-EntraDeviceRegisteredUser + +## Synopsis + +Adds a registered user for a device. + +## Syntax + +```powershell +Add-EntraDeviceRegisteredUser + -DeviceId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDeviceRegisteredUser` cmdlet adds a registered user for a Microsoft Entra ID device. + +## Examples + +### Example 1: Add a user as a registered user + +```powershell +Connect-Entra -Scopes 'Device.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$Device = Get-EntraDevice -SearchString '' +$params = @{ + DeviceId = $Device.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraDeviceRegisteredUser @params +``` + +This example shows how to add a registered user to a device. + +- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. + +- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. + +## Parameters + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..d163b40171 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md @@ -0,0 +1,104 @@ +--- +title: Add-EntraDirectoryRoleMember +description: This article provides details on the Add-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Add-EntraDirectoryRoleMember + +## Synopsis + +Adds a member to a directory role. + +## Syntax + +```powershell +Add-EntraDirectoryRoleMember + -DirectoryRoleId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDirectoryRoleMember` cmdlet adds a member to a Microsoft Entra ID role. + +## Examples + +### Example 1: Add a member to a Microsoft Entra ID role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$params = @{ + DirectoryRoleId = '019ea7a2-1613-47c9-81cb-20ba35b1ae48' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Add-EntraDirectoryRoleMember @params +``` + +This example adds a member to a directory role. + +- `DirectoryRoleId` parameter specifies the ID of the directory role to which the member is added. Use the Get-EntraDirectoryRole command to retrieve the details of the directory role. +- `RefObjectId` parameter specifies the ID of Microsoft Entra ID object to assign as owner/manager/member. + +## Parameters + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) + +[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..2919fc8285 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md @@ -0,0 +1,135 @@ +--- +title: Add-EntraScopedRoleMembership +description: This article provides details on the Add-EntraScopedRoleMembership command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Add-EntraScopedRoleMembership + +## Synopsis + +Assign a Microsoft Entra role with an administrative unit scope. + +## Syntax + +```powershell +Add-EntraScopedRoleMembership + -AdministrativeUnitId + [-RoleObjectId ] + [-RoleMemberInfo ] + [] +``` + +## Description + +The `Add-EntraScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership. + +For delegated scenarios, the calling user needs at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add a scoped role membership to an administrative unit + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$User = Get-EntraUser -SearchString 'MarkWood' +$Role = Get-EntraDirectoryRole -Filter "DisplayName eq ''" +$Unit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo +$RoleMember.ObjectId = $User.ObjectId +$params = @{ + AdministrativeUnitId = $Unit.ObjectId + RoleObjectId = $Role.ObjectId + RoleMemberInfo = $RoleMember +} +Add-EntraScopedRoleMembership @params +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +The example shows how to add a user to the specified role within the specified administrative unit. + +- `-AdministrativeUnitId` Parameter specifies the ID of an administrative unit. +- `-RoleObjectId` Parameter specifies the ID of a directory role. +- `-RoleMemberInfo` Parameter specifies a RoleMemberInfo object. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RoleMemberInfo + +Specifies a RoleMemberInfo object. + +```yaml +Type: System.RoleMemberInfo +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleObjectId + +Specifies the ID of a directory role. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) + +[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md new file mode 100644 index 0000000000..da02de22be --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md @@ -0,0 +1,112 @@ +--- +title: Confirm-EntraDomain +description: This article provides details on the Confirm-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Confirm-EntraDomain + +schema: 2.0.0 +--- + +# Confirm-EntraDomain + +## Synopsis + +Validate the ownership of a domain. + +## Syntax + +```powershell +Confirm-EntraDomain + -Name + [-CrossCloudVerificationCode ] + [] +``` + +## Description + +The `Confirm-EntraDomain` cmdlet validates the ownership of a Microsoft Entra ID domain. + +The work or school account needs to belong to at least the **Domain Name Administrator** Microsoft Entra role. + +## Examples + +### Example 1: Confirm the domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Confirm-EntraDomain -Name Contoso.com +``` + +This example verifies a domain and updates its status to `verified`. + +### Example 2: Confirm the domain with a cross cloud verification code + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Confirm-EntraDomain -Name Contoso.com -CrossCloudVerificationCode ms84324896 +``` + +This example confirms a domain in dual federation scenarios. + +## Parameters + +### -Name + +Specifies the name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -CrossCloudVerificationCode + +The cross-cloud domain verification code. + +```yaml +Type: CrossCloudVerificationCodeBody +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md new file mode 100644 index 0000000000..f1d4bcccd1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md @@ -0,0 +1,96 @@ +--- +title: Enable-EntraDirectoryRole +description: This article provides details on the Enable-EntraDirectoryRole command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraDirectoryRole + +schema: 2.0.0 +--- + +# Enable-EntraDirectoryRole + +## Synopsis + +Activates an existing directory role in Microsoft Entra ID. + +## Syntax + +```powershell +Enable-EntraDirectoryRole + [-RoleTemplateId ] + [] +``` + +## Description + +The `Enable-EntraDirectoryRole` cmdlet activates an existing directory role in Microsoft Entra ID. + +The Company Administrators and the default user directory roles (User, Guest User, and Restricted Guest User) are activated by default. To access and assign members to other directory roles, you must first activate them using their corresponding directory role template ID. + +## Examples + +### Example 1: Enable a directory role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$InviterRole = Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Guest Inviter'} +Enable-EntraDirectoryRole -RoleTemplateId $InviterRole.ObjectId +``` + +```Output +DeletedDateTime Id Description DisplayName RoleTemplateId +--------------- -- ----------- ----------- -------------- + b5baa59b-86ab-4053-ac3a-0396116d1924 Guest Inviter has access to invite guest users. Guest Inviter 92ed04bf-c94a-4b82-9729-b799a7a4c178 +``` + +The example shows how to enable the directory role. + +You can use `Get-EntraDirectoryRoleTemplate` to fetch a specific directory role to activate. + +- `RoleTemplateId` parameter specifies the ID of the role template to enable. + +## Parameters + +### -RoleTemplateId + +The ID of the Role template to enable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For additional details see [Activate directoryRole](/graph/api/directoryrole-post-directoryroles). + +## Related Links + +[Get-EntraDirectoryRole](Get-EntraDirectoryRole.md) + +[Get-EntraDirectoryRoleTemplate](Get-EntraDirectoryRoleTemplate.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md new file mode 100644 index 0000000000..9271fdef45 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md @@ -0,0 +1,72 @@ +--- +title: Get-CrossCloudVerificationCode +description: This article provides details on the Get-CrossCloudVerificationCode command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode + +schema: 2.0.0 +--- + +# Get-CrossCloudVerificationCode + +## Synopsis +Gets the verification code used to validate the ownership of the domain in another connected cloud. +Important: Only applies to a verified domain. + +## Syntax + +```powershell +Get-CrossCloudVerificationCode + -Name + [] +``` + +## Description + +## Examples + +### Example 1: Get the cross cloud verification code +```powershell +PS C:\>Get-CrossCloudVerificationCode -Name Contoso.com +``` + +This command returns a string that can be used to enable cross cloud federation scenarios. + +## Parameters + +### -Name +Specifies the name of a domain. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.GetCrossCloudVerificationCodeResponse +## Notes + +## RELATED LINKS \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md new file mode 100644 index 0000000000..d6e6628eca --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md @@ -0,0 +1,117 @@ +--- +title: Get-EntraAccountSku +description: This article provides details on the Get-EntraAccountSku command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAccountSku + +schema: 2.0.0 +--- + +# Get-EntraAccountSku + +## Synopsis + +Retrieves all the SKUs for a company. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAccountSku + [] +``` + +### GetById + +```powershell +Get-EntraAccountSku + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraAccountSku` retrieves the list of commercial subscriptions acquired by an organization. + +For a list of license names in the Microsoft Entra or Microsoft 365 admin centers and their corresponding Microsoft Graph `skuId` and `skuPartNumber` properties, refer to the [mapping information](https://learn.microsoft.com/entra/identity/users/licensing-service-plan-reference). + +## Examples + +### Example 1: Gets a list of SKUs + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraAccountSku +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… +ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… +dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… +``` + +This command returns a list of SKUs. + +### Example 2: Gets a list of SKUs by TenantId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraAccountSku -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… +ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… +dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… +``` + +This command returns a list of SKUs for a specified tenant. + +- `-TenantId` parameter specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this isn't provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..0c85fb6da1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md @@ -0,0 +1,237 @@ +--- +title: Get-EntraAdministrativeUnit +description: This article provides details on the Get-EntraAdministrativeUnit command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit +schema: 2.0.0 +--- + +# Get-EntraAdministrativeUnit + +## Synopsis + +Gets an administrative unit. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAdministrativeUnit + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraAdministrativeUnit + -AdministrativeUnitId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraAdministrativeUnit` cmdlet gets a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameter to get a specific administrative unit. + +## Examples + +### Example 1: Get all administrative units + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName + cccccccc-2222-3333-4444-dddddddddddd testdemo test1 + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 +``` + +This command gets all the administrative units. + +### Example 2: Get all administrative units using '-All' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -All +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName + cccccccc-2222-3333-4444-dddddddddddd testdemo test1 + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 +``` + +This command gets all the administrative units. + +### Example 3: Get a specific administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -AdministrativeUnitId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName +``` + +This example returns the details of the specified administrative unit. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 4: Get administrative units filter by display name + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -Filter "DisplayName eq 'DAU-Test'" +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test +``` + +This example list of administrative units containing display name with the specified name. + +### Example 5: Get top one administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -Top 1 +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test +``` + +This example returns the specified top administrative units. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter filters which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..99c4fe82d9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md @@ -0,0 +1,193 @@ +--- +title: Get-EntraAdministrativeUnitMember +description: This article provides details on the Get-EntraAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Get-EntraAdministrativeUnitMember + +## Synopsis + +Gets a member of an administrative unit. + +## Syntax + +```powershell +Get-EntraAdministrativeUnitMember + -AdministrativeUnitId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraAdministrativeUnitMember` cmdlet gets a member of a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameters to retrieve an administrative unit member. + +In delegated scenarios with work or school accounts, the signed-in user must either be a member user or be assigned a supported Microsoft Entra role, or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: + +- Directory Readers: Read basic properties on administrative units +- Global Reader: Read all properties of administrative units, including members +- Privileged Role Administrator: Create and manage administrative units (including members) + +## Examples + +### Example 1: Get an administrative unit member by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example returns the list of administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 2: Get all administrative unit members by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example returns the list of all administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 3: Get top three administrative unit members by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example returns top three administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) + +[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md new file mode 100644 index 0000000000..7b235ab88d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md @@ -0,0 +1,143 @@ +--- +title: Get-EntraAttributeSet +description: This article provides details on the Get-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAttributeSet + +schema: 2.0.0 +--- + +# Get-EntraAttributeSet + +## Synopsis + +Gets a list of attribute sets. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAttributeSet + [] +``` + +### GetById + +```powershell +Get-EntraAttributeSet + -AttributeSetId + [] +``` + +## Description + +The `Get-EntraAttributeSet` cmdlet gets a list of Microsoft Entra ID attribute sets. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The supported roles for this operation are: + +- Attribute Assignment Reader +- Attribute Definition Reader +- Attribute Assignment Administrator +- Attribute Definition Administrator + +By default, other administrator roles cannot read, define, or assign custom security attributes. + +## Examples + +### Example 1: Get an all attribute sets + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraAttributeSet +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Engineering Attributes for cloud engineering team 25 +Contoso Attributes for Contoso 25 +``` + +This example returns all attribute sets. + +### Example 2: Get an attribute sets + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraAttributeSet -AttributeSetId 'Testing' +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Testing Attributes for engineering team 10 +``` + +This example demonstrates how to retrieve an attribute set by Id. + +- `AttributeSetId` parameter specifies the unique identifier for the attribute set within a tenant. + +## Parameters + +### -AttributeSetId + +Unique identifier for the attribute set within a tenant. + +This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraAttributeSet](New-EntraAttributeSet.md) + +[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md new file mode 100644 index 0000000000..fb0bcb0cb5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md @@ -0,0 +1,236 @@ +--- +title: Get-EntraContact +description: This article provides details on the Get-EntraContact command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContact + +schema: 2.0.0 +--- + +# Get-EntraContact + +## Synopsis + +Gets a contact from Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContact + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraContact + -OrgContactId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContact` cmdlet gets a contact from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve all contact objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves all contact objects in the directory. + +### Example 2: Retrieve specific contact object in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -OrgContactId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +``` + +This example retrieves specified contact in the directory. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 3: Retrieve all contacts objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -All +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves all the contacts in the directory. + +### Example 4: Retrieve top two contacts objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -Top 2 +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +``` + +This example retrieves top two contacts in the directory. + +### Example 5: Retrieve all contacts objects in the directory filter by DisplayName + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves contacts having the specified display name. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraContact](Remove-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md new file mode 100644 index 0000000000..5ba96a392d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md @@ -0,0 +1,159 @@ +--- +title: Get-EntraContactDirectReport +description: This article provides details on the Get-EntraContactDirectReport command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactDirectReport + +schema: 2.0.0 +--- + +# Get-EntraContactDirectReport + +## Synopsis + +Get the direct reports for a contact. + +## Syntax + +```powershell +Get-EntraContactDirectReport + -OrgContactId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactDirectReport` cmdlet gets the direct reports for a contact. + +## Examples + +### Example 1: Get the direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId +``` + +This example shows how to retrieve direct reports for an organizational contact. + +You can use the command `Get-EntraBetaContact` to get organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 2: Get all direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -All +``` + +This example shows how to retrieve all direct reports for an organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 3: Get top two direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -Top 2 +``` + +This example shows how to retrieve top two direct reports for an organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md new file mode 100644 index 0000000000..9aba156048 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md @@ -0,0 +1,98 @@ +--- +title: Get-EntraContactManager +description: This article provides details on the Get-EntraContactManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactManager + +schema: 2.0.0 +--- + +# Get-EntraContactManager + +## Synopsis + +Gets the manager of a contact. + +## Syntax + +```powershell +Get-EntraContactManager + -OrgContactId + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactManager` cmdlet gets the manager of a contact in Microsoft Entra ID. + +## Examples + +### Example 1: Get the manager of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Top 1 +Get-EntraContactManager -OrgContactId $Contact.ObjectId +``` + +The example demonstrates how to retrieve the manager of a contact. You can use the command `Get-EntraContact` to get organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +## Parameters + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: OrgContactId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md new file mode 100644 index 0000000000..e09631eec8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraContactMembership +description: This article provides details on the Get-EntraContactMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactMembership + +schema: 2.0.0 +--- + +# Get-EntraContactMembership + +## Synopsis + +Get a contact membership. + +## Syntax + +```powershell +Get-EntraContactMembership + -OrgContactId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactMembership` cmdlet gets a contact membership in Microsoft Entra ID. + +This command is useful to administrators who need to understand which groups, roles, or administrative units a particular contact belongs to. This can be important for troubleshooting access issues, auditing memberships, and ensuring that contact memberships are correctly configured. + +## Examples + +### Example 1: Get the memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This command gets all the memberships for specified contact. + +### Example 2: Get all memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This command gets all the memberships for specified contact. + +### Example 3: Get top two memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +``` + +This command gets top two memberships for specified contact. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md new file mode 100644 index 0000000000..ab173d765b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md @@ -0,0 +1,150 @@ +--- +title: Get-EntraContactThumbnailPhoto +description: This article provides details on the Get-EntraContactThumbnailPhoto command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto + +schema: 2.0.0 +--- + +# Get-EntraContactThumbnailPhoto + +## Synopsis + +Retrieves the thumbnail photo of a contact. + +## Syntax + +```powershell +Get-EntraContactThumbnailPhoto + -ObjectId + [-FilePath ] + [-FileName ] + [-View ] + [] +``` + +## Description + +Retrieves the thumbnail photo of a contact. + +## Examples + +### Example 1: Get the memberships of a contact + +```powershell +Connect-Entra -Scopes 'Contacts.Read' +Get-EntraContactThumbnailPhoto -ObjectId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```output +Tag : +PhysicalDimension : {Width=279, Height=390} +Size : {Width=279, Height=390} +Width : 279 +Height : 390 +HorizontalResolution : 96 +VerticalResolution : 96 +Flags : 77840 +RawFormat : [ImageFormat: aaaa0000-bb11-2222-33cc-444444dddddd] +PixelFormat : Format24bppRgb +Palette : System.Drawing.Imaging.ColorPalette +FrameDimensionsList : {eeee4444-ff55-6666-77aa-888888bbbbbb} +PropertyIdList : {274, 305, 306, 36867...} +PropertyItems : {274, 305, 306, 36867...} +``` + +This example retrieves the thumbnail photo of the contact object specified with the object ID parameter. + +## Parameters + +### -FileName + +When provided, the cmdlet writes a copy of the thumbnail photo to this filename. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FilePath + +When provided, the cmdlet writes a copy of the thumbnail photo to this file path using a random filename. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +The object ID of the contact for which the thumbnail photo is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -View + +If this parameter value is set to $True, display the retrieved thumbnail photo in a new window. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Boolean + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md new file mode 100644 index 0000000000..c65dae7c2b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md @@ -0,0 +1,195 @@ +--- +title: Get-EntraContract +description: This article provides details on the Get-EntraContract command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContract + +schema: 2.0.0 +--- + +# Get-EntraContract + +## Synopsis + +Gets a contract. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContract + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraContract + -ContractId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContract` cmdlet gets a contract information associated to a partner tenant. + +The contract object contains the following attributes: + +- `contractType` - type of the contract. + +Possible values are: + +1. SyndicationPartner - indicates a partner that exclusively resells and manages O365 and Intune for this customer. +They resell and support their customers. +1. BreadthPartner - indicates that the partner has the ability to provide administrative support for this customer. +However the partner isn't allowed to resell to the customer. +1. ResellerPartner - indicates a partner that is similar to a syndication partner, except that it doesn't have exclusive access to a tenant. In the syndication case, the customer can't buy additional direct subscriptions from Microsoft or from other partners. + +- `customerContextId` - unique identifier for the customer tenant referenced by this partnership. + +Corresponds to the ObjectId property of the customer tenant's TenantDetail object. + +- `defaultDomainName` - a copy of the customer tenant's default domain name. +The copy is made when the partnership with the customer is established. +It isn't automatically updated if the customer tenant's default domain name changes. + +- `deletionTimestamp` - this property isn't valid for contracts and always returns null. + +- `displayName` - a copy of the customer tenant's display name. +The copy is made when the partnership with the customer is established. +It isn't automatically updated if the customer tenant's display name changes. + +- `objectType` - a string that identifies the object type. The value is always `Contract`. + +- `ContractId` - the unique identifier for the partnership. + +## Examples + +### Example 1: Get all contracts in the directory + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraContract +``` + +This command gets all contracts in the Microsoft Entra ID. + +### Example 2: Get top two contracts in the directory + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraContract -Top 2 +``` + +This command gets top two contracts in the Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ContractId + +Specifies the ID of a contract. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..ec88ceccfd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraCustomSecurityAttributeDefinition +description: This article provides details on the Get-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition +schema: 2.0.0 +--- + +# Get-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Gets a list of custom security attribute definitions. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraCustomSecurityAttributeDefinition + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraCustomSecurityAttributeDefinition + -Id + [-Property ] + [] +``` + +## Description + +Gets a list of Microsoft Entra ID custom security attribute definitions. Specify `Id` parameter to get a list of custom security attribute definitions. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following privileged roles are supported for this operation: + +- Attribute Assignment Reader +- Attribute Definition Reader +- Attribute Assignment Administrator +- Attribute Definition Administrator + +## Examples + +### Example 1: Get a list of all custom security attribute definitions + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraCustomSecurityAttributeDefinition +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Engineering_newvalue Engineering New Eng Value True True NewValue Available String False +Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False +``` + +This example returns all custom security attribute definitions. + +### Example 2: Get a specific custom security attribute definition + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_ProjectDate' +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False +``` + + This example returns a specific custom security attribute definition. + +- `Id` parameter specifies the custom security attribute definition object ID. + +## Parameters + +### -Id + +The unique identifier of a Microsoft Entra ID custom security attribute definition object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) + +[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..e043e38f4b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,187 @@ +--- +title: Get-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Get-EntraCustomSecurityAttributeDefinitionAllowedValue command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue +schema: 2.0.0 +--- + +# Get-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Gets the predefined value for a custom security attribute definition. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + [-Filter ] + [] +``` + +### GetById + +```powershell +Get-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + -Id + [] +``` + +## Description + +The `Get-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdley gets the predefined value for a Microsoft Entra ID custom security attribute definition. Specify `CustomSecurityAttributeDefinitionId` parameter to get the predefined value custom security attribute definition. + +The signed-in user must be assigned one of the following directory roles: + +- Attribute Definition Reader +- Attribute Definition Administrator + +## Examples + +### Example 1: Get all predefined values + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $CustomSecurityAttributeDefinition.Id +``` + +```Output +Id IsActive +-- -------- +Apline True +``` + +This example retrieves an all predefined values. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. + +### Example 2: Get predefined value with ID parameter + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id + Id = 'Alpine' +} +Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +id isActive +-- -------- +Apline True +``` + +This example retrieves a specific predefined value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. +- `-Id` parameter specifies the ID of Microsoft Entra ID Object. + +### Example 3: Get predefined value with Filter parameter + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id + Filter = "Id eq 'Apline'" +} +Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +id isActive +-- -------- +Apline True +``` + +This example Get a predefined value with Filter. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier of a custom security attribute definition in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Filter items by property values. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters are not. This identifier is case sensitive, cannot be changed later, and is required. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..099bb99475 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md @@ -0,0 +1,122 @@ +--- +title: Get-EntraDeletedDirectoryObject +description: This article provides details on the Get-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Get-EntraDeletedDirectoryObject + +## Synopsis + +Retrieves a soft deleted directory object from the directory. + +## Syntax + +```powershell +Get-EntraDeletedDirectoryObject + -DirectoryObjectId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeletedDirectoryObject` cmdlet retrieves a soft deleted directory object from the directory. +Note that soft delete for groups is currently only implemented for Unified Groups (also known as +Office 365 Groups). + +## Examples + +### Example 1: Retrieve a deleted directory object. + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' +Get-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 2/2/2024 5:33:56 AM +``` + +This example shows how to retrieve the deleted directory object from the directory. + +- `-DirectoryObjectId` parameter specifies the Id of the directory object to retrieve. + +### Example 2: Retrieve a deleted directory object with more details. + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' +Get-EntraDeletedDirectoryObject -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' | Format-Table -Property Id, displayName, '@odata.type' -AutoSize +``` + +```Output +Id displayName @odata.type +-- ----------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Entra PowerShell App #microsoft.graph.application +``` + +This example shows how to retrieve the deleted directory object details from the directory. + +- `-Id` parameter specifies the Id of the directory object to retrieve. + +## Parameters + +### -DirectoryObjectId + +The Id of the directory object to retrieve. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md new file mode 100644 index 0000000000..9d6749d3d4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md @@ -0,0 +1,271 @@ +--- +title: Get-EntraDevice +description: This article provides details on the Get-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDevice + +schema: 2.0.0 +--- + +# Get-EntraDevice + +## Synopsis + +Gets a device from Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDevice + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDevice + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDevice + -DeviceId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDevice` cmdlet gets a device from Microsoft Entra ID. Specify the `DeviceId` parameter to get a specific device. + +## Examples + +### Example 1: Get a device by ID + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example shows how to retrieve a device using its ID. + +### Example 2: Get all devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData + cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve all devices from Microsoft Entra ID. + +### Example 3: Get top two devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Top 2 +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData + cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve top two devices from Microsoft Entra ID. + +### Example 4: Get a device by display name + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve device using the display name. + +### Example 5: Get a device using display name + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Filter "startsWith(DisplayName,'Woodgrove')" +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve all the devices whose display name starts with the word `Woodgrove`. + +### Example 6: Search among retrieved devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -SearchString 'DESKTOP' +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example shows how to retrieve devices containing the word 'DESKTOP.' + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies the OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraDevice](New-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..1149f5438e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md @@ -0,0 +1,196 @@ +--- +title: Get-EntraDeviceRegisteredOwner +description: This article provides details on the Get-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Get-EntraDeviceRegisteredOwner + +## Synopsis + +Gets the registered owner of a device. + +## Syntax + +```powershell +Get-EntraDeviceRegisteredOwner + -DeviceId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeviceRegisteredOwner` cmdlet gets the registered owner of a device in Microsoft Entra ID. Specify `DeviceId` parameter gets the registered owner of a device. + +## Examples + +### Example 1: Retrieve the registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +$DevId = (Get-EntraDevice -Top 1).ObjectId +Get-EntraDeviceRegisteredOwner -DeviceId $DevId +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example shows how to find the registered owner of a device.. + +- `-DeviceId` parameter specifies the device's ID. + +### Example 2: Retrieve the registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command gets the registered owner of a device. + +- `-DeviceId` parameter specifies the device's ID + +### Example 3: Retrieve all the registered owners of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command retrieves all the registered owners of a device. + +- `-DeviceId` parameter specifies the device's ID. + +### Example 4: Retrieve top one registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command retrieves all the registered owners of a device. + +- `-DeviceId` parameter specifies the device's ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) + +[Get-EntraDevice](Get-EntraDevice.md) + +[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..810e5ec600 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md @@ -0,0 +1,180 @@ +--- +title: Get-EntraDeviceRegisteredUser +description: This article provides details on the Get-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Get-EntraDeviceRegisteredUser + +## Synopsis + +Retrieve a list of users that are registered users of the device. + +## Syntax + +```powershell +Get-EntraDeviceRegisteredUser + -DeviceId + [-All ] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeviceRegisteredUser` cmdlet gets a registered user for a Microsoft Entra ID device. Specify `DeviceId` parameter to get a registered user for a Microsoft Entra ID device. + +## Examples + +### Example 1: Retrieve the registered user of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +$DevId = (Get-EntraDevice -Top 1).ObjectId +Get-EntraDeviceRegisteredUser -DeviceId $DevId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +``` + +This example demonstrates how to retrieve registered user for a specific Microsoft Entra ID device. + +### Example 2: Get all registered users of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +``` + +This example demonstrates how to retrieve all registered users for a specified device. + +- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. + +### Example 3: Get top two registered users of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to retrieve top two registered users for the specified device. + +- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies an object ID of a device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) + +[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md new file mode 100644 index 0000000000..a771858b4b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraDirSyncConfiguration +description: This article provides details on the Get-EntraDirSyncConfiguration command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration + +schema: 2.0.0 +--- + +# Get-EntraDirSyncConfiguration + +## Synopsis + +Gets the directory synchronization settings. + +## Syntax + +```powershell +Get-EntraDirSyncConfiguration + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDirSyncConfiguration` cmdlet gets the directory synchronization settings. + +For delegated scenarios, the user needs to be assigned the Global Administrator role. + +## Examples + +### Example 1: Get directory synchronization settings + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Get-EntraDirSyncConfiguration +``` + +```Output +AccidentalDeletionThreshold DeletionPreventionType +--------------------------- ---------------------- + 500 enabledForCount +``` + +This example gets directory synchronization settings. + +### Example 2: Get directory synchronization settings by TenantId + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Get-EntraDirSyncConfiguration -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' +``` + +```Output +AccidentalDeletionThreshold DeletionPreventionType +--------------------------- ---------------------- + 500 enabledForCount +``` + +This example gets directory synchronization settings by TenantId. + +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant for the operation. If TenantId isn't provided, it defaults to the current user's tenant. This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +## Notes + +## Related Links + +[Set-EntraDirSyncConfiguration](Set-EntraDirSyncConfiguration.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md new file mode 100644 index 0000000000..6b0d0dcab6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md @@ -0,0 +1,153 @@ +--- +title: Get-EntraDirSyncFeature +description: This article provides details on the Get-EntraDirSyncFeature command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncFeature + +schema: 2.0.0 +--- + +# Get-EntraDirSyncFeature + +## Synopsis + +Checks the status of directory synchronization features for a tenant. + +## Syntax + +```powershell +Get-EntraDirSyncFeature + [-TenantId ] + [-Feature ] + [] +``` + +## Description + +The `Get-EntraDirSyncFeature` cmdlet checks the status of directory synchronization features for a tenant. + +Some of the features that can be used with this cmdlet include: + +- **DeviceWriteback** +- **DirectoryExtensions** +- **DuplicateProxyAddressResiliency** +- **DuplicateUPNResiliency** +- **EnableSoftMatchOnUpn** +- **PasswordSync** +- **SynchronizeUpnForManagedUsers** +- **UnifiedGroupWriteback** +- **UserWriteback** + +The cmdlet can be run without specifying any features, in which case it returns a list of all features and their enabled or disabled status. + +For delegated scenarios, the user needs to be assigned the Global Administrator role. + +## Examples + +### Example 1: Return a list of all directory synchronization features + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' +Get-EntraDirSyncFeature +``` + +```Output +Enabled DirSyncFeature +------- -------------- + False BlockCloudObjectTakeoverThroughHardMatch + False BlockSoftMatch + False BypassDirSyncOverrides + False CloudPasswordPolicyForPasswordSyncedUsers + False ConcurrentCredentialUpdate + True ConcurrentOrgIdProvisioning + False DeviceWriteback + False DirectoryExtensions + False FopeConflictResolution + False GroupWriteBack + False PasswordSync + False PasswordWriteback + True QuarantineUponProxyAddressesConflict + True QuarantineUponUpnConflict + True SoftMatchOnUpn + True SynchronizeUpnForManagedUsers + False UnifiedGroupWriteback + False UserForcePasswordChangeOnLogon + False UserWriteback +``` + +This example gets a list of all directory synchronization features and shows if they are enabled (True) or disabled (False). + +### Example 2: Return the PasswordSync feature status + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' +Get-EntraDirSyncFeature -Feature 'PasswordSync' +``` + +```Output +Enabled DirSyncFeature +------- -------------- + False PasswordSync +``` + +This example shows if PasswordSync is enabled (True) or disabled (False) for the tenant. + +- `-Feature` specifies the directory synchronization feature to check the status of. + +## Parameters + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Feature + +The directory synchronization feature to check the status of. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraDirSyncFeature](Set-EntraDirSyncFeature.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md new file mode 100644 index 0000000000..4bbd98ed43 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md @@ -0,0 +1,104 @@ +--- +title: Get-EntraDirectoryObjectOnPremisesProvisioningError +description: This article provides details on the Get-EntraDirectoryObjectOnPremisesProvisioningError command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError + +schema: 2.0.0 +--- + +# Get-EntraDirectoryObjectOnPremisesProvisioningError + +## Synopsis + +Returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +## Syntax + +```powershell +Get-EntraDirectoryObjectOnPremisesProvisioningError + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDirectoryObjectOnPremisesProvisioningError` returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +## Examples + +### Example 1: Return whether Microsoft Entra ID has objects with DirSync provisioning error + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' + +Get-EntraDirectoryObjectOnPremisesProvisioningError +``` + +```Output +False +``` + +This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +### Example 2: Return whether Microsoft Entra ID has objects with DirSync provisioning error + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' + +Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId '0000aaaa-11bb-cccc-dd22-eeeeee333333' +``` + +```Output +False +``` + +This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. + +If this isn't provided then the value defaults to the tenant of the current user. + +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md new file mode 100644 index 0000000000..aac3e91b9d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md @@ -0,0 +1,181 @@ +--- +title: Get-EntraDirectoryRole +description: This article provides details on the Get-EntraDirectoryRole command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRole + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRole + +## Synopsis + +Gets a directory role. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRole + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRole + -DirectoryRoleId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRole` cmdlet gets a directory role from Microsoft Entra ID. Specify `ObjectId` parameter to get a directory role. + +## Examples + +### Example 1: Get a directory role by ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -DirectoryRoleId '019ea7a2-1613-47c9-81cb-20ba35b1ae48' +``` + +```Output +ObjectId DisplayName Description +-------- ----------- ----------- +019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. +``` + +This command gets the specified directory role. + +- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. + +### Example 2: Get all directory roles + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Perform all migration functionality to migrate content to Microsoft 365 usin... + aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb Can manage all aspects of users and groups, including resetting passwords fo... + bbbbbbbb-7777-8888-9999-cccccccccccc Can read basic directory information. Commonly used to grant directory read ... + cccccccc-8888-9999-0000-dddddddddddd Can read and write basic directory information. For granting access to appli... +``` + +This command gets all the directory roles. + +### Example 3: Get a directory role filter by ObjectId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -Filter "ObjectId eq '019ea7a2-1613-47c9-81cb-20ba35b1ae48'" +``` + +```Output +ObjectId DisplayName Description +-------- ----------- ----------- +019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. +``` + +This command gets the directory role by ObjectId. + +- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. + +### Example 4: Get a directory role filter by displayName + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -Filter "displayName eq 'Helpdesk Administrator'" +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 56644e28-bf8b-4dad-8595-24448ffa3cb8 Perform all migration functionality to migrate content to Microsoft 365 usin... +``` + +This command gets the directory role by display name. + +## Parameters + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Enable-EntraDirectoryRole](Enable-EntraDirectoryRole.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..3238d3cb09 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraDirectoryRoleMember +description: This article provides details on the Get-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleMember + +## Synopsis + +Gets members of a directory role. + +## Syntax + +```powershell +Get-EntraDirectoryRoleMember + -DirectoryRoleId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleMember` cmdlet retrieves the members of a directory role in Microsoft Entra ID. To obtain the members of a specific directory role, specify the `DirectoryRoleId`. Use the `Get-EntraDirectoryRole` cmdlet to get the `DirectoryRoleId` value. + +## Examples + +### Example 1: Get members by role ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleMember -DirectoryRoleId '1d73e796-aac5-4b3a-b7e7-74a3d1926a85' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This example retrieves the members of the specified role. + +- `-DirectoryRoleId` parameter specifies directory role ID. + +## Parameters + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) + +[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md new file mode 100644 index 0000000000..6ea213a233 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md @@ -0,0 +1,101 @@ +--- +title: Get-EntraDirectoryRoleTemplate +description: This article provides details on the Get-EntraDirectoryRoleTemplate command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleTemplate + +## Synopsis + +Gets directory role templates. + +## Syntax + +```powershell +Get-EntraDirectoryRoleTemplate + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleTemplate` cmdlet gets directory role templates in Microsoft Entra ID. + +## Examples + +### Example 1: Get role templates + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleTemplate +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identities. + 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. + 2af84b1e-32c8-42b7-82bc-daa82404023b Default role for guest users with restricted access. Can read a limited set of directory information. + 95e79109-95c0-4d8e-aee3-d01accf2d47b Can invite guest users independent of the 'members can invite guests' setting. + fe930be7-5e62-47db-91af-98c3a49a38b1 Can manage all aspects of users and groups, including resetting passwords for limited admins. +``` + +This example retrieves the role templates in Microsoft Entra ID. + +### Example 2: Get a specific role template + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Helpdesk Administrator'} +``` + +```Output +DeletedDateTime Id Description DisplayName +--------------- -- ----------- ----------- + 729827e3-9c14-49f7-bb1b-9608f156bbb8 Can reset passwords for non-administrators and Helpdesk Administrators. Helpdesk Administrator +``` + +This example retrieves a Helpdesk role template. + +## Parameters + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md new file mode 100644 index 0000000000..6a9d0258f3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md @@ -0,0 +1,147 @@ +--- +title: Get-EntraDomain +description: This article provides details on the Get-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomain + +schema: 2.0.0 +--- + +# Get-EntraDomain + +## Synopsis + +Gets a domain. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDomain + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDomain + -Name + [-Property ] + [] +``` + +## Description + +The `Get-EntraDomain` cmdlet gets a domain in Microsoft Entra ID. + +The work or school account must be assigned to at least one of the following Microsoft Entra roles: + +- User Administrator +- Helpdesk Administrator +- Service Support Administrator +- Directory Readers +- AdHoc License Administrator +- Application Administrator +- Security Reader +- Security Administrator +- Privileged Role Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Get a list of Domains that are created + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomain +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +test33.com Managed True False False False False 15 +test44.com Managed True False False False False 17 +``` + +This command retrieves a list of domains. + +### Example 2: Get a specific Domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomain -Name TEST22.com +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +``` + +This command retrieves a domain with the specified name. + +## Parameters + +### -Name + +Specifies the name of a domain. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md new file mode 100644 index 0000000000..2381a779d4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md @@ -0,0 +1,129 @@ +--- +title: Get-EntraDomainFederationSettings +description: This article provides details on the Get-EntraDomainFederationSettings command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings + +schema: 2.0.0 +--- + +# Get-EntraDomainFederationSettings + +## Synopsis + +Retrieves settings for a federated domain. + +## Syntax + +```powershell +Get-EntraDomainFederationSettings + -DomainName + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDomainFederationSettings` cmdlet gets key settings from Microsoft Entra ID. + +Use the `Get-EntraFederationProperty` cmdlet to get settings for both Microsoft Entra ID and the Entra ID Federation Services server. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Global Reader +- Security Reader +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Get federation settings for specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainFederationSettings -DomainName 'contoso.com' +``` + +This command gets federation settings for specified domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. + +## Parameters + +### -DomainName + +The fully qualified domain name to retrieve. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this isn't provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DomainFederationSettings + +### This cmdlet returns the following settings + +### ActiveLogOnUri + +### FederationBrandName + +### IssuerUri + +### LogOffUri + +### MetadataExchangeUri + +### NextSigningCertificate + +### PassiveLogOnUri + +### SigningCertificate + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md new file mode 100644 index 0000000000..d6e7a88bf0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md @@ -0,0 +1,113 @@ +--- +title: Get-EntraDomainNameReference +description: This article provides details on the Get-EntraDomainNameReference command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainNameReference + +schema: 2.0.0 +--- + +# Get-EntraDomainNameReference + +## Synopsis + +Retrieves the objects that are referenced by a given domain name. + +## Syntax + +```powershell +Get-EntraDomainNameReference + -Name + [-Property ] + [] +``` + +## Description + +The `Get-EntraDomainNameReference` cmdlet retrieves the objects that are referenced with a given domain name. Specify `Name` parameter retrieve the objects. + +The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. + +## Examples + +### Example 1: Retrieve the domain name reference objects for a domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainNameReference -Name contoso.com +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example shows how to retrieve the domain name reference objects for a domain that is specified through the -Name parameter. + +- `-Name` parameter specifies the name of the domain name for which the referenced objects are retrieved. + +## Parameters + +### -Name + +The name of the domain name for which the referenced objects are retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md new file mode 100644 index 0000000000..df14887de6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md @@ -0,0 +1,112 @@ +--- +title: Get-EntraDomainServiceConfigurationRecord +description: This article provides details on the Get-EntraDomainServiceConfigurationRecord command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord + +schema: 2.0.0 +--- + +# Get-EntraDomainServiceConfigurationRecord + +## Synopsis + +Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. + +## Syntax + +```powershell +Get-EntraDomainServiceConfigurationRecord + -Name + [-Property ] + [] +``` + +## Description + +Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. + +After you have successfully verified the ownership of a domain and you have indicated what services you plan to use with the domain, you can request Microsoft Entra ID to return you a set of DNS records which you need to add to the zone file of the domain so that the services can work properly with your domain. + +## Examples + +### Example 1: Retrieve domain service configuration records by Name + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainServiceConfigurationRecord -Name 'test.mail.contoso.com' +``` + +```Output +Id IsOptional Label RecordType SupportedService Ttl +-- ---------- ----- ---------- ---------------- --- +aaaa0000-bb11-2222-33cc-444444dddddd False test.mail.contoso.com Mx Email 3600 +bbbb1111-cc22-3333-44dd-555555eeeeee False test.mail.contoso.com Txt Email 3600 +cccc2222-dd33-4444-55ee-666666ffffff False autodiscover.test.mail.contoso.com CName Email 3600 +dddd3333-ee44-5555-66ff-777777aaaaaa False msoid.test.mail.contoso.com CName OrgIdAuthentication 3600 +eeee4444-ff55-6666-77aa-888888bbbbbb False enterpriseregistration.test.mail.contoso.com CName Intune 3600 +ffff5555-aa66-7777-88bb-999999cccccc False enterpriseenrollment.test.mail.contoso.com CName Intune 3600 +``` + +This example shows how to retrieve the Domain service configuration records for a domain with the given name. + +- `-Name` parameter specifies domain name for which the domain service configuration records are to be retrieved. + +## Parameters + +### -Name + +The name of the domain for which the domain service configuration records are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md new file mode 100644 index 0000000000..cd3821fc66 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md @@ -0,0 +1,112 @@ +--- +title: Get-EntraDomainVerificationDnsRecord +description: This article provides details on the Get-EntraDomainVerificationDnsRecord command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord + +schema: 2.0.0 +--- + +# Get-EntraDomainVerificationDnsRecord + +## Synopsis + +Retrieve the domain verification DNS record for a domain. + +## Syntax + +```powershell +Get-EntraDomainVerificationDnsRecord + -Name + [-Property ] + [] +``` + +## Description + +Gets the domain's verification records from the `verificationDnsRecords` navigation property. + +You can't use the domain with your Microsoft Entra ID tenant until you have successfully verified that you own the domain. + +To verify the ownership of the domain, you need to first retrieve a set of domain verification records that you need to add to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. + +Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + +The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. + +## Examples + +### Example 1: Retrieve the domain verification DNS record + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainVerificationDnsRecord -Name mail.contoso.com +``` + +```Output +Id IsOptional Label RecordType SupportedService Ttl +-- ---------- ----- ---------- ---------------- --- +aaaa0000-bb11-2222-33cc-444444dddddd False mail.contoso.com Txt Email 3600 +bbbb1111-cc22-3333-44dd-555555eeeeee False mail.contoso.com Mx Email 3600 +``` + +This example shows how to retrieve the Domain verification DNS records for a domain with the given name. + +## Parameters + +### -Name + +The domain name for which the domain verification Domain Name System (DNS) records are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md new file mode 100644 index 0000000000..0b48a4f8c1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md @@ -0,0 +1,97 @@ +--- +title: Get-EntraExtensionProperty +description: This article provides details on the Get-EntraExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraExtensionProperty + +schema: 2.0.0 +--- + +# Get-EntraExtensionProperty + +## Synopsis + +Gets extension properties registered with Microsoft Entra ID. + +## Syntax + +```powershell +Get-EntraExtensionProperty + [-IsSyncedFromOnPremises ] + [] +``` + +## Description + +The Get-EntraExtensionProperty cmdlet gets a collection that contains the extension properties registered with Microsoft Entra ID through Microsoft Entra ID Connect. + +You can get extension properties that are synced with on-premises Microsoft Entra ID that aren't synced with on-premises Microsoft Entra ID or both types. + +This command returns all directory extension definitions registered in a directory, including those from multitenant apps. The following entities support extension properties: + +- User +- Group +- AdministrativeUnit +- Application +- Device +- Organization + +## Examples + +### Example 1: Get extension properties synced from on-premises Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraExtensionProperty -IsSyncedFromOnPremises $True +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ------------- ---------------------- ---- ------------- + aaaabbbb-0000-cccc-1111-dddd2222eeee Tenant Schema Extension App String False True extension_aaaabbbb-0000-cccc-1111-dddd2222eeee_extensionAttribute1 {User} +``` + +This command gets extension properties that have sync from on-premises Microsoft Entra ID. + +## Parameters + +### -IsSyncedFromOnPremises + +Specifies whether this cmdlet gets extension properties that are synced or not synced. + +- `$True` - get extension properties that are synced from the on-premises Microsoft Entra ID. +- `$False` - get extension properties that aren't synced from the on-premises Microsoft Entra ID. +- `No value` - get all extension properties (both synced and nonsynced). + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md new file mode 100644 index 0000000000..615248b150 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md @@ -0,0 +1,90 @@ +--- +title: Get-EntraFederationProperty +description: This article provides details on the Get-EntraFederationProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFederationProperty + +schema: 2.0.0 +--- + +# Get-EntraFederationProperty + +## Synopsis + +Displays the properties of the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +## Syntax + +```powershell +Get-EntraFederationProperty + -DomainName + [] +``` + +## Description + +The `Get-EntraFederationProperty` cmdlet gets key settings from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +You can use this information to troubleshoot authentication problems caused by mismatched settings between the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Global Reader +- Security Reader +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Display properties for specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraFederationProperty -DomainName contoso.com +``` + +This command displays properties for specified domain. + +- `-DomainName` Specifies the domain name. + +## Parameters + +### -DomainName + +The domain name for which the properties from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online are displayed. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md new file mode 100644 index 0000000000..813b97fb34 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraObjectByObjectId +description: This article provides details on the Get-EntraObjectByObjectId command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectByObjectId + +schema: 2.0.0 +--- + +# Get-EntraObjectByObjectId + +## Synopsis + +Retrieves the objects specified by the ObjectIds parameter. + +## Syntax + +```powershell +Get-EntraObjectByObjectId + -ObjectIds + [-Types ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraObjectByObjectId` cmdlet retrieves the objects specified by the ObjectIds parameter. + +## Examples + +### Example 1: Get an object One or more object IDs + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' , 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve objects for a specified object Ids. + +- `ObjectIds` parameter specifies the One or more object IDs. + +### Example 2: Get an object by types + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Types User +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve objects for a specified object type. + +- `-ObjectIds` parameter specifies the One or more object IDs. +- `-Types` parameter specifies the type of object ID. + +## Parameters + +### -ObjectIds + +One or more object IDs's, separated by commas, for which the objects are retrieved. The IDs are GUIDs, represented as strings. You can specify up to 1,000 IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Types + +Specifies the type of objects that the cmdlet returns. If not specified, the default is directoryObject, which includes all resource types defined in the directory. You can specify any object derived from directoryObject in the collection, such as user, group, and device objects. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md new file mode 100644 index 0000000000..c2338d2a49 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md @@ -0,0 +1,135 @@ +--- +title: Get-EntraPartnerInformation +description: This article provides details on the Get-EntraPartnerInformation command. + +ms.topic: reference +ms.date: 09/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPartnerInformation + +schema: 2.0.0 +--- + +# Get-EntraPartnerInformation + +## Synopsis + +Retrieves company-level information for partners. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPartnerInformation + [] +``` + +### GetById + +```powershell +Get-EntraPartnerInformation + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraPartnerInformation` cmdlet is used to retrieve partner-specific information. +This cmdlet should only be used for partner tenants. + +## Examples + +### Example 1: Retrieve partner information + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraPartnerInformation +``` + +```Output +PartnerCompanyName : Contoso +companyType : +PartnerSupportTelephones : {12123, +1911} +PartnerSupportEmails : {} +PartnerHelpUrl : http://www.help.contoso.com +PartnerCommerceUrl : +ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc +PartnerSupportUrl : +``` + +This command retrieves partner-specific information. + +### Example 2: Retrieve partner information with specific TenantId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +$tenantId = (Get-EntraContext).TenantId +Get-EntraPartnerInformation -TenantId $tenantId +``` + +```Output +PartnerCompanyName : Contoso +companyType : +PartnerSupportTelephones : {12123, +1911} +PartnerSupportEmails : {} +PartnerHelpUrl : http://www.help.contoso.com +PartnerCommerceUrl : +ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc +PartnerSupportUrl : +``` + +This command retrieves partner-specific information. + +`-TenantId` Parameter specifies unique ID of the tenant to perform the operation on. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this is not provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Company level information outputs + +- CompanyType: The type of this company (can be partner or regular tenant) +- DapEnabled: Flag to determine if the partner has delegated admin privileges +- PartnerCompanyName: The name of the company +- PartnerSupportTelephones: Support Telephone numbers for the partner +- PartnerSupportEmails: Support E-Mail address for the partner +- PartnerCommerceUrl: URL for the partner's commerce web site +- PartnerSupportUrl: URL for the Partner's support website +- PartnerHelpUrl: URL for the partner's help web site + +## Notes + +## Related Links + +[Set-EntraPartnerInformation](Set-EntraPartnerInformation.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md new file mode 100644 index 0000000000..ea27374f11 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md @@ -0,0 +1,101 @@ +--- +title: Get-EntraPasswordPolicy +description: This article provides details on the Get-EntraPasswordPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPasswordPolicy + +schema: 2.0.0 +--- + +# Get-EntraPasswordPolicy + +## Synopsis + +Retrieves the current password policy for the tenant or the specified domain. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPasswordPolicy + [] +``` + +### GetById + +```powershell +Get-EntraPasswordPolicy + -DomainName + [] +``` + +## Description + +The `Get-EntraPasswordPolicy` cmdlet can be used to retrieve the values associated with the Password Expiry +window or Password Expiry Notification window for a tenant or specified domain. + +When a domain name is specified, it must be a verified domain for the company. + +The work or school account needs to belong to one of the following Microsoft Entra roles: + +- Domain Name Administrator + +## Examples + +### Example 1: Get password policy for a specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraPasswordPolicy -DomainName 'contoso.com' +``` + +```Output +NotificationDays ValidityPeriod +---------------- -------------- + 90 180 +``` + +Returns the password policy for the specified domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. + +## Parameters + +### -DomainName + +The fully qualified name of the domain to be retrieved. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..3d2a8293a7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md @@ -0,0 +1,145 @@ +--- +title: Get-EntraScopedRoleMembership +description: This article provides details on the Get-EntraScopedRoleMembership command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Get-EntraScopedRoleMembership + +## Synopsis + +List Microsoft Entra role assignments with administrative unit scope. + +## Syntax + +```powershell +Get-EntraScopedRoleMembership + -AdministrativeUnitId + [-ScopedRoleMembershipId ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraScopedRoleMembership` cmdlet lists Microsoft Entra role assignments with an administrative unit scope. Use the `ObjectId` parameter to retrieve a specific scoped role membership. + +## Examples + +### Example 1: Get Scoped Role Administrator + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' +} +Get-EntraScopedRoleMembership @params +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example gets scoped role administrator. You cane use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-ScopedRoleMembershipId` parameter specifies the scoped role membership Id. + +### Example 2: List scoped administrators for administrative unit by ObjectId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraScopedRoleMembership -ObjectId $AdministrativeUnit.ObjectId +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example list scoped administrators with objectId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ScopedRoleMembershipId + +Specifies the ID of a scoped role membership. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) + +[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md new file mode 100644 index 0000000000..bcf1591a2e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md @@ -0,0 +1,227 @@ +--- +title: Get-EntraSubscribedSku +description: This article provides details on the Get-EntraSubscribedSku command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraSubscribedSku + +schema: 2.0.0 +--- + +# Get-EntraSubscribedSku + +## Synopsis + +Gets subscribed SKUs to Microsoft services. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraSubscribedSku + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraSubscribedSku + -SubscribedSkuId + [-Property ] + [] +``` + +## Description + +The `Get-EntraSubscribedSku` cmdlet gets subscribed SKUs to Microsoft services. + +## Examples + +### Example 1: Get subscribed SKUs + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraSubscribedSku +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... +bbbb1111-cc22-3333-44dd-555555eeeeee 1111bbbb-22cc-dddd-ee33-ffffff444444 M365x99297270 User Enabled 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTE... +cccc2222-dd33-4444-55ee-666666ffffff 2222cccc-33dd-eeee-ff44-aaaaaa555555 M365x99297270 User Enabled 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTE... +``` + +This example demonstrates how to retrieve subscribed SKUs to Microsoft services. + +### Example 2: Get subscribed SKUs by SubscribedSkuId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraSubscribedSku -SubscribedSkuId 'abcdefgh-1111-2222-bbbb-cccc33333333_dddddddd-4444-5555-eeee-666666666666' +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... +``` + +This example demonstrates how to retrieve specified subscribed SKUs to Microsoft services. + +- `-SubscribedSkuId` parameter specifies the ID of the SKU (Stock Keeping Unit). + +### Example 3: Get available license plans + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Organization.Read.All' +Get-EntraSubscribedSku | Select-Object -Property Sku*, ConsumedUnits -ExpandProperty PrepaidUnits +``` + +```Output +Enabled : 5 +LockedOut : 0 +Suspended : 0 +Warning : 0 +AdditionalProperties : +SkuId : efccb6f7-5641-4e0e-bd10-b4976e1bf68e +SkuPartNumber : EMS +ConsumedUnits : 3 +``` + +This example demonstrates how to retrieve available license plans. + +### Example 4: Retrieve all users assigned a specific license + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +$sku = Get-EntraSubscribedSku | Where-Object { $_.SkuPartNumber -eq 'DEVELOPERPACK_E5' } +$skuId = $sku.SkuId +$usersWithDeveloperPackE5 = Get-EntraUser -All | Where-Object { + $_.AssignedLicenses -and ($_.AssignedLicenses.SkuId -contains $skuId) +} +$usersWithDeveloperPackE5 | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled, UserType | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AccountEnabled UserType +-- ----------- ----------------- -------------- -------- +cccccccc-2222-3333-4444-dddddddddddd Angel Brown AngelB@contoso.com True Member +dddddddd-3333-4444-5555-eeeeeeeeeeee Avery Smith AveryS@contoso.com True Member +eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com True Member +``` + +This example demonstrates how to retrieve all users assigned a specific license. + +### Example 5: Get a list of users, their assigned licenses, and licensing source + +```powershell +Connect-Entra -Scopes 'Organization.Read.All','User.Read.All','Group.Read.All' + +# Get all users with specified properties +$Users = Get-EntraUser -All -Property AssignedLicenses, LicenseAssignmentStates, DisplayName, UserPrincipalName, ObjectId + +$SelectedUsers = $Users | Select-Object ObjectId, UserPrincipalName, DisplayName, AssignedLicenses -ExpandProperty LicenseAssignmentStates + +# Group Name lookup +$GroupDisplayNames = @{} + +# Sku Part Number lookup +$SkuPartNumbers = @{} + +# Populate the hashtable with group display names and SKU part numbers +foreach ($User in $SelectedUsers) { + $AssignedByGroup = $User.AssignedByGroup + $SkuId = $User.SkuId + + try { + # Check if the group display name is already in the hashtable + if (-not $GroupDisplayNames.ContainsKey($AssignedByGroup)) { + $Group = Get-EntraGroup -GroupId $AssignedByGroup + $GroupDisplayNames[$AssignedByGroup] = $Group.DisplayName + } + + $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue $GroupDisplayNames[$AssignedByGroup] + } catch { + $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue 'N/A (Direct Assignment)' + } + + try { + # Check if the SKU part number is already in the hashtable + if (-not $SkuPartNumbers.ContainsKey($SkuId)) { + $Sku = Get-EntraSubscribedSku | Where-Object { $_.SkuId -eq $SkuId } | Select-Object -ExpandProperty SkuPartNumber + $SkuPartNumbers[$SkuId] = $Sku + } + + $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue $SkuPartNumbers[$SkuId] + } catch { + $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue 'N/A' + } +} + +$SelectedUsers | Format-Table UserPrincipalName, DisplayName, AssignedByGroup, GroupDisplayName, SkuId, SkuPartNumber, State, Error -AutoSize +``` + +```Output +userPrincipalName displayName assignedByGroup GroupDisplayName skuId SkuPartNumber state error +----------------- ----------- --------------- ---------------- ----- ------------- ----- ----- +averyh@contoso.com Avery Howard cccccccc-2222-3333-4444-dddddddddddd Contoso Team abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None +devont@contoso.com Devon Torres ffffffff-5555-6666-7777-aaaaaaaaaaaa Retail abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None +``` + +This example shows a list of users, their licenses, and the source of the license such as directly assigned or group assigned. + +## Parameters + +### -SubscribedSkuId + +The object ID of the SKU (Stock Keeping Unit). + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md new file mode 100644 index 0000000000..7bf50037c6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md @@ -0,0 +1,167 @@ +--- +title: Get-EntraTenantDetail +description: This article provides details on the Get-EntraTenantDetail command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTenantDetail + +schema: 2.0.0 +--- + +# Get-EntraTenantDetail + +## Synopsis + +Gets the details of a tenant. + +## Syntax + +```powershell +Get-EntraTenantDetail + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraTenantDetail` cmdlet gets the details of a tenant in Microsoft Entra ID. + +In delegated scenarios involving work or school accounts, the signed-in user must be assigned either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation: + +- Application Administrator +- Authentication Administrator +- Cloud Application Administrator +- Directory Readers +- Directory Reviewer +- Global Reader +- Helpdesk Administrator +- Security Administrator +- Security Operator +- Security Reader +- Service Support Administrator +- User Administrator +- Privileged Role Administrator + +## Examples + +### Example 1: Get all tenant details + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTenantDetail -All +``` + +```Output +DisplayName Id TenantType CountryLetterCode VerifiedDomains +----------- -- ---------- ----------------- --------------- +Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AAD NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Mana... +``` + +This example shows how to retrieve all tenant details. + +### Example 2: Get top one tenant details + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTenantDetail -Top 1 +``` + +```Output +DisplayName Id CountryLetterCode VerifiedDomains +----------- -- ----------------- --------------- +Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}} +``` + +This example shows how to retrieve details of a top one tenant in Microsoft Entra ID. + +### Example 3: Get directory tenant size quota + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +(Get-EntraTenantDetail).AdditionalProperties.directorySizeQuota +``` + +```Output +Key Value +--- ----- +used 339 +total 50000 +``` + +This example shows how to retrieve the directory tenant size quota. + +A directory quota represents the maximum number of objects allowed in a tenant, including user accounts, app registrations, and groups. Once this limit is reached, attempts to create new objects will result in an error. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraTenantDetail](Set-EntraTenantDetail.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..f5effc7db0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md @@ -0,0 +1,133 @@ +--- +title: New-EntraAdministrativeUnit +description: This article provides details on the New-EntraAdministrativeUnit command. + + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# New-EntraAdministrativeUnit + +## Synopsis + +Creates an administrative unit. + +## Syntax + +```powershell +New-EntraAdministrativeUnit + [-Description ] + -DisplayName + [] +``` + +## Description + +The `New-EntraAdministrativeUnit` cmdlet creates an administrative unit in Microsoft Entra ID. Specify `DisplayName` parameter to create an administrative unit. + +In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that includes the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. The Privileged Role Administrator role is the least privileged role that meets this requirement. + +## Examples + +### Example 1: Create an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +New-EntraAdministrativeUnit -DisplayName 'TestAU' +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. + +### Example 2: Create an administrative unit using '-Description' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$params = @{ + DisplayName = 'Pacific Administrative Unit' + Description = 'Administrative Unit for Pacific region' +} + +New-EntraAdministrativeUnit @params +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + bbbbbbbb-1111-2222-3333-cccccccccccc Pacific Administrative Unit test111 False +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. +- `-Description` parameter specifies a description for the Administrative unit object. + +## Parameters + +### -Description + +Specifies a description for the new administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the new administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md new file mode 100644 index 0000000000..8a6f2ea0bf --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md @@ -0,0 +1,136 @@ +--- +title: New-EntraAttributeSet +description: This article provides details on the New-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAttributeSet + +schema: 2.0.0 +--- + +# New-EntraAttributeSet + +## Synopsis + +Adds a new attribute set. + +## Syntax + +```powershell +New-EntraAttributeSet + [-AttributeSetId ] + [-Description ] + [-MaxAttributesPerSet ] + [] +``` + +## Description + +Adds a new Microsoft Entra ID attribute set object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a single attribute set + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'NewCustomAttributeSet' + Description = 'Attributes for engineering team' + MaxAttributesPerSet = 10 +} + +New-EntraAttributeSet @params +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Testing Attributes for engineering team 10 +``` + +This example demonstrates hoe to add a single attribute set. + +- `-Id` parameter specifies the name of the attribute set. +- `-Description` parameter specifies the description for the attribute set. +- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. + +## Parameters + +### -Description + +Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AttributeSetId + +Name of the attribute set. Unique identifier for the attribute set within a tenant, up to 32 Unicode characters. It can't contain spaces or special characters, is case sensitive, and can't be changed later. Required. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaxAttributesPerSet + +Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraAttributeSet](Get-EntraAttributeSet.md) + +[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..6e1299f5b0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,234 @@ +--- +title: New-EntraCustomSecurityAttributeDefinition +description: This article provides details on the New-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# New-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Create a new customSecurityAttributeDefinition object. + +## Syntax + +```powershell +New-EntraCustomSecurityAttributeDefinition + -IsSearchable + [-Description ] + -IsCollection + -AttributeSet + -Type + -Name + -Status + -UsePreDefinedValuesOnly + [] +``` + +## Description + +The `New-EntraCustomSecurityAttributeDefinition` cmdlet creates a new customSecurityAttributeDefinition object. Specify `IsSearchable`, `IsCollection`, `AttributeSet`, `Type`, `Name`, `Status` and `UsePreDefinedValuesOnly` parameters for create a new custom security attribute definition. + +You can define up to 500 active objects in a tenant. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a custom security attribute + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All','CustomSecAttributeDefinition.ReadWrite.All' +$AttributeSet = Get-EntraAttributeSet -Id '' +$params = @{ + Name = 'ProjectTest' + Description = 'Target completion' + Type = 'String' + Status = 'Available' + AttributeSet = $AttributeSet.Id + IsCollection = $False + IsSearchable = $True + UsePreDefinedValuesOnly = $True +} +New-EntraCustomSecurityAttributeDefinition @params +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Test_ProjectTest Test Target completion False True ProjectTest Available String False +``` + +This example demonstrates how to add a custom security attribute. + +- `-Name` parameter specifies the name of the custom security attribute. +- `-Description` parameter specifies the description of the custom security attribute. +- `-Type` parameter specifies the data type for the custom security attribute values. +- `-Status` parameter specifies the custom security attribute is active or deactivated. +- `-AttributeSet` parameter specifies the name of attribute set. +- `-IsCollection` parameter specifies the allows multiple values can be assigned to the custom security attribute. +- `-IsSearchable` parameter specifies the custom security attribute values are indexed for searching on objects. +- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. + +## Parameters + +### -AttributeSet + +Name of the attribute set. Case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCollection + +Indicates whether multiple values can be assigned to the custom security attribute. Can't be changed later. If type is set to Boolean, isCollection can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsSearchable + +Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Can't be changed later. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Can't contain spaces or special characters. Can't be changed later. Case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status + +Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Can't be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsePreDefinedValuesOnly + +Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) + +[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md new file mode 100644 index 0000000000..d81f8e00ad --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md @@ -0,0 +1,339 @@ +--- +title: New-EntraDevice +description: This article provides details on the New-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDevice + +schema: 2.0.0 +--- + +# New-EntraDevice + +## Synopsis + +Creates a device. + +## Syntax + +```powershell +New-EntraDevice + -DisplayName + -DeviceOSType + -AccountEnabled + -DeviceId + -DeviceOSVersion + -AlternativeSecurityIds + [-DevicePhysicalIds ] + [-DeviceTrustType ] + [-DeviceMetadata ] + [-ApproximateLastLogonTimeStamp ] + [-IsManaged ] + [-DeviceObjectVersion ] + [-IsCompliant ] + [-ProfileType ] + [-SystemLabels ] + [] +``` + +## Description + +The `New-EntraDevice` cmdlet creates a device in Microsoft Entra ID. + +The calling user must be in one of the following Microsoft Entra roles: Intune Administrator or Windows 365 Administrator. + +## Examples + +### Example 1: Create a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' + +$params = @{ + AccountEnabled = $true + DisplayName = 'My new device' + AlternativeSecurityIds = $altsecid + DeviceId = $guid + DeviceOSType = 'OS/2' + DeviceOSVersion = '9.3' +} + +New-EntraDevice @params +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb dddddddd-3333-4444-5555-eeeeeeeeeeee My new device +``` + +This command creates a new device. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeSecurityIds + +Specifies alternative security IDs. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApproximateLastLogonTimeStamp + +Specifies last sign-in date time. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceMetadata + +The metadata for this device + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectVersion + +Specifies the object version of the device. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSType + +Specifies the operating system type of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSVersion + +Specifies the operating system version of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DevicePhysicalIds + +Specifies the physical ID. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceTrustType + +The trust type for this device + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompliant + +True if the device complies with Mobile Device Management (MDM) policies; otherwise, false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsManaged + +True if the device is managed by a Mobile Device Management (MDM) app such as Intune; otherwise, false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileType + +Specifies profile type of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemLabels + +Specifies labels for the device. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md new file mode 100644 index 0000000000..bba50a37cd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md @@ -0,0 +1,158 @@ +--- +title: New-EntraDomain +description: This article provides details on the New-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDomain + +schema: 2.0.0 +--- + +# New-EntraDomain + +## Synopsis + +Creates a domain. + +## Syntax + +```powershell +New-EntraDomain + -Name + [-IsDefault ] + [-SupportedServices ] + [] +``` + +## Description + +The `New-EntraDomain` cmdlet creates a domain in Microsoft Entra ID. + +The work or school account needs to belong to at least the Domain Name Administrator role. + +## Examples + +### Example 1: Create a new Domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo.com +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain in Microsoft Entra ID. + +### Example 2: Create a new Domain with a list of domain capabilities + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo1.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo1.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain with the specified services in Microsoft Entra ID. + +### Example 3: Create a new Domain and make if the default new user creation + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo2.com -IsDefault $True +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo2.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain in Microsoft Entra ID and marks it as the default to be used for new user creation. + +## Parameters + +### -IsDefault + +Indicates whether or not this is the default domain that is used for user creation. + +There is only one default domain per company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The fully qualified name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SupportedServices + +The capabilities assigned to the domain. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..2b4e4d8f3b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraAdministrativeUnit +description: This article provides details on the Remove-EntraAdministrativeUnit command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# Remove-EntraAdministrativeUnit + +## Synopsis + +Removes an administrative unit. + +## Syntax + +```powershell +Remove-EntraAdministrativeUnit + -AdministrativeUnitId + [] +``` + +## Description + +The `Remove-EntraAdministrativeUnit` cmdlet removes an administrative unit from Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to delete an administrative unit. + +To delete an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. + +## Examples + +### Example 1: Remove an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Remove-EntraAdministrativeUnit -ObjectId $AdministrativeUnit.ObjectId +``` + +This command removes the specified administrative unit from Microsoft Entra ID. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..306fdee2a1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md @@ -0,0 +1,108 @@ +--- +title: Remove-EntraAdministrativeUnitMember +description: This article provides details on the Remove-EntraAdministrativeUnitMember command. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Remove-EntraAdministrativeUnitMember + +## Synopsis + +Removes an administrative unit member. + +## Syntax + +```powershell +Remove-EntraAdministrativeUnitMember + -AdministrativeUnitId + -MemberId + [] +``` + +## Description + +The `Remove-EntraAdministrativeUnitMember` cmdlet removes an administrative unit member in Microsoft Entra ID. Specify `AdministrativeUnitId` and `MemberId` to remove an administrative unit member. + +To remove a member from an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. + +## Examples + +### Example 1: Remove an administrative unit member + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + MemberId = 'eeeeeeee-4444-5555-6666-ffffffffffff' +} +Remove-EntraAdministrativeUnitMember @params +``` + +This command removes a specified member (user or group) from a specified administrative unit. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-MemberId` parameter specifies the ID of the administrative unit member. + +## Parameters + +### -MemberId + +Specifies the ID of the administrative unit member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) + +[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md new file mode 100644 index 0000000000..9d5b0e222a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md @@ -0,0 +1,79 @@ +--- +title: Remove-EntraContact +description: This article provides details on the Remove-EntraContact command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraContact + +schema: 2.0.0 +--- + +# Remove-EntraContact + +## Synopsis + +Removes a contact. + +## Syntax + +```powershell +Remove-EntraContact + -OrgContactId + [] +``` + +## Description + +The `Remove-EntraContact` removes a contact from Microsoft Entra ID. + +## Examples + +### Example 1: Remove a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Remove-EntraContact -OrgContactId $Contact.ObjectId +``` + +The example shows how to remove a contact. + +## Parameters + +### -OrgContactId + +Specifies the object ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md new file mode 100644 index 0000000000..bacb0d4a0c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md @@ -0,0 +1,85 @@ +--- +title: Remove-EntraDevice +description: This article provides details on the Remove-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDevice + +schema: 2.0.0 +--- + +# Remove-EntraDevice + +## Synopsis + +Deletes a device. + +## Syntax + +```powershell +Remove-EntraDevice + -DeviceId + [] +``` + +## Description + +The `Remove-EntraDevice` cmdlet removes a device from Microsoft Entra ID. + +The calling user must be in one of the following Microsoft Entra roles: Intune Administrator, Windows 365 Administrator, or Cloud Device Administrator. + +## Examples + +### Example 1: Remove a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +$Device = Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" +Remove-EntraDevice -DeviceId $Device.ObjectId +``` + +This command removes the specified device. + +## Parameters + +### -DeviceId + +Specifies the object ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[New-EntraDevice](New-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..ec6b3a8a33 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md @@ -0,0 +1,101 @@ +--- +title: Remove-EntraDeviceRegisteredOwner +description: This article provides details on the Remove-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Remove-EntraDeviceRegisteredOwner + +## Synopsis + +Removes the registered owner of a device. + +## Syntax + +```powershell +Remove-EntraDeviceRegisteredOwner + -OwnerId + -DeviceId + [] +``` + +## Description + +The `Remove-EntraDeviceRegisteredOwner` cmdlet removes the registered owner of a device in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an owner from a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$Device = Get-EntraDevice -Top 1 +$Owner = Get-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId +Remove-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId -OwnerId $Owner.ObjectId +``` + +This examples shows how to remove the owner of a device. + +## Parameters + +### -DeviceId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies an owner ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) + +[Get-EntraDevice](Get-EntraDevice.md) + +[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..ec9ca2ff64 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md @@ -0,0 +1,99 @@ +--- +title: Remove-EntraDeviceRegisteredUser +description: This article provides details on the Remove-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Remove-EntraDeviceRegisteredUser + +## Synopsis + +Removes a registered user from a device. + +## Syntax + +```powershell +Remove-EntraDeviceRegisteredUser + -DeviceId + -UserId + [] +``` + +## Description + +The `Remove-EntraDeviceRegisteredUser` cmdlet removes a registered user from a Microsoft Entra ID device. + +## Examples + +### Example 1: Remove a registered user from a device + +```Powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$Device = Get-EntraDevice -Top 1 +$User = Get-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId +Remove-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId -UserId $User.ObjectId +``` + +This example shows how to remove the registered user from device. + +## Parameters + +### -DeviceId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) + +[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..4b888305c9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraDirectoryRoleMember +description: This article provides details on the Remove-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleMember + +## Synopsis + +Removes a member of a directory role. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleMember + -DirectoryRoleId + -MemberId + [] +``` + +## Description + +The `Remove-EntraDirectoryRoleMember` cmdlet removes a member from a directory role in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a member from a directory role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$params = @{ + DirectoryRoleId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + MemberId = '11bb11bb-cc22-dd33-ee44-55ff55ff55ff' +} + +Remove-EntraDirectoryRoleMember @params +``` + +This example removes the specified member from the specified role. + +- `-DirectoryRoleId` - specifies the unique identifier (ObjectId) of the directory role from which the member will be removed. + +- `-MemberId` - specifies the unique identifier (MemberId) of the member (user, group, or service principal) that is to be removed from the specified directory role. + +## Parameters + +### -MemberId + +Specifies the object ID of a role member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DirectoryRoleId + +Specifies the object ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) + +[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md new file mode 100644 index 0000000000..cfd13d0926 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md @@ -0,0 +1,91 @@ +--- +title: Remove-EntraDomain +description: This article provides details on the Remove-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDomain + +schema: 2.0.0 +--- + +# Remove-EntraDomain + +## Synopsis + +Removes a domain. + +## Syntax + +```powershell +Remove-EntraDomain + -Name + [] +``` + +## Description + +The `Remove-EntraDomain` cmdlet removes a domain from Microsoft Entra ID. + +Important: + +- Deleted domains are not recoverable. +- Attempts to delete will fail if there are any resources or objects still dependent on the domain. + +The work or school account needs to belong to at least the `Domain Name Administrator` Microsoft Entra role. + +## Examples + +### Example 1: Remove a domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Remove-EntraDomain -Name Contoso.com +``` + +This command removes a domain from Microsoft Entra ID. + +## Parameters + +### -Name + +Specifies the name of the domain to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md new file mode 100644 index 0000000000..f0b6781699 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md @@ -0,0 +1,79 @@ +--- +title: Remove-EntraExternalDomainFederation +description: This article provides details on the Remove-EntraExternalDomainFederation command. + + +ms.topic: reference +ms.date: 06/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra + +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation + +schema: 2.0.0 +--- + +# Remove-EntraExternalDomainFederation + +## Synopsis + +Delete an externalDomainFederation by external domain name. + +## Syntax + +```powershell +Remove-EntraExternalDomainFederation + -ExternalDomainName + [] +``` + +## Description + +This `Remove-EntraExternalDomainFederation` cmdlet removes an externalDomainFederation by external domain name. + +## Examples + +### Example 1: Deletes an external domain federation setting for a given external domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Remove-EntraExternalDomainFederation -ExternalDomainName 'test.com' +``` + +This command deletes an external domain federation setting. + +- `ExternalDomainName` Parameter specifies unique identifer of an externalDomainFederation. + +## Parameters + +### -ExternalDomainName + +The unique identifer of an externalDomainFederation in Microsoft Entra ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..498ce84d81 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraScopedRoleMembership +description: This article provides details on the Remove-EntraScopedRoleMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Remove-EntraScopedRoleMembership + +## Synopsis + +Removes a scoped role membership. + +## Syntax + +```powershell +Remove-EntraScopedRoleMembership + -AdministrativeUnitId + -ScopedRoleMembershipId + [] +``` + +## Description + +The `Remove-EntraScopedRoleMembership` cmdlet removes a scoped role membership from Microsoft Entra ID. Specify `AdministrativeUnitId` and `ScopedRoleMembershipId` parameter to remove a scoped role membership. + +## Examples + +### Example 1: Remove a scoped role membership + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.AdministrativeUnitId + ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' +} +Remove-EntraScopedRoleMembership @params +``` + +This cmdlet removes a specific scoped role membership from Microsoft Entra ID. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-ScopedRoleMembershipId` parameter specifies the ID of the scoped role membership to remove. To obtain the details of a scoped role membership, you can use the `Get-EntraScopedRoleMembership` command. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ScopedRoleMembershipId + +Specifies the ID of the scoped role membership to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) + +[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..ce69a357d3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md @@ -0,0 +1,154 @@ +--- +title: Restore-EntraDeletedDirectoryObject +description: This article provides details on the Restore-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Restore-EntraDeletedDirectoryObject + +## Synopsis + +Restore a previously deleted object. + +## Syntax + +```powershell +Restore-EntraDeletedDirectoryObject + -Id + [] +``` + +## Description + +The `Restore-EntraDeletedDirectoryObject` cmdlet is used to restore previously deleted objects, such as application, group, service principal, administrative unit, or user objects. + +When a group or application is deleted, it is initially soft deleted and can be recovered within the first 30 days. After 30 days, the deleted object is permanently deleted and cannot be recovered. + +**Notes:** + +- Only Unified Groups (also known as Office 365 Groups) can be restored; Security groups cannot be restored. +- Restoring an application does not automatically restore its associated service principal. You must explicitly use this cmdlet to restore the deleted service principal. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles: + +- **To restore deleted applications or service principals:** Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. +- **To restore deleted users:** User Administrator. + - However, to restore users with privileged administrator roles: + - In delegated scenarios, the app must be assigned the `Directory.AccessAsUser.All` delegated permission, and the calling user must also be assigned a higher privileged administrator role. + - In app-only scenarios, in addition to being granted the `User.ReadWrite.All` application permission, the app must be assigned a higher privileged administrator role. +- **To restore deleted groups:** Groups Administrator. + - However, to restore role-assignable groups, the calling user must be assigned the Privileged Role Administrator role. + +## Examples + +### Example 1: Restore a deleted object with ID + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' #administrativeUnit resource +Connect-Entra -Scopes 'Application.ReadWrite.All' #application resource +Connect-Entra -Scopes 'Group.ReadWrite.All' #group resource +Connect-Entra -Scopes 'Application.ReadWrite.All' #servicePrincipal resource +Connect-Entra -Scopes 'User.ReadWrite.All' #user resource +Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example shows how to restore a deleted object in Microsoft Entra ID. + +- `-Id` parameter specifies the Id of the directory object to restore. + +### Example 2: Restoring a Soft-Deleted User and Removing Conflicting Proxy Addresses + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -AutoReconcileProxyConflict +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example shows how to restore a deleted object in Microsoft Entra ID. + +- `-Id` parameter specifies the Id of the directory object to restore. +- `-AutoReconcileProxyConflict` parameter removes any conflicting proxy addresses while restoring a soft-deleted user whose one or more proxy addresses are currently used for an active user. + +## Parameters + +### -Id + +The Id of the directory object to restore. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AutoReconcileProxyConflict + +Specifies whether Microsoft Entra ID should remove conflicting proxy addresses when restoring a soft-deleted user, if any of the user's proxy addresses are currently in use by an active user. This parameter applies only when restoring a soft-deleted user. The default value is `false`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) + +[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) + +[Remove-EntraDeletedDirectoryObject](Remove-EntraDeletedDirectoryObject.md) + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) + +[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..9087e6ebfb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md @@ -0,0 +1,145 @@ +--- +title: Set-EntraAdministrativeUnit +description: This article provides details on the Set-EntraAdministrativeUnit command. + +ms.topic: reference +ms.date: 06/19/2023 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# Set-EntraAdministrativeUnit + +## Synopsis + +Updates an administrative unit. + +## Syntax + +```powershell +Set-EntraAdministrativeUnit + -AdministrativeUnitId + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +The `Set-EntraAdministrativeUnit` cmdlet updates an administrative unit in Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to update a specific administrative unit. + +In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. + +The Privileged Role Administrator is the least privileged role required for this operation. + +## Examples + +### Example 1: Update DisplayName + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + DisplayName = 'UpdatedAU' +} +Set-EntraAdministrativeUnit @params +``` + +This Command update DisplayName of specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-DisplayName` parameter specifies the display name for the administrative unit. + +### Example 2: Update Description + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + Description = 'Updated AU Description' +} +Set-EntraAdministrativeUnit @params +``` + +This example shows how to update the description of a specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-Description` parameter specifies the description for the administrative unit. + +## Parameters + +### -Description + +Specifies a description. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the Id of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md new file mode 100644 index 0000000000..71c1d09ff0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md @@ -0,0 +1,147 @@ +--- +title: Set-EntraAttributeSet +description: This article provides details on the Set-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAttributeSet + +schema: 2.0.0 +--- + +# Set-EntraAttributeSet + +## Synopsis + +Updates an existing attribute set. + +## Syntax + +```powershell +Set-EntraAttributeSet + -AttributeSetId + [-Description ] + [-MaxAttributesPerSet ] + [] +``` + +## DESCRIPTION + +The `Set-EntraAttributeSet` cmdlet updates a Microsoft Entra ID attribute set object specified by its ID. Specify `AttributeSetId` parameter to Update a Microsoft Entra ID attribute set object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. + +Note: Only the Attribute Definition Administrator role is supported for this operation. Ensure the signed-in user is assigned this role. + +You can only update the `description` and `maxAttributesPerSet` properties. + +## Examples + +### Example 1: Update an attribute set + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Engineering' + Description = 'Attributes for cloud engineering team' +} +Set-EntraAttributeSet @params +``` + +This example update an attribute set. + +- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. +- `-Description` parameter specifies the description for the attribute set. + +### Example 2: Update an attribute set using MaxAttributesPerSet + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Engineering' + MaxAttributesPerSet = 10 +} +Set-EntraAttributeSet @params +``` + +This example update an attribute set using MaxAttributesPerSet. + +- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. +- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. + +## Parameters + +### -Description + +Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AttributeSetId + +Name of the attribute set. Unique identifier for the attribute set within a tenant. This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MaxAttributesPerSet + +Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraAttributeSet](New-EntraAttributeSet.md) + +[Get-EntraAttributeSet](Get-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..d91b797cc7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,149 @@ +--- +title: Set-EntraCustomSecurityAttributeDefinition +description: This article provides details on the Set-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 07/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# Set-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Update the properties of a customSecurityAttributeDefinition object. + +## Syntax + +```powershell +Set-EntraCustomSecurityAttributeDefinition + -Id + [-Description ] + [-Status ] + [-UsePreDefinedValuesOnly ] + [] +``` + +## Description + +Update the properties of a customSecurityAttributeDefinition object. Specify `Id` parameter to update a custom security attribute definition. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Update a custom security attribute + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + Id = 'Engineering_ProjectDate' + Description = 'Add-description' + Status = 'Available' + UsePreDefinedValuesOnly = $False +} +Set-EntraCustomSecurityAttributeDefinition @params +``` + +This example update a custom security attribute. + +- `-Id` parameter specifies the custom security attribute definition object ID. +- `-Description` parameter specifies the description of the custom security attribute. +- `-Status` parameter specifies the custom security attribute is active or deactivated. +- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. + +## Parameters + +### -Description + +Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID custom security attribute definition object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Status + +Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsePreDefinedValuesOnly + +Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) + +[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..a2b37457d9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,126 @@ +--- +title: Set-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Set-EntraCustomSecurityAttributeDefinitionAllowedValue command. + +ms.topic: reference +ms.date: 07/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue + +schema: 2.0.0 +--- + +# Set-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Updates an existing custom security attribute definition predefined value. + +## Syntax + +```powershell +Set-EntraCustomSecurityAttributeDefinitionAllowedValue + [-IsActive ] + -CustomSecurityAttributeDefinitionId + -Id [] +``` + +## Description + +The `Set-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdlet update a Microsoft Entra ID custom security attribute definition predefined value object identified by ID. Specify `CustomSecurityAttributeDefinitionId` and `Id` parameter to update a Microsoft Entra ID custom security attribute definition predefined value. + +## Examples + +### Example 1: Update a custom security attribute definition predefined value + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + CustomSecurityAttributeDefinitionId = 'Engineering_Project' + Id = 'Alpine' + IsActive = $true +} +Set-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +This example update a custom security attribute definition predefined value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. +- `-Id` parameter specifies the ID of Microsoft Entra ID Object. +- `-IsActive` parameter specifies the predefined value is active or deactivated. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier of customSecurityAttributeDefinition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. This field is optional. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsActive + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any other supported directory objects. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md new file mode 100644 index 0000000000..2e21b12941 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md @@ -0,0 +1,387 @@ +--- +title: Set-EntraDevice +description: This article provides details on the Set-EntraDevice command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDevice + +schema: 2.0.0 +--- + +# Set-EntraDevice + +## Synopsis + +Updates a device. + +## Syntax + +```powershell +Set-EntraDevice + -DeviceObjectId + [-DevicePhysicalIds ] + [-DeviceOSType ] + [-DeviceTrustType ] + [-DisplayName ] + [-DeviceMetadata ] + [-ApproximateLastLogonTimeStamp ] + [-AccountEnabled ] + [-IsManaged ] + [-DeviceId ] + [-DeviceObjectVersion ] + [-IsCompliant ] + [-DeviceOSVersion ] + [-AlternativeSecurityIds ] + [-ProfileType ] + [-SystemLabels ] + [] +``` + +## Description + +The `Set-EntraDevice` cmdlet updates a device in Microsoft Entra ID. + +The calling user must have at least the Intune Administrator role in Microsoft Entra. A user with the Cloud Device Administrator role can only enable or disable devices, while a user with the Windows 365 Administrator role can only update basic device properties. + +## Examples + +### Example 1: Update a device display name + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName 'My OS/2 computer' +``` + +This example shows how to update a display name of a specified. + +### Example 2: Update a device alternative security ID + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +$NewId= New-Object Microsoft.Open.AzureAD.Model.AlternativeSecurityId +$NewId.Key =[System.Text.Encoding]::UTF8.GetBytes('test') +$NewId.type = 2 +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AlternativeSecurityIds $NewId +``` + +This example shows how to update an alternative security ID of a specified device. + +### Example 3: Update a device account enabled + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AccountEnabled $true +``` + +This example shows how to update an account enabled of a specified device. + +### Example 4: Update a device OS type + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DeviceOSType Windows +``` + +This example shows how to update an OS type of a specified device. + +### Example 5: Update a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' + +$params = @{ + DeviceObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DeviceMetadata = 'Testdevice' + DeviceObjectVersion = 4 + DevicePhysicalIds = '[GID]:g:1234567890123456' + IsCompliant = $false +} + +Set-EntraDevice @params +``` + +This example shows how to update multiple properties of a specified device. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeSecurityIds + +Specifies alternative security IDs. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApproximateLastLogonTimeStamp + +The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderby. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the device ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceMetadata + +The device metadata for this device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectVersion + +Specifies the object version of the device. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSType + +Specifies the operating system. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSVersion + +Specifies the operating system version. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DevicePhysicalIds + +Specifies the physical ID. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceTrustType + +Specifies the device trust type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompliant + +Indicates whether the device is compliant. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsManaged + +Indicates whether the device is managed. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectId + +Specifies the object ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProfileType + +Specifies the profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemLabels + +Specifies list of labels applied to the device by the system. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[New-EntraDevice](New-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md new file mode 100644 index 0000000000..1226207ac6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md @@ -0,0 +1,144 @@ +--- +title: Set-EntraDirSyncConfiguration +description: This article provides details on the Set-EntraDirSyncConfiguration command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration + +schema: 2.0.0 +--- + +# Set-EntraDirSyncConfiguration + +## Synopsis + +Modifies the directory synchronization settings. + +## Syntax + +```powershell +Set-EntraDirSyncConfiguration + -AccidentalDeletionThreshold + [-Force] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraDirSyncConfiguration` cmdlet modifies the directory synchronization settings. + +## Examples + +### Example 1: Set directory synchronization settings + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold 600 -Force +``` + +This command sets directory synchronization settings. + +- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Set directory synchronization settings for a Tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$tenantID = (Get-EntraContext).TenantId +$params = @{ + AccidentalDeletionThreshold = 600 + TenantId = $tenantID + Force = $true +} + +Set-EntraDirSyncConfiguration @params +``` + +This command sets directory synchronization settings. + +- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. +- `-Force` Forces the command to run without asking for user confirmation. +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -AccidentalDeletionThreshold + +Specifies the accidental deletion prevention configuration for a tenant. + +```yaml +Type: System.UInt32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: SetAccidentalDeletionThreshold +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.UInt32 + +### System.Guid + +## Outputs + +### System.Object + +## Notes + +- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). + +## Related Links + +[Get-EntraDirSyncConfiguration](Get-EntraDirSyncConfiguration.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md new file mode 100644 index 0000000000..75055a97f0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md @@ -0,0 +1,140 @@ +--- +title: Set-EntraDirSyncEnabled +description: This article provides details on the Set-EntraDirSyncEnabled command. + + +ms.topic: reference +ms.date: 09/27/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled + +schema: 2.0.0 +--- + +# Set-EntraDirSyncEnabled + +## Synopsis + +Turns directory synchronization on or off for a company. + +## Syntax + +```powershell +Set-EntraDirSyncEnabled + -EnableDirSync + [-Force] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraDirSyncEnabled` cmdlet turns directory synchronization on or off for a company. +>[!IMPORTANT] +>It may take up to 72 hours to complete deactivation once you have disabled DirSync through this cmdlet. The time depends on the number of objects that are in your cloud service subscription account. **You cannot cancel the disable action**. It will need to complete before you can take any other action, including re-enabling of DirSync. If you choose to re-enable DirSync, a full synchronization of your synced objects will happen. This may take a considerable time depending on the number of objects in your Microsoft Entra ID. +>[!NOTE] +>If you disable DirSync and you decide to re-enable it, and you have enabled the BlockCloudObjectTakeoverThroughHardMatch feature, OnPrem to cloud object takeover/update for all objects mastered in the Microsoft Entra ID will be blocked. If this is the case and you want to resume syncing Microsoft Entra ID mastered objects with Microsoft Entra ID, set **BlockCloudObjectTakeoverThroughHardMatch** feature to false. + +## Examples + +### Example 1: Turn on directory synchronization + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' +$params = @{ + EnableDirsync = $True + Force = $True +} +Set-EntraDirSyncEnabled @params +``` + +This example turns on directory synchronization for a company. + +- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Turn off directory synchronization + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' +$params = @{ + EnableDirsync = $False + TenantId = 'aaaaaaaa-1111-1111-1111-000000000000' + Force = $True + +} +Set-EntraDirSyncEnabled @params +``` + +This example turns off directory synchronization for a company. + +- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. +- `-Force` Forces the command to run without asking for user confirmation. +- `-TenantId` Specifies the unique ID of the tenant on which to perform the operation. + +## Parameters + +### -EnableDirsync + +Specifies whether to turn on directory synchronization on for your company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the unique ID of the tenant on which to perform the operation. +The default value is the tenant of the current user. +This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md new file mode 100644 index 0000000000..7dcceca78b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md @@ -0,0 +1,187 @@ +--- +title: Set-EntraDirSyncFeature +description: This article provides details on the Set-EntraDirSyncFeature command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncFeature + +schema: 2.0.0 +--- + +# Set-EntraDirSyncFeature + +## Synopsis + +Used to set identity synchronization features for a tenant. + +## Syntax + +```powershell +Set-EntraDirSyncFeature + -Feature + -Enabled + [-TenantId ] + [-Force] + [] +``` + +## Description + +The `Set-EntraDirSyncFeature` cmdlet sets identity synchronization features for a tenant. + +You can use the following synchronization features with this cmdlet: + +- **EnableSoftMatchOnUpn**: Soft match is the process used to link an object being synced from on-premises for the first time with one that already exists in the cloud. When this feature is enabled, soft match is attempted using the standard logic, based on the primary SMTP address. If a match isn't found based on primary SMTP, then a match is attempted based on UserPrincipalName. Once this feature is enabled, it can't be disabled. +- **PasswordSync**: Used to indicate on-premise password synchronization. +- **SynchronizeUpnForManagedUsers**: Allows for the synchronization of UserPrincipalName updates from on-premises for managed (nonfederated) users that are assigned a license. These updates are blocked if this feature isn't enabled. Once this feature is enabled, it can't be disabled. +- **BlockSoftMatch**: When this feature is enabled, it blocks the soft match feature. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching is completed and is no longer needed. +- **BlockCloudObjectTakeoverThroughHardMatch**: Used to block cloud object takeover via source anchor hard match. + +Enabling some of these features, such as EnableSoftMatchOnUpn and SynchronizationUpnForManagedUsers, is a permanent operation. +You can't disable these features once they're enabled. + +## Examples + +### Example 1: Enable a feature for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockCloudObjectTakeoverThroughHardMatch' + Enable = $True +} +Set-EntraDirSyncFeature @params +``` + +This command enables the SoftMatchOnUpn feature for the tenant. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Block Soft Matching for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockSoftMatch' + Enable = $True +} + +Set-EntraDirSyncFeature @params +``` + +This command enables the BlockSoftMatch feature for the tenant - effectively blocking the Soft Matching feature in the tenant. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. + +### Example 3: Block Cloud object takeover through Hard Matching for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockCloudObjectTakeoverThroughHardMatch' + Enable = $True +} + +Set-EntraDirSyncFeature @params +``` + +This command enables the BlockCloudObjectTakeoverThroughHardMatch feature for the tenant - effectively blocking the Hard Match object takeover. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -Feature + +The DirSync feature to turn on or off. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Enable + +Indicates whether the specified features are turned on for the company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). +- For the feature list see the [onPremisesDirectorySynchronizationFeature resource type](https://learn.microsoft.com/graph/api/resources/onpremisesdirectorysynchronizationfeature). + +## Related Links + +[Get-EntraDirSyncFeature](Get-EntraDirSyncFeature.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md new file mode 100644 index 0000000000..d2000341f7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md @@ -0,0 +1,135 @@ +--- +title: Set-EntraDomain +description: This article provides details on the Set-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomain + +schema: 2.0.0 +--- + +# Set-EntraDomain + +## Synopsis + +Updates a domain. + +## Syntax + +```powershell +Set-EntraDomain + -Name + [-IsDefault ] + [-SupportedServices ] + [] +``` + +## Description + +The `Set-EntraDomain` cmdlet updates a verified domain in Microsoft Entra ID. + +The work or school account needs to belong to at least one of the following Microsoft Entra roles: + +- Domain Name Administrator +- Security Administrator +- External Identity Provider Administrator + +## Examples + +### Example 1: Set the domain as the default domain for new user account creation + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Set-EntraDomain -Name Contoso.com -IsDefault $true +``` + +This example demonstrates how to set default domain for new user account in Microsoft Entra ID. + +### Example 2: Set the list of domain capabilities + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Set-EntraDomain -Name Contoso.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') +``` + +This example demonstrates how to set domain capabilities for new user account in Microsoft Entra ID. + +## Parameters + +### -IsDefault + +Indicates whether or not this is the default domain that is used for user creation. +There's only one default domain per company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The fully qualified name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SupportedServices + +The capabilities assigned to the domain. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md new file mode 100644 index 0000000000..21dbb0f668 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md @@ -0,0 +1,290 @@ +--- +title: Set-EntraDomainFederationSettings +description: This article provides details on the Set-EntraDomainFederationSettings command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings + +schema: 2.0.0 +--- + +# Set-EntraDomainFederationSettings + +## Synopsis + +Updates settings for a federated domain. + +## Syntax + +```powershell +Set-EntraDomainFederationSettings + -DomainName + [-SigningCertificate ] + [-NextSigningCertificate ] + [-LogOffUri ] + [-PassiveLogOnUri ] + [-ActiveLogOnUri ] + [-IssuerUri ] + [-FederationBrandName ] + [-MetadataExchangeUri ] + [-PreferredAuthenticationProtocol ] + [-SigningCertificateUpdateStatus ] + [-PromptLoginBehavior ] + [] +``` + +## Description + +The `Set-EntraDomainFederationSettings` cmdlet is used to update the settings of a single sign-on domain. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Set the PromptLoginBehavior + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' + +$params = @{ + DomainName = 'contoso.com' + PreferredAuthenticationProtocol = 'WsFed' + PromptLoginBehavior = 'TranslateToFreshPasswordAuth' # Or 'NativeSupport' or 'Disabled', depending on the requirement +} +Set-EntraDomainFederationSettings @params +``` + +This command updates the `PromptLoginBehavior` to either `TranslateToFreshPasswordAuth`, `NativeSupport`, or `Disabled`. These possible values are described: + +- `TranslateToFreshPasswordAuth` - means the default Microsoft Entra ID behavior of translating `prompt=login` to `wauth=https://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password` and `wfresh=0`. +- `NativeSupport` - means that the `prompt=login` parameter is sent as is to ADFS. +- `Disabled` - means that only wfresh=0 is sent to ADFS + +Use the `Get-EntraDomainFederationSettings -DomainName | Format-List *` to get the values for `PreferredAuthenticationProtocol` and `PromptLoginBehavior` for the federated domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. +- `-PreferredAuthenticationProtocol` parameter specifies the preferred authentication protocol. +- `-PromptLoginBehavior` parameter specifies the prompt sign-in behavior. + +## Parameters + +### -DomainName + +The fully qualified domain name (FQDN) to update. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -SigningCertificate + +The current certificate used to sign tokens passed to the Microsoft Entra ID Identity platform. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NextSigningCertificate + +The next token signing certificate that will be used to sign tokens when the primary signing certificate expires. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -LogOffUri + +The URL clients are redirected to when they sign out of Microsoft Entra ID services. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PassiveLogOnUri + +The URL that web-based clients will be directed to when signing in to Microsoft Entra ID services. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ActiveLogOnUri + +A URL that specifies the end point used by active clients when authenticating with domains set up for single sign-on (also known as identity federation) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IssuerUri + +The unique identifier of the domain in the Microsoft Entra ID Identity platform derived from the federation server. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FederationBrandName + +The name of the string value shown to users when signing in to Microsoft Entra ID. +We recommend that customers use something that is familiar to +users such as "Contoso Inc." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MetadataExchangeUri + +The URL that specifies the metadata exchange end point used for authentication from rich client applications such as Lync Online. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PreferredAuthenticationProtocol + +Specifies the preferred authentication protocol. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 10 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SigningCertificateUpdateStatus + +Specifies the update status of the signing certificate. + +```yaml +Type: System.Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: 11 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PromptLoginBehavior + +Specifies the prompt login behavior. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 12 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDomainFederationSettings](Get-EntraDomainFederationSettings.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md new file mode 100644 index 0000000000..1a4ad58b18 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md @@ -0,0 +1,242 @@ +--- +title: Set-EntraPartnerInformation +description: This article provides details on the Set-EntraPartnerInformation command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPartnerInformation + +schema: 2.0.0 +--- + +# Set-EntraPartnerInformation + +## Synopsis + +Sets company information for partners. + +## Syntax + +```powershell +Set-EntraPartnerInformation + [-CompanyType ] + [-PartnerCompanyName ] + [-PartnerSupportTelephones ] + [-PartnerSupportEmails ] + [-PartnerCommerceUrl ] + [-PartnerSupportUrl ] + [-PartnerHelpUrl ] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraPartnerInformation` cmdlet is used by partners to set partner-specific properties. + +These properties can view by all tenants that the partner has access to. + +## Examples + +### Example 1: Update the help URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerHelpUrl 'http://www.help.contoso.com' +``` + +This example shows how to update the help URL. + +### Example 2: Update the Support URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerSupportUrl 'http://www.test1.com' +``` + +This example shows how to update the support URL. + +### Example 3: Update the Commerce URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerCommerceUrl 'http://www.test1.com' +``` + +This example shows how to update the commerce URL. + +### Example 4: Update the SupportEmails + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerSupportEmails 'contoso@example.com' +``` + +This example shows how to update the support email addresses. + +### Example 5: Update the SupportTelephones + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$tenantId = (Get-EntraContext).TenantId +$params = @{ + PartnerSupportTelephones = '234234234' + TenantId = $tenantId +} +Set-EntraPartnerInformation @params +``` + +This example shows how to update support telephone numbers. + +## Parameters + +### -PartnerCommerceUrl + +Specifies the URL for the partner's commerce website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerHelpUrl + +Specifies the URL for the partner's Help website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportEmails + +Specifies the support email address for the partner. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportTelephones + +Specifies the support telephone numbers for the partner. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportUrl + +Specifies the URL for the partner's support website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the unique ID of the tenant on which to perform the operation. +The default value is the tenant of the current user. +This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -CompanyType + +Specifies the partner's company type. + +```yaml +Type: CompanyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerCompanyName + +Specifies the partner's company name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPartnerInformation](Get-EntraPartnerInformation.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md new file mode 100644 index 0000000000..24191c6eb6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md @@ -0,0 +1,216 @@ +--- +title: Set-EntraTenantDetail +description: This article provides details on the Set-EntraTenantDetail command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTenantDetail + +schema: 2.0.0 +--- + +# Set-EntraTenantDetail + +## Synopsis + +Set contact details for a tenant. + +## Syntax + +```powershell +Set-EntraTenantDetail + [-PrivacyProfile ] + [-MarketingNotificationEmails ] + [-TechnicalNotificationMails ] + [-SecurityComplianceNotificationMails ] + [-SecurityComplianceNotificationPhones ] + [] +``` + +## Description + +This cmdlet is used to set various contact details for a tenant. + +For delegated scenarios, the signed-in user must have at least one of the following Microsoft Entra roles. + +- Application Administrator +- Cloud Application Administrator +- Privileged Role Administrator +- User Administrator +- Helpdesk Administrator + +## Examples + +### Example 1: Set contact details for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$params = @{ + MarketingNotificationEmails = @('amy@contoso.com', 'henry@contoso.com') + SecurityComplianceNotificationMails = @('john@contoso.com', 'mary@contoso.com') + SecurityComplianceNotificationPhones = @('1-555-625-9999', '1-555-233-5544') + TechnicalNotificationMails = 'peter@contoso.com' +} + +Set-EntraTenantDetail @params +``` + +This example demonstrates how to set various contact details for a tenant. + +- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. +- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. +- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. +- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. + +### Example 2: Set MarketingNotificationEmails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -MarketingNotificationEmails @('amy@contoso.com','henry@contoso.com') +``` + +This example demonstrates how to set MarketingNotificationEmails detail for a tenant. + +- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. + +### Example 3: Set SecurityComplianceNotificationMails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -SecurityComplianceNotificationMails @('john@contoso.com','mary@contoso.com') +``` + +This example demonstrates how to set SecurityComplianceNotificationMails detail for a tenant. + +- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. + +### Example 4: Set -SecurityComplianceNotificationPhones for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -SecurityComplianceNotificationPhones @('1-555-625-9999', '1-555-233-5544') +``` + +This example demonstrates how to set MarketingNotificationEmails detail for a tenant. + +- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. + +### Example 5: Set TechnicalNotificationMails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -TechnicalNotificationMails 'peter@contoso.com' +``` + +This example demonstrates how to set TechnicalNotificationMails detail for a tenant. + +- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. + +## Parameters + +### -MarketingNotificationEmails + +The email addresses that are used to send marketing notification emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityComplianceNotificationMails + +The email addresses that are used to send security compliance emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityComplianceNotificationPhones + +One or more phone numbers that are used for security compliance. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TechnicalNotificationMails + +The email addresses that are used for technical notification emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivacyProfile + +Represents a company's privacy profile, which includes a privacy statement URL and a contact person for questions regarding the privacy statement. + +```yaml +Type: PrivacyProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +- For more details see [Update organization](https://learn.microsoft.com/graph/api/organization-update). + +## Related Links + +[Get-EntraTenantDetail](Get-EntraTenantDetail.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..7c86ba6f95 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md @@ -0,0 +1,282 @@ +--- +title: Get-EntraDirectoryRoleAssignment +description: This article provides details on the Get-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleAssignment + +## Synopsis + +Get a Microsoft Entra ID roleAssignment. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRoleAssignment + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetValue + +```powershell +Get-EntraDirectoryRoleAssignment + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRoleAssignment + -UnifiedRoleAssignmentId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleAssignment` cmdlet gets information about role assignments in Microsoft Entra ID. To get a role assignment, specify the `UnifiedRoleAssignmentId` parameter. Specify the `SearchString` or `Filter` parameter to find a particular role assignment. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: + +- microsoft.directory/roleAssignments/standard/read (least privileged) +- microsoft.directory/roleAssignments/allProperties/read +- microsoft.directory/roleAssignments/allProperties/allTasks + +The least privileged roles for this operation, from least to most privileged, are: + +- Directory Readers +- Global Reader +- Privileged Role Administrator + +## Examples + +### Example 1: Get role assignments + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments in Microsoft Entra ID. + +### Example 2: Get role assignments using 'All' parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -All +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets all the role assignments in Microsoft Entra ID. + +### Example 3: Get role assignments by Id + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId '00001111-aaaa-2222-bbbb-3333cccc4444' +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments using specified roleAssignment Id. + +- `UnifiedRoleAssignmentId` parameter specifies the roleAssignment object ID. + +### Example 4: Get role assignments filter by principalId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Filter "principalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments containing the specified principalId. + +### Example 5: Get role assignments filter by roleDefinitionId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Filter "roleDefinitionId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments containing the specified roleDefinitionId. + +### Example 6: Get top two role assignments + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Top 2 +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets top two role assignments. + +## Parameters + +### -UnifiedRoleAssignmentId + +The unique identifier of a Microsoft Entra ID roleAssignment object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment + +## Notes + +`Get-EntraRoleAssignment` is an alias for `Get-EntraDirectoryRoleAssignment`. + +## Related Links + +[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) + +[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..7fcd4cd5a8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md @@ -0,0 +1,273 @@ +--- +title: Get-EntraDirectoryRoleDefinition +description: This article provides details on the Get-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleDefinition + +## Synopsis + +Gets information about role definitions in Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRoleDefinition + [-All] + [-Top ] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraDirectoryRoleDefinition + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleDefinition` cmdlet gets information about role definitions in Microsoft Entra ID. To get a role definition, specify the `UnifiedRoleDefinitionId` parameter. Specify the `SearchString` or `Filter` parameter to find particular role definition. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: + +- microsoft.directory/roleAssignments/standard/read (least privileged) +- microsoft.directory/roleAssignments/allProperties/read +- microsoft.directory/roleAssignments/allProperties/allTasks + +The least privileged roles for this operation, from least to most privileged, are: + +- Directory Readers +- Global Reader +- Privileged Role Administrator + +## Examples + +### Example 1: Get all role definitions + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Guest User 10dae51f-b6af-4016-8d66-8c2a99b929b3 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command returns all the role definitions present. + +### Example 2: Get a role definition by UnifiedRoleDefinitionId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId '1a327991-10cb-4266-877a-998fb4df78ec' +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command returns a specified role definition. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. + +### Example 3: Filter role definitions by display name + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -Filter "startsWith(displayName, 'Restricted')" +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command return all the role definitions containing the specified display name. + +### Example 4: Get top two role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -Top 2 +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +Restricted Guest User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. True True +``` + +This command return top two the role definitions in Microsoft Entra DirectoryRoleId. + +### Example 5: Filter role definitions by display name + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -SearchString 'Global' + ``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +Global Administrator 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identit… +Global Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff f2ef992c-3afb-46b9-b7cf-a126ee74c451 Can read everything that a Global Administrator can, but not update anything. +``` + +This command return all the role definitions containing the specified display name. + +## Parameters + +### -UnifiedRoleDefinitionId + +Specifies the UnifiedRoleDefinitionId of the role definition. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records that this cmdlet gets. The default value is 100. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter string to match a set of role definitions. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +`Get-EntraRoleDefinition` is an alias for `Get-EntraDirectoryRoleDefintion`. + +## Related Links + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) + +[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..aae90daa6d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md @@ -0,0 +1,136 @@ +--- +title: New-EntraDirectoryRoleAssignment +description: This article provides details on the New-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraDirectoryRoleAssignment + +## Synopsis + +Create a new Microsoft Entra ID roleAssignment. + +## Syntax + +```powershell +New-EntraDirectoryRoleAssignment + -PrincipalId + -RoleDefinitionId + [-DirectoryScopeId ] + [] +``` + +## Description + +The `New-EntraDirectoryRoleAssignment` cmdlet creates a new Microsoft Entra role assignment. + +## Examples + +### Example 1: Create a new Microsoft Entra ID role assignment + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' +$params = @{ + RoleDefinitionId = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + PrincipalId = 'aaaaaaaa-bbbb-cccc-1111-222222222222' + DirectoryScopeId = '/' + } + +New-EntraDirectoryRoleAssignment @params +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command creates a new role assignment in Microsoft Entra ID. + +- `-RoleDefinitionId` parameter specifies the ID of the role definition that you want to assign. Role definitions describe the permissions that are granted to users or groups by the role. This is the Identifier of the `unifiedRoleDefinition` the assignment is for. + +- `-PrincipalId` parameter specifies the ID of the principal (user, group, or service principal) to whom the role is being assigned. + +- `-DirectoryScopeId` parameter specifies the scope of the directory over which the role assignment is effective. The '/' value typically represents the root scope, meaning the role assignment is applicable across the entire directory. + +## Parameters + +### -DirectoryScopeId + +Specifies the scope for the role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies the principal for role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleDefinitionId + +Specifies the role definition for role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment + +## Notes + +`New-EntraRoleAssignment` is an alias for `New-EntraDirectoryRoleAssignment`. + +## Related Links + +[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) + +[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d55868d7d6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md @@ -0,0 +1,330 @@ +--- +title: New-EntraDirectoryRoleDefinition +description: This article provides details on the New-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# New-EntraDirectoryRoleDefinition + +## Synopsis + +Create a new Microsoft Entra ID roleDefinition. + +## Syntax + +```powershell +New-EntraDirectoryRoleDefinition + [-TemplateId ] + -DisplayName + -RolePermissions + [-Description ] + [-Version ] + -IsEnabled + [-ResourceScopes ] + [] +``` + +## Description + +Create a new Microsoft Entra ID roleDefinition object. + +## Examples + +### Example 1: Creates a new role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output + +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 93ff7659-04bd-4d97-8add-b6c992cce98e False False + +``` + +This command creates a new role definition in Microsoft Entra ID. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. + +### Example 2: Creates a new role definition with Description parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + Description = 'Role Definition demo' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output + +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 e14cb8e2-d696-4756-bd7f-c7df25271f3d Role Definition demo False False + +``` + +This command creates a new role definition with Description parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Description` parameter specifies the description for the role definition. + +### Example 3: Creates a new role definition with ResourceScopes parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + ResourceScopes = '/' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 2bc29892-ca2e-457e-b7c0-03257a0bcd0c False False + +``` + +This command creates a new role definition with ResourceScopes parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-ResourceScopes` parameter specifies the resource scopes for the role definition. + +### Example 4: Creates a new role definition with TemplateId parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + TemplateId = '4dd5aa9c-cf4d-4895-a993-740d342802b9' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 4dd5aa9c-cf4d-4895-a993-740d342802b9 False False + +``` + +This command creates a new role definition with TemplateId parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-TemplateId` parameter specifies the template ID for the role definition. + +### Example 5: Creates a new role definition with Version parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + Version = '2' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 b69d16e9-b3f9-4289-a87f-8f796bd9fa28 False False + +``` + +This command creates a new role definition with Version parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Version` parameter specifies the version for the role definition. + +## Parameters + +### -Description + +Specifies a description for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role isn't available for assignment. Read-only when `isBuiltIn` is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceScopes + +Specifies the resource scopes for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolePermissions + +Specifies permissions for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateId + +Specifies the template ID for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version + +Specifies version for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition + +## Notes + +`New-EntraRoleDefinition` is an alias for `New-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..ba9841b7cd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraDirectoryRoleAssignment +description: This article provides details on the Remove-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleAssignment + +## Synopsis + +Delete a Microsoft Entra ID roleAssignment. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleAssignment + -UnifiedRoleAssignmentId + [] +``` + +## Description + +The `Remove-EntraDirectoryRoleAssignment` cmdlet removes a role assignment from Microsoft Entra ID. + +## Examples + +### Example 1: Remove a role assignment + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' +Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId Y1vFBcN4i0e3ngdNDocmngJAWGnAbFVAnJQyBBLv1lM-1 +``` + +This example removes the specified role assignment from Microsoft Entra ID. + +- `-Id` parameter specifies the role assignment ID. + +## Parameters + +### -UnifiedRoleAssignmentId + +The unique identifier of an object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Remove-EntraRoleAssignment` is an alias for `Remove-EntraDirectoryRoleAssignment`. + +## Related Links + +[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) + +[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d80058e54d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md @@ -0,0 +1,93 @@ +--- +title: Remove-EntraDirectoryRoleDefinition +description: This article provides details on the Remove-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleDefinition + +## Synopsis + +Delete a Microsoft Entra ID Directory roleDefinition object. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [] +``` + +## Description + +Delete a Microsoft Entra ID Directory roleDefinition object by ID. + +You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. + +## Examples + +### Example 1: Remove a specified role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 +``` + +This example demonstrates how to remove the specified role definition from Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. + +## Parameters + +### -UnifiedRoleDefinitionId + +The unique identifier of an object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Remove-EntraRoleDefinition` is an alias for `Remove-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d00e0c6818 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md @@ -0,0 +1,267 @@ +--- +title: Set-EntraDirectoryRoleDefinition +description: This article provides details on the Set-EntraDirectoryRoleDefinition command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Set-EntraDirectoryRoleDefinition + +## Synopsis + +Update an existing Microsoft Entra ID roleDefinition. + +## Syntax + +```powershell +Set-EntraDirectoryRoleDefinition + [-TemplateId ] + [-DisplayName ] + [-RolePermissions ] + -UnifiedRoleDefinitionId + [-Description ] + [-Version ] + [-IsEnabled ] + [-ResourceScopes ] + [] +``` + +## Description + +Updates a Microsoft Entra roleDefinition object identified by ID. You can't update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. + +## Examples + +### Example 1: Update an roleDefinition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -DisplayName 'UpdatedDisplayName' +``` + +This example updates the specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-DisplayName` parameter specifies the display name for the role definition. + +### Example 2: Update an roleDefinition with Description + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -Description 'MYROLEUPDATE1S' +``` + +This example updates the Description of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-Description` parameter specifies the description for the role definition. + +### Example 3: Update an roleDefinition with IsEnabled + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -IsEnabled $true +``` + +This example updates the IsEnabled of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-IsEnabled` parameter specifies whether the role definition is enabled. + +### Example 4: Update an roleDefinition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/standard/read") +$params = @{ + UnifiedRoleDefinitionId = $roleDefinition.Id + Description = 'Update' + DisplayName = 'Update' + ResourceScopes = '/' + IsEnabled = $false + RolePermissions = $RolePermissions + TemplateId = '54d418b2-4cc0-47ee-9b39-e8f84ed8e073' + Version = 2 +} + +Set-EntraDirectoryRoleDefinition @params +``` + +This example updates the RolePermissions, TemplateId, TemplateId, ResourceScopes of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Description` parameter specifies the description for the role definition. +- `-ResourceScopes` parameter specifies the resource scopes for the role definition. +- `-TemplateId` parameter specifies the template ID for the role definition. +- `-Version` parameter specifies the version for the role definition. + +## Parameters + +### -UnifiedRoleDefinitionId + +Specifies the roleDefinition object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Description + +Specifies a description for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role is not available for assignment. Read-only when `isBuiltIn` is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceScopes + +Specifies the resource scopes for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolePermissions + +Specifies permissions for the role definition. List of permissions included in the role. Read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateId + +Specifies the template ID for the role definition. A custom template ID can be set when `isBuiltIn` is `false`. This ID is typically used to keep the same identifier across different directories. It is read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version + +Specifies version for the role definition. Indicates version of the role definition. Read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Set-EntraRoleDefinition` is an alias for `Set-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md new file mode 100644 index 0000000000..cca67243d0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md @@ -0,0 +1,102 @@ +--- +title: Add-EntraGroupMember +description: This article explains the Add-EntraGroupMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupMember + +schema: 2.0.0 +--- + +# Add-EntraGroupMember + +## Synopsis + +Adds a member to a group. + +## Syntax + +```powershell +Add-EntraGroupMember + -GroupId + -RefObjectId + [] +``` + +## Description + +The Add-EntraGroupMember cmdlet adds a member to a group. + +## Examples + +### Example 1: Add a member to a group + +```powershell +Connect-Entra -Scopes 'GroupMember.ReadWrite.All' +$params = @{ + GroupId = 'dddddddd-2222-3333-5555-rrrrrrrrrrrr' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} + +Add-EntraGroupMember @params +``` + +This example demonstrates how to add a member to a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object that is assigned as an owner, manager, or member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupMember](Get-EntraGroupMember.md) + +[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md new file mode 100644 index 0000000000..2e74ae568b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md @@ -0,0 +1,108 @@ +--- +title: Add-EntraGroupOwner +description: This article explains the Add-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupOwner + +schema: 2.0.0 +--- + +# Add-EntraGroupOwner + +## Synopsis + +Adds an owner to a group. + +## Syntax + +```powershell +Add-EntraGroupOwner + -GroupId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraGroupOwner` cmdlet adds an owner to a Microsoft Entra ID group. Specify the `GroupId` and `RefObjectId` parameters to add an owner to a group. + +`-GroupId` - specifies the unique identifier (Object ID) of the group to which you want to add an owner. + +`-RefObjectId` - specifies the unique identifier (Object ID) of the owner to be added to the group. + +## Examples + +### Example 1: Add an owner to a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + GroupId = $group.ObjectId + RefObjectId = $user.ObjectId +} + +Add-EntraGroupOwner @params +``` + +This example demonstrates how to add an owner to a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object that will be assigned as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupOwner](Get-EntraGroupOwner.md) + +[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..df79fef7d9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md @@ -0,0 +1,111 @@ +--- +title: Add-EntraLifecyclePolicyGroup +description: This article provides details on the Add-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Add-EntraLifecyclePolicyGroup + +## Synopsis + +Adds a group to a lifecycle policy. + +## Syntax + +```powershell +Add-EntraLifecyclePolicyGroup + -GroupId + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Add-EntraLifecyclePolicyGroup` cmdlet adds a group to a lifecycle policy in Microsoft Entra ID. + +## Examples + +### Example 1: Add a group to the lifecycle policy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" +$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 +$params = @{ + GroupLifecyclePolicyId = $policy.Id + groupId = $group.ObjectId +} +Add-EntraLifecyclePolicyGroup @params +``` + +This example adds a group to the lifecycle policy. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy add to the group. +- `-GroupId` parameter specifies the ID of the group add to the Lifecycle Policy. + +## Parameters + +### -GroupId + +Specifies the ID of an Office365 group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of the lifecycle policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) + +[Remove-EntraLifecyclePolicyGroup](Remove-EntraLifecyclePolicyGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md new file mode 100644 index 0000000000..f85a857377 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md @@ -0,0 +1,293 @@ +--- +title: Get-EntraDeletedGroup +description: This article provides details on the Get-EntraDeletedGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedGroup + +schema: 2.0.0 +--- + +# Get-EntraDeletedGroup + +## Synopsis + +This cmdlet is used to retrieve the soft deleted groups in a Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDeletedGroup + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDeletedGroup + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDeletedGroup + -GroupId + [-All] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaDeletedGroup + [-All] + [-SearchString ] + [-Property ] + [] +``` + +## Description + +This cmdlet retrieves soft-deleted groups from a directory. When a group is deleted, it is soft deleted and can be recovered within 30 days. After 30 days, the group is permanently deleted and cannot be recovered. + +Please note that soft delete currently applies only to Unified Groups (also known as Office 365 Groups). + +## Examples + +### Example 1: Get deleted groups in the directory + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves all recoverable deleted groups in the Microsoft Entra ID. + +### Example 2: Get deleted groups in the directory using All parameter + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -All +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves all recoverable deleted groups in the directory, using All parameter. + +### Example 3: Get top two deleted groups + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -Top 2 +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +``` + +This cmdlet retrieves top two deleted groups in the directory. + +### Example 4: Get deleted groups containing string 'test2' + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -SearchString 'test2' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves deleted groups in the directory, containing the specified string. + +### Example 5: Get deleted groups filter by display name + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -Filter "displayName eq 'test21'" +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +``` + +This cmdlet retrieves deleted groups in the directory, having the specified display name. + +### Example 6: Get deleted group by GroupId + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -GroupId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +``` + +This cmdlet retrieves the deleted group specified by GroupId. + +- `-GroupId` parameter specifies the deleted group GroupId. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +The GroupId of the deleted group to be retrieved. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md new file mode 100644 index 0000000000..62d509e6c3 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md @@ -0,0 +1,309 @@ +--- +title: Get-EntraGroup +description: This article explains the Get-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroup + +schema: 2.0.0 +--- + +# Get-EntraGroup + +## Synopsis + +Gets a group. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraGroup + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraGroup + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraGroup + -GroupId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroup` cmdlet gets a group in Microsoft Entra ID. Specify the `ObjectId` parameter to get a specific group. + +## Examples + +### Example 1: Get all groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup +``` + +```Output +DisplayName Id MailNickname Description +----------- -- ------------ ----------- +SimpleTestGrp aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NickName +SimpleGroup bbbbbbbb-1111-2222-3333-cccccccccccc NickName +testGroupInAU10 cccccccc-2222-3333-4444-dddddddddddd testGroupInAU10 testGroupInAU10 +My new group dddddddd-3333-4444-5555-eeeeeeeeeeee NotSet New created group +SimpleGroup eeeeeeee-4444-5555-6666-ffffffffffff NickName +``` + +This example demonstrates how to get all groups from Microsoft Entra ID. + +### Example 2: Get a specific group by using an GroupId + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -GroupId 'pppppppp-4444-0000-8888-yyyyyyyyyyyy' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneaglegroup Crimson Eagle Group {Unified} +``` + +This example demonstrates how to retrieve specific group by providing ID. + +### Example 3: Get top five groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -Top 5 +``` + +```Output +DisplayName Id MailNickname Description +----------- -- ------------ ----------- +Contoso Group hhhhhhhh-3333-5555-3333-qqqqqqqqqqqq contosogroup Contoso Group +Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneagle Crimson Eagle Group +Bold Falcon tttttttt-0000-3333-9999-mmmmmmmmmmmm boldfalcon Bold Falcon Group +Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda +Misty Fox kkkkkkkk-3333-5555-1111-nnnnnnnnnnnn mistyfox Misty Fox Group +``` + +This example demonstrates how to get top five groups. + +### Example 4: Get a group by DisplayName + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -Filter "DisplayName eq 'Azure Panda'" +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda {Unified} +``` + +In this example, we retrieve group using the Display Name. + +### Example 5: Get groups that contain a search string + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -SearchString 'New' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +New Sparkling Deer bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq newsparklingdeer New Sparkling Deer Group {Unified} +New Golden Fox xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb newgoldenfox New Golden Fox {DynamicMembership} +``` + +This example demonstrates how to retrieve groups that include the text new in their display names from Microsoft Entra ID. + +### Example 6: Listing ownerless groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$allGroups = Get-EntraGroup -All +$groupsWithoutOwners = foreach ($group in $allGroups) { + $owners = Get-EntraGroupOwner -ObjectId $group.Id + if ($owners.Count -eq 0) { + $group + } +} +$groupsWithoutOwners | Format-Table DisplayName, Id, GroupTypes +``` + +```Output +DisplayName Id GroupTypes +----------- -- ---------- +My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} +HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} +``` + +This example demonstrates how to retrieve groups without owners. By identifying ownerless groups, IT admins can improve overall governance and operational efficiency. + +### Example 7: Listing empty groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$allGroups = Get-EntraGroup -All +$groupsWithoutMembers = foreach ($group in $allGroups) { + $members = Get-EntraGroupMember -ObjectId $group.Id + if ($members.Count -eq 0) { + $group + } +} +$groupsWithoutMembers | Format-Table DisplayName, Id, GroupTypes +``` + +```Output +DisplayName Id GroupTypes +----------- -- ---------- +My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} +HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} +``` + +This example demonstrates how to retrieve groups without members. By identifying memberless groups, IT admins can identify and clean up unused or obsolete groups that no longer serve a purpose. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +The unique identifier of a group in Microsoft Entra ID (GroupId) + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraGroup](New-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..724b696cec --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md @@ -0,0 +1,181 @@ +--- +title: Get-EntraGroupAppRoleAssignment +description: This article provides details on the Get-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraGroupAppRoleAssignment + +## Synopsis + +Gets a group application role assignment. + +## Syntax + +```powershell +Get-EntraGroupAppRoleAssignment + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupAppRoleAssignment` cmdlet gets a group application role assignment in Microsoft Entra ID. Specify the `GroupId` parameter to get a group application role assignment. + +## Examples + +### Example 1: Retrieve application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$GroupId = (Get-EntraGroup -Top 1).ObjectId +Get-EntraGroupAppRoleAssignment -GroupId $GroupId +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR +``` + +This example retrieves the application role assignments of a group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +### Example 2: Retrieve all application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -All +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR +``` + +This example retrieves all application role assignments of the specified group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +### Example 3: Retrieve top two application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -Top 2 +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +``` + +This example retrieves top two application role assignments of the specified group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) + +[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..9df4ac2bb7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md @@ -0,0 +1,134 @@ +--- +title: Get-EntraGroupLifecyclePolicy +description: This article provides details on the Get-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Get-EntraGroupLifecyclePolicy + +## Synopsis + +Retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. +If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraGroupLifecyclePolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupLifecyclePolicy` command retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. Specify the `-GroupLifecyclePolicyId` parameter to get the group lifecycle policy. +If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. + +## Examples + +### Example 1: Retrieve all groupLifecyclePolicies + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupLifecyclePolicy +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +eeeeeeee-4444-5555-6666-ffffffffffff example@contoso.com 200 Selected +``` + +This example demonstrates how to retrieve the properties and relationships of all groupLifecyclePolicies in Microsoft Entra ID. + +### Example 2: Retrieve properties of an groupLifecyclePolicy + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 Selected +``` + +This command is used to retrieve a specific Microsoft Group Lifecycle Policy. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +## Parameters + +### -GroupLifecyclePolicyId + +Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md new file mode 100644 index 0000000000..bdd0673a08 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md @@ -0,0 +1,214 @@ +--- +title: Get-EntraGroupMember +description: This article provides details on the Get-EntraGroupMember command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupMember + +schema: 2.0.0 +--- + +# Get-EntraGroupMember + +## Synopsis + +Gets a member of a group. + +## Syntax + +```powershell +Get-EntraGroupMember + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupMember` cmdlet gets a member of a group in Microsoft Entra ID. Specify the `GroupId` parameter to get a member of a group. + +In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: `microsoft.directory/groups/members/read`, `microsoft.directory/groups/members/limitedRead`, or `microsoft.directory/groups/hiddenMembers/read` (for hidden members). The following least privileged roles support this operation: + +- Group owners +- "Member" users +- "Guest" users (with limited read permissions) +- Directory Readers +- Directory Writers +- Groups Administrator +- User Administrator (includes hidden members) +- Exchange Administrator (includes hidden members) +- SharePoint Administrator (includes hidden members) +- Intune Administrator (includes hidden members) +- Teams Administrator (includes hidden members) +- Yammer Administrator (includes hidden members) + +To list members of a hidden group, the `Member.Read.Hidden` permission is also required. + +## Examples + +### Example 1: Get a group member by ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This example demonstrates how to retrieve group member by ID. + +- `-GroupId` Specifies the ID of a group. + +### Example 2: Get two group member + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'hhhhhhhh-8888-9999-8888-cccccccccccc' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This example demonstrates how to retrieve top two groups from Microsoft Entra ID. + +- `-GroupId` specifies the ID of a group. + +### Example 3: Get all members within a group by group ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +cccccccc-8888-9999-0000-dddddddddddd +``` + +This example retrieves all members within a group by group ID. + +- `-GroupId` specifies the ID of a group. + +### Example 4: Retrieve and Select Group Member Properties + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' | Select-Object DisplayName, '@odata.type' +``` + +```Output +displayName @odata.type +----------- ----------- +test1 #microsoft.graph.user +test2 #microsoft.graph.user +test2 #microsoft.graph.servicePrincipal +test3 #microsoft.graph.servicePrincipal +``` + +This example retrieves the members of a specified group by its `GroupId` and selects only the `DisplayName` and `@odata.type` properties for each member. + +- `-GroupId` specifies the ID of a group. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupMember](Add-EntraGroupMember.md) + +[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md new file mode 100644 index 0000000000..340e3463a9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md @@ -0,0 +1,189 @@ +--- +title: Get-EntraGroupOwner +description: This article provides details on the Get-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupOwner + +schema: 2.0.0 +--- + +# Get-EntraGroupOwner + +## Synopsis + +Gets an owner of a group. + +## Syntax + +```powershell +Get-EntraGroupOwner + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupOwner` cmdlet gets an owner of a group in Microsoft Entra ID. Specify `GroupId` parameter gets an owner of a group. + +In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with the `microsoft.directory/groups/owners/read` permission. The following least privileged roles support this operation: + +- Group owners +- Directory Readers +- Directory Writers +- Groups Administrator +- User Administrator + +## Examples + +### Example 1: Get a group owner by ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'vvvvvvvv-7777-9999-7777-jjjjjjjjjjjj' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve the owner of a specific group. + +- `-GroupId` Parameter specifies the ID of a group. + +### Example 2: Gets all group owners + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'zzzzzzzz-6666-8888-9999-pppppppppppp' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve the all owner of a specific group. + +- `-GroupId` Parameter specifies the ID of a group. + +### Example 3: Gets two group owners + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve the top two owners of a specific group. + +- `-GroupId` parameter specifies the ID of a group. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupOwner](Add-EntraGroupOwner.md) + +[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md new file mode 100644 index 0000000000..51986bf57f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraGroupPermissionGrant +description: This article provides details on the Get-EntraGroupPermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraGroupPermissionGrant + +## Synopsis + +Retrieves a list of permission grants consented to for a group. + +## Syntax + +```powershell +Get-EntraGroupPermissionGrant + -GroupId + [-Property ] + [] +``` + +## Description + +Retrieves a list of permission grants consented to for a group. + +## Examples + +### Example 1: List existing permission grants for the group + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupPermissionGrant -GroupId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' +``` + +```Output + Id : CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3 + ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 + ClientAppId : 44445555-eeee-6666-ffff-7777aaaa8888 + ResourceAppId : bbbb1111-cc22-3333-44dd-555555eeeeee + PermissionType : Application + Permission : Member.Read.Group +``` + +This cmdlet list existing permission grants for the specified group. + +## Parameters + +### -GroupId + +The unique identifier of group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.GetMSGroupPermissionGrantsResponse + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..1555496573 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md @@ -0,0 +1,105 @@ +--- +title: Get-EntraLifecyclePolicyGroup +description: This article provides details on the Get-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Get-EntraLifecyclePolicyGroup + +## Synopsis + +Retrieves the lifecycle policy object to which a group belongs. + +## Syntax + +```powershell +Get-EntraLifecyclePolicyGroup + -GroupId + [-Property ] + [] +``` + +## Description + +The `Get-EntraLifecyclePolicyGroup` retrieves the lifecycle policy object to which a group belongs. Specify the `-GroupId` parameter to get the lifecycle policy object to which a group belongs. + +## Examples + +### Example 1: Retrieve lifecycle policy object + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraLifecyclePolicyGroup -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +bbbbbbbb-1111-2222-3333-cccccccccccc admingroup@contoso.com 200 All +``` + +This example demonstrates how to retrieve lifecycle policy object by Id in Microsoft Entra ID. + +- `-GroupId` - specifies the ID of a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md new file mode 100644 index 0000000000..3973de997e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md @@ -0,0 +1,252 @@ +--- +title: Get-EntraObjectSetting +description: This article provides details on the Get-EntraObjectSetting command. + + +ms.topic: reference +ms.date: 07/03/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectSetting +schema: 2.0.0 +--- + +# Get-EntraObjectSetting + +## Synopsis + +Gets an object setting. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraObjectSetting + [-Top ] + [-All] + -TargetType + -TargetObjectId + [] +``` + +### GetById + +```powershell +Get-EntraObjectSetting + -Id [-All] + -TargetType + -TargetObjectId + [] +``` + +## Description + +The `Get-EntraObjectSetting` cmdlet retrieves an object setting from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +### Example 2: Retrieve a specific object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' + Id ='aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Get-EntraObjectSetting @params +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves Specific object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. +- `-Id` Parameter specifies the ID of a settings object. + +### Example 3: Retrieve top one object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params -Top 1 +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves top one object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +### Example 4: Retrieve all object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params -All +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves all records of object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a settings object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjectId + +Specifies the ID of the target object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetType + +Specifies the target type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md new file mode 100644 index 0000000000..22a87355e6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md @@ -0,0 +1,346 @@ +--- +title: New-EntraGroup +description: This article provides details on the New-EntraGroup command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroup + +schema: 2.0.0 +--- + +# New-EntraGroup + +## Synopsis + +Creates a Microsoft Entra ID group. + +## Syntax + +```powershell +New-EntraGroup + -DisplayName + [-GroupTypes ] + -SecurityEnabled + [-Description ] + -MailEnabled + -MailNickname + [-Visibility ] + [-IsAssignableToRole ] + [] +``` + +## Description + +The `New-EntraGroup` cmdlet creates a Microsoft Entra ID group. Specify the `DisplayName`, `MailNickname`, `MailEnabled` and `SecurityEnabled` parameters for creating a Microsoft Entra ID group. + +For information about creating dynamic groups, see: [Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership). + +**Notes on permissions:** + +- To create the group with users as owners or members, the app must have at least the `User.Read.All` permission. +- To create the group with other service principals as owners or members, the app must have at least the `Application.Read.All` permission. +- To create the group with either users or service principals as owners or members, the app must have at least the `Directory.Read.All` permission. + +## Examples + +### Example 1: Create a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq helpDeskAdminGroup {} +``` + +This example demonstrates how to create the new group. + +### Example 2: Create a group with Description parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group' + MailEnabled = $false + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $true + Description = 'Group assignable to role' +} + +New-EntraGroup @params +``` + +```Output + +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group zzzzzzzz-6666-8888-9999-pppppppppppp helpDeskAdminGroup Group assignable to role {} + +``` + +This example demonstrates how to create the new group with description parameter. + +### Example 3: Create a group with IsAssignableToRole parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + Description = 'Group assignable to role' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + IsAssignableToRole = $True +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj helpDeskAdminGroup Group assignable to role {} +``` + +This example demonstrates how to create the new group with IsAssignableToRole parameter. + +### Example 4: Create a group with Visibility parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + Description = 'Group assignable to role' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + Visibility = 'Private' +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 gggggggg-0000-4444-3333-llllllllllll helpDeskAdminGroup Group assignable to role {} +``` + +This example demonstrates how to create the new group with Visibility parameter. + +### Example 5: Create a group with GroupTypes parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group3' + Description = 'group des' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup1' + SecurityEnabled = $True + GroupTypes = 'Unified' +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group3 xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb helpDeskAdminGroup1 group des {Unified} +``` + +This example demonstrates how to create the new group with GroupTypes parameter. + +## Parameters + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailEnabled + +Specifies whether this group is mail enabled. + +Currently, you can't create mail enabled groups in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. +If MailEnabled is $False, you must still specify a mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Specifies whether the group is security enabled. +For security groups, this value must be $True. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a unified or dynamic group. + +Notes: + +- This parameter currently can't be used to create dynamic groups. To create a dynamic group in PowerShell, you must use the Entra module. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +This parameter determines the visibility of the group's content and members list. + +This parameter can take one of the following values: + +- "Public" - Anyone can view the contents of the group +- "Private" - Only members can view the content of the group +- "HiddenMembership" - Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value is "Public". + +Notes: + +- This parameter is only valid for groups that have the groupType set to "Unified". +- If a group has this attribute set to "HiddenMembership", it can't be changed later. +- Anyone can join a group that has this attribute set to "Public". If the attribute is set to Private or HiddenMembership, only owners can add new members to the group and requests to join the group need approval of the owners. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +Indicates whether group can be assigned to a role. This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) + +[Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..d70bac714b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md @@ -0,0 +1,151 @@ +--- +title: New-EntraGroupAppRoleAssignment +description: This article provides details on the New-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraGroupAppRoleAssignment + +## Synopsis + +Assign a group of users to an application role. + +## Syntax + +```powershell +New-EntraGroupAppRoleAssignment + -GroupId + -PrincipalId + -AppRoleId + -ResourceId + [] +``` + +## Description + +The `New-EntraGroupAppRoleAssignment` cmdlet assigns a group of users to an application role in Microsoft Entra ID. + +## Examples + +### Example 1: Assign a group of users to an application + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$appname = 'Box' +$spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" +$group = Get-EntraGroup -SearchString 'Contoso Team' +New-EntraGroupAppRoleAssignment -GroupId $group.ObjectId -PrincipalId $group.ObjectId -ResourceId $spo.ObjectId -AppRoleId $spo.Approles[1].id +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + AaBbCcDdEeFfGgHhIiJjKkLlMmNnOo1 00000000-0000-0000-0000-000000000000 3/13/2024 4:41:43 AM Contoso Team aaaaaaaa-bbbb-cccc-1111-222222222222 +3/13/2024 4:45:00 AM BbCcDdEeFfGgHhIiJjKkLlMmNnOoPp2 00000000-0000-0000-0000-000000000000 3/13/2024 4:45:00 AM Finance Group bbbbbbbb-cccc-dddd-2222-333333333333 +``` + +This example demonstrates how to assign a group of users to an application role in Microsoft Entra ID. + +- `GroupId`: The ID of the group to which you're assigning the app role. + +- `PrincipalId`: The ID of the group to which you're assigning the app role. + +- `ResourceId`: The ID of the resource service Principal, which has defined the app role. + +- `AppRoleId`: The ID of the appRole (defined on the resource service principal) to assign to the group. + +## Parameters + +### -AppRoleId + +Specifies the ID of the app role (defined on the resource service principal) to assign. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies the principal ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The unique identifier (ID) for the resource service principal for which the assignment is made. +Required on create. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) + +[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..78e3bb4b9f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md @@ -0,0 +1,138 @@ +--- +title: New-EntraGroupLifecyclePolicy +description: This article provides details on the New-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# New-EntraGroupLifecyclePolicy + +## Synopsis + +Creates a new groupLifecyclePolicy. + +## Syntax + +```powershell +New-EntraGroupLifecyclePolicy + -ManagedGroupTypes + -GroupLifetimeInDays + -AlternateNotificationEmails + [] +``` + +## Description + +Creates a new groupLifecyclePolicy in Microsoft Entra ID. + +## Examples + +### Example 1: Creates a new groupLifecyclePolicy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$Params = @{ + GroupLifetimeInDays = 99 + ManagedGroupTypes = 'Selected' + AlternateNotificationEmails = 'example@contoso.com' +} +New-EntraGroupLifecyclePolicy @params +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb example@contoso.com 99 Selected +``` + +This example creates a new groupLifecyclePolicy with a group lifetime of 99 days for a selected set of Office 365 groups. Renewal notification emails are sent to for groups without owners. + +- `-GroupLifetimeInDays` parameter specifies the number of days a group can exist before it needs to be renewed. +- `-ManagedGroupTypes` parameter allows the admin to select which office 365 groups the policy applies to. +- `-AlternateNotificationEmails` parameter specifies notification emails for group. + +## Parameters + +### -AlternateNotificationEmails + +Notification emails for groups without owners are sent to these email addresses, separated by a ';'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifetimeInDays + +The number of days a group can exist before it needs to be renewed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedGroupTypes + +This parameter allows the admin to select which Office 365 groups the policy applies to. +'None' creates the policy in a disabled state. +'All' applies the policy to every Office 365 group in the tenant. +'Selected' allows the admin to choose specific Office 365 groups to which the policy applies. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) + +[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md new file mode 100644 index 0000000000..ae746e39ed --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md @@ -0,0 +1,93 @@ +--- +title: Remove-EntraGroup +description: This article provides details on the Remove-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroup + +schema: 2.0.0 +--- + +# Remove-EntraGroup + +## Synopsis + +Removes a group. + +## Syntax + +```powershell +Remove-EntraGroup + -GroupId + [] +``` + +## Description + +The `Remove-EntraGroup` cmdlet removes a group from Microsoft Entra ID. Specify the `GroupId` parameter removes a group. + +Unified Group can be restored withing 30 days after deletion using the `Restore-EntraBetaDeletedDirectoryObject` cmdlet. Security groups can't be restored after deletion. + +**Notes on permissions:** + +The following conditions apply for apps to delete role-assignable groups: + +- For delegated scenarios, the app must be assigned the `RoleManagement.ReadWrite.Directory` delegated permission, and the calling user must be the creator of the group or be assigned at least the Privileged Role Administrator Microsoft Entra role. +- For app-only scenarios, the calling app must be the owner of the group or be assigned the `RoleManagement.ReadWrite.Directory` application permission or be assigned at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Remove a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroup -GroupId $group.Id +``` + +This example demonstrates how to remove a group in Microsoft Entra ID. + +- `GroupId` parameter specifies the group ID . + +## Parameters + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroup](New-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..c5306735b7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md @@ -0,0 +1,99 @@ +--- +title: Remove-EntraGroupAppRoleAssignment +description: This article provides details on the Remove-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraGroupAppRoleAssignment + +## Synopsis + +Delete a group application role assignment. + +## Syntax + +```powershell +Remove-EntraGroupAppRoleAssignment + -AppRoleAssignmentId + -GroupId +[] +``` + +## Description + +The `Remove-EntraGroupAppRoleAssignment` cmdlet removes a group application role assignment from Microsoft Entra ID. + +## Examples + +### Example 1: Remove group app role assignment + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupAppRoleAssignment -GroupId $group.Id -AppRoleAssignmentId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' +``` + +This example demonstrates how to remove the specified group application role assignment. +GroupId - Specifies the object ID of a group. +AppRoleAssignmentId - Specifies the object ID of the group application role assignment. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the object ID of the group application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) + +[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..d60bc7953d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraGroupLifecyclePolicy +description: This article provides details on the Remove-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Remove-EntraGroupLifecyclePolicy + +## Synopsis + +Deletes a groupLifecyclePolicies object + +## Syntax + +```powershell +Remove-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Remove-EntraGroupLifecyclePolicy` command deletes a groupLifecyclePolicies object in Microsoft Entra ID. Specify `Id` parameter deletes the groupLifecyclePolicies object. + +## Examples + +### Example 1: Remove a groupLifecyclePolicies + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' +``` + +This example demonstrates how to delete the groupLifecyclePolicies object that has the specified ID. You can use `Get-EntraGroupLifecyclePolicy` to get Id details. + +## Parameters + +### -GroupLifecyclePolicyId + +Specifies the ID of the groupLifecyclePolicies object that this cmdlet removes. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) + +[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md new file mode 100644 index 0000000000..ca01328299 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md @@ -0,0 +1,102 @@ +--- +title: Remove-EntraGroupMember +description: This article provides details on the Remove-EntraGroupMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupMember + +schema: 2.0.0 +--- + +# Remove-EntraGroupMember + +## Synopsis + +Removes a member from a group. + +## Syntax + +```powershell +Remove-EntraGroupMember + -GroupId + -MemberId + [] +``` + +## Description + +The `Remove-EntraGroupMember` cmdlet removes a member from a group in Microsoft Entra ID. Specify the `ObjectId` and `MemberId` parameters to remove a member from a group. + +## Examples + +### Example 1: Remove a member + +```powershell +Connect-Entra -Scopes 'GroupMember.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupMember -GroupId $group.Id -MemberId 'zzzzzzzz-6666-8888-9999-pppppppppppp' +``` + +This command removes the specified member from the specified group. + +GroupId - Specifies the object ID of a group in Microsoft Entra ID. + +MemberId - Specifies the ID of the member to remove. + +## Parameters + +### -MemberId + +Specifies the ID of the member to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupMember](Add-EntraGroupMember.md) + +[Get-EntraGroupMember](Get-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md new file mode 100644 index 0000000000..759c736651 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md @@ -0,0 +1,101 @@ +--- +title: Remove-EntraGroupOwner +description: This article provides details on the Remove-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupOwner + +schema: 2.0.0 +--- + +# Remove-EntraGroupOwner + +## Synopsis + +Removes an owner from a group. + +## Syntax + +```powershell +Remove-EntraGroupOwner + -OwnerId + -GroupId + [] +``` + +## Description + +The `Remove-EntraGroupOwner` cmdlet removes an owner from a group in Microsoft Entra ID. Specify the `GroupId` and `OwnerId` parameters to remove an owner from a group. + +## Examples + +### Example 1: Remove an owner + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupOwner -GroupId $group.Id -OwnerId 'xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb' +``` + +This example demonstrates how to remove an owner from a group in Microsoft Entra ID. + +GroupId - Specifies the ID of a group in Microsoft Entra ID. + +- `OwnerId` specifies the ID of an owner. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of an owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Add-EntraGroupOwner](Add-EntraGroupOwner.md) + +[Get-EntraGroupOwner](Get-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..888872cd48 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md @@ -0,0 +1,117 @@ +--- +title: Remove-EntraLifecyclePolicyGroup +description: This article provides details on the Remove-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Remove-EntraLifecyclePolicyGroup + +## Synopsis + +Removes a group from a lifecycle policy. + +## Syntax + +```powershell +Remove-EntraLifecyclePolicyGroup + -GroupId + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Remove-EntraLifecyclePolicyGroup` cmdlet removes a group from a lifecycle policy in Microsoft Entra ID. + +## Examples + +### Example 1: Remove lifecycle policy group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" +$policy = Get-EntraLifecyclePolicyGroup -Id $group.ObjectId +$params = @{ + GroupLifecyclePolicyId = $policy.Id + GroupId = $group.ObjectId +} +Remove-EntraLifecyclePolicyGroup @params +``` + +```Output +Value +----- +True +``` + +This example demonstrates how to remove a group from a lifecycle policy in Microsoft Entra ID with specified Id and groupId. + +- `-GroupLifecyclePolicyId` parameter specifies the lifecycle policy object ID. +- `-GroupId` parameter specifies the ID of Office365 group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of the lifecycle policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) + +[Add-EntraLifecyclePolicyGroup](Add-EntraLifecyclePolicyGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md new file mode 100644 index 0000000000..b8aeaa6a36 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md @@ -0,0 +1,84 @@ +--- +title: Reset-EntraLifeCycleGroup +description: This article provides details on the Reset-EntraLifeCycleGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup + +schema: 2.0.0 +--- + +# Reset-EntraLifeCycleGroup + +## Synopsis + +Renews a group by updating the RenewedDateTime property on a group to the current DateTime. + +## Syntax + +```powershell +Reset-EntraLifeCycleGroup + -Id + [] +``` + +## Description + +The `Reset-EntraLifeCycleGroup` renews a group by updating the RenewedDateTime property on a group to the current DateTime. +When a group is renewed, the group expiration is extended by the number of days defined in the policy. + +## Examples + +### Example 1: Renew a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +Reset-EntraLifeCycleGroup -Id 'hhhhhhhh-8888-9999-8888-cccccccccccc' +``` + +This example demonstrates how to renew a specified group. + +- `-Id` - Specifies the lifecycle policy object ID. + +## Parameters + +### -Id + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md new file mode 100644 index 0000000000..80f5ee8ca8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md @@ -0,0 +1,99 @@ +--- +title: Select-EntraGroupIdsContactIsMemberOf +description: This article provides details on the Select-EntraGroupIdsContactIsMemberOf command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsContactIsMemberOf + +## Synopsis + +Get groups in which a contact is a member. + +## Syntax + +```powershell +Select-EntraGroupIdsContactIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsContactIsMemberOf` cmdlet gets groups in Microsoft Entra ID in which a contact is a member. + +## Examples + +### Example 1: Get groups in which a contact is a member + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All,Group.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Filter "DisplayName eq 'Entra PowerShell Group'").ObjectId +$UserID = (Get-EntraContact -ObjectId 'hhhhhhhh-8888-9999-8888-cccccccccccc').ObjectId +Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups +``` + +This example demonstrates how to get groups in which a contact is a member. + +- `-ObjectId` parameter specifies the contact Object ID. +- `-GroupIdsForMembershipCheck` parameter specifies the group Object ID. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the object ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md new file mode 100644 index 0000000000..f0eabc7873 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md @@ -0,0 +1,101 @@ +--- +title: Select-EntraGroupIdsGroupIsMemberOf +description: This article provides details on the Select-EntraGroupIdsGroupIsMemberOf command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsGroupIsMemberOf + +## Synopsis + +Gets group IDs that a group is a member of. + +## Syntax + +```powershell +Select-EntraGroupIdsGroupIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsGroupIsMemberOf` cmdlet gets the groups that a specified group is a member of in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a group + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Top 1).ObjectId +$GroupId = (Get-EntraGroup -Top 1).ObjectId +Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupId -GroupIdsForMembershipCheck $Groups +``` + +This example gets the group membership of a group identified by $GroupId. Use `Get-EntraGroup` cmdlet to obtain group `ObjectId` value. + +- `-ObjectId` parameter specifies the group ID. +- `-GroupIdsForMembershipCheck` Specifies an array of group object IDs. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md new file mode 100644 index 0000000000..d5cb471ca8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md @@ -0,0 +1,110 @@ +--- +title: Select-EntraGroupIdsUserIsMemberOf +description: This article provides details on the Select-EntraGroupIdsUserIsMemberOf command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsUserIsMemberOf + +## Synopsis + +Selects the groups that a user is a member of. + +## Syntax + +```powershell +Select-EntraGroupIdsUserIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsUserIsMemberOf` cmdlet selects the groups that a user is a member of in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a user + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$myGroup = Get-EntraGroup -Filter "DisplayName eq ''" +$UserId = 'SawyerM@contoso.com' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = $myGroup.ObjectId +$Params = @{ + ObjectId = $UserId + GroupIdsForMembershipCheck = $Groups +} +Select-EntraGroupIdsUserIsMemberOf @Params +``` + +```Output +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example retrieves the group membership of a group for a user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-GroupIdsForMembershipCheck` parameter specifies the group Object Ids. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md new file mode 100644 index 0000000000..1886cefa89 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md @@ -0,0 +1,313 @@ +--- +title: Set-EntraGroup +description: This article provides details on the Set-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroup + +schema: 2.0.0 +--- + +# Set-EntraGroup + +## Synopsis + +Sets the properties for an existing Microsoft Entra ID group. + +## Syntax + +```powershell +Set-EntraGroup + -GroupId + [-DisplayName ] + [-GroupTypes ] + [-SecurityEnabled ] + [-Description ] + [-MailEnabled ] + [-MailNickname ] + [-Visibility ] + [-IsAssignableToRole ] + [] +``` + +## Description + +The `Set-EntraGroup` cmdlet sets the properties for an existing Microsoft Entra ID group. Specify the `GroupId` parameter to set the properties for an existing Microsoft Entra ID group. + +## Examples + +### Example 1: Update a group display name + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + DisplayName = 'UPDATE HelpDesk Team Leaders' +} +Set-EntraGroup @params +``` + +This command updates the display name of a specified group in Microsoft Entra ID. + +### Example 2: Update a group description + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + Description = 'This is my new group' +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a group description. + +### Example 3: Update a group mail nickname + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MailNickName = 'newnickname' +} +Set-EntraGroup @params +``` + +This command updates the mail nickname of a specified group in Microsoft Entra ID. + +### Example 4: Update a group security enabled + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + SecurityEnabled = $true +} +Set-EntraGroup @params +``` + +This command updates the security enabled of a specified group in Microsoft Entra ID. + +### Example 5: Update a group mail enabled + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MailEnabled = $false +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a group main enabled. + +### Example 6: Update a property for a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + Visibility = 'Private' + GroupTypes = 'DynamicMembership' + IsAssignableToRole = $true +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a property for an existing Microsoft Entra ID group. + +## Parameters + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a dynamic group. +To create a dynamic group, specify a value of DynamicMembership. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MailEnabled + +Indicates whether this group is mail enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Indicates whether the group is security enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +Specifies the visibility of the group's content and members list. +This parameter can take one of the following values: + +* "Public": Anyone can view the contents of the group. +* "Private": Only members can view the content of the group. +* "HiddenMembership": Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator, and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value is "Public." + +Notes: + +* This parameter is only valid for groups that have the groupType set to "Unified." +* If a group has this attribute set to "HiddenMembership," it can't be changed later. +* Anyone can join a group that has this attribute set to "Public." If the attribute is set to Private or HiddenMembership, only owner can add new members to the group and requests to join the group need approval of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroup](New-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..df8b9a3a99 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md @@ -0,0 +1,160 @@ +--- +title: Set-EntraGroupLifecyclePolicy +description: This article provides details on the Set-EntraGroupLifecyclePolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Set-EntraGroupLifecyclePolicy + +## Synopsis + +Updates a specific group Lifecycle Policy in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [-AlternateNotificationEmails ] + [-GroupLifetimeInDays ] + [-ManagedGroupTypes ] + [] +``` + +## Description + +The `Set-EntraGroupLifecyclePolicy` command updates a specific group Lifecycle Policy in Microsoft Entra ID. + +## Examples + +### Example 1: Updates group lifecycle policy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 +$params = @{ + GroupLifecyclePolicyId = $policy.Id + GroupLifetimeInDays = 200 + AlternateNotificationEmails = 'example@contoso.com' + ManagedGroupTypes = 'All' +} +Set-EntraGroupLifecyclePolicy @params +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 All +``` + +This example updates the specified groupLifecyclePolicy in Microsoft Entra ID. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy to be modified. +- `-GroupLifetimeInDays` parameter specifies the lifetime of the groups in the policy to 200 days. The GroupLifetimeInDays represents the number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. +- `-AlternateNotificationEmails` parameter specifies the email address that receives notifications about the policy. Multiple email address can be defined by separating email address with a semicolon. +- `-ManagedGroupTypes` parameter specifies which office 365 groups the policy applies to. Possible values are `All`, `Selected`, or `None`. +In this case, 'All' suggests that the policy manages all types of groups. + +## Parameters + +### -AlternateNotificationEmails + +Notification emails for groups that have no owners are sent to these email addresses. +List of email addresses separated by a ";". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifetimeInDays + +The number of days a group can exist before it needs to be renewed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ManagedGroupTypes + +Allows the admin to select which office 365 groups the policy applies to. + +- "None" will create the policy in a disabled state. +- "All" will apply the policy to every Office 365 group in the tenant. +- "Selected" will allow the admin to choose specific Office 365 groups that the policy applies to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) + +[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md new file mode 100644 index 0000000000..df6ead8bb6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md @@ -0,0 +1,291 @@ +--- +title: New-EntraInvitation +description: This article provides details on the New-EntraInvitation command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraInvitation + +schema: 2.0.0 +--- + +# New-EntraInvitation + +## Synopsis + +This cmdlet is used to invite a new external user to your directory. + +## Syntax + +```powershell +New-EntraInvitation + [-InvitedUser ] + [-InvitedUserType ] + -InvitedUserEmailAddress + [-SendInvitationMessage ] +-InviteRedirectUrl + [-InvitedUserMessageInfo ] [-InvitedUserDisplayName ] + [] +``` + +## Description + +This cmdlet is used to invite a new external user to your directory. + +Invitation adds an external user to the organization. When creating a new invitation, you have several options available: + +- On invitation creation, Microsoft Graph can automatically send an invitation email directly to the invited user, or your app can use the inviteRedeemUrl returned in the response to craft your own invitation (through your communication mechanism of choice) to the invited user. If you decide to have Microsoft Graph send an invitation email automatically, you can specify the content and language of the email by using invitedUserMessageInfo. + +- When the user is invited, a user entity (of userType Guest) is created and can be used to control access to resources. The invited user has to go through the redemption process to access any resources they have been invited to. + +To reset the redemption status for a guest user, the User.ReadWrite.All permission is the minimum required. + +For delegated scenarios, the signed-in user must have at least one of the following roles: Guest Inviter, Directory Writers, or User Administrator. Additionally, to reset the redemption status, the signed-in user must have the Helpdesk Administrator or User Administrator role. + +## Examples + +### Example 1: Invite a new external user to your directory + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example sent an email to the user who's email address is in the `-InvitedUserEmailAddress` parameter. + +When the user accepts the invitation, they're forwarded to the url as specified in the `-InviteRedirectUrl` parameter. + +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. + +### Example 2: Invite a new external user to your directory with InvitedUserDisplayName parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' + InvitedUserDisplayName = 'microsoftuser' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with `-InvitedUserDisplayName` parameter. + +- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user +- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. +- `-InvitedUserDisplayName`Parameter specifies the display name of the user. + +### Example 3: Invite a new external user to your directory with InvitedUserMessageInfo parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$a= New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo +$a.CustomizedMessageBody = 'Hi there, how are you' +$a.MessageLanguage = 'EN' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.microsoft.com' + InvitedUserMessageInfo = $a +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with InvitedUserMessageInfo parameter. + +- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. +- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. +- `-InvitedUserMessageInfo`Parameter specifies addition information to specify how the invitation message is sent. + +### Example 4: Invite a new external user to your directory with InvitedUserType parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.microsoft.com' + InvitedUserType = 'Guest' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +9e2b9f02-c2cb-4832-920d-81959f44e397 https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with InvitedUserType parameter. + +## Parameters + +### -InvitedUserDisplayName + +The display name of the user as it appears in your directory. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserEmailAddress + +The Email address to which the invitation is sent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserMessageInfo + +Addition information to specify how the invitation message is sent. + +```yaml +Type: InvitedUserMessageInfo +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUser + +An existing user object in the directory that you want to add or update the B2B credentials for. + +```yaml +Type: User +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserType + +The userType of the user being invited. By default, this is Guest. + +You can invite as Member if you are company administrator. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InviteRedirectUrl + +The URL to which the invited user is forwarded after accepting the invitation. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SendInvitationMessage + +A Boolean parameter that indicates whether or not an invitation message sent to the invited user. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +- See more information - . + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md new file mode 100644 index 0000000000..7667dcb6b1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md @@ -0,0 +1,57 @@ +--- +title: Enable-EntraAzureADAlias +description: This article provides details on the Enable-EntraAzureADAlias command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraAzureADAlias + +schema: 2.0.0 +--- + +# Enable-EntraAzureADAlias + +## Synopsis + +Enables aliases for AzureAD commands. + +## Syntax + +```powershell +Enable-EntraAzureADAlias +``` + +## Description + +Enables Azure AD command aliases in the current PowerShell session. + +## Examples + +### Example 1: Enable aliasing + +```powershell +Enable-EntraAzureADAlias +``` + +Enables all Azure AD prefixes for the current PowerShell session. + +## Parameters + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md new file mode 100644 index 0000000000..bdc29b6526 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md @@ -0,0 +1,120 @@ +--- +title: Test-EntraScript +description: This article provides details on the Test-EntraScript command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Test-EntraScript + +schema: 2.0.0 +--- + +# Test-EntraScript + +## Synopsis + +Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. + +## Syntax + +```powershell +Test-EntraScript + -Path + [-Content ] + [-Quiet] + [] +``` + +## Description + +Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. + +## Examples + +### Example 1 + +```powershell +Test-EntraScript -Path .\usercreation.ps1 -Quiet +``` + +Returns whether the script `usercreation.ps1` could run under Microsoft.Graph.Entra. + +### Example 2 + +```powershell +Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript +``` + +Returns a list of all scripts that wouldn't run under the Microsoft.Graph.Entra module, listing each issue with line and code. + +## Parameters + +### -Path + +Path to one or more script files to scan. +Or name of the content, when also specifying -Content + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: FullName, Name + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Content + +Code content to scan. +Used when scanning code that has no file representation (for example, +straight from a repository). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Quiet + +Only return $true or $ false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($ false) + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md new file mode 100644 index 0000000000..640ed63b0e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md @@ -0,0 +1,179 @@ +--- +title: Get-EntraAuditDirectoryLog +description: This article provides details on the Get-EntraAuditDirectoryLog command. + + +ms.topic: reference +ms.date: 07/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Get-EntraAuditDirectoryLog + +## Synopsis + +Get directory audit logs. + +## Syntax + +```powershell +Get-EntraAuditDirectoryLog +[-All] +[-Top ] +[-Filter ] +[] +``` + +## Description + +The `Get-EntraAuditDirectoryLog` cmdlet gets a Microsoft Entra ID audit log. + +Retrieve audit logs from Microsoft Entra ID, covering logs from various services such as user, app, device, and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (SSPR and admin resets), and self-service group management. + +## Examples + +### Example 1: Get all logs + +```powershell + Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' + Get-EntraAuditDirectoryLog -All +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId +-- ---------------- ------------------- -------- ------------- +Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd +Directory_bbbbbbbb-1111-2222-3333-cccccccccccc 17/07/2024 07:31:54 Update user UserManagement bbbb1111-cc22-3333-44dd-555555eeeeee +SSGM_cccccccc-2222-3333-4444-dddddddddddd 17/07/2024 07:13:08 GroupsODataV4_GetgroupLifecyclePolicies GroupManagement cccc2222-dd33-4444-55ee-666666ffffff + +``` + +This command gets all audit logs. + +### Example 2: Get first n logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Top 1 +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId LoggedB + yServic + e +-- ---------------- ------------------- -------- ------------- ------- +Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb_8IAPT_617717139 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd Core... + +``` + +This example returns the first N logs. + +### Example 3: Get audit logs containing a given ActivityDisplayName + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Filter "ActivityDisplayName eq 'Update rollout policy of feature'" -Top 1 +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId +-- ---------------- ------------------- -------- ------------- +Application Proxy_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 16/07/2024 05:13:49 Update rollout policy of feature Authentication aaaa0000-bb11-2222-33cc-444444dddddd +``` + +This command shows how to get audit logs by ActivityDisplayName. + +### Example 4: Get all audit logs with a given result + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Filter "result eq 'failure'" -All +``` + +This command shows how to get audit logs by the result. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraAuditDirectoryLogs` is an alias for `Get-EntraAuditDirectoryLog`. + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md new file mode 100644 index 0000000000..5f710b7c0d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md @@ -0,0 +1,213 @@ +--- +title: Get-EntraAuditSignInLog +description: This article provides details on the Get-EntraAuditSignInLog command. + + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Get-EntraAuditSignInLog + +## Synopsis + +Get audit logs of sign-ins. + +## Syntax + +```powershell +Get-EntraAuditSignInLog + [-SignInId] + [-All] + [-Top ] + [-Filter ] + [] +``` + +## Description + +The `Get-EntraAuditSignInLog` cmdlet gets the Microsoft Entra ID sign-in log. + +In addition to delegated permissions, the signed-in user must belong to at least one of the following Microsoft Entra roles to read sign-in reports: + +- Global Reader +- Reports Reader +- Security Administrator +- Security Operator +- Security Reader + +## Examples + +### Example 1: Get all logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -All +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none +cccccccc-2222-3333-4444-dddddddddddd Azure Active Directory PowerShell 22223333-cccc-4444-dddd-5555eeee6666 {} none +dddddddd-3333-4444-5555-eeeeeeeeeeee Azure Active Directory PowerShell 33334444-dddd-5555-eeee-6666ffff7777 {} none +``` + +This example returns all audit logs of sign-ins. + +### Example 2: Get the first two logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Top 2 +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none +``` + +This example returns the first two audit logs of sign-ins. + +### Example 3: Get audit logs containing a given AppDisplayName + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Filter "AppDisplayName eq 'Graph Explorer'" -Top 1 +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 +``` + +This example demonstrates how to retrieve sign-in logs by AppDisplayName. + +### Example 4: Get all sign-in logs between dates + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Filter "createdDateTime ge 2024-07-01T00:00:00Z and createdDateTime le 2024-07-14T23:59:59Z" +``` + +This example shows how to retrieve sign-in logs between dates. + +### Example 5: List failed sign-ins for a user + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" +$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize +``` + +This example demonstrates how to retrieve failed sign-ins for a user. + +## Parameters + +### -SignInId + +Specifies unique ID of the Audit Log. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraAuditSignInLogs` is an alias for `Get-EntraAuditSignInLog`. + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md new file mode 100644 index 0000000000..c735ee4d6c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md @@ -0,0 +1,156 @@ +--- +title: Get-EntraAuthorizationPolicy +description: This article provides details on the Get-EntraAuthorizationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy + +schema: 2.0.0 +--- + +# Get-EntraAuthorizationPolicy + +## Synopsis + +Gets an authorization policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAuthorizationPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraAuthorizationPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraAuthorizationPolicy` cmdlet gets a Microsoft Entra ID authorization policy. + +## Examples + +### Example 1: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraAuthorizationPolicy +``` + +```Output +DeletedDateTime Description DisplayName Id AllowEmailVerifiedUsersToJoinOrganization AllowI + nvites + From +--------------- ----------- ----------- -- ----------------------------------------- ------ + Used to manage authorization related settings across the company. Authorization Policy authorizationPolicy True every… +``` + +This example gets the Microsoft Entra ID authorization policy. + +### Example 2: Get an authorization policy by ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraAuthorizationPolicy -Id 'authorizationPolicy' | Format-List +``` + +```Output +allowInvitesFrom : everyone +allowUserConsentForRiskyApps : +id : authorizationPolicy +defaultUserRolePermissions : @{allowedToCreateSecurityGroups=True; allowedToReadBitlockerKeysForOwnedDevice=True; allowedToCreateTenants=True; + allowedToReadOtherUsers=True; allowedToCreateApps=False; permissionGrantPoliciesAssigned=System.Object[]} +blockMsolPowerShell : False +guestUserRoleId : a0b1b346-4d3e-4e8b-98f8-753987be4970 +displayName : Authorization Policy +@odata.context : https://graph.microsoft.com/v1.0/$metadata#policies/authorizationPolicy/$entity +allowedToSignUpEmailBasedSubscriptions : True +description : Used to manage authorization related settings across the company. +allowEmailVerifiedUsersToJoinOrganization : True +allowedToUseSSPR : True +DeletedDateTime : +AdditionalProperties : {} +``` + +This example gets the Microsoft Entra ID authorization policy. + +- `-Id` parameter specifies the unique identifier of the authorization policy. + +The response properties are: + +- `allowedToSignUpEmailBasedSubscriptions` - indicates whether users can sign up for email based subscriptions. +- `allowedToUseSSPR` - indicates whether administrators of the tenant can use the Self-Service Password Reset (SSPR). +- `allowEmailVerifiedUsersToJoinOrganization` - indicates whether a user can join the tenant by email validation. +- `allowInvitesFrom` - indicates who can invite guests to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. `everyone` is the default setting for all cloud environments except US Government. +- `allowUserConsentForRiskyApps` - indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. +- `blockMsolPowerShell` - to disable the use of the MSOnline PowerShell module set this property to `true`. This also disables user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This doesn't affect Microsoft Entra Connect or Microsoft Graph. +- `defaultUserRolePermissions` - specifies certain customizable permissions for default user role. +- `description` - description of this policy. +- `displayName` - display name for this policy. +- `enabledPreviewFeatures` - list of features enabled for private preview on the tenant. +- `guestUserRoleId` -represents role templateId for the role that should be granted to guests. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). +- `permissionGrantPolicyIdsAssignedToDefaultUserRole` - indicates if user consent to apps is allowed, and if it is, the app consent policy that governs the permission for users to grant consent. Values should be in the format `managePermissionGrantsForSelf.{id}` for user consent policies or `managePermissionGrantsForOwnedResource.{id}` for resource-specific consent policies, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. + +## Parameters + +### -Id + +Specifies the unique identifier of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraAuthorizationPolicy](Set-EntraAuthorizationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..406c7ef223 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md @@ -0,0 +1,135 @@ +--- +title: Get-EntraConditionalAccessPolicy +description: This article provides details on the Get-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Get-EntraConditionalAccessPolicy + +## Synopsis + +Gets a Microsoft Entra ID conditional access policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraConditionalAccessPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraConditionalAccessPolicy + -PolicyId + [-Property ] + [] +``` + +## Description + +This cmdlet allows an admin to get the Microsoft Entra ID conditional access policy. +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Retrieves a list of all conditional access policies in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraConditionalAccessPolicy +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled +ffffffff-5555-6666-7777-aaaaaaaaaaaa 2/27/2024 6:26:00 AM ConditionalAccessPolicy 2/29/2024 2:41:34 PM disabled +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 2/27/2024 6:30:48 AM ConditionalAccessPolicy 2/29/2024 2:43:53 PM disabled +``` + +This example retrieves a list of all conditional access policies in Microsoft Entra ID. + +### Example 2: Retrieves a conditional access policy in Microsoft Entra ID with given ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraConditionalAccessPolicy -PolicyId 'eeeeeeee-4444-5555-6666-ffffffffffff' +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled +``` + +This example retrieves a specified conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of a conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..b4dd3a5fd2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md @@ -0,0 +1,212 @@ +--- +title: Get-EntraFeatureRolloutPolicy +description: This article provides details on the Get-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Get-EntraFeatureRolloutPolicy + +## Synopsis + +Gets the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraFeatureRolloutPolicy + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraFeatureRolloutPolicy + [-SearchString ] + [] +``` + +### GetById + +```powershell +Get-EntraFeatureRolloutPolicy + -Id + [] +``` + +## Description + +The `Get-EntraFeatureRolloutPolicy` cmdlet allows an admin to get the policy for cloud authentication rollout (users moving from federation to cloud auth) in Microsoft Entra ID. + +This policy consists of one or two FeatureRolloutPolicy objects. These objects hold the groups assigned for cloud authentication (Pass-through authentication or Password Hash Sync) and groups assigned for Seamless single sign-on. + +## Examples + +### Example 1: Retrieves a list of all cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False True +bbbbbbbb-1111-2222-3333-cccccccccccc Feature-Rollout-Policy change emailAsAlternateId False False +``` + +This command retrieves a list of all cloud authentication roll-out policies in Microsoft Entra ID. + +### Example 2: Retrieves cloud authentication roll-out in Microsoft Entra ID with given ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output + +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False + +``` + +This example retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +- `-Id` - Specify The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +### Example 3: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Search String + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -SearchString 'Feature-Rollout-Policy' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False +``` + +This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +### Example 4: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Filter parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -Filter "Description eq 'Feature-Rollout-Policy'" +``` + +```Output + +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False + +``` + +This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.MsFeatureRolloutPolicy + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md new file mode 100644 index 0000000000..358563649f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md @@ -0,0 +1,140 @@ +--- +title: Get-EntraIdentityProvider +description: This article provides details on the Get-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Get-EntraIdentityProvider + +## Synopsis + +This cmdlet is used to retrieve the configured identity providers in the directory. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraIdentityProvider + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraIdentityProvider + -IdentityProviderBaseId + [-Property ] + [] +``` + +## Description + +The `Get-EntraIdentityProvider` cmdlet is used to retrieve the identity providers that have been configured in the directory. +These identity providers can be used to allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C. + +Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. +For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. +The Gmail user will use their Google account credentials to authenticate and access the documents. + +The current set of identity providers can be Microsoft, Google, Facebook, Amazon, or LinkedIn. + +## Examples + +### Example 1: Retrieve all identity providers + +```powershell +Connect-Entra -Scopes 'IdentityProvider.Read.All' +Get-EntraIdentityProvider +``` + +```Output +Id DisplayName +-- ----------- +AADSignup-OAUTH Directory Sign up +Google-OAUTH Test +EmailOtpSignup-OAUTH Email One Time Passcode +MSASignup-OAUTH Microsoft Account +``` + +This example retrieves the list of all configured identity providers and their properties. + +### Example 2: Retrieve identity provider by Id + +```powershell +Connect-Entra -Scopes 'IdentityProvider.Read.All' +Get-EntraIdentityProvider -IdentityProviderBaseId Google-OAUTH +``` + +```Output +Id DisplayName +-- ----------- +Google-OAUTH GoogleName +``` + +This example retrieves the properties for the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. + +## Parameters + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..edab5a7bd4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md @@ -0,0 +1,138 @@ +--- +title: Get-EntraNamedLocationPolicy +description: This article provides details on the Get-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Get-EntraNamedLocationPolicy + +## Synopsis + +Gets a Microsoft Entra ID named location policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraNamedLocationPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraNamedLocationPolicy + -PolicyId + [-Property ] + [] +``` + +## Description + +This cmdlet allows an admin to get the Microsoft Entra ID named location policies. + +Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. + +## Examples + +### Example 1: Retrieves a list of all named location policies in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraNamedLocationPolicy +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee 31/07/2024 9:53:10 NamedLocation 31/07/2024 9:53:10 +eeeeeeee-4444-5555-6666-ffffffffffff 31/07/2024 4:38:42 NamedLocation1 31/07/2024 4:38:42 +ffffffff-5555-6666-7777-aaaaaaaaaaaa 01/08/2024 4:39:42 NamedLocation2 01/08/2024 4:39:42 +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 01/08/2024 4:57:03 NamedLocation3 01/08/2024 4:57:03 +``` + +This command retrieves a list of all named location policies in Microsoft Entra ID. + +### Example 2: Retrieves a named location policy by Id + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraNamedLocationPolicy -PolicyId 'dddddddd-3333-4444-5555-eeeeeeeeeeee' +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee 3/1/2024 9:53:10 AM NamedLocation 3/1/2024 9:53:10 AM +``` + +This example retrieves a specified named location policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the policy Id of a named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md new file mode 100644 index 0000000000..7d77a9299d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md @@ -0,0 +1,190 @@ +--- +title: Get-EntraOAuth2PermissionGrant +description: This article provides details on the Get-EntraOAuth2PermissionGrant Command. + + +ms.topic: reference +ms.date: 10/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraOAuth2PermissionGrant + +## Synopsis + +Gets OAuth2PermissionGrant entities. + +## Syntax + +```powershell +Get-EntraOAuth2PermissionGrant + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraOAuth2PermissionGrant` cmdlet gets OAuth2PermissionGrant entities in Microsoft Entra ID. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator +- Directory Readers +- Global Reader + +## Examples + +### Example 1: Get the OAuth2 permission grants + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read +H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read +``` + +This command gets the OAuth2 permission grants. + +### Example 2: Get all the OAuth2 permission grants + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant -All +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read +H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read +``` + +This command gets all the OAuth2 permission grants. + +### Example 3: Get OAuth2 permission grants for a user in a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Helpdesk Application'" +Get-EntraOAuth2PermissionGrant | Where-Object {$_.ClientId -eq $servicePrincipal.Id -and $_.PrincipalId -eq $user.Id} | Format-List +``` + +```Output +ObjectId : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 +ClientId : 22223333-cccc-4444-dddd-5555eeee6666 +ConsentType : Principal +Id : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 +PrincipalId : aaaaaaaa-bbbb-cccc-1111-222222222222 +ResourceId : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 +Scope : User.Read.All openid profile offline_access Organization.Read.All User.ReadWrite.All Device.Read.All Device.ReadWrite.All Directory.Read.All User.Read RoleManagement.ReadWrite.Directory Group.ReadWrite.All +AdditionalProperties : {} +``` + +This example gets the OAuth2 permission grants for a user in a service principal. + + +### Example 4: Get top 2 OAuth2 permission grants record + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant -Top 2 +``` + +```output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +``` + +This command retrieves the top 2 OAuth2 permission grant records. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) +[New-EntraOAuth2PermissionGrant](New-EntraOauth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..35e31777dd --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md @@ -0,0 +1,214 @@ +--- +title: Get-EntraPermissionGrantConditionSet +description: This article provides details on the Get-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Get-EntraPermissionGrantConditionSet + +## Synopsis + +Get a Microsoft Entra ID permission grant condition set by ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPermissionGrantConditionSet + -ConditionSetType + -PolicyId + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [-Property ] + [] +``` + +## Description + +Get a Microsoft Entra ID permission grant condition set object by ID. + +## Examples + +### Example 1: Get all permission grant condition sets that are included in the permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets all permission grant condition sets that are included in the policy. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. + +### Example 2: Get all permission grant condition sets that are excluded in the permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'excludes' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +bbbbbbbb-1111-2222-3333-cccccccccccc False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +cccccccc-2222-3333-4444-dddddddddddd False {44445555-eeee-6666-ffff-7777gggg8888} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets all permission grant condition sets that are excluded in the policy. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. + +### Example 3: Get a permission grant condition set + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets a permission grant condition set specified by Id. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of the permission grant condition set object. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..800032dcc0 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md @@ -0,0 +1,134 @@ +--- +title: Get-EntraPermissionGrantPolicy +description: This article provides details on the Get-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Get-EntraPermissionGrantPolicy + +## Synopsis + +Gets a permission grant policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPermissionGrantPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraPermissionGrantPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraPermissionGrantPolicy` cmdlet gets a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Get all permission grant policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +Get-EntraPermissionGrantPolicy +``` + +```Output +DeletedDateTime Description +--------------- ----------- + Includes all application permissions (app roles), for all APIs, for any client application. + Includes all chat resoruce-specific application permissions, for all APIs, for any client application. + (Deprecated) Includes all team resource-specific application permissions, for all APIs, for any client application. +``` + +This command gets all the permission grant policies. + +### Example 2: Get a permission grant policy by ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +Get-EntraPermissionGrantPolicy -Id 'testtenant-sampleapp-permissions' +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + Permissions for sample app in test tenant Sample app permissions testtenant-sampleapp-permissions +``` + +This command gets the specified permission grant policy. + +- `Id` parameter specifies the permission grant policy ID. + +## Parameters + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md new file mode 100644 index 0000000000..77785c64c1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md @@ -0,0 +1,196 @@ +--- +title: Get-EntraPolicy +description: This article provides details on the Get-EntraPolicy command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPolicy + +schema: 2.0.0 +--- + +# Get-EntraPolicy + +## Synopsis + +Gets a policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPolicy + [-Top ] + [-All] + [] +``` + +### GetById + +```powershell +Get-EntraPolicy + -Id + [-All] + [] +``` + +## Description + +The `Get-EntraPolicy` cmdlet gets a policy in Microsoft Entra ID. Specify `Id` parameter to get a policy. + +## Examples + +### Example 1: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc +{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example shows how to return all policies. + +### Example 2: Get policy using Display Name + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + Permissions consentable based on Microsoft's current recommendations. Microsoft User Default Recommended Policy microsoft-user-default-recommended +``` + +This example shows how to get a specific policy using Display Name. + +### Example 3: Get a policy with specific ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -Id 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True +``` + +This example demonstrated how to receive policy with specific ID. + +- `Id` parameter specifies the unique policy ID, which you want to receive. In this example, `bbbbbbbb-1111-2222-3333-cccccccccccc` represents the ID of the policy. + +### Example 4: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -All +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc +{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example demonstrates how to retrieve all policies in Microsoft Entra ID. + +### Example 5: Get the top one policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -Top 1 +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True +``` + +This example demonstrates how to retrieve top one policies in Microsoft Entra ID. + +## Parameters + +### -Id + +The Id of the policy you want to retrieve. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all policies. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPolicy](New-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..a26bfd778e --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md @@ -0,0 +1,186 @@ +--- +title: Get-EntraTrustedCertificateAuthority +description: This article provides details on the Get-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Get-EntraTrustedCertificateAuthority + +## Synopsis + +Gets the trusted certificate authority. + +## Syntax + +```powershell +Get-EntraTrustedCertificateAuthority + [-TrustedIssuerSki ] + [-TrustedIssuer ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraTrustedCertificateAuthority` cmdlet gets the trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl1 +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : https://deltaexample.crl +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 0...} +TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory. + +### Example 2: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuer + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority -TrustedIssuer 'CN=mscmdlet' +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl1 +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : https://deltaexample.crl +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C +``` + +This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuer. + +- `-TrustedIssuer` parameter specifies the trusted issuer. + +### Example 3: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority -TrustedIssuerSki 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 0...} +TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki. + +- `-TrustedIssuerSki` parameter specifies the trusted issuer ski. + +## Parameters + +### -TrustedIssuer + +Specifies a trusted issuer. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TrustedIssuerSki + +Specifies a trusted issuer ski. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..3b9cb44f36 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md @@ -0,0 +1,278 @@ +--- +title: New-EntraConditionalAccessPolicy +description: This article provides details on the New-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# New-EntraConditionalAccessPolicy + +## Synopsis + +Creates a new conditional access policy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraConditionalAccessPolicy + [-Id ] + [-DisplayName ] + [-State ] + [-Conditions ] + [-GrantControls ] + [-SessionControls ] + [] +``` + +## Description + +This cmdlet allows an admin to create new conditional access policy in Microsoft Entra ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Creates a new conditional access policy in Microsoft Entra ID that require MFA to access Exchange Online + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = 'all' +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = 'OR' +$controls.BuiltInControls = 'mfa' + +$params = @{ + DisplayName = 'MFA policy' + State = 'Enabled' + Conditions = $conditions + GrantControls = $controls +} + +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:29:09 MFA policy enabled +``` + +This command creates a new conditional access policy in Microsoft Entra ID that requires MFA to access Exchange Online. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +### Example 2: Creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = 'all' +$conditions.Locations = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition +$conditions.Locations.IncludeLocations = '5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9' +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = 'OR' +$controls.BuiltInControls = 'block' + +$params = @{ + DisplayName = 'MFA policy' + State = 'Enabled' + Conditions = $conditions + GrantControls = $controls +} + +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 MFA policy enabled +``` + +This command creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. + +### Example 3: Use all conditions and controls + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' + +$Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") +$Condition.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$Condition.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" +$Condition.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$Condition.Users.IncludeUsers = "all" + +$Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$Controls._Operator = "AND" +$Controls.BuiltInControls = @("mfa") + +$SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls +$ApplicationEnforcedRestrictions = New-Object Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions +$ApplicationEnforcedRestrictions.IsEnabled = $true +$SessionControls.applicationEnforcedRestrictions = $ApplicationEnforcedRestrictions +$params = @{ + DisplayName = "ConditionalAccessPolicy" + Conditions = $conditions + GrantControls = $controls + SessionControls = $SessionControls + } +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 ConditionalAccessPolicy enabled +``` + +This example creates new conditional access policy in Microsoft Entra ID with all the conditions and controls. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +## Parameters + +### -DisplayName + +Specifies the display name of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Conditions + +Specifies the conditions for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessConditionSet +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GrantControls + +Specifies the controls for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessGrantControls +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionControls + +Enables limited experiences within specific cloud applications. + +```yaml +Type: ConditionalAccessSessionControls +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..e276f16fd8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md @@ -0,0 +1,224 @@ +--- +title: New-EntraFeatureRolloutPolicy +description: This article provides details on the New-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy + +schema: 2.0.0 +--- + +# New-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to create the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraFeatureRolloutPolicy + -Feature + -IsEnabled + [-Description ] + [-IsAppliedToOrganization ] + [-AppliesTo ] + -DisplayName + [] +``` + +## Description + +The `New-EntraFeatureRolloutPolicy` cmdlet allows an admin to create the policy for cloud authentication roll-out (users moving from federation to cloud auth) in Microsoft Entra ID. + +The policy admin can identify whether the users authenticate using password hashes in Microsoft Entra ID (Password hash-sync) or Microsoft Entra ID on-premises directly (Pass-through authentication). + +## Examples + +### Example 1: Creates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Feature = 'PassthroughAuthentication' + DisplayName = 'FeatureRolloutPolicy' + IsEnabled = $false +} +New-EntraFeatureRolloutPolicy @params +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False + +``` + +This example creates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. + +- `-IsEnabled` specifies the status of cloud authentication roll-out policy. + +### Example 2: Creates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Feature = 'PassthroughAuthentication' + DisplayName = 'FeatureRolloutPolicy' + IsEnabled = $false + IsAppliedToOrganization = $false +} +New-EntraFeatureRolloutPolicy @params +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False + +``` + +This command creates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. + +- `-IsEnabled` specifies the status of cloud authentication roll-out policy. + +- `-IsAppliedToOrganization` specifies if the cloud authentication roll-out policy applied to the entire organization. + +## Parameters + +### -DisplayName + +Specifies the display name of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Feature + +Specifies a feature assigned to the cloud authentication roll-out policy. + +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +```yaml +Type: FeatureEnum +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies the status of cloud authentication roll-out policy. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliesTo + +Specifies a list of Microsoft Entra ID objects that is assigned to the feature. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAppliedToOrganization + +Specifies if the cloud authentication roll-out policy applied to the entire organization. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.MsFeatureRolloutPolicy + +## Notes + +## Related Links + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md new file mode 100644 index 0000000000..246056cf38 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md @@ -0,0 +1,170 @@ +--- +title: New-EntraIdentityProvider +description: This article provides details on the New-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraIdentityProvider + +schema: 2.0.0 +--- + +# New-EntraIdentityProvider + +## Synopsis + +Configure a new identity provider in the directory. + +## Syntax + +```powershell +New-EntraIdentityProvider + -Type + -ClientSecret + -ClientId + [-Name ] + [] +``` + +## Description + +The `New-EntraIdentityProvider` cmdlet is used to configure an identity provider in the directory. + +Adding an identity provider will allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C using the identity provider. + +Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. + +For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. The Gmail user will use their Google account credentials to authenticate and access the documents. + +The current set of identity providers can be: + +- Microsoft +- Google +- Facebook +- Amazon +- LinkedIn + +The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add LinkedIn identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + Type = 'LinkedIn' + Name = 'LinkedInName' + ClientId = 'LinkedInAppClientId' + ClientSecret = 'LinkedInAppClientSecret' +} + +New-EntraIdentityProvider @params +``` + +```Output +Id DisplayName +-- ----------- +LinkedIn-OAUTH LinkedInName +``` + +This example adds a LinkedIn identity provider. + +- `-Type` parameter specifies the identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. +- `-Name` parameter specifies the display name of the identity provider. +- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. +- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. + +## Parameters + +### -ClientId + +The client identifier for the application, obtained during the application's registration with the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecret + +The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The display name of the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. + +For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..997bf4368b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md @@ -0,0 +1,236 @@ +--- +title: New-EntraNamedLocationPolicy +description: This article provides details on the New-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# New-EntraNamedLocationPolicy + +## Synopsis + +Creates a new named location policy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraNamedLocationPolicy + [-OdataType ] + [-Id ] + [-DisplayName ] + [-IpRanges ] + [-IsTrusted ] + [-CountriesAndRegions ] + [-IncludeUnknownCountriesAndRegions ] + [] +``` + +## Description + +This cmdlet allows an admin to create new named location policy in Microsoft Entra ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Creates a new Ip named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange +$ipRanges.cidrAddress = '6.5.4.3/32' +$params = @{ + OdataType = '#microsoft.graph.ipNamedLocation' + DisplayName = 'IP named location policy' + IsTrusted = $false + IpRanges = $ipRanges +} + +New-EntraNamedLocationPolicy @params +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +bbbbbbbb-1111-2222-3333-cccccccccccc 31-07-2024 10:45:27 IP named location policy 31-07-2024 10:45:27 +``` + +This command creates a new country named location policy in Microsoft Entra ID. + +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. +- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. + +### Example 2: Creates a new country named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + OdataType = '#microsoft.graph.countryNamedLocation' + DisplayName = 'Country named location policy' + CountriesAndRegions = 'IN' + IncludeUnknownCountriesAndRegions = $false +} + +New-EntraNamedLocationPolicy @params +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +cccccccc-2222-3333-4444-dddddddddddd 31-07-2024 10:46:16 Country named location policy 31-07-2024 10:46:16 +``` + +This command creates a new country named location policy in Microsoft Entra ID. + +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-CountriesAndRegions` parameter specifies the countries and regions for the named location policy. +- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. + +## Parameters + +### -OdataType + +Specifies the OData type of a named location policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpRanges + +List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsTrusted + +Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CountriesAndRegions + +Specifies the countries and regions for the named location policy in Microsoft Entra ID. List of countries and/or regions in the two-letter format specified by ISO 3166-2. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeUnknownCountriesAndRegions + +Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [Create namedLocation](/graph/api/conditionalaccessroot-post-namedlocations). + +## Related Links + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md new file mode 100644 index 0000000000..85c6a167e4 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md @@ -0,0 +1,188 @@ +--- +title: New-EntraOauth2PermissionGrant +description: This article provides details on the New-EntraOauth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/28/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant + +schema: 2.0.0 +--- + +# New-EntraOauth2PermissionGrant + +## Synopsis + +Create a delegated permission grant using an oAuth2PermissionGrant object. This grant allows a client service principal to access a resource service principal on behalf of a signed-in user, with access restricted to the specified delegated permissions. + +## Syntax + +```powershell +New-EntraOauth2PermissionGrant + -ClientId + -ConsentType + -ResourceId + [-PrincipalId ] + [-Scope ] + [] +``` + +## Description + +The `New-EntraOauth2PermissionGrant` cmdlet creates a delegated permission grant using an oAuth2PermissionGrant object. This grant authorizes a client service principal to access a resource service principal on behalf of a signed-in user, with access limited to the specified delegated permissions. + +## Examples + +### Example 1: To grant authorization to impersonate all users + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" +$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" +$params = @{ + ClientId = $servicePrincipal.Id + ConsentType = 'AllPrincipals' + ResourceId = $graphApp.Id + Scope = 'Directory.Read.All' + StartTime = Get-Date + ExpiryTime = (Get-Date).AddYears(1) +} +New-EntraOauth2PermissionGrant @params +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... + +``` + +This command Grant authorization to impersonate all users. + +### Example 2: To grant authorization to impersonate a specific user + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" +$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + ClientId = $servicePrincipal.Id + ConsentType = 'Principal' + PrincipalId = $user.Id + ResourceId = $graphApp.Id + Scope = 'Directory.Read.All' + StartTime = Get-Date + ExpiryTime = (Get-Date).AddYears(1) +} +New-EntraOauth2PermissionGrant @params +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... +``` + +This command Grant authorization to impersonate a specific user. + +## Parameters + +### -ClientId + +The object ID (not appId) of the client service principal for the application, which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentType + +Indicates whether the client application is authorized to impersonate all users or only a specific user. + +- `AllPrincipals`: Authorizes the application to impersonate all users. +- `Principal`: Authorizes the application to impersonate a specific user. +An administrator can grant consent on behalf of all users. In some cases, non-admin users are authorized to consent on behalf of themselves for certain delegated permissions. This parameter is required and supports the $filter query (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The ID of the resource service principal to which access is authorized. This identifies the API, which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrincipalId + +The ID of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal, If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope + +A space-separated list of the claim values for delegated permissions, which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3,850 characters in length. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## RELATED LINKS + +[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) +[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..2f1cf9baf9 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md @@ -0,0 +1,372 @@ +--- +title: New-EntraPermissionGrantConditionSet +description: This article provides details on the New-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# New-EntraPermissionGrantConditionSet + +## Synopsis + +Create a new Microsoft Entra ID permission grant condition set in a given policy. + +## Syntax + +```powershell +New-EntraPermissionGrantConditionSet + -PolicyId + -ConditionSetType + [-Permissions ] + [-ClientApplicationTenantIds ] + [-ClientApplicationIds ] + [-ResourceApplication ] + [-PermissionType ] + [-PermissionClassification ] + [-ClientApplicationsFromVerifiedPublisherOnly ] + [-ClientApplicationPublisherIds ] + [] +``` + +## Description + +Create a new Microsoft Entra ID permission grant condition set object in an existing policy. + +## Examples + +### Example 1: Create a basic permission grant condition set in an existing policy with all build in values + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'includes' +PermissionType = 'delegated' +} + +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions +-- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- +aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {all} +``` + +This command creates a basic permission grant condition set in an existing policy with all build in values. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. + +### Example 2: Create a permission grant condition set in an existing policy that includes specific permissions for a resource application + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'includes' +PermissionType = 'delegated' +Permissions = @($permission) +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +} + +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions +-- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- +aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {8b590... +``` + +This command creates a permission grant condition set in an existing policy that includes specific permissions for a resource application. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. + +### Example 3: Create a permission grant condition set in an existing policy that is excluded + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'excludes' +PermissionType = 'delegated' +Permissions = @('All') +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +PermissionClassification = 'low' +ClientApplicationsFromVerifiedPublisherOnly = $true +ClientApplicationIds = @('All') +ClientApplicationTenantIds = @('All') +ClientApplicationPublisherIds = @('All') +} +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification +-- ------------------------------- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------- +dddd3333-ee44-5555-66ff-777777aaaaaa False {all} {all} {all} True low +``` + +This command creates a permission grant condition set in an existing policy that is excluded. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. + +### Example 4: Create a permission grant condition set in an existing policy that is excluded + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'excludes' +PermissionType = 'delegated' +Permissions = @($permission) +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +PermissionClassification = 'low' +ClientApplicationsFromVerifiedPublisherOnly = $true +ClientApplicationIds = @('00001111-aaaa-2222-bbbb-3333cccc4444', '11112222-bbbb-3333-cccc-4444dddd5555') +ClientApplicationTenantIds = @('aaaabbbb-0000-cccc-1111-dddd2222eeee', 'bbbbcccc-1111-dddd-2222-eeee3333ffff', 'ccccdddd-2222-eeee-3333-ffff4444aaaa') +ClientApplicationPublisherIds = @('33334444-dddd-5555-eeee-6666ffff7777') +} +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +cccccccc-2222-3333-4444-dddddddddddd False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command creates a permission grant condition set in an existing policy that is excluded. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionType + +Specific type of permissions (application, delegated) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionClassification + +Specific classification (all, low, medium, high) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions + +The identifier of the resource application to scope consent operation down to. +It could be @("All") or a list of permission IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationIds + +The set of client application IDs to scope consent operation down to. +It could be @("All") or a list of client application IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationTenantIds + +The set of client application tenant IDs to scope consent operation down to. +It could be @("All") or a list of client application tenant IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationPublisherIds + +The set of client applications publisher IDs to scope consent operation down to. +It could be @("All") or a list of client application publisher IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationsFromVerifiedPublisherOnly + +A value indicates whether to only includes client applications from verified publishers. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceApplication + +The identifier of the resource application to scope consent operation down to. +It could be "Any" or a specific resource application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet + +## Notes + +## Related Links + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..ef81f38eb6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md @@ -0,0 +1,133 @@ +--- +title: New-EntraPermissionGrantPolicy +description: This article provides details on the New-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# New-EntraPermissionGrantPolicy + +## Synopsis + +Creates a permission grant policy. + +## Syntax + +```powershell +New-EntraPermissionGrantPolicy + -Id + [-DisplayName ] + [-Description ] + [] +``` + +## Description + +The `New-EntraPermissionGrantPolicy` cmdlet creates a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Create a permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$params = @{ + Id = 'my_new_permission_grant_policy_id' + DisplayName = 'MyNewPermissionGrantPolicy' + Description = 'My new permission grant policy' +} + +New-EntraPermissionGrantPolicy @params +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + My new permission grant policy MyNewPermissionGrantPolicy my_new_permission_grant_policy_id +``` + +This example creates new permission grant policy in Microsoft Entra ID. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-DisplayName` parameter specifies the display name for the permission grant policy. +- `-Description` parameter specifies the description for the permission grant policy. + +## Parameters + +### -Description + +Specifies the description for the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name for the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md new file mode 100644 index 0000000000..1bbe623503 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md @@ -0,0 +1,254 @@ +--- +title: New-EntraPolicy +description: This article provides details on the New-EntraPolicy command. + + +ms.topic: reference +ms.date: 08/02/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPolicy + +schema: 2.0.0 +--- + +# New-EntraPolicy + +## Synopsis + +Creates a policy. + +## Syntax + +```powershell +New-EntraPolicy + -Definition + -DisplayName + -Type + [-IsOrganizationDefault ] + [] +``` + +## Description + +The `New-EntraPolicy` cmdlet creates a policy in Microsoft Entra ID. Specify `DisplayName`, `Definition` and `Type` parameters for create a new policy. + +## Examples + +### Example 1: Create a new policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') + DisplayName = 'NewPolicy' + Type = 'HomeRealmDiscoveryPolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id IsOrganizationD + efault +---------- --------------- ----------- ----------- -- --------------- +{{"HomeReayPolicy":{"AlternateLoginIDLookup":true, "IncluderIds":["UserID"]}}} NewPolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False +``` + +This command creates a new policy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 2: Create a ClaimsMappingPolicy policy by 'IsOrganizationDefault' parameter + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name\",\"JwtClaimType\":\"upn\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://schemas.microsoft.com/identity/claims/displayname\",\"JwtClaimType\":\"name\"}]}}" ], "displayName": "Custom Claims Issuance Policy", "isOrganizationDefault": false }') + DisplayName ='ClaimstestPolicy' + Type = 'claimsMappingPolicies' + IsOrganizationDefault = $false +} +New-EntraPolicy @params +``` + +```Output +Definition +---------- +{{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLCl… +``` + +This command creates a ClaimsMappingPolicy using 'IsOrganizationDefault' parameter in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` - Parameter specifies the type of policy. In this example, `ClaimsMappingPolicy` + represents the type of policy. + +- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. + +### Example 3: Create a TokenLifetimePolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}') + DisplayName = 'TokenLifetimePolicy' + Type = 'TokenLifetimePolicy' + IsOrganizationDefault = $false +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id IsOrganizatio + nDefault +---------- --------------- ----------- ----------- -- ------------- +{{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}} TokenLifetimePolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False +``` + +This command creates a TokenLifetimePolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 4: Create a TokenIssuancePolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly","EmitSAMLNameFormat":"true"}}') + DisplayName = 'tokenIssuance' + Type = 'TokenIssuancePolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition +---------- +{{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly… +``` + +This command creates a TokenIssuancePolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 5: Create a ActivityBasedTimeoutPolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') + DisplayName = 'ActivityBasedTimeoutPolicyname' + Type = 'ActivityBasedTimeoutPolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} ActivityBasedTimeoutPolicyname aaaaaaaa-0000-1111-2222... + +``` + +This command creates a ActivityBasedTimeoutPolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +## Parameters + +### -Definition + +Specifies an array of JSON that contains all the rules of the policy, for example: -Definition @("{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}"). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +String of the policy name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsOrganizationDefault + +True if this policy is the organizational default. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of policy. +For token lifetimes, specify "TokenLifetimePolicy." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..ab18d1f589 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md @@ -0,0 +1,98 @@ +--- +title: New-EntraTrustedCertificateAuthority +description: This article provides details on the New-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# New-EntraTrustedCertificateAuthority + +## Synopsis + +Creates a trusted certificate authority. + +## Syntax + +```powershell +New-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `New-EntraTrustedCertificateAuthority` cmdlet creates a trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Creates the trusted certificate authorities in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' + +$new_ca = New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation #Create CertificateAuthorityInformation object +$new_ca.AuthorityType = "RootAuthority" +$new_ca.CrlDistributionPoint = "https://example.crl" +$new_ca.DeltaCrlDistributionPoint = "https://deltaexample.crl" +$new_ca.TrustedCertificate = "Path to .cer file(including cer file name)" +New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command creates the trusted certificate authorities in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. +It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..f0703bac66 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraConditionalAccessPolicy +description: This article provides details on the Remove-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Remove-EntraConditionalAccessPolicy + +## Synopsis + +Deletes a conditional access policy in Microsoft Entra ID by Id. + +## Syntax + +```powershell +Remove-EntraConditionalAccessPolicy + -PolicyId + [] +``` + +## Description + +This cmdlet allows an admin to delete a conditional access policy in Microsoft Entra ID by Id. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Deletes a conditional access policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +$policy = Get-EntraConditionalAccessPolicy | Where-Object {$_.DisplayName -eq 'MFA policy'} +Remove-EntraConditionalAccessPolicy -PolicyId $policy.ObjectId +``` + +This command deletes a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of a conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..75ae9347b1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraFeatureRolloutPolicy +description: This article provides details on the Remove-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraBetaFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Remove-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to remove the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +Remove-EntraFeatureRolloutPolicy + -Id + [] +``` + +## Description + +An admin uses `Remove-EntraFeatureRolloutPolicy` cmdlet to remove the cloud authentication roll-out policy and have all users where policy applied to be free of the policy. + +Users in groups that were assigned to the policy falls back to the global authentication method (most common case will be federation). Specify `Id` parameter to remove the cloud authentication roll-out policy. + +## Examples + +### Example 1: Removes the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$Policy = Get-EntraFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policy'" +Remove-EntraFeatureRolloutPolicy -Id $Policy.Id +``` + +This example removes the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` - specifies the unique identifier of the cloud authentication roll-out policy. You can use `Get-EntraFeatureRolloutPolicy` to retrieve policy details. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md new file mode 100644 index 0000000000..03968e43e8 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraFeatureRolloutPolicyDirectoryObject +description: This article provides details on the Remove-EntraFeatureRolloutPolicyDirectoryObject command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject + +schema: 2.0.0 +--- + +# Remove-EntraFeatureRolloutPolicyDirectoryObject + +## Synopsis + +Allows an admin to remove a group from the cloud authentication rollout policy in Microsoft Entra ID. +Users in this group revert back to the authenticating using the global policy (in most cases this will be federation). + +## Syntax + +```powershell +Remove-EntraFeatureRolloutPolicyDirectoryObject + -ObjectId + -Id + [] +``` + +## Description + +An admin uses the `Remove-EntraFeatureRolloutPolicyDirectoryObject` cmdlet to remove groups from the cloud authentication roll-out policy. + +Users in these groups start authenticating against the global authentication policy (for example, +federation). Specify `ObjectId` and `Id` parameter to remove groups from the cloud authentication roll-out policy. + +## Examples + +### Example 1: Removes a group from the cloud authentication roll-out policy from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + ObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Remove-EntraFeatureRolloutPolicyDirectoryObject @params +``` + +This command removes a group from the cloud authentication roll-out policy from Microsoft Entra ID. + +- `-Id` Parameter specifies the ID of the cloud authentication roll-out policy. +- `-ObjectId` parameter specifies the ID of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy. + +## Parameters + +### -ID + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +The unique identifier of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md new file mode 100644 index 0000000000..c1982b130d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraIdentityProvider +description: This article provides details on the Remove-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Remove-EntraIdentityProvider + +## Synopsis + +This cmdlet is used to delete an identity provider in the directory. + +## Syntax + +```powershell +Remove-EntraIdentityProvider + -IdentityProviderBaseId + [] +``` + +## Description + +This cmdlet is used to delete an identity provider that has been configured in the directory. + +The identity provider is permanently deleted. + +The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. + +## Examples + +### Example 1: Remove the identity provider in the directory + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +Remove-EntraIdentityProvider -IdentityProviderBaseId 'LinkedIn-OAUTH' +``` + +This command demonstrates how to remove the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. + +## Parameters + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraIdentityProvider](New-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..405c7db5f6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraNamedLocationPolicy +description: This article provides details on the Remove-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Remove-EntraNamedLocationPolicy + +## Synopsis + +Deletes a Microsoft Entra ID named location policy by PolicyId. + +## Syntax + +```powershell +Remove-EntraNamedLocationPolicy + -PolicyId + [] +``` + +## Description + +This cmdlet allows an admin to delete the Microsoft Entra ID named location policy. + +Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. + +## Examples + +### Example 1: Deletes a named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +Remove-EntraNamedLocationPolicy -PolicyId $policy.Id +``` + +This command demonstrates how to delete the named location policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md new file mode 100644 index 0000000000..5b9cce4030 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraOAuth2PermissionGrant +description: This article provides details on the Remove-EntraOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Remove-EntraOAuth2PermissionGrant + +## Synopsis + +Removes an OAuth2PermissionGrant. + +## Syntax + +```powershell +Remove-EntraOAuth2PermissionGrant + -ObjectId + [] +``` + +## Description + +The `Remove-EntraOAuth2PermissionGrant` cmdlet removes an OAuth2PermissionGrant object in Microsoft Entra ID. + +When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted OAuth2PermissionGrant. + +## Examples + +### Example 1: Remove an OAuth2 permission grant + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$SharePointSP = Get-EntraServicePrincipal | Where-Object {$_.DisplayName -eq 'Microsoft.SharePoint'} +$SharePointOA2AllSitesRead = Get-EntraOAuth2PermissionGrant | Where-Object {$_.ResourceId -eq $SharePointSP.ObjectId} | Where-Object {$_.Scope -eq 'AllSites.Read'} +Remove-EntraOAuth2PermissionGrant -ObjectId $SharePointOA2AllSitesRead.ObjectId +``` + +This example shows how to remove an OAuth2PermissionGrant object in Microsoft Entra ID. + +## Parameters + +### -ObjectId + +Specifies the ID of an OAuth2PermissionGrant object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..d46b6e072d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md @@ -0,0 +1,129 @@ +--- +title: Remove-EntraPermissionGrantConditionSet +description: This article provides details on the Remove-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Remove-EntraPermissionGrantConditionSet + +## Synopsis + +Delete a Microsoft Entra ID permission grant condition set by ID. + +## Syntax + +```powershell +Remove-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [] +``` + +## Description + +Delete a Microsoft Entra ID permission grant condition set object by ID. + +## Examples + +### Example 1: Delete a permission grant condition set from a policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$PermissionGrantConditionSetId = '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'excludes' + Id = $PermissionGrantConditionSetId +} +Remove-EntraPermissionGrantConditionSet @params +``` + +This example demonstrates how to remove the Microsoft Entra ID permission grant condition set by ID. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..bd9e0d012a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md @@ -0,0 +1,85 @@ +--- +title: Remove-EntraPermissionGrantPolicy +description: This article provides details on the Remove-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Remove-EntraPermissionGrantPolicy + +## Synopsis + +Removes a permission grant policy. + +## Syntax + +```powershell +Remove-EntraPermissionGrantPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraPermissionGrantPolicy` cmdlet removes a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Remove a permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +Remove-EntraPermissionGrantPolicy -Id 'my_permission_grant_policy_id' +``` + +This command removes the specified permission grant policy in Microsoft Entra ID. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. + +## Parameters + +### -Id + +The unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md new file mode 100644 index 0000000000..b35076fe82 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md @@ -0,0 +1,83 @@ +--- +title: Remove-EntraPolicy +description: This article provides details on the Remove-EntraPolicy command. + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPolicy +schema: 2.0.0 +--- + +# Remove-EntraPolicy + +## Synopsis + +Removes a policy. + +## Syntax + +```powershell +Remove-EntraPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraPolicy` cmdlet removes a policy from Microsoft Entra ID. Specify `Id` parameter to remove a specific policy. + +## Examples + +### Example 1: Remove a policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.ApplicationConfiguration' +Remove-EntraPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This command removes the specified policy from Microsoft Entra ID. + +- `-Id` - specifies the ID of the policy you want to remove. + +## Parameters + +### -Id + +The Id of the policy you want to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[New-EntraPolicy](New-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..dce8b479ed --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraTrustedCertificateAuthority +description: This article provides details on the Remove-EntraTrustedCertificateAuthority command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Remove-EntraTrustedCertificateAuthority + +## Synopsis + +Removes a trusted certificate authority. + +## Syntax + +```powershell +Remove-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `Remove-EntraTrustedCertificateAuthority` cmdlet removes a trusted certificate authority from Microsoft Entra ID. + +## Examples + +### Example 1: Remove the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object +Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command deletes the trusted certificate authorities that are defined in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. +It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md new file mode 100644 index 0000000000..f508974760 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md @@ -0,0 +1,241 @@ +--- +title: Set-EntraAuthorizationPolicy +description: This article provides details on the Set-EntraAuthorizationPolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy + +schema: 2.0.0 +--- + +# Set-EntraAuthorizationPolicy + +## Synopsis + +Updates an authorization policy. + +## Syntax + +```powershell +Set-EntraAuthorizationPolicy + [-BlockMsolPowerShell ] + [-AllowedToSignUpEmailBasedSubscriptions ] + [-AllowEmailVerifiedUsersToJoinOrganization ] + [-DisplayName ] + [-Description ] + [-DefaultUserRolePermissions ] + [-AllowedToUseSSPR ] + [] +``` + +## Description + +The `Set-EntraAuthorizationPolicy` cmdlet updates a Microsoft Entra ID authorization policy. + +For delegated scenarios, the user needs to have the `Privileged Role Administrator` Microsoft Entra role. + +## Examples + +### Example 1: Update an authorization policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' +$params = @{ + DisplayName = 'Updated displayName' + Description = 'Updated Description' + BlockMsolPowerShell = $true + AllowedToUseSSPR = $false + AllowEmailVerifiedUsersToJoinOrganization = $true + AllowedToSignUpEmailBasedSubscriptions = $true +} + +Set-EntraAuthorizationPolicy @params +``` + +This example demonstrates how to update a Microsoft Entra ID authorization policy. + +### Example 2: Update DefaultUserRolePermissions of authorization policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' +$DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions +$DefaultUserRolePermissions.AllowedToCreateApps = $false +$DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $false +$DefaultUserRolePermissions.AllowedToReadOtherUsers = $false +Set-EntraAuthorizationPolicy -DefaultUserRolePermissions $DefaultUserRolePermissions +``` + +This example demonstrates how to update a DefaultUserRolePermissions of authorization policy in Microsoft Entra ID. + +## Parameters + +### -AllowedToSignUpEmailBasedSubscriptions + +Specifies whether users can sign up for email based subscriptions. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowedToUseSSPR + +Specifies whether the Self-Serve Password Reset feature can be used by users on the tenant. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowEmailVerifiedUsersToJoinOrganization + +Specifies whether a user can join the tenant by email validation. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BlockMsolPowerShell + +Specifies whether the user-based access to the legacy service endpoint used by Microsoft Online PowerShell is blocked or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowUserConsentForRiskyApps + +Indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowInvitesFrom + +Indicates who can invite external users to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. Everyone is the default setting for all cloud environments except US Government. + +```yaml +Type: allowInvitesFrom +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultUserRolePermissions + +Contains various customizable default user role permissions. + +```yaml +Type: DefaultUserRolePermissions +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAuthorizationPolicy](Get-EntraAuthorizationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..1c140af2d6 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md @@ -0,0 +1,240 @@ +--- +title: Set-EntraConditionalAccessPolicy +description: This article provides details on the Set-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Set-EntraConditionalAccessPolicy + +## Synopsis + +Updates a conditional access policy in Microsoft Entra ID by Id. + +## Syntax + +```powershell +Set-EntraConditionalAccessPolicy + -PolicyId + [-Conditions ] + [-GrantControls ] + [-DisplayName ] + [-Id ] + [-State ] + [-SessionControls ] + [] +``` + +## Description + +This cmdlet allows an admin to update a conditional access policy in Microsoft Entra ID by Id. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Update a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$cond = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$control = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$session = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + DisplayName = 'MFA policy updated' + State = 'Enabled' + Conditions = $cond + GrantControls = $control + SessionControls = $session +} + +Set-EntraConditionalAccessPolicy @params +``` + +The example shows how to update a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +### Example 2: Update display name for a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + DisplayName = 'MFA policy updated' +} + +Set-EntraConditionalAccessPolicy @params +``` + +This command updates a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-DisplayName` parameter specifies the display name of a conditional access policy. + +### Example 3: Update the state for a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + State = 'Enabled' +} + +Set-EntraConditionalAccessPolicy @params +``` + +This command updates a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Conditions + +Specifies the conditions for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessConditionSet +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GrantControls + +Specifies the controls for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessGrantControls +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionControls + +Enables limited experiences within specific cloud applications. + +```yaml +Type: ConditionalAccessSessionControls +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..9f60eb62da --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md @@ -0,0 +1,231 @@ +--- +title: Set-EntraFeatureRolloutPolicy +description: This article provides details on the Set-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Set-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to modify the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraFeatureRolloutPolicy + [-Feature ] + [-IsEnabled ] + -Id + [-IsAppliedToOrganization ] + [-AppliesTo ] + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +An admin uses the `Set-EntraFeatureRolloutPolicy` cmdlet to modify the cloud authentication rollout policy. + +This includes specifying whether the method for cloud authentication is Pass-through Authentication or Password Hash Synchronization, and whether Seamless Single Sign-On (SSO) is enabled. + +Users in groups assigned to the policy will start authenticating using the new method and Seamless SSO, if it is specified. + +## Examples + +### Example 1: Updates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + DisplayName = 'Feature-Rollout-Policytest' + IsEnabled = $false +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` - specifies the ID of cloud authentication roll-out policy. +- `-DisplayName` - specifies the display name of the cloud authentication roll-out policy. +- `-IsEnabled` - specifies the status of cloud authentication roll-out policy. + +### Example 2: Updates the Description + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Description = 'Feature-Rollout-test' +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the `-Description` of policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` Specify the ID of cloud authentication roll-out policy. +- `-Description` Specifies the description of the cloud authentication roll-out policy. + +### Example 3: Updates the IsAppliedToOrganization + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + IsAppliedToOrganization = $false +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the `-IsAppliedToOrganization` parameter of policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` Specify the ID of cloud authentication roll-out policy. +- `-IsAppliedToOrganization` Parameter determines whether a particular feature rollout policy should be applied to the entire organization or not. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Feature + +Specifies a feature assigned to the cloud authentication roll-out policy. + +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +```yaml +Type: FeatureEnum +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies the status of cloud authentication roll-out policy. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliesTo + +Specifies a list of Microsoft Entra ID objects that is assigned to the feature. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAppliedToOrganization + +Specifies if the cloud authentication roll-out policy applied to the entire organization. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md new file mode 100644 index 0000000000..557f8d8cee --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md @@ -0,0 +1,195 @@ +--- +title: Set-EntraIdentityProvider +description: This article provides details on the Set-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Set-EntraIdentityProvider + +## Synopsis + +Update the properties of an existing identity provider configured in the directory. + +## Syntax + +```powershell +Set-EntraIdentityProvider + -IdentityProviderBaseId + [-Type ] + [-ClientSecret ] + [-ClientId ] + [-Name ] + [] +``` + +## Description + +The `Set-EntraIdentityProvider` cmdlet is used to update the properties of an existing identity provider. + +The type of the identity provider can't be modified. + +## Examples + +### Example 1: Update client id of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + ClientId = 'NewClientID' +} +Set-EntraIdentityProvider @params +``` + +This example updates the client ID for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. + +### Example 2: Update client secret of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + ClientSecret = 'NewClientSecret' +} +Set-EntraIdentityProvider @params +``` + +This example updates the client secret for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. + +### Example 3: Update display name of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + Name = 'NewGoogleName' +} +Set-EntraIdentityProvider @params +``` + +This example updates the display name for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-Name` parameter specifies the display name of the identity provider. + +## Parameters + +### -ClientId + +The client identifier for the application, obtained during the application's registration with the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecret + +The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentityProviderBaseId +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Name + +The display name of the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. + +For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraIdentityProvider](New-EntraIdentityProvider.md) + +[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..4f55ee4639 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md @@ -0,0 +1,258 @@ +--- +title: Set-EntraNamedLocationPolicy +description: This article provides details on the Set-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Set-EntraNamedLocationPolicy + +## Synopsis + +Updates a named location policy in Microsoft Entra ID by PolicyId. + +## Syntax + +```powershell +Set-EntraNamedLocationPolicy + -PolicyId + [-OdataType ] + [-IpRanges ] + [-IncludeUnknownCountriesAndRegions ] + [-IsTrusted ] + [-DisplayName ] + [-Id ] + [-CountriesAndRegions ] + [] +``` + +## Description + +This cmdlet allows an admin to update a named location policy in Microsoft Entra ID by PolicyId. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Update an IP named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange +$ipRanges.cidrAddress = '6.5.4.3/32' +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.ipNamedLocation' + IsTrusted = $false + IncludeUnknownCountriesAndRegions = $false + IpRanges = $ipRanges +} +Set-EntraNamedLocationPolicy @params +``` + +This example shows how to update an IP named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. +- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. + +### Example 2: Update a country named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.countryNamedLocation' + IncludeUnknownCountriesAndRegions = $true +} +Set-EntraNamedLocationPolicy @params +``` + +This command updates a country named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. + +### Example 3: Update display name of a named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.ipNamedLocation' + DisplayName = 'NewName' +} +Set-EntraNamedLocationPolicy @params +``` + +This command updates display name of named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OdataType + +Specifies the OData type of a named location policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpRanges + +List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsTrusted + +Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CountriesAndRegions + +Specifies the countries and regions for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeUnknownCountriesAndRegions + +Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the Id of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..45e4ecc72a --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md @@ -0,0 +1,309 @@ +--- +title: Set-EntraPermissionGrantConditionSet +description: This article provides details on the Set-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Set-EntraPermissionGrantConditionSet + +## Synopsis + +Update an existing Microsoft Entra ID permission grant condition set. + +## Syntax + +```powershell +Set-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [-Permissions ] + [-ClientApplicationTenantIds ] + [-ClientApplicationIds ] + [-ResourceApplication ] + [-PermissionType ] + [-PermissionClassification ] + [-ClientApplicationsFromVerifiedPublisherOnly ] + [-ClientApplicationPublisherIds ] + [] +``` + +## Description + +Updates a Microsoft Entra ID permission grant condition set object identified by Id. + +## Examples + +### Example 1: Update a permission grant condition set to includes permissions that is classified as low + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' + PermissionClassification = 'low' +} + +Set-EntraPermissionGrantConditionSet @params +``` + +This command updates sets the specified permission grant set to classify as low. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. + +### Example 2: Update a permission grant condition set + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' + PermissionType = 'delegated' + PermissionClassification = 'low' + ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + Permissions = @('All') + ClientApplicationIds = @('All') + ClientApplicationTenantIds = @('All') + ClientApplicationPublisherIds = @('All') + ClientApplicationsFromVerifiedPublisherOnly = $true +} + +Set-EntraPermissionGrantConditionSet @params +``` + +This command updates sets the specified permission grant set. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionType + +Specific type of permissions (application, delegated) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionClassification + +Specific classification (all, low, medium, high) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions + +The identifier of the resource application to scope consent operation down to. +It could be @("All") or a list of permission IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationIds + +The set of client application IDs to scope consent operation down to. +It could be @("All") or a list of client application IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationTenantIds + +The set of client application tenant IDs to scope consent operation down to. +It could be @("All") or a list of client application tenant IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationPublisherIds + +The set of client applications publisher IDs to scope consent operation down to. +It could be @("All") or a list of client application publisher IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationsFromVerifiedPublisherOnly + +A value indicates whether to only includes client applications from verified publishers. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceApplication + +The identifier of the resource application to scope consent operation down to. +It could be "Any" or a specific resource application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..db649bc8da --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md @@ -0,0 +1,143 @@ +--- +title: Set-EntraPermissionGrantPolicy +description: This article provides details on the Set-EntraPermissionGrantPolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Set-EntraPermissionGrantPolicy + +## Synopsis + +Updates a permission grant policy. + +## Syntax + +```powershell +Set-EntraPermissionGrantPolicy + -Id + [-DisplayName ] + [-Description ] + [] +``` + +## Description + +The `Set-EntraPermissionGrantPolicy` command updates a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Update description of permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +$params = @{ + Id = $policy.Id + Description = 'Updated description' +} + +Set-EntraPermissionGrantPolicy @params +``` + +This command updates the description of the specified permission grant policy. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-Description` parameter specifies the description for the permission grant policy. + +### Example 2: Update display name of permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +$params = @{ + Id = $policy.Id + DisplayName = 'Updated DisplayName' +} + +Set-EntraPermissionGrantPolicy @params +``` + +This command updates the display name of the specified permission grant policy. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-DisplayName` parameter specifies the display name for the permission grant policy. + +## Parameters + +### -Description + +Specifies the description of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md new file mode 100644 index 0000000000..9f5e238eb2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md @@ -0,0 +1,211 @@ +--- +title: Set-EntraPolicy +description: This article provides details on the Set-EntraPolicy command. + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Set-EntraPolicy + +## Synopsis + +Updates a policy. + +## Syntax + +```powershell +Set-EntraPolicy + -Id + [-Definition ] + [-DisplayName ] + [-Type ] + [-IsOrganizationDefault ] + [] +``` + +## Description + +The `Set-EntraPolicy` cmdlet sets a policy in Microsoft Entra ID. Specify `Id` parameter to updates specific policy. + +## Examples + +### Example 1: Update a policy display name + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DisplayName = 'NewUpdated' +} +Set-EntraPolicy @params +``` + +This command updates display name of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `DisplayName` specifies the display name. + +### Example 2: Update a policy definition + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') +} +Set-EntraPolicy @params +``` + +This command updates definition of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `Definition` specifies the array of stringified JSON that contains all the rules of the policy. +In this example, `@('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}')` represents definition of the activityBasedTimeoutPolicy. + +### Example 3: Update a policy organization default + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + IsOrganizationDefault = $false +} +Set-EntraPolicy @params +``` + +This command updates organization default of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. + +### Example 4: Update policy type + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Type = 'ActivityBasedTimeoutPolicy' +} +Set-EntraPolicy @params +``` + +This example demonstrates how to update the `type` property of a specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `-Type` specifies the type of policy. In this example, `ActivityBasedTimeoutPolicy` represents the type of policy. + +## Parameters + +### -Definition + +Specifies the array of stringified JSON that contains all the rules of the policy. +For example -Definition @('{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}'). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsOrganizationDefault + +True if this policy is the organizational default. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of policy. +For token lifetimes, use "TokenLifetimePolicy." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The ID of the policy for which you want to set values. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[New-EntraPolicy](New-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..cdfdb92eaf --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md @@ -0,0 +1,92 @@ +--- +title: Set-EntraTrustedCertificateAuthority +description: This article provides details on the Set-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Set-EntraTrustedCertificateAuthority + +## Synopsis + +Updates a trusted certificate authority. + +## Syntax + +```powershell +Set-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation +``` + +## Description + +The `Set-EntraTrustedCertificateAuthority` cmdlet updates a trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Updates the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object +$cer[0].CrlDistributionPoint = "https://example.crl" +Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command updates the trusted certificate authorities that are defined in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md new file mode 100644 index 0000000000..b463aa7035 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md @@ -0,0 +1,426 @@ +--- +title: Get-EntraUser +description: This article provides details on the Get-EntraUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUser + +schema: 2.0.0 +--- + +# Get-EntraUser + +## Synopsis + +Gets a user. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraUser + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraUser + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraUser + -UserId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUser` cmdlet gets a user from Microsoft Entra ID. + +## Examples + +### Example 1: Get top three users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Top 3 +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Angel Brown cccccccc-2222-3333-4444-dddddddddddd AngelB@contoso.com AngelB@contoso.com +Avery Smith dddddddd-3333-4444-5555-eeeeeeeeeeee AveryS@contoso.com AveryS@contoso.com +Sawyer Miller eeeeeeee-4444-5555-6666-ffffffffffff SawyerM@contoso.com SawyerM@contoso.com +``` + +This example demonstrates how to get top three users from Microsoft Entra ID. + +### Example 2: Get a user by ID + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -UserId 'SawyerM@contoso.com' +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc sawyerm@tenant.com sawyerm@tenant.com +``` + +This command gets the specified user. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. + +### Example 3: Search among retrieved users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -SearchString 'New' +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User88 bbbbbbbb-1111-2222-3333-cccccccccccc demo99@tenant.com +New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com +``` + +This cmdlet gets all users that match the value of SearchString against the first characters in DisplayName or UserPrincipalName. + +### Example 4: Get a user by userPrincipalName + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "userPrincipalName eq 'SawyerM@contoso.com'" +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Sawyer Miller cccccccc-2222-3333-4444-dddddddddddd SawyerM@contoso.com +``` + +This command gets the specified user. + +### Example 5: Get a user by MailNickname + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "startswith(MailNickname,'Ada')" +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Mark Adams bbbbbbbb-1111-2222-3333-cccccccccccc Adams@contoso.com Adams@contoso.com +``` + +In this example, we retrieve all users whose MailNickname starts with Ada. + +### Example 6: Get SignInActivity of a User + +```powershell +Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All' +Get-EntraUser -UserId 'SawyerM@contoso.com' -Property 'SignInActivity' | Select-Object -ExpandProperty 'SignInActivity' +``` + +```Output +lastNonInteractiveSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa +lastSignInRequestId : cccccccc-2222-3333-4444-dddddddddddd +lastSuccessfulSignInDateTime : 9/9/2024 1:12:13 PM +lastNonInteractiveSignInDateTime : 9/9/2024 1:12:13 PM +lastSuccessfulSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa +lastSignInDateTime : 9/7/2024 9:15:41 AM +``` + +This example demonstrates how to retrieve the SignInActivity of a specific user by selecting a property. + +### Example 7: List users with disabled accounts + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "accountEnabled eq false" | Select-Object DisplayName, Id, Mail, UserPrincipalName +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com +``` + +This example demonstrates how to retrieve all users with disabled accounts. + +### Example 8: List users based in a specific country + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$usersInCanada = Get-EntraUser -Filter "Country eq 'Canada'" +$usersInCanada | Select-Object Id, DisplayName, UserPrincipalName, OfficeLocation, Country | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName OfficeLocation Country +-- ----------- ----------------- -------------- ------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com 23/2102 Canada +``` + +This example demonstrates how to retrieve all users based in Canada. + +### Example 9: List user count per department + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$departmentCounts = Get-EntraUser -All | Group-Object -Property Department | Select-Object Name, @{Name="MemberCount"; Expression={$_.Count}} +$departmentCounts | Format-Table Name, MemberCount -AutoSize +``` + +```Output +Name MemberCount +---- ----------- + 7 +Engineering 2 +Executive Management 1 +Finance 1 +HR 1 +``` + +This example demonstrates how to retrieve user count in each department. + +### Example 10: List disabled users with active licenses + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$disabledUsersWithLicenses = Get-EntraUser -Filter "accountEnabled eq false" -All | Where-Object { + $_.AssignedLicenses -ne $null -and $_.AssignedLicenses.Count -gt 0 +} +$disabledUsersWithLicenses | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AccountEnabled +-- ----------- ----------------- -------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com False +``` + +This example demonstrates how to retrieve disabled users with active licenses. + +### Example 11: Retrieve guest users with active licenses + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All +$guestUsersWithLicenses = foreach ($guest in $guestUsers) { + if ($guest.AssignedLicenses.Count -gt 0) { + [pscustomobject]@{ + Id = $guest.Id + DisplayName = $guest.DisplayName + UserPrincipalName = $guest.UserPrincipalName + AssignedLicenses = ($guest.AssignedLicenses | ForEach-Object { $_.SkuId }) -join ", " + } + } +} +$guestUsersWithLicenses | Format-Table Id, DisplayName, UserPrincipalName, AssignedLicenses -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AssignedLicenses +-- ----------- ----------------- ---------------- +cccccccc-2222-3333-4444-dddddddddddd Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com c42b9cae-ea4f-4ab7-9717-81576235ccac +``` + +This example demonstrates how to retrieve guest users with active licenses. + +### Example 12: Retrieve users without managers + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$allUsers = Get-EntraUser -All +$usersWithoutManagers = foreach ($user in $allUsers) { + $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue + if (-not $manager) { + [pscustomobject]@{ + Id = $user.Id + DisplayName = $user.DisplayName + UserPrincipalName = $user.UserPrincipalName + } + } +} +$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName +-- ----------- ----------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com +bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com +``` + +This example demonstrates how to retrieve users without managers. + +### Example 13: List failed sign-ins for a user + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" +$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize +``` + +This example demonstrates how to retrieve failed sign-ins for a user. + +### Example 14: List all guest users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All +$guestUsers | Select-Object DisplayName, UserPrincipalName, Id, createdDateTime, creationType, accountEnabled, UserState | Format-Table -AutoSize +``` + +```Output +DisplayName UserPrincipalName Id CreatedDateTime CreationType AccountEnabled UserState +----------- ----------------- -- --------------- ------------ -------------- --------- +Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com bbbbbbbb-1111-2222-3333-cccccccccccc 9/13/2024 6:37:33 PM Invitation True Accepted +``` + +This example demonstrates how to retrieve list all guest users. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. +Details on querying with OData can be [found here](https://learn.microsoft.com/graph/aad-advanced-queries?tabs=powershell). + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a User Principal Name (UPN) or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraUser](New-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..5ad745b39b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md @@ -0,0 +1,184 @@ +--- +title: Get-EntraUserAppRoleAssignment +description: This article provides details on the Get-EntraUserAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraUserAppRoleAssignment + +## Synopsis + +Get a user application role assignment. + +## Syntax + +```powershell +Get-EntraUserAppRoleAssignment + -ObjectId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserAppRoleAssignment` cmdlet gets a user application role assignment. + +## Examples + +### Example 1: Get a user application role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +$UserId = (Get-EntraUser -Top 1).ObjectId +Get-EntraUserAppRoleAssignment -ObjectId $UserId +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 + 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 + 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 + +``` + +This example retrieves a user application role assignment for the user in $UserId. You can use the command `Get-EntraUser` to get Service principal Object ID. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +### Example 2: Get all application role assignments + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -All +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 + 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 + 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 +``` + +This example demonstrates how to retrieve all application role assignment for the specified user. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +### Example 3: Get top two application role assignments + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -Top 2 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 +``` + +This example demonstrates how to retrieve top two application role assignment for the specified user. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) + +[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md new file mode 100644 index 0000000000..56eb9c60b5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraUserCreatedObject +description: This article provides details on the Get-EntraUserCreatedObject Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserCreatedObject + +schema: 2.0.0 +--- + +# Get-EntraUserCreatedObject + +## Synopsis + +Get objects created by the user. + +## Syntax + +```powershell +Get-EntraUserCreatedObject + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserCreatedObject` cmdlet gets objects created by a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get a user-created object + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example retrieves an object created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +### Example 2: Get all user-created objects + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example retrieves all objects created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +### Example 3: Get a top one user-created object + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves top one object created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md new file mode 100644 index 0000000000..0a4ea05e0b --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraUserDirectReport +description: This article provides details on the Get-EntraUserDirectReport command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserDirectReport + +schema: 2.0.0 +--- + +# Get-EntraUserDirectReport + +## Synopsis + +Get the user's direct reports. + +## Syntax + +```powershell +Get-EntraUserDirectReport + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserDirectReport` cmdlet gets the direct reports for a user in Microsoft Entra ID. Specify `UserId` parameter gets the direct reports for a user. + +## Examples + +### Example 1: Get a user's direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve direct reports for a user in Microsoft Entra ID. + +- `-UserId` Parameter specifies the ID of a user (UserPrincipalName or UserId). + +### Example 2: Get all direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve all direct reports for a user in Microsoft Entra ID. + +- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). + +### Example 3: Get a top two direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve top five direct reports for a user in Microsoft Entra ID. + +- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user's UserPrincipalName or UserId in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md new file mode 100644 index 0000000000..96b66cd878 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md @@ -0,0 +1,111 @@ +--- +title: Get-EntraUserExtension +description: This article provides details on the Get-EntraUserExtension command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserExtension + +schema: 2.0.0 +--- + +# Get-EntraUserExtension + +## Synopsis + +Gets a user extension. + +## Syntax + +```powershell +Get-EntraUserExtension + -UserId + [-Property ] + [] +``` + +## Description + +The Get-EntraUserExtension cmdlet gets a user extension in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve extension attributes for a user + +```powershell +Connect-Entra -Scopes 'User.Read' +$UserId = (Get-EntraUser -ObjectId 'SawyerM@contoso.com').ObjectId +Get-EntraUserExtension -UserId $UserId +``` + +```Output +onPremisesDistinguishedName : +@odata.context : https://graph.microsoft.com/v1.0/$metadata#users(identities,onPremisesDistinguishedName,employeeId,createdDateTime)/$entity +createdDateTime : 18/07/2024 05:13:40 +employeeId : +identities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} +userIdentities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} +``` + +This example shows how to retrieve the extension attributes for a specified user. You can use the command `Get-EntraUser` to get user object Id. + +- `-UserId` parameter specifies the user object Id. + +## Parameters + +### -UserId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraUserExtension](Remove-EntraUserExtension.md) + +[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md new file mode 100644 index 0000000000..6dbad40666 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md @@ -0,0 +1,105 @@ +--- +title: Get-EntraUserLicenseDetail +description: This article provides details on the Get-EntraUserLicenseDetail command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail + +schema: 2.0.0 +--- + +# Get-EntraUserLicenseDetail + +## Synopsis + +Retrieves license details for a user. + +## Syntax + +```powershell +Get-EntraUserLicenseDetail + -UserId + [-Property ] + [] +``` + +## Description + +This cmdlet retrieves license details for a user. + +## Examples + +### Example 1: Retrieve user license details + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserLicenseDetail -UserId 'SawyerM@contoso.com' +``` + +```Output +Id SkuId SkuPartNumber +-- ----- ------------- +X8Wu1RItQkSNL8zKldQ5DiH6ThjDmF1OlavQcFOpbmc aaaaaaaa-0b0b-1c1c-2d2d-333333333333 INFORMATION_PROTECTION_COMPLIANCE +X8Wu1RItQkSNL8zKldQ5Dk8SXrDMx6BFpqqM94yUaWg bbbbbbbb-1c1c-2d2d-3e3e-444444444444 EMSPREMIUM +X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERPRISEPREMIUM +``` + +This example demonstrates how to retrieve license details for a user from Microsoft Entra ID. + +## Parameters + +### -UserId + +The object ID of the user for which the license details are retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md new file mode 100644 index 0000000000..a72d6f6ddb --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraUserManager +description: This article provides details on the Get-EntraUserManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserManager + +schema: 2.0.0 +--- + +# Get-EntraUserManager + +## Synopsis + +Gets the manager of a user. + +## Syntax + +```powershell +Get-EntraUserManager + -UserId + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserManager` cmdlet gets the manager of a user in Microsoft Entra ID. Specify +`UserId` parameter to get the specific manager of user. + +## Examples + +### Example 1: Get the manager of a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserManager -UserId 'SawyerM@contoso.com' +``` + +```Output +DeletedDateTime : +Id : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee +@odata.context : https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity +@odata.type : #microsoft.graph.user +accountEnabled : True +businessPhones : {+1 858 555 0109} +city : San Diego +createdDateTime : 2023-07-07T14:18:05Z +country : United States +department : Sales & Marketing +displayName : Sawyer Miller +``` + +This example demonstrates how to retrieve the manager of a specific user. + +- `-UserId` Parameter specifies UserId or User Principal Name of User. + +### Example 2: Retrieve users without managers + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$allUsers = Get-EntraUser -All +$usersWithoutManagers = foreach ($user in $allUsers) { + $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue + if (-not $manager) { + [pscustomobject]@{ + Id = $user.Id + DisplayName = $user.DisplayName + UserPrincipalName = $user.UserPrincipalName + } + } +} +$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName +-- ----------- ----------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com +bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com +``` + +This example demonstrates how to retrieve users without managers. + +## Parameters + +### -UserId + +The unique identifier of a user in Microsoft Entra ID (User Principal Name or UserId). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraUserManager](Remove-EntraUserManager.md) + +[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md new file mode 100644 index 0000000000..0f685737af --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md @@ -0,0 +1,218 @@ +--- +title: Get-EntraUserMembership +description: This article provides details on the Get-EntraUserMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserMembership + +schema: 2.0.0 +--- + +# Get-EntraUserMembership + +## Synopsis + +Get user memberships. + +## Syntax + +```powershell +Get-EntraUserMembership + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserMembership` cmdlet gets user memberships in Microsoft Entra ID. + +## Examples + +### Example 1: Get user memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +33dd33dd-ee44-ff55-aa66-77bb77bb77bb +44ee44ee-ff55-aa66-bb77-88cc88cc88cc +55ff55ff-aa66-bb77-cc88-99dd99dd99dd +``` + +This example demonstrates how to retrieve user memberships in Microsoft Entra ID. + +### Example 2: Get user memberships with additional details + +```powershell +Connect-Entra -Scopes 'User.Read' +$userMemberships = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' +$membershipDetails = $userMemberships | ForEach-Object { + $membershipDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + odataType = $membershipDetail.'@odata.type' + displayName = $membershipDetail.displayName + Id = $membershipDetail.Id + } +} +$membershipDetails | Select-Object odataType, displayName, Id +``` + +```Output +odataType displayName Id +--------- ----------- -- +#microsoft.graph.group Contoso Group 33dd33dd-ee44-ff55-aa66-77bb77bb77bb +#microsoft.graph.group Helpdesk Group 55ff55ff-aa66-bb77-cc88-99dd99dd99dd +#microsoft.graph.directoryRole Attribute Assignment Reader 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +#microsoft.graph.directoryRole Attribute Definition Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This example demonstrates how to retrieve user memberships in Microsoft Entra ID with more lookup details. + +### Example 3: Get All memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +33dd33dd-ee44-ff55-aa66-77bb77bb77bb +44ee44ee-ff55-aa66-bb77-88cc88cc88cc +55ff55ff-aa66-bb77-cc88-99dd99dd99dd +``` + +This example demonstrates how to retrieve users all memberships in Microsoft Entra ID. + +### Example 4: Get top three memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This example demonstrates how to retrieve users top three memberships in Microsoft Entra ID. + +### Example 5: List groups that Sawyer Miller is a member of + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$groups = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' +$groups | Select-Object DisplayName, Id, GroupTypes, Visibility | Format-Table -AutoSize +``` + +```Output +DisplayName Id GroupTypes Visibility +----------- -- ---------- ---------- +Contoso Group bbbbbbbb-1111-2222-3333-cccccccccccc {Unified} Public +``` + +This example demonstrates how to retrieve the groups that a user is a member of. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md new file mode 100644 index 0000000000..b69676b2e5 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md @@ -0,0 +1,201 @@ +--- +title: Get-EntraUserOAuth2PermissionGrant +description: This article provides details on the Get-EntraUserOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraUserOAuth2PermissionGrant + +## Synopsis + +Gets an oAuth2PermissionGrant object. + +## Syntax + +```powershell +Get-EntraUserOAuth2PermissionGrant + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for the specified user in Microsoft Entra ID. Specify `UserId` parameter to retrieve an oAuth2PermissionGrant object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation. + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator +- Directory Readers +- Global Reader +- Guest Inviter + +## Examples + +### Example 1: Retrieve the OAuth2 permission grants for a user + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using the ObjectId parameter. Use the `Get-EntraUser` cmdlet to obtain the `UserId` value. + +### Example 2: Retrieve the OAuth2 permission grants for a user using object ID parameter + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using object ID parameter. + +- `-UserId` parameter specifies the user ID. + +### Example 3: Retrieve the OAuth2 permission grants for a user using All parameter + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using All parameter. + +- `-ObjectId` parameter specifies the user ID. + +### Example 4: Retrieve top one OAuth2 permission grant + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -ObjectId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +``` + +This Example Retrieve top one the OAuth2 permission grant in Microsoft Entra ID. + +- `-UserId` parameter specifies the user ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a User Principal Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md new file mode 100644 index 0000000000..b6f4ade3c7 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md @@ -0,0 +1,166 @@ +--- +title: Get-EntraUserOwnedDevice +description: This article provides details on the Get-EntraUserOwnedDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice + +schema: 2.0.0 +--- + +# Get-EntraUserOwnedDevice + +## Synopsis + +Get registered devices owned by a user. + +## Syntax + +```powershell +Get-EntraUserOwnedDevice + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOwnedDevice` cmdlet gets registered devices owned by the specified user in Microsoft Entra ID. + +## Examples + +### Example 1: Get devices owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 +``` + +This command gets the registered devices owned by the specified user. + +### Example 2: Get all devices owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -All +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 +``` + +This command gets all the registered devices owned by the specified user. + +### Example 3: Get top one device owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +``` + +This command gets top one registered device owned by the specified user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md new file mode 100644 index 0000000000..cc4f9de59d --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md @@ -0,0 +1,208 @@ +--- +title: Get-EntraUserOwnedObject +description: This article provides details on the Get-EntraUserOwnedObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedObject + +schema: 2.0.0 +--- + +# Get-EntraUserOwnedObject + +## Synopsis + +Get objects owned by a user. + +## Syntax + +```powershell +Get-EntraUserOwnedObject + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOwnedObject` cmdlet gets objects owned by a user in Microsoft Entra ID. Specify `UserId` parameter to get objects owned by user. + +## Examples + +### Example 1: Get objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example retrieves objects owned by the specified user. + +- `-UserId` Parameter specifies the ID of a user as a UserPrincipalName or UserId. + +### Example 2: Get objects owned by a user with additional details + +```powershell +Connect-Entra -Scopes 'User.Read' +$ownedObjects = Get-EntraUserOwnedObject -ObjectId 'SawyerM@contoso.com' + +$objectDetails = $ownedObjects | ForEach-Object { + $objectDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + odataType = $objectDetail.'@odata.type' + displayName = $objectDetail.displayName + Id = $objectDetail.Id + } +} +$objectDetails | Format-Table -Property odataType, displayName, Id -AutoSize +``` + +```Output +odataType displayName Id +--------- ----------- -- +#microsoft.graph.group Contoso FTE Group bbbbbbbb-1111-2222-3333-cccccccccccc +#microsoft.graph.group Digital Engineering Group aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example retrieves objects owned by the specified user with more lookup details. + +### Example 3: Get all objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example retrieves all the objects owned by the specified user. + +- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. + +### Example 4: Get top three objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves the top three objects owned by the specified user. + +- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md new file mode 100644 index 0000000000..c58d964a67 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md @@ -0,0 +1,165 @@ +--- +title: Get-EntraUserRegisteredDevice +description: This article provides details on the Get-EntraUserRegisteredDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice + +schema: 2.0.0 +--- + +# Get-EntraUserRegisteredDevice + +## Synopsis + +Get devices registered by a user. + +## Syntax + +```powershell +Get-EntraUserRegisteredDevice + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserRegisteredDevice` cmdlet gets devices registered by a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get registered devices + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This command gets the devices that are registered to the specified user. + +### Example 2: Get all registered devices + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This command gets all the devices that are registered to the specified user. + +### Example 3: Get one registered device + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +``` + +This command gets the top one device that are registered to the specified user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md new file mode 100644 index 0000000000..3514e4f4ac --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md @@ -0,0 +1,109 @@ +--- +title: Get-EntraUserThumbnailPhoto +description: This article provides details on the Get-EntraUserThumbnailPhoto command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto + +schema: 2.0.0 +--- + +# Get-EntraUserThumbnailPhoto + +## Synopsis + +Retrieve the thumbnail photo of a user. + +## Syntax + +```powershell +Get-EntraUserThumbnailPhoto + -UserId + [-Property ] + [] +``` + +## Description + +Retrieve the thumbnail photo of a user. + +## Examples + +### Example 1: Retrieve thumbnail photo by Id + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserThumbnailPhoto -UserId 'SawyerM@contoso.com' +``` + +```Output +Id Height Width +-- ------ ----- +default 292 278 +``` + +This example shows how to retrieve the thumbnail photo of a user that is specified through the value of the UserId parameter. + +- `-UserId` parameter specifies the user for which the thumbnail photo is retrieved. + +## Parameters + +### -UserId + +The object ID of the user for which the thumbnail photo is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Boolean + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraUserThumbnailPhoto](Set-EntraUserThumbnailPhoto.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md new file mode 100644 index 0000000000..62a06bd347 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md @@ -0,0 +1,816 @@ +--- +title: New-EntraUser +description: This article provides details on the New-EntraUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUser + +schema: 2.0.0 +--- + +# New-EntraUser + +## Synopsis + +Creates a Microsoft Entra ID user. + +## Syntax + +```powershell +New-EntraUser + -DisplayName + -AccountEnabled + -PasswordProfile + [-City ] + [-UserStateChangedOn ] + [-CompanyName ] + [-PreferredLanguage ] + [-FacsimileTelephoneNumber ] + [-GivenName ] + [-Mobile ] + [-UsageLocation ] + [-PostalCode ] + [-AgeGroup ] + [-CreationType ] + [-ExtensionProperty ] + [-ConsentProvidedForMinor ] + [-MailNickName ] + [-ImmutableId ] + [-Country ] + [-SignInNames ] + [-Department ] + [-PasswordPolicies ] + [-JobTitle ] + [-IsCompromised ] + [-UserState ] + [-UserType ] + [-OtherMails ] + [-PhysicalDeliveryOfficeName ] + [-UserPrincipalName ] + [-State ] + [-StreetAddress ] + [-TelephoneNumber ] + [-Surname ] + [-ShowInAddressList ] + [] +``` + +## Description + +The `New-EntraUser` cmdlet creates a user in Microsoft Entra ID. Specify the `DisplayName`,`AccountEnabled`, and `PasswordProfile` parameter to create a user. + +## Examples + +### Example 1: Create a user using MailNickName parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$userParams = @{ + DisplayName = 'Avery Iona' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'AveryI@contoso.com' + AccountEnabled = $true + MailNickName = 'averyi' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Avery Iona AveryI@contoso.com Member +``` + +This command creates a new user. + +### Example 2: Create a user using AgeGroup parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$userParams = @{ + DisplayName = 'Peyton Davis' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'PeytonD@contoso.com' + AccountEnabled = $true + MailNickName = 'PeytonD' + AgeGroup = 'adult' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +bbbbbbbb-1111-2222-3333-cccccccccccc Peyton Davis PeytonD@contoso.com Member +``` + +This command creates a new user. + +### Example 3: Create a user using City parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$userParams = @{ + DisplayName = 'Blake Martin' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'BlakeM@contoso.com' + AccountEnabled = $true + MailNickName = 'BlakeM' + City = 'New York' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +cccccccc-2222-3333-4444-dddddddddddd Blake Martin BlakeM@contoso.com Member +``` + +This command creates a new user. + +### Example 4: Create a user using Department parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$userParams = @{ + DisplayName = 'Parker Jones' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'ParkerJ@contoso.com' + AccountEnabled = $true + MailNickName = 'ParkerJ' + Department = 'IT' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +dddddddd-3333-4444-5555-eeeeeeeeeeee Parker Jones ParkerJ@contoso.com Member +``` + +This command creates a new user. + +### Example 5: Create a user using Mobile parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$UserParams = @{ + DisplayName = 'Sawyer Miller' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'SawyerM@contoso.com' + AccountEnabled = $true + MailNickName = 'SawyerM' + Mobile = '+18989898989' +} + +New-EntraUser @UserParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com Member +``` + +This command creates a new user. + +## Parameters + +### -AccountEnabled + +Indicates whether the user's account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -City + +Specifies the user's city. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country + +Specifies the user's country. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreationType + +Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. +Possible values are "LocalAccount" and null. + +- When user creating a local account, the property is required and you must set it to "LocalAccount". +- When user creating a work or school account, don't specify the property or set it to null. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Department + +Specifies the user's department. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the user's display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProperty + +Add data to custom user properties as the basic **open extensions** or the more versatile **schema extensions**. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GivenName + +Specifies the user's given name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmutableId + +This property is used to associate an on-premises user account to their Microsoft Entra ID user object. +This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. + +Important: The $ and _ characters can't be used when specifying this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompromised + +Indicates whether this user is compromised. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JobTitle + +Specifies the user's job title. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickName + +Specifies the user's mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Mobile + +Specifies the user's mobile phone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OtherMails + +A list of other email addresses for the user; for example: "", "". + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordPolicies + +Specifies password policies for the user. +This value is an enumeration with one possible value being "DisableStrongPassword", which allows weaker passwords than the default policy to be specified. +"DisablePasswordExpiration" can also be specified. +The two might be specified together; for example: "DisablePasswordExpiration, DisableStrongPassword". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordProfile + +Specifies the user's password profile. + +The parameter type for this parameter is "PasswordProfile". + +In order to pass a parameter of this type, you first need to create a variable in PowerShell with that type: + +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + +Then you can proceed to set the value of the password in this variable: + +$PasswordProfile.Password = "\" + +And finally you can pass this variable to the cmdlet: + +New-EntraUser -PasswordProfile $PasswordProfile ... + +Other attributes that can be set in the PasswordProfile are + +- $PasswordProfile.EnforceChangePasswordPolicy - a boolean indicating that the change password policy is enababled or disabled for this user $PasswordProfile. + +- ForceChangePasswordNextLogin - a boolean indicating that the user must change the password at the next sign in. + +```yaml +Type: PasswordProfile +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PhysicalDeliveryOfficeName + +Specifies the user's physical delivery office name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostalCode + +Specifies the user's postal code. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredLanguage + +Specifies the user's preferred language. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShowInAddressList + +If True, show this user in the address list. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInNames + +Specifies the collection of sign-in names for a local account in a Microsoft Entra ID B2C tenant. + +Each sign-in name must be unique across the company/tenant. + +The property must be specified when you create a local account user; don't specify it when you create a work or school account. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the user's state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreetAddress + +Specifies the user's street address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Surname + +Specifies the user's surname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TelephoneNumber + +Specifies a telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsageLocation + +A two letter country code (ISO standard 3166). + +Required for users that are assigned licenses due to legal requirement to check for availability of services in countries. + +Examples include: "US", "JP", and "GB". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPrincipalName + +The user principal name (UPN) of the user. + +The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. + +By convention, this UPN should map to the user's email name. + +The general format is "alias@domain". + +For work or school accounts, the domain must be present in the tenant's collection of verified domains. + +This property is required when a work or school account is created; it's optional for local accounts. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserType + +A string value that can be used to classify user types in your directory, such as "Member" and "Guest". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FacsimileTelephoneNumber + +Specifies the user's telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AgeGroup + +Specifies the user's age group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompanyName + +Specifies the user's company name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentProvidedForMinor + +Sets whether consent was obtained for minors. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserState + +For an external user invited to the tenant using the invitation API, this property represents the invited user's +invitation status. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserStateChangedOn + +Shows the timestamp for the latest change to the userState property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..3ede3eecff --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md @@ -0,0 +1,209 @@ +--- +title: New-EntraUserAppRoleAssignment +description: This article provides details on the New-EntraUserAppRoleAssignment command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraUserAppRoleAssignment + +## Synopsis + +Assigns a user to an application role. + +## Syntax + +```powershell +New-EntraUserAppRoleAssignment + -ObjectId + -PrincipalId + -Id + -ResourceId + [] +``` + +## Description + +The `New-EntraUserAppRoleAssignment` cmdlet assigns a user to an application role in Microsoft Entra ID. + +To grant an app role assignment to a user, you need three identifiers: + +- PrincipalId: The Id of the user to whom you are assigning the app role. + +- ResourceId: The Id of the resource servicePrincipal that has defined the app role. + +- Id: The Id of the appRole (defined on the resource service principal) to assign to the user. + +## Examples + +### Example 1: Assign a user to an application without roles + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$appId = (Get-EntraApplication -SearchString '').AppId +$user = Get-EntraUser -SearchString '' +$servicePrincipal = Get-EntraServicePrincipal -Filter "appId eq '$appId'" + +$params = @{ + ObjectId = $user.ObjectId + PrincipalId = $user.ObjectId + ResourceId = $servicePrincipal.ObjectId + Id = [Guid]::Empty +} + +New-EntraUserAppRoleAssignment @params +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - + A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 18-06-2024 11:22:40 UserPrincipalName aaaaaaaa-bbbb-cccc-1111-222222222222 User App-DisplayName +``` + +This command assigns a user to an application that doesn't have any roles. +You can use the command `Get-EntraUser` to get user object Id. +You can use the command `Get-EntraApplication` to get application Id. +You can use the command `Get-EntraServicePrincipal` to get service principal object Id. + +- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. +- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. + +### Example 2: Assign a user to a specific role within an application + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$userName = 'SawyerM@contoso.com' +$appName = 'Box' +$spo = Get-EntraServicePrincipal -Filter "DisplayName eq '$appName'" +$user = Get-EntraUser -Filter "userPrincipalName eq '$userName'" + +$params = @{ + ObjectId = $user.ObjectId + PrincipalId = $user.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.AppRoles[1].Id +} + +New-EntraUserAppRoleAssignment @params +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 06/18/2024 09:47:00 Sawyer Miller 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 User Box +``` + +This example demonstrates how to assign a user to an application role in Microsoft Entra ID. +You can use the command `Get-EntraUser` to get user object Id. +You can use the command `Get-EntraServicePrincipal` to get service principal object Id. + +- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. +- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. + +## Parameters + +### -Id + +The ID of the app role to assign. + +If application doesn't have any roles while creating new app role assignment then provide an empty guid, or the Id of the role to assign to the user. + +You can retrieve the application's roles by examining the application object's AppRoles property: + +`Get-EntraApplication -SearchString 'Your-Application-DisplayName' | select Approles | Format-List` + +This cmdlet returns the list of roles that are defined in an application: + +AppRoles: {GUID1, GUID2} + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of the user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID to which the new app role is to be assigned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +The object ID of the principal to which the new app role is assigned. + +When assigning a new role to a user, provide the object ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The object ID of the Service Principal for the application to which the user role is assigned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) + +[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md new file mode 100644 index 0000000000..77c8786f2f --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraUser +description: This article provides details on the Remove-EntraUser command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUser + +schema: 2.0.0 +--- + +# Remove-EntraUser + +## Synopsis + +Removes a user. + +## Syntax + +```powershell +Remove-EntraUser + -UserId + [] +``` + +## Description + +The `Remove-EntraUser` cmdlet removes a user in Microsoft Entra ID. Specify the `UserId` parameter to remove the specified user in Microsoft Entra ID. + +The calling user must be assigned at least one of the following Microsoft Entra roles: + +- User Administrator + +- Privileged Authentication Administrator + +## Examples + +### Example 1: Remove a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +Remove-EntraUser -UserId 'SawyerM@Contoso.com' +``` + +This command removes the specified user in Microsoft Entra ID. + +## Parameters + +### -UserId + +Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUser](New-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..4a7f77cbf2 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraUserAppRoleAssignment +description: This article provides details on the Remove-EntraUserAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraUserAppRoleAssignment + +## Synopsis + +Removes a user application role assignment. + +## Syntax + +```powershell +Remove-EntraUserAppRoleAssignment + -AppRoleAssignmentId + -ObjectId + [] +``` + +## Description + +The `Remove-EntraUserAppRoleAssignment` cmdlet removes a user application role assignment in Microsoft Entra ID. + +## Examples + +### Example 1: Remove user app role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$RemoveAppRoleParams = @{ + ObjectId = 'SawyerM@Contoso.com' + AppRoleAssignmentId = 'C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w' +} +Remove-EntraUserAppRoleAssignment @RemoveAppRoleParams +``` + +This example demonstrates how to Remove the user app role assignment in Microsoft Entra ID. + +- `-ObjectId` parameter specifies the user ID. +- `-AppRoleAssignmentId` parameter specifies the application role assignment ID. + +Use the `Get-EntraUserAppRoleAssignment` cmdlet to get `AppRoleAssignmentId` details. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the ID of an application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID (as a UserPrincipleName or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) + +[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md new file mode 100644 index 0000000000..7e0aae2e20 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md @@ -0,0 +1,130 @@ +--- +title: Remove-EntraUserExtension +description: This article provides details on the Remove-EntraUserExtension command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserExtension + +schema: 2.0.0 +--- + +# Remove-EntraUserExtension + +## Synopsis + +Removes a user extension. + +## Syntax + +### SetMultiple + +```powershell +Remove-EntraUserExtension + -ObjectId + -ExtensionNames + [] +``` + +### SetSingle + +```powershell +Remove-EntraUserExtension + -ObjectId + -ExtensionName + [] +``` + +## Description + +The `Remove-EntraUserExtension` cmdlet removes a user extension from Microsoft Entra ID. Specify `ObjectId` and `ExtensionNames` parameters to remove a user extension. + +## Examples + +### Example 1: Remove the user extension + +```powershell +$Params = @{ + ObjectId = 'SawyerM@Contoso.com' + ExtensionName = 'Test Extension' +} +Remove-EntraUserExtension @Params +``` + +This example demonstrates how to remove a user extension from Microsoft Entra ID. + +- `ObjectId` parameter specifies the user Object ID. +- `ExtensionName` parameter specifies the user ExtentionName. + +## Parameters + +### -ExtensionName + +Specifies the name of an extension. + +```yaml +Type: System.String +Parameter Sets: SetSingle +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExtensionNames + +Specifies an array of extension names. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: SetMultiple +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserExtension](Get-EntraUserExtension.md) + +[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md new file mode 100644 index 0000000000..9d2fac8aa1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md @@ -0,0 +1,82 @@ +--- +title: Remove-EntraUserManager +description: This article provides details on the Remove-EntraUserManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserManager + +schema: 2.0.0 +--- + +# Remove-EntraUserManager + +## Synopsis + +Removes a user's manager. + +## Syntax + +```powershell +Remove-EntraUserManager + -UserId +``` + +## Description + +The `Remove-EntraUserManager` cmdlet removes a user's manager in Microsoft Entra ID. Specify the `UserId` parameter to remove the manager for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Remove the manager of a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@Contoso.com' +Remove-EntraUserManager -UserId $User.ObjectId +``` + +This example shows how to remove a user's manager. + +You can use `Get-EntraUser` command to get the user's details. + +## Parameters + +### -UserId + +Specifies the ID of a user (as a User Principle Name or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUserManager](Get-EntraUserManager.md) + +[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md new file mode 100644 index 0000000000..16500c0669 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md @@ -0,0 +1,677 @@ +--- +title: Set-EntraUser +description: This article provides details on the Set-EntraUser command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUser + +schema: 2.0.0 +--- + +# Set-EntraUser + +## Synopsis + +Updates a user. + +## Syntax + +```powershell +Set-EntraUser + -UserId + [-PostalCode ] + [-CompanyName ] + [-GivenName ] + [-Mobile ] + [-PreferredLanguage ] + [-CreationType ] + [-UsageLocation ] + [-UserType ] + [-AgeGroup ] + [-MailNickName ] + [-ExtensionProperty ] + [-ConsentProvidedForMinor ] + [-ImmutableId ] + [-Country ] + [-SignInNames ] + [-Department ] + [-StreetAddress ] + [-PasswordPolicies ] + [-JobTitle ] + [-City ] + [-OtherMails ] + [-UserPrincipalName ] + [-DisplayName ] + [-AccountEnabled ] + [-PasswordProfile ] + [-State ] + [-TelephoneNumber ] + [-Surname ] + [-ShowInAddressList ] + [] +``` + +## Description + +The `Set-EntraUser` cmdlet updates a user in Microsoft Entra ID. Specify the `UserId` parameter to update a user in Microsoft Entra ID. + +## Examples + +### Example 1: Update a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + UserId = $user.Id + DisplayName = 'Updated user Name' +} +Set-EntraUser @params +``` + +This example updates the specified user's Display name parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. + +### Example 2: Set the specified user's AccountEnabled parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + AccountEnabled = $true +} +Set-EntraUser @params +``` + +This example updates the specified user's AccountEnabled parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-AccountEnabled` Specifies whether the account is enabled. + +### Example 3: Set all but specified users as minors with parental consent + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +Get-EntraUser -All | Where-Object -FilterScript { $_.DisplayName -notmatch '(George|James|Education)' } | +ForEach-Object { Set-EntraUser -UserId $($_.ObjectId) -AgeGroup 'minor' -ConsentProvidedForMinor 'granted' } +``` + +This example updates the specified user's as minors with parental consent. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-ConsentProvidedForMinor` Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. + +### Example 4: Set the specified user's property + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + City = 'Add city name' + CompanyName = 'Microsoft' + Country = 'Add country name' + Department = 'Add department name' + GivenName = 'Mircosoft' + ImmutableId = '#1' + JobTitle = 'Manager' + MailNickName = 'Add mailnickname' + Mobile = '9984534564' + OtherMails = 'test12@M365x99297270.OnMicrosoft.com' + PasswordPolicies = 'DisableStrongPassword' + State = 'UP' + StreetAddress = 'Add address' + UserType = 'Member' +} +Set-EntraUser @params +``` + +This example updates the specified user's property. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-UserType` classify user types in your directory, such as "Member" and "Guest." +- `-PasswordPolicies` Specifies password policies for the user. +- `-OtherMails` Specifies other email addresses for the user + +### Example 5: Set the specified user's PasswordProfile parameter + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$params= @{ +UserId = 'SawyerM@contoso.com' +PasswordProfile = @{ + Password= '*****' + ForceChangePasswordNextLogin = $true + EnforceChangePasswordPolicy = $false + } +} +Set-EntraUser @params +``` + +This example updates the specified user's PasswordProfile parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-PasswordProfile` specifies the user's password profile. + +### Example 6: Set user's usage location for license assignment + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +Set-EntraUser -UserId 'SawyerM@contoso.com' -UsageLocation 'US' +``` + +This example updates the specified user's Usage Location for license management. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-UsageLocation` specifies the user's usage location. Two-letter ISO 3166 country code. Required for licensed users to check service availability. Examples: US, JP, GB. Not nullable. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -City + +Specifies the user's city. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country + +Specifies the user's country. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreationType + +Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. +Possible values are "LocalAccount" and null. +When creating a local account, the property is required and you must set it to "LocalAccount". +When creating a work or school account, don't specify the property or set it to null. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Department + +Specifies the user's department. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the user's display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProperty + +Add data to custom user properties as the basic open extensions or the more versatile schema extensions. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GivenName + +Specifies the user's given name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmutableId + +This property links an on-premises Active Directory user account to its Microsoft Entra ID user object. You must specify this property when creating a new user account in Graph if the user's userPrincipalName uses a federated domain. + +Important: Do not use the $ and _ characters when specifying this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JobTitle + +Specifies the user's job title. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickName + +Specifies a nickname for the user's mail address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Mobile + +Specifies the user's mobile phone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId +Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OtherMails + +Specifies other email addresses for the user. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordPolicies + +Specifies password policies for the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordProfile + +Specifies the user's password profile. + +```yaml +Type: PasswordProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostalCode + +Specifies the user's postal code. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredLanguage + +Specifies the user's preferred language. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShowInAddressList + +Set to True to show this user in the address list. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInNames + +The list of sign in names for this user + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the user's state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreetAddress + +Specifies the user's street address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Surname + +Specifies the user's surname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TelephoneNumber + +Specifies the user's telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsageLocation + +A two letter country or region code (ISO standard 3166). Required for users that assigned licenses due to legal requirement to check for availability of services in country and regions. Examples include: "US," "JP," and "GB." Not nullable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPrincipalName + +Specifies the user's user principal name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserType + +A string value that can be used to classify user types in your directory, such as "Member" and "Guest." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AgeGroup + +Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, minor, notAdult, and adult. See, [legal-age-group](https://learn.microsoft.com/graph/api/resources/user#legal-age-group-property-definitions). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompanyName + +The company name, which the user is associated. This property can be useful for describing the company that an external user comes from. The maximum length of the company name is 64 characters. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentProvidedForMinor + +Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUser](New-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md new file mode 100644 index 0000000000..82ec532e91 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md @@ -0,0 +1,91 @@ +--- +title: Set-EntraUserExtension +description: This article provides details on the Set-EntraUserExtension command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserExtension + +schema: 2.0.0 +--- + +# Set-EntraUserExtension + +## Synopsis + +Sets a user extension. + +## Syntax + +```powershell +Set-EntraUserExtension + -UserId + [] +``` + +## Description + +The `Set-EntraUserExtension` cmdlet updates a user extension in Microsoft Entra ID. + +## Examples + +### Example 1: Set the value of an extension attribute for a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + ExtensionName = 'extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8' + ExtensionValue = 'New Value' +} +Set-EntraUserExtension @params +``` + +This example shows how to update the value of the extension attribute for a specified user. + +- `-UserId` parameter specifies the user Id. +- `-ExtensionName` parameter specifies the name of an extension. +- `-ExtensionValue` parameter specifies the extension name values. + +## Parameters + +### -UserId + +Specifies the ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Get-EntraUserExtension](Get-EntraUserExtension.md) + +[Remove-EntraUserExtension](Remove-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md new file mode 100644 index 0000000000..ff516e1557 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md @@ -0,0 +1,209 @@ +--- +title: Set-EntraUserLicense +description: This article provides details on the Set-EntraUserLicense command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserLicense + +schema: 2.0.0 +--- + +# Set-EntraUserLicense + +## Synopsis + +Adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. + +## Syntax + +```powershell +Set-EntraUserLicense + -UserId + -AssignedLicenses + [] +``` + +## Description + +The `Set-EntraUserLicense` adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Writers +- License Administrator +- User Administrator + +**Note**: Before assigning a license, assign a usage location to the user using: +`Set-EntraUser -ObjectId user@contoso.com -UsageLocation ''`. + +## Examples + +### Example 1: Add a license to a user based on a template user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$LicensedUser = Get-EntraUser -ObjectId 'TemplateUser@contoso.com' +$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License.SkuId = $LicensedUser.AssignedLicenses.SkuId +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.AddLicenses = $License +$Params = @{ + UserId = 'SawyerM@contoso.com' + AssignedLicenses = $Licenses +} +Set-EntraUserLicense @Params +``` + +```Output +Name Value +---- ----- +externalUserStateChangeDateTi… +businessPhones {8976546787} +postalCode 444601 +createdDateTime 06-11-2023 04:48:19 +surname KTETSs +jobTitle Manager +employeeType +otherMails {SawyerM@contoso.com} +isResourceAccount +usageLocation DE +legalAgeGroupClassification Adult +id cccccccc-2222-3333-4444-dddddddddddd +isLicenseReconciliationNeeded False +``` + +This example demonstrates how to assign a license to a user based on a template user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +### Example 2: Add a license to a user by copying license from another user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$LicensedUser = Get-EntraUser -ObjectId 'AdeleV@contoso.com' +$User = Get-EntraUser -ObjectId 'SawyerM@contoso.com' +$License1 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License1.SkuId = $LicensedUser.AssignedLicenses.SkuId[0] +$License2 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License2.SkuId = $LicensedUser.AssignedLicenses.SkuId[1] +$addLicensesArray = @() +$addLicensesArray += $License1 +$addLicensesArray += $License2 +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.AddLicenses = $addLicensesArray +Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses +``` + +```Output +Name Value +---- ----- +externalUserStateChangeDateTi… +businessPhones {8976546787} +postalCode 444601 +createdDateTime 06-11-2023 04:48:19 +surname KTETSs +jobTitle Manager +employeeType +otherMails {SawyerM@contoso.com} +isResourceAccount +usageLocation DE +legalAgeGroupClassification Adult +id cccccccc-2222-3333-4444-dddddddddddd +isLicenseReconciliationNeeded False +``` + +This example demonstrates how to assign a license to a user by copying license from another user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +### Example 3: Remove an assigned User's License + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$UserPrincipalName = 'SawyerM@contoso.com' +$User = Get-EntraUser -ObjectId $UserPrincipalName +$SkuId = (Get-EntraUserLicenseDetail -ObjectId $UserPrincipalName).SkuId +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.RemoveLicenses = $SkuId +Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses +``` + +```Output +Name Value +---- ----- +displayName SawyerM +id cccccccc-2222-3333-4444-dddddddddddd +jobTitle +surname M +mail +userPrincipalName SawyerM@contoso.com +mobilePhone +preferredLanguage +@odata.context https://graph.microsoft.com/v1.0/$metadata#users/$entity +businessPhones {} +officeLocation +givenName Sawyer +``` + +This example demonstrates how to remove a user's license by retrieving the user details. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +## Parameters + +### -AssignedLicenses + +Specifies a list of licenses to assign or remove. + +```yaml +Type: AssignedLicenses +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md new file mode 100644 index 0000000000..f73f6beb1c --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md @@ -0,0 +1,101 @@ +--- +title: Set-EntraUserManager +description: This article provides details on the Set-EntraUserManager command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserManager + +schema: 2.0.0 +--- + +# Set-EntraUserManager + +## Synopsis + +Updates a user's manager. + +## Syntax + +```powershell +Set-EntraUserManager + -UserId + -RefObjectId + [] +``` + +## Description + +The `Set-EntraUserManager` cmdlet update the manager for a user in Microsoft Entra ID. Specify the `UserId` and `RefObjectId` parameters to update the manager for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Update a user's manager + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$manager = Get-EntraUser -UserId 'Manager@contoso.com' +$params = @{ + UserId = 'SawyerM@contoso.com' + RefObjectId = $manager.ObjectId +} +Set-EntraUserManager @params +``` + +This example demonstrates how to update the manager for the specified user. + +## Parameters + +### -UserId + +Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUserManager](Get-EntraUserManager.md) + +[Remove-EntraUserManager](Remove-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md new file mode 100644 index 0000000000..8c2db963bf --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md @@ -0,0 +1,164 @@ +--- +title: Set-EntraUserPassword +description: This article provides details on the Set-EntraUserPassword command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserPassword + +schema: 2.0.0 +--- + +# Set-EntraUserPassword + +## Synopsis + +Sets the password of a user. + +## Syntax + +```powershell +Set-EntraUserPassword + [-ForceChangePasswordNextLogin ] + [-EnforceChangePasswordPolicy ] + -UserId + -Password + [] +``` + +## Description + +The `Set-EntraUserPassword` cmdlet sets the password for a user in Microsoft Entra ID. + +Any user can update their password without belonging to any administrator role. + +## Examples + +### Example 1: Set a user's password + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword = '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword +``` + +This command sets the specified user's password. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. + +### Example 2: Set a user's password with EnforceChangePasswordPolicy parameter + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword= '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -EnforceChangePasswordPolicy $True +``` + +This command sets the specified user's password with EnforceChangePasswordPolicy parameter. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. +- `-EnforceChangePasswordPolicy` parameter force the user to change their password, if set to true. + +### Example 3: Set a user's password with ForceChangePasswordNextLogin parameter + +```powershell +connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword= '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -ForceChangePasswordNextLogin $True +``` + +This command sets the specified user's password with ForceChangePasswordNextLogin parameter. + +- `-ObjectId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. +- `-ForceChangePasswordNextLogin` parameter forces a user to change their password during their next log in. + +## Parameters + +### -EnforceChangePasswordPolicy + +If set to true, force the user to change their password. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ForceChangePasswordNextLogin + +Forces a user to change their password during their next sign in. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Password + +Specifies the password. + +```yaml +Type: System.SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md new file mode 100644 index 0000000000..21eef3e9b1 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md @@ -0,0 +1,130 @@ +--- +title: Set-EntraUserThumbnailPhoto +description: This article provides details on the Set-EntraUserThumbnailPhoto command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto + +schema: 2.0.0 +--- + +# Set-EntraUserThumbnailPhoto + +## Synopsis + +Set the thumbnail photo for a user. + +## Syntax + +### File (Default) + +```powershell +Set-EntraUserThumbnailPhoto + [-UserId ] + -FilePath + [] +``` + +### Stream + +```powershell +Set-EntraUserThumbnailPhoto + -FileStream + [-UserId ] + [] +``` + +### ByteArray + +```powershell +Set-EntraUserThumbnailPhoto + [-UserId ] + -ImageByteArray + [] +``` + +## Description + +The `Set-EntraUserThumbnailPhoto` cmdlet is used to set the thumbnail photo for a user. + +Updating any user's photo in the organization requires the User.ReadWrite.All permission. Updating only the signed-in user's photo requires the User.ReadWrite permission. + +## Examples + +### Example 1: Sets the thumbnail photo + +```powershell +Connect-Entra -Scopes 'User.ReadWrite','User.ReadWrite.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + FilePath = 'D:\UserThumbnailPhoto.jpg' +} +Set-EntraUserThumbnailPhoto @params +``` + +This example sets the thumbnail photo of the user specified with the UserId parameter to the image specified with the FilePath parameter. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-FilePath` parameter specifies the file path of the image to be uploaded as the user thumbnail photo. + +## Parameters + +### -FilePath + +The file path of the image to be uploaded as the user thumbnail photo. + +```yaml +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +The Object ID of the user for which the user thumbnail photo is set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.IO.Stream System.Byte\[\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraUserThumbnailPhoto](Get-EntraUserThumbnailPhoto.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md new file mode 100644 index 0000000000..1959f83ffc --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md @@ -0,0 +1,106 @@ +--- +title: Update-EntraSignedInUserPassword +description: This article provides details on the Update-EntraSignedInUserPassword command. + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword + +schema: 2.0.0 +--- + +# Update-EntraSignedInUserPassword + +## Synopsis + +Updates the password for the signed-in user. + +## Syntax + +```powershell +Update-EntraSignedInUserPassword + -NewPassword + -CurrentPassword + [] +``` + +## Description + +The `Update-EntraSignedInUserPassword` cmdlet updates the password for the signed-in user in Microsoft Entra ID. + +Enable users to update their own passwords. Any user can change their password without requiring administrator privileges. + +## Examples + +### Example 1: Update a password + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$CurrentPassword = ConvertTo-SecureString '' -AsPlainText -Force +$NewPassword = ConvertTo-SecureString '' -AsPlainText -Force +$params = @{ + CurrentPassword = $CurrentPassword + NewPassword = $NewPassword +} +Update-EntraSignedInUserPassword @params +``` + +This example shows how to update the password for the signed-in user. + +- `-CurrentPassword` parameter specifies the current password of the signed-in user. +- `-NewPassword` parameter specifies the new password for the signed-in user. + +## Parameters + +### -CurrentPassword + +Specifies the current password of the signed-in user. + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NewPassword + +Specifies the new password for the signed-in user. + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [changePassword](https://learn.microsoft.com/graph/api/user-changepassword). + +## Related links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md new file mode 100644 index 0000000000..f300d9f135 --- /dev/null +++ b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md @@ -0,0 +1,105 @@ +--- +title: Update-EntraUserFromFederated +description: This article provides details on the Update-EntraUserFromFederated command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraUserFromFederated + +schema: 2.0.0 +--- + +# Update-EntraUserFromFederated + +## Synopsis + +Updates a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. + +## Syntax + +```powershell +Update-EntraUserFromFederated + -UserPrincipalName + [-NewPassword ] + [] +``` + +## Description + +The `Update-EntraUserFromFederated` cmdlet is used to update a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. A new password must be provided for the user. + +This process writes the new password to Microsoft Entra ID and, if configured with password writeback, pushes it to on-premises Active Directory. The admin can provide a new password or let the system generate one. The user will be prompted to change their password at their next sign-in. + +For delegated scenarios, the administrator needs at least the Authentication Administrator or Privileged Authentication Administrator Microsoft Entra role. + +Admins with User Administrator, Helpdesk Administrator, or Password Administrator roles can also reset passwords for non-admin users and a limited set of admin roles. + +## Examples + +### Example 1: Update a user in a domain + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All' +Update-EntraUserFromFederated -UserPrincipalName 'pattifuller@contoso.com' +``` + +This command updates a user in a domain. + +- `-UserPrincipalName` parameter specifies the Microsoft Entra ID UserID for the user to convert. + +## Parameters + +### -UserPrincipalName + +The Microsoft Entra ID UserID for the user to convert. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NewPassword + +The new password of the user. + +For tenants using hybrid password scenarios, specifying a new password is required. If you omit the password for a cloud-only account, the system generates one automatically. This generated password is a Unicode string without additional encoding. Before acceptance, the password is validated against the tenant's banned password list and must meet the tenant's cloud and/or on-premises password requirements. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [resetPassword](https://learn.microsoft.com/graph/api/authenticationmethod-resetpassword). + +## Related Links From 1edb018c94143cf14c8e6b122f9b86322b10a021 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 00:47:49 +0300 Subject: [PATCH 066/124] fixes to dependency mapping and added logic to skip the Migrations directory --- build/Create-EntraModule.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index e6a3e7f20d..e4d7065cd0 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -4,12 +4,10 @@ param ( ) . ..\src\EntraModuleBuilder.ps1 -. .\Split-Docs $moduleBuilder = [EntraModuleBuilder]::new() -# Split the docs first -Split-Docs -Source $Module + $moduleBuilder.CreateModuleHelp($Module) $moduleBuilder.CreateSubModuleFile($Module, ".\Typedefs.txt") $moduleBuilder.CreateModuleManifest($Module) From d9bb336363648f898d149bd625f14e3ec418943c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 00:59:03 +0300 Subject: [PATCH 067/124] update dependency maps --- module/Entra/config/dependencyMapping.json | 6 +-- .../EntraBeta/config/dependencyMapping.json | 10 ++++- src/EntraModuleBuilder.ps1 | 45 +++++++++++++------ src/EntraModuleSplitter.ps1 | 7 ++- 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/module/Entra/config/dependencyMapping.json b/module/Entra/config/dependencyMapping.json index 8306ef14d4..ba3d50bcab 100644 --- a/module/Entra/config/dependencyMapping.json +++ b/module/Entra/config/dependencyMapping.json @@ -2,9 +2,9 @@ "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], "Microsoft.Graph.Entra.Authentication":["Microsoft.Graph.Authentication"], "Microsoft.Graph.Entra.Groups":["Microsoft.Graph.Groups"], - "Microsoft.Graph.Entra.DirectoryManagement":["Microsoft.Graph.DirectoryManagement"], - "Microsoft.Graph.Entra.Governance":["Microsoft.Graph.Governance"], - "Microsoft.Graph.Entra.SignIns":["Microsoft.Graph.SigIns"], + "Microsoft.Graph.Entra.DirectoryManagement":["Microsoft.Graph.Identity.DirectoryManagement"], + "Microsoft.Graph.Entra.Governance":["Microsoft.Graph.Identity.Governance"], + "Microsoft.Graph.Entra.SignIns":["Microsoft.Graph.Identity.SignIns"], "Microsoft.Graph.Entra.Applications":["Microsoft.Graph.Applications"], "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"], "Microsoft.Graph.Entra.Invitations":["Microsoft.Graph.Identity.SignIns"] diff --git a/module/EntraBeta/config/dependencyMapping.json b/module/EntraBeta/config/dependencyMapping.json index ed944543ad..ada536d812 100644 --- a/module/EntraBeta/config/dependencyMapping.json +++ b/module/EntraBeta/config/dependencyMapping.json @@ -1,3 +1,11 @@ { - "Microsoft.Graph.Entra.Beta.User":["Microsoft.Graph.Users"] + "Microsoft.Graph.Entra.Beta.Users":["Microsoft.Graph.Beta.Users","Microsoft.Graph.Beta.Users.Actions","Microsoft.Graph.Beta.Users.Functions"], + "Microsoft.Graph.Entra.Beta.Authentication":["Microsoft.Graph.Authentication"], + "Microsoft.Graph.Entra.Beta.Groups":["Microsoft.Graph.Beta.Groups"], + "Microsoft.Graph.Entra.Beta.DirectoryManagement":["Microsoft.Graph.Beta.Identity.DirectoryManagement"], + "Microsoft.Graph.Entra.Beta.Governance":["Microsoft.Graph.Beta.Identity.Governance"], + "Microsoft.Graph.Entra.Beta.SignIns":["Microsoft.Graph.Beta.Identity.SignIns"], + "Microsoft.Graph.Entra.Beta.Applications":["Microsoft.Graph.Beta.Applications"], + "Microsoft.Graph.Entra.Beta.Reports":["Microsoft.Graph.Beta.Reports"], + "Microsoft.Graph.Entra.Beta.Invitations":["Microsoft.Graph.Beta.Identity.SignIns"] } \ No newline at end of file diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index dfcb440dc2..0598d31371 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -154,6 +154,11 @@ Set-StrictMode -Version 5 $this.EnsureDestinationDirectory($destDirectory) foreach ($subDir in $subDirectories) { + # Skip the 'Migration' sub-directory + if ($subDir.Name -eq 'Migration') { + Log-Message "Skipping 'Migration' directory." -Level 'INFO' + continue + } $this.ProcessSubDirectory($subDir.FullName, $subDir.Name, $parentDirName, $destDirectory, $typedefsFilePath) } @@ -341,6 +346,12 @@ foreach (`$subModule in `$subModules) { foreach ($subDir in $subDirectories) { # Define module name based on sub-directory name + # Skip the 'Migration' sub-directory + if ($subDir.Name -eq 'Migration') { + Log-Message "Skipping 'Migration' directory." -Level 'INFO' + continue + } + $moduleName = $subDir.Name $helpFileName = if ($Module -eq "Entra") { @@ -465,7 +476,7 @@ foreach (`$subModule in `$subModules) { } # Determine the base docs path based on the specified module - $docsPath=$this.BaseDocsPath + $docsPath = $this.BaseDocsPath if ($Module -eq "Entra") { $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-v1.0/Microsoft.Graph.Entra" } elseif ($Module -eq "EntraBeta") { @@ -482,12 +493,20 @@ foreach (`$subModule in `$subModules) { } # Get all subdirectories within the base docs path - $subDirectories = Get-ChildItem -Path $docsPath + $subDirectories = Get-ChildItem -Path $docsPath -Directory foreach ($subDirectory in $subDirectories) { - # Get all markdown files in the current subdirectory - $markdownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" + # Skip the 'Migration' sub-directory + if ($subDirectory.Name -eq 'Migration') { + Log-Message "Skipping 'Migration' directory." -Level 'INFO' + continue + } - if ($null -ne $markDownFiles -and $markdownFiles.Count -eq 0) { + # Get all markdown files in the current subdirectory + $markDownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" + Log-Message "Processing $subDirectory" -Level 'WARNING' + + # Check if markdown files are found + if (-not($markDownFiles)) { Log-Message "No markdown files found in $($subDirectory.FullName)." -Level 'ERROR' continue } @@ -503,21 +522,21 @@ foreach (`$subModule in `$subModules) { $helpOutputFilePath = Join-Path -Path $this.OutputDirectory -ChildPath $helpFileName - $moduleDocsPath=$subDirectory + $moduleDocsPath = $subDirectory - try{ - # Create the help file using PlatyPS - New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force + try { + # Create the help file using PlatyPS + New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force - Log-Message "[EntraModuleBuilder] Help file generated: $helpOutputFilePath" -Level 'SUCCESS' + Log-Message "[EntraModuleBuilder] Help file generated: $helpOutputFilePath" -Level 'SUCCESS' - }catch{ - Log-Message "[EntraModuleBuilder] CreateModuleHelp: $_.Exception.Message" -Level 'ERROR' + } catch { + Log-Message "[EntraModuleBuilder] CreateModuleHelp: $_.Exception.Message" -Level 'ERROR' } - } Log-Message "[EntraModuleBuilder] Help files generated successfully for module: $Module" -Level 'SUCCESS' } + } \ No newline at end of file diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 5938deae6c..643e6491a4 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -197,7 +197,12 @@ class EntraModuleSplitter { $totalAliases = $aliasFileContent.Count foreach ($directory in $directories) { - # Get the full path of the directory + # Skip the 'Migration' sub-directory + if ($directory.Name -eq 'Migration') { + Log-Message "Skipping 'Migration' directory." -Level 'INFO' + continue + } + # Get the full path of the directory $directoryPath = $directory.FullName # Get .ps1 file names in the current directory From d124d77d9b40221a2c36a55ec4dde4aa1e772c1e Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:43:05 +0300 Subject: [PATCH 068/124] fixes --- src/EntraModuleBuilder.ps1 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 0598d31371..a4a9326087 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -404,8 +404,7 @@ foreach (`$subModule in `$subModules) { $requiredModules = @() if (Test-Path $dependencyMappingPath) { $jsonContent = Get-Content -Path $dependencyMappingPath -Raw | ConvertFrom-Json - Log-Message "Dependency Mapping: $jsonContent" - # Convert JSON to Hashtable + $dependencyMapping = @{} foreach ($key in $jsonContent.PSObject.Properties.Name) { $dependencyMapping[$key] = $jsonContent.$key @@ -503,8 +502,7 @@ foreach (`$subModule in `$subModules) { # Get all markdown files in the current subdirectory $markDownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" - Log-Message "Processing $subDirectory" -Level 'WARNING' - + # Check if markdown files are found if (-not($markDownFiles)) { Log-Message "No markdown files found in $($subDirectory.FullName)." -Level 'ERROR' From 8fa1d9f3635aa391f097035ded5a2a5c57b66108 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:54:29 +0300 Subject: [PATCH 069/124] fixes --- build/Create-EntraModule.ps1 | 4 +++- src/EntraModuleBuilder.ps1 | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index e4d7065cd0..0e8f363dfb 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -1,9 +1,11 @@ +[cmdletbinding()] param ( [string]$Module = "Entra" # Default to "Entra" if no argument is provided ) -. ..\src\EntraModuleBuilder.ps1 +. (Join-Path $psscriptroot "/common-functions.ps1") +. (Join-Path $psscriptroot "../src/EntraModuleBuilder.ps1") $moduleBuilder = [EntraModuleBuilder]::new() diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index a4a9326087..8eb5249814 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -414,7 +414,6 @@ foreach (`$subModule in `$subModules) { if ($dependencyMapping.ContainsKey($keyModuleName)) { foreach ($dependency in $dependencyMapping[$keyModuleName]) { - Log-Message "$content.requiredModulesVersion" -Level 'WARNING' $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } Log-Message $requiredModules.Count } From 9eef4bc458bacc8205c2c4621ec071298d20256b Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:09:15 +0300 Subject: [PATCH 070/124] migrate to moduleVNext --- build/Split-Docs.ps1 | 8 +- .../Enable-EntraAzureADAliases.ps1 | 40 - .../Migration/Enable-EntraAzureADAliases.ps1 | 39 - module/Entra/config/dependencyMapping.json | 3 +- .../Add-EntraApplicationOwner.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 .../Add-EntraServicePrincipalOwner.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Applications/Get-EntraApplication.ps1 | 0 .../Get-EntraApplicationExtensionProperty.ps1 | 0 .../Get-EntraApplicationKeyCredential.ps1 | 0 .../Applications/Get-EntraApplicationLogo.ps1 | 0 .../Get-EntraApplicationOwner.ps1 | 0 ...Get-EntraApplicationPasswordCredential.ps1 | 0 .../Get-EntraApplicationServiceEndpoint.ps1 | 0 .../Get-EntraApplicationTemplate.ps1 | 0 .../Get-EntraDeletedApplication.ps1 | 0 .../Get-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignedTo.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...Get-EntraServicePrincipalCreatedObject.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...Get-EntraServicePrincipalKeyCredential.ps1 | 0 .../Get-EntraServicePrincipalMembership.ps1 | 0 ...aServicePrincipalOAuth2PermissionGrant.ps1 | 0 .../Get-EntraServicePrincipalOwnedObject.ps1 | 0 .../Get-EntraServicePrincipalOwner.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Applications/New-EntraApplication.ps1 | 0 .../New-EntraApplicationExtensionProperty.ps1 | 0 ...ntraApplicationFromApplicationTemplate.ps1 | 0 .../Applications/New-EntraApplicationKey.ps1 | 0 .../New-EntraApplicationKeyCredential.ps1 | 0 .../New-EntraApplicationPassword.ps1 | 0 ...New-EntraApplicationPasswordCredential.ps1 | 0 .../Applications/New-EntraCustomHeaders.ps1 | 0 .../New-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Applications/Remove-EntraApplication.ps1 | 0 ...move-EntraApplicationExtensionProperty.ps1 | 0 .../Remove-EntraApplicationKey.ps1 | 0 .../Remove-EntraApplicationKeyCredential.ps1 | 0 .../Remove-EntraApplicationOwner.ps1 | 0 .../Remove-EntraApplicationPassword.ps1 | 0 ...ove-EntraApplicationPasswordCredential.ps1 | 0 ...move-EntraApplicationVerifiedPublisher.ps1 | 0 .../Remove-EntraDeletedApplication.ps1 | 0 .../Remove-EntraDeletedDirectoryObject.ps1 | 0 .../Remove-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...ove-EntraServicePrincipalKeyCredential.ps1 | 0 .../Remove-EntraServicePrincipalOwner.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Restore-EntraDeletedApplication.ps1 | 0 ...ntraGroupIdsServicePrincipalIsMemberOf.ps1 | 0 .../Applications/Set-EntraApplication.ps1 | 0 .../Applications/Set-EntraApplicationLogo.ps1 | 0 .../Set-EntraApplicationVerifiedPublisher.ps1 | 0 .../Set-EntraServicePrincipal.ps1 | 0 .../Authentication/Add-EntraEnvironment.ps1 | 0 .../Authentication/Connect-Entra.ps1 | 0 .../Authentication/Disconnect-Entra.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Authentication/Find-EntraPermission.ps1 | 0 .../Authentication/Get-EntraContext.ps1 | 0 .../Authentication/Get-EntraEnvironment.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Authentication/New-EntraCustomHeaders.ps1 | 0 ...t-EntraStrongAuthenticationMethodByUpn.ps1 | 0 ...evoke-EntraSignedInUserAllRefreshToken.ps1 | 0 .../Revoke-EntraUserAllRefreshToken.ps1 | 0 .../Add-EntraAdministrativeUnitMember.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Add-EntraDeviceRegisteredOwner.ps1 | 0 .../Add-EntraDeviceRegisteredUser.ps1 | 0 .../Add-EntraDirectoryRoleMember.ps1 | 0 .../Add-EntraScopedRoleMembership.ps1 | 0 .../Confirm-EntraDomain.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Enable-EntraDirectoryRole.ps1 | 0 .../Get-EntraAccountSku.ps1 | 0 .../Get-EntraAdministrativeUnit.ps1 | 0 .../Get-EntraAdministrativeUnitMember.ps1 | 0 .../Get-EntraAttributeSet.ps1 | 0 .../DirectoryManagement/Get-EntraContact.ps1 | 0 .../Get-EntraContactDirectReport.ps1 | 0 .../Get-EntraContactManager.ps1 | 0 .../Get-EntraContactMembership.ps1 | 0 .../DirectoryManagement/Get-EntraContract.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Get-EntraDeletedDirectoryObject.ps1 | 0 .../DirectoryManagement/Get-EntraDevice.ps1 | 0 .../Get-EntraDeviceRegisteredOwner.ps1 | 0 .../Get-EntraDeviceRegisteredUser.ps1 | 0 .../Get-EntraDirSyncConfiguration.ps1 | 0 ...ctoryObjectOnPremisesProvisioningError.ps1 | 0 .../Get-EntraDirectoryRole.ps1 | 0 .../Get-EntraDirectoryRoleMember.ps1 | 0 .../Get-EntraDirectoryRoleTemplate.ps1 | 0 .../DirectoryManagement/Get-EntraDomain.ps1 | 0 .../Get-EntraDomainFederationSettings.ps1 | 0 .../Get-EntraDomainNameReference.ps1 | 0 ...-EntraDomainServiceConfigurationRecord.ps1 | 0 .../Get-EntraDomainVerificationDnsRecord.ps1 | 0 .../Get-EntraExtensionProperty.ps1 | 0 .../Get-EntraFederationProperty.ps1 | 0 .../Get-EntraObjectByObjectId.ps1 | 0 .../Get-EntraPartnerInformation.ps1 | 0 .../Get-EntraPasswordPolicy.ps1 | 0 .../Get-EntraScopedRoleMembership.ps1 | 0 .../Get-EntraSubscribedSku.ps1 | 0 .../Get-EntraTenantDetail.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraAdministrativeUnit.ps1 | 0 .../New-EntraAttributeSet.ps1 | 0 .../New-EntraCustomHeaders.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 .../DirectoryManagement/New-EntraDevice.ps1 | 0 .../DirectoryManagement/New-EntraDomain.ps1 | 0 .../Remove-EntraAdministrativeUnit.ps1 | 0 .../Remove-EntraAdministrativeUnitMember.ps1 | 0 .../Remove-EntraContact.ps1 | 0 .../Remove-EntraDevice.ps1 | 0 .../Remove-EntraDeviceRegisteredOwner.ps1 | 0 .../Remove-EntraDeviceRegisteredUser.ps1 | 0 .../Remove-EntraDirectoryRoleMember.ps1 | 0 .../Remove-EntraDomain.ps1 | 0 .../Remove-EntraScopedRoleMembership.ps1 | 0 .../Set-EntraAdministrativeUnit.ps1 | 0 .../Set-EntraAttributeSet.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../DirectoryManagement/Set-EntraDevice.ps1 | 0 .../Set-EntraDirSyncConfiguration.ps1 | 0 .../Set-EntraDirSyncEnabled.ps1 | 0 .../Set-EntraDirSyncFeature.ps1 | 0 .../DirectoryManagement/Set-EntraDomain.ps1 | 0 .../Set-EntraDomainFederationSettings.ps1 | 0 .../Set-EntraPartnerInformation.ps1 | 0 .../Set-EntraTenantDetail.ps1 | 0 .../Enable-EntraAzureADAlias.ps1 | 0 .../Governance/Enable-EntraAzureADAliases.ps1 | 0 .../Get-EntraDirectoryRoleAssignment.ps1 | 0 .../Get-EntraDirectoryRoleDefinition.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Governance/New-EntraCustomHeaders.ps1 | 0 .../New-EntraDirectoryRoleAssignment.ps1 | 0 .../New-EntraDirectoryRoleDefinition.ps1 | 0 .../Remove-EntraDirectoryRoleAssignment.ps1 | 0 .../Remove-EntraDirectoryRoleDefinition.ps1 | 0 .../Set-EntraDirectoryRoleDefinition.ps1 | 0 .../Groups/Add-EntraGroupMember.ps1 | 0 .../Groups/Add-EntraGroupOwner.ps1 | 0 .../Groups/Add-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Enable-EntraAzureADAliases.ps1 | 0 .../Groups/Get-EntraDeletedGroup.ps1 | 0 .../Groups/Get-EntraGroup.ps1 | 0 .../Get-EntraGroupAppRoleAssignment.ps1 | 0 .../Groups/Get-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Get-EntraGroupMember.ps1 | 0 .../Groups/Get-EntraGroupOwner.ps1 | 0 .../Groups/Get-EntraGroupPermissionGrant.ps1 | 0 .../Groups/Get-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Get-EntraObjectSetting.ps1 | 0 .../Groups/Get-EntraUnsupportedCommand.ps1 | 0 .../Groups/New-EntraCustomHeaders.ps1 | 0 .../Groups/New-EntraGroup.ps1 | 0 .../New-EntraGroupAppRoleAssignment.ps1 | 0 .../Groups/New-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Remove-EntraGroup.ps1 | 0 .../Remove-EntraGroupAppRoleAssignment.ps1 | 0 .../Remove-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Remove-EntraGroupMember.ps1 | 0 .../Groups/Remove-EntraGroupOwner.ps1 | 0 .../Remove-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Reset-EntraLifeCycleGroup.ps1 | 0 .../Select-EntraGroupIdsContactIsMemberOf.ps1 | 0 .../Select-EntraGroupIdsGroupIsMemberOf.ps1 | 0 .../Select-EntraGroupIdsUserIsMemberOf.ps1 | 0 .../Groups/Set-EntraGroup.ps1 | 0 .../Groups/Set-EntraGroupLifecyclePolicy.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Invitations/New-EntraCustomHeaders.ps1 | 0 .../Invitations/New-EntraInvitation.ps1 | 0 .../Migration/Get-EntraUnsupportedCommand.ps1 | 0 .../Migration/New-EntraCustomHeaders.ps1 | 0 .../Migration/Test-EntraScript.ps1 | 0 .../Reports/Enable-EntraAzureADAliases.ps1 | 0 .../Reports/Get-EntraAuditDirectoryLog.ps1 | 0 .../Reports/Get-EntraAuditSignInLog.ps1 | 0 .../Reports/Get-EntraUnsupportedCommand.ps1 | 0 .../Reports/New-EntraCustomHeaders.ps1 | 0 .../SignIns/Enable-EntraAzureADAliases.ps1 | 0 .../Get-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/Get-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/Get-EntraIdentityProvider.ps1 | 0 .../SignIns/Get-EntraNamedLocationPolicy.ps1 | 0 .../Get-EntraOAuth2PermissionGrant.ps1 | 0 .../Get-EntraPermissionGrantConditionSet.ps1 | 0 .../Get-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Get-EntraPolicy.ps1 | 0 .../Get-EntraTrustedCertificateAuthority.ps1 | 0 .../SignIns/Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/New-EntraCustomHeaders.ps1 | 0 .../SignIns/New-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/New-EntraIdentityProvider.ps1 | 0 .../SignIns/New-EntraNamedLocationPolicy.ps1 | 0 .../New-EntraOauth2PermissionGrant.ps1 | 0 .../New-EntraPermissionGrantConditionSet.ps1 | 0 .../New-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/New-EntraPolicy.ps1 | 0 .../New-EntraTrustedCertificateAuthority.ps1 | 0 .../Remove-EntraConditionalAccessPolicy.ps1 | 0 .../Remove-EntraFeatureRolloutPolicy.ps1 | 0 ...traFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../SignIns/Remove-EntraIdentityProvider.ps1 | 0 .../Remove-EntraNamedLocationPolicy.ps1 | 0 .../Remove-EntraOAuth2PermissionGrant.ps1 | 0 ...emove-EntraPermissionGrantConditionSet.ps1 | 0 .../Remove-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Remove-EntraPolicy.ps1 | 0 ...emove-EntraTrustedCertificateAuthority.ps1 | 0 .../SignIns/Set-EntraAuthorizationPolicy.ps1 | 0 .../Set-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/Set-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/Set-EntraIdentityProvider.ps1 | 0 .../SignIns/Set-EntraNamedLocationPolicy.ps1 | 0 .../Set-EntraPermissionGrantConditionSet.ps1 | 0 .../Set-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Set-EntraPolicy.ps1 | 0 .../Set-EntraTrustedCertificateAuthority.ps1 | 0 .../UnMappedAliases.psd1 | 1 + .../Users/Enable-EntraAzureADAliases.ps1 | 0 .../Users/Get-EntraUnsupportedCommand.ps1 | 0 .../Users/Get-EntraUser.ps1 | 0 .../Users/Get-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Get-EntraUserCreatedObject.ps1 | 0 .../Users/Get-EntraUserDirectReport.ps1 | 0 .../Users/Get-EntraUserExtension.ps1 | 0 .../Users/Get-EntraUserLicenseDetail.ps1 | 0 .../Users/Get-EntraUserManager.ps1 | 0 .../Users/Get-EntraUserMembership.ps1 | 0 .../Get-EntraUserOAuth2PermissionGrant.ps1 | 0 .../Users/Get-EntraUserOwnedDevice.ps1 | 0 .../Users/Get-EntraUserOwnedObject.ps1 | 0 .../Users/Get-EntraUserRegisteredDevice.ps1 | 0 .../Users/Get-EntraUserThumbnailPhoto.ps1 | 0 .../Users/New-EntraCustomHeaders.ps1 | 0 .../Users/New-EntraUser.ps1 | 0 .../Users/New-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraUser.ps1 | 0 .../Remove-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraUserExtension.ps1 | 0 .../Users/Remove-EntraUserManager.ps1 | 0 .../Users/Set-EntraUser.ps1 | 0 .../Users/Set-EntraUserExtension.ps1 | 0 .../Users/Set-EntraUserLicense.ps1 | 0 .../Users/Set-EntraUserManager.ps1 | 0 .../Users/Set-EntraUserPassword.ps1 | 0 .../Users/Set-EntraUserThumbnailPhoto.ps1 | 0 .../Update-EntraSignedInUserPassword.ps1 | 0 .../Users/Update-EntraUserFromFederated.ps1 | 0 .../UnMappedFiles/Get-EntraDirSyncfeature.ps1 | 0 moduleVNext/Entra/config/ModuleMetadata.json | 35 + moduleVNext/Entra/config/ModuleSettings.json | 22 + .../Entra/config/dependencyMapping.json | 10 + moduleVNext/Entra/config/moduleMapping.json | 263 ++++++ .../EntraBeta/config/ModuleMetadata.json | 36 + .../EntraBeta/config/ModuleSettings.json | 22 + .../EntraBeta/config/dependencyMapping.json | 10 + .../EntraBeta/config/moduleMapping.json | 16 + .../Applications/Add-EntraApplicationOwner.md | 102 +++ ...ncipalDelegatedPermissionClassification.md | 163 ++++ .../Add-EntraServicePrincipalOwner.md | 109 +++ .../Applications/Get-EntraApplication.md | 276 ++++++ .../Get-EntraApplicationExtensionProperty.md | 106 +++ .../Get-EntraApplicationKeyCredential.md | 89 ++ .../Applications/Get-EntraApplicationLogo.md | 136 +++ .../Applications/Get-EntraApplicationOwner.md | 212 +++++ .../Get-EntraApplicationPasswordCredential.md | 104 +++ .../Get-EntraApplicationServiceEndpoint.md | 167 ++++ .../Get-EntraApplicationTemplate.md | 173 ++++ .../Get-EntraDeletedApplication.md | 257 ++++++ .../Applications/Get-EntraServicePrincipal.md | 369 ++++++++ ...-EntraServicePrincipalAppRoleAssignedTo.md | 188 ++++ ...-EntraServicePrincipalAppRoleAssignment.md | 192 +++++ .../Get-EntraServicePrincipalCreatedObject.md | 155 ++++ ...ncipalDelegatedPermissionClassification.md | 204 +++++ .../Get-EntraServicePrincipalKeyCredential.md | 91 ++ .../Get-EntraServicePrincipalMembership.md | 178 ++++ ...raServicePrincipalOAuth2PermissionGrant.md | 169 ++++ .../Get-EntraServicePrincipalOwnedObject.md | 195 +++++ .../Get-EntraServicePrincipalOwner.md | 217 +++++ ...EntraServicePrincipalPasswordCredential.md | 93 ++ .../Applications/New-EntraApplication.md | 490 +++++++++++ .../New-EntraApplicationExtensionProperty.md | 215 +++++ ...EntraApplicationFromApplicationTemplate.md | 111 +++ .../Applications/New-EntraApplicationKey.md | 155 ++++ .../New-EntraApplicationKeyCredential.md | 258 ++++++ .../New-EntraApplicationPassword.md | 121 +++ .../New-EntraApplicationPasswordCredential.md | 215 +++++ .../Applications/New-EntraServicePrincipal.md | 406 +++++++++ ...-EntraServicePrincipalAppRoleAssignment.md | 230 +++++ .../New-EntraServicePrincipalKeyCredential.md | 182 ++++ ...EntraServicePrincipalPasswordCredential.md | 168 ++++ .../Applications/Remove-EntraApplication.md | 84 ++ ...emove-EntraApplicationExtensionProperty.md | 106 +++ .../Remove-EntraApplicationKey.md | 133 +++ .../Remove-EntraApplicationKeyCredential.md | 108 +++ .../Remove-EntraApplicationOwner.md | 106 +++ .../Remove-EntraApplicationPassword.md | 106 +++ ...move-EntraApplicationPasswordCredential.md | 104 +++ ...emove-EntraApplicationVerifiedPublisher.md | 83 ++ .../Remove-EntraDeletedApplication.md | 92 ++ .../Remove-EntraDeletedDirectoryObject.md | 96 +++ .../Remove-EntraServicePrincipal.md | 86 ++ ...-EntraServicePrincipalAppRoleAssignment.md | 117 +++ ...ncipalDelegatedPermissionClassification.md | 105 +++ ...move-EntraServicePrincipalKeyCredential.md | 104 +++ .../Remove-EntraServicePrincipalOwner.md | 107 +++ ...EntraServicePrincipalPasswordCredential.md | 104 +++ .../Restore-EntraDeletedApplication.md | 127 +++ ...EntraGroupIdsServicePrincipalIsMemberOf.md | 110 +++ .../Applications/Set-EntraApplication.md | 496 +++++++++++ .../Applications/Set-EntraApplicationLogo.md | 126 +++ .../Set-EntraApplicationVerifiedPublisher.md | 111 +++ .../Applications/Set-EntraServicePrincipal.md | 440 ++++++++++ .../Authentication/Add-EntraEnvironment.md | 119 +++ .../Authentication/Connect-Entra.md | 583 +++++++++++++ .../Authentication/Disconnect-Entra.md | 78 ++ .../Authentication/Find-EntraPermission.md | 239 +++++ .../Authentication/Get-EntraContext.md | 130 +++ .../Authentication/Get-EntraEnvironment.md | 108 +++ ...et-EntraStrongAuthenticationMethodByUpn.md | 79 ++ ...Revoke-EntraSignedInUserAllRefreshToken.md | 73 ++ .../Revoke-EntraUserAllRefreshToken.md | 90 ++ .../Add-EntraAdministrativeUnitMember.md | 111 +++ ...SecurityAttributeDefinitionAllowedValue.md | 139 +++ .../Add-EntraDeviceRegisteredOwner.md | 107 +++ .../Add-EntraDeviceRegisteredUser.md | 112 +++ .../Add-EntraDirectoryRoleMember.md | 104 +++ .../Add-EntraScopedRoleMembership.md | 135 +++ .../Confirm-EntraDomain.md | 112 +++ .../Enable-EntraDirectoryRole.md | 96 +++ .../Get-CrossCloudVerificationCode.md | 72 ++ .../Get-EntraAccountSku.md | 117 +++ .../Get-EntraAdministrativeUnit.md | 237 +++++ .../Get-EntraAdministrativeUnitMember.md | 193 +++++ .../Get-EntraAttributeSet.md | 143 +++ .../DirectoryManagement/Get-EntraContact.md | 236 +++++ .../Get-EntraContactDirectReport.md | 159 ++++ .../Get-EntraContactManager.md | 98 +++ .../Get-EntraContactMembership.md | 175 ++++ .../Get-EntraContactThumbnailPhoto.md | 150 ++++ .../DirectoryManagement/Get-EntraContract.md | 195 +++++ ...-EntraCustomSecurityAttributeDefinition.md | 142 +++ ...SecurityAttributeDefinitionAllowedValue.md | 187 ++++ .../Get-EntraDeletedDirectoryObject.md | 122 +++ .../DirectoryManagement/Get-EntraDevice.md | 271 ++++++ .../Get-EntraDeviceRegisteredOwner.md | 196 +++++ .../Get-EntraDeviceRegisteredUser.md | 180 ++++ .../Get-EntraDirSyncConfiguration.md | 106 +++ .../Get-EntraDirSyncFeature.md | 153 ++++ ...ectoryObjectOnPremisesProvisioningError.md | 104 +++ .../Get-EntraDirectoryRole.md | 181 ++++ .../Get-EntraDirectoryRoleMember.md | 106 +++ .../Get-EntraDirectoryRoleTemplate.md | 101 +++ .../DirectoryManagement/Get-EntraDomain.md | 147 ++++ .../Get-EntraDomainFederationSettings.md | 129 +++ .../Get-EntraDomainNameReference.md | 113 +++ ...t-EntraDomainServiceConfigurationRecord.md | 112 +++ .../Get-EntraDomainVerificationDnsRecord.md | 112 +++ .../Get-EntraExtensionProperty.md | 97 +++ .../Get-EntraFederationProperty.md | 90 ++ .../Get-EntraObjectByObjectId.md | 142 +++ .../Get-EntraPartnerInformation.md | 135 +++ .../Get-EntraPasswordPolicy.md | 101 +++ .../Get-EntraScopedRoleMembership.md | 145 ++++ .../Get-EntraSubscribedSku.md | 227 +++++ .../Get-EntraTenantDetail.md | 167 ++++ .../New-EntraAdministrativeUnit.md | 133 +++ .../New-EntraAttributeSet.md | 136 +++ ...-EntraCustomSecurityAttributeDefinition.md | 234 +++++ .../DirectoryManagement/New-EntraDevice.md | 339 ++++++++ .../DirectoryManagement/New-EntraDomain.md | 158 ++++ .../Remove-EntraAdministrativeUnit.md | 87 ++ .../Remove-EntraAdministrativeUnitMember.md | 108 +++ .../Remove-EntraContact.md | 79 ++ .../DirectoryManagement/Remove-EntraDevice.md | 85 ++ .../Remove-EntraDeviceRegisteredOwner.md | 101 +++ .../Remove-EntraDeviceRegisteredUser.md | 99 +++ .../Remove-EntraDirectoryRoleMember.md | 106 +++ .../DirectoryManagement/Remove-EntraDomain.md | 91 ++ .../Remove-EntraExternalDomainFederation.md | 79 ++ .../Remove-EntraScopedRoleMembership.md | 106 +++ .../Restore-EntraDeletedDirectoryObject.md | 154 ++++ .../Set-EntraAdministrativeUnit.md | 145 ++++ .../Set-EntraAttributeSet.md | 147 ++++ ...-EntraCustomSecurityAttributeDefinition.md | 149 ++++ ...SecurityAttributeDefinitionAllowedValue.md | 126 +++ .../DirectoryManagement/Set-EntraDevice.md | 387 +++++++++ .../Set-EntraDirSyncConfiguration.md | 144 ++++ .../Set-EntraDirSyncEnabled.md | 140 +++ .../Set-EntraDirSyncFeature.md | 187 ++++ .../DirectoryManagement/Set-EntraDomain.md | 135 +++ .../Set-EntraDomainFederationSettings.md | 290 +++++++ .../Set-EntraPartnerInformation.md | 242 ++++++ .../Set-EntraTenantDetail.md | 216 +++++ .../Get-EntraDirectoryRoleAssignment.md | 282 ++++++ .../Get-EntraDirectoryRoleDefinition.md | 273 ++++++ .../New-EntraDirectoryRoleAssignment.md | 136 +++ .../New-EntraDirectoryRoleDefinition.md | 330 +++++++ .../Remove-EntraDirectoryRoleAssignment.md | 88 ++ .../Remove-EntraDirectoryRoleDefinition.md | 93 ++ .../Set-EntraDirectoryRoleDefinition.md | 267 ++++++ .../Groups/Add-EntraGroupMember.md | 102 +++ .../Groups/Add-EntraGroupOwner.md | 108 +++ .../Groups/Add-EntraLifecyclePolicyGroup.md | 111 +++ .../Groups/Get-EntraDeletedGroup.md | 293 +++++++ .../Groups/Get-EntraGroup.md | 309 +++++++ .../Groups/Get-EntraGroupAppRoleAssignment.md | 181 ++++ .../Groups/Get-EntraGroupLifecyclePolicy.md | 134 +++ .../Groups/Get-EntraGroupMember.md | 214 +++++ .../Groups/Get-EntraGroupOwner.md | 189 ++++ .../Groups/Get-EntraGroupPermissionGrant.md | 106 +++ .../Groups/Get-EntraLifecyclePolicyGroup.md | 105 +++ .../Groups/Get-EntraObjectSetting.md | 252 ++++++ .../Groups/New-EntraGroup.md | 346 ++++++++ .../Groups/New-EntraGroupAppRoleAssignment.md | 151 ++++ .../Groups/New-EntraGroupLifecyclePolicy.md | 138 +++ .../Groups/Remove-EntraGroup.md | 93 ++ .../Remove-EntraGroupAppRoleAssignment.md | 99 +++ .../Remove-EntraGroupLifecyclePolicy.md | 87 ++ .../Groups/Remove-EntraGroupMember.md | 102 +++ .../Groups/Remove-EntraGroupOwner.md | 101 +++ .../Remove-EntraLifecyclePolicyGroup.md | 117 +++ .../Groups/Reset-EntraLifeCycleGroup.md | 84 ++ .../Select-EntraGroupIdsContactIsMemberOf.md | 99 +++ .../Select-EntraGroupIdsGroupIsMemberOf.md | 101 +++ .../Select-EntraGroupIdsUserIsMemberOf.md | 110 +++ .../Groups/Set-EntraGroup.md | 313 +++++++ .../Groups/Set-EntraGroupLifecyclePolicy.md | 160 ++++ .../Invitations/New-EntraInvitation.md | 291 +++++++ .../Migration/Enable-EntraAzureADAlias.md | 57 ++ .../Migration/Test-EntraScript.md | 120 +++ .../Reports/Get-EntraAuditDirectoryLog.md | 179 ++++ .../Reports/Get-EntraAuditSignInLog.md | 213 +++++ .../SignIns/Get-EntraAuthorizationPolicy.md | 156 ++++ .../Get-EntraConditionalAccessPolicy.md | 135 +++ .../SignIns/Get-EntraFeatureRolloutPolicy.md | 212 +++++ .../SignIns/Get-EntraIdentityProvider.md | 140 +++ .../SignIns/Get-EntraNamedLocationPolicy.md | 138 +++ .../SignIns/Get-EntraOAuth2PermissionGrant.md | 190 ++++ .../Get-EntraPermissionGrantConditionSet.md | 214 +++++ .../SignIns/Get-EntraPermissionGrantPolicy.md | 134 +++ .../SignIns/Get-EntraPolicy.md | 196 +++++ .../Get-EntraTrustedCertificateAuthority.md | 186 ++++ .../New-EntraConditionalAccessPolicy.md | 278 ++++++ .../SignIns/New-EntraFeatureRolloutPolicy.md | 224 +++++ .../SignIns/New-EntraIdentityProvider.md | 170 ++++ .../SignIns/New-EntraNamedLocationPolicy.md | 236 +++++ .../SignIns/New-EntraOauth2PermissionGrant.md | 188 ++++ .../New-EntraPermissionGrantConditionSet.md | 372 ++++++++ .../SignIns/New-EntraPermissionGrantPolicy.md | 133 +++ .../SignIns/New-EntraPolicy.md | 254 ++++++ .../New-EntraTrustedCertificateAuthority.md | 98 +++ .../Remove-EntraConditionalAccessPolicy.md | 87 ++ .../Remove-EntraFeatureRolloutPolicy.md | 87 ++ ...ntraFeatureRolloutPolicyDirectoryObject.md | 105 +++ .../SignIns/Remove-EntraIdentityProvider.md | 88 ++ .../Remove-EntraNamedLocationPolicy.md | 88 ++ .../Remove-EntraOAuth2PermissionGrant.md | 84 ++ ...Remove-EntraPermissionGrantConditionSet.md | 129 +++ .../Remove-EntraPermissionGrantPolicy.md | 85 ++ .../SignIns/Remove-EntraPolicy.md | 83 ++ ...Remove-EntraTrustedCertificateAuthority.md | 92 ++ .../SignIns/Set-EntraAuthorizationPolicy.md | 241 ++++++ .../Set-EntraConditionalAccessPolicy.md | 240 ++++++ .../SignIns/Set-EntraFeatureRolloutPolicy.md | 231 +++++ .../SignIns/Set-EntraIdentityProvider.md | 195 +++++ .../SignIns/Set-EntraNamedLocationPolicy.md | 258 ++++++ .../Set-EntraPermissionGrantConditionSet.md | 309 +++++++ .../SignIns/Set-EntraPermissionGrantPolicy.md | 143 +++ .../SignIns/Set-EntraPolicy.md | 211 +++++ .../Set-EntraTrustedCertificateAuthority.md | 92 ++ .../Users/Get-EntraUser.md | 426 +++++++++ .../Users/Get-EntraUserAppRoleAssignment.md | 184 ++++ .../Users/Get-EntraUserCreatedObject.md | 175 ++++ .../Users/Get-EntraUserDirectReport.md | 175 ++++ .../Users/Get-EntraUserExtension.md | 111 +++ .../Users/Get-EntraUserLicenseDetail.md | 105 +++ .../Users/Get-EntraUserManager.md | 142 +++ .../Users/Get-EntraUserMembership.md | 218 +++++ .../Get-EntraUserOAuth2PermissionGrant.md | 201 +++++ .../Users/Get-EntraUserOwnedDevice.md | 166 ++++ .../Users/Get-EntraUserOwnedObject.md | 208 +++++ .../Users/Get-EntraUserRegisteredDevice.md | 165 ++++ .../Users/Get-EntraUserThumbnailPhoto.md | 109 +++ .../Users/New-EntraUser.md | 816 ++++++++++++++++++ .../Users/New-EntraUserAppRoleAssignment.md | 209 +++++ .../Users/Remove-EntraUser.md | 88 ++ .../Remove-EntraUserAppRoleAssignment.md | 106 +++ .../Users/Remove-EntraUserExtension.md | 130 +++ .../Users/Remove-EntraUserManager.md | 82 ++ .../Users/Set-EntraUser.md | 677 +++++++++++++++ .../Users/Set-EntraUserExtension.md | 91 ++ .../Users/Set-EntraUserLicense.md | 209 +++++ .../Users/Set-EntraUserManager.md | 101 +++ .../Users/Set-EntraUserPassword.md | 164 ++++ .../Users/Set-EntraUserThumbnailPhoto.md | 130 +++ .../Users/Update-EntraSignedInUserPassword.md | 106 +++ .../Users/Update-EntraUserFromFederated.md | 105 +++ src/EntraModuleBuilder.ps1 | 20 +- src/EntraModuleSplitter.ps1 | 20 +- 519 files changed, 40584 insertions(+), 102 deletions(-) delete mode 100644 module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 (100%) create mode 100644 moduleVNext/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 (100%) rename {module => moduleVNext}/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 (100%) rename {module => moduleVNext}/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 (100%) create mode 100644 moduleVNext/Entra/config/ModuleMetadata.json create mode 100644 moduleVNext/Entra/config/ModuleSettings.json create mode 100644 moduleVNext/Entra/config/dependencyMapping.json create mode 100644 moduleVNext/Entra/config/moduleMapping.json create mode 100644 moduleVNext/EntraBeta/config/ModuleMetadata.json create mode 100644 moduleVNext/EntraBeta/config/ModuleSettings.json create mode 100644 moduleVNext/EntraBeta/config/dependencyMapping.json create mode 100644 moduleVNext/EntraBeta/config/moduleMapping.json create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Invitations/New-EntraInvitation.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Migration/Enable-EntraAzureADAlias.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Migration/Test-EntraScript.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUser.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUser.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUser.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md create mode 100644 moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 2ad44b1484..d6fbeaae9f 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -18,11 +18,13 @@ function Split-Docs { switch ($Source) { 'Entra' { $DocsSourceDirectory = "../module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" - $MappingFilePath = '../module/Entra/config/moduleMapping.json' + $MappingFilePath = '../moduleVNext/Entra/config/moduleMapping.json' + $OutputDirectory='../moduleVNext/docs/entra-powershell-v1.0' } 'EntraBeta' { $DocsSourceDirectory = "../module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" - $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" + $MappingFilePath = "../moduleVNext/EntraBeta/config/moduleMapping.json" + $OutputDirectory="../moduleVNext/docs/entra-powershell-beta" } default { Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' @@ -31,7 +33,7 @@ function Split-Docs { } # Use the provided output directory or default to DocsSourceDirectory if none specified - $TargetRootDirectory = if ($OutputDirectory) { $OutputDirectory } else { $DocsSourceDirectory } + $TargetRootDirectory = $OutputDirectory # Check if the mapping file exists if (-not (Test-Path -Path $MappingFilePath -PathType Leaf)) { diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 552ce042ec..0000000000 --- a/module/Entra/Microsoft.Graph.Entra/Invitations/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - -} diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 38cda4bb4b..0000000000 --- a/module/Entra/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - -} diff --git a/module/Entra/config/dependencyMapping.json b/module/Entra/config/dependencyMapping.json index ba3d50bcab..8be7e5e2e4 100644 --- a/module/Entra/config/dependencyMapping.json +++ b/module/Entra/config/dependencyMapping.json @@ -6,6 +6,5 @@ "Microsoft.Graph.Entra.Governance":["Microsoft.Graph.Identity.Governance"], "Microsoft.Graph.Entra.SignIns":["Microsoft.Graph.Identity.SignIns"], "Microsoft.Graph.Entra.Applications":["Microsoft.Graph.Applications"], - "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"], - "Microsoft.Graph.Entra.Invitations":["Microsoft.Graph.Identity.SignIns"] + "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"] } \ No newline at end of file diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 b/moduleVNext/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 new file mode 100644 index 0000000000..4ebcdbf908 --- /dev/null +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 @@ -0,0 +1 @@ + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 diff --git a/module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 b/moduleVNext/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 similarity index 100% rename from module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 rename to moduleVNext/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 diff --git a/moduleVNext/Entra/config/ModuleMetadata.json b/moduleVNext/Entra/config/ModuleMetadata.json new file mode 100644 index 0000000000..553c0eabdf --- /dev/null +++ b/moduleVNext/Entra/config/ModuleMetadata.json @@ -0,0 +1,35 @@ +{ + "guid": "742dccd1-bf4b-46a0-a3f2-14e0bb508233", + "authors": "Microsoft", + "owners": "Microsoft", + "description": "Microsoft Entra PowerShell v1.0: Microsoft Entra PowerShell is a scenario-driven module that allows administrators to efficiently manage Entra ID resources, including users, groups, applications, and policies, among others", + "requireLicenseAcceptance": "true", + "requiredModules" : [ + "Microsoft.Graph.Users", + "Microsoft.Graph.Users.Actions", + "Microsoft.Graph.Users.Functions", + "Microsoft.Graph.Groups", + "Microsoft.Graph.Identity.DirectoryManagement", + "Microsoft.Graph.Identity.Governance", + "Microsoft.Graph.Identity.SignIns", + "Microsoft.Graph.Applications", + "Microsoft.Graph.Reports" + ], + "requiredModulesVersion": "2.15.0", + "copyright": "© Microsoft Corporation. All rights reserved.", + "licenseUri": "https://aka.ms/devservicesagreement", + "projectUri": "https://github.com/microsoftgraph/entra-powershell", + "iconUri": "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/master/documentation/images/graph_color256.png", + "tags": [ + "MicrosoftGraph", + "Microsoft", + "Graph", + "PowerShell", + "AzureAD", + "PSModule", + "Entra" + ], + "releaseNotes": "See https://github.com/microsoftgraph/entra-powershell.", + "version": "0.18.0", + "Prerelease": "preview" + } diff --git a/moduleVNext/Entra/config/ModuleSettings.json b/moduleVNext/Entra/config/ModuleSettings.json new file mode 100644 index 0000000000..6863871d5c --- /dev/null +++ b/moduleVNext/Entra/config/ModuleSettings.json @@ -0,0 +1,22 @@ +{ + "sourceModule" : "AzureAD", + "moduleName" : "Microsoft.Graph.Entra", + "newPrefix" : "Entra", + "typePrefix" : "Microsoft.Open.", + "destinationModuleName" : [ + "Microsoft.Graph.DirectoryObjects", + "Microsoft.Graph.Users", + "Microsoft.Graph.Users.Actions", + "Microsoft.Graph.Users.Functions", + "Microsoft.Graph.Groups", + "Microsoft.Graph.Identity.DirectoryManagement", + "Microsoft.Graph.Identity.Governance", + "Microsoft.Graph.Identity.SignIns", + "Microsoft.Graph.Applications", + "Microsoft.Graph.Reports" + ], + "destinationModuleVersion": "2.15.0", + "sourceModulePrefix" : ["AzureADMS","AzureAD"], + "destinationPrefix" : ["Mg"], + "loadMessage": "" + } diff --git a/moduleVNext/Entra/config/dependencyMapping.json b/moduleVNext/Entra/config/dependencyMapping.json new file mode 100644 index 0000000000..8be7e5e2e4 --- /dev/null +++ b/moduleVNext/Entra/config/dependencyMapping.json @@ -0,0 +1,10 @@ +{ + "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], + "Microsoft.Graph.Entra.Authentication":["Microsoft.Graph.Authentication"], + "Microsoft.Graph.Entra.Groups":["Microsoft.Graph.Groups"], + "Microsoft.Graph.Entra.DirectoryManagement":["Microsoft.Graph.Identity.DirectoryManagement"], + "Microsoft.Graph.Entra.Governance":["Microsoft.Graph.Identity.Governance"], + "Microsoft.Graph.Entra.SignIns":["Microsoft.Graph.Identity.SignIns"], + "Microsoft.Graph.Entra.Applications":["Microsoft.Graph.Applications"], + "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"] +} \ No newline at end of file diff --git a/moduleVNext/Entra/config/moduleMapping.json b/moduleVNext/Entra/config/moduleMapping.json new file mode 100644 index 0000000000..174b5022c1 --- /dev/null +++ b/moduleVNext/Entra/config/moduleMapping.json @@ -0,0 +1,263 @@ +{ + "Add-EntraAdministrativeUnitMember": "DirectoryManagement", + "Add-EntraLifecyclePolicyGroup": "Groups", + "Get-EntraAccountSku": "DirectoryManagement", + "Get-EntraAdministrativeUnit": "DirectoryManagement", + "Get-EntraAdministrativeUnitMember": "DirectoryManagement", + "New-EntraAdministrativeUnit": "DirectoryManagement", + "Remove-EntraAdministrativeUnit": "DirectoryManagement", + "Remove-EntraAdministrativeUnitMember": "DirectoryManagement", + "Set-EntraAdministrativeUnit": "DirectoryManagement", + "Get-EntraApplicationProxyApplication": "Applications", + "New-EntraApplicationProxyApplication": "Applications", + "Remove-EntraApplicationProxyApplication": "Applications", + "Set-EntraApplicationProxyApplication": "Applications", + "Get-EntraApplicationOwner":"Applications", + "Get-EntraApplicationPasswordCredential":"Applications", + "Get-EntraApplicationServiceEndpoint":"Applications", + "Get-EntraApplicationTemplate":"Applications", + "Get-EntraDeletedApplication":"Applications", + "Set-EntraApplicationProxyApplicationCustomDomainCertificate": "Applications", + "Set-EntraApplicationProxyApplicationSingleSignOn": "Applications", + "Get-EntraApplicationProxyApplicationConnectorGroup": "Applications", + "Get-EntraApplicationProxyConnector": "Applications", + "Get-EntraApplicationProxyConnectorGroup": "Applications", + "Get-EntraApplicationProxyConnectorGroupMember": "Applications", + "Get-EntraApplicationProxyConnectorGroupMembers": "Applications", + "Get-EntraApplicationProxyConnectorMemberOf": "Applications", + "New-EntraApplicationProxyConnectorGroup": "Applications", + "Remove-EntraApplicationProxyApplicationConnectorGroup": "Applications", + "Remove-EntraApplicationProxyConnectorGroup": "Applications", + "Set-EntraApplicationProxyConnector": "Applications", + "Set-EntraApplicationProxyConnectorGroup": "Applications", + "Add-EntraApplicationOwner": "Applications", + "Get-EntraApplication": "Applications", + "Get-EntraApplicationExtensionProperty": "Applications", + "Get-EntraApplicationKeyCredential": "Applications", + "Get-EntraApplicationLogo": "Applications", + "Add-EntraServicePrincipalDelegatedPermissionClassification": "Applications", + "Add-EntraServicePrincipalOwner": "Applications", + "Get-EntraServicePrincipal": "Applications", + "Get-EntraServicePrincipalCreatedObject": "Applications", + "Get-EntraServicePrincipalDelegatedPermissionClassification": "Applications", + "Get-EntraServicePrincipalKeyCredential": "Applications", + "Get-EntraServicePrincipalMembership": "Applications", + "Get-EntraServicePrincipalOAuth2PermissionGrant": "Applications", + "Get-EntraServicePrincipalOwnedObject": "Applications", + "Get-EntraServicePrincipalOwner": "Applications", + "Get-EntraServicePrincipalPasswordCredential": "Applications", + "New-EntraApplication": "Applications", + "New-EntraApplicationExtensionProperty": "Applications", + "New-EntraApplicationKey": "Applications", + "New-EntraApplicationKeyCredential": "Applications", + "New-EntraApplicationPassword": "Applications", + "New-EntraApplicationPasswordCredential": "Applications", + "New-EntraServicePrincipal": "Applications", + "New-EntraServicePrincipalKeyCredential": "Applications", + "New-EntraServicePrincipalPasswordCredential": "Applications", + "Remove-EntraApplication": "Applications", + "Remove-EntraApplicationExtensionProperty": "Applications", + "Remove-EntraApplicationKey": "Applications", + "Remove-EntraApplicationKeyCredential": "Applications", + "Remove-EntraApplicationOwner": "Applications", + "Remove-EntraApplicationPassword": "Applications", + "Remove-EntraApplicationPasswordCredential": "Applications", + "Remove-EntraApplicationVerifiedPublisher": "Applications", + "Remove-EntraDeletedApplication": "Applications", + "Remove-EntraDeletedDirectoryObject": "Applications", + "Remove-EntraServicePrincipal": "Applications", + "Remove-EntraServicePrincipalDelegatedPermissionClassification": "Applications", + "Remove-EntraServicePrincipalKeyCredential": "Applications", + "Remove-EntraServicePrincipalOwner": "Applications", + "Remove-EntraServicePrincipalPasswordCredential": "Applications", + "Restore-EntraDeletedApplication": "Applications", + "Select-EntraGroupIdsServicePrincipalIsMemberOf": "Applications", + "Set-EntraApplication": "Applications", + "Set-EntraApplicationLogo": "Applications", + "Set-EntraApplicationVerifiedPublisher": "Applications", + "Set-EntraServicePrincipal": "Applications", + "Get-EntraTrustedCertificateAuthority": "SignIns", + "New-EntraTrustedCertificateAuthority": "SignIns", + "Remove-EntraTrustedCertificateAuthority": "SignIns", + "Set-EntraTrustedCertificateAuthority": "SignIns", + "Get-EntraContact": "DirectoryManagement", + "Get-EntraContactDirectReport": "DirectoryManagement", + "Get-EntraContactManager": "DirectoryManagement", + "Get-EntraContactMembership": "DirectoryManagement", + "Get-EntraContactThumbnailPhoto": "DirectoryManagement", + "Remove-EntraContact": "DirectoryManagement", + "Get-EntraContract": "DirectoryManagement", + "Add-EntraDeviceRegisteredOwner": "DirectoryManagement", + "Add-EntraDeviceRegisteredUser": "DirectoryManagement", + "Get-EntraDevice": "DirectoryManagement", + "Get-EntraDeviceRegisteredOwner": "DirectoryManagement", + "Get-EntraDeviceRegisteredUser": "DirectoryManagement", + "New-EntraDevice": "DirectoryManagement", + "Remove-EntraDevice": "DirectoryManagement", + "Remove-EntraDeviceRegisteredOwner": "DirectoryManagement", + "Remove-EntraDeviceRegisteredUser": "DirectoryManagement", + "Set-EntraDevice": "DirectoryManagement", + "Add-EntraDirectoryRoleMember": "DirectoryManagement", + "Get-EntraDeletedDirectoryObject": "DirectoryManagement", + "Get-EntraDirectoryRole": "DirectoryManagement", + "Enable-EntraDirectoryRole": "DirectoryManagement", + "Get-EntraDirectoryRoleMember": "DirectoryManagement", + "Get-EntraDirectoryRoleTemplate": "DirectoryManagement", + "Get-EntraDirSyncConfiguration": "DirectoryManagement", + "Get-EntraHasObjectsWithDirSyncProvisioningError": "DirectoryManagement", + "Remove-EntraDirectoryRoleMember": "DirectoryManagement", + "Restore-EntraDeletedDirectoryObject": "DirectoryManagement", + "Set-EntraDirSyncConfiguration": "DirectoryManagement", + "Set-EntraDirSyncEnabled": "DirectoryManagement", + "Set-EntraDirSyncFeature": "DirectoryManagement", + "Get-EntraDomain": "DirectoryManagement", + "Get-EntraDomainFederationSettings": "DirectoryManagement", + "Get-EntraDomainNameReference": "DirectoryManagement", + "Get-EntraDirectoryManagementerviceConfigurationRecord": "DirectoryManagement", + "Get-EntraDomainVerificationDnsRecord": "DirectoryManagement", + "New-EntraDomain": "DirectoryManagement", + "Remove-EntraDomain": "DirectoryManagement", + "Set-EntraDomain": "DirectoryManagement", + "Set-EntraDomainFederationSettings": "DirectoryManagement", + "Get-EntraExtensionProperty": "DirectoryManagement", + "Get-EntraFederationProperty": "DirectoryManagement", + "Add-EntraGroupMember": "Groups", + "Add-EntraGroupOwner": "Groups", + "Set-EntraFeatureRolloutPolicy": "SignIns", + "Get-EntraDeletedGroup": "Groups", + "Get-EntraGroup": "Groups", + "Get-EntraGroupAppRoleAssignment": "Groups", + "Get-EntraGroupLifecyclePolicy": "Groups", + "Get-EntraGroupMember": "Groups", + "Get-EntraGroupOwner": "Groups", + "Get-EntraGroupPermissionGrant": "Groups", + "Get-EntraLifecyclePolicyGroup": "Groups", + "Get-EntraPolicy": "SignIns", + "New-EntraPolicy": "SignIns", + "Remove-EntraPolicy": "SignIns", + "Set-EntraPolicy": "SignIns", + "New-EntraGroup": "Groups", + "New-EntraGroupAppRoleAssignment": "Groups", + "New-EntraGroupLifecyclePolicy": "Groups", + "Remove-EntraGroup": "Groups", + "Remove-EntraGroupAppRoleAssignment": "Groups", + "Remove-EntraGroupLifecyclePolicy": "Groups", + "Remove-EntraGroupMember": "Groups", + "Remove-EntraGroupOwner": "Groups", + "Remove-EntraLifecyclePolicyGroup": "Groups", + "Reset-EntraLifeCycleGroup": "Groups", + "Select-EntraGroupIdsContactIsMemberOf": "Groups", + "Select-EntraGroupIdsGroupIsMemberOf": "Groups", + "Select-EntraGroupIdsUserIsMemberOf": "Groups", + "Set-EntraGroup": "Groups", + "Set-EntraGroupLifecyclePolicy": "Groups", + "Get-EntraAuthorizationPolicy": "SignIns", + "Get-EntraConditionalAccessPolicy": "SignIns", + "Get-EntraIdentityProvider": "SignIns", + "Get-EntraOAuth2PermissionGrant": "SignIns", + "Get-EntraPasswordPolicy": "DirectoryManagement", + "Get-EntraPermissionGrantConditionSet": "SignIns", + "Get-EntraPermissionGrantPolicy": "SignIns", + "Get-EntraScopedRoleMembership": "DirectoryManagement", + "New-EntraOauth2PermissionGrant": "SignIns", + "New-EntraConditionalAccessPolicy": "SignIns", + "New-EntraIdentityProvider": "SignIns", + "New-EntraInvitation": "Invitations", + "New-EntraPermissionGrantConditionSet": "SignIns", + "New-EntraPermissionGrantPolicy": "SignIns", + "Remove-EntraConditionalAccessPolicy": "SignIns", + "Remove-EntraIdentityProvider": "SignIns", + "Remove-EntraOAuth2PermissionGrant": "SignIns", + "Remove-EntraPermissionGrantConditionSet": "SignIns", + "Remove-EntraPermissionGrantPolicy": "SignIns", + "Remove-EntraScopedRoleMembership": "DirectoryManagement", + "Revoke-EntraSignedInUserAllRefreshToken": "Authentication", + "Revoke-EntraUserAllRefreshToken": "Authentication", + "Set-EntraAuthorizationPolicy": "SignIns", + "Set-EntraConditionalAccessPolicy": "SignIns", + "Set-EntraIdentityProvider": "SignIns", + "Set-EntraPermissionGrantConditionSet": "SignIns", + "Set-EntraPermissionGrantPolicy": "SignIns", + "New-EntraNamedLocationPolicy": "SignIns", + "Remove-EntraNamedLocationPolicy": "SignIns", + "Set-EntraNamedLocationPolicy": "SignIns", + "Get-EntraNamedLocationPolicy": "SignIns", + "Get-EntraPartnerInformation": "DirectoryManagement", + "Set-EntraPartnerInformation": "DirectoryManagement", + "Get-EntraSubscribedSku": "DirectoryManagement", + "Get-EntraTenantDetail": "DirectoryManagement", + "Set-EntraTenantDetail": "DirectoryManagement", + "Add-EntraScopedRoleMembership": "DirectoryManagement", + "Get-EntraUser": "Users", + "Get-EntraUserAppRoleAssignment": "Users", + "Get-EntraUserCreatedObject": "Users", + "Get-EntraUserDirectReport": "Users", + "Get-EntraUserExtension": "Users", + "Get-EntraUserLicenseDetail": "Users", + "Get-EntraUserManager": "Users", + "Get-EntraUserMembership": "Users", + "Get-EntraUserOAuth2PermissionGrant": "Users", + "Get-EntraUserOwnedDevice": "Users", + "Get-EntraUserOwnedObject": "Users", + "Get-EntraUserRegisteredDevice": "Users", + "Get-EntraUserThumbnailPhoto": "Users", + "New-EntraUser": "Users", + "New-EntraUserAppRoleAssignment": "Users", + "Remove-EntraUser": "Users", + "Remove-EntraUserAppRoleAssignment": "Users", + "Remove-EntraUserExtension": "Users", + "Remove-EntraUserManager": "Users", + "Set-EntraUser": "Users", + "Set-EntraUserExtension": "Users", + "Set-EntraUserLicense": "Users", + "Set-EntraUserManager": "Users", + "Set-EntraUserPassword": "Users", + "Set-EntraUserThumbnailPhoto": "Users", + "Update-EntraSignedInUserPassword": "Users", + "Reset-EntraStrongAuthenticationMethodByUpn": "Authentication", + "Get-EntraAttributeSet": "DirectoryManagement", + "New-EntraAttributeSet": "DirectoryManagement", + "Set-EntraAttributeSet": "DirectoryManagement", + "Add-EntraCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Set-EntraCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Get-EntraCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Get-EntraCustomSecurityAttributeDefinition": "DirectoryManagement", + "New-EntraCustomSecurityAttributeDefinition": "DirectoryManagement", + "Set-EntraCustomSecurityAttributeDefinition": "DirectoryManagement", + "Add-EntraEnvironment": "Authentication", + "Confirm-EntraDomain": "DirectoryManagement", + "Connect-Entra": "Authentication", + "Disconnect-Entra": "Authentication", + "Enable-EntraAzureADAlias": "Migration", + "Find-EntraPermission": "Authentication", + "Get-CrossCloudVerificationCode": "DirectoryManagement", + "Get-EntraContext": "Authentication", + "Get-EntraEnvironment": "Authentication", + "Get-EntraObjectByObjectId": "DirectoryManagement", + "Test-EntraScript": "Migration", + "Get-EntraUnsupportedCommand": "Migration", + "Get-EntraObjectSetting": "Groups", + "New-EntraApplicationFromApplicationTemplate": "Applications", + "New-EntraFeatureRolloutPolicy": "SignIns", + "Remove-EntraFeatureRolloutPolicyDirectoryObject": "SignIns", + "Remove-EntraFeatureRolloutPolicy": "SignIns", + "Remove-EntraExternalDomainFederation": "DirectoryManagement", + "Get-EntraDirSyncFeature": "DirectoryManagement", + "Get-EntraAuditDirectoryLog": "Reports", + "Get-EntraAuditSignInLog": "Reports", + "Get-EntraDirectoryObjectOnPremisesProvisioningError": "DirectoryManagement", + "Get-EntraDirectoryRoleAssignment": "Governance", + "Get-EntraDirectoryRoleDefinition": "Governance", + "Get-EntraFeatureRolloutPolicy": "SignIns", + "Get-EntraServicePrincipalAppRoleAssignedTo": "Applications", + "Get-EntraServicePrincipalAppRoleAssignment": "Applications", + "New-EntraDirectoryRoleAssignment": "Governance", + "New-EntraDirectoryRoleDefinition": "Governance", + "New-EntraServicePrincipalAppRoleAssignment": "Applications", + "Remove-EntraDirectoryRoleAssignment": "Governance", + "Remove-EntraDirectoryRoleDefinition": "Governance", + "Remove-EntraServicePrincipalAppRoleAssignment": "Applications", + "Set-EntraDirectoryRoleDefinition": "Governance", + "Update-EntraUserFromFederated": "Users", + "Get-EntraDomainServiceConfigurationRecord":"DirectoryManagement" +} \ No newline at end of file diff --git a/moduleVNext/EntraBeta/config/ModuleMetadata.json b/moduleVNext/EntraBeta/config/ModuleMetadata.json new file mode 100644 index 0000000000..9cf8ad0ff4 --- /dev/null +++ b/moduleVNext/EntraBeta/config/ModuleMetadata.json @@ -0,0 +1,36 @@ +{ + "guid": "3a8a0270-121c-4455-845d-497458213f96", + "authors": "Microsoft", + "owners": "Microsoft", + "description": "Microsoft Entra PowerShell Beta: Microsoft Entra PowerShell is a scenario-driven module that allows administrators to efficiently manage Entra ID resources, including users, groups, applications, and policies, among others", + "requireLicenseAcceptance": "true", + "requiredModules" : [ + "Microsoft.Graph.Beta.Users", + "Microsoft.Graph.Beta.Users.Actions", + "Microsoft.Graph.Beta.Users.Functions", + "Microsoft.Graph.Beta.Groups", + "Microsoft.Graph.Beta.Identity.DirectoryManagement", + "Microsoft.Graph.Beta.Identity.Governance", + "Microsoft.Graph.Beta.Identity.SignIns", + "Microsoft.Graph.Beta.Applications", + "Microsoft.Graph.Beta.Reports" + ], + "requiredModulesVersion": "2.15.0", + "copyright": "© Microsoft Corporation. All rights reserved.", + "licenseUri": "https://aka.ms/devservicesagreement", + "projectUri": " https://github.com/microsoftgraph/entra-powershell", + "iconUri": "https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/master/documentation/images/graph_color256.png", + "tags": [ + "MicrosoftGraph", + "Microsoft", + "Graph", + "PowerShell", + "AzureAD", + "AzureADPreview", + "PSModule", + "Entra" + ], + "releaseNotes": "See https://github.com/microsoftgraph/entra-powershell.", + "version": "0.18.0", + "Prerelease": "preview" + } diff --git a/moduleVNext/EntraBeta/config/ModuleSettings.json b/moduleVNext/EntraBeta/config/ModuleSettings.json new file mode 100644 index 0000000000..16ef03892a --- /dev/null +++ b/moduleVNext/EntraBeta/config/ModuleSettings.json @@ -0,0 +1,22 @@ +{ + "sourceModule" : "AzureADPreview", + "moduleName" : "Microsoft.Graph.Entra.Beta", + "newPrefix" : "EntraBeta", + "typePrefix" : "Microsoft.Open.", + "destinationModuleName" : [ + "Microsoft.Graph.Beta.DirectoryObjects", + "Microsoft.Graph.Beta.Users", + "Microsoft.Graph.Beta.Users.Actions", + "Microsoft.Graph.Beta.Users.Functions", + "Microsoft.Graph.Beta.Groups", + "Microsoft.Graph.Beta.Identity.DirectoryManagement", + "Microsoft.Graph.Beta.Identity.Governance", + "Microsoft.Graph.Beta.Identity.SignIns", + "Microsoft.Graph.Beta.Applications", + "Microsoft.Graph.Beta.Reports" + ], + "destinationModuleVersion": "2.15.0", + "sourceModulePrefix" : ["AzureADMS","AzureAD"], + "destinationPrefix" : ["MgBeta"], + "loadMessage": "" + } diff --git a/moduleVNext/EntraBeta/config/dependencyMapping.json b/moduleVNext/EntraBeta/config/dependencyMapping.json new file mode 100644 index 0000000000..495961f1c6 --- /dev/null +++ b/moduleVNext/EntraBeta/config/dependencyMapping.json @@ -0,0 +1,10 @@ +{ + "Microsoft.Graph.Entra.Beta.Users":["Microsoft.Graph.Beta.Users","Microsoft.Graph.Beta.Users.Actions","Microsoft.Graph.Beta.Users.Functions"], + "Microsoft.Graph.Entra.Beta.Authentication":["Microsoft.Graph.Authentication"], + "Microsoft.Graph.Entra.Beta.Groups":["Microsoft.Graph.Beta.Groups"], + "Microsoft.Graph.Entra.Beta.DirectoryManagement":["Microsoft.Graph.Beta.Identity.DirectoryManagement"], + "Microsoft.Graph.Entra.Beta.Governance":["Microsoft.Graph.Beta.Identity.Governance"], + "Microsoft.Graph.Entra.Beta.SignIns":["Microsoft.Graph.Beta.Identity.SignIns"], + "Microsoft.Graph.Entra.Beta.Applications":["Microsoft.Graph.Beta.Applications"], + "Microsoft.Graph.Entra.Beta.Reports":["Microsoft.Graph.Beta.Reports"] +} \ No newline at end of file diff --git a/moduleVNext/EntraBeta/config/moduleMapping.json b/moduleVNext/EntraBeta/config/moduleMapping.json new file mode 100644 index 0000000000..9ba9b07aac --- /dev/null +++ b/moduleVNext/EntraBeta/config/moduleMapping.json @@ -0,0 +1,16 @@ +{ + "Authentication":"", + "Directory":"", + "Application":"", + "ApplicationProxy":"", + "User":"", + "Group":"", + "ServicePrincipal":"", + "AdministrativeUnit":"", + "Contact":"", + "Domain":"", + "Permission":"", + "Device":"", + "Policy":"", + "CertificateAuthority":"" +} \ No newline at end of file diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md new file mode 100644 index 0000000000..c9bfb8a7fa --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md @@ -0,0 +1,102 @@ +--- +title: Add-EntraApplicationOwner +description: This article provides details on the Add-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Add-EntraApplicationOwner + +## Synopsis + +Adds an owner to an application. + +## Syntax + +```powershell +Add-EntraApplicationOwner + -ApplicationId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraApplicationOwner` cmdlet adds an owner to a Microsoft Entra ID application. + +## Examples + +### Example 1: Add a user as an owner to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$ApplicationId = (Get-EntraApplication -Top 1).ObjectId +$UserObjectId = (Get-EntraUser -UserId 'SawyerM@contoso.com').ObjectId +Add-EntraApplicationOwner -ApplicationId $ApplicationId -RefObjectId $UserObjectId +``` + +This example demonstrates how to add an owner to an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the ID of an application. +- `-RefObjectId` parameter specifies the ID of a user. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) + +[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..9cb637423c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,163 @@ +--- +title: Add-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Add-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Add-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Add a classification for a delegated permission. + +## Syntax + +```powershell +Add-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -PermissionId + -Classification + -PermissionName + [] +``` + +## Description + +The `Add-EntraServicePrincipalDelegatedPermissionClassification` cmdlet creates a delegated permission classification for the given permission on service principal. + +## Examples + +### Example 1: Create Delegated Permission Classification + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$PermissionId = $ServicePrincipal.PublishedPermissionScopes[0].Id +$PermissionName = $ServicePrincipal.PublishedPermissionScopes[0].Value + +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + PermissionId = $PermissionId + Classification = 'Low' + PermissionName = $PermissionName +} + +Add-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +T2qU_E28O0GgkLLIYRPsTwE low fc946a4f-bc4d-413b-a090-b2c86113ec4f LicenseManager.AccessAsUser +``` + +This command creates a delegated permission classification for the given permission on the service principal. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. +- `-PermissionId` parameter specifies the ID for a delegated permission. +- `-Classification` parameter specifies the classification for a delegated permission. +- `-PermissionName` parameter specifies the name for a delegated permission. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionId + +The ID for a delegated permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionName + +The name for a delegated permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Classification + +The classification for a delegated permission. +This parameter can take one of the following values: + +- Low: Specifies a classification for a permission as low impact. + +- Medium: Specifies a classification for a permission as medium impact. + +- High: Specifies a classification for a permission as high impact. + +```yaml +Type: ClassificationEnum +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DelegatedPermissionClassification + +## Notes + +## Related Links + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..e526f2d41a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md @@ -0,0 +1,109 @@ +--- +title: Add-EntraServicePrincipalOwner +description: This article provides details on the Add-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Add-EntraServicePrincipalOwner + +## Synopsis + +Adds an owner to a service principal. + +## Syntax + +```powershell +Add-EntraServicePrincipalOwner + -ServicePrincipalId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraServicePrincipalOwner` cmdlet adds an owner to a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Add a user as an owner to a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId +$OwnerId = (Get-EntraUser -Top 1).ObjectId +$Params = @{ + ServicePrincipalId = $ServicePrincipalId + RefObjectId = $OwnerId +} +Add-EntraServicePrincipalOwner @Params +``` + +This example demonstrates how to add an owner to a service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. +- `-RefObjectId` parameter specifies the user object ID. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md new file mode 100644 index 0000000000..d8cdda2c35 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md @@ -0,0 +1,276 @@ +--- +title: Get-EntraApplication +description: This article provides details on the Get-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplication + +schema: 2.0.0 +--- + +# Get-EntraApplication + +## Synopsis + +Gets an application. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraApplication + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraApplication + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraApplication + -ApplicationId + [-Property ] + [-All] + [] +``` + +## Description + +The `Get-EntraApplication` cmdlet gets a Microsoft Entra ID application. + +## Examples + +### Example 1: Get an application by ApplicationId + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -ApplicationId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +ToGraph_443democc3c aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This example demonstrates how to retrieve specific application by providing ID. + +### Example 2: Get all applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -All +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +test app aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADandPersonalMicrosoftAccount contoso.com +ToGraph_443DEM cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +test adms eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADandPersonalMicrosoftAccount contoso.com +test adms app azure gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADandPersonalMicrosoftAccount contoso.com +test adms2 iiiiiiii-aaaa-bbbb-cccc-jjjjjjjjjjjj jjjjjjjj-bbbb-cccc-dddd-kkkkkkkkkkkk AzureADandPersonalMicrosoftAccount contoso.com +``` + +This example demonstrates how to get all applications from Microsoft Entra ID. + +### Example 3: Get applications with expiring secrets + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication | + Where-Object { + $_.PasswordCredentials.keyId -ne $null -and + $_.PasswordCredentials.EndDateTime -lt (Get-Date).AddDays(30) + } | + ForEach-Object { + $_.DisplayName, + $_.Id, + $_.PasswordCredentials + } +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + AppOne 8/19/2024 9:00:00 PM 1jQ aaaaaaaa-0b0b-1c1c-2d2d-333333333333 8/6/2024 6:07:47 PM +``` + +This example retrieves applications with expiring secrets within 30 days. + +### Example 4: Get an application by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -Filter "DisplayName eq 'ToGraph_443DEMO'" +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +ToGraph_443DEMO cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +``` + +In this example, we retrieve application by its display name from Microsoft Entra ID. + +### Example 5: Search among retrieved applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -SearchString 'My new application 2' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application 2 kkkkkkkk-cccc-dddd-eeee-llllllllllll llllllll-dddd-eeee-ffff-mmmmmmmmmmmm AzureADandPersonalMicrosoftAccount contoso.com +``` + +This example demonstrates how to retrieve applications for specific string from Microsoft Entra ID. + +### Example 6: Retrieve an application by identifierUris + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplication -Filter "identifierUris/any(uri:uri eq 'https://wingtips.wingtiptoysonline.com')" +``` + +This example demonstrates how to retrieve applications by its identifierUris from Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplication](New-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..bce69cd889 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraApplicationExtensionProperty +description: This article provides details on the Get-EntraApplicationExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# Get-EntraApplicationExtensionProperty + +## Synopsis + +Gets application extension properties. + +## Syntax + +```powershell +Get-EntraApplicationExtensionProperty + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationExtensionProperty` cmdlet gets application extension properties in Microsoft Entra ID. + +## Examples + +### Example 1: Get extension properties + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationExtensionProperty -ApplicationId $Application.Id +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ------------- ---------------------- ---- ------------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Boolean False False extension_c371a443f6734a3e8982a26357fb7d59_NewAttribute {User} +``` + +This command gets the extension properties for the specified application in Microsoft Entra ID. You cane use the command `Get-EntraApplication` to get application ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +## Parameters + +### -ApplicationId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) + +[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..b0b5a7e66b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md @@ -0,0 +1,89 @@ +--- +title: Get-EntraApplicationKeyCredential +description: This article provides details on the Get-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# Get-EntraApplicationKeyCredential + +## Synopsis + +Gets the key credentials for an application. + +## Syntax + +```powershell +Get-EntraApplicationKeyCredential + -ObjectId + [] +``` + +## Description + +The `Get-EntraApplicationKeyCredential` cmdlet retrieves the key credentials for an application. Specify `ObjectId` parameter to retrieve the key credentials for an application. + +## Examples + +### Example 1: Get key credentials + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationKeyCredential -ObjectId $application.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage +------------------- ----------- ----------- --- ----- ------------- ---- ----- +{116, 101, 115, 116…} MyApp Cert 6/27/2024 11:49:17 AM bbbbbbbb-1c1c-2d2d-3e3e-444444444444 6/27/2023 11:29:17 AM AsymmetricX509Cert Verify +``` + +This command gets the key credentials for the specified application. + +`-ObjectId` parameter specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -ObjectId + +Specifies a unique ID of an application in Microsoft Entra ID to retrieve key credentials. Use `Get-EntraApplication` for more details. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) + +[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md new file mode 100644 index 0000000000..166508d887 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md @@ -0,0 +1,136 @@ +--- +title: Get-EntraApplicationLogo +description: This article provides details on the Get-EntraApplicationLogo command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationLogo + +schema: 2.0.0 +--- + +# Get-EntraApplicationLogo + +## Synopsis + +Retrieve the logo of an application. + +## Syntax + +```powershell +Get-EntraApplicationLogo + -ApplicationId + [-FileName ] + [-View ] + [-FilePath ] + [] +``` + +## Description + +The `Get-EntraApplicationLogo` cmdlet retrieves the logo that is set for an application. Specify the `ApplicationId` parameter to get a specific application logo for an application. + +## Examples + +### Example 1: Get an application logo for an application by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationLogo -ApplicationId 'bbbbbbbb-1111-1111-1111-cccccccccccc' -FilePath 'D:\outfile1.jpg' +``` + +This example shows how to retrieve the application logo for an application that is specified through the Object ID parameter. + +## Parameters + +### -FileName + +If provided, the application logo is saved to the file using the specified file name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FilePath + +If provided, the application logo is copied with a random filename to the file path that is specified in this parameter. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +The ApplicationId of the application for which the logo is to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -View + +If set to $true, the application's logo is displayed in a new window on the screen. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +### System.Boolean + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraApplicationLogo](Set-EntraApplicationLogo.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md new file mode 100644 index 0000000000..80b78d9283 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md @@ -0,0 +1,212 @@ +--- +title: Get-EntraApplicationOwner +description: This article provides details on the Get-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Get-EntraApplicationOwner + +## Synopsis + +Gets the owner of an application. + +## Syntax + +```powershell +Get-EntraApplicationOwner + -ApplicationId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationOwner` cmdlet get an owner of an Microsoft Entra ID application. + +## Examples + +### Example 1: Get the owner of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to get the owners of an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +### Example 2: Get the details about the owner of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -SearchString '' +$applicationOwners = Get-EntraApplicationOwner -ObjectId $application.ObjectId +$ownerDetails = $applicationOwners | ForEach-Object { + $ownerDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + displayName = $ownerDetail.displayName + Id = $ownerDetail.Id + UserPrincipalName = $ownerDetail.UserPrincipalName + UserType = $ownerDetail.UserType + accountEnabled = $ownerDetail.accountEnabled + } +} +$ownerDetails | Format-Table -Property displayName, Id, UserPrincipalName, UserType, accountEnabled -AutoSize +``` + +```Output +displayName Id UserPrincipalName UserType accountEnabled +----------- -- ----------------- -------- -------------- +Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc SawyerM@contoso.com Member True +Adele Vance ec5813fb-346e-4a33-a014-b55ffee3662b AdeleV@contoso.com Member True +``` + +This example demonstrates how to get the owners of an application in Microsoft Entra ID with more owner lookup details. + +### Example 3: Get all owners of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to get the all owners of a specified application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +### Example 4: Get top two owners of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to get the two owners of a specified application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) + +[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..f82b444191 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Get-EntraApplicationPasswordCredential +description: This article provides details on the Get-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# Get-EntraApplicationPasswordCredential + +## Synopsis + +Gets the password credential for an application. + +## Syntax + +```powershell +Get-EntraApplicationPasswordCredential + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationPasswordCredential` cmdlet receives the password credentials for a Microsoft Entra ID application. Specify `ApplicationId` parameter to cmdlet receives the password credentials. + +## Examples + +### Example 1: Get password credential for specified application + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationPasswordCredential -ApplicationId $application.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +{100, 101, 109, 111} demo 26/07/2025 10:34:40 Ap6 bbbbbbbb-1111-2222-3333-cccccccccccc 26/07/2024 10:34:40 +``` + +This example shows how to retrieve the password credential for specified application. + +- `-ApplicationId` specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -ApplicationId + +The ApplicationId of the application for which to get the password credential. Use `Get-EntraApplication` for more details. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) \ No newline at end of file diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md new file mode 100644 index 0000000000..69df671ca9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md @@ -0,0 +1,167 @@ +--- +title: Get-EntraApplicationServiceEndpoint +description: This article provides details on the Get-EntraApplicationServiceEndpoint command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint + +schema: 2.0.0 +--- + +# Get-EntraApplicationServiceEndpoint + +## Synopsis + +Retrieve the service endpoint of an application. + +## Syntax + +```powershell +Get-EntraApplicationServiceEndpoint + -ApplicationId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraApplicationServiceEndpoint` cmdlet retrieves the service endpoint(s) of an application. + +The service endpoint entity contains service discovery information. The serviceEndpoints property of the Application entity is of type ServiceEndpoint. + +Other services can use the information stored in the ServiceEndpoint entity to find this service and its addressable endpoints. + +## Examples + +### Example 1: Retrieve the application service endpoint by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId +``` + +This example demonstrates how to retrieve service endpoint of the application that is specified through the Object ID parameter. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +### Example 2: Get all service endpoints + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -All +``` + +This example demonstrates how to retrieve all service endpoints of a specified application. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +### Example 3: Get top five service endpoints + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -Top 5 +``` + +This example demonstrates how to retrieve five service endpoints of a specified application. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -All + +Return all service endpoints. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the object ID of the application for which the service endpoint is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of results that are returned. +The default is 100. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md new file mode 100644 index 0000000000..3ef510d43f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md @@ -0,0 +1,173 @@ +--- +title: Get-EntraApplicationTemplate +description: This article provides details on the Get-EntraApplicationTemplate command. + + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationTemplate +schema: 2.0.0 +--- + +# Get-EntraApplicationTemplate + +## Synopsis + +Retrieve a list of applicationTemplate objects. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraApplicationTemplate + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraApplicationTemplate + -Id + [] +``` + +## Description + +The `Get-EntraApplicationTemplate` cmdlet allows users to get a list of all the application templates or a specific application template. + +## Examples + +### Example 1. Gets a list of application template objects + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationTemplate +``` + +This command gets all the application template objects + +### Example 2. Gets an application template object + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraApplicationTemplate -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id Categories Description +-- ---------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {businessMgmt, productivity, projectManagement} Cube is perfect for businesses +``` + +This command gets an application template object for the given id. + +- `-Id` Specifies the unique identifier of an application template. + +## Parameters + +### -Id + +The unique identifier of an application template. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.ApplicationTemplate + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md new file mode 100644 index 0000000000..74cdce0fb3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md @@ -0,0 +1,257 @@ +--- +title: Get-EntraDeletedApplication +description: This article provides details on the Get-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Get-EntraDeletedApplication + +## Synopsis + +Retrieves the list of previously deleted applications. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDeletedApplication + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDeletedApplication + [-SearchString ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeletedApplication` cmdlet Retrieves the list of previously deleted applications. + +Note: Deleted security groups are permanently removed and cannot be retrieved. + +## Examples + +### Example 1: Get list of deleted applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com +TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com +``` + +This cmdlet retrieves the list of deleted applications. + +### Example 2: Get list of deleted applications using All parameter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -All +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com +TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com +``` + +This cmdlet retrieves the list of deleted applications using All parameter. + +### Example 3: Get top two deleted applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -Top 2 +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +``` + +This cmdlet retrieves top two deleted applications. + +### Example 4: Get deleted applications using SearchString parameter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -SearchString 'TestApp1' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This cmdlet retrieves deleted applications using SearchString parameter. + +### Example 5: Get deleted applications filter by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication -Filter "DisplayName eq 'TestApp1'" +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This cmdlet retrieves deleted applications having specified display name. + +### Example 6: Get deleted applications with deletion age in days + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraDeletedApplication | + Select-Object DisplayName, Id, AppId, SignInAudience, PublisherDomain, DeletedDateTime, + @{Name='DeletionAgeInDays'; Expression={(Get-Date) - $_.DeletedDateTime | Select-Object -ExpandProperty Days}} | + Format-Table -AutoSize +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain DeletedDateTime DeletionAgeInDays +----------- -- ----- -------------- --------------- --------------- ----------------- +Entra PowerShell App aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com 9/18/2024 7:41:44 AM 1 +``` + +This cmdlet retrieves deleted applications with deletion age in days. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Retrieve only those deleted applications that satisfy the filter. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Retrieve only those applications that satisfy the -SearchString value. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of applications returned by this cmdlet. +The default value is 100. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md new file mode 100644 index 0000000000..3f6ed52f43 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md @@ -0,0 +1,369 @@ +--- +title: Get-EntraServicePrincipal +description: This article provides details on the Get-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipal + +## Synopsis + +Gets a service principal. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraServicePrincipal + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraServicePrincipal + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraServicePrincipal + -ServicePrincipalId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipal` cmdlet gets a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve all service principal from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal +``` + +```Output +ObjectId AppId DisplayName +-------- ----- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 Demo App +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22223333-cccc-4444-dddd-5555eeee6666 Demo Two App +dddddddd-3333-4444-5555-eeeeeeeeeeee 33334444-dddd-5555-eeee-6666ffff7777 ProjectWorkManagement +``` + +This example retrieves all service principals from the directory. + +### Example 2: Retrieve a service principal by ServicePrincipalId + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -ServicePrincipalId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This command retrieves specific service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 3: Retrieve all service principals from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -All +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +ProvisioningPowerBi cccccccc-2222-3333-4444-dddddddddddd 22223333-cccc-4444-dddd-5555eeee6666 Application +``` + +This example retrieves all service principals from the directory. + +### Example 4: Retrieve top two service principal from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Top 2 +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +``` + +This command retrieves top two service principals from the directory. + +### Example 5: Get a service principal by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "DisplayName eq 'M365 License Manager'" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This example gets a service principal by its display name. + +### Example 6: Retrieve a list of all service principal, which has a display name that contains "M365 License Manager" + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -SearchString 'M365 License Manager' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This example gets a list of service principal, which has the specified display name. + +### Example 7: Retrieve all Enterprise apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryIntegratedApp')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Enterprise App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +Enterprise App2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application +``` + +This example demonstrates how to retrieve all enterprise apps. + +### Example 8: Retrieve all App proxy apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryOnPremApp')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +App proxy 1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +App proxy 2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application +``` + +This example demonstrates how to retrieve all app proxy apps. + +### Example 9: Retrieve all disabled apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "accountEnabled eq false" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Disabled App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all disabled apps. + +### Example 10: Retrieve all Global Secure Access apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'PrivateAccessNonWebApplication') or tags/Any(x: x eq 'NetworkAccessManagedApplication')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Global secure access app 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all Global secure access apps. + +### Example 11: List all applications without user assignment + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraServicePrincipal -All | Where-Object {$_.appRoleAssignmentRequired -ne 'true'} +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +App without user assignment 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all applications without user assignment. + +### Example 12: List all SAML application details + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "PreferredSingleSignOnMode eq 'saml'" +$servicePrincipal | Select-Object Id, DisplayName, AccountEnabled, AppId, PreferredSingleSignOnMode, AppRoleAssignmentRequired, SignInAudience, NotificationEmailAddresses, PreferredTokenSigningKeyEndDateTime, PreferredTokenSigningKeyValid, ReplyUrls,LoginUrl, LogoutUrl | Format-Table -AutoSize +``` + +```Output +Id DisplayName AccountEnabled AppId PreferredSingleSignOnMode AppRoleAssignmentRequired SignInAudience NotificationEmailAddresses +-- ----------- -------------- ----- ------------------------- ------------------------- -------------- -------------- +00001111-aaaa-2222-bbbb-3333cccc4444 SAML App True 33334444-dddd-5555-eeee-6666ffff7777 saml True AzureADMyOrg {admin@Contoso} +``` + +This example demonstrates how to retrieve all SAML application details. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md new file mode 100644 index 0000000000..891274acdb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md @@ -0,0 +1,188 @@ +--- +title: Get-EntraServicePrincipalAppRoleAssignedTo +description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignedTo command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalAppRoleAssignedTo + +## Synopsis + +Gets app role assignments for this app or service, granted to users, groups and other service principals. + +## Syntax + +```powershell +Get-EntraServicePrincipalAppRoleAssignedTo + -ServicePrincipalId + [-All ] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalAppRoleAssignedTo` cmdlet gets app role assignments for this app or service, granted to users, groups and other service principals. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Retrieve the app role assignments + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipalId +``` + +This example shows how to get app role assignments for an app or service, granted to users, groups and other service principals. + +- The first command gets the ID of a service principal and stores it in the $ServicePrincipalId variable. + +- The second command gets the app role assignments for the service principal granted to users, groups and other service principals. + +### Example 2: Get all app role assignments + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -All +``` + +```output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets the all app role assignments for the service principal granted to users, groups and other service principals. + +### Example 3: Get five app role assignments + +```powershell + Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -Top 5 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets the five app role assignments for the service principal granted to users, groups and other service principals. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +`Get-EntraServiceAppRoleAssignedTo` is an alias for `Get-EntraServicePrincipalAppRoleAssignedTo`. + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..971849856a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,192 @@ +--- +title: Get-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Gets a service principal application role assignment. + +## Syntax + +```powershell +Get-EntraServicePrincipalAppRoleAssignment + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalAppRoleAssignment` cmdlet gets a role assignment for a service principal application in Microsoft Entra ID. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Retrieve the application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipalId +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 29-02-2024 05:53:00 Ask HR aaaaaaaa-bbbb-cccc-1111-222222222222 Group M365 License Manager +``` + +This command gets application role assignments for specified service principal. + +- The first command gets the ID of a service principal by using the Get-EntraServicePrincipal (./Get-EntraServicePrincipal.md) cmdlet. The command stores the ID in the $ServicePrincipalId variable. + +- The second command gets the application role assignments for the service principal in identified by $ServicePrincipalId. + +### Example 2: Retrieve all application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets all application role assignments for specified service principal. + +### Example 3: Retrieve the top five application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 3 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 + 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 +``` + +This command gets three application role assignments for specified service principal. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraServiceAppRoleAssignment` is an alias for `Get-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) + +[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md new file mode 100644 index 0000000000..8a607194b9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md @@ -0,0 +1,155 @@ +--- +title: Get-EntraServicePrincipalCreatedObject +description: This article provides details on the Get-EntraServicePrincipalCreatedObject command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalCreatedObject + +## Synopsis + +Get objects created by a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalCreatedObject + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalCreatedObject` cmdlet gets an object created by a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the objects that created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +This example gets objects created by the service principal identified by $ServicePrincipalId. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Retrieve the all objects created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +This example demonstrates how to get the all object created by a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Retrieve the top two objects created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +This example demonstrates how to get the top two object created by a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..a236c7769c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,204 @@ +--- +title: Get-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Get-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Retrieve the delegated permission classification objects on a service principal. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalDelegatedPermissionClassification` cmdlet retrieves the delegated permission classifications from a service principal. + +## Examples + +### Example 1: Get a list of delegated permission classifications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +cccccccc-8888-9999-0000-dddddddddddd low dddd3333-ee44-5555-66ff-777777aaaaaa profile +``` + +This command retrieves all delegated permission classifications from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. + +### Example 2: Get a delegated permission classifications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + Id = '5XBeIKarUkypdm0tRsSAQwE' +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +``` + +This command retrieves the delegated permission classification by Id from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. +- `-Id` parameter specifies the delegated permission classification object Id. + +### Example 3: Get a delegated permission classification with filter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + Filter = "PermissionName eq 'Sites.Read.All'" +} +Get-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +``` + +This command retrieves the filtered delegated permission classifications from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. +- `-Id` parameter specifies the delegated permission classification object Id. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a delegated permission classification object ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DelegatedPermissionClassification + +## Notes + +## Related Links + +[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..3dcf28a491 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,91 @@ +--- +title: Get-EntraServicePrincipalKeyCredential +description: This article provides details on the Get-EntraServicePrincipalKeyCredential Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalKeyCredential + +## Synopsis + +Get key credentials for a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalKeyCredential + -ServicePrincipalId + [] +``` + +## Description + +The `Get-EntraServicePrincipalKeyCredential` cmdlet gets the key credentials for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the key credential of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage +------------------- ----------- ----------- --- ----- ------------- ---- ----- + 08-02-2025 09:57:08 68b45e27-fef8-4f0d-bc7a-76bd949c16d1 08-02-2024 09:57:08 Symmetric Sign +``` + +This example retrieves the key credentials for specified service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal object Id. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of the application for which to get the password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) + +[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md new file mode 100644 index 0000000000..4fcb1f99c2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md @@ -0,0 +1,178 @@ +--- +title: Get-EntraServicePrincipalMembership +description: This article provides details on the Get-EntraServicePrincipalMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalMembership + +## Synopsis + +Get a service principal membership. + +## Syntax + +```powershell +Get-EntraServicePrincipalMembership + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalMembership` cmdlet gets the memberships of a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +``` + +This cmdlet retrieves a specified service principal memberships in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Retrieve all memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +22223333-cccc-4444-dddd-5555eeee6666 +33334444-dddd-5555-eeee-6666ffff7777 +``` + +This command gets all memberships of a specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Retrieve top two memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +22223333-cccc-4444-dddd-5555eeee6666 + +``` + +This command gets top two memberships of a specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md new file mode 100644 index 0000000000..aaa8e79db5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md @@ -0,0 +1,169 @@ +--- +title: Get-EntraServicePrincipalOAuth2PermissionGrant +description: This article provides details on the Get-EntraServicePrincipalOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOAuth2PermissionGrant + +## Synopsis + +Gets an oAuth2PermissionGrant object. + +## Syntax + +```powershell +Get-EntraServicePrincipalOAuth2PermissionGrant +-ServicePrincipalId +[-All] +[-Top ] +[-Property ] +[] +``` + +## Description + +The `Get-EntraServicePrincipalOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId $ServicePrincipalId +``` + +```output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +``` + +This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +### Example 2: Get all OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals A1bC2dE3f... openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 996d39aa-fdac-4d97-aa3d-c81fb47362ac aaaaaaaa-bbbb-cccc-1111-222222222222 PrivilegedAccess... +``` + +This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +### Example 3: Get two OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 2 +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +``` + +This example demonstrates how to get top two oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md new file mode 100644 index 0000000000..890f1d9a67 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md @@ -0,0 +1,195 @@ +--- +title: Get-EntraServicePrincipalOwnedObject +description: This article provides details on the Get-EntraServicePrincipalOwnedObject Command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOwnedObject + +## Synopsis + +Gets an object owned by a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalOwnedObject + [-All] + -ServicePrincipalId + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalOwnedObject` cmdlet retrieves an object owned by a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +The command retrieves the owned objects of a service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 2: Retrieve the all owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipalId = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").ObjectId +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipalId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves an object owned by a service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal Id. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 2: Retrieve all owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +The command receives the all owned objects of a service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 3: Retrieve top one owned object of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves the top one owned object of a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..2270323cb2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md @@ -0,0 +1,217 @@ +--- +title: Get-EntraServicePrincipalOwner +description: This article provides details on the Get-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalOwner + +## Synopsis + +Get the owner of a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalOwner + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraServicePrincipalOwner` cmdlet gets the owners of a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the owner of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example gets the owners of a specified service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 2: Retrieve all the owners of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command gets all the owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 3: Retrieve top two owners of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This command gets top two owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 4: Retrieve service principal owner details + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +# Get the owners of the service principal +$owners = Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All +$result = @() + +# Loop through each owner and get their UserPrincipalName and DisplayName +foreach ($owner in $owners) { + $userId = $owner.Id + $user = Get-EntraUser -UserId $userId + $userDetails = [PSCustomObject]@{ + Id = $owner.Id + UserPrincipalName = $user.UserPrincipalName + DisplayName = $user.DisplayName + } + $result += $userDetails +} + +# Output the result in a table format +$result | Format-Table -AutoSize +``` + +```Output +Id UserPrincipalName DisplayName +-- ----------------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AlexW@contoso.com Alex Wilber +bbbbbbbb-1111-2222-3333-cccccccccccc AdeleV@contoso.com Adele Vance +``` + +This example shows how to retrieve more details of a service principal owner such as displayName, userPrincipalName. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..32f7613b31 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,93 @@ +--- +title: Get-EntraServicePrincipalPasswordCredential +description: This article provides details on the Get-EntraServicePrincipalPasswordCredential Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# Get-EntraServicePrincipalPasswordCredential + +## Synopsis + +Get credentials for a service principal. + +## Syntax + +```powershell +Get-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + [] +``` + +## Description + +The `Get-EntraServicePrincipalPasswordCredential` cmdlet gets the password credentials for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the password credential of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 17-04-2025 07:32:41 gjW bdf6a3df-cc9b-4612-b948-e32804ee88f7 17-04-2024 07:32:41 + 21-03-2025 08:12:08 4fl 7f4414ec-8f72-49a8-b949-70d635899656 21-03-2024 08:12:08 + 12-12-2024 08:39:07 mjl 0fff6b21-0a20-4f7c-93ba-26ed9b648344 12-12-2023 08:39:10 +``` + +This example retrieves the password credentials for specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the object ID of a service principal. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of the service principal for which to get password credentials. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) + +[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md new file mode 100644 index 0000000000..f8b75c0061 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md @@ -0,0 +1,490 @@ +--- +title: New-EntraApplication +description: This article provides details on the New-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplication + +schema: 2.0.0 +--- + +# New-EntraApplication + +## Synopsis + +Creates (registers) a new application object. + +## Syntax + +```powershell +New-EntraApplication + -DisplayName + [-AddIns ] + [-PasswordCredentials ] + [-TokenEncryptionKeyId ] + [-SignInAudience ] + [-KeyCredentials ] + [-ParentalControlSettings ] + [-IdentifierUris ] + [-AppRoles ] + [-PublicClient ] + [-InformationalUrl ] + [-Tags ] + [-Api ] + [-OptionalClaims ] + [-GroupMembershipClaims ] + [-Web ] + [-IsFallbackPublicClient ] + [-IsDeviceOnlyAuthSupported ] + [-RequiredResourceAccess ] + [] +``` + +## Description + +Creates (registers) a new application object. Specify the `DisplayName` parameter to create a new application. + +## Examples + +### Example 1: Create an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +New-EntraApplication -DisplayName 'My new application' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 2: Create an application using IdentifierUris parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +New-EntraApplication -DisplayName 'My new application' -IdentifierUris 'https://mynewapp.contoso.com' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 3: Create an application using AddIns parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$addin = New-Object Microsoft.Open.MSGraph.Model.AddIn +$addin.Type = 'testtype' +$addinproperties = New-Object System.collections.Generic.List[Microsoft.Open.MSGraph.Model.KeyValue] +$addinproperties.Add([Microsoft.Open.MSGraph.Model.KeyValue]@{ Key = "key"; Value = "value" }) +$addin.Properties = $addinproperties +New-EntraApplication -DisplayName 'My new application' -AddIns $addin +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +## Parameters + +### -AddIns + +Defines custom behavior that a consuming service can use to call an app in specific contexts. + +For example, applications that can render file streams may set the addIns property for its "FileHandler" functionality. + +This will let services like Office 365 call the application in the context of a document the user is working on. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Api + +Specifies settings for an application that implements a web API. + +```yaml +Type: ApiApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoles + +The collection of application roles that an application might declare. +These roles can be assigned to users, groups, or service principals. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupMembershipClaims + +Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentifierUris + +User-defined URI(s) that uniquely identify a Web application within its Microsoft Entra ID tenant, or within a verified custom domain (see "Domains" tab in the Azure classic portal) if the application is multi-tenant. + +The first element is populated from the Web application's "APP ID URI" field if updated via the Azure classic portal (or respective Microsoft Entra ID PowerShell cmdlet parameter). + +Extra URIs can be added via the application manifest; see Understanding the Microsoft Entra ID Application Manifest for details. + +This collection is also used to populate the Web application's servicePrincipalNames collection. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InformationalUrl + +Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. + +The terms of service and privacy statement are surfaced to users through the user consent experience. + +```yaml +Type: InformationalUrl +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsDeviceOnlyAuthSupported + +Specifies if the application supports authentication using a device token. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsFallbackPublicClient + +Specifies the fallback application type as public client, such as an installed application running on a mobile device. + +The default value is false that means the fallback application type is confidential client such as web app. + +There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). + +In those cases Microsoft Entra ID interprets the application type based on the value of this property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +The collection of key credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OptionalClaims + +Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. + +```yaml +Type: OptionalClaims +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentalControlSettings + +Specifies parental control settings for an application. + +```yaml +Type: ParentalControlSettings +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +The collection of password credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicClient + +Specifies whether this application is a public client (such as an installed application running on a mobile device). +Default is false. + +```yaml +Type: PublicClientApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequiredResourceAccess + +Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. + +This pre-configuration of required resource access drives the consent experience. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInAudience + +Specifies what Microsoft accounts are supported for the current application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Custom strings that can be used to categorize and identify the application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TokenEncryptionKeyId + +Specifies the keyId of a public key from the keyCredentials collection. + +When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. + +The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Web + +Specifies settings for a web application. + +```yaml +Type: WebApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Boolean + +### Microsoft.Open.MSGraph.Model.ApiApplication + +### Microsoft.Open.MSGraph.Model.InformationalUrl + +### Microsoft.Open.MSGraph.Model.OptionalClaims + +### Microsoft.Open.MSGraph.Model.ParentalControlSettings + +### Microsoft.Open.MSGraph.Model.PublicClientApplication + +### Microsoft.Open.MSGraph.Model.WebApplication + +### String + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.Add-in] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] + +### System.Collections.Generic.List`1[System.String] + +### System. Nullable`1[System.Boolean] + +## Outputs + +### Microsoft.Open.MSGraph.Model.MsApplication + +## Notes + +- See more details - + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..3635b5b70b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md @@ -0,0 +1,215 @@ +--- +title: New-EntraApplicationExtensionProperty +description: This article provides details on the New-EntraApplicationExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# New-EntraApplicationExtensionProperty + +## Synopsis + +Creates an application extension property. + +## Syntax + +```powershell +New-EntraApplicationExtensionProperty + -ApplicationId + -Name + [-DataType ] + [-TargetObjects ] + [] +``` + +## Description + +The `New-EntraApplicationExtensionProperty` cmdlet creates an application extension property for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Create an extension property + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} +``` + +This command creates an application extension property of the string type for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. + +### Example 2: Create an extension property with data type parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' + DataType = 'Boolean' +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app Boolean False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} +``` + +This command creates an application extension property of the specified data type for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. +- `-DataType` parameter specifies the data type of the value the extension property can hold. + +### Example 3: Create an extension property with targets parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$targets = New-Object System.Collections.Generic.List[System.String] +$targets.Add('User') +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' + TargetObjects = $targets +} + +New-EntraApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {User} +``` + +The example shows how to create an application extension property with the specified target objects for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. +- `-TargetObjects` parameter specifies the Microsoft Graph resources that use the extension property. All values must be in PascalCase. + +## Parameters + +### -DataType + +Specifies the data type of the value the extension property can hold. Following values are supported. + +- Binary - 256 bytes maximum +- Boolean +- DateTime - Must be specified in ISO 8601 format. Will be stored in UTC. +- Integer - 32-bit value. +- LargeInteger - 64-bit value. +- String - 256 characters maximum + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +Specifies the name of the extension property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjects + +Specifies the Microsoft Graph resources that can use the extension property. All values must be in PascalCase. The following values are supported. + +- User +- Group +- AdministrativeUnit +- Application +- Device +- Organization + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) + +[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md new file mode 100644 index 0000000000..3c8821a907 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md @@ -0,0 +1,111 @@ +--- +title: New-EntraApplicationFromApplicationTemplate +description: This article provides details on the New-EntraApplicationFromApplicationTemplate command. + + +ms.service: entra +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate +schema: 2.0.0 +--- + +# New-EntraApplicationFromApplicationTemplate + +## Synopsis + +Add an instance of an application from the Microsoft Entra application gallery into your directory. + +## Syntax + +```powershell +New-EntraApplicationFromApplicationTemplate + -Id + -DisplayName + [] +``` + +## Description + +The `New-EntraApplicationFromApplicationTemplate` cmdlet adds an instance of an application from the Microsoft Entra application gallery into your directory. + +The application template with ID `8adf8e6e-67b2-4cf2-a259-e3dc5476c621` can be used to add a non-gallery app that you can configure different single-sign on (SSO) modes like SAML SSO and password-based SSO. + +## Examples + +### Example 1: Creates an application from application template + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DisplayName = 'ApplicationTemplate' +} +New-EntraApplicationFromApplicationTemplate @params +``` + +```Output +@odata.context servicePrincipal +-------------- ---------------- +https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.applicationServicePrincipal @{oauth2PermissionScopes=System.Object[]; servicePrincipalType=Application; displ...} +``` + +This command instantiates a new application based on application template referenced by the ID. + +- `-Id` specifies Application TemplateId. +- `-DisplayName` specifies application template display name. + +## Parameters + +### -Id + +The Id parameter specifies Application TemplateId. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Application template display name. + +```yaml +Type: System.ApplicationTemplateDisplayName +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.ApplicationTemplateCopy + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md new file mode 100644 index 0000000000..0f5ed02cf9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md @@ -0,0 +1,155 @@ +--- +title: New-EntraApplicationKey +description: This article provides details on the New-EntraApplicationKey command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKey + +schema: 2.0.0 +--- + +# New-EntraApplicationKey + +## Synopsis + +Adds a new key to an application. + +## Syntax + +```powershell +New-EntraApplicationKey + -ObjectId + -KeyCredential + -PasswordCredential ] + -Proof + [] +``` + +## Description + +Adds a new key to an application. + +## Examples + +### Example 1: Add a key credential to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $app.ObjectId + KeyCredential = @{ key=[System.Convert]::FromBase64String('{base64cert}') } + PasswordCredential = @{ DisplayName = 'mypassword' } + Proof = '{token}' +} + +New-EntraApplicationKey @params +``` + +This command adds a key credential to an specified application. + +- `-ObjectId` parameter specifies the unique identifier of an application. +- `-KeyCredential` parameter specifies the application key credential to add. +- `-PasswordCredential` parameter specifies the application password credential to add. +- `-Proof` parameter specifies the signed JWT token used as a proof of possession of the existing keys. + +## Parameters + +### -KeyCredential + +The application key credential to add. + +NOTES: keyId value should be null. + +```yaml +Type: KeyCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +The unique identifier of the application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredential + +The application password credential to add. + +NOTES: keyId value should be null. + +```yaml +Type: PasswordCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Proof + +A signed JWT token used as a proof of possession of the existing keys. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +### Microsoft.Open.MSGraph.Model.KeyCredential + +### Microsoft.Open.MSGraph.Model.PasswordCredential + +## Outputs + +### Microsoft.Open.MSGraph.Model.KeyCredential + +## Notes + +## Related Links + +[Remove-EntraApplicationKey](Remove-EntraApplicationKey.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..4d347c6251 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md @@ -0,0 +1,258 @@ +--- +title: New-EntraApplicationKeyCredential +description: This article provides details on the New-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# New-EntraApplicationKeyCredential + +## Synopsis + +Creates a key credential for an application. + +## Syntax + +```powershell +New-EntraApplicationKeyCredential + -ApplicationId + [-CustomKeyIdentifier ] + [-Type ] + [-Usage ] + [-Value ] + [-EndDate ] + [-StartDate ] + [] +``` + +## Description + +The `New-EntraApplicationKeyCredential` cmdlet creates a key credential for an application. + +An application can use this command along with `Remove-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. + +As part of the request validation, proof of possession of an existing key is verified before the action can be performed. + +## Examples + +### Example 1: Create a new application key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' + +$AppId = (Get-EntraApplication -Top 1).Objectid +$params = @{ + ApplicationId = $AppId + CustomKeyIdentifier = 'EntraPowerShellKey' + StartDate = '2024-03-21T14:14:14Z' + Type = 'Symmetric' + Usage = 'Sign' + Value = '' +} + +New-EntraApplicationKeyCredential @params +``` + +```Output +CustomKeyIdentifier : {84, 101, 115, 116} +EndDate : 2024-03-21T14:14:14Z +KeyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 +StartDate : 2025-03-21T14:14:14Z +Type : Symmetric +Usage : Sign +Value : {49, 50, 51} +``` + +This example shows how to create an application key credential. + +- `-ApplicationId` Specifies a unique ID of an application +- `-CustomKeyIdentifier` Specifies a custom key ID. +- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. +- `-Type` Specifies the type of the key. +- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. +- `-Value` Specifies the value for the key. + +You can use the `Get-EntraApplication` cmdlet to retrieve the application Object ID. + +### Example 2: Use a certificate to add an application key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' + +$cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 #create a new certificate object +$cer.Import('C:\Users\ContosoUser\appcert.cer') +$bin = $cer.GetRawCertData() +$base64Value = [System.Convert]::ToBase64String($bin) +$bin = $cer.GetCertHash() +$base64Thumbprint = [System.Convert]::ToBase64String($bin) +$keyid = [System.Guid]::NewGuid().ToString() + +$params = @{ + ApplicationId = '22223333-cccc-4444-dddd-5555eeee6666' + CustomKeyIdentifier = $base64Thumbprint + Type = 'AsymmetricX509Cert' + Usage = 'Verify' + Value = $base64Value + StartDate = $cer.GetEffectiveDateString() + EndDate = $cer.GetExpirationDateString() +} + +New-EntraApplicationKeyCredential @params +``` + +This example shows how to create an application key credential. + +- `-ApplicationId` Specifies a unique ID of an application +- `-CustomKeyIdentifier` Specifies a custom key ID. +- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. +- `-EndDate` Specifies the time when the key becomes invalid as a DateTime object. +- `-Type` Specifies the type of the key. +- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. +- `-Value` Specifies the value for the key. + +## Parameters + +### -CustomKeyIdentifier + +Specifies a custom key ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +Specifies the time when the key becomes invalid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +Specifies the time when the key becomes valid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of the key. + +```yaml +Type: KeyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Usage + +Specifies the key usage. + +- `AsymmetricX509Cert`: The usage must be `Verify`. +- `X509CertAndPassword`: The usage must be `Sign`. + +```yaml +Type: KeyUsage +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Value + +Specifies the value for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) + +[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md new file mode 100644 index 0000000000..155f17e3fe --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md @@ -0,0 +1,121 @@ +--- +title: New-EntraApplicationPassword +description: This article provides details on the New-EntraApplicationPassword command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPassword + +schema: 2.0.0 +--- + +# New-EntraApplicationPassword + +## Synopsis + +Adds a strong password to an application. + +## Syntax + +```powershell +New-EntraApplicationPassword + -ObjectId + -PasswordCredential + [] +``` + +## Description + +Adds a strong password to an application. + +## Examples + +### Example 1: Add a password to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$Application = Get-EntraBetaApplication -SearchString '' +$PasswordCredential= New-Object Microsoft.Open.MSGraph.Model.PasswordCredential +$PasswordCredential.StartDateTime = Get-Date -Year 2024 -Month 12 -Day 28 +$PasswordCredential.EndDateTime = Get-Date -Year 2025 -Month 2 -Day 28 +$PasswordCredential.KeyId = 'bbbbbbbb-1c1c-2d2d-3e3e-444444444444' +$PasswordCredential.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('a') +$PasswordCredential.Hint = 'b' +$params = @{ + ObjectId = $Application.ObjectId + PasswordCredential = $PasswordCredential +} + +New-EntraApplicationPassword @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +{97} 2/28/2025 7:05:39 AM nnW bbbbbbbb-1c1c-2d2d-3e3e-444444444444 12/28/2024 7:05:39 AM +``` + +This example adds a password to the specified application. + +- `-ObjectId` parameter specifies the unique identifier of the application. +- `-PasswordCredential` parameter specifies a password credential associated with an application or a service principal. + +## Parameters + +### -ObjectId + +The unique identifier of the application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredential + +Represents a password credential associated with an application or a service principal. + +```yaml +Type: PasswordCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +### Microsoft.Open.MSGraph.Model.PasswordCredential + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraApplicationPassword](Remove-EntraApplicationPassword.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..55f8da01e5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md @@ -0,0 +1,215 @@ +--- +title: New-EntraApplicationPasswordCredential +description: This article provides details on the New-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# New-EntraApplicationPasswordCredential + +## Synopsis + +Creates a password credential for an application. + +## Syntax + +```powershell +New-EntraApplicationPasswordCredential + -ApplicationId + [-CustomKeyIdentifier ] + [-StartDate ] + [-EndDate ] + [] +``` + +## Description + +The `New-EntraApplicationPasswordCredential` cmdlet creates a password credential for an application in Microsoft Entra ID. + +## Examples + +### Example 1: Create a password credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +New-EntraApplicationPasswordCredential -ApplicationId $application.Id +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. + +### Example 2: Create a password credential using CustomKeyIdentifier parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +100 101 109 111 demo 8/2/2026 11:47:53 AM 8Mw tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 8/2/2024 11:47:53 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-CustomKeyIdentifier` Speicifies unique binary identifier. + +### Example 3: Create a password credential using StartDate parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + StartDate = (Get-Date).AddYears(0) + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-StartDate` Speicifies the date and time at which the password becomes valid. + +### Example 4: Create a password credential using EndDate parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + EndDate = (Get-Date).AddYears(2) + CustomKeyIdentifier = '' +} + +New-EntraApplicationPasswordCredential @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-EndDate` Speicifies The date and time at which the password expires. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -CustomKeyIdentifier + +A unique binary identifier. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +The date and time at which the password becomes valid. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +The date and time at which the password expires. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) + +[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md new file mode 100644 index 0000000000..278ad45ebb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md @@ -0,0 +1,406 @@ +--- +title: New-EntraServicePrincipal +description: This article provides details on the New-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipal + +schema: 2.0.0 +--- + +# New-EntraServicePrincipal + +## Synopsis + +Creates a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipal + -AppId + [-KeyCredentials ] + [-Homepage ] + [-LogoutUrl ] + [-ServicePrincipalType ] + [-AlternativeNames ] + [-PasswordCredentials ] + [-Tags ] + [-AccountEnabled ] + [-ServicePrincipalNames ] + [-AppRoleAssignmentRequired ] + [-DisplayName ] + [-ReplyUrls ] + [] +``` + +## Description + +Create a new service Principal. + +For multitenant apps, the calling user must also be in at least one of the following Microsoft Entra roles: + +- Application Administrator +- Cloud Application Administrator + +For single-tenant apps where the calling user is a non-admin user but is the owner of the backing application, the user must have the Application Developer role. + +## Examples + +### Example 1: Create a new service principal using DisplayName, AccountEnabled, Tags, and AppRoleAssignmentRequired + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AccountEnabled = $true + AppId = $MyApp.AppId + AppRoleAssignmentRequired = $true + DisplayName = $MyApp.DisplayName + Tags = {WindowsAzureActiveDirectoryIntegratedApp} +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +The tag `-Tags {WindowsAzureActiveDirectoryIntegratedApp}` is used to have this service principal show up in the list of Integrated Applications in the Admin Portal. + +- `-AccountEnabled` parameter specifies true if the service principal account is enabled, otherwise false. +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-DisplayName` parameter specifies the service principal display name. +- `-AppRoleAssignmentRequired` parameter indicates whether an application role assignment is required. + +### Example 2: Create a new service principal using Homepage, logoutUrl, and ReplyUrls + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + Homepage = 'https://localhost/home' + LogoutUrl = 'htpp://localhost/logout' + ReplyUrls = 'https://localhost/redirect' +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-Homepage` parameter specifies the home page or landing page of the application. +- `-LogoutUrl` parameter specifies the logout URL. +- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. + +### Example 3: Create a new service principal by KeyCredentials + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential +$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') +$startdate = Get-Date -Year 2023 -Month 10 -Day 23 +$creds.StartDate = $startdate +$creds.Type = 'Symmetric' +$creds.Usage = 'Sign' +$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('strong-cred-value') +$creds.EndDate = Get-Date -Year 2024 -Month 10 -Day 23 +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + KeyCredentials = $creds +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-KeyCredentials` parameter specifies the collection of key credentials associated with the service principal. + +### Example 4: Create a new service principal by AlternativeNames, ServicePrincipalType, and ServicePrincipalName + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + AlternativeNames = 'sktest2' + ServicePrincipalType = 'Application' + ServicePrincipalNames = $MyApp.AppId +} +New-EntraServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADandPersonalMicrosoftAccount Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-AlternativeNames` parameter specifies the alternative names for this service principal. +- `-ServicePrincipalType` parameter specifies the type of the service principal. +- `-ServicePrincipalNames` parameter specifies an array of service principal names. + +## Parameters + +### -AccountEnabled + +True if the service principal account is enabled; otherwise, false. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeNames + +The alternative names for this service principal. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppId + +The unique identifier for the associated application (its appId property). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoleAssignmentRequired + +Indicates whether an application role assignment is required. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the service principal display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Homepage + +Home page or landing page of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +The collection of key credentials associated with the service principal. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoutUrl + +Specifies the logout URL. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +The collection of password credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplyUrls + +The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalNames + +Specifies an array of service principal names. +Based on the identifierURIs collection, plus the application's appId property, these URIs are used to reference an application's service principal. +A client uses ServicePrincipalNames to: + +- populate requiredResourceAccess, via "Permissions to other applications" in the Azure classic portal. +- Specify a resource URI to acquire an access token, which is the URI returned in the claim. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalType + +The type of the service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Tags linked to this service principal. + +Note that if you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..5a44ce185e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,230 @@ +--- +title: New-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the New-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Assigns a service principal to an application role. + +## Syntax + +```powershell +New-EntraServicePrincipalAppRoleAssignment + -ObjectId + -PrincipalId + -Id + -ResourceId + [] +``` + +## Description + +The `New-EntraServicePrincipalAppRoleAssignment` cmdlet assigns a service principal to an application role in Microsoft Entra ID. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Assign an app role to another service principal + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $spo.ObjectId +} + +New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box aaaa0000-bb11-2222-33cc-444444dddddd +``` + +This example demonstrates how to assign an app role to another service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. + +- `-ObjectId` parameter specifies the ObjectId of a client service principal to which you're assigning the app role. +- `-ResourceId`parameter specifies the ObjectId of the resource service principal. +- `-Id` parameter specifies the Id of the app role (defined on the resource service principal) to assign to the client service principal. If no app roles are defined on the resource app, you can use `00000000-0000-0000-0000-000000000000`. +- `-PrincipalId` parameter specifies the ObjectId of the client service principal to which you're assigning the app role. + +### Example 2: Assign an app role to a user + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $user = Get-EntraUser -SearchString 'Test Contoso' + + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $user.ObjectId +} + +New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box bbbb1111-cc22-3333-44dd-555555eeeeee +``` + +This example demonstrates how to assign an app role to a user in Microsoft Entra ID. +You can use the command `Get-EntraServicePrincipal` to get a service principal Id. +You can use the command `Get-EntraUser` to get a user Id. + +- `-ObjectId` parameter specifies the ObjectId of the app's service principal. +- `-ResourceId`parameter specifies the ObjectId of the app's service principal. +- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the user. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the user. +- `-PrincipalId` parameter specifies the ObjectId of a user to which you're assigning the app role. + +### Example 3: Assign an app role to a group + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" + $group = Get-EntraGroup -SearchString 'testGroup' + + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $group.ObjectId + } + + New-EntraServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box cccc2222-dd33-4444-55ee-666666ffffff +``` + +This example demonstrates how to assign an app role to a group in Microsoft Entra ID. +You can use the command `Get-EntraServicePrincipal` to get a service principal Id. +You can use the command `Get-EntraGroup` to get a group Id. + +- `-ObjectId` parameter specifies the ObjectId of the app's service principal. +- `-ResourceId`parameter specifies the ObjectId of the app's service principal. +- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the group. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the group. +- `-PrincipalId` parameter specifies the ObjectId of a group to which you're assigning the app role. + +## Parameters + +### -Id + +Specifies the ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies a principal ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +Specifies a resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`New-EntraServiceAppRoleAssignment` is an alias for `New-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) + +[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..74a1a50f71 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,182 @@ +--- +title: New-EntraServicePrincipalKeyCredential +description: This article provides details on the New-EntraServicePrincipalKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalKeyCredential + +## Synopsis + +Creates a password credential for a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipalKeyCredential + -ObjectId + [-CustomKeyIdentifier ] + [-StartDate ] + [-EndDate ] + [-Type ] + [-Usage ] + [-Value ] + [] +``` + +## Description + +The New-EntraServicePrincipalKeyCredential cmdlet creates a key credential for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Create a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +New-EntraServicePrincipalKeyCredential +``` + +This command creates a key credential for a service principal. + +## Parameters + +### -CustomKeyIdentifier + +Specifies a custom key ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +Specifies the time when the key becomes invalid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +Specifies the time when the key becomes valid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of the key. + +```yaml +Type: KeyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Usage + +Specifies the key usage. + +```yaml +Type: KeyUsage +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Value + +Specifies the value for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) + +[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..a8377771c4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,168 @@ +--- +title: New-EntraServicePrincipalPasswordCredential +description: This article provides details on the New-EntraServicePrincipalPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# New-EntraServicePrincipalPasswordCredential + +## Synopsis + +Creates a password credential for a service principal. + +## Syntax + +```powershell +New-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + [-EndDate ] + [-StartDate ] + [] +``` + +## Description + +The `New-EntraServicePrincipalPasswordCredential` cmdlet creates a password credential for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Create a password credential with StartDate + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + StartDate = '2024-04-21T14:14:14Z' +} +New-EntraServicePrincipalPasswordCredential @Params +``` + +```Output +secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u +@odata.type : #microsoft.graph.servicePrincipal +endDateTime : 08-08-2026 10:30:00 +hint : LY. +customKeyIdentifier : +startDateTime : 08-08-2024 14:14:14 +keyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 +@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword +displayName : +StartDate : 08-08-2024 14:14:14 +EndDate : 08-08-2026 10:30:00 +``` + +This example demonstrates how to create a password credential with StartDate for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-StarteDate` parameter specifies the date and time at which the password becomes valid. + +### Example 2: Create a password credential with EndtDate + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + EndDate = '2030-03-21T14:14:14Z' +} +New-EntraServicePrincipalPasswordCredential @Params +``` + +```Output +secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u +@odata.type : #microsoft.graph.servicePrincipal +endDateTime : 08-08-2026 10:30:00 +hint : LY. +customKeyIdentifier : +startDateTime : 08-08-2024 14:14:14 +keyId : bbbbbbbb-1c1c-2d2d-3e3e-444444444444 +@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword +displayName : +StartDate : 08-08-2024 14:14:14 +EndDate : 08-08-2026 10:30:00 +``` + +This example demonstrates how to create a password credential with EndDate for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-EndDate` parameter specifies the date and time at which the password expires represented using ISO 8601 format and is always in UTC time. + +## Parameters + +### -EndDate + +The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of the service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) + +[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md new file mode 100644 index 0000000000..bb06d0fd75 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraApplication +description: This article provides details on the Remove-EntraApplication command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplication + +schema: 2.0.0 +--- + +# Remove-EntraApplication + +## Synopsis + +Deletes an application object. + +## Syntax + +```powershell +Remove-EntraApplication + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplication` cmdlet deletes an application object identified by ApplicationId. Specify the `ApplicationId` parameter to delete an application object. + +## Examples + +### Example 1: Remove an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$Application = Get-EntraApplication -SearchString '' +Remove-EntraApplication -ApplicationId $Application.ObjectId +``` + +This example demonstrates how to delete an application object. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[New-EntraApplication](New-EntraApplication.md) + +[Set-EntraApplication](Set-EntraApplication.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md new file mode 100644 index 0000000000..3ff1288b6e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationExtensionProperty +description: This article provides details on the Remove-EntraApplicationExtensionProperty command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty + +schema: 2.0.0 +--- + +# Remove-EntraApplicationExtensionProperty + +## Synopsis + +Removes an application extension property. + +## Syntax + +```powershell +Remove-EntraApplicationExtensionProperty + -ExtensionPropertyId + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplicationExtensionProperty` cmdlet removes an application extension property for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an application extension property + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + ExtensionPropertyId = 'cccc2222-dd33-4444-55ee-666666ffffff' +} + +Remove-EntraApplicationExtensionProperty @params +``` + +This example removes the extension property that has the specified ID from an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-ExtensionPropertyId` parameter specifies the unique identifier of the extension property to remove. + +## Parameters + +### -ExtensionPropertyId + +Specifies the unique ID of the extension property to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) + +[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md new file mode 100644 index 0000000000..9f0e4a9325 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md @@ -0,0 +1,133 @@ +--- +title: Remove-EntraApplicationKey +description: This article provides details on the Remove-EntraApplicationKey command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKey + +schema: 2.0.0 +--- + +# Remove-EntraApplicationKey + +## Synopsis + +Removes a key from an application. + +## Syntax + +```powershell +Remove-EntraApplicationKey + -ObjectId + [-Proof ] + [-KeyId ] + [] +``` + +## Description + +Removes a key from an application. + +## Examples + +### Example 1: Removes a key credential from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $app.ObjectId + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' + Proof = {token} +} + +Remove-EntraApplicationKey @params +``` + +This command removes the specified key credential from the specified application. + +- `-ObjectId` parameter specifies the unique identifier of an application. +- `-KeyId` parameter specifies the key Id corresponding to the key object to be removed. +- `-Proof` parameter specifies the JWT token provided as a proof of possession. + +## Parameters + +### -ObjectId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KeyId + +The key Id corresponding to the key object to be removed. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Proof + +The JWT token provided as a proof of possession. + +A self-signed JWT token used as a proof of possession of the existing keys. This JWT token must be signed with a private key that corresponds to one of the existing valid certificates associated with the application. The token should contain the following claims: + +- `aud`: Audience needs to be 00000002-0000-0000-c000-000000000000. +- `iss`: Issuer needs to be the ID of the application that initiates the request. +- `nbf`: Not before time. +- `exp`: Expiration time should be the value of nbf + 10 minutes. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationKey](New-EntraApplicationKey.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md new file mode 100644 index 0000000000..944d130412 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md @@ -0,0 +1,108 @@ +--- +title: Remove-EntraApplicationKeyCredential +description: This article provides details on the Remove-EntraApplicationKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential + +schema: 2.0.0 +--- + +# Remove-EntraApplicationKeyCredential + +## Synopsis + +Removes a key credential from an application. + +## Syntax + +```powershell +Remove-EntraApplicationKeyCredential + -ApplicationId + -KeyId + [] +``` + +## Description + +The `Remove-EntraApplicationKeyCredential` cmdlet removes a key credential from an application. + +An application can use this command along with `New-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. + +## Examples + +### Example 1: Remove a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +} + +Remove-EntraApplicationKeyCredential @params +``` + +This command removes the specified key credential from the specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-KeyId` Specifies a custom key ID. Use `Get-EntraApplicationKeyCredential` to get the keyId details. + +## Parameters + +### -KeyId + +Specifies a custom key ID. The unique identifier for the password. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) + +[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md new file mode 100644 index 0000000000..a8a9019f62 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationOwner +description: This article provides details on the Remove-EntraApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationOwner + +schema: 2.0.0 +--- + +# Remove-EntraApplicationOwner + +## Synopsis + +Removes an owner from an application. + +## Syntax + +```powershell +Remove-EntraApplicationOwner + -OwnerId + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraApplicationOwner` cmdlet removes an owner from an application in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an owner from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$Application = Get-EntraApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + OwnerId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} + +Remove-EntraApplicationOwner @params +``` + +This example removes the specified owner from the specified application. You can use the command `Get-EntraApplication` to get application Id. + +- `-ApplicationId` parameter specifies the the unique identifier of a application. +- `-OwnerId` parameter specifies the ID of the owner. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, -`InformationVariable`, `-OutVariable`, -`OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) + +[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md new file mode 100644 index 0000000000..b63496136c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraApplicationPassword +description: This article provides details on the Remove-EntraApplicationPassword command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPassword + +schema: 2.0.0 +--- + +# Remove-EntraApplicationPassword + +## Synopsis + +Remove a password from an application. + +## Syntax + +```powershell +Remove-EntraApplicationPassword + -ObjectId + [-KeyId ] + [] +``` + +## Description + +Remove a password from an application. + +## Examples + +### Example 1: Removes a password from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $application.Id + KeyId = 'cccccccc-2d2d-3e3e-4f4f-555555555555' +} + +Remove-EntraApplicationPassword @params +``` + +This example removes the specified password from the specified application. + +- `-ObjectId` parameter specifies the unique identifier of the application. +- `-KeyId` parameter specifies the unique identifier of the PasswordCredential. + +## Parameters + +### -ObjectId + +The unique identifier of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KeyId + +The unique identifier for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraApplicationPassword](New-EntraApplicationPassword.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md new file mode 100644 index 0000000000..72d34ae5ff --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraApplicationPasswordCredential +description: This article provides details on the Remove-EntraApplicationPasswordCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential + +schema: 2.0.0 +--- + +# Remove-EntraApplicationPasswordCredential + +## Synopsis + +Removes a password credential from an application. + +## Syntax + +```powershell +Remove-EntraApplicationPasswordCredential + -ApplicationId + -KeyId + [] +``` + +## Description + +The `Remove-EntraApplicationPasswordCredential` cmdlet removes a password credential from an application in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an application password credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "displayName eq 'Contoso Helpdesk App'" +$KeyIDs = Get-EntraApplicationPasswordCredential -ApplicationId $application.Id +Remove-EntraApplicationPasswordCredential -ApplicationId $application.Id -KeyId $KeyIds[0].KeyId +``` + +This example demonstrates how to remove the password credential for an application. + +- `ApplicationId` Specifies the ID of the application. Use `Get-EntraApplication` to get application ObjectId value. +- `KeyId` Specifies the ID of the password credential. Use `Get-EntraApplicationPasswordCredential` to retrieve a specific credential details. + +## Parameters + +### -KeyId + +Specifies the ID of the password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of the application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) + +[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md new file mode 100644 index 0000000000..d34578e6cb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md @@ -0,0 +1,83 @@ +--- +title: Remove-EntraApplicationVerifiedPublisher +description: This article provides details on the Remove-EntraApplicationVerifiedPublisher command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher + +schema: 2.0.0 +--- + +# Remove-EntraApplicationVerifiedPublisher + +## Synopsis + +Removes the verified publisher from an application. + +## Syntax + +```powershell +Remove-EntraApplicationVerifiedPublisher + -AppObjectId + [] +``` + +## Description + +Removes the verified publisher from an application. + +## Examples + +### Example 1: Remove the verified publisher from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +Remove-EntraApplicationVerifiedPublisher -AppObjectId $app.ObjectId +``` + +This command demonstrates how to remove the verified publisher from an application. + +- `-AppObjectId` parameter specifies the unique identifier of an application. + +## Parameters + +### -AppObjectId + +The unique identifier of a Microsoft Entra ID Application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[Set-EntraApplicationVerifiedPublisher](Set-EntraApplicationVerifiedPublisher.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md new file mode 100644 index 0000000000..fb083eb0aa --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraDeletedApplication +description: This article provides details on the Remove-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Remove-EntraDeletedApplication + +## Synopsis + +Permanently delete a recently deleted application object from deleted items. + +## Syntax + +```powershell +Remove-EntraDeletedApplication + [-ObjectId] + [] +``` + +## Description + +Permanently delete a recently deleted application object from deleted items. After an item is permanently deleted, it can't be restored. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- To permanently delete deleted applications or service principals: Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. + +## Examples + +### Example 1: Remove deleted application object + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$App = Get-EntraDeletedApplication -SearchString 'My PowerShell Application' +Remove-EntraDeletedApplication -ObjectId $App.ObjectId +``` + +This command removes recently deleted application. You can use the command `Get-EntraDeletedApplication` to get deleted application Id. + +- `-ObjectId` parameter specifies the Id of a deleted application. + +## Parameters + +### -ObjectId + +The unique identifier of deleted application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) + +[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..9860be4fb3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md @@ -0,0 +1,96 @@ +--- +title: Remove-EntraDeletedDirectoryObject +description: This article provides details on the Remove-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Remove-EntraDeletedDirectoryObject + +## Synopsis + +Permanently delete a previously deleted directory object. + +## Syntax + +```powershell +Remove-EntraDeletedDirectoryObject + -DirectoryObjectId + [] +``` + +## Description + +The `Remove-EntraDeletedDirectoryObject` cmdlet is used to permanently delete a previously deleted directory object. + +When a directory object is permanently deleted, it can no longer be restored. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- To permanently delete deleted applications or service principals: `Application Administrator`, `Cloud Application Administrator`, or `Hybrid Identity Administrator`. +- To permanently delete deleted users: `User Administrator`. +- To permanently delete deleted groups: `Groups Administrator`. + +## Examples + +### Example 1: Delete a previously deleted directory object + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Group.ReadWrite.All','Application.ReadWrite.All','User.ReadWrite.All' + +Remove-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This example demonstrates how to permanently delete a previously deleted directory object by DirectoryObjectId. + +- `-DirectoryObjectId` parameter specifies the Id of the directory object that is permanently deleted. + +## Parameters + +### -DirectoryObjectId + +The DirectoryObjectId of the directory object that is permanently deleted. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) + +[Restore-EntraDeletedDirectoryObject](Restore-EntraDeletedDirectoryObject.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md new file mode 100644 index 0000000000..65cf9d1a54 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md @@ -0,0 +1,86 @@ +--- +title: Remove-EntraServicePrincipal +description: This article provides details on the Remove-EntraServicePrincipal command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipal + +## Synopsis + +Removes a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipal + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipal` cmdlet removes a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Removes a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Remove-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId +``` + +This example demonstrates how to remove a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipal](New-EntraServicePrincipal.md) + +[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..333bf29a33 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md @@ -0,0 +1,117 @@ +--- +title: Remove-EntraServicePrincipalAppRoleAssignment +description: This article provides details on the Remove-EntraServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalAppRoleAssignment + +## Synopsis + +Removes a service principal application role assignment. + +## Syntax + +```powershell +Remove-EntraServicePrincipalAppRoleAssignment + -AppRoleAssignmentId + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalAppRoleAssignment` cmdlet removes a service principal application role assignment in Microsoft Entra ID. + +App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Removes a service principal application role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $servicePrincipal.Id -AppRoleAssignmentId '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' +``` + +This example demonstrates how to remove a service principal application role assignment in Microsoft Entra ID. + +- `-ServicePrincipalId` - specifies the unique identifier (Object ID) of the service principal or user from which you want to remove an app role assignment. +- `-AppRoleAssignmentId` - specifies the unique identifier (ID) of the app role assignment that you want to remove. The value `2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6` represents the ID of the specific app role assignment to be removed. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the ID of the application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Remove-EntraServiceAppRoleAssignment` is an alias for `Remove-EntraServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) + +[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..6f2490f9fd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Remove-EntraServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Remove delegated permission classification. + +## Syntax + +```powershell +Remove-EntraServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -Id + [] +``` + +## Description + +The `Remove-EntraServicePrincipalDelegatedPermissionClassification` cmdlet deletes the given delegated permission classification by Id from service principal. + +## Examples + +### Example 1: Remove a delegated permission classification + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' +} +Remove-EntraServicePrincipalDelegatedPermissionClassification @params +``` + +This command deletes the delegated permission classification by Id from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. +- `-Id` parameter specifies the unique identifier of a delegated permission classification object Id. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a delegated permission classification object Id. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) + +[Add-EntraServicePrincipalDelegatedPermissionClassification](Add-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..18477f4493 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraServicePrincipalKeyCredential +description: This article provides details on the Remove-EntraServicePrincipalKeyCredential command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalKeyCredential + +## Synopsis + +Removes a key credential from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalKeyCredential + -ServicePrincipalId + -KeyId + [] +``` + +## Description + +The Remove-EntraServicePrincipalKeyCredential cmdlet removes a key credential from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' #Delegated Permission +Connect-Entra -Scopes 'Application.ReadWrite.OwnedBy' #Application Permission +$SPObjectID = (Get-EntraServicePrincipal -SearchString 'Entra Multi-Factor Auth Client').ObjectID +Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID +Remove-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID -KeyId +``` + +This example demonstrates how to remove a key credential from a service principal in Microsoft Entra ID. + +- First command stores the ObjectID of your service principal in the $SPObjectID variable. +- The second command gets all the Key Credentials for the service principal. Copy the preferred KeyID associated with the certificate to be removed and paste it at the in the third command. +- The last command removes the certificate (key credential) from the service principal configuration. + +## Parameters + +### -KeyId + +Specifies the ID of a key credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) + +[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md new file mode 100644 index 0000000000..685585aa07 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md @@ -0,0 +1,107 @@ +--- +title: Remove-EntraServicePrincipalOwner +description: This article provides details on the Remove-EntraServicePrincipalOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalOwner + +## Synopsis + +Removes an owner from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalOwner + -OwnerId + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalOwner` cmdlet removes an owner from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Removes an owner from a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$owner = Get-EntraUser -UserId 'SawyerM@contoso.com' + +$params= @{ + ServicePrincipalId = $servicePrincipal.Id + OwnerId = $owner.Id +} +Remove-EntraServicePrincipalOwner @params +``` + +This example demonstrates how to remove an owner from a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal Id. +- `-OwnerId` parameter specifies the service principal owner Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) + +[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..6706517f45 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraServicePrincipalPasswordCredential +description: This article provides details on the Remove-EntraServicePrincipalPasswordCredential command. + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# Remove-EntraServicePrincipalPasswordCredential + +## Synopsis + +Removes a password credential from a service principal. + +## Syntax + +```powershell +Remove-EntraServicePrincipalPasswordCredential + -ServicePrincipalId + -KeyId + [] +``` + +## Description + +The `Remove-EntraServicePrincipalPasswordCredential` cmdlet removes a password credential from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a password credential from a service principal in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +} +Remove-EntraServicePrincipalPasswordCredential @Params +``` + +This example demonstrates how to remove a password credential from a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ServicePrincipalId of a specified Service Principal Password Credential. +- `-KeyId` parameter specifies the unique identifier of a Password Credential. + +## Parameters + +### -KeyId + +Specifies the unique identifier of password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) + +[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md new file mode 100644 index 0000000000..a3c04f906a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md @@ -0,0 +1,127 @@ +--- +title: Restore-EntraDeletedApplication +description: This article provides details on the Restore-EntraDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedApplication + +schema: 2.0.0 +--- + +# Restore-EntraDeletedApplication + +## Synopsis + +Restores a previously deleted application. + +## Syntax + +```powershell +Restore-EntraDeletedApplication + [-IdentifierUris ] + -ObjectId + [] +``` + +## Description + +This cmdlet restores a previously deleted application. + +Restoring an application doesn't restore the associated service principal automatically. You must explicitly restore the deleted service principal. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- Application Administrator +- Cloud Application Administrator +- Hybrid Identity Administrator + +## Examples + +### Example 1: Restores a previously deleted application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraApplication -SearchString 'New Entra Application' + +# Delete a specific application +Remove-EntraApplication -ObjectId $application.ObjectId + +# Confirm deleted application +Get-EntraDeletedApplication -Filter "DisplayName eq 'New Entra Application'" + +# Restore a deleted application +Restore-EntraDeletedApplication -ObjectId $application.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example shows how an application is deleted, then the deleted application is retrieved using the `Get-EntraDeletedApplication` cmdlet, and subsequently the application is restored by specifying the application's Object ID in the `Restore-EntraDeletedApplication` cmdlet. + +- `-ObjectId` parameter specifies the ObjectId of the deleted application that is to be restored. + +## Parameters + +### -IdentifierUris + +The IdentifierUris of the application that is to be restored. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +The ObjectId of the deleted application that is to be restored. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md new file mode 100644 index 0000000000..570791b14e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md @@ -0,0 +1,110 @@ +--- +title: Select-EntraGroupIdsServicePrincipalIsMemberOf +description: This article provides details on the Select-EntraGroupIdsServicePrincipalIsMemberOf command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsServicePrincipalIsMemberOf + +## Synopsis + +Selects the groups in which a service principal is a member. + +## Syntax + +```powershell +Select-EntraGroupIdsServicePrincipalIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsServicePrincipalIsMemberOf` cmdlet selects the groups in which a service principal is a member in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Top 10).ObjectId +$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $ServicePrincipal.ObjectId + GroupIdsForMembershipCheck = $Groups +} +Select-EntraGroupIdsServicePrincipalIsMemberOf @params +``` + +```Output +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command gets the group membership of a group for a specified service principal. +You can use the command `Get-EntraGroup` to get group Id. +You can use the command `Get-EntraServicePrincipal` to get service principal Id. + +- `-ObjectId` parameter specifies the service principal Id. +- `-GroupIdsForMembershipCheck` parameter specifies the array of group object IDs. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md new file mode 100644 index 0000000000..a79faa2c1f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md @@ -0,0 +1,496 @@ +--- +title: Set-EntraApplication +description: This article provides details on the Set-EntraApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplication + +schema: 2.0.0 +--- + +# Set-EntraApplication + +## Synopsis + +Updates the properties of an application object. + +## Syntax + +```powershell +Set-EntraApplication + -ApplicationId + [-PasswordCredentials ] + [-TokenEncryptionKeyId ] + [-SignInAudience ] + [-KeyCredentials ] + [-ParentalControlSettings ] + [-IdentifierUris ] + [-AppRoles ] + [-PublicClient ] + [-InformationalUrl ] + [-Tags ] + [-Api ] + [-OptionalClaims ] + [-GroupMembershipClaims ] + [-Web ] + [-DisplayName ] + [-IsFallbackPublicClient ] + [-IsDeviceOnlyAuthSupported ] + [-RequiredResourceAccess ] + [] +``` + +## Description + +Updates the properties of an application object. + +## Examples + +### Example 1: Update an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + DisplayName = 'New Demo Application' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 2: Update an application using IdentifierUris parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + IdentifierUris = 'https://mynewapp.contoso.com' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 3: Update an application using GroupMembershipClaims parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + GroupMembershipClaims = 'SecurityGroup' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 4: Update an application using IsDeviceOnlyAuthSupported parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + IsDeviceOnlyAuthSupported = $false +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 5: Update an application using Tags parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + Tags = 'mytag' +} +Set-EntraApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +## Parameters + +### -Api + +Specifies settings for an application that implements a web API. + +```yaml +Type: ApiApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoles + +The collection of application roles that an application might declare. + +These roles can be assigned to users, groups, or service principals. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupMembershipClaims + +Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentifierUris + +Specifies identifier Uniform Resource Identifiers (URIs). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InformationalUrl + +Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. + +The terms of service and privacy statement are surfaced to users through the user consent experience. + +```yaml +Type: InformationalUrl +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsDeviceOnlyAuthSupported + +Specifies if the application supports authentication using a device token. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsFallbackPublicClient + +Specifies the fallback application type as public client, such as an installed application running on a mobile device. + +The default value is `false` that means the fallback application type is confidential client such as web app. + +There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). + +In those cases Microsoft Entra ID interprets the application type based on the value of this property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +Specifies key credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OptionalClaims + +Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. + +```yaml +Type: OptionalClaims +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentalControlSettings + +Specifies parental control settings for an application. + +```yaml +Type: ParentalControlSettings +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +Specifies password credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicClient + +Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is `false`. + +```yaml +Type: PublicClientApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequiredResourceAccess + +Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. + +This pre-configuration of required resource access drives the consent experience. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInAudience + +Specifies what Microsoft accounts are supported for the current application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Custom strings that can be used to categorize and identify the application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TokenEncryptionKeyId + +Specifies the keyId of a public key from the keyCredentials collection. + +When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. + +The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Web + +Specifies settings for a web application. + +```yaml +Type: WebApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Boolean + +### Microsoft.Open.MSGraph.Model.ApiApplication + +### Microsoft.Open.MSGraph.Model.InformationalUrl + +### Microsoft.Open.MSGraph.Model.OptionalClaims + +### Microsoft.Open.MSGraph.Model.ParentalControlSettings + +### Microsoft.Open.MSGraph.Model.PublicClientApplication + +### Microsoft.Open.MSGraph.Model.WebApplication + +### String + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] + +### System.Collections.Generic.List`1[System.String] + +### System.Nullable`1[System.Boolean] + +## Outputs + +## Notes + +## Related Links + +[Get-EntraApplication](Get-EntraApplication.md) + +[New-EntraApplication](New-EntraApplication.md) + +[Remove-EntraApplication](Remove-EntraApplication.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md new file mode 100644 index 0000000000..a029dc0470 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md @@ -0,0 +1,126 @@ +--- +title: Set-EntraApplicationLogo +description: This article provides details on the Set-EntraApplicationLogo command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationLogo + +schema: 2.0.0 +--- + +# Set-EntraApplicationLogo + +## Synopsis + +Sets the logo for an Application + +## Syntax + +### File (Default) + +```powershell +Set-EntraApplicationLogo + -ApplicationId + -FilePath + [] +``` + +### Stream + +```powershell +Set-EntraApplicationLogo + -ApplicationId + [] +``` + +### ByteArray + +```powershell +Set-EntraApplicationLogo + -ApplicationId + [] +``` + +## Description + +The `Set-EntraApplicationLogo` cmdlet is used to set the logo for an application. + +## Examples + +### Example 1: Sets the application logo for the application specified by the ApplicationId parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraApplication -Filter "DisplayName eq 'Demo Application'" +$params = @{ + ObjectId = $application.ObjectId + FilePath = 'D:\applogo.jpg' +} +Set-EntraApplicationLogo @params +``` + +This cmdlet sets the application logo for the application specified by the `-ApplicationId` parameter to the image specified with the `-FilePath` parameter. + +## Parameters + +### -FilePath + +The file path of the file that is to be uploaded as the application logo. + +```yamlset-EntraApplicationLogo +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +The ApplicationId of the Application for which the logo is set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.IO.Stream System.Byte\[\] + +## Outputs + +### System.Object + +## Notes + +File uploads must be smaller than 500KB. + +## Related Links + +[Get-EntraApplicationLogo](Get-EntraApplicationLogo.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md new file mode 100644 index 0000000000..722021d35c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md @@ -0,0 +1,111 @@ +--- +title: Set-EntraApplicationVerifiedPublisher +description: This article provides details on the Set-EntraApplicationVerifiedPublisher command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher + +schema: 2.0.0 +--- + +# Set-EntraApplicationVerifiedPublisher + +## Synopsis + +Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. + +## Syntax + +```powershell +Set-EntraApplicationVerifiedPublisher + -AppObjectId + -SetVerifiedPublisherRequest + [] +``` + +## Description + +Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. + +## Examples + +### Example 1: Set the verified publisher of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$app = Get-EntraApplication -Filter "DisplayName eq ''" +$appObjId = $app.ObjectId +$mpnId = '0433167' +$req = @{verifiedPublisherId = $mpnId} +$params = @{ + AppObjectId = $appObjId + SetVerifiedPublisherRequest = $req +} +Set-EntraApplicationVerifiedPublisher @params +``` + +This command sets the verified publisher of an application. + +The Microsoft Partner Network ID (MPNID) of the verified publisher can be obtained from the publisher's Partner Center account. + +- `-AppObjectId` parameter specifies the unique identifier of a Microsoft Entra ID Application. +- `-SetVerifiedPublisherRequest` parameter specifies the request body object containing the verifiedPublisherId property with it's the MPNID value. + +## Parameters + +### -AppObjectId + +The unique identifier of a Microsoft Entra ID Application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SetVerifiedPublisherRequest + +A request body object containing the verifiedPublisherId property it's the MPNID value. + +```yaml +Type: SetVerifiedPublisherRequest +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraApplicationVerifiedPublisher](Remove-EntraApplicationVerifiedPublisher.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md b/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md new file mode 100644 index 0000000000..b2dd1e4636 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md @@ -0,0 +1,440 @@ +--- +title: Set-EntraServicePrincipal +description: This article provides details on the Set-EntraServicePrincipal command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraServicePrincipal + +schema: 2.0.0 +--- + +# Set-EntraServicePrincipal + +## Synopsis + +Updates a service principal. + +## Syntax + +```powershell +Set-EntraServicePrincipal + -ServicePrincipalId + [-KeyCredentials ] + [-Homepage ] + [-AppId ] + [-LogoutUrl ] + [-ServicePrincipalType ] + [-AlternativeNames ] + [-PasswordCredentials ] + [-PreferredSingleSignOnMode ] + [-Tags ] + [-AccountEnabled ] + [-ServicePrincipalNames ] + [-AppRoleAssignmentRequired ] + [-DisplayName ] + [-ReplyUrls ] + [] +``` + +## Description + +The `Set-EntraServicePrincipal` cmdlet updates a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Disable the account of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AccountEnabled = $False +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `AccountEnabled` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-AccountEnabled` parameter specifies indicates whether the account is enabled. + +### Example 2: Update AppId and Homepage of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AppId = '22223333-cccc-4444-dddd-5555eeee6666' + Homepage = 'https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `AppId` and Homepage of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-AppId` parameter specifies the application ID. +- `-Homepage` parameter specifies the home page or landing page of the application. + +### Example 3: Update AlternativeNames and DisplayName of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AlternativeNames = 'Service Principal Demo' + DisplayName = 'NewName' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update AlternativeNames and DisplayName of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 4: Update LogoutUrl and ReplyUrls of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + LogoutUrl = 'https://securescore.office.com/SignOut' + ReplyUrls = 'https://admin.contoso.com' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update LogoutUrl and ReplyUrls of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-LogoutUrl` parameter specifies the sign out URL. +- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. + +### Example 5: Update ServicePrincipalType and AppRoleAssignmentRequired of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + ServicePrincipalType = 'Application' + AppRoleAssignmentRequired = $True +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `ServicePrincipalType` and `AppRoleAssignmentRequired` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-ServicePrincipalType` parameter specifies the service principal type. +- `-AppRoleAssignmentRequired` parameter specifies indicates whether an application role assignment is required. + +### Example 6: Update KeyCredentials of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential +$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') +$startdate = Get-Date -Year 2024 -Month 10 -Day 10 +$creds.StartDate = $startdate +$creds.Type = 'Symmetric' +$creds.Usage = 'Sign' +$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('A') +$creds.EndDate = Get-Date -Year 2025 -Month 12 -Day 20 +Set-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId -KeyCredentials $creds +``` + +This example demonstrates how to update KeyCredentials of a service principal in Microsoft Entra ID. + +Use the `New-EntraServicePrincipalPasswordCredential` and `Remove-EntraServicePrincipalPasswordCredential` cmdlets to update the password or secret for a servicePrincipal. + +### Example 7: Update PreferredSingleSignOnMode of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + PreferredSingleSignOnMode = 'saml' +} +Set-EntraServicePrincipal @params +``` + +This example demonstrates how to update `PreferredSingleSignOnMode` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-PreferredSingleSignOnMode` parameter specifies the single sign-on mode configured for this application. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeNames + +The alternative names for this service principal. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppId + +Specifies the application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoleAssignmentRequired + +Indicates whether an application role assignment is required. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Homepage + +Specifies the home page or landing page of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +Specifies key credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoutUrl + +Specifies the sign out URL. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Species the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredentials + +Specifies password credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredSingleSignOnMode + +Specifies the single sign-on mode configured for this application. Microsoft Entra ID uses the preferred single sign-on mode to launch the application from Microsoft 365 or the My Apps portal. The supported values are password, saml, notSupported, and oidc. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplyUrls + +The URLs that user tokens are sent to for sign in with the associated application, or the redirect Uniform Resource Identifiers that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalNames + +Specifies service principal names. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalType + +The service principal type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Specifies an array of tags. + +If you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) + +[New-EntraServicePrincipal](New-EntraServicePrincipal.md) + +[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md new file mode 100644 index 0000000000..7b5c34637f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md @@ -0,0 +1,119 @@ +--- +title: Add-EntraEnvironment +description: This article provides details on the Add-EntraEnvironment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraEnvironment + +schema: 2.0.0 +--- + +# Add-EntraEnvironment + +## Synopsis + +Adds Microsoft Entra environment to the settings file. + +## Syntax + +### Add Entra Environment Name + +```powershell +Add-EntraEnvironment + [-Name] + [-AzureADEndpoint] + [-GraphEndpoint] + [-ProgressAction ] + [-WhatIf] + [-Confirm] + [] +``` + +## Description + +Adds Microsoft Entra environment to the settings file. + +## Examples + +### Example 1: Add a user defined environment + +```powershell +$params = @{ + Name = 'Canary' + GraphEndpoint = 'https://canary.graph.microsoft.com' + AzureADEndpoint = 'https://login.microsoftonline.com' +} + +Add-EntraEnvironment @params +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Canary https://login.microsoftonline.com https://microsoftgraph.com User-defined {} +``` + +Adds a user-defined Entra environment to the settings file. + +## Parameters + +### -Name + +Specifies the name of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GraphEndpoint + +Specifies the GraphEndpoint URL of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AzueADEndpoint + +Specifies the AzureADEndpoint URL of an environment + +```yaml + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraEnvironment](Get-EntraEnvironment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md new file mode 100644 index 0000000000..1322d7b844 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md @@ -0,0 +1,583 @@ +--- +title: Connect-Entra +description: This article provides details on the Connect-Entra Command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi254 +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Connect-Entra + +schema: 2.0.0 +--- + +# Connect-Entra + +## Synopsis + +Connect to Microsoft Entra ID with an authenticated account. + +## Syntax + +### UserParameterSet (Default) + +```powershell +Connect-Entra +[[-Scopes] ] +[[-ClientId] ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-UseDeviceCode] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### AppCertificateParameterSet + +```powershell +Connect-Entra +[-ClientId] +[[-CertificateSubjectName] ] +[[-CertificateThumbprint] ] +[-Certificate ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### IdentityParameterSet + +```powershell +Connect-Entra +[[-ClientId] ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-Identity] +[-NoWelcome] +[] +``` + +### AppSecretCredentialParameterSet + +```powershell +Connect-Entra +[-ClientSecretCredential ] +[-TenantId ] +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### AccessTokenParameterSet + +```powershell +Connect-Entra +[-AccessToken] +[-Environment ] +[-ClientTimeout ] +[-NoWelcome] +[] +``` + +### EnvironmentVariableParameterSet + +```powershell +Connect-Entra +[-ContextScope ] +[-Environment ] +[-ClientTimeout ] +[-EnvironmentVariable] +[-NoWelcome] +[] +``` + +## Description + +The `Connect-Entra` cmdlet connects to Microsoft Entra ID with an authenticated account. + +Several authentication scenarios are supported based on your use case, such as delegated (interactive) and app-only (non-interactive). + +`Connect-Entra` is an alias for `Connect-MgGraph`. + +## Examples + +### Example 1: Delegated access: Connect a PowerShell session to a tenant + +```powershell +Connect-Entra +``` + +This example shows how to connect your current PowerShell session to a Microsoft Entra ID tenant using credentials. + +### Example 2: Delegated access: Connect a PowerShell session to a tenant with required scopes + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Group.ReadWrite.All' +``` + +```Output +Welcome to Microsoft Graph! + +``` + +This example shows how to authenticate to Microsoft Entra ID with scopes. + +### Example 3: Delegated access: Using an access token + +```powershell +$secureString = ConvertTo-SecureString -String $AccessToken -AsPlainText -Force +Connect-Entra -AccessToken $secureString +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example shows how to interactively authenticate to Microsoft Entra ID using an access token. + +For more information on how to get or create access token, see [Request an access token](https://learn.microsoft.com/graph/auth-v2-user#3-request-an-access-token). + +### Example 4: Delegated access: Using device code flow + +```powershell +Connect-Entra -UseDeviceCode +``` + +```Output +To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code A1B2CDEFGH to authenticate. +``` + +This example shows how to interactively authenticate to Microsoft Entra ID using device code flow. + +For more information, see [Device Code flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-device-code). + +### Example 5: App-only access: Using client credential with a Certificate thumbprint + +```powershell +$connectParams = @{ + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + ApplicationId = '00001111-aaaa-2222-bbbb-3333cccc4444' + CertificateThumbprint = 'AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00' +} + +Connect-Entra @connectParams +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example shows how to authenticate using an ApplicationId and CertificateThumbprint. + +For more information on how to get or create CertificateThumbprint, see [Authenticate with app-only access](https://learn.microsoft.com/powershell/entra-powershell/app-only-access-auth). + +### Example 6: App-only access: Using client credential with a certificate name + +```powershell +$params = @{ + ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + CertificateName = 'YOUR_CERT_SUBJECT' +} + +Connect-Entra @params +``` + +```powershell + $Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint + Connect-Entra -ClientId '' -TenantId '' -Certificate $Cert +``` + +You can find the certificate subject by running the above command. + +### Example 7: App-only access: Using client credential with a certificate + +```powershell +$Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint +$params = @{ + ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + Certificate = $Cert +} + +Connect-Entra @params +``` + +### Example 8: App-only access: Using client secret credentials + +```powershell +$ClientSecretCredential = Get-Credential -Credential '00001111-aaaa-2222-bbbb-3333cccc4444' +# Enter client_secret in the password prompt. +Connect-Entra -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -ClientSecretCredential $ClientSecretCredential +``` + +This authentication method is ideal for background interactions. + +For more information on how to get credential, see [Get-Credential](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential) command. + +### Example 9: App-only access: Using managed identity: System-assigned managed identity + +```powershell +Connect-Entra -Identity +``` + +Uses an automatically managed identity on a service instance. The identity is tied to the lifecycle of a service instance. + +### Example 10: App-only access: Using managed identity: User-assigned managed identity + +```powershell +Connect-Entra -Identity -ClientId 'User_Assigned_Managed_identity_Client_Id' +``` + +Uses a user created managed identity as a standalone Azure resource. + +### Example 11: Connecting to an environment as a different identity + +```powershell +Connect-Entra -ContextScope 'Process' +``` + +```Output +Welcome to Microsoft Graph! +``` + +To connect as a different identity other than CurrentUser, specify the ContextScope parameter with the value Process. + +For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/microsoft.graph.entra/get-entracontext) command. + +### Example 12: Connecting to an environment or cloud + +```powershell +Get-EntraEnvironment +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in +USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in +``` + +```powershell +Connect-Entra -Environment 'Global' +``` + +When you use Connect-Entra, you can choose to target other environments. By default, Connect-Entra targets the global public cloud. + +### Example 13: Sets the HTTP client timeout in seconds + +```powershell + Connect-Entra -ClientTimeout 60 +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example Sets the HTTP client timeout in seconds. + +### Example 14: Hides the welcome message + +```powershell +Connect-Entra -NoWelcome +``` + +This example hides the welcome message. + +### Example 15: Allows for authentication using environment variables + +```powershell +Connect-Entra -EnvironmentVariable +``` + +This example allows for authentication using environment variables. + +## Parameters + +### -CertificateThumbprint + +Specifies the certificate thumbprint of a digital public key X.509 certificate of a user account that has permission to perform this action. + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientId + +Specifies the application ID of the service principal. + +```yaml +Type: System.String +Parameter Sets: UserParameterSet, IdentityParameterSet +Aliases: AppId, ApplicationId + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: AppId, ApplicationId + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the ID of a tenant. + +If you don't specify this parameter, the account is authenticated with the home tenant. + +You must specify the TenantId parameter to authenticate as a service principal or when using Microsoft account. + +```yaml +Type: System.String +Parameter Sets: UserParameterSet, AppCertificateParameterSet, AppSecretCredentialParameterSet +Aliases: Audience, Tenant + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AccessToken + +Specifies a bearer token for Microsoft Entra service. Access tokens do time out and you have to handle their refresh. + +```yaml +Type: SecureString +Parameter Sets: AccessTokenParameterSet +Aliases: +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientTimeout + +Sets the HTTP client timeout in seconds. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContextScope + +Determines the scope of authentication context. This ContextScope accepts `Process` for the current process, or `CurrentUser` for all sessions started by user. + +```yaml +Type: ContextScope +Accepted values: Process, CurrentUser +Parameter Sets: UserParameterSet, AppCertificateParameterSet, IdentityParameterSet, AppSecretCredentialParameterSet, EnvironmentVariableParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Environment + +The name of the national cloud environment to connect to. By default global cloud is used. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EnvironmentName, NationalCloud +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWelcome + +Hides the welcome message. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scopes + +An array of delegated permissions to consent to. + +```yaml +Type: System.String[] +Parameter Sets: UserParameterSet +Aliases: +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseDeviceCode + +Use device code authentication instead of a browser control. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UserParameterSet +Aliases: UseDeviceAuthentication, DeviceCode, DeviceAuth, Device +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Certificate + +An X.509 certificate supplied during invocation. + +```yaml +Type: X509Certificate2 +Parameter Sets: AppCertificateParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSubjectName + +The subject distinguished name of a certificate. The certificate is retrieved from the current user's certificate store. + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: CertificateSubject, CertificateName +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecretCredential + +The PSCredential object provides the application ID and client secret for service principal credentials. For more information about the PSCredential object, type Get-Help Get-Credential. + +```yaml +Type: PSCredential +Parameter Sets: AppSecretCredentialParameterSet +Aliases: SecretCredential, Credential +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnvironmentVariable + +Allows for authentication using environment variables configured on the host machine. See + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: EnvironmentVariableParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Identity + +Sign-in using a managed identity + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: IdentityParameterSet +Aliases: ManagedIdentity, ManagedServiceIdentity, MSI +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction + +The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break. + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Disconnect-Entra](Disconnect-Entra.md) \ No newline at end of file diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md new file mode 100644 index 0000000000..4cf9324306 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md @@ -0,0 +1,78 @@ +--- +title: Disconnect-Entra +description: This article provides details on the Disconnect-Entra Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Disconnect-Entra + +schema: 2.0.0 +--- + +# Disconnect-Entra + +## Synopsis + +Disconnects the current session from a Microsoft Entra ID tenant. + +## Syntax + +```powershell +Disconnect-Entra + [] +``` + +## Description + +The Disconnect-Entra cmdlet disconnects the current session from a Microsoft Entra ID tenant. + +## Examples + +### Example 1: Disconnect your session from a tenant + +```powershell + Disconnect-Entra +``` + +```output +ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 +TenantId : bbbbcccc-1111-dddd-2222-eeee3333ffff +Scopes : {Agreement.ReadWrite.All, CustomSecAttributeDefinition.ReadWrite.All, TeamMember.Read.All...} +AuthType : AppOnly +TokenCredentialType : ClientCertificate +CertificateThumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00 +CertificateSubjectName : +Account : +AppName : MG_graph_auth +ContextScope : Process +Certificate : +PSHostVersion : 5.1.22621.2506 +ManagedIdentityId : +ClientSecret : +Environment : Global +``` + +This command disconnects your session from a tenant. + +## Parameters + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Connect-Entra](Connect-Entra.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md new file mode 100644 index 0000000000..8ef326b326 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md @@ -0,0 +1,239 @@ +--- +title: Find-EntraPermission +description: This article provides details on the Find-EntraPermission command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Find-EntraPermission + +schema: 2.0.0 +--- + +# Find-EntraPermission + +## Synopsis + +Helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. + +## Syntax + +### Search + +```powershell +Find-EntraPermission + [-SearchString] + [-ExactMatch] + [-PermissionType ] + [-Online] + [-ProgressAction ] + [] +``` + +### All + +```powershell +Find-EntraPermission + [-PermissionType ] + [-Online] + [-All] + [-ProgressAction ] + [] +``` + +## Description + +The `Find-EntraPermission` cmdlet helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. + +## Examples + +### Example 1: Get a list of all Application permissions + +```powershell +Find-EntraPermission application +``` + +```Output +PermissionType: Delegated + +Id Consent Name Description +-- ------- ---- ----------- +c79f8feb-a9db-4090-85f9-90d820caa0eb Admin Application.Read.All Allows the app to read applications and service principals on behalf of the signed-in user. +bdfbf15f-ee85-4955-8675-146e8e5296b5 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. + +PermissionType: Application + +Id Consent Name Description +-- ------- ---- ----------- +9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 Admin Application.Read.All Allows the app to read all applications and service principals without a signed-in user. +1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals without a signed-in user. Does not allow management of consent grants. +18a4783c-866b-4cc7-a460-3d5e5662c884 Admin Application.ReadWrite.OwnedBy Allows the app to create other applications, and fully manage those applications (read, update, update application secrets and delete), without a signed-in user... +``` + +### Example 2. Get a list of permissions for the Read permissions + +```powershell +Find-EntraPermission application.Read | Format-List +``` + +```Output +Id : c79f8feb-a9db-4090-85f9-90d820caa0eb +PermissionType : Delegated +Consent : Admin +Name : Application.Read.All +Description : Allows the app to read applications and service principals on behalf of the signed-in user. + +Id : bdfbf15f-ee85-4955-8675-146e8e5296b5 +PermissionType : Delegated +Consent : Admin +Name : Application.ReadWrite.All +Description : Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. + +Id : 9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 +PermissionType : Application +Consent : Admin +Name : Application.Read.All +Description : Allows the app to read all applications and service principals without a signed-in user. +``` + +### Example 3. Search for permissions with exact match + +```powershell +Find-EntraPermission -SearchString 'User.Read.All' -ExactMatch +``` + +```Output + PermissionType: Delegated + +Id Consent Name Description +-- ------- ---- ----------- +a154be20-db9c-4678-8ab7-66f6cc099a59 Admin User.Read.All Allows the app to read the full set of profile properties, reports, and ma… + + PermissionType: Application + +Id Consent Name Description +-- ------- ---- ----------- +df021288-bdef-4463-88db-98f22de89214 Admin User.Read.All Allows the app to read user profiles without a signed in user. +``` + +This example demonstrates how to search for permissions that exactly match a specified permission name. + +### Example 4. Get all permissions of the specified type + +```powershell +Find-EntraPermission -PermissionType 'Delegated' +``` + +```Output +Id Consent Name Description +-- ------- ---- ----------- +ebfcd32b-babb-40f4-a14b-42706e83bd28 Admin AccessReview.Read.All Allows the app to read access re… +e4aa47b9-9a69-4109-82ed-36ec70d85ff1 Admin AccessReview.ReadWrite.All Allows the app to read, update, … +5af8c3f5-baca-439a-97b0-ea58a435e269 Admin AccessReview.ReadWrite.Membership Allows the app to read, +``` + +This example shows how to get all permissions of a specified type, for example, `Delegated` or `Application` permissions. + +## Parameters + +### -SearchString + +Specifies the filter for the permissions, for example, domain and scope. + +```yaml + +Type: System.String +Required: True +Position: Named +Default value: None +Accept pipeline input: True +Accept wildcard characters: False +``` + +### -All + +Sets if the cmdlet returns all parameters. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExactMatch + +Sets if Search String should be an exact match. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Online + +Use the -Online parameter with -SearchString in Find-MgGraphPermission to fetch the latest permissions from Microsoft Graph before searching. This ensures Find-MgGraphPermission returns accurate results by including any new permissions added for recent APIs. The command uses the existing Microsoft Graph connection established by Connect-MgGraph. If your connection lacks permissions to access this data or if there’s no network connectivity, the command fails. Once updated, Find-MgGraphPermission will continue using the refreshed permission list for future searches, even without the -Online parameter. + +```yaml + +Type: System.Management.Automation.SwitchParameter +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionType + +Specifies the type of Permission, for example, Delegated or Application. + +```yaml + +Type: System.String +Required: False +Position: Named +Default value: Any +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction + +Specifics the progra option. + +```yaml +Type: System.Management.Automation.SwitchParameter +Aliases: progra +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md new file mode 100644 index 0000000000..86085f8469 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md @@ -0,0 +1,130 @@ +--- +title: Get-EntraContext +description: This article provides details on the Get-EntraContext command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContext + +schema: 2.0.0 +--- + +# Get-EntraContext + +## Synopsis + +Retrieve information about your current session + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContext + [-ProgressAction ] + [] +``` + +## Description + +`Get-EntraContext` is used to retrieve the details about your current session, which include: + +- ClientID +- TenantID +- Certificate Thumbprint +- Scopes consented to +- AuthType: Delegated or app-only +- AuthProviderType +- CertificateName +- Account +- AppName +- ContextScope +- Certificate +- PSHostVersion +- ClientTimeOut. + +`Get-EntraCurrentSessionInfo` is an alias for `Get-EntraContext`. + +## Examples + +### Example 1: Get the current session + +```powershell +Get-EntraContext +``` + +```Output +ClientId : 11112222-bbbb-3333-cccc-4444dddd5555 +TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee +CertificateThumbprint : +Scopes : {User.ReadWrite.All,...} +AuthType : Delegated +AuthProviderType : InteractiveAuthenticationProvider +CertificateName : +Account : SawyerM@Contoso.com +AppName : Microsoft Graph PowerShell +ContextScope : CurrentUser +Certificate : +PSHostVersion : 5.1.17763.1 +ClientTimeout : 00:05:00 +``` + +This example demonstrates how to retrieve the details of the current session. + +### Example 2: Get the current session scopes + +```powershell +Get-EntraContext | Select -ExpandProperty Scopes +``` + +```Output +AppRoleAssignment.ReadWrite.All +Directory.AccessAsUser.All +EntitlementManagement.ReadWrite.All +Group.ReadWrite.All +openid +Organization.Read.All +profile +RoleManagement.ReadWrite.Directory +User.Read +User.ReadWrite.All +``` + +Retrieves all scopes. + +## Parameters + +### -ProgressAction + +Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md new file mode 100644 index 0000000000..c5cf3a9139 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md @@ -0,0 +1,108 @@ +--- +title: Get-EntraEnvironment +description: This article provides details on the Get-EntraEnvironment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraEnvironment + +schema: 2.0.0 +--- + +# Get-EntraEnvironment + +## Synopsis + +Gets global public Environments. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraEnvironment + [] +``` + +### GetByName + +```powershell +Get-EntraEnvironment + -Name + [] +``` + +## Description + +When you use `Connect-Entra`, you can choose to target other environments. By default, `Connect-Entra` targets the global public cloud. + +## Examples + +### Example 1: Get a list of public cloud environments + +```powershell +Get-EntraEnvironment +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in +USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in +USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in +Germany https://login.microsoftonline.de https://graph.microsoft.de Built-in +Canary https://login.microsoftonline.com https://canary.graph.microsoft.com User-defined +``` + +This command retrieves a list of global public Environments. + +### Example 2: Get a specific environment created + +```powershell +Get-EntraEnvironment -Name 'Global' +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +``` + +This command retrieves an environment with the specified name. + +## Parameters + +### -Name + +Specifies the name of an environment + +```yaml + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraEnvironment](Add-EntraEnvironment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md new file mode 100644 index 0000000000..2017e7aa8a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md @@ -0,0 +1,79 @@ +--- +title: Reset-EntraStrongAuthenticationMethodByUpn +description: This article provides details on the Reset-EntraStrongAuthenticationMethodByUpn command. + + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn + +schema: 2.0.0 +--- + +# Reset-EntraStrongAuthenticationMethodByUpn + +## Synopsis + +Resets the strong authentication method using the User Principal Name (UPN). + +## Syntax + +```powershell +Reset-EntraStrongAuthenticationMethodByUpn + -UserPrincipalName + [] +``` + +## Description + +The `Reset-EntraStrongAuthenticationMethodByUpn` cmdlet resets the strong authentication method by using the User Principal Name (UPN). + +## Examples + +### Example 1: Resets the strong authentication method by using the User Principal Name + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite', 'UserAuthenticationMethod.ReadWrite.All' +Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'SawyerM@contoso.com' +``` + +This example demonstrates how to reset the strong authentication method by using the User Principal Name (UPN). + +- `-UserPrincipalName` parameter specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. + +## Parameters + +### -UserPrincipalName + +Specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md new file mode 100644 index 0000000000..3a375cf615 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md @@ -0,0 +1,73 @@ +--- +title: Revoke-EntraSignedInUserAllRefreshToken +description: This article provides details on the Revoke-EntraSignedInUserAllRefreshToken command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken + +schema: 2.0.0 +--- + +# Revoke-EntraSignedInUserAllRefreshToken + +## Synopsis + +Invalidates the refresh tokens issued to applications for the current user. + +## Syntax + +```powershell +Revoke-EntraSignedInUserAllRefreshToken + [] +``` + +## Description + +The `Revoke-EntraSignedInUserAllRefreshToken` cmdlet invalidates all the refresh tokens issued to applications for a user (and session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. + +The user or an administrator typically performs this operation if the user's device is lost or stolen. This action prevents access to the organization's data on the device by requiring the user to sign in again to all previously consented applications, regardless of the device. + +Note: If the application attempts to redeem a delegated access token for this user using an invalidated refresh token, the application receives an error. When this happens, the application needs to acquire a new refresh token by making a request to the authorized endpoint, which forces the user to sign in. + +After you run this command, a small delay of a few minutes can occur before tokens are revoked. + +## Examples + +### Example 1: Revoke refresh tokens for the current user + +```powershell +Connect-Entra -Scopes 'User.RevokeSessions.All' +Revoke-EntraSignedInUserAllRefreshToken +``` + +```Output +Value +----- +True +``` + +This command revokes the tokens for the current user. + +## Parameters + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Revoke-EntraUserAllRefreshToken](Revoke-EntraUserAllRefreshToken.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md new file mode 100644 index 0000000000..364ce1fa3a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md @@ -0,0 +1,90 @@ +--- +title: Revoke-EntraUserAllRefreshToken +description: This article provides details on the Revoke-EntraUserAllRefreshToken command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken +schema: 2.0.0 +--- + +# Revoke-EntraUserAllRefreshToken + +## Synopsis + +Invalidates the refresh tokens issued to applications for a user. + +## Syntax + +```powershell +Revoke-EntraUserAllRefreshToken + -UserId + [] +``` + +## Description + +The `Revoke-EntraUserAllRefreshToken` cmdlet invalidates the refresh tokens issued to applications for a user. + +The cmdlet also invalidates tokens issued to session cookies in a browser for the user. + +The cmdlet operates by resetting the refreshTokensValidFromDateTime user property to the current date and time. + +This operation is usually performed by the user or an administrator if the user's device is lost or stolen. It blocks access to the organization's data by requiring the user to sign in again to all previously authorized applications, regardless of the device. + +## Examples + +### Example 1: Revoke refresh tokens for a user + +```powershell +Connect-Entra -Scopes 'User.RevokeSessions.All' +Revoke-EntraUserAllRefreshToken -UserId 'SawyerM@contoso.com' +``` + +```Output +Value +----- +True +``` + +This example demonstrates how to revoke the tokens for the specified user. + +- `-UserId` parameter specifies the unique identifier of a user. + +## Parameters + +### -UserId + +Specifies the unique ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Revoke-EntraSignedInUserAllRefreshToken](Revoke-EntraSignedInUserAllRefreshToken.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..7049899b74 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md @@ -0,0 +1,111 @@ +--- +title: Add-EntraAdministrativeUnitMember +description: This article provides details on the Add-EntraAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Add-EntraAdministrativeUnitMember + +## Synopsis + +Adds an administrative unit member. + +## Syntax + +```powershell +Add-EntraAdministrativeUnitMember + -RefObjectId + -AdministrativeUnitId + [] +``` + +## Description + +The `Add-EntraAdministrativeUnitMember` cmdlet adds a Microsoft Entra ID administrative unit member. + +Administrative units enable more granular management of permissions and access, particularly in large organizations or where administrative responsibilities are divided across departments or regions. + +To add a user, group, or device to an administrative unit, the calling principal must be assigned at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add user as an administrative unit member + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraAdministrativeUnitMember @params +``` + +This example shows how to add an administrative unit member. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit ID. You can use the command `Get-EntraUser` to get user ID. + +- `AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `RefObjectId` parameter specifies the ID of the user or group you want to add as a member of the administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of a Microsoft Entra ID administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the unique ID of the specific Microsoft Entra ID object that are as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) + +[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..59f40bdbf9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,139 @@ +--- +title: Add-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Add-EntraCustomSecurityAttributeDefinitionAllowedValue command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue +schema: 2.0.0 +--- + +# Add-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Adds a predefined value for a custom security attribute definition. + +## Syntax + +```powershell +Add-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + -Id + -IsActive + [] +``` + +## Description + +The `Add-EntraCustomSecurityAttributeDefinitionAllowedValue` adds a predefined value for a Microsoft Entra ID custom security attribute definition. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a predefined value for a Microsoft Entra ID custom security attribute definition + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinitionId = (Get-EntraCustomSecurityAttributeDefinition -Id '').Id +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinitionId + Id = 'Alpine' + IsActive = $true +} +Add-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output + +Id IsActive +-- -------- +Alpine True +``` + +This example adds a predefined value to a custom security attribute definition. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use the command `Get-EntraCustomSecurityAttributeDefinition` to get the ID. +- `-Id` parameter specifies the identifier for the predefined value. +- `-IsActive` parameter specifies the predefined value is active or deactivated. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier for a custom security attribute definition in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters aren't. This identifier is case sensitive, can't be changed later, and is required. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsActive + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any another supported directory objects. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Add-EntraCustomSecurityAttributeDefinitionAllowedValues` is an alias for `Add-EntraCustomSecurityAttributeDefinitionAllowedValue`. + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..b0f4c794f1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md @@ -0,0 +1,107 @@ +--- +title: Add-EntraDeviceRegisteredOwner +description: This article provides details on the Add-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Add-EntraDeviceRegisteredOwner + +## Synopsis + +Adds a registered owner for a device. + +## Syntax + +```powershell +Add-EntraDeviceRegisteredOwner + -DeviceId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDeviceRegisteredOwner` cmdlet adds a registered owner for a Microsoft Entra ID device. + +## Examples + +### Example 1: Add a user as a registered user + +```powershell +Connect-Entra -Scopes 'Device.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$Device = Get-EntraDevice -SearchString '' +$params = @{ + DeviceId = $Device.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraDeviceRegisteredOwner @params +``` + +This example shows how to add a registered user to a device. + +- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. + +- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. + +## Parameters + +### -DeviceId + +Specifies the object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Active Directory object to add. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) + +[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..354cbf34c6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md @@ -0,0 +1,112 @@ +--- +title: Add-EntraDeviceRegisteredUser +description: This article provides details on the Add-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Add-EntraDeviceRegisteredUser + +## Synopsis + +Adds a registered user for a device. + +## Syntax + +```powershell +Add-EntraDeviceRegisteredUser + -DeviceId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDeviceRegisteredUser` cmdlet adds a registered user for a Microsoft Entra ID device. + +## Examples + +### Example 1: Add a user as a registered user + +```powershell +Connect-Entra -Scopes 'Device.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@contoso.com' +$Device = Get-EntraDevice -SearchString '' +$params = @{ + DeviceId = $Device.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraDeviceRegisteredUser @params +``` + +This example shows how to add a registered user to a device. + +- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. + +- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. + +## Parameters + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..d163b40171 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md @@ -0,0 +1,104 @@ +--- +title: Add-EntraDirectoryRoleMember +description: This article provides details on the Add-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Add-EntraDirectoryRoleMember + +## Synopsis + +Adds a member to a directory role. + +## Syntax + +```powershell +Add-EntraDirectoryRoleMember + -DirectoryRoleId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraDirectoryRoleMember` cmdlet adds a member to a Microsoft Entra ID role. + +## Examples + +### Example 1: Add a member to a Microsoft Entra ID role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$params = @{ + DirectoryRoleId = '019ea7a2-1613-47c9-81cb-20ba35b1ae48' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Add-EntraDirectoryRoleMember @params +``` + +This example adds a member to a directory role. + +- `DirectoryRoleId` parameter specifies the ID of the directory role to which the member is added. Use the Get-EntraDirectoryRole command to retrieve the details of the directory role. +- `RefObjectId` parameter specifies the ID of Microsoft Entra ID object to assign as owner/manager/member. + +## Parameters + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) + +[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..2919fc8285 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md @@ -0,0 +1,135 @@ +--- +title: Add-EntraScopedRoleMembership +description: This article provides details on the Add-EntraScopedRoleMembership command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Add-EntraScopedRoleMembership + +## Synopsis + +Assign a Microsoft Entra role with an administrative unit scope. + +## Syntax + +```powershell +Add-EntraScopedRoleMembership + -AdministrativeUnitId + [-RoleObjectId ] + [-RoleMemberInfo ] + [] +``` + +## Description + +The `Add-EntraScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership. + +For delegated scenarios, the calling user needs at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add a scoped role membership to an administrative unit + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$User = Get-EntraUser -SearchString 'MarkWood' +$Role = Get-EntraDirectoryRole -Filter "DisplayName eq ''" +$Unit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo +$RoleMember.ObjectId = $User.ObjectId +$params = @{ + AdministrativeUnitId = $Unit.ObjectId + RoleObjectId = $Role.ObjectId + RoleMemberInfo = $RoleMember +} +Add-EntraScopedRoleMembership @params +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +The example shows how to add a user to the specified role within the specified administrative unit. + +- `-AdministrativeUnitId` Parameter specifies the ID of an administrative unit. +- `-RoleObjectId` Parameter specifies the ID of a directory role. +- `-RoleMemberInfo` Parameter specifies a RoleMemberInfo object. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RoleMemberInfo + +Specifies a RoleMemberInfo object. + +```yaml +Type: System.RoleMemberInfo +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleObjectId + +Specifies the ID of a directory role. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) + +[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md new file mode 100644 index 0000000000..da02de22be --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md @@ -0,0 +1,112 @@ +--- +title: Confirm-EntraDomain +description: This article provides details on the Confirm-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Confirm-EntraDomain + +schema: 2.0.0 +--- + +# Confirm-EntraDomain + +## Synopsis + +Validate the ownership of a domain. + +## Syntax + +```powershell +Confirm-EntraDomain + -Name + [-CrossCloudVerificationCode ] + [] +``` + +## Description + +The `Confirm-EntraDomain` cmdlet validates the ownership of a Microsoft Entra ID domain. + +The work or school account needs to belong to at least the **Domain Name Administrator** Microsoft Entra role. + +## Examples + +### Example 1: Confirm the domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Confirm-EntraDomain -Name Contoso.com +``` + +This example verifies a domain and updates its status to `verified`. + +### Example 2: Confirm the domain with a cross cloud verification code + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Confirm-EntraDomain -Name Contoso.com -CrossCloudVerificationCode ms84324896 +``` + +This example confirms a domain in dual federation scenarios. + +## Parameters + +### -Name + +Specifies the name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -CrossCloudVerificationCode + +The cross-cloud domain verification code. + +```yaml +Type: CrossCloudVerificationCodeBody +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md new file mode 100644 index 0000000000..f1d4bcccd1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md @@ -0,0 +1,96 @@ +--- +title: Enable-EntraDirectoryRole +description: This article provides details on the Enable-EntraDirectoryRole command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraDirectoryRole + +schema: 2.0.0 +--- + +# Enable-EntraDirectoryRole + +## Synopsis + +Activates an existing directory role in Microsoft Entra ID. + +## Syntax + +```powershell +Enable-EntraDirectoryRole + [-RoleTemplateId ] + [] +``` + +## Description + +The `Enable-EntraDirectoryRole` cmdlet activates an existing directory role in Microsoft Entra ID. + +The Company Administrators and the default user directory roles (User, Guest User, and Restricted Guest User) are activated by default. To access and assign members to other directory roles, you must first activate them using their corresponding directory role template ID. + +## Examples + +### Example 1: Enable a directory role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$InviterRole = Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Guest Inviter'} +Enable-EntraDirectoryRole -RoleTemplateId $InviterRole.ObjectId +``` + +```Output +DeletedDateTime Id Description DisplayName RoleTemplateId +--------------- -- ----------- ----------- -------------- + b5baa59b-86ab-4053-ac3a-0396116d1924 Guest Inviter has access to invite guest users. Guest Inviter 92ed04bf-c94a-4b82-9729-b799a7a4c178 +``` + +The example shows how to enable the directory role. + +You can use `Get-EntraDirectoryRoleTemplate` to fetch a specific directory role to activate. + +- `RoleTemplateId` parameter specifies the ID of the role template to enable. + +## Parameters + +### -RoleTemplateId + +The ID of the Role template to enable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For additional details see [Activate directoryRole](/graph/api/directoryrole-post-directoryroles). + +## Related Links + +[Get-EntraDirectoryRole](Get-EntraDirectoryRole.md) + +[Get-EntraDirectoryRoleTemplate](Get-EntraDirectoryRoleTemplate.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md new file mode 100644 index 0000000000..9271fdef45 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md @@ -0,0 +1,72 @@ +--- +title: Get-CrossCloudVerificationCode +description: This article provides details on the Get-CrossCloudVerificationCode command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode + +schema: 2.0.0 +--- + +# Get-CrossCloudVerificationCode + +## Synopsis +Gets the verification code used to validate the ownership of the domain in another connected cloud. +Important: Only applies to a verified domain. + +## Syntax + +```powershell +Get-CrossCloudVerificationCode + -Name + [] +``` + +## Description + +## Examples + +### Example 1: Get the cross cloud verification code +```powershell +PS C:\>Get-CrossCloudVerificationCode -Name Contoso.com +``` + +This command returns a string that can be used to enable cross cloud federation scenarios. + +## Parameters + +### -Name +Specifies the name of a domain. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.GetCrossCloudVerificationCodeResponse +## Notes + +## RELATED LINKS \ No newline at end of file diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md new file mode 100644 index 0000000000..d6e6628eca --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md @@ -0,0 +1,117 @@ +--- +title: Get-EntraAccountSku +description: This article provides details on the Get-EntraAccountSku command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAccountSku + +schema: 2.0.0 +--- + +# Get-EntraAccountSku + +## Synopsis + +Retrieves all the SKUs for a company. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAccountSku + [] +``` + +### GetById + +```powershell +Get-EntraAccountSku + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraAccountSku` retrieves the list of commercial subscriptions acquired by an organization. + +For a list of license names in the Microsoft Entra or Microsoft 365 admin centers and their corresponding Microsoft Graph `skuId` and `skuPartNumber` properties, refer to the [mapping information](https://learn.microsoft.com/entra/identity/users/licensing-service-plan-reference). + +## Examples + +### Example 1: Gets a list of SKUs + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraAccountSku +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… +ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… +dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… +``` + +This command returns a list of SKUs. + +### Example 2: Gets a list of SKUs by TenantId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraAccountSku -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… +ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… +dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… +``` + +This command returns a list of SKUs for a specified tenant. + +- `-TenantId` parameter specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this isn't provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..0c85fb6da1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md @@ -0,0 +1,237 @@ +--- +title: Get-EntraAdministrativeUnit +description: This article provides details on the Get-EntraAdministrativeUnit command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit +schema: 2.0.0 +--- + +# Get-EntraAdministrativeUnit + +## Synopsis + +Gets an administrative unit. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAdministrativeUnit + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraAdministrativeUnit + -AdministrativeUnitId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraAdministrativeUnit` cmdlet gets a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameter to get a specific administrative unit. + +## Examples + +### Example 1: Get all administrative units + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName + cccccccc-2222-3333-4444-dddddddddddd testdemo test1 + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 +``` + +This command gets all the administrative units. + +### Example 2: Get all administrative units using '-All' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -All +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName + cccccccc-2222-3333-4444-dddddddddddd testdemo test1 + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 +``` + +This command gets all the administrative units. + +### Example 3: Get a specific administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -AdministrativeUnitId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName +``` + +This example returns the details of the specified administrative unit. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 4: Get administrative units filter by display name + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -Filter "DisplayName eq 'DAU-Test'" +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test +``` + +This example list of administrative units containing display name with the specified name. + +### Example 5: Get top one administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraAdministrativeUnit -Top 1 +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test +``` + +This example returns the specified top administrative units. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter filters which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..99c4fe82d9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md @@ -0,0 +1,193 @@ +--- +title: Get-EntraAdministrativeUnitMember +description: This article provides details on the Get-EntraAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Get-EntraAdministrativeUnitMember + +## Synopsis + +Gets a member of an administrative unit. + +## Syntax + +```powershell +Get-EntraAdministrativeUnitMember + -AdministrativeUnitId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraAdministrativeUnitMember` cmdlet gets a member of a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameters to retrieve an administrative unit member. + +In delegated scenarios with work or school accounts, the signed-in user must either be a member user or be assigned a supported Microsoft Entra role, or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: + +- Directory Readers: Read basic properties on administrative units +- Global Reader: Read all properties of administrative units, including members +- Privileged Role Administrator: Create and manage administrative units (including members) + +## Examples + +### Example 1: Get an administrative unit member by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example returns the list of administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 2: Get all administrative unit members by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example returns the list of all administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 3: Get top three administrative unit members by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example returns top three administrative unit members from specified administrative unit AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) + +[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md new file mode 100644 index 0000000000..7b235ab88d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md @@ -0,0 +1,143 @@ +--- +title: Get-EntraAttributeSet +description: This article provides details on the Get-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAttributeSet + +schema: 2.0.0 +--- + +# Get-EntraAttributeSet + +## Synopsis + +Gets a list of attribute sets. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAttributeSet + [] +``` + +### GetById + +```powershell +Get-EntraAttributeSet + -AttributeSetId + [] +``` + +## Description + +The `Get-EntraAttributeSet` cmdlet gets a list of Microsoft Entra ID attribute sets. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The supported roles for this operation are: + +- Attribute Assignment Reader +- Attribute Definition Reader +- Attribute Assignment Administrator +- Attribute Definition Administrator + +By default, other administrator roles cannot read, define, or assign custom security attributes. + +## Examples + +### Example 1: Get an all attribute sets + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraAttributeSet +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Engineering Attributes for cloud engineering team 25 +Contoso Attributes for Contoso 25 +``` + +This example returns all attribute sets. + +### Example 2: Get an attribute sets + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraAttributeSet -AttributeSetId 'Testing' +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Testing Attributes for engineering team 10 +``` + +This example demonstrates how to retrieve an attribute set by Id. + +- `AttributeSetId` parameter specifies the unique identifier for the attribute set within a tenant. + +## Parameters + +### -AttributeSetId + +Unique identifier for the attribute set within a tenant. + +This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraAttributeSet](New-EntraAttributeSet.md) + +[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md new file mode 100644 index 0000000000..fb0bcb0cb5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md @@ -0,0 +1,236 @@ +--- +title: Get-EntraContact +description: This article provides details on the Get-EntraContact command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContact + +schema: 2.0.0 +--- + +# Get-EntraContact + +## Synopsis + +Gets a contact from Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContact + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraContact + -OrgContactId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContact` cmdlet gets a contact from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve all contact objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves all contact objects in the directory. + +### Example 2: Retrieve specific contact object in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -OrgContactId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +``` + +This example retrieves specified contact in the directory. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 3: Retrieve all contacts objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -All +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves all the contacts in the directory. + +### Example 4: Retrieve top two contacts objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -Top 2 +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +``` + +This example retrieves top two contacts in the directory. + +### Example 5: Retrieve all contacts objects in the directory filter by DisplayName + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves contacts having the specified display name. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraContact](Remove-EntraContact.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md new file mode 100644 index 0000000000..5ba96a392d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md @@ -0,0 +1,159 @@ +--- +title: Get-EntraContactDirectReport +description: This article provides details on the Get-EntraContactDirectReport command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactDirectReport + +schema: 2.0.0 +--- + +# Get-EntraContactDirectReport + +## Synopsis + +Get the direct reports for a contact. + +## Syntax + +```powershell +Get-EntraContactDirectReport + -OrgContactId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactDirectReport` cmdlet gets the direct reports for a contact. + +## Examples + +### Example 1: Get the direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId +``` + +This example shows how to retrieve direct reports for an organizational contact. + +You can use the command `Get-EntraBetaContact` to get organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 2: Get all direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -All +``` + +This example shows how to retrieve all direct reports for an organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 3: Get top two direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -Top 2 +``` + +This example shows how to retrieve top two direct reports for an organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md new file mode 100644 index 0000000000..9aba156048 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md @@ -0,0 +1,98 @@ +--- +title: Get-EntraContactManager +description: This article provides details on the Get-EntraContactManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactManager + +schema: 2.0.0 +--- + +# Get-EntraContactManager + +## Synopsis + +Gets the manager of a contact. + +## Syntax + +```powershell +Get-EntraContactManager + -OrgContactId + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactManager` cmdlet gets the manager of a contact in Microsoft Entra ID. + +## Examples + +### Example 1: Get the manager of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Top 1 +Get-EntraContactManager -OrgContactId $Contact.ObjectId +``` + +The example demonstrates how to retrieve the manager of a contact. You can use the command `Get-EntraContact` to get organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +## Parameters + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: OrgContactId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md new file mode 100644 index 0000000000..e09631eec8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraContactMembership +description: This article provides details on the Get-EntraContactMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactMembership + +schema: 2.0.0 +--- + +# Get-EntraContactMembership + +## Synopsis + +Get a contact membership. + +## Syntax + +```powershell +Get-EntraContactMembership + -OrgContactId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContactMembership` cmdlet gets a contact membership in Microsoft Entra ID. + +This command is useful to administrators who need to understand which groups, roles, or administrative units a particular contact belongs to. This can be important for troubleshooting access issues, auditing memberships, and ensuring that contact memberships are correctly configured. + +## Examples + +### Example 1: Get the memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This command gets all the memberships for specified contact. + +### Example 2: Get all memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This command gets all the memberships for specified contact. + +### Example 3: Get top two memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraContactMembership -OrgContactId $Contact.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +``` + +This command gets top two memberships for specified contact. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md new file mode 100644 index 0000000000..ab173d765b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md @@ -0,0 +1,150 @@ +--- +title: Get-EntraContactThumbnailPhoto +description: This article provides details on the Get-EntraContactThumbnailPhoto command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto + +schema: 2.0.0 +--- + +# Get-EntraContactThumbnailPhoto + +## Synopsis + +Retrieves the thumbnail photo of a contact. + +## Syntax + +```powershell +Get-EntraContactThumbnailPhoto + -ObjectId + [-FilePath ] + [-FileName ] + [-View ] + [] +``` + +## Description + +Retrieves the thumbnail photo of a contact. + +## Examples + +### Example 1: Get the memberships of a contact + +```powershell +Connect-Entra -Scopes 'Contacts.Read' +Get-EntraContactThumbnailPhoto -ObjectId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```output +Tag : +PhysicalDimension : {Width=279, Height=390} +Size : {Width=279, Height=390} +Width : 279 +Height : 390 +HorizontalResolution : 96 +VerticalResolution : 96 +Flags : 77840 +RawFormat : [ImageFormat: aaaa0000-bb11-2222-33cc-444444dddddd] +PixelFormat : Format24bppRgb +Palette : System.Drawing.Imaging.ColorPalette +FrameDimensionsList : {eeee4444-ff55-6666-77aa-888888bbbbbb} +PropertyIdList : {274, 305, 306, 36867...} +PropertyItems : {274, 305, 306, 36867...} +``` + +This example retrieves the thumbnail photo of the contact object specified with the object ID parameter. + +## Parameters + +### -FileName + +When provided, the cmdlet writes a copy of the thumbnail photo to this filename. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FilePath + +When provided, the cmdlet writes a copy of the thumbnail photo to this file path using a random filename. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +The object ID of the contact for which the thumbnail photo is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -View + +If this parameter value is set to $True, display the retrieved thumbnail photo in a new window. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Boolean + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md new file mode 100644 index 0000000000..c65dae7c2b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md @@ -0,0 +1,195 @@ +--- +title: Get-EntraContract +description: This article provides details on the Get-EntraContract command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContract + +schema: 2.0.0 +--- + +# Get-EntraContract + +## Synopsis + +Gets a contract. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContract + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraContract + -ContractId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraContract` cmdlet gets a contract information associated to a partner tenant. + +The contract object contains the following attributes: + +- `contractType` - type of the contract. + +Possible values are: + +1. SyndicationPartner - indicates a partner that exclusively resells and manages O365 and Intune for this customer. +They resell and support their customers. +1. BreadthPartner - indicates that the partner has the ability to provide administrative support for this customer. +However the partner isn't allowed to resell to the customer. +1. ResellerPartner - indicates a partner that is similar to a syndication partner, except that it doesn't have exclusive access to a tenant. In the syndication case, the customer can't buy additional direct subscriptions from Microsoft or from other partners. + +- `customerContextId` - unique identifier for the customer tenant referenced by this partnership. + +Corresponds to the ObjectId property of the customer tenant's TenantDetail object. + +- `defaultDomainName` - a copy of the customer tenant's default domain name. +The copy is made when the partnership with the customer is established. +It isn't automatically updated if the customer tenant's default domain name changes. + +- `deletionTimestamp` - this property isn't valid for contracts and always returns null. + +- `displayName` - a copy of the customer tenant's display name. +The copy is made when the partnership with the customer is established. +It isn't automatically updated if the customer tenant's display name changes. + +- `objectType` - a string that identifies the object type. The value is always `Contract`. + +- `ContractId` - the unique identifier for the partnership. + +## Examples + +### Example 1: Get all contracts in the directory + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraContract +``` + +This command gets all contracts in the Microsoft Entra ID. + +### Example 2: Get top two contracts in the directory + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraContract -Top 2 +``` + +This command gets top two contracts in the Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ContractId + +Specifies the ID of a contract. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..ec88ceccfd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraCustomSecurityAttributeDefinition +description: This article provides details on the Get-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition +schema: 2.0.0 +--- + +# Get-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Gets a list of custom security attribute definitions. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraCustomSecurityAttributeDefinition + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraCustomSecurityAttributeDefinition + -Id + [-Property ] + [] +``` + +## Description + +Gets a list of Microsoft Entra ID custom security attribute definitions. Specify `Id` parameter to get a list of custom security attribute definitions. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following privileged roles are supported for this operation: + +- Attribute Assignment Reader +- Attribute Definition Reader +- Attribute Assignment Administrator +- Attribute Definition Administrator + +## Examples + +### Example 1: Get a list of all custom security attribute definitions + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraCustomSecurityAttributeDefinition +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Engineering_newvalue Engineering New Eng Value True True NewValue Available String False +Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False +``` + +This example returns all custom security attribute definitions. + +### Example 2: Get a specific custom security attribute definition + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_ProjectDate' +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False +``` + + This example returns a specific custom security attribute definition. + +- `Id` parameter specifies the custom security attribute definition object ID. + +## Parameters + +### -Id + +The unique identifier of a Microsoft Entra ID custom security attribute definition object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) + +[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..e043e38f4b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,187 @@ +--- +title: Get-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Get-EntraCustomSecurityAttributeDefinitionAllowedValue command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue +schema: 2.0.0 +--- + +# Get-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Gets the predefined value for a custom security attribute definition. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + [-Filter ] + [] +``` + +### GetById + +```powershell +Get-EntraCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + -Id + [] +``` + +## Description + +The `Get-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdley gets the predefined value for a Microsoft Entra ID custom security attribute definition. Specify `CustomSecurityAttributeDefinitionId` parameter to get the predefined value custom security attribute definition. + +The signed-in user must be assigned one of the following directory roles: + +- Attribute Definition Reader +- Attribute Definition Administrator + +## Examples + +### Example 1: Get all predefined values + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $CustomSecurityAttributeDefinition.Id +``` + +```Output +Id IsActive +-- -------- +Apline True +``` + +This example retrieves an all predefined values. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. + +### Example 2: Get predefined value with ID parameter + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id + Id = 'Alpine' +} +Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +id isActive +-- -------- +Apline True +``` + +This example retrieves a specific predefined value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. +- `-Id` parameter specifies the ID of Microsoft Entra ID Object. + +### Example 3: Get predefined value with Filter parameter + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id + Filter = "Id eq 'Apline'" +} +Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +id isActive +-- -------- +Apline True +``` + +This example Get a predefined value with Filter. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier of a custom security attribute definition in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Filter items by property values. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters are not. This identifier is case sensitive, cannot be changed later, and is required. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..099bb99475 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md @@ -0,0 +1,122 @@ +--- +title: Get-EntraDeletedDirectoryObject +description: This article provides details on the Get-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Get-EntraDeletedDirectoryObject + +## Synopsis + +Retrieves a soft deleted directory object from the directory. + +## Syntax + +```powershell +Get-EntraDeletedDirectoryObject + -DirectoryObjectId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeletedDirectoryObject` cmdlet retrieves a soft deleted directory object from the directory. +Note that soft delete for groups is currently only implemented for Unified Groups (also known as +Office 365 Groups). + +## Examples + +### Example 1: Retrieve a deleted directory object. + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' +Get-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 2/2/2024 5:33:56 AM +``` + +This example shows how to retrieve the deleted directory object from the directory. + +- `-DirectoryObjectId` parameter specifies the Id of the directory object to retrieve. + +### Example 2: Retrieve a deleted directory object with more details. + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' +Get-EntraDeletedDirectoryObject -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' | Format-Table -Property Id, displayName, '@odata.type' -AutoSize +``` + +```Output +Id displayName @odata.type +-- ----------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Entra PowerShell App #microsoft.graph.application +``` + +This example shows how to retrieve the deleted directory object details from the directory. + +- `-Id` parameter specifies the Id of the directory object to retrieve. + +## Parameters + +### -DirectoryObjectId + +The Id of the directory object to retrieve. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md new file mode 100644 index 0000000000..9d6749d3d4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md @@ -0,0 +1,271 @@ +--- +title: Get-EntraDevice +description: This article provides details on the Get-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDevice + +schema: 2.0.0 +--- + +# Get-EntraDevice + +## Synopsis + +Gets a device from Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDevice + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDevice + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDevice + -DeviceId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDevice` cmdlet gets a device from Microsoft Entra ID. Specify the `DeviceId` parameter to get a specific device. + +## Examples + +### Example 1: Get a device by ID + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example shows how to retrieve a device using its ID. + +### Example 2: Get all devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData + cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve all devices from Microsoft Entra ID. + +### Example 3: Get top two devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Top 2 +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData + cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve top two devices from Microsoft Entra ID. + +### Example 4: Get a device by display name + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve device using the display name. + +### Example 5: Get a device using display name + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -Filter "startsWith(DisplayName,'Woodgrove')" +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example demonstrates how to retrieve all the devices whose display name starts with the word `Woodgrove`. + +### Example 6: Search among retrieved devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDevice -SearchString 'DESKTOP' +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- + bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData +``` + +This example shows how to retrieve devices containing the word 'DESKTOP.' + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies the OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraDevice](New-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..1149f5438e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md @@ -0,0 +1,196 @@ +--- +title: Get-EntraDeviceRegisteredOwner +description: This article provides details on the Get-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Get-EntraDeviceRegisteredOwner + +## Synopsis + +Gets the registered owner of a device. + +## Syntax + +```powershell +Get-EntraDeviceRegisteredOwner + -DeviceId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeviceRegisteredOwner` cmdlet gets the registered owner of a device in Microsoft Entra ID. Specify `DeviceId` parameter gets the registered owner of a device. + +## Examples + +### Example 1: Retrieve the registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +$DevId = (Get-EntraDevice -Top 1).ObjectId +Get-EntraDeviceRegisteredOwner -DeviceId $DevId +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example shows how to find the registered owner of a device.. + +- `-DeviceId` parameter specifies the device's ID. + +### Example 2: Retrieve the registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command gets the registered owner of a device. + +- `-DeviceId` parameter specifies the device's ID + +### Example 3: Retrieve all the registered owners of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command retrieves all the registered owners of a device. + +- `-DeviceId` parameter specifies the device's ID. + +### Example 4: Retrieve top one registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command retrieves all the registered owners of a device. + +- `-DeviceId` parameter specifies the device's ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) + +[Get-EntraDevice](Get-EntraDevice.md) + +[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..810e5ec600 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md @@ -0,0 +1,180 @@ +--- +title: Get-EntraDeviceRegisteredUser +description: This article provides details on the Get-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Get-EntraDeviceRegisteredUser + +## Synopsis + +Retrieve a list of users that are registered users of the device. + +## Syntax + +```powershell +Get-EntraDeviceRegisteredUser + -DeviceId + [-All ] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDeviceRegisteredUser` cmdlet gets a registered user for a Microsoft Entra ID device. Specify `DeviceId` parameter to get a registered user for a Microsoft Entra ID device. + +## Examples + +### Example 1: Retrieve the registered user of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +$DevId = (Get-EntraDevice -Top 1).ObjectId +Get-EntraDeviceRegisteredUser -DeviceId $DevId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +``` + +This example demonstrates how to retrieve registered user for a specific Microsoft Entra ID device. + +### Example 2: Get all registered users of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +``` + +This example demonstrates how to retrieve all registered users for a specified device. + +- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. + +### Example 3: Get top two registered users of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to retrieve top two registered users for the specified device. + +- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies an object ID of a device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) + +[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md new file mode 100644 index 0000000000..a771858b4b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraDirSyncConfiguration +description: This article provides details on the Get-EntraDirSyncConfiguration command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration + +schema: 2.0.0 +--- + +# Get-EntraDirSyncConfiguration + +## Synopsis + +Gets the directory synchronization settings. + +## Syntax + +```powershell +Get-EntraDirSyncConfiguration + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDirSyncConfiguration` cmdlet gets the directory synchronization settings. + +For delegated scenarios, the user needs to be assigned the Global Administrator role. + +## Examples + +### Example 1: Get directory synchronization settings + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Get-EntraDirSyncConfiguration +``` + +```Output +AccidentalDeletionThreshold DeletionPreventionType +--------------------------- ---------------------- + 500 enabledForCount +``` + +This example gets directory synchronization settings. + +### Example 2: Get directory synchronization settings by TenantId + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Get-EntraDirSyncConfiguration -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' +``` + +```Output +AccidentalDeletionThreshold DeletionPreventionType +--------------------------- ---------------------- + 500 enabledForCount +``` + +This example gets directory synchronization settings by TenantId. + +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant for the operation. If TenantId isn't provided, it defaults to the current user's tenant. This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +## Notes + +## Related Links + +[Set-EntraDirSyncConfiguration](Set-EntraDirSyncConfiguration.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md new file mode 100644 index 0000000000..6b0d0dcab6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md @@ -0,0 +1,153 @@ +--- +title: Get-EntraDirSyncFeature +description: This article provides details on the Get-EntraDirSyncFeature command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncFeature + +schema: 2.0.0 +--- + +# Get-EntraDirSyncFeature + +## Synopsis + +Checks the status of directory synchronization features for a tenant. + +## Syntax + +```powershell +Get-EntraDirSyncFeature + [-TenantId ] + [-Feature ] + [] +``` + +## Description + +The `Get-EntraDirSyncFeature` cmdlet checks the status of directory synchronization features for a tenant. + +Some of the features that can be used with this cmdlet include: + +- **DeviceWriteback** +- **DirectoryExtensions** +- **DuplicateProxyAddressResiliency** +- **DuplicateUPNResiliency** +- **EnableSoftMatchOnUpn** +- **PasswordSync** +- **SynchronizeUpnForManagedUsers** +- **UnifiedGroupWriteback** +- **UserWriteback** + +The cmdlet can be run without specifying any features, in which case it returns a list of all features and their enabled or disabled status. + +For delegated scenarios, the user needs to be assigned the Global Administrator role. + +## Examples + +### Example 1: Return a list of all directory synchronization features + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' +Get-EntraDirSyncFeature +``` + +```Output +Enabled DirSyncFeature +------- -------------- + False BlockCloudObjectTakeoverThroughHardMatch + False BlockSoftMatch + False BypassDirSyncOverrides + False CloudPasswordPolicyForPasswordSyncedUsers + False ConcurrentCredentialUpdate + True ConcurrentOrgIdProvisioning + False DeviceWriteback + False DirectoryExtensions + False FopeConflictResolution + False GroupWriteBack + False PasswordSync + False PasswordWriteback + True QuarantineUponProxyAddressesConflict + True QuarantineUponUpnConflict + True SoftMatchOnUpn + True SynchronizeUpnForManagedUsers + False UnifiedGroupWriteback + False UserForcePasswordChangeOnLogon + False UserWriteback +``` + +This example gets a list of all directory synchronization features and shows if they are enabled (True) or disabled (False). + +### Example 2: Return the PasswordSync feature status + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' +Get-EntraDirSyncFeature -Feature 'PasswordSync' +``` + +```Output +Enabled DirSyncFeature +------- -------------- + False PasswordSync +``` + +This example shows if PasswordSync is enabled (True) or disabled (False) for the tenant. + +- `-Feature` specifies the directory synchronization feature to check the status of. + +## Parameters + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Feature + +The directory synchronization feature to check the status of. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraDirSyncFeature](Set-EntraDirSyncFeature.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md new file mode 100644 index 0000000000..4bbd98ed43 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md @@ -0,0 +1,104 @@ +--- +title: Get-EntraDirectoryObjectOnPremisesProvisioningError +description: This article provides details on the Get-EntraDirectoryObjectOnPremisesProvisioningError command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError + +schema: 2.0.0 +--- + +# Get-EntraDirectoryObjectOnPremisesProvisioningError + +## Synopsis + +Returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +## Syntax + +```powershell +Get-EntraDirectoryObjectOnPremisesProvisioningError + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDirectoryObjectOnPremisesProvisioningError` returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +## Examples + +### Example 1: Return whether Microsoft Entra ID has objects with DirSync provisioning error + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' + +Get-EntraDirectoryObjectOnPremisesProvisioningError +``` + +```Output +False +``` + +This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +### Example 2: Return whether Microsoft Entra ID has objects with DirSync provisioning error + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' + +Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId '0000aaaa-11bb-cccc-dd22-eeeeee333333' +``` + +```Output +False +``` + +This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. + +If this isn't provided then the value defaults to the tenant of the current user. + +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md new file mode 100644 index 0000000000..aac3e91b9d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md @@ -0,0 +1,181 @@ +--- +title: Get-EntraDirectoryRole +description: This article provides details on the Get-EntraDirectoryRole command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRole + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRole + +## Synopsis + +Gets a directory role. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRole + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRole + -DirectoryRoleId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRole` cmdlet gets a directory role from Microsoft Entra ID. Specify `ObjectId` parameter to get a directory role. + +## Examples + +### Example 1: Get a directory role by ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -DirectoryRoleId '019ea7a2-1613-47c9-81cb-20ba35b1ae48' +``` + +```Output +ObjectId DisplayName Description +-------- ----------- ----------- +019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. +``` + +This command gets the specified directory role. + +- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. + +### Example 2: Get all directory roles + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Perform all migration functionality to migrate content to Microsoft 365 usin... + aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb Can manage all aspects of users and groups, including resetting passwords fo... + bbbbbbbb-7777-8888-9999-cccccccccccc Can read basic directory information. Commonly used to grant directory read ... + cccccccc-8888-9999-0000-dddddddddddd Can read and write basic directory information. For granting access to appli... +``` + +This command gets all the directory roles. + +### Example 3: Get a directory role filter by ObjectId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -Filter "ObjectId eq '019ea7a2-1613-47c9-81cb-20ba35b1ae48'" +``` + +```Output +ObjectId DisplayName Description +-------- ----------- ----------- +019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. +``` + +This command gets the directory role by ObjectId. + +- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. + +### Example 4: Get a directory role filter by displayName + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRole -Filter "displayName eq 'Helpdesk Administrator'" +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 56644e28-bf8b-4dad-8595-24448ffa3cb8 Perform all migration functionality to migrate content to Microsoft 365 usin... +``` + +This command gets the directory role by display name. + +## Parameters + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Enable-EntraDirectoryRole](Enable-EntraDirectoryRole.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..3238d3cb09 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraDirectoryRoleMember +description: This article provides details on the Get-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleMember + +## Synopsis + +Gets members of a directory role. + +## Syntax + +```powershell +Get-EntraDirectoryRoleMember + -DirectoryRoleId + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleMember` cmdlet retrieves the members of a directory role in Microsoft Entra ID. To obtain the members of a specific directory role, specify the `DirectoryRoleId`. Use the `Get-EntraDirectoryRole` cmdlet to get the `DirectoryRoleId` value. + +## Examples + +### Example 1: Get members by role ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleMember -DirectoryRoleId '1d73e796-aac5-4b3a-b7e7-74a3d1926a85' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This example retrieves the members of the specified role. + +- `-DirectoryRoleId` parameter specifies directory role ID. + +## Parameters + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) + +[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md new file mode 100644 index 0000000000..6ea213a233 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md @@ -0,0 +1,101 @@ +--- +title: Get-EntraDirectoryRoleTemplate +description: This article provides details on the Get-EntraDirectoryRoleTemplate command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleTemplate + +## Synopsis + +Gets directory role templates. + +## Syntax + +```powershell +Get-EntraDirectoryRoleTemplate + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleTemplate` cmdlet gets directory role templates in Microsoft Entra ID. + +## Examples + +### Example 1: Get role templates + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleTemplate +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identities. + 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. + 2af84b1e-32c8-42b7-82bc-daa82404023b Default role for guest users with restricted access. Can read a limited set of directory information. + 95e79109-95c0-4d8e-aee3-d01accf2d47b Can invite guest users independent of the 'members can invite guests' setting. + fe930be7-5e62-47db-91af-98c3a49a38b1 Can manage all aspects of users and groups, including resetting passwords for limited admins. +``` + +This example retrieves the role templates in Microsoft Entra ID. + +### Example 2: Get a specific role template + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Helpdesk Administrator'} +``` + +```Output +DeletedDateTime Id Description DisplayName +--------------- -- ----------- ----------- + 729827e3-9c14-49f7-bb1b-9608f156bbb8 Can reset passwords for non-administrators and Helpdesk Administrators. Helpdesk Administrator +``` + +This example retrieves a Helpdesk role template. + +## Parameters + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md new file mode 100644 index 0000000000..6a9d0258f3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md @@ -0,0 +1,147 @@ +--- +title: Get-EntraDomain +description: This article provides details on the Get-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomain + +schema: 2.0.0 +--- + +# Get-EntraDomain + +## Synopsis + +Gets a domain. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDomain + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDomain + -Name + [-Property ] + [] +``` + +## Description + +The `Get-EntraDomain` cmdlet gets a domain in Microsoft Entra ID. + +The work or school account must be assigned to at least one of the following Microsoft Entra roles: + +- User Administrator +- Helpdesk Administrator +- Service Support Administrator +- Directory Readers +- AdHoc License Administrator +- Application Administrator +- Security Reader +- Security Administrator +- Privileged Role Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Get a list of Domains that are created + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomain +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +test33.com Managed True False False False False 15 +test44.com Managed True False False False False 17 +``` + +This command retrieves a list of domains. + +### Example 2: Get a specific Domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomain -Name TEST22.com +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +``` + +This command retrieves a domain with the specified name. + +## Parameters + +### -Name + +Specifies the name of a domain. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md new file mode 100644 index 0000000000..2381a779d4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md @@ -0,0 +1,129 @@ +--- +title: Get-EntraDomainFederationSettings +description: This article provides details on the Get-EntraDomainFederationSettings command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings + +schema: 2.0.0 +--- + +# Get-EntraDomainFederationSettings + +## Synopsis + +Retrieves settings for a federated domain. + +## Syntax + +```powershell +Get-EntraDomainFederationSettings + -DomainName + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraDomainFederationSettings` cmdlet gets key settings from Microsoft Entra ID. + +Use the `Get-EntraFederationProperty` cmdlet to get settings for both Microsoft Entra ID and the Entra ID Federation Services server. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Global Reader +- Security Reader +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Get federation settings for specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainFederationSettings -DomainName 'contoso.com' +``` + +This command gets federation settings for specified domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. + +## Parameters + +### -DomainName + +The fully qualified domain name to retrieve. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this isn't provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DomainFederationSettings + +### This cmdlet returns the following settings + +### ActiveLogOnUri + +### FederationBrandName + +### IssuerUri + +### LogOffUri + +### MetadataExchangeUri + +### NextSigningCertificate + +### PassiveLogOnUri + +### SigningCertificate + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md new file mode 100644 index 0000000000..d6e7a88bf0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md @@ -0,0 +1,113 @@ +--- +title: Get-EntraDomainNameReference +description: This article provides details on the Get-EntraDomainNameReference command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainNameReference + +schema: 2.0.0 +--- + +# Get-EntraDomainNameReference + +## Synopsis + +Retrieves the objects that are referenced by a given domain name. + +## Syntax + +```powershell +Get-EntraDomainNameReference + -Name + [-Property ] + [] +``` + +## Description + +The `Get-EntraDomainNameReference` cmdlet retrieves the objects that are referenced with a given domain name. Specify `Name` parameter retrieve the objects. + +The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. + +## Examples + +### Example 1: Retrieve the domain name reference objects for a domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainNameReference -Name contoso.com +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example shows how to retrieve the domain name reference objects for a domain that is specified through the -Name parameter. + +- `-Name` parameter specifies the name of the domain name for which the referenced objects are retrieved. + +## Parameters + +### -Name + +The name of the domain name for which the referenced objects are retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md new file mode 100644 index 0000000000..df14887de6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md @@ -0,0 +1,112 @@ +--- +title: Get-EntraDomainServiceConfigurationRecord +description: This article provides details on the Get-EntraDomainServiceConfigurationRecord command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord + +schema: 2.0.0 +--- + +# Get-EntraDomainServiceConfigurationRecord + +## Synopsis + +Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. + +## Syntax + +```powershell +Get-EntraDomainServiceConfigurationRecord + -Name + [-Property ] + [] +``` + +## Description + +Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. + +After you have successfully verified the ownership of a domain and you have indicated what services you plan to use with the domain, you can request Microsoft Entra ID to return you a set of DNS records which you need to add to the zone file of the domain so that the services can work properly with your domain. + +## Examples + +### Example 1: Retrieve domain service configuration records by Name + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainServiceConfigurationRecord -Name 'test.mail.contoso.com' +``` + +```Output +Id IsOptional Label RecordType SupportedService Ttl +-- ---------- ----- ---------- ---------------- --- +aaaa0000-bb11-2222-33cc-444444dddddd False test.mail.contoso.com Mx Email 3600 +bbbb1111-cc22-3333-44dd-555555eeeeee False test.mail.contoso.com Txt Email 3600 +cccc2222-dd33-4444-55ee-666666ffffff False autodiscover.test.mail.contoso.com CName Email 3600 +dddd3333-ee44-5555-66ff-777777aaaaaa False msoid.test.mail.contoso.com CName OrgIdAuthentication 3600 +eeee4444-ff55-6666-77aa-888888bbbbbb False enterpriseregistration.test.mail.contoso.com CName Intune 3600 +ffff5555-aa66-7777-88bb-999999cccccc False enterpriseenrollment.test.mail.contoso.com CName Intune 3600 +``` + +This example shows how to retrieve the Domain service configuration records for a domain with the given name. + +- `-Name` parameter specifies domain name for which the domain service configuration records are to be retrieved. + +## Parameters + +### -Name + +The name of the domain for which the domain service configuration records are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md new file mode 100644 index 0000000000..cd3821fc66 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md @@ -0,0 +1,112 @@ +--- +title: Get-EntraDomainVerificationDnsRecord +description: This article provides details on the Get-EntraDomainVerificationDnsRecord command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord + +schema: 2.0.0 +--- + +# Get-EntraDomainVerificationDnsRecord + +## Synopsis + +Retrieve the domain verification DNS record for a domain. + +## Syntax + +```powershell +Get-EntraDomainVerificationDnsRecord + -Name + [-Property ] + [] +``` + +## Description + +Gets the domain's verification records from the `verificationDnsRecords` navigation property. + +You can't use the domain with your Microsoft Entra ID tenant until you have successfully verified that you own the domain. + +To verify the ownership of the domain, you need to first retrieve a set of domain verification records that you need to add to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. + +Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + +The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. + +## Examples + +### Example 1: Retrieve the domain verification DNS record + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraDomainVerificationDnsRecord -Name mail.contoso.com +``` + +```Output +Id IsOptional Label RecordType SupportedService Ttl +-- ---------- ----- ---------- ---------------- --- +aaaa0000-bb11-2222-33cc-444444dddddd False mail.contoso.com Txt Email 3600 +bbbb1111-cc22-3333-44dd-555555eeeeee False mail.contoso.com Mx Email 3600 +``` + +This example shows how to retrieve the Domain verification DNS records for a domain with the given name. + +## Parameters + +### -Name + +The domain name for which the domain verification Domain Name System (DNS) records are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md new file mode 100644 index 0000000000..0b48a4f8c1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md @@ -0,0 +1,97 @@ +--- +title: Get-EntraExtensionProperty +description: This article provides details on the Get-EntraExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraExtensionProperty + +schema: 2.0.0 +--- + +# Get-EntraExtensionProperty + +## Synopsis + +Gets extension properties registered with Microsoft Entra ID. + +## Syntax + +```powershell +Get-EntraExtensionProperty + [-IsSyncedFromOnPremises ] + [] +``` + +## Description + +The Get-EntraExtensionProperty cmdlet gets a collection that contains the extension properties registered with Microsoft Entra ID through Microsoft Entra ID Connect. + +You can get extension properties that are synced with on-premises Microsoft Entra ID that aren't synced with on-premises Microsoft Entra ID or both types. + +This command returns all directory extension definitions registered in a directory, including those from multitenant apps. The following entities support extension properties: + +- User +- Group +- AdministrativeUnit +- Application +- Device +- Organization + +## Examples + +### Example 1: Get extension properties synced from on-premises Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraExtensionProperty -IsSyncedFromOnPremises $True +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ------------- ---------------------- ---- ------------- + aaaabbbb-0000-cccc-1111-dddd2222eeee Tenant Schema Extension App String False True extension_aaaabbbb-0000-cccc-1111-dddd2222eeee_extensionAttribute1 {User} +``` + +This command gets extension properties that have sync from on-premises Microsoft Entra ID. + +## Parameters + +### -IsSyncedFromOnPremises + +Specifies whether this cmdlet gets extension properties that are synced or not synced. + +- `$True` - get extension properties that are synced from the on-premises Microsoft Entra ID. +- `$False` - get extension properties that aren't synced from the on-premises Microsoft Entra ID. +- `No value` - get all extension properties (both synced and nonsynced). + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md new file mode 100644 index 0000000000..615248b150 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md @@ -0,0 +1,90 @@ +--- +title: Get-EntraFederationProperty +description: This article provides details on the Get-EntraFederationProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFederationProperty + +schema: 2.0.0 +--- + +# Get-EntraFederationProperty + +## Synopsis + +Displays the properties of the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +## Syntax + +```powershell +Get-EntraFederationProperty + -DomainName + [] +``` + +## Description + +The `Get-EntraFederationProperty` cmdlet gets key settings from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +You can use this information to troubleshoot authentication problems caused by mismatched settings between the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Global Reader +- Security Reader +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Display properties for specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraFederationProperty -DomainName contoso.com +``` + +This command displays properties for specified domain. + +- `-DomainName` Specifies the domain name. + +## Parameters + +### -DomainName + +The domain name for which the properties from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online are displayed. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md new file mode 100644 index 0000000000..813b97fb34 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraObjectByObjectId +description: This article provides details on the Get-EntraObjectByObjectId command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectByObjectId + +schema: 2.0.0 +--- + +# Get-EntraObjectByObjectId + +## Synopsis + +Retrieves the objects specified by the ObjectIds parameter. + +## Syntax + +```powershell +Get-EntraObjectByObjectId + -ObjectIds + [-Types ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraObjectByObjectId` cmdlet retrieves the objects specified by the ObjectIds parameter. + +## Examples + +### Example 1: Get an object One or more object IDs + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' , 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve objects for a specified object Ids. + +- `ObjectIds` parameter specifies the One or more object IDs. + +### Example 2: Get an object by types + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Types User +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve objects for a specified object type. + +- `-ObjectIds` parameter specifies the One or more object IDs. +- `-Types` parameter specifies the type of object ID. + +## Parameters + +### -ObjectIds + +One or more object IDs's, separated by commas, for which the objects are retrieved. The IDs are GUIDs, represented as strings. You can specify up to 1,000 IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Types + +Specifies the type of objects that the cmdlet returns. If not specified, the default is directoryObject, which includes all resource types defined in the directory. You can specify any object derived from directoryObject in the collection, such as user, group, and device objects. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md new file mode 100644 index 0000000000..c2338d2a49 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md @@ -0,0 +1,135 @@ +--- +title: Get-EntraPartnerInformation +description: This article provides details on the Get-EntraPartnerInformation command. + +ms.topic: reference +ms.date: 09/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPartnerInformation + +schema: 2.0.0 +--- + +# Get-EntraPartnerInformation + +## Synopsis + +Retrieves company-level information for partners. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPartnerInformation + [] +``` + +### GetById + +```powershell +Get-EntraPartnerInformation + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraPartnerInformation` cmdlet is used to retrieve partner-specific information. +This cmdlet should only be used for partner tenants. + +## Examples + +### Example 1: Retrieve partner information + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraPartnerInformation +``` + +```Output +PartnerCompanyName : Contoso +companyType : +PartnerSupportTelephones : {12123, +1911} +PartnerSupportEmails : {} +PartnerHelpUrl : http://www.help.contoso.com +PartnerCommerceUrl : +ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc +PartnerSupportUrl : +``` + +This command retrieves partner-specific information. + +### Example 2: Retrieve partner information with specific TenantId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +$tenantId = (Get-EntraContext).TenantId +Get-EntraPartnerInformation -TenantId $tenantId +``` + +```Output +PartnerCompanyName : Contoso +companyType : +PartnerSupportTelephones : {12123, +1911} +PartnerSupportEmails : {} +PartnerHelpUrl : http://www.help.contoso.com +PartnerCommerceUrl : +ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc +PartnerSupportUrl : +``` + +This command retrieves partner-specific information. + +`-TenantId` Parameter specifies unique ID of the tenant to perform the operation on. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this is not provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Company level information outputs + +- CompanyType: The type of this company (can be partner or regular tenant) +- DapEnabled: Flag to determine if the partner has delegated admin privileges +- PartnerCompanyName: The name of the company +- PartnerSupportTelephones: Support Telephone numbers for the partner +- PartnerSupportEmails: Support E-Mail address for the partner +- PartnerCommerceUrl: URL for the partner's commerce web site +- PartnerSupportUrl: URL for the Partner's support website +- PartnerHelpUrl: URL for the partner's help web site + +## Notes + +## Related Links + +[Set-EntraPartnerInformation](Set-EntraPartnerInformation.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md new file mode 100644 index 0000000000..ea27374f11 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md @@ -0,0 +1,101 @@ +--- +title: Get-EntraPasswordPolicy +description: This article provides details on the Get-EntraPasswordPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPasswordPolicy + +schema: 2.0.0 +--- + +# Get-EntraPasswordPolicy + +## Synopsis + +Retrieves the current password policy for the tenant or the specified domain. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPasswordPolicy + [] +``` + +### GetById + +```powershell +Get-EntraPasswordPolicy + -DomainName + [] +``` + +## Description + +The `Get-EntraPasswordPolicy` cmdlet can be used to retrieve the values associated with the Password Expiry +window or Password Expiry Notification window for a tenant or specified domain. + +When a domain name is specified, it must be a verified domain for the company. + +The work or school account needs to belong to one of the following Microsoft Entra roles: + +- Domain Name Administrator + +## Examples + +### Example 1: Get password policy for a specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraPasswordPolicy -DomainName 'contoso.com' +``` + +```Output +NotificationDays ValidityPeriod +---------------- -------------- + 90 180 +``` + +Returns the password policy for the specified domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. + +## Parameters + +### -DomainName + +The fully qualified name of the domain to be retrieved. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..3d2a8293a7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md @@ -0,0 +1,145 @@ +--- +title: Get-EntraScopedRoleMembership +description: This article provides details on the Get-EntraScopedRoleMembership command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Get-EntraScopedRoleMembership + +## Synopsis + +List Microsoft Entra role assignments with administrative unit scope. + +## Syntax + +```powershell +Get-EntraScopedRoleMembership + -AdministrativeUnitId + [-ScopedRoleMembershipId ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraScopedRoleMembership` cmdlet lists Microsoft Entra role assignments with an administrative unit scope. Use the `ObjectId` parameter to retrieve a specific scoped role membership. + +## Examples + +### Example 1: Get Scoped Role Administrator + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' +} +Get-EntraScopedRoleMembership @params +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example gets scoped role administrator. You cane use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-ScopedRoleMembershipId` parameter specifies the scoped role membership Id. + +### Example 2: List scoped administrators for administrative unit by ObjectId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraScopedRoleMembership -ObjectId $AdministrativeUnit.ObjectId +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example list scoped administrators with objectId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ScopedRoleMembershipId + +Specifies the ID of a scoped role membership. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) + +[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md new file mode 100644 index 0000000000..bcf1591a2e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md @@ -0,0 +1,227 @@ +--- +title: Get-EntraSubscribedSku +description: This article provides details on the Get-EntraSubscribedSku command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraSubscribedSku + +schema: 2.0.0 +--- + +# Get-EntraSubscribedSku + +## Synopsis + +Gets subscribed SKUs to Microsoft services. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraSubscribedSku + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraSubscribedSku + -SubscribedSkuId + [-Property ] + [] +``` + +## Description + +The `Get-EntraSubscribedSku` cmdlet gets subscribed SKUs to Microsoft services. + +## Examples + +### Example 1: Get subscribed SKUs + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraSubscribedSku +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... +bbbb1111-cc22-3333-44dd-555555eeeeee 1111bbbb-22cc-dddd-ee33-ffffff444444 M365x99297270 User Enabled 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTE... +cccc2222-dd33-4444-55ee-666666ffffff 2222cccc-33dd-eeee-ff44-aaaaaa555555 M365x99297270 User Enabled 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTE... +``` + +This example demonstrates how to retrieve subscribed SKUs to Microsoft services. + +### Example 2: Get subscribed SKUs by SubscribedSkuId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraSubscribedSku -SubscribedSkuId 'abcdefgh-1111-2222-bbbb-cccc33333333_dddddddd-4444-5555-eeee-666666666666' +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... +``` + +This example demonstrates how to retrieve specified subscribed SKUs to Microsoft services. + +- `-SubscribedSkuId` parameter specifies the ID of the SKU (Stock Keeping Unit). + +### Example 3: Get available license plans + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Organization.Read.All' +Get-EntraSubscribedSku | Select-Object -Property Sku*, ConsumedUnits -ExpandProperty PrepaidUnits +``` + +```Output +Enabled : 5 +LockedOut : 0 +Suspended : 0 +Warning : 0 +AdditionalProperties : +SkuId : efccb6f7-5641-4e0e-bd10-b4976e1bf68e +SkuPartNumber : EMS +ConsumedUnits : 3 +``` + +This example demonstrates how to retrieve available license plans. + +### Example 4: Retrieve all users assigned a specific license + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +$sku = Get-EntraSubscribedSku | Where-Object { $_.SkuPartNumber -eq 'DEVELOPERPACK_E5' } +$skuId = $sku.SkuId +$usersWithDeveloperPackE5 = Get-EntraUser -All | Where-Object { + $_.AssignedLicenses -and ($_.AssignedLicenses.SkuId -contains $skuId) +} +$usersWithDeveloperPackE5 | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled, UserType | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AccountEnabled UserType +-- ----------- ----------------- -------------- -------- +cccccccc-2222-3333-4444-dddddddddddd Angel Brown AngelB@contoso.com True Member +dddddddd-3333-4444-5555-eeeeeeeeeeee Avery Smith AveryS@contoso.com True Member +eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com True Member +``` + +This example demonstrates how to retrieve all users assigned a specific license. + +### Example 5: Get a list of users, their assigned licenses, and licensing source + +```powershell +Connect-Entra -Scopes 'Organization.Read.All','User.Read.All','Group.Read.All' + +# Get all users with specified properties +$Users = Get-EntraUser -All -Property AssignedLicenses, LicenseAssignmentStates, DisplayName, UserPrincipalName, ObjectId + +$SelectedUsers = $Users | Select-Object ObjectId, UserPrincipalName, DisplayName, AssignedLicenses -ExpandProperty LicenseAssignmentStates + +# Group Name lookup +$GroupDisplayNames = @{} + +# Sku Part Number lookup +$SkuPartNumbers = @{} + +# Populate the hashtable with group display names and SKU part numbers +foreach ($User in $SelectedUsers) { + $AssignedByGroup = $User.AssignedByGroup + $SkuId = $User.SkuId + + try { + # Check if the group display name is already in the hashtable + if (-not $GroupDisplayNames.ContainsKey($AssignedByGroup)) { + $Group = Get-EntraGroup -GroupId $AssignedByGroup + $GroupDisplayNames[$AssignedByGroup] = $Group.DisplayName + } + + $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue $GroupDisplayNames[$AssignedByGroup] + } catch { + $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue 'N/A (Direct Assignment)' + } + + try { + # Check if the SKU part number is already in the hashtable + if (-not $SkuPartNumbers.ContainsKey($SkuId)) { + $Sku = Get-EntraSubscribedSku | Where-Object { $_.SkuId -eq $SkuId } | Select-Object -ExpandProperty SkuPartNumber + $SkuPartNumbers[$SkuId] = $Sku + } + + $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue $SkuPartNumbers[$SkuId] + } catch { + $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue 'N/A' + } +} + +$SelectedUsers | Format-Table UserPrincipalName, DisplayName, AssignedByGroup, GroupDisplayName, SkuId, SkuPartNumber, State, Error -AutoSize +``` + +```Output +userPrincipalName displayName assignedByGroup GroupDisplayName skuId SkuPartNumber state error +----------------- ----------- --------------- ---------------- ----- ------------- ----- ----- +averyh@contoso.com Avery Howard cccccccc-2222-3333-4444-dddddddddddd Contoso Team abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None +devont@contoso.com Devon Torres ffffffff-5555-6666-7777-aaaaaaaaaaaa Retail abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None +``` + +This example shows a list of users, their licenses, and the source of the license such as directly assigned or group assigned. + +## Parameters + +### -SubscribedSkuId + +The object ID of the SKU (Stock Keeping Unit). + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md new file mode 100644 index 0000000000..7bf50037c6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md @@ -0,0 +1,167 @@ +--- +title: Get-EntraTenantDetail +description: This article provides details on the Get-EntraTenantDetail command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTenantDetail + +schema: 2.0.0 +--- + +# Get-EntraTenantDetail + +## Synopsis + +Gets the details of a tenant. + +## Syntax + +```powershell +Get-EntraTenantDetail + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraTenantDetail` cmdlet gets the details of a tenant in Microsoft Entra ID. + +In delegated scenarios involving work or school accounts, the signed-in user must be assigned either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation: + +- Application Administrator +- Authentication Administrator +- Cloud Application Administrator +- Directory Readers +- Directory Reviewer +- Global Reader +- Helpdesk Administrator +- Security Administrator +- Security Operator +- Security Reader +- Service Support Administrator +- User Administrator +- Privileged Role Administrator + +## Examples + +### Example 1: Get all tenant details + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTenantDetail -All +``` + +```Output +DisplayName Id TenantType CountryLetterCode VerifiedDomains +----------- -- ---------- ----------------- --------------- +Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AAD NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Mana... +``` + +This example shows how to retrieve all tenant details. + +### Example 2: Get top one tenant details + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTenantDetail -Top 1 +``` + +```Output +DisplayName Id CountryLetterCode VerifiedDomains +----------- -- ----------------- --------------- +Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}} +``` + +This example shows how to retrieve details of a top one tenant in Microsoft Entra ID. + +### Example 3: Get directory tenant size quota + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +(Get-EntraTenantDetail).AdditionalProperties.directorySizeQuota +``` + +```Output +Key Value +--- ----- +used 339 +total 50000 +``` + +This example shows how to retrieve the directory tenant size quota. + +A directory quota represents the maximum number of objects allowed in a tenant, including user accounts, app registrations, and groups. Once this limit is reached, attempts to create new objects will result in an error. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraTenantDetail](Set-EntraTenantDetail.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..f5effc7db0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md @@ -0,0 +1,133 @@ +--- +title: New-EntraAdministrativeUnit +description: This article provides details on the New-EntraAdministrativeUnit command. + + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# New-EntraAdministrativeUnit + +## Synopsis + +Creates an administrative unit. + +## Syntax + +```powershell +New-EntraAdministrativeUnit + [-Description ] + -DisplayName + [] +``` + +## Description + +The `New-EntraAdministrativeUnit` cmdlet creates an administrative unit in Microsoft Entra ID. Specify `DisplayName` parameter to create an administrative unit. + +In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that includes the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. The Privileged Role Administrator role is the least privileged role that meets this requirement. + +## Examples + +### Example 1: Create an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +New-EntraAdministrativeUnit -DisplayName 'TestAU' +``` + +```Output +DeletedDateTime Id Description DisplayName Visibility +--------------- -- ----------- ----------- ---------- + bbbbbbbb-1111-2222-3333-cccccccccccc TestAU +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. + +### Example 2: Create an administrative unit using '-Description' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$params = @{ + DisplayName = 'Pacific Administrative Unit' + Description = 'Administrative Unit for Pacific region' +} + +New-EntraAdministrativeUnit @params +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + bbbbbbbb-1111-2222-3333-cccccccccccc Pacific Administrative Unit test111 False +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. +- `-Description` parameter specifies a description for the Administrative unit object. + +## Parameters + +### -Description + +Specifies a description for the new administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the new administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md new file mode 100644 index 0000000000..8a6f2ea0bf --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md @@ -0,0 +1,136 @@ +--- +title: New-EntraAttributeSet +description: This article provides details on the New-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAttributeSet + +schema: 2.0.0 +--- + +# New-EntraAttributeSet + +## Synopsis + +Adds a new attribute set. + +## Syntax + +```powershell +New-EntraAttributeSet + [-AttributeSetId ] + [-Description ] + [-MaxAttributesPerSet ] + [] +``` + +## Description + +Adds a new Microsoft Entra ID attribute set object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a single attribute set + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'NewCustomAttributeSet' + Description = 'Attributes for engineering team' + MaxAttributesPerSet = 10 +} + +New-EntraAttributeSet @params +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Testing Attributes for engineering team 10 +``` + +This example demonstrates hoe to add a single attribute set. + +- `-Id` parameter specifies the name of the attribute set. +- `-Description` parameter specifies the description for the attribute set. +- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. + +## Parameters + +### -Description + +Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AttributeSetId + +Name of the attribute set. Unique identifier for the attribute set within a tenant, up to 32 Unicode characters. It can't contain spaces or special characters, is case sensitive, and can't be changed later. Required. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaxAttributesPerSet + +Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraAttributeSet](Get-EntraAttributeSet.md) + +[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..6e1299f5b0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,234 @@ +--- +title: New-EntraCustomSecurityAttributeDefinition +description: This article provides details on the New-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# New-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Create a new customSecurityAttributeDefinition object. + +## Syntax + +```powershell +New-EntraCustomSecurityAttributeDefinition + -IsSearchable + [-Description ] + -IsCollection + -AttributeSet + -Type + -Name + -Status + -UsePreDefinedValuesOnly + [] +``` + +## Description + +The `New-EntraCustomSecurityAttributeDefinition` cmdlet creates a new customSecurityAttributeDefinition object. Specify `IsSearchable`, `IsCollection`, `AttributeSet`, `Type`, `Name`, `Status` and `UsePreDefinedValuesOnly` parameters for create a new custom security attribute definition. + +You can define up to 500 active objects in a tenant. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a custom security attribute + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All','CustomSecAttributeDefinition.ReadWrite.All' +$AttributeSet = Get-EntraAttributeSet -Id '' +$params = @{ + Name = 'ProjectTest' + Description = 'Target completion' + Type = 'String' + Status = 'Available' + AttributeSet = $AttributeSet.Id + IsCollection = $False + IsSearchable = $True + UsePreDefinedValuesOnly = $True +} +New-EntraCustomSecurityAttributeDefinition @params +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Test_ProjectTest Test Target completion False True ProjectTest Available String False +``` + +This example demonstrates how to add a custom security attribute. + +- `-Name` parameter specifies the name of the custom security attribute. +- `-Description` parameter specifies the description of the custom security attribute. +- `-Type` parameter specifies the data type for the custom security attribute values. +- `-Status` parameter specifies the custom security attribute is active or deactivated. +- `-AttributeSet` parameter specifies the name of attribute set. +- `-IsCollection` parameter specifies the allows multiple values can be assigned to the custom security attribute. +- `-IsSearchable` parameter specifies the custom security attribute values are indexed for searching on objects. +- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. + +## Parameters + +### -AttributeSet + +Name of the attribute set. Case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCollection + +Indicates whether multiple values can be assigned to the custom security attribute. Can't be changed later. If type is set to Boolean, isCollection can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsSearchable + +Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Can't be changed later. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Can't contain spaces or special characters. Can't be changed later. Case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status + +Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Can't be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsePreDefinedValuesOnly + +Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) + +[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md new file mode 100644 index 0000000000..d81f8e00ad --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md @@ -0,0 +1,339 @@ +--- +title: New-EntraDevice +description: This article provides details on the New-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDevice + +schema: 2.0.0 +--- + +# New-EntraDevice + +## Synopsis + +Creates a device. + +## Syntax + +```powershell +New-EntraDevice + -DisplayName + -DeviceOSType + -AccountEnabled + -DeviceId + -DeviceOSVersion + -AlternativeSecurityIds + [-DevicePhysicalIds ] + [-DeviceTrustType ] + [-DeviceMetadata ] + [-ApproximateLastLogonTimeStamp ] + [-IsManaged ] + [-DeviceObjectVersion ] + [-IsCompliant ] + [-ProfileType ] + [-SystemLabels ] + [] +``` + +## Description + +The `New-EntraDevice` cmdlet creates a device in Microsoft Entra ID. + +The calling user must be in one of the following Microsoft Entra roles: Intune Administrator or Windows 365 Administrator. + +## Examples + +### Example 1: Create a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' + +$params = @{ + AccountEnabled = $true + DisplayName = 'My new device' + AlternativeSecurityIds = $altsecid + DeviceId = $guid + DeviceOSType = 'OS/2' + DeviceOSVersion = '9.3' +} + +New-EntraDevice @params +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb dddddddd-3333-4444-5555-eeeeeeeeeeee My new device +``` + +This command creates a new device. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeSecurityIds + +Specifies alternative security IDs. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApproximateLastLogonTimeStamp + +Specifies last sign-in date time. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceMetadata + +The metadata for this device + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectVersion + +Specifies the object version of the device. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSType + +Specifies the operating system type of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSVersion + +Specifies the operating system version of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DevicePhysicalIds + +Specifies the physical ID. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceTrustType + +The trust type for this device + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompliant + +True if the device complies with Mobile Device Management (MDM) policies; otherwise, false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsManaged + +True if the device is managed by a Mobile Device Management (MDM) app such as Intune; otherwise, false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileType + +Specifies profile type of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemLabels + +Specifies labels for the device. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md new file mode 100644 index 0000000000..bba50a37cd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md @@ -0,0 +1,158 @@ +--- +title: New-EntraDomain +description: This article provides details on the New-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDomain + +schema: 2.0.0 +--- + +# New-EntraDomain + +## Synopsis + +Creates a domain. + +## Syntax + +```powershell +New-EntraDomain + -Name + [-IsDefault ] + [-SupportedServices ] + [] +``` + +## Description + +The `New-EntraDomain` cmdlet creates a domain in Microsoft Entra ID. + +The work or school account needs to belong to at least the Domain Name Administrator role. + +## Examples + +### Example 1: Create a new Domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo.com +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain in Microsoft Entra ID. + +### Example 2: Create a new Domain with a list of domain capabilities + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo1.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo1.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain with the specified services in Microsoft Entra ID. + +### Example 3: Create a new Domain and make if the default new user creation + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraDomain -Name testingDemo2.com -IsDefault $True +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- +testingDemo2.com Managed True False False False False {} +``` + +This example demonstrates how to create a new domain in Microsoft Entra ID and marks it as the default to be used for new user creation. + +## Parameters + +### -IsDefault + +Indicates whether or not this is the default domain that is used for user creation. + +There is only one default domain per company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The fully qualified name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SupportedServices + +The capabilities assigned to the domain. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..2b4e4d8f3b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraAdministrativeUnit +description: This article provides details on the Remove-EntraAdministrativeUnit command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# Remove-EntraAdministrativeUnit + +## Synopsis + +Removes an administrative unit. + +## Syntax + +```powershell +Remove-EntraAdministrativeUnit + -AdministrativeUnitId + [] +``` + +## Description + +The `Remove-EntraAdministrativeUnit` cmdlet removes an administrative unit from Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to delete an administrative unit. + +To delete an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. + +## Examples + +### Example 1: Remove an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +Remove-EntraAdministrativeUnit -ObjectId $AdministrativeUnit.ObjectId +``` + +This command removes the specified administrative unit from Microsoft Entra ID. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md new file mode 100644 index 0000000000..306fdee2a1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md @@ -0,0 +1,108 @@ +--- +title: Remove-EntraAdministrativeUnitMember +description: This article provides details on the Remove-EntraAdministrativeUnitMember command. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Remove-EntraAdministrativeUnitMember + +## Synopsis + +Removes an administrative unit member. + +## Syntax + +```powershell +Remove-EntraAdministrativeUnitMember + -AdministrativeUnitId + -MemberId + [] +``` + +## Description + +The `Remove-EntraAdministrativeUnitMember` cmdlet removes an administrative unit member in Microsoft Entra ID. Specify `AdministrativeUnitId` and `MemberId` to remove an administrative unit member. + +To remove a member from an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. + +## Examples + +### Example 1: Remove an administrative unit member + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + MemberId = 'eeeeeeee-4444-5555-6666-ffffffffffff' +} +Remove-EntraAdministrativeUnitMember @params +``` + +This command removes a specified member (user or group) from a specified administrative unit. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-MemberId` parameter specifies the ID of the administrative unit member. + +## Parameters + +### -MemberId + +Specifies the ID of the administrative unit member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) + +[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md new file mode 100644 index 0000000000..9d5b0e222a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md @@ -0,0 +1,79 @@ +--- +title: Remove-EntraContact +description: This article provides details on the Remove-EntraContact command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraContact + +schema: 2.0.0 +--- + +# Remove-EntraContact + +## Synopsis + +Removes a contact. + +## Syntax + +```powershell +Remove-EntraContact + -OrgContactId + [] +``` + +## Description + +The `Remove-EntraContact` removes a contact from Microsoft Entra ID. + +## Examples + +### Example 1: Remove a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" +Remove-EntraContact -OrgContactId $Contact.ObjectId +``` + +The example shows how to remove a contact. + +## Parameters + +### -OrgContactId + +Specifies the object ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraContact](Get-EntraContact.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md new file mode 100644 index 0000000000..bacb0d4a0c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md @@ -0,0 +1,85 @@ +--- +title: Remove-EntraDevice +description: This article provides details on the Remove-EntraDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDevice + +schema: 2.0.0 +--- + +# Remove-EntraDevice + +## Synopsis + +Deletes a device. + +## Syntax + +```powershell +Remove-EntraDevice + -DeviceId + [] +``` + +## Description + +The `Remove-EntraDevice` cmdlet removes a device from Microsoft Entra ID. + +The calling user must be in one of the following Microsoft Entra roles: Intune Administrator, Windows 365 Administrator, or Cloud Device Administrator. + +## Examples + +### Example 1: Remove a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +$Device = Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" +Remove-EntraDevice -DeviceId $Device.ObjectId +``` + +This command removes the specified device. + +## Parameters + +### -DeviceId + +Specifies the object ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[New-EntraDevice](New-EntraDevice.md) + +[Set-EntraDevice](Set-EntraDevice.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md new file mode 100644 index 0000000000..ec6b3a8a33 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md @@ -0,0 +1,101 @@ +--- +title: Remove-EntraDeviceRegisteredOwner +description: This article provides details on the Remove-EntraDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Remove-EntraDeviceRegisteredOwner + +## Synopsis + +Removes the registered owner of a device. + +## Syntax + +```powershell +Remove-EntraDeviceRegisteredOwner + -OwnerId + -DeviceId + [] +``` + +## Description + +The `Remove-EntraDeviceRegisteredOwner` cmdlet removes the registered owner of a device in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an owner from a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$Device = Get-EntraDevice -Top 1 +$Owner = Get-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId +Remove-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId -OwnerId $Owner.ObjectId +``` + +This examples shows how to remove the owner of a device. + +## Parameters + +### -DeviceId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies an owner ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) + +[Get-EntraDevice](Get-EntraDevice.md) + +[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md new file mode 100644 index 0000000000..ec9ca2ff64 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md @@ -0,0 +1,99 @@ +--- +title: Remove-EntraDeviceRegisteredUser +description: This article provides details on the Remove-EntraDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Remove-EntraDeviceRegisteredUser + +## Synopsis + +Removes a registered user from a device. + +## Syntax + +```powershell +Remove-EntraDeviceRegisteredUser + -DeviceId + -UserId + [] +``` + +## Description + +The `Remove-EntraDeviceRegisteredUser` cmdlet removes a registered user from a Microsoft Entra ID device. + +## Examples + +### Example 1: Remove a registered user from a device + +```Powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$Device = Get-EntraDevice -Top 1 +$User = Get-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId +Remove-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId -UserId $User.ObjectId +``` + +This example shows how to remove the registered user from device. + +## Parameters + +### -DeviceId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) + +[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md new file mode 100644 index 0000000000..4b888305c9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraDirectoryRoleMember +description: This article provides details on the Remove-EntraDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleMember + +## Synopsis + +Removes a member of a directory role. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleMember + -DirectoryRoleId + -MemberId + [] +``` + +## Description + +The `Remove-EntraDirectoryRoleMember` cmdlet removes a member from a directory role in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a member from a directory role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$params = @{ + DirectoryRoleId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + MemberId = '11bb11bb-cc22-dd33-ee44-55ff55ff55ff' +} + +Remove-EntraDirectoryRoleMember @params +``` + +This example removes the specified member from the specified role. + +- `-DirectoryRoleId` - specifies the unique identifier (ObjectId) of the directory role from which the member will be removed. + +- `-MemberId` - specifies the unique identifier (MemberId) of the member (user, group, or service principal) that is to be removed from the specified directory role. + +## Parameters + +### -MemberId + +Specifies the object ID of a role member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DirectoryRoleId + +Specifies the object ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) + +[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md new file mode 100644 index 0000000000..cfd13d0926 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md @@ -0,0 +1,91 @@ +--- +title: Remove-EntraDomain +description: This article provides details on the Remove-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDomain + +schema: 2.0.0 +--- + +# Remove-EntraDomain + +## Synopsis + +Removes a domain. + +## Syntax + +```powershell +Remove-EntraDomain + -Name + [] +``` + +## Description + +The `Remove-EntraDomain` cmdlet removes a domain from Microsoft Entra ID. + +Important: + +- Deleted domains are not recoverable. +- Attempts to delete will fail if there are any resources or objects still dependent on the domain. + +The work or school account needs to belong to at least the `Domain Name Administrator` Microsoft Entra role. + +## Examples + +### Example 1: Remove a domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Remove-EntraDomain -Name Contoso.com +``` + +This command removes a domain from Microsoft Entra ID. + +## Parameters + +### -Name + +Specifies the name of the domain to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Set-EntraDomain](Set-EntraDomain.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md new file mode 100644 index 0000000000..f0b6781699 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md @@ -0,0 +1,79 @@ +--- +title: Remove-EntraExternalDomainFederation +description: This article provides details on the Remove-EntraExternalDomainFederation command. + + +ms.topic: reference +ms.date: 06/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra + +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation + +schema: 2.0.0 +--- + +# Remove-EntraExternalDomainFederation + +## Synopsis + +Delete an externalDomainFederation by external domain name. + +## Syntax + +```powershell +Remove-EntraExternalDomainFederation + -ExternalDomainName + [] +``` + +## Description + +This `Remove-EntraExternalDomainFederation` cmdlet removes an externalDomainFederation by external domain name. + +## Examples + +### Example 1: Deletes an external domain federation setting for a given external domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Remove-EntraExternalDomainFederation -ExternalDomainName 'test.com' +``` + +This command deletes an external domain federation setting. + +- `ExternalDomainName` Parameter specifies unique identifer of an externalDomainFederation. + +## Parameters + +### -ExternalDomainName + +The unique identifer of an externalDomainFederation in Microsoft Entra ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md new file mode 100644 index 0000000000..498ce84d81 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraScopedRoleMembership +description: This article provides details on the Remove-EntraScopedRoleMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership + +schema: 2.0.0 +--- + +# Remove-EntraScopedRoleMembership + +## Synopsis + +Removes a scoped role membership. + +## Syntax + +```powershell +Remove-EntraScopedRoleMembership + -AdministrativeUnitId + -ScopedRoleMembershipId + [] +``` + +## Description + +The `Remove-EntraScopedRoleMembership` cmdlet removes a scoped role membership from Microsoft Entra ID. Specify `AdministrativeUnitId` and `ScopedRoleMembershipId` parameter to remove a scoped role membership. + +## Examples + +### Example 1: Remove a scoped role membership + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.AdministrativeUnitId + ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' +} +Remove-EntraScopedRoleMembership @params +``` + +This cmdlet removes a specific scoped role membership from Microsoft Entra ID. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-ScopedRoleMembershipId` parameter specifies the ID of the scoped role membership to remove. To obtain the details of a scoped role membership, you can use the `Get-EntraScopedRoleMembership` command. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ScopedRoleMembershipId + +Specifies the ID of the scoped role membership to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) + +[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md new file mode 100644 index 0000000000..ce69a357d3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md @@ -0,0 +1,154 @@ +--- +title: Restore-EntraDeletedDirectoryObject +description: This article provides details on the Restore-EntraDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Restore-EntraDeletedDirectoryObject + +## Synopsis + +Restore a previously deleted object. + +## Syntax + +```powershell +Restore-EntraDeletedDirectoryObject + -Id + [] +``` + +## Description + +The `Restore-EntraDeletedDirectoryObject` cmdlet is used to restore previously deleted objects, such as application, group, service principal, administrative unit, or user objects. + +When a group or application is deleted, it is initially soft deleted and can be recovered within the first 30 days. After 30 days, the deleted object is permanently deleted and cannot be recovered. + +**Notes:** + +- Only Unified Groups (also known as Office 365 Groups) can be restored; Security groups cannot be restored. +- Restoring an application does not automatically restore its associated service principal. You must explicitly use this cmdlet to restore the deleted service principal. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles: + +- **To restore deleted applications or service principals:** Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. +- **To restore deleted users:** User Administrator. + - However, to restore users with privileged administrator roles: + - In delegated scenarios, the app must be assigned the `Directory.AccessAsUser.All` delegated permission, and the calling user must also be assigned a higher privileged administrator role. + - In app-only scenarios, in addition to being granted the `User.ReadWrite.All` application permission, the app must be assigned a higher privileged administrator role. +- **To restore deleted groups:** Groups Administrator. + - However, to restore role-assignable groups, the calling user must be assigned the Privileged Role Administrator role. + +## Examples + +### Example 1: Restore a deleted object with ID + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' #administrativeUnit resource +Connect-Entra -Scopes 'Application.ReadWrite.All' #application resource +Connect-Entra -Scopes 'Group.ReadWrite.All' #group resource +Connect-Entra -Scopes 'Application.ReadWrite.All' #servicePrincipal resource +Connect-Entra -Scopes 'User.ReadWrite.All' #user resource +Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example shows how to restore a deleted object in Microsoft Entra ID. + +- `-Id` parameter specifies the Id of the directory object to restore. + +### Example 2: Restoring a Soft-Deleted User and Removing Conflicting Proxy Addresses + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -AutoReconcileProxyConflict +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example shows how to restore a deleted object in Microsoft Entra ID. + +- `-Id` parameter specifies the Id of the directory object to restore. +- `-AutoReconcileProxyConflict` parameter removes any conflicting proxy addresses while restoring a soft-deleted user whose one or more proxy addresses are currently used for an active user. + +## Parameters + +### -Id + +The Id of the directory object to restore. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AutoReconcileProxyConflict + +Specifies whether Microsoft Entra ID should remove conflicting proxy addresses when restoring a soft-deleted user, if any of the user's proxy addresses are currently in use by an active user. This parameter applies only when restoring a soft-deleted user. The default value is `false`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) + +[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) + +[Remove-EntraDeletedDirectoryObject](Remove-EntraDeletedDirectoryObject.md) + +[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) + +[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md new file mode 100644 index 0000000000..9087e6ebfb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md @@ -0,0 +1,145 @@ +--- +title: Set-EntraAdministrativeUnit +description: This article provides details on the Set-EntraAdministrativeUnit command. + +ms.topic: reference +ms.date: 06/19/2023 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit + +schema: 2.0.0 +--- + +# Set-EntraAdministrativeUnit + +## Synopsis + +Updates an administrative unit. + +## Syntax + +```powershell +Set-EntraAdministrativeUnit + -AdministrativeUnitId + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +The `Set-EntraAdministrativeUnit` cmdlet updates an administrative unit in Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to update a specific administrative unit. + +In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. + +The Privileged Role Administrator is the least privileged role required for this operation. + +## Examples + +### Example 1: Update DisplayName + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + DisplayName = 'UpdatedAU' +} +Set-EntraAdministrativeUnit @params +``` + +This Command update DisplayName of specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-DisplayName` parameter specifies the display name for the administrative unit. + +### Example 2: Update Description + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + Description = 'Updated AU Description' +} +Set-EntraAdministrativeUnit @params +``` + +This example shows how to update the description of a specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-Description` parameter specifies the description for the administrative unit. + +## Parameters + +### -Description + +Specifies a description. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the Id of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) + +[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) + +[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md new file mode 100644 index 0000000000..71c1d09ff0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md @@ -0,0 +1,147 @@ +--- +title: Set-EntraAttributeSet +description: This article provides details on the Set-EntraAttributeSet command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAttributeSet + +schema: 2.0.0 +--- + +# Set-EntraAttributeSet + +## Synopsis + +Updates an existing attribute set. + +## Syntax + +```powershell +Set-EntraAttributeSet + -AttributeSetId + [-Description ] + [-MaxAttributesPerSet ] + [] +``` + +## DESCRIPTION + +The `Set-EntraAttributeSet` cmdlet updates a Microsoft Entra ID attribute set object specified by its ID. Specify `AttributeSetId` parameter to Update a Microsoft Entra ID attribute set object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. + +Note: Only the Attribute Definition Administrator role is supported for this operation. Ensure the signed-in user is assigned this role. + +You can only update the `description` and `maxAttributesPerSet` properties. + +## Examples + +### Example 1: Update an attribute set + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Engineering' + Description = 'Attributes for cloud engineering team' +} +Set-EntraAttributeSet @params +``` + +This example update an attribute set. + +- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. +- `-Description` parameter specifies the description for the attribute set. + +### Example 2: Update an attribute set using MaxAttributesPerSet + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Engineering' + MaxAttributesPerSet = 10 +} +Set-EntraAttributeSet @params +``` + +This example update an attribute set using MaxAttributesPerSet. + +- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. +- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. + +## Parameters + +### -Description + +Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AttributeSetId + +Name of the attribute set. Unique identifier for the attribute set within a tenant. This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MaxAttributesPerSet + +Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraAttributeSet](New-EntraAttributeSet.md) + +[Get-EntraAttributeSet](Get-EntraAttributeSet.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..d91b797cc7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md @@ -0,0 +1,149 @@ +--- +title: Set-EntraCustomSecurityAttributeDefinition +description: This article provides details on the Set-EntraCustomSecurityAttributeDefinition command. + + +ms.topic: reference +ms.date: 07/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# Set-EntraCustomSecurityAttributeDefinition + +## Synopsis + +Update the properties of a customSecurityAttributeDefinition object. + +## Syntax + +```powershell +Set-EntraCustomSecurityAttributeDefinition + -Id + [-Description ] + [-Status ] + [-UsePreDefinedValuesOnly ] + [] +``` + +## Description + +Update the properties of a customSecurityAttributeDefinition object. Specify `Id` parameter to update a custom security attribute definition. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Update a custom security attribute + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + Id = 'Engineering_ProjectDate' + Description = 'Add-description' + Status = 'Available' + UsePreDefinedValuesOnly = $False +} +Set-EntraCustomSecurityAttributeDefinition @params +``` + +This example update a custom security attribute. + +- `-Id` parameter specifies the custom security attribute definition object ID. +- `-Description` parameter specifies the description of the custom security attribute. +- `-Status` parameter specifies the custom security attribute is active or deactivated. +- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. + +## Parameters + +### -Description + +Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID custom security attribute definition object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Status + +Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsePreDefinedValuesOnly + +Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) + +[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..a2b37457d9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,126 @@ +--- +title: Set-EntraCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Set-EntraCustomSecurityAttributeDefinitionAllowedValue command. + +ms.topic: reference +ms.date: 07/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue + +schema: 2.0.0 +--- + +# Set-EntraCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Updates an existing custom security attribute definition predefined value. + +## Syntax + +```powershell +Set-EntraCustomSecurityAttributeDefinitionAllowedValue + [-IsActive ] + -CustomSecurityAttributeDefinitionId + -Id [] +``` + +## Description + +The `Set-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdlet update a Microsoft Entra ID custom security attribute definition predefined value object identified by ID. Specify `CustomSecurityAttributeDefinitionId` and `Id` parameter to update a Microsoft Entra ID custom security attribute definition predefined value. + +## Examples + +### Example 1: Update a custom security attribute definition predefined value + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + CustomSecurityAttributeDefinitionId = 'Engineering_Project' + Id = 'Alpine' + IsActive = $true +} +Set-EntraCustomSecurityAttributeDefinitionAllowedValue @params +``` + +This example update a custom security attribute definition predefined value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. +- `-Id` parameter specifies the ID of Microsoft Entra ID Object. +- `-IsActive` parameter specifies the predefined value is active or deactivated. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier of customSecurityAttributeDefinition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. This field is optional. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsActive + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any other supported directory objects. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) + +[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md new file mode 100644 index 0000000000..2e21b12941 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md @@ -0,0 +1,387 @@ +--- +title: Set-EntraDevice +description: This article provides details on the Set-EntraDevice command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDevice + +schema: 2.0.0 +--- + +# Set-EntraDevice + +## Synopsis + +Updates a device. + +## Syntax + +```powershell +Set-EntraDevice + -DeviceObjectId + [-DevicePhysicalIds ] + [-DeviceOSType ] + [-DeviceTrustType ] + [-DisplayName ] + [-DeviceMetadata ] + [-ApproximateLastLogonTimeStamp ] + [-AccountEnabled ] + [-IsManaged ] + [-DeviceId ] + [-DeviceObjectVersion ] + [-IsCompliant ] + [-DeviceOSVersion ] + [-AlternativeSecurityIds ] + [-ProfileType ] + [-SystemLabels ] + [] +``` + +## Description + +The `Set-EntraDevice` cmdlet updates a device in Microsoft Entra ID. + +The calling user must have at least the Intune Administrator role in Microsoft Entra. A user with the Cloud Device Administrator role can only enable or disable devices, while a user with the Windows 365 Administrator role can only update basic device properties. + +## Examples + +### Example 1: Update a device display name + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName 'My OS/2 computer' +``` + +This example shows how to update a display name of a specified. + +### Example 2: Update a device alternative security ID + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +$NewId= New-Object Microsoft.Open.AzureAD.Model.AlternativeSecurityId +$NewId.Key =[System.Text.Encoding]::UTF8.GetBytes('test') +$NewId.type = 2 +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AlternativeSecurityIds $NewId +``` + +This example shows how to update an alternative security ID of a specified device. + +### Example 3: Update a device account enabled + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AccountEnabled $true +``` + +This example shows how to update an account enabled of a specified device. + +### Example 4: Update a device OS type + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DeviceOSType Windows +``` + +This example shows how to update an OS type of a specified device. + +### Example 5: Update a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' + +$params = @{ + DeviceObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DeviceMetadata = 'Testdevice' + DeviceObjectVersion = 4 + DevicePhysicalIds = '[GID]:g:1234567890123456' + IsCompliant = $false +} + +Set-EntraDevice @params +``` + +This example shows how to update multiple properties of a specified device. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeSecurityIds + +Specifies alternative security IDs. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApproximateLastLogonTimeStamp + +The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderby. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the device ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceMetadata + +The device metadata for this device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectVersion + +Specifies the object version of the device. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSType + +Specifies the operating system. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSVersion + +Specifies the operating system version. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DevicePhysicalIds + +Specifies the physical ID. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceTrustType + +Specifies the device trust type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompliant + +Indicates whether the device is compliant. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsManaged + +Indicates whether the device is managed. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectId + +Specifies the object ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProfileType + +Specifies the profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemLabels + +Specifies list of labels applied to the device by the system. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDevice](Get-EntraDevice.md) + +[New-EntraDevice](New-EntraDevice.md) + +[Remove-EntraDevice](Remove-EntraDevice.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md new file mode 100644 index 0000000000..1226207ac6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md @@ -0,0 +1,144 @@ +--- +title: Set-EntraDirSyncConfiguration +description: This article provides details on the Set-EntraDirSyncConfiguration command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration + +schema: 2.0.0 +--- + +# Set-EntraDirSyncConfiguration + +## Synopsis + +Modifies the directory synchronization settings. + +## Syntax + +```powershell +Set-EntraDirSyncConfiguration + -AccidentalDeletionThreshold + [-Force] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraDirSyncConfiguration` cmdlet modifies the directory synchronization settings. + +## Examples + +### Example 1: Set directory synchronization settings + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold 600 -Force +``` + +This command sets directory synchronization settings. + +- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Set directory synchronization settings for a Tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$tenantID = (Get-EntraContext).TenantId +$params = @{ + AccidentalDeletionThreshold = 600 + TenantId = $tenantID + Force = $true +} + +Set-EntraDirSyncConfiguration @params +``` + +This command sets directory synchronization settings. + +- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. +- `-Force` Forces the command to run without asking for user confirmation. +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -AccidentalDeletionThreshold + +Specifies the accidental deletion prevention configuration for a tenant. + +```yaml +Type: System.UInt32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: SetAccidentalDeletionThreshold +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.UInt32 + +### System.Guid + +## Outputs + +### System.Object + +## Notes + +- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). + +## Related Links + +[Get-EntraDirSyncConfiguration](Get-EntraDirSyncConfiguration.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md new file mode 100644 index 0000000000..75055a97f0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md @@ -0,0 +1,140 @@ +--- +title: Set-EntraDirSyncEnabled +description: This article provides details on the Set-EntraDirSyncEnabled command. + + +ms.topic: reference +ms.date: 09/27/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled + +schema: 2.0.0 +--- + +# Set-EntraDirSyncEnabled + +## Synopsis + +Turns directory synchronization on or off for a company. + +## Syntax + +```powershell +Set-EntraDirSyncEnabled + -EnableDirSync + [-Force] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraDirSyncEnabled` cmdlet turns directory synchronization on or off for a company. +>[!IMPORTANT] +>It may take up to 72 hours to complete deactivation once you have disabled DirSync through this cmdlet. The time depends on the number of objects that are in your cloud service subscription account. **You cannot cancel the disable action**. It will need to complete before you can take any other action, including re-enabling of DirSync. If you choose to re-enable DirSync, a full synchronization of your synced objects will happen. This may take a considerable time depending on the number of objects in your Microsoft Entra ID. +>[!NOTE] +>If you disable DirSync and you decide to re-enable it, and you have enabled the BlockCloudObjectTakeoverThroughHardMatch feature, OnPrem to cloud object takeover/update for all objects mastered in the Microsoft Entra ID will be blocked. If this is the case and you want to resume syncing Microsoft Entra ID mastered objects with Microsoft Entra ID, set **BlockCloudObjectTakeoverThroughHardMatch** feature to false. + +## Examples + +### Example 1: Turn on directory synchronization + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' +$params = @{ + EnableDirsync = $True + Force = $True +} +Set-EntraDirSyncEnabled @params +``` + +This example turns on directory synchronization for a company. + +- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Turn off directory synchronization + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' +$params = @{ + EnableDirsync = $False + TenantId = 'aaaaaaaa-1111-1111-1111-000000000000' + Force = $True + +} +Set-EntraDirSyncEnabled @params +``` + +This example turns off directory synchronization for a company. + +- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. +- `-Force` Forces the command to run without asking for user confirmation. +- `-TenantId` Specifies the unique ID of the tenant on which to perform the operation. + +## Parameters + +### -EnableDirsync + +Specifies whether to turn on directory synchronization on for your company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the unique ID of the tenant on which to perform the operation. +The default value is the tenant of the current user. +This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md new file mode 100644 index 0000000000..7dcceca78b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md @@ -0,0 +1,187 @@ +--- +title: Set-EntraDirSyncFeature +description: This article provides details on the Set-EntraDirSyncFeature command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncFeature + +schema: 2.0.0 +--- + +# Set-EntraDirSyncFeature + +## Synopsis + +Used to set identity synchronization features for a tenant. + +## Syntax + +```powershell +Set-EntraDirSyncFeature + -Feature + -Enabled + [-TenantId ] + [-Force] + [] +``` + +## Description + +The `Set-EntraDirSyncFeature` cmdlet sets identity synchronization features for a tenant. + +You can use the following synchronization features with this cmdlet: + +- **EnableSoftMatchOnUpn**: Soft match is the process used to link an object being synced from on-premises for the first time with one that already exists in the cloud. When this feature is enabled, soft match is attempted using the standard logic, based on the primary SMTP address. If a match isn't found based on primary SMTP, then a match is attempted based on UserPrincipalName. Once this feature is enabled, it can't be disabled. +- **PasswordSync**: Used to indicate on-premise password synchronization. +- **SynchronizeUpnForManagedUsers**: Allows for the synchronization of UserPrincipalName updates from on-premises for managed (nonfederated) users that are assigned a license. These updates are blocked if this feature isn't enabled. Once this feature is enabled, it can't be disabled. +- **BlockSoftMatch**: When this feature is enabled, it blocks the soft match feature. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching is completed and is no longer needed. +- **BlockCloudObjectTakeoverThroughHardMatch**: Used to block cloud object takeover via source anchor hard match. + +Enabling some of these features, such as EnableSoftMatchOnUpn and SynchronizationUpnForManagedUsers, is a permanent operation. +You can't disable these features once they're enabled. + +## Examples + +### Example 1: Enable a feature for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockCloudObjectTakeoverThroughHardMatch' + Enable = $True +} +Set-EntraDirSyncFeature @params +``` + +This command enables the SoftMatchOnUpn feature for the tenant. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Block Soft Matching for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockSoftMatch' + Enable = $True +} + +Set-EntraDirSyncFeature @params +``` + +This command enables the BlockSoftMatch feature for the tenant - effectively blocking the Soft Matching feature in the tenant. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. + +### Example 3: Block Cloud object takeover through Hard Matching for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockCloudObjectTakeoverThroughHardMatch' + Enable = $True +} + +Set-EntraDirSyncFeature @params +``` + +This command enables the BlockCloudObjectTakeoverThroughHardMatch feature for the tenant - effectively blocking the Hard Match object takeover. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -Feature + +The DirSync feature to turn on or off. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Enable + +Indicates whether the specified features are turned on for the company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). +- For the feature list see the [onPremisesDirectorySynchronizationFeature resource type](https://learn.microsoft.com/graph/api/resources/onpremisesdirectorysynchronizationfeature). + +## Related Links + +[Get-EntraDirSyncFeature](Get-EntraDirSyncFeature.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md new file mode 100644 index 0000000000..d2000341f7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md @@ -0,0 +1,135 @@ +--- +title: Set-EntraDomain +description: This article provides details on the Set-EntraDomain command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomain + +schema: 2.0.0 +--- + +# Set-EntraDomain + +## Synopsis + +Updates a domain. + +## Syntax + +```powershell +Set-EntraDomain + -Name + [-IsDefault ] + [-SupportedServices ] + [] +``` + +## Description + +The `Set-EntraDomain` cmdlet updates a verified domain in Microsoft Entra ID. + +The work or school account needs to belong to at least one of the following Microsoft Entra roles: + +- Domain Name Administrator +- Security Administrator +- External Identity Provider Administrator + +## Examples + +### Example 1: Set the domain as the default domain for new user account creation + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Set-EntraDomain -Name Contoso.com -IsDefault $true +``` + +This example demonstrates how to set default domain for new user account in Microsoft Entra ID. + +### Example 2: Set the list of domain capabilities + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Set-EntraDomain -Name Contoso.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') +``` + +This example demonstrates how to set domain capabilities for new user account in Microsoft Entra ID. + +## Parameters + +### -IsDefault + +Indicates whether or not this is the default domain that is used for user creation. +There's only one default domain per company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The fully qualified name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SupportedServices + +The capabilities assigned to the domain. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraDomain](Confirm-EntraDomain.md) + +[Get-EntraDomain](Get-EntraDomain.md) + +[New-EntraDomain](New-EntraDomain.md) + +[Remove-EntraDomain](Remove-EntraDomain.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md new file mode 100644 index 0000000000..21dbb0f668 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md @@ -0,0 +1,290 @@ +--- +title: Set-EntraDomainFederationSettings +description: This article provides details on the Set-EntraDomainFederationSettings command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings + +schema: 2.0.0 +--- + +# Set-EntraDomainFederationSettings + +## Synopsis + +Updates settings for a federated domain. + +## Syntax + +```powershell +Set-EntraDomainFederationSettings + -DomainName + [-SigningCertificate ] + [-NextSigningCertificate ] + [-LogOffUri ] + [-PassiveLogOnUri ] + [-ActiveLogOnUri ] + [-IssuerUri ] + [-FederationBrandName ] + [-MetadataExchangeUri ] + [-PreferredAuthenticationProtocol ] + [-SigningCertificateUpdateStatus ] + [-PromptLoginBehavior ] + [] +``` + +## Description + +The `Set-EntraDomainFederationSettings` cmdlet is used to update the settings of a single sign-on domain. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Set the PromptLoginBehavior + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' + +$params = @{ + DomainName = 'contoso.com' + PreferredAuthenticationProtocol = 'WsFed' + PromptLoginBehavior = 'TranslateToFreshPasswordAuth' # Or 'NativeSupport' or 'Disabled', depending on the requirement +} +Set-EntraDomainFederationSettings @params +``` + +This command updates the `PromptLoginBehavior` to either `TranslateToFreshPasswordAuth`, `NativeSupport`, or `Disabled`. These possible values are described: + +- `TranslateToFreshPasswordAuth` - means the default Microsoft Entra ID behavior of translating `prompt=login` to `wauth=https://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password` and `wfresh=0`. +- `NativeSupport` - means that the `prompt=login` parameter is sent as is to ADFS. +- `Disabled` - means that only wfresh=0 is sent to ADFS + +Use the `Get-EntraDomainFederationSettings -DomainName | Format-List *` to get the values for `PreferredAuthenticationProtocol` and `PromptLoginBehavior` for the federated domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. +- `-PreferredAuthenticationProtocol` parameter specifies the preferred authentication protocol. +- `-PromptLoginBehavior` parameter specifies the prompt sign-in behavior. + +## Parameters + +### -DomainName + +The fully qualified domain name (FQDN) to update. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -SigningCertificate + +The current certificate used to sign tokens passed to the Microsoft Entra ID Identity platform. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NextSigningCertificate + +The next token signing certificate that will be used to sign tokens when the primary signing certificate expires. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -LogOffUri + +The URL clients are redirected to when they sign out of Microsoft Entra ID services. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PassiveLogOnUri + +The URL that web-based clients will be directed to when signing in to Microsoft Entra ID services. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ActiveLogOnUri + +A URL that specifies the end point used by active clients when authenticating with domains set up for single sign-on (also known as identity federation) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IssuerUri + +The unique identifier of the domain in the Microsoft Entra ID Identity platform derived from the federation server. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FederationBrandName + +The name of the string value shown to users when signing in to Microsoft Entra ID. +We recommend that customers use something that is familiar to +users such as "Contoso Inc." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MetadataExchangeUri + +The URL that specifies the metadata exchange end point used for authentication from rich client applications such as Lync Online. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PreferredAuthenticationProtocol + +Specifies the preferred authentication protocol. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 10 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SigningCertificateUpdateStatus + +Specifies the update status of the signing certificate. + +```yaml +Type: System.Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: 11 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PromptLoginBehavior + +Specifies the prompt login behavior. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 12 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraDomainFederationSettings](Get-EntraDomainFederationSettings.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md new file mode 100644 index 0000000000..1a4ad58b18 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md @@ -0,0 +1,242 @@ +--- +title: Set-EntraPartnerInformation +description: This article provides details on the Set-EntraPartnerInformation command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPartnerInformation + +schema: 2.0.0 +--- + +# Set-EntraPartnerInformation + +## Synopsis + +Sets company information for partners. + +## Syntax + +```powershell +Set-EntraPartnerInformation + [-CompanyType ] + [-PartnerCompanyName ] + [-PartnerSupportTelephones ] + [-PartnerSupportEmails ] + [-PartnerCommerceUrl ] + [-PartnerSupportUrl ] + [-PartnerHelpUrl ] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraPartnerInformation` cmdlet is used by partners to set partner-specific properties. + +These properties can view by all tenants that the partner has access to. + +## Examples + +### Example 1: Update the help URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerHelpUrl 'http://www.help.contoso.com' +``` + +This example shows how to update the help URL. + +### Example 2: Update the Support URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerSupportUrl 'http://www.test1.com' +``` + +This example shows how to update the support URL. + +### Example 3: Update the Commerce URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerCommerceUrl 'http://www.test1.com' +``` + +This example shows how to update the commerce URL. + +### Example 4: Update the SupportEmails + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraPartnerInformation -PartnerSupportEmails 'contoso@example.com' +``` + +This example shows how to update the support email addresses. + +### Example 5: Update the SupportTelephones + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$tenantId = (Get-EntraContext).TenantId +$params = @{ + PartnerSupportTelephones = '234234234' + TenantId = $tenantId +} +Set-EntraPartnerInformation @params +``` + +This example shows how to update support telephone numbers. + +## Parameters + +### -PartnerCommerceUrl + +Specifies the URL for the partner's commerce website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerHelpUrl + +Specifies the URL for the partner's Help website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportEmails + +Specifies the support email address for the partner. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportTelephones + +Specifies the support telephone numbers for the partner. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportUrl + +Specifies the URL for the partner's support website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the unique ID of the tenant on which to perform the operation. +The default value is the tenant of the current user. +This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -CompanyType + +Specifies the partner's company type. + +```yaml +Type: CompanyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerCompanyName + +Specifies the partner's company name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPartnerInformation](Get-EntraPartnerInformation.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md new file mode 100644 index 0000000000..24191c6eb6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md @@ -0,0 +1,216 @@ +--- +title: Set-EntraTenantDetail +description: This article provides details on the Set-EntraTenantDetail command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTenantDetail + +schema: 2.0.0 +--- + +# Set-EntraTenantDetail + +## Synopsis + +Set contact details for a tenant. + +## Syntax + +```powershell +Set-EntraTenantDetail + [-PrivacyProfile ] + [-MarketingNotificationEmails ] + [-TechnicalNotificationMails ] + [-SecurityComplianceNotificationMails ] + [-SecurityComplianceNotificationPhones ] + [] +``` + +## Description + +This cmdlet is used to set various contact details for a tenant. + +For delegated scenarios, the signed-in user must have at least one of the following Microsoft Entra roles. + +- Application Administrator +- Cloud Application Administrator +- Privileged Role Administrator +- User Administrator +- Helpdesk Administrator + +## Examples + +### Example 1: Set contact details for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$params = @{ + MarketingNotificationEmails = @('amy@contoso.com', 'henry@contoso.com') + SecurityComplianceNotificationMails = @('john@contoso.com', 'mary@contoso.com') + SecurityComplianceNotificationPhones = @('1-555-625-9999', '1-555-233-5544') + TechnicalNotificationMails = 'peter@contoso.com' +} + +Set-EntraTenantDetail @params +``` + +This example demonstrates how to set various contact details for a tenant. + +- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. +- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. +- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. +- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. + +### Example 2: Set MarketingNotificationEmails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -MarketingNotificationEmails @('amy@contoso.com','henry@contoso.com') +``` + +This example demonstrates how to set MarketingNotificationEmails detail for a tenant. + +- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. + +### Example 3: Set SecurityComplianceNotificationMails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -SecurityComplianceNotificationMails @('john@contoso.com','mary@contoso.com') +``` + +This example demonstrates how to set SecurityComplianceNotificationMails detail for a tenant. + +- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. + +### Example 4: Set -SecurityComplianceNotificationPhones for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -SecurityComplianceNotificationPhones @('1-555-625-9999', '1-555-233-5544') +``` + +This example demonstrates how to set MarketingNotificationEmails detail for a tenant. + +- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. + +### Example 5: Set TechnicalNotificationMails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraTenantDetail -TechnicalNotificationMails 'peter@contoso.com' +``` + +This example demonstrates how to set TechnicalNotificationMails detail for a tenant. + +- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. + +## Parameters + +### -MarketingNotificationEmails + +The email addresses that are used to send marketing notification emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityComplianceNotificationMails + +The email addresses that are used to send security compliance emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityComplianceNotificationPhones + +One or more phone numbers that are used for security compliance. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TechnicalNotificationMails + +The email addresses that are used for technical notification emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivacyProfile + +Represents a company's privacy profile, which includes a privacy statement URL and a contact person for questions regarding the privacy statement. + +```yaml +Type: PrivacyProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +- For more details see [Update organization](https://learn.microsoft.com/graph/api/organization-update). + +## Related Links + +[Get-EntraTenantDetail](Get-EntraTenantDetail.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..7c86ba6f95 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md @@ -0,0 +1,282 @@ +--- +title: Get-EntraDirectoryRoleAssignment +description: This article provides details on the Get-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleAssignment + +## Synopsis + +Get a Microsoft Entra ID roleAssignment. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRoleAssignment + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetValue + +```powershell +Get-EntraDirectoryRoleAssignment + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRoleAssignment + -UnifiedRoleAssignmentId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleAssignment` cmdlet gets information about role assignments in Microsoft Entra ID. To get a role assignment, specify the `UnifiedRoleAssignmentId` parameter. Specify the `SearchString` or `Filter` parameter to find a particular role assignment. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: + +- microsoft.directory/roleAssignments/standard/read (least privileged) +- microsoft.directory/roleAssignments/allProperties/read +- microsoft.directory/roleAssignments/allProperties/allTasks + +The least privileged roles for this operation, from least to most privileged, are: + +- Directory Readers +- Global Reader +- Privileged Role Administrator + +## Examples + +### Example 1: Get role assignments + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments in Microsoft Entra ID. + +### Example 2: Get role assignments using 'All' parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -All +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets all the role assignments in Microsoft Entra ID. + +### Example 3: Get role assignments by Id + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId '00001111-aaaa-2222-bbbb-3333cccc4444' +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments using specified roleAssignment Id. + +- `UnifiedRoleAssignmentId` parameter specifies the roleAssignment object ID. + +### Example 4: Get role assignments filter by principalId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Filter "principalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments containing the specified principalId. + +### Example 5: Get role assignments filter by roleDefinitionId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Filter "roleDefinitionId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments containing the specified roleDefinitionId. + +### Example 6: Get top two role assignments + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleAssignment -Top 2 +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets top two role assignments. + +## Parameters + +### -UnifiedRoleAssignmentId + +The unique identifier of a Microsoft Entra ID roleAssignment object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment + +## Notes + +`Get-EntraRoleAssignment` is an alias for `Get-EntraDirectoryRoleAssignment`. + +## Related Links + +[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) + +[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md b/moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..7fcd4cd5a8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md @@ -0,0 +1,273 @@ +--- +title: Get-EntraDirectoryRoleDefinition +description: This article provides details on the Get-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Get-EntraDirectoryRoleDefinition + +## Synopsis + +Gets information about role definitions in Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDirectoryRoleDefinition + [-All] + [-Top ] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraDirectoryRoleDefinition + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraDirectoryRoleDefinition` cmdlet gets information about role definitions in Microsoft Entra ID. To get a role definition, specify the `UnifiedRoleDefinitionId` parameter. Specify the `SearchString` or `Filter` parameter to find particular role definition. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: + +- microsoft.directory/roleAssignments/standard/read (least privileged) +- microsoft.directory/roleAssignments/allProperties/read +- microsoft.directory/roleAssignments/allProperties/allTasks + +The least privileged roles for this operation, from least to most privileged, are: + +- Directory Readers +- Global Reader +- Privileged Role Administrator + +## Examples + +### Example 1: Get all role definitions + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Guest User 10dae51f-b6af-4016-8d66-8c2a99b929b3 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command returns all the role definitions present. + +### Example 2: Get a role definition by UnifiedRoleDefinitionId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId '1a327991-10cb-4266-877a-998fb4df78ec' +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command returns a specified role definition. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. + +### Example 3: Filter role definitions by display name + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -Filter "startsWith(displayName, 'Restricted')" +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command return all the role definitions containing the specified display name. + +### Example 4: Get top two role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -Top 2 +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +Restricted Guest User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. True True +``` + +This command return top two the role definitions in Microsoft Entra DirectoryRoleId. + +### Example 5: Filter role definitions by display name + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraDirectoryRoleDefinition -SearchString 'Global' + ``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +Global Administrator 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identit… +Global Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff f2ef992c-3afb-46b9-b7cf-a126ee74c451 Can read everything that a Global Administrator can, but not update anything. +``` + +This command return all the role definitions containing the specified display name. + +## Parameters + +### -UnifiedRoleDefinitionId + +Specifies the UnifiedRoleDefinitionId of the role definition. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records that this cmdlet gets. The default value is 100. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter string to match a set of role definitions. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +`Get-EntraRoleDefinition` is an alias for `Get-EntraDirectoryRoleDefintion`. + +## Related Links + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) + +[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..aae90daa6d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md @@ -0,0 +1,136 @@ +--- +title: New-EntraDirectoryRoleAssignment +description: This article provides details on the New-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraDirectoryRoleAssignment + +## Synopsis + +Create a new Microsoft Entra ID roleAssignment. + +## Syntax + +```powershell +New-EntraDirectoryRoleAssignment + -PrincipalId + -RoleDefinitionId + [-DirectoryScopeId ] + [] +``` + +## Description + +The `New-EntraDirectoryRoleAssignment` cmdlet creates a new Microsoft Entra role assignment. + +## Examples + +### Example 1: Create a new Microsoft Entra ID role assignment + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' +$params = @{ + RoleDefinitionId = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + PrincipalId = 'aaaaaaaa-bbbb-cccc-1111-222222222222' + DirectoryScopeId = '/' + } + +New-EntraDirectoryRoleAssignment @params +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command creates a new role assignment in Microsoft Entra ID. + +- `-RoleDefinitionId` parameter specifies the ID of the role definition that you want to assign. Role definitions describe the permissions that are granted to users or groups by the role. This is the Identifier of the `unifiedRoleDefinition` the assignment is for. + +- `-PrincipalId` parameter specifies the ID of the principal (user, group, or service principal) to whom the role is being assigned. + +- `-DirectoryScopeId` parameter specifies the scope of the directory over which the role assignment is effective. The '/' value typically represents the root scope, meaning the role assignment is applicable across the entire directory. + +## Parameters + +### -DirectoryScopeId + +Specifies the scope for the role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies the principal for role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleDefinitionId + +Specifies the role definition for role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment + +## Notes + +`New-EntraRoleAssignment` is an alias for `New-EntraDirectoryRoleAssignment`. + +## Related Links + +[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) + +[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md b/moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d55868d7d6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md @@ -0,0 +1,330 @@ +--- +title: New-EntraDirectoryRoleDefinition +description: This article provides details on the New-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# New-EntraDirectoryRoleDefinition + +## Synopsis + +Create a new Microsoft Entra ID roleDefinition. + +## Syntax + +```powershell +New-EntraDirectoryRoleDefinition + [-TemplateId ] + -DisplayName + -RolePermissions + [-Description ] + [-Version ] + -IsEnabled + [-ResourceScopes ] + [] +``` + +## Description + +Create a new Microsoft Entra ID roleDefinition object. + +## Examples + +### Example 1: Creates a new role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output + +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 93ff7659-04bd-4d97-8add-b6c992cce98e False False + +``` + +This command creates a new role definition in Microsoft Entra ID. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. + +### Example 2: Creates a new role definition with Description parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + Description = 'Role Definition demo' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output + +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 e14cb8e2-d696-4756-bd7f-c7df25271f3d Role Definition demo False False + +``` + +This command creates a new role definition with Description parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Description` parameter specifies the description for the role definition. + +### Example 3: Creates a new role definition with ResourceScopes parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + ResourceScopes = '/' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 2bc29892-ca2e-457e-b7c0-03257a0bcd0c False False + +``` + +This command creates a new role definition with ResourceScopes parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-ResourceScopes` parameter specifies the resource scopes for the role definition. + +### Example 4: Creates a new role definition with TemplateId parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + TemplateId = '4dd5aa9c-cf4d-4895-a993-740d342802b9' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 4dd5aa9c-cf4d-4895-a993-740d342802b9 False False + +``` + +This command creates a new role definition with TemplateId parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-TemplateId` parameter specifies the template ID for the role definition. + +### Example 5: Creates a new role definition with Version parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + Version = '2' +} + +New-EntraDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 b69d16e9-b3f9-4289-a87f-8f796bd9fa28 False False + +``` + +This command creates a new role definition with Version parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Version` parameter specifies the version for the role definition. + +## Parameters + +### -Description + +Specifies a description for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role isn't available for assignment. Read-only when `isBuiltIn` is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceScopes + +Specifies the resource scopes for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolePermissions + +Specifies permissions for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateId + +Specifies the template ID for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version + +Specifies version for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition + +## Notes + +`New-EntraRoleDefinition` is an alias for `New-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md new file mode 100644 index 0000000000..ba9841b7cd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraDirectoryRoleAssignment +description: This article provides details on the Remove-EntraDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleAssignment + +## Synopsis + +Delete a Microsoft Entra ID roleAssignment. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleAssignment + -UnifiedRoleAssignmentId + [] +``` + +## Description + +The `Remove-EntraDirectoryRoleAssignment` cmdlet removes a role assignment from Microsoft Entra ID. + +## Examples + +### Example 1: Remove a role assignment + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' +Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId Y1vFBcN4i0e3ngdNDocmngJAWGnAbFVAnJQyBBLv1lM-1 +``` + +This example removes the specified role assignment from Microsoft Entra ID. + +- `-Id` parameter specifies the role assignment ID. + +## Parameters + +### -UnifiedRoleAssignmentId + +The unique identifier of an object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Remove-EntraRoleAssignment` is an alias for `Remove-EntraDirectoryRoleAssignment`. + +## Related Links + +[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) + +[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md b/moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d80058e54d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md @@ -0,0 +1,93 @@ +--- +title: Remove-EntraDirectoryRoleDefinition +description: This article provides details on the Remove-EntraDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Remove-EntraDirectoryRoleDefinition + +## Synopsis + +Delete a Microsoft Entra ID Directory roleDefinition object. + +## Syntax + +```powershell +Remove-EntraDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [] +``` + +## Description + +Delete a Microsoft Entra ID Directory roleDefinition object by ID. + +You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. + +## Examples + +### Example 1: Remove a specified role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 +``` + +This example demonstrates how to remove the specified role definition from Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. + +## Parameters + +### -UnifiedRoleDefinitionId + +The unique identifier of an object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Remove-EntraRoleDefinition` is an alias for `Remove-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) + +[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md b/moduleVNext/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md new file mode 100644 index 0000000000..d00e0c6818 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md @@ -0,0 +1,267 @@ +--- +title: Set-EntraDirectoryRoleDefinition +description: This article provides details on the Set-EntraDirectoryRoleDefinition command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Set-EntraDirectoryRoleDefinition + +## Synopsis + +Update an existing Microsoft Entra ID roleDefinition. + +## Syntax + +```powershell +Set-EntraDirectoryRoleDefinition + [-TemplateId ] + [-DisplayName ] + [-RolePermissions ] + -UnifiedRoleDefinitionId + [-Description ] + [-Version ] + [-IsEnabled ] + [-ResourceScopes ] + [] +``` + +## Description + +Updates a Microsoft Entra roleDefinition object identified by ID. You can't update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. + +## Examples + +### Example 1: Update an roleDefinition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -DisplayName 'UpdatedDisplayName' +``` + +This example updates the specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-DisplayName` parameter specifies the display name for the role definition. + +### Example 2: Update an roleDefinition with Description + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -Description 'MYROLEUPDATE1S' +``` + +This example updates the Description of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-Description` parameter specifies the description for the role definition. + +### Example 3: Update an roleDefinition with IsEnabled + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -IsEnabled $true +``` + +This example updates the IsEnabled of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-IsEnabled` parameter specifies whether the role definition is enabled. + +### Example 4: Update an roleDefinition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/standard/read") +$params = @{ + UnifiedRoleDefinitionId = $roleDefinition.Id + Description = 'Update' + DisplayName = 'Update' + ResourceScopes = '/' + IsEnabled = $false + RolePermissions = $RolePermissions + TemplateId = '54d418b2-4cc0-47ee-9b39-e8f84ed8e073' + Version = 2 +} + +Set-EntraDirectoryRoleDefinition @params +``` + +This example updates the RolePermissions, TemplateId, TemplateId, ResourceScopes of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Description` parameter specifies the description for the role definition. +- `-ResourceScopes` parameter specifies the resource scopes for the role definition. +- `-TemplateId` parameter specifies the template ID for the role definition. +- `-Version` parameter specifies the version for the role definition. + +## Parameters + +### -UnifiedRoleDefinitionId + +Specifies the roleDefinition object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Description + +Specifies a description for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role is not available for assignment. Read-only when `isBuiltIn` is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceScopes + +Specifies the resource scopes for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolePermissions + +Specifies permissions for the role definition. List of permissions included in the role. Read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateId + +Specifies the template ID for the role definition. A custom template ID can be set when `isBuiltIn` is `false`. This ID is typically used to keep the same identifier across different directories. It is read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version + +Specifies version for the role definition. Indicates version of the role definition. Read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Set-EntraRoleDefinition` is an alias for `Set-EntraDirectoryRoleDefintion`. + +## Related Links + +[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) + +[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md new file mode 100644 index 0000000000..cca67243d0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md @@ -0,0 +1,102 @@ +--- +title: Add-EntraGroupMember +description: This article explains the Add-EntraGroupMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupMember + +schema: 2.0.0 +--- + +# Add-EntraGroupMember + +## Synopsis + +Adds a member to a group. + +## Syntax + +```powershell +Add-EntraGroupMember + -GroupId + -RefObjectId + [] +``` + +## Description + +The Add-EntraGroupMember cmdlet adds a member to a group. + +## Examples + +### Example 1: Add a member to a group + +```powershell +Connect-Entra -Scopes 'GroupMember.ReadWrite.All' +$params = @{ + GroupId = 'dddddddd-2222-3333-5555-rrrrrrrrrrrr' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} + +Add-EntraGroupMember @params +``` + +This example demonstrates how to add a member to a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object that is assigned as an owner, manager, or member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupMember](Get-EntraGroupMember.md) + +[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md new file mode 100644 index 0000000000..2e74ae568b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md @@ -0,0 +1,108 @@ +--- +title: Add-EntraGroupOwner +description: This article explains the Add-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupOwner + +schema: 2.0.0 +--- + +# Add-EntraGroupOwner + +## Synopsis + +Adds an owner to a group. + +## Syntax + +```powershell +Add-EntraGroupOwner + -GroupId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraGroupOwner` cmdlet adds an owner to a Microsoft Entra ID group. Specify the `GroupId` and `RefObjectId` parameters to add an owner to a group. + +`-GroupId` - specifies the unique identifier (Object ID) of the group to which you want to add an owner. + +`-RefObjectId` - specifies the unique identifier (Object ID) of the owner to be added to the group. + +## Examples + +### Example 1: Add an owner to a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + GroupId = $group.ObjectId + RefObjectId = $user.ObjectId +} + +Add-EntraGroupOwner @params +``` + +This example demonstrates how to add an owner to a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object that will be assigned as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupOwner](Get-EntraGroupOwner.md) + +[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..df79fef7d9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md @@ -0,0 +1,111 @@ +--- +title: Add-EntraLifecyclePolicyGroup +description: This article provides details on the Add-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Add-EntraLifecyclePolicyGroup + +## Synopsis + +Adds a group to a lifecycle policy. + +## Syntax + +```powershell +Add-EntraLifecyclePolicyGroup + -GroupId + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Add-EntraLifecyclePolicyGroup` cmdlet adds a group to a lifecycle policy in Microsoft Entra ID. + +## Examples + +### Example 1: Add a group to the lifecycle policy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" +$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 +$params = @{ + GroupLifecyclePolicyId = $policy.Id + groupId = $group.ObjectId +} +Add-EntraLifecyclePolicyGroup @params +``` + +This example adds a group to the lifecycle policy. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy add to the group. +- `-GroupId` parameter specifies the ID of the group add to the Lifecycle Policy. + +## Parameters + +### -GroupId + +Specifies the ID of an Office365 group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of the lifecycle policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) + +[Remove-EntraLifecyclePolicyGroup](Remove-EntraLifecyclePolicyGroup.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md new file mode 100644 index 0000000000..f85a857377 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md @@ -0,0 +1,293 @@ +--- +title: Get-EntraDeletedGroup +description: This article provides details on the Get-EntraDeletedGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedGroup + +schema: 2.0.0 +--- + +# Get-EntraDeletedGroup + +## Synopsis + +This cmdlet is used to retrieve the soft deleted groups in a Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraDeletedGroup + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraDeletedGroup + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraDeletedGroup + -GroupId + [-All] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaDeletedGroup + [-All] + [-SearchString ] + [-Property ] + [] +``` + +## Description + +This cmdlet retrieves soft-deleted groups from a directory. When a group is deleted, it is soft deleted and can be recovered within 30 days. After 30 days, the group is permanently deleted and cannot be recovered. + +Please note that soft delete currently applies only to Unified Groups (also known as Office 365 Groups). + +## Examples + +### Example 1: Get deleted groups in the directory + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves all recoverable deleted groups in the Microsoft Entra ID. + +### Example 2: Get deleted groups in the directory using All parameter + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -All +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves all recoverable deleted groups in the directory, using All parameter. + +### Example 3: Get top two deleted groups + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -Top 2 +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +``` + +This cmdlet retrieves top two deleted groups in the directory. + +### Example 4: Get deleted groups containing string 'test2' + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -SearchString 'test2' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves deleted groups in the directory, containing the specified string. + +### Example 5: Get deleted groups filter by display name + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -Filter "displayName eq 'test21'" +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +``` + +This cmdlet retrieves deleted groups in the directory, having the specified display name. + +### Example 6: Get deleted group by GroupId + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraDeletedGroup -GroupId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +``` + +This cmdlet retrieves the deleted group specified by GroupId. + +- `-GroupId` parameter specifies the deleted group GroupId. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +The GroupId of the deleted group to be retrieved. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md new file mode 100644 index 0000000000..62d509e6c3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md @@ -0,0 +1,309 @@ +--- +title: Get-EntraGroup +description: This article explains the Get-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroup + +schema: 2.0.0 +--- + +# Get-EntraGroup + +## Synopsis + +Gets a group. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraGroup + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraGroup + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraGroup + -GroupId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroup` cmdlet gets a group in Microsoft Entra ID. Specify the `ObjectId` parameter to get a specific group. + +## Examples + +### Example 1: Get all groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup +``` + +```Output +DisplayName Id MailNickname Description +----------- -- ------------ ----------- +SimpleTestGrp aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NickName +SimpleGroup bbbbbbbb-1111-2222-3333-cccccccccccc NickName +testGroupInAU10 cccccccc-2222-3333-4444-dddddddddddd testGroupInAU10 testGroupInAU10 +My new group dddddddd-3333-4444-5555-eeeeeeeeeeee NotSet New created group +SimpleGroup eeeeeeee-4444-5555-6666-ffffffffffff NickName +``` + +This example demonstrates how to get all groups from Microsoft Entra ID. + +### Example 2: Get a specific group by using an GroupId + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -GroupId 'pppppppp-4444-0000-8888-yyyyyyyyyyyy' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneaglegroup Crimson Eagle Group {Unified} +``` + +This example demonstrates how to retrieve specific group by providing ID. + +### Example 3: Get top five groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -Top 5 +``` + +```Output +DisplayName Id MailNickname Description +----------- -- ------------ ----------- +Contoso Group hhhhhhhh-3333-5555-3333-qqqqqqqqqqqq contosogroup Contoso Group +Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneagle Crimson Eagle Group +Bold Falcon tttttttt-0000-3333-9999-mmmmmmmmmmmm boldfalcon Bold Falcon Group +Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda +Misty Fox kkkkkkkk-3333-5555-1111-nnnnnnnnnnnn mistyfox Misty Fox Group +``` + +This example demonstrates how to get top five groups. + +### Example 4: Get a group by DisplayName + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -Filter "DisplayName eq 'Azure Panda'" +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda {Unified} +``` + +In this example, we retrieve group using the Display Name. + +### Example 5: Get groups that contain a search string + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroup -SearchString 'New' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +New Sparkling Deer bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq newsparklingdeer New Sparkling Deer Group {Unified} +New Golden Fox xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb newgoldenfox New Golden Fox {DynamicMembership} +``` + +This example demonstrates how to retrieve groups that include the text new in their display names from Microsoft Entra ID. + +### Example 6: Listing ownerless groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$allGroups = Get-EntraGroup -All +$groupsWithoutOwners = foreach ($group in $allGroups) { + $owners = Get-EntraGroupOwner -ObjectId $group.Id + if ($owners.Count -eq 0) { + $group + } +} +$groupsWithoutOwners | Format-Table DisplayName, Id, GroupTypes +``` + +```Output +DisplayName Id GroupTypes +----------- -- ---------- +My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} +HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} +``` + +This example demonstrates how to retrieve groups without owners. By identifying ownerless groups, IT admins can improve overall governance and operational efficiency. + +### Example 7: Listing empty groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$allGroups = Get-EntraGroup -All +$groupsWithoutMembers = foreach ($group in $allGroups) { + $members = Get-EntraGroupMember -ObjectId $group.Id + if ($members.Count -eq 0) { + $group + } +} +$groupsWithoutMembers | Format-Table DisplayName, Id, GroupTypes +``` + +```Output +DisplayName Id GroupTypes +----------- -- ---------- +My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} +HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} +``` + +This example demonstrates how to retrieve groups without members. By identifying memberless groups, IT admins can identify and clean up unused or obsolete groups that no longer serve a purpose. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +The unique identifier of a group in Microsoft Entra ID (GroupId) + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraGroup](New-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..724b696cec --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md @@ -0,0 +1,181 @@ +--- +title: Get-EntraGroupAppRoleAssignment +description: This article provides details on the Get-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraGroupAppRoleAssignment + +## Synopsis + +Gets a group application role assignment. + +## Syntax + +```powershell +Get-EntraGroupAppRoleAssignment + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupAppRoleAssignment` cmdlet gets a group application role assignment in Microsoft Entra ID. Specify the `GroupId` parameter to get a group application role assignment. + +## Examples + +### Example 1: Retrieve application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$GroupId = (Get-EntraGroup -Top 1).ObjectId +Get-EntraGroupAppRoleAssignment -GroupId $GroupId +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR +``` + +This example retrieves the application role assignments of a group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +### Example 2: Retrieve all application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -All +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR +``` + +This example retrieves all application role assignments of the specified group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +### Example 3: Retrieve top two application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -Top 2 +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +``` + +This example retrieves top two application role assignments of the specified group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) + +[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..9df4ac2bb7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md @@ -0,0 +1,134 @@ +--- +title: Get-EntraGroupLifecyclePolicy +description: This article provides details on the Get-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Get-EntraGroupLifecyclePolicy + +## Synopsis + +Retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. +If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraGroupLifecyclePolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupLifecyclePolicy` command retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. Specify the `-GroupLifecyclePolicyId` parameter to get the group lifecycle policy. +If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. + +## Examples + +### Example 1: Retrieve all groupLifecyclePolicies + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupLifecyclePolicy +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +eeeeeeee-4444-5555-6666-ffffffffffff example@contoso.com 200 Selected +``` + +This example demonstrates how to retrieve the properties and relationships of all groupLifecyclePolicies in Microsoft Entra ID. + +### Example 2: Retrieve properties of an groupLifecyclePolicy + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 Selected +``` + +This command is used to retrieve a specific Microsoft Group Lifecycle Policy. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +## Parameters + +### -GroupLifecyclePolicyId + +Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md new file mode 100644 index 0000000000..bdd0673a08 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md @@ -0,0 +1,214 @@ +--- +title: Get-EntraGroupMember +description: This article provides details on the Get-EntraGroupMember command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupMember + +schema: 2.0.0 +--- + +# Get-EntraGroupMember + +## Synopsis + +Gets a member of a group. + +## Syntax + +```powershell +Get-EntraGroupMember + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupMember` cmdlet gets a member of a group in Microsoft Entra ID. Specify the `GroupId` parameter to get a member of a group. + +In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: `microsoft.directory/groups/members/read`, `microsoft.directory/groups/members/limitedRead`, or `microsoft.directory/groups/hiddenMembers/read` (for hidden members). The following least privileged roles support this operation: + +- Group owners +- "Member" users +- "Guest" users (with limited read permissions) +- Directory Readers +- Directory Writers +- Groups Administrator +- User Administrator (includes hidden members) +- Exchange Administrator (includes hidden members) +- SharePoint Administrator (includes hidden members) +- Intune Administrator (includes hidden members) +- Teams Administrator (includes hidden members) +- Yammer Administrator (includes hidden members) + +To list members of a hidden group, the `Member.Read.Hidden` permission is also required. + +## Examples + +### Example 1: Get a group member by ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This example demonstrates how to retrieve group member by ID. + +- `-GroupId` Specifies the ID of a group. + +### Example 2: Get two group member + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'hhhhhhhh-8888-9999-8888-cccccccccccc' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This example demonstrates how to retrieve top two groups from Microsoft Entra ID. + +- `-GroupId` specifies the ID of a group. + +### Example 3: Get all members within a group by group ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +cccccccc-8888-9999-0000-dddddddddddd +``` + +This example retrieves all members within a group by group ID. + +- `-GroupId` specifies the ID of a group. + +### Example 4: Retrieve and Select Group Member Properties + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' | Select-Object DisplayName, '@odata.type' +``` + +```Output +displayName @odata.type +----------- ----------- +test1 #microsoft.graph.user +test2 #microsoft.graph.user +test2 #microsoft.graph.servicePrincipal +test3 #microsoft.graph.servicePrincipal +``` + +This example retrieves the members of a specified group by its `GroupId` and selects only the `DisplayName` and `@odata.type` properties for each member. + +- `-GroupId` specifies the ID of a group. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupMember](Add-EntraGroupMember.md) + +[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md new file mode 100644 index 0000000000..340e3463a9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md @@ -0,0 +1,189 @@ +--- +title: Get-EntraGroupOwner +description: This article provides details on the Get-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupOwner + +schema: 2.0.0 +--- + +# Get-EntraGroupOwner + +## Synopsis + +Gets an owner of a group. + +## Syntax + +```powershell +Get-EntraGroupOwner + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraGroupOwner` cmdlet gets an owner of a group in Microsoft Entra ID. Specify `GroupId` parameter gets an owner of a group. + +In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with the `microsoft.directory/groups/owners/read` permission. The following least privileged roles support this operation: + +- Group owners +- Directory Readers +- Directory Writers +- Groups Administrator +- User Administrator + +## Examples + +### Example 1: Get a group owner by ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'vvvvvvvv-7777-9999-7777-jjjjjjjjjjjj' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve the owner of a specific group. + +- `-GroupId` Parameter specifies the ID of a group. + +### Example 2: Gets all group owners + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'zzzzzzzz-6666-8888-9999-pppppppppppp' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve the all owner of a specific group. + +- `-GroupId` Parameter specifies the ID of a group. + +### Example 3: Gets two group owners + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupOwner -GroupId 'vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve the top two owners of a specific group. + +- `-GroupId` parameter specifies the ID of a group. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupOwner](Add-EntraGroupOwner.md) + +[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md new file mode 100644 index 0000000000..51986bf57f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraGroupPermissionGrant +description: This article provides details on the Get-EntraGroupPermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraGroupPermissionGrant + +## Synopsis + +Retrieves a list of permission grants consented to for a group. + +## Syntax + +```powershell +Get-EntraGroupPermissionGrant + -GroupId + [-Property ] + [] +``` + +## Description + +Retrieves a list of permission grants consented to for a group. + +## Examples + +### Example 1: List existing permission grants for the group + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraGroupPermissionGrant -GroupId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' +``` + +```Output + Id : CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3 + ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 + ClientAppId : 44445555-eeee-6666-ffff-7777aaaa8888 + ResourceAppId : bbbb1111-cc22-3333-44dd-555555eeeeee + PermissionType : Application + Permission : Member.Read.Group +``` + +This cmdlet list existing permission grants for the specified group. + +## Parameters + +### -GroupId + +The unique identifier of group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.GetMSGroupPermissionGrantsResponse + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..1555496573 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md @@ -0,0 +1,105 @@ +--- +title: Get-EntraLifecyclePolicyGroup +description: This article provides details on the Get-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Get-EntraLifecyclePolicyGroup + +## Synopsis + +Retrieves the lifecycle policy object to which a group belongs. + +## Syntax + +```powershell +Get-EntraLifecyclePolicyGroup + -GroupId + [-Property ] + [] +``` + +## Description + +The `Get-EntraLifecyclePolicyGroup` retrieves the lifecycle policy object to which a group belongs. Specify the `-GroupId` parameter to get the lifecycle policy object to which a group belongs. + +## Examples + +### Example 1: Retrieve lifecycle policy object + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraLifecyclePolicyGroup -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +bbbbbbbb-1111-2222-3333-cccccccccccc admingroup@contoso.com 200 All +``` + +This example demonstrates how to retrieve lifecycle policy object by Id in Microsoft Entra ID. + +- `-GroupId` - specifies the ID of a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md new file mode 100644 index 0000000000..3973de997e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md @@ -0,0 +1,252 @@ +--- +title: Get-EntraObjectSetting +description: This article provides details on the Get-EntraObjectSetting command. + + +ms.topic: reference +ms.date: 07/03/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectSetting +schema: 2.0.0 +--- + +# Get-EntraObjectSetting + +## Synopsis + +Gets an object setting. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraObjectSetting + [-Top ] + [-All] + -TargetType + -TargetObjectId + [] +``` + +### GetById + +```powershell +Get-EntraObjectSetting + -Id [-All] + -TargetType + -TargetObjectId + [] +``` + +## Description + +The `Get-EntraObjectSetting` cmdlet retrieves an object setting from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +### Example 2: Retrieve a specific object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' + Id ='aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Get-EntraObjectSetting @params +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves Specific object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. +- `-Id` Parameter specifies the ID of a settings object. + +### Example 3: Retrieve top one object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params -Top 1 +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves top one object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +### Example 4: Retrieve all object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraObjectSetting @params -All +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves all records of object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a settings object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjectId + +Specifies the ID of the target object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetType + +Specifies the target type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md new file mode 100644 index 0000000000..22a87355e6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md @@ -0,0 +1,346 @@ +--- +title: New-EntraGroup +description: This article provides details on the New-EntraGroup command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroup + +schema: 2.0.0 +--- + +# New-EntraGroup + +## Synopsis + +Creates a Microsoft Entra ID group. + +## Syntax + +```powershell +New-EntraGroup + -DisplayName + [-GroupTypes ] + -SecurityEnabled + [-Description ] + -MailEnabled + -MailNickname + [-Visibility ] + [-IsAssignableToRole ] + [] +``` + +## Description + +The `New-EntraGroup` cmdlet creates a Microsoft Entra ID group. Specify the `DisplayName`, `MailNickname`, `MailEnabled` and `SecurityEnabled` parameters for creating a Microsoft Entra ID group. + +For information about creating dynamic groups, see: [Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership). + +**Notes on permissions:** + +- To create the group with users as owners or members, the app must have at least the `User.Read.All` permission. +- To create the group with other service principals as owners or members, the app must have at least the `Application.Read.All` permission. +- To create the group with either users or service principals as owners or members, the app must have at least the `Directory.Read.All` permission. + +## Examples + +### Example 1: Create a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq helpDeskAdminGroup {} +``` + +This example demonstrates how to create the new group. + +### Example 2: Create a group with Description parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group' + MailEnabled = $false + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $true + Description = 'Group assignable to role' +} + +New-EntraGroup @params +``` + +```Output + +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group zzzzzzzz-6666-8888-9999-pppppppppppp helpDeskAdminGroup Group assignable to role {} + +``` + +This example demonstrates how to create the new group with description parameter. + +### Example 3: Create a group with IsAssignableToRole parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + Description = 'Group assignable to role' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + IsAssignableToRole = $True +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj helpDeskAdminGroup Group assignable to role {} +``` + +This example demonstrates how to create the new group with IsAssignableToRole parameter. + +### Example 4: Create a group with Visibility parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + Description = 'Group assignable to role' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + Visibility = 'Private' +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 gggggggg-0000-4444-3333-llllllllllll helpDeskAdminGroup Group assignable to role {} +``` + +This example demonstrates how to create the new group with Visibility parameter. + +### Example 5: Create a group with GroupTypes parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group3' + Description = 'group des' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup1' + SecurityEnabled = $True + GroupTypes = 'Unified' +} + +New-EntraGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group3 xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb helpDeskAdminGroup1 group des {Unified} +``` + +This example demonstrates how to create the new group with GroupTypes parameter. + +## Parameters + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailEnabled + +Specifies whether this group is mail enabled. + +Currently, you can't create mail enabled groups in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. +If MailEnabled is $False, you must still specify a mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Specifies whether the group is security enabled. +For security groups, this value must be $True. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a unified or dynamic group. + +Notes: + +- This parameter currently can't be used to create dynamic groups. To create a dynamic group in PowerShell, you must use the Entra module. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +This parameter determines the visibility of the group's content and members list. + +This parameter can take one of the following values: + +- "Public" - Anyone can view the contents of the group +- "Private" - Only members can view the content of the group +- "HiddenMembership" - Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value is "Public". + +Notes: + +- This parameter is only valid for groups that have the groupType set to "Unified". +- If a group has this attribute set to "HiddenMembership", it can't be changed later. +- Anyone can join a group that has this attribute set to "Public". If the attribute is set to Private or HiddenMembership, only owners can add new members to the group and requests to join the group need approval of the owners. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +Indicates whether group can be assigned to a role. This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) + +[Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..d70bac714b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md @@ -0,0 +1,151 @@ +--- +title: New-EntraGroupAppRoleAssignment +description: This article provides details on the New-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraGroupAppRoleAssignment + +## Synopsis + +Assign a group of users to an application role. + +## Syntax + +```powershell +New-EntraGroupAppRoleAssignment + -GroupId + -PrincipalId + -AppRoleId + -ResourceId + [] +``` + +## Description + +The `New-EntraGroupAppRoleAssignment` cmdlet assigns a group of users to an application role in Microsoft Entra ID. + +## Examples + +### Example 1: Assign a group of users to an application + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$appname = 'Box' +$spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" +$group = Get-EntraGroup -SearchString 'Contoso Team' +New-EntraGroupAppRoleAssignment -GroupId $group.ObjectId -PrincipalId $group.ObjectId -ResourceId $spo.ObjectId -AppRoleId $spo.Approles[1].id +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + AaBbCcDdEeFfGgHhIiJjKkLlMmNnOo1 00000000-0000-0000-0000-000000000000 3/13/2024 4:41:43 AM Contoso Team aaaaaaaa-bbbb-cccc-1111-222222222222 +3/13/2024 4:45:00 AM BbCcDdEeFfGgHhIiJjKkLlMmNnOoPp2 00000000-0000-0000-0000-000000000000 3/13/2024 4:45:00 AM Finance Group bbbbbbbb-cccc-dddd-2222-333333333333 +``` + +This example demonstrates how to assign a group of users to an application role in Microsoft Entra ID. + +- `GroupId`: The ID of the group to which you're assigning the app role. + +- `PrincipalId`: The ID of the group to which you're assigning the app role. + +- `ResourceId`: The ID of the resource service Principal, which has defined the app role. + +- `AppRoleId`: The ID of the appRole (defined on the resource service principal) to assign to the group. + +## Parameters + +### -AppRoleId + +Specifies the ID of the app role (defined on the resource service principal) to assign. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies the principal ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The unique identifier (ID) for the resource service principal for which the assignment is made. +Required on create. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) + +[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..78e3bb4b9f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md @@ -0,0 +1,138 @@ +--- +title: New-EntraGroupLifecyclePolicy +description: This article provides details on the New-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# New-EntraGroupLifecyclePolicy + +## Synopsis + +Creates a new groupLifecyclePolicy. + +## Syntax + +```powershell +New-EntraGroupLifecyclePolicy + -ManagedGroupTypes + -GroupLifetimeInDays + -AlternateNotificationEmails + [] +``` + +## Description + +Creates a new groupLifecyclePolicy in Microsoft Entra ID. + +## Examples + +### Example 1: Creates a new groupLifecyclePolicy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$Params = @{ + GroupLifetimeInDays = 99 + ManagedGroupTypes = 'Selected' + AlternateNotificationEmails = 'example@contoso.com' +} +New-EntraGroupLifecyclePolicy @params +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb example@contoso.com 99 Selected +``` + +This example creates a new groupLifecyclePolicy with a group lifetime of 99 days for a selected set of Office 365 groups. Renewal notification emails are sent to for groups without owners. + +- `-GroupLifetimeInDays` parameter specifies the number of days a group can exist before it needs to be renewed. +- `-ManagedGroupTypes` parameter allows the admin to select which office 365 groups the policy applies to. +- `-AlternateNotificationEmails` parameter specifies notification emails for group. + +## Parameters + +### -AlternateNotificationEmails + +Notification emails for groups without owners are sent to these email addresses, separated by a ';'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifetimeInDays + +The number of days a group can exist before it needs to be renewed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedGroupTypes + +This parameter allows the admin to select which Office 365 groups the policy applies to. +'None' creates the policy in a disabled state. +'All' applies the policy to every Office 365 group in the tenant. +'Selected' allows the admin to choose specific Office 365 groups to which the policy applies. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) + +[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md new file mode 100644 index 0000000000..ae746e39ed --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md @@ -0,0 +1,93 @@ +--- +title: Remove-EntraGroup +description: This article provides details on the Remove-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroup + +schema: 2.0.0 +--- + +# Remove-EntraGroup + +## Synopsis + +Removes a group. + +## Syntax + +```powershell +Remove-EntraGroup + -GroupId + [] +``` + +## Description + +The `Remove-EntraGroup` cmdlet removes a group from Microsoft Entra ID. Specify the `GroupId` parameter removes a group. + +Unified Group can be restored withing 30 days after deletion using the `Restore-EntraBetaDeletedDirectoryObject` cmdlet. Security groups can't be restored after deletion. + +**Notes on permissions:** + +The following conditions apply for apps to delete role-assignable groups: + +- For delegated scenarios, the app must be assigned the `RoleManagement.ReadWrite.Directory` delegated permission, and the calling user must be the creator of the group or be assigned at least the Privileged Role Administrator Microsoft Entra role. +- For app-only scenarios, the calling app must be the owner of the group or be assigned the `RoleManagement.ReadWrite.Directory` application permission or be assigned at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Remove a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroup -GroupId $group.Id +``` + +This example demonstrates how to remove a group in Microsoft Entra ID. + +- `GroupId` parameter specifies the group ID . + +## Parameters + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroup](New-EntraGroup.md) + +[Set-EntraGroup](Set-EntraGroup.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md new file mode 100644 index 0000000000..c5306735b7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md @@ -0,0 +1,99 @@ +--- +title: Remove-EntraGroupAppRoleAssignment +description: This article provides details on the Remove-EntraGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraGroupAppRoleAssignment + +## Synopsis + +Delete a group application role assignment. + +## Syntax + +```powershell +Remove-EntraGroupAppRoleAssignment + -AppRoleAssignmentId + -GroupId +[] +``` + +## Description + +The `Remove-EntraGroupAppRoleAssignment` cmdlet removes a group application role assignment from Microsoft Entra ID. + +## Examples + +### Example 1: Remove group app role assignment + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupAppRoleAssignment -GroupId $group.Id -AppRoleAssignmentId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' +``` + +This example demonstrates how to remove the specified group application role assignment. +GroupId - Specifies the object ID of a group. +AppRoleAssignmentId - Specifies the object ID of the group application role assignment. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the object ID of the group application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) + +[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..d60bc7953d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraGroupLifecyclePolicy +description: This article provides details on the Remove-EntraGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Remove-EntraGroupLifecyclePolicy + +## Synopsis + +Deletes a groupLifecyclePolicies object + +## Syntax + +```powershell +Remove-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Remove-EntraGroupLifecyclePolicy` command deletes a groupLifecyclePolicies object in Microsoft Entra ID. Specify `Id` parameter deletes the groupLifecyclePolicies object. + +## Examples + +### Example 1: Remove a groupLifecyclePolicies + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' +``` + +This example demonstrates how to delete the groupLifecyclePolicies object that has the specified ID. You can use `Get-EntraGroupLifecyclePolicy` to get Id details. + +## Parameters + +### -GroupLifecyclePolicyId + +Specifies the ID of the groupLifecyclePolicies object that this cmdlet removes. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) + +[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md new file mode 100644 index 0000000000..ca01328299 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md @@ -0,0 +1,102 @@ +--- +title: Remove-EntraGroupMember +description: This article provides details on the Remove-EntraGroupMember command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupMember + +schema: 2.0.0 +--- + +# Remove-EntraGroupMember + +## Synopsis + +Removes a member from a group. + +## Syntax + +```powershell +Remove-EntraGroupMember + -GroupId + -MemberId + [] +``` + +## Description + +The `Remove-EntraGroupMember` cmdlet removes a member from a group in Microsoft Entra ID. Specify the `ObjectId` and `MemberId` parameters to remove a member from a group. + +## Examples + +### Example 1: Remove a member + +```powershell +Connect-Entra -Scopes 'GroupMember.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupMember -GroupId $group.Id -MemberId 'zzzzzzzz-6666-8888-9999-pppppppppppp' +``` + +This command removes the specified member from the specified group. + +GroupId - Specifies the object ID of a group in Microsoft Entra ID. + +MemberId - Specifies the ID of the member to remove. + +## Parameters + +### -MemberId + +Specifies the ID of the member to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraGroupMember](Add-EntraGroupMember.md) + +[Get-EntraGroupMember](Get-EntraGroupMember.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md new file mode 100644 index 0000000000..759c736651 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md @@ -0,0 +1,101 @@ +--- +title: Remove-EntraGroupOwner +description: This article provides details on the Remove-EntraGroupOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupOwner + +schema: 2.0.0 +--- + +# Remove-EntraGroupOwner + +## Synopsis + +Removes an owner from a group. + +## Syntax + +```powershell +Remove-EntraGroupOwner + -OwnerId + -GroupId + [] +``` + +## Description + +The `Remove-EntraGroupOwner` cmdlet removes an owner from a group in Microsoft Entra ID. Specify the `GroupId` and `OwnerId` parameters to remove an owner from a group. + +## Examples + +### Example 1: Remove an owner + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraGroupOwner -GroupId $group.Id -OwnerId 'xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb' +``` + +This example demonstrates how to remove an owner from a group in Microsoft Entra ID. + +GroupId - Specifies the ID of a group in Microsoft Entra ID. + +- `OwnerId` specifies the ID of an owner. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of an owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Add-EntraGroupOwner](Add-EntraGroupOwner.md) + +[Get-EntraGroupOwner](Get-EntraGroupOwner.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md new file mode 100644 index 0000000000..888872cd48 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md @@ -0,0 +1,117 @@ +--- +title: Remove-EntraLifecyclePolicyGroup +description: This article provides details on the Remove-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Remove-EntraLifecyclePolicyGroup + +## Synopsis + +Removes a group from a lifecycle policy. + +## Syntax + +```powershell +Remove-EntraLifecyclePolicyGroup + -GroupId + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Remove-EntraLifecyclePolicyGroup` cmdlet removes a group from a lifecycle policy in Microsoft Entra ID. + +## Examples + +### Example 1: Remove lifecycle policy group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" +$policy = Get-EntraLifecyclePolicyGroup -Id $group.ObjectId +$params = @{ + GroupLifecyclePolicyId = $policy.Id + GroupId = $group.ObjectId +} +Remove-EntraLifecyclePolicyGroup @params +``` + +```Output +Value +----- +True +``` + +This example demonstrates how to remove a group from a lifecycle policy in Microsoft Entra ID with specified Id and groupId. + +- `-GroupLifecyclePolicyId` parameter specifies the lifecycle policy object ID. +- `-GroupId` parameter specifies the ID of Office365 group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of the lifecycle policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) + +[Add-EntraLifecyclePolicyGroup](Add-EntraLifecyclePolicyGroup.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md new file mode 100644 index 0000000000..b8aeaa6a36 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md @@ -0,0 +1,84 @@ +--- +title: Reset-EntraLifeCycleGroup +description: This article provides details on the Reset-EntraLifeCycleGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup + +schema: 2.0.0 +--- + +# Reset-EntraLifeCycleGroup + +## Synopsis + +Renews a group by updating the RenewedDateTime property on a group to the current DateTime. + +## Syntax + +```powershell +Reset-EntraLifeCycleGroup + -Id + [] +``` + +## Description + +The `Reset-EntraLifeCycleGroup` renews a group by updating the RenewedDateTime property on a group to the current DateTime. +When a group is renewed, the group expiration is extended by the number of days defined in the policy. + +## Examples + +### Example 1: Renew a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +Reset-EntraLifeCycleGroup -Id 'hhhhhhhh-8888-9999-8888-cccccccccccc' +``` + +This example demonstrates how to renew a specified group. + +- `-Id` - Specifies the lifecycle policy object ID. + +## Parameters + +### -Id + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md new file mode 100644 index 0000000000..80f5ee8ca8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md @@ -0,0 +1,99 @@ +--- +title: Select-EntraGroupIdsContactIsMemberOf +description: This article provides details on the Select-EntraGroupIdsContactIsMemberOf command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsContactIsMemberOf + +## Synopsis + +Get groups in which a contact is a member. + +## Syntax + +```powershell +Select-EntraGroupIdsContactIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsContactIsMemberOf` cmdlet gets groups in Microsoft Entra ID in which a contact is a member. + +## Examples + +### Example 1: Get groups in which a contact is a member + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All,Group.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Filter "DisplayName eq 'Entra PowerShell Group'").ObjectId +$UserID = (Get-EntraContact -ObjectId 'hhhhhhhh-8888-9999-8888-cccccccccccc').ObjectId +Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups +``` + +This example demonstrates how to get groups in which a contact is a member. + +- `-ObjectId` parameter specifies the contact Object ID. +- `-GroupIdsForMembershipCheck` parameter specifies the group Object ID. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the object ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md new file mode 100644 index 0000000000..f0eabc7873 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md @@ -0,0 +1,101 @@ +--- +title: Select-EntraGroupIdsGroupIsMemberOf +description: This article provides details on the Select-EntraGroupIdsGroupIsMemberOf command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsGroupIsMemberOf + +## Synopsis + +Gets group IDs that a group is a member of. + +## Syntax + +```powershell +Select-EntraGroupIdsGroupIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsGroupIsMemberOf` cmdlet gets the groups that a specified group is a member of in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a group + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraGroup -Top 1).ObjectId +$GroupId = (Get-EntraGroup -Top 1).ObjectId +Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupId -GroupIdsForMembershipCheck $Groups +``` + +This example gets the group membership of a group identified by $GroupId. Use `Get-EntraGroup` cmdlet to obtain group `ObjectId` value. + +- `-ObjectId` parameter specifies the group ID. +- `-GroupIdsForMembershipCheck` Specifies an array of group object IDs. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md new file mode 100644 index 0000000000..d5cb471ca8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md @@ -0,0 +1,110 @@ +--- +title: Select-EntraGroupIdsUserIsMemberOf +description: This article provides details on the Select-EntraGroupIdsUserIsMemberOf command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraGroupIdsUserIsMemberOf + +## Synopsis + +Selects the groups that a user is a member of. + +## Syntax + +```powershell +Select-EntraGroupIdsUserIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraGroupIdsUserIsMemberOf` cmdlet selects the groups that a user is a member of in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a user + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$myGroup = Get-EntraGroup -Filter "DisplayName eq ''" +$UserId = 'SawyerM@contoso.com' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = $myGroup.ObjectId +$Params = @{ + ObjectId = $UserId + GroupIdsForMembershipCheck = $Groups +} +Select-EntraGroupIdsUserIsMemberOf @Params +``` + +```Output +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example retrieves the group membership of a group for a user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-GroupIdsForMembershipCheck` parameter specifies the group Object Ids. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraGroup](Get-EntraGroup.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md new file mode 100644 index 0000000000..1886cefa89 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md @@ -0,0 +1,313 @@ +--- +title: Set-EntraGroup +description: This article provides details on the Set-EntraGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroup + +schema: 2.0.0 +--- + +# Set-EntraGroup + +## Synopsis + +Sets the properties for an existing Microsoft Entra ID group. + +## Syntax + +```powershell +Set-EntraGroup + -GroupId + [-DisplayName ] + [-GroupTypes ] + [-SecurityEnabled ] + [-Description ] + [-MailEnabled ] + [-MailNickname ] + [-Visibility ] + [-IsAssignableToRole ] + [] +``` + +## Description + +The `Set-EntraGroup` cmdlet sets the properties for an existing Microsoft Entra ID group. Specify the `GroupId` parameter to set the properties for an existing Microsoft Entra ID group. + +## Examples + +### Example 1: Update a group display name + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + DisplayName = 'UPDATE HelpDesk Team Leaders' +} +Set-EntraGroup @params +``` + +This command updates the display name of a specified group in Microsoft Entra ID. + +### Example 2: Update a group description + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + Description = 'This is my new group' +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a group description. + +### Example 3: Update a group mail nickname + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MailNickName = 'newnickname' +} +Set-EntraGroup @params +``` + +This command updates the mail nickname of a specified group in Microsoft Entra ID. + +### Example 4: Update a group security enabled + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + SecurityEnabled = $true +} +Set-EntraGroup @params +``` + +This command updates the security enabled of a specified group in Microsoft Entra ID. + +### Example 5: Update a group mail enabled + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MailEnabled = $false +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a group main enabled. + +### Example 6: Update a property for a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + Visibility = 'Private' + GroupTypes = 'DynamicMembership' + IsAssignableToRole = $true +} +Set-EntraGroup @params +``` + +This example demonstrates how to update a property for an existing Microsoft Entra ID group. + +## Parameters + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a dynamic group. +To create a dynamic group, specify a value of DynamicMembership. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MailEnabled + +Indicates whether this group is mail enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Indicates whether the group is security enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +Specifies the visibility of the group's content and members list. +This parameter can take one of the following values: + +* "Public": Anyone can view the contents of the group. +* "Private": Only members can view the content of the group. +* "HiddenMembership": Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator, and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value is "Public." + +Notes: + +* This parameter is only valid for groups that have the groupType set to "Unified." +* If a group has this attribute set to "HiddenMembership," it can't be changed later. +* Anyone can join a group that has this attribute set to "Public." If the attribute is set to Private or HiddenMembership, only owner can add new members to the group and requests to join the group need approval of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related links + +[Get-EntraGroup](Get-EntraGroup.md) + +[New-EntraGroup](New-EntraGroup.md) + +[Remove-EntraGroup](Remove-EntraGroup.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md b/moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md new file mode 100644 index 0000000000..df8b9a3a99 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md @@ -0,0 +1,160 @@ +--- +title: Set-EntraGroupLifecyclePolicy +description: This article provides details on the Set-EntraGroupLifecyclePolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Set-EntraGroupLifecyclePolicy + +## Synopsis + +Updates a specific group Lifecycle Policy in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraGroupLifecyclePolicy + -GroupLifecyclePolicyId + [-AlternateNotificationEmails ] + [-GroupLifetimeInDays ] + [-ManagedGroupTypes ] + [] +``` + +## Description + +The `Set-EntraGroupLifecyclePolicy` command updates a specific group Lifecycle Policy in Microsoft Entra ID. + +## Examples + +### Example 1: Updates group lifecycle policy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 +$params = @{ + GroupLifecyclePolicyId = $policy.Id + GroupLifetimeInDays = 200 + AlternateNotificationEmails = 'example@contoso.com' + ManagedGroupTypes = 'All' +} +Set-EntraGroupLifecyclePolicy @params +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 All +``` + +This example updates the specified groupLifecyclePolicy in Microsoft Entra ID. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy to be modified. +- `-GroupLifetimeInDays` parameter specifies the lifetime of the groups in the policy to 200 days. The GroupLifetimeInDays represents the number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. +- `-AlternateNotificationEmails` parameter specifies the email address that receives notifications about the policy. Multiple email address can be defined by separating email address with a semicolon. +- `-ManagedGroupTypes` parameter specifies which office 365 groups the policy applies to. Possible values are `All`, `Selected`, or `None`. +In this case, 'All' suggests that the policy manages all types of groups. + +## Parameters + +### -AlternateNotificationEmails + +Notification emails for groups that have no owners are sent to these email addresses. +List of email addresses separated by a ";". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifetimeInDays + +The number of days a group can exist before it needs to be renewed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ManagedGroupTypes + +Allows the admin to select which office 365 groups the policy applies to. + +- "None" will create the policy in a disabled state. +- "All" will apply the policy to every Office 365 group in the tenant. +- "Selected" will allow the admin to choose specific Office 365 groups that the policy applies to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) + +[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) + +[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) \ No newline at end of file diff --git a/moduleVNext/docs/entra-powershell-v1.0/Invitations/New-EntraInvitation.md b/moduleVNext/docs/entra-powershell-v1.0/Invitations/New-EntraInvitation.md new file mode 100644 index 0000000000..df6ead8bb6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Invitations/New-EntraInvitation.md @@ -0,0 +1,291 @@ +--- +title: New-EntraInvitation +description: This article provides details on the New-EntraInvitation command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraInvitation + +schema: 2.0.0 +--- + +# New-EntraInvitation + +## Synopsis + +This cmdlet is used to invite a new external user to your directory. + +## Syntax + +```powershell +New-EntraInvitation + [-InvitedUser ] + [-InvitedUserType ] + -InvitedUserEmailAddress + [-SendInvitationMessage ] +-InviteRedirectUrl + [-InvitedUserMessageInfo ] [-InvitedUserDisplayName ] + [] +``` + +## Description + +This cmdlet is used to invite a new external user to your directory. + +Invitation adds an external user to the organization. When creating a new invitation, you have several options available: + +- On invitation creation, Microsoft Graph can automatically send an invitation email directly to the invited user, or your app can use the inviteRedeemUrl returned in the response to craft your own invitation (through your communication mechanism of choice) to the invited user. If you decide to have Microsoft Graph send an invitation email automatically, you can specify the content and language of the email by using invitedUserMessageInfo. + +- When the user is invited, a user entity (of userType Guest) is created and can be used to control access to resources. The invited user has to go through the redemption process to access any resources they have been invited to. + +To reset the redemption status for a guest user, the User.ReadWrite.All permission is the minimum required. + +For delegated scenarios, the signed-in user must have at least one of the following roles: Guest Inviter, Directory Writers, or User Administrator. Additionally, to reset the redemption status, the signed-in user must have the Helpdesk Administrator or User Administrator role. + +## Examples + +### Example 1: Invite a new external user to your directory + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example sent an email to the user who's email address is in the `-InvitedUserEmailAddress` parameter. + +When the user accepts the invitation, they're forwarded to the url as specified in the `-InviteRedirectUrl` parameter. + +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. + +### Example 2: Invite a new external user to your directory with InvitedUserDisplayName parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' + InvitedUserDisplayName = 'microsoftuser' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with `-InvitedUserDisplayName` parameter. + +- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user +- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. +- `-InvitedUserDisplayName`Parameter specifies the display name of the user. + +### Example 3: Invite a new external user to your directory with InvitedUserMessageInfo parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$a= New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo +$a.CustomizedMessageBody = 'Hi there, how are you' +$a.MessageLanguage = 'EN' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.microsoft.com' + InvitedUserMessageInfo = $a +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with InvitedUserMessageInfo parameter. + +- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. +- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. +- `-InvitedUserMessageInfo`Parameter specifies addition information to specify how the invitation message is sent. + +### Example 4: Invite a new external user to your directory with InvitedUserType parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.microsoft.com' + InvitedUserType = 'Guest' +} + +New-EntraInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +9e2b9f02-c2cb-4832-920d-81959f44e397 https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with InvitedUserType parameter. + +## Parameters + +### -InvitedUserDisplayName + +The display name of the user as it appears in your directory. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserEmailAddress + +The Email address to which the invitation is sent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserMessageInfo + +Addition information to specify how the invitation message is sent. + +```yaml +Type: InvitedUserMessageInfo +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUser + +An existing user object in the directory that you want to add or update the B2B credentials for. + +```yaml +Type: User +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserType + +The userType of the user being invited. By default, this is Guest. + +You can invite as Member if you are company administrator. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InviteRedirectUrl + +The URL to which the invited user is forwarded after accepting the invitation. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SendInvitationMessage + +A Boolean parameter that indicates whether or not an invitation message sent to the invited user. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +- See more information - . + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Migration/Enable-EntraAzureADAlias.md b/moduleVNext/docs/entra-powershell-v1.0/Migration/Enable-EntraAzureADAlias.md new file mode 100644 index 0000000000..7667dcb6b1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Migration/Enable-EntraAzureADAlias.md @@ -0,0 +1,57 @@ +--- +title: Enable-EntraAzureADAlias +description: This article provides details on the Enable-EntraAzureADAlias command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraAzureADAlias + +schema: 2.0.0 +--- + +# Enable-EntraAzureADAlias + +## Synopsis + +Enables aliases for AzureAD commands. + +## Syntax + +```powershell +Enable-EntraAzureADAlias +``` + +## Description + +Enables Azure AD command aliases in the current PowerShell session. + +## Examples + +### Example 1: Enable aliasing + +```powershell +Enable-EntraAzureADAlias +``` + +Enables all Azure AD prefixes for the current PowerShell session. + +## Parameters + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Migration/Test-EntraScript.md b/moduleVNext/docs/entra-powershell-v1.0/Migration/Test-EntraScript.md new file mode 100644 index 0000000000..bdc29b6526 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Migration/Test-EntraScript.md @@ -0,0 +1,120 @@ +--- +title: Test-EntraScript +description: This article provides details on the Test-EntraScript command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Test-EntraScript + +schema: 2.0.0 +--- + +# Test-EntraScript + +## Synopsis + +Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. + +## Syntax + +```powershell +Test-EntraScript + -Path + [-Content ] + [-Quiet] + [] +``` + +## Description + +Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. + +## Examples + +### Example 1 + +```powershell +Test-EntraScript -Path .\usercreation.ps1 -Quiet +``` + +Returns whether the script `usercreation.ps1` could run under Microsoft.Graph.Entra. + +### Example 2 + +```powershell +Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript +``` + +Returns a list of all scripts that wouldn't run under the Microsoft.Graph.Entra module, listing each issue with line and code. + +## Parameters + +### -Path + +Path to one or more script files to scan. +Or name of the content, when also specifying -Content + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: FullName, Name + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Content + +Code content to scan. +Used when scanning code that has no file representation (for example, +straight from a repository). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Quiet + +Only return $true or $ false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($ false) + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md b/moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md new file mode 100644 index 0000000000..640ed63b0e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md @@ -0,0 +1,179 @@ +--- +title: Get-EntraAuditDirectoryLog +description: This article provides details on the Get-EntraAuditDirectoryLog command. + + +ms.topic: reference +ms.date: 07/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Get-EntraAuditDirectoryLog + +## Synopsis + +Get directory audit logs. + +## Syntax + +```powershell +Get-EntraAuditDirectoryLog +[-All] +[-Top ] +[-Filter ] +[] +``` + +## Description + +The `Get-EntraAuditDirectoryLog` cmdlet gets a Microsoft Entra ID audit log. + +Retrieve audit logs from Microsoft Entra ID, covering logs from various services such as user, app, device, and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (SSPR and admin resets), and self-service group management. + +## Examples + +### Example 1: Get all logs + +```powershell + Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' + Get-EntraAuditDirectoryLog -All +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId +-- ---------------- ------------------- -------- ------------- +Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd +Directory_bbbbbbbb-1111-2222-3333-cccccccccccc 17/07/2024 07:31:54 Update user UserManagement bbbb1111-cc22-3333-44dd-555555eeeeee +SSGM_cccccccc-2222-3333-4444-dddddddddddd 17/07/2024 07:13:08 GroupsODataV4_GetgroupLifecyclePolicies GroupManagement cccc2222-dd33-4444-55ee-666666ffffff + +``` + +This command gets all audit logs. + +### Example 2: Get first n logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Top 1 +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId LoggedB + yServic + e +-- ---------------- ------------------- -------- ------------- ------- +Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb_8IAPT_617717139 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd Core... + +``` + +This example returns the first N logs. + +### Example 3: Get audit logs containing a given ActivityDisplayName + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Filter "ActivityDisplayName eq 'Update rollout policy of feature'" -Top 1 +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId +-- ---------------- ------------------- -------- ------------- +Application Proxy_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 16/07/2024 05:13:49 Update rollout policy of feature Authentication aaaa0000-bb11-2222-33cc-444444dddddd +``` + +This command shows how to get audit logs by ActivityDisplayName. + +### Example 4: Get all audit logs with a given result + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraAuditDirectoryLog -Filter "result eq 'failure'" -All +``` + +This command shows how to get audit logs by the result. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraAuditDirectoryLogs` is an alias for `Get-EntraAuditDirectoryLog`. + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md b/moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md new file mode 100644 index 0000000000..5f710b7c0d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md @@ -0,0 +1,213 @@ +--- +title: Get-EntraAuditSignInLog +description: This article provides details on the Get-EntraAuditSignInLog command. + + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Get-EntraAuditSignInLog + +## Synopsis + +Get audit logs of sign-ins. + +## Syntax + +```powershell +Get-EntraAuditSignInLog + [-SignInId] + [-All] + [-Top ] + [-Filter ] + [] +``` + +## Description + +The `Get-EntraAuditSignInLog` cmdlet gets the Microsoft Entra ID sign-in log. + +In addition to delegated permissions, the signed-in user must belong to at least one of the following Microsoft Entra roles to read sign-in reports: + +- Global Reader +- Reports Reader +- Security Administrator +- Security Operator +- Security Reader + +## Examples + +### Example 1: Get all logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -All +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none +cccccccc-2222-3333-4444-dddddddddddd Azure Active Directory PowerShell 22223333-cccc-4444-dddd-5555eeee6666 {} none +dddddddd-3333-4444-5555-eeeeeeeeeeee Azure Active Directory PowerShell 33334444-dddd-5555-eeee-6666ffff7777 {} none +``` + +This example returns all audit logs of sign-ins. + +### Example 2: Get the first two logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Top 2 +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none +``` + +This example returns the first two audit logs of sign-ins. + +### Example 3: Get audit logs containing a given AppDisplayName + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Filter "AppDisplayName eq 'Graph Explorer'" -Top 1 +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 +``` + +This example demonstrates how to retrieve sign-in logs by AppDisplayName. + +### Example 4: Get all sign-in logs between dates + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraAuditSignInLog -Filter "createdDateTime ge 2024-07-01T00:00:00Z and createdDateTime le 2024-07-14T23:59:59Z" +``` + +This example shows how to retrieve sign-in logs between dates. + +### Example 5: List failed sign-ins for a user + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" +$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize +``` + +This example demonstrates how to retrieve failed sign-ins for a user. + +## Parameters + +### -SignInId + +Specifies unique ID of the Audit Log. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraAuditSignInLogs` is an alias for `Get-EntraAuditSignInLog`. + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md new file mode 100644 index 0000000000..c735ee4d6c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md @@ -0,0 +1,156 @@ +--- +title: Get-EntraAuthorizationPolicy +description: This article provides details on the Get-EntraAuthorizationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy + +schema: 2.0.0 +--- + +# Get-EntraAuthorizationPolicy + +## Synopsis + +Gets an authorization policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraAuthorizationPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraAuthorizationPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraAuthorizationPolicy` cmdlet gets a Microsoft Entra ID authorization policy. + +## Examples + +### Example 1: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraAuthorizationPolicy +``` + +```Output +DeletedDateTime Description DisplayName Id AllowEmailVerifiedUsersToJoinOrganization AllowI + nvites + From +--------------- ----------- ----------- -- ----------------------------------------- ------ + Used to manage authorization related settings across the company. Authorization Policy authorizationPolicy True every… +``` + +This example gets the Microsoft Entra ID authorization policy. + +### Example 2: Get an authorization policy by ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraAuthorizationPolicy -Id 'authorizationPolicy' | Format-List +``` + +```Output +allowInvitesFrom : everyone +allowUserConsentForRiskyApps : +id : authorizationPolicy +defaultUserRolePermissions : @{allowedToCreateSecurityGroups=True; allowedToReadBitlockerKeysForOwnedDevice=True; allowedToCreateTenants=True; + allowedToReadOtherUsers=True; allowedToCreateApps=False; permissionGrantPoliciesAssigned=System.Object[]} +blockMsolPowerShell : False +guestUserRoleId : a0b1b346-4d3e-4e8b-98f8-753987be4970 +displayName : Authorization Policy +@odata.context : https://graph.microsoft.com/v1.0/$metadata#policies/authorizationPolicy/$entity +allowedToSignUpEmailBasedSubscriptions : True +description : Used to manage authorization related settings across the company. +allowEmailVerifiedUsersToJoinOrganization : True +allowedToUseSSPR : True +DeletedDateTime : +AdditionalProperties : {} +``` + +This example gets the Microsoft Entra ID authorization policy. + +- `-Id` parameter specifies the unique identifier of the authorization policy. + +The response properties are: + +- `allowedToSignUpEmailBasedSubscriptions` - indicates whether users can sign up for email based subscriptions. +- `allowedToUseSSPR` - indicates whether administrators of the tenant can use the Self-Service Password Reset (SSPR). +- `allowEmailVerifiedUsersToJoinOrganization` - indicates whether a user can join the tenant by email validation. +- `allowInvitesFrom` - indicates who can invite guests to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. `everyone` is the default setting for all cloud environments except US Government. +- `allowUserConsentForRiskyApps` - indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. +- `blockMsolPowerShell` - to disable the use of the MSOnline PowerShell module set this property to `true`. This also disables user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This doesn't affect Microsoft Entra Connect or Microsoft Graph. +- `defaultUserRolePermissions` - specifies certain customizable permissions for default user role. +- `description` - description of this policy. +- `displayName` - display name for this policy. +- `enabledPreviewFeatures` - list of features enabled for private preview on the tenant. +- `guestUserRoleId` -represents role templateId for the role that should be granted to guests. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). +- `permissionGrantPolicyIdsAssignedToDefaultUserRole` - indicates if user consent to apps is allowed, and if it is, the app consent policy that governs the permission for users to grant consent. Values should be in the format `managePermissionGrantsForSelf.{id}` for user consent policies or `managePermissionGrantsForOwnedResource.{id}` for resource-specific consent policies, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. + +## Parameters + +### -Id + +Specifies the unique identifier of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraAuthorizationPolicy](Set-EntraAuthorizationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..406c7ef223 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md @@ -0,0 +1,135 @@ +--- +title: Get-EntraConditionalAccessPolicy +description: This article provides details on the Get-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Get-EntraConditionalAccessPolicy + +## Synopsis + +Gets a Microsoft Entra ID conditional access policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraConditionalAccessPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraConditionalAccessPolicy + -PolicyId + [-Property ] + [] +``` + +## Description + +This cmdlet allows an admin to get the Microsoft Entra ID conditional access policy. +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Retrieves a list of all conditional access policies in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraConditionalAccessPolicy +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled +ffffffff-5555-6666-7777-aaaaaaaaaaaa 2/27/2024 6:26:00 AM ConditionalAccessPolicy 2/29/2024 2:41:34 PM disabled +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 2/27/2024 6:30:48 AM ConditionalAccessPolicy 2/29/2024 2:43:53 PM disabled +``` + +This example retrieves a list of all conditional access policies in Microsoft Entra ID. + +### Example 2: Retrieves a conditional access policy in Microsoft Entra ID with given ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraConditionalAccessPolicy -PolicyId 'eeeeeeee-4444-5555-6666-ffffffffffff' +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled +``` + +This example retrieves a specified conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of a conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..b4dd3a5fd2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md @@ -0,0 +1,212 @@ +--- +title: Get-EntraFeatureRolloutPolicy +description: This article provides details on the Get-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Get-EntraFeatureRolloutPolicy + +## Synopsis + +Gets the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraFeatureRolloutPolicy + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraFeatureRolloutPolicy + [-SearchString ] + [] +``` + +### GetById + +```powershell +Get-EntraFeatureRolloutPolicy + -Id + [] +``` + +## Description + +The `Get-EntraFeatureRolloutPolicy` cmdlet allows an admin to get the policy for cloud authentication rollout (users moving from federation to cloud auth) in Microsoft Entra ID. + +This policy consists of one or two FeatureRolloutPolicy objects. These objects hold the groups assigned for cloud authentication (Pass-through authentication or Password Hash Sync) and groups assigned for Seamless single sign-on. + +## Examples + +### Example 1: Retrieves a list of all cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False True +bbbbbbbb-1111-2222-3333-cccccccccccc Feature-Rollout-Policy change emailAsAlternateId False False +``` + +This command retrieves a list of all cloud authentication roll-out policies in Microsoft Entra ID. + +### Example 2: Retrieves cloud authentication roll-out in Microsoft Entra ID with given ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output + +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False + +``` + +This example retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +- `-Id` - Specify The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +### Example 3: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Search String + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -SearchString 'Feature-Rollout-Policy' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False +``` + +This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +### Example 4: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Filter parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraFeatureRolloutPolicy -Filter "Description eq 'Feature-Rollout-Policy'" +``` + +```Output + +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False + +``` + +This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.MsFeatureRolloutPolicy + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md new file mode 100644 index 0000000000..358563649f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md @@ -0,0 +1,140 @@ +--- +title: Get-EntraIdentityProvider +description: This article provides details on the Get-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Get-EntraIdentityProvider + +## Synopsis + +This cmdlet is used to retrieve the configured identity providers in the directory. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraIdentityProvider + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraIdentityProvider + -IdentityProviderBaseId + [-Property ] + [] +``` + +## Description + +The `Get-EntraIdentityProvider` cmdlet is used to retrieve the identity providers that have been configured in the directory. +These identity providers can be used to allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C. + +Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. +For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. +The Gmail user will use their Google account credentials to authenticate and access the documents. + +The current set of identity providers can be Microsoft, Google, Facebook, Amazon, or LinkedIn. + +## Examples + +### Example 1: Retrieve all identity providers + +```powershell +Connect-Entra -Scopes 'IdentityProvider.Read.All' +Get-EntraIdentityProvider +``` + +```Output +Id DisplayName +-- ----------- +AADSignup-OAUTH Directory Sign up +Google-OAUTH Test +EmailOtpSignup-OAUTH Email One Time Passcode +MSASignup-OAUTH Microsoft Account +``` + +This example retrieves the list of all configured identity providers and their properties. + +### Example 2: Retrieve identity provider by Id + +```powershell +Connect-Entra -Scopes 'IdentityProvider.Read.All' +Get-EntraIdentityProvider -IdentityProviderBaseId Google-OAUTH +``` + +```Output +Id DisplayName +-- ----------- +Google-OAUTH GoogleName +``` + +This example retrieves the properties for the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. + +## Parameters + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..edab5a7bd4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md @@ -0,0 +1,138 @@ +--- +title: Get-EntraNamedLocationPolicy +description: This article provides details on the Get-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Get-EntraNamedLocationPolicy + +## Synopsis + +Gets a Microsoft Entra ID named location policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraNamedLocationPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraNamedLocationPolicy + -PolicyId + [-Property ] + [] +``` + +## Description + +This cmdlet allows an admin to get the Microsoft Entra ID named location policies. + +Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. + +## Examples + +### Example 1: Retrieves a list of all named location policies in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraNamedLocationPolicy +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee 31/07/2024 9:53:10 NamedLocation 31/07/2024 9:53:10 +eeeeeeee-4444-5555-6666-ffffffffffff 31/07/2024 4:38:42 NamedLocation1 31/07/2024 4:38:42 +ffffffff-5555-6666-7777-aaaaaaaaaaaa 01/08/2024 4:39:42 NamedLocation2 01/08/2024 4:39:42 +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 01/08/2024 4:57:03 NamedLocation3 01/08/2024 4:57:03 +``` + +This command retrieves a list of all named location policies in Microsoft Entra ID. + +### Example 2: Retrieves a named location policy by Id + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraNamedLocationPolicy -PolicyId 'dddddddd-3333-4444-5555-eeeeeeeeeeee' +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee 3/1/2024 9:53:10 AM NamedLocation 3/1/2024 9:53:10 AM +``` + +This example retrieves a specified named location policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the policy Id of a named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md new file mode 100644 index 0000000000..7d77a9299d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md @@ -0,0 +1,190 @@ +--- +title: Get-EntraOAuth2PermissionGrant +description: This article provides details on the Get-EntraOAuth2PermissionGrant Command. + + +ms.topic: reference +ms.date: 10/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraOAuth2PermissionGrant + +## Synopsis + +Gets OAuth2PermissionGrant entities. + +## Syntax + +```powershell +Get-EntraOAuth2PermissionGrant + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraOAuth2PermissionGrant` cmdlet gets OAuth2PermissionGrant entities in Microsoft Entra ID. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator +- Directory Readers +- Global Reader + +## Examples + +### Example 1: Get the OAuth2 permission grants + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read +H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read +``` + +This command gets the OAuth2 permission grants. + +### Example 2: Get all the OAuth2 permission grants + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant -All +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read +H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read +``` + +This command gets all the OAuth2 permission grants. + +### Example 3: Get OAuth2 permission grants for a user in a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Helpdesk Application'" +Get-EntraOAuth2PermissionGrant | Where-Object {$_.ClientId -eq $servicePrincipal.Id -and $_.PrincipalId -eq $user.Id} | Format-List +``` + +```Output +ObjectId : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 +ClientId : 22223333-cccc-4444-dddd-5555eeee6666 +ConsentType : Principal +Id : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 +PrincipalId : aaaaaaaa-bbbb-cccc-1111-222222222222 +ResourceId : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 +Scope : User.Read.All openid profile offline_access Organization.Read.All User.ReadWrite.All Device.Read.All Device.ReadWrite.All Directory.Read.All User.Read RoleManagement.ReadWrite.Directory Group.ReadWrite.All +AdditionalProperties : {} +``` + +This example gets the OAuth2 permission grants for a user in a service principal. + + +### Example 4: Get top 2 OAuth2 permission grants record + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraOAuth2PermissionGrant -Top 2 +``` + +```output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +``` + +This command retrieves the top 2 OAuth2 permission grant records. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) +[New-EntraOAuth2PermissionGrant](New-EntraOauth2PermissionGrant.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..35e31777dd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md @@ -0,0 +1,214 @@ +--- +title: Get-EntraPermissionGrantConditionSet +description: This article provides details on the Get-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Get-EntraPermissionGrantConditionSet + +## Synopsis + +Get a Microsoft Entra ID permission grant condition set by ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPermissionGrantConditionSet + -ConditionSetType + -PolicyId + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [-Property ] + [] +``` + +## Description + +Get a Microsoft Entra ID permission grant condition set object by ID. + +## Examples + +### Example 1: Get all permission grant condition sets that are included in the permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets all permission grant condition sets that are included in the policy. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. + +### Example 2: Get all permission grant condition sets that are excluded in the permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'excludes' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +bbbbbbbb-1111-2222-3333-cccccccccccc False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +cccccccc-2222-3333-4444-dddddddddddd False {44445555-eeee-6666-ffff-7777gggg8888} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets all permission grant condition sets that are excluded in the policy. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. + +### Example 3: Get a permission grant condition set + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} + +Get-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets a permission grant condition set specified by Id. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of the permission grant condition set object. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..800032dcc0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md @@ -0,0 +1,134 @@ +--- +title: Get-EntraPermissionGrantPolicy +description: This article provides details on the Get-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Get-EntraPermissionGrantPolicy + +## Synopsis + +Gets a permission grant policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPermissionGrantPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraPermissionGrantPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraPermissionGrantPolicy` cmdlet gets a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Get all permission grant policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +Get-EntraPermissionGrantPolicy +``` + +```Output +DeletedDateTime Description +--------------- ----------- + Includes all application permissions (app roles), for all APIs, for any client application. + Includes all chat resoruce-specific application permissions, for all APIs, for any client application. + (Deprecated) Includes all team resource-specific application permissions, for all APIs, for any client application. +``` + +This command gets all the permission grant policies. + +### Example 2: Get a permission grant policy by ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +Get-EntraPermissionGrantPolicy -Id 'testtenant-sampleapp-permissions' +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + Permissions for sample app in test tenant Sample app permissions testtenant-sampleapp-permissions +``` + +This command gets the specified permission grant policy. + +- `Id` parameter specifies the permission grant policy ID. + +## Parameters + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md new file mode 100644 index 0000000000..77785c64c1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md @@ -0,0 +1,196 @@ +--- +title: Get-EntraPolicy +description: This article provides details on the Get-EntraPolicy command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPolicy + +schema: 2.0.0 +--- + +# Get-EntraPolicy + +## Synopsis + +Gets a policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraPolicy + [-Top ] + [-All] + [] +``` + +### GetById + +```powershell +Get-EntraPolicy + -Id + [-All] + [] +``` + +## Description + +The `Get-EntraPolicy` cmdlet gets a policy in Microsoft Entra ID. Specify `Id` parameter to get a policy. + +## Examples + +### Example 1: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc +{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example shows how to return all policies. + +### Example 2: Get policy using Display Name + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + Permissions consentable based on Microsoft's current recommendations. Microsoft User Default Recommended Policy microsoft-user-default-recommended +``` + +This example shows how to get a specific policy using Display Name. + +### Example 3: Get a policy with specific ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -Id 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True +``` + +This example demonstrated how to receive policy with specific ID. + +- `Id` parameter specifies the unique policy ID, which you want to receive. In this example, `bbbbbbbb-1111-2222-3333-cccccccccccc` represents the ID of the policy. + +### Example 4: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -All +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc +{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example demonstrates how to retrieve all policies in Microsoft Entra ID. + +### Example 5: Get the top one policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraPolicy -Top 1 +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True +``` + +This example demonstrates how to retrieve top one policies in Microsoft Entra ID. + +## Parameters + +### -Id + +The Id of the policy you want to retrieve. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all policies. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPolicy](New-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..a26bfd778e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md @@ -0,0 +1,186 @@ +--- +title: Get-EntraTrustedCertificateAuthority +description: This article provides details on the Get-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Get-EntraTrustedCertificateAuthority + +## Synopsis + +Gets the trusted certificate authority. + +## Syntax + +```powershell +Get-EntraTrustedCertificateAuthority + [-TrustedIssuerSki ] + [-TrustedIssuer ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraTrustedCertificateAuthority` cmdlet gets the trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl1 +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : https://deltaexample.crl +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 0...} +TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory. + +### Example 2: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuer + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority -TrustedIssuer 'CN=mscmdlet' +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl1 +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A + +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : https://deltaexample.crl +TrustedCertificate : {48, 130, 3, 4...} +TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C +``` + +This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuer. + +- `-TrustedIssuer` parameter specifies the trusted issuer. + +### Example 3: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraTrustedCertificateAuthority -TrustedIssuerSki 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example.crl +DeltaCrlDistributionPoint : +TrustedCertificate : {48, 130, 3, 0...} +TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki. + +- `-TrustedIssuerSki` parameter specifies the trusted issuer ski. + +## Parameters + +### -TrustedIssuer + +Specifies a trusted issuer. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TrustedIssuerSki + +Specifies a trusted issuer ski. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..3b9cb44f36 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md @@ -0,0 +1,278 @@ +--- +title: New-EntraConditionalAccessPolicy +description: This article provides details on the New-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# New-EntraConditionalAccessPolicy + +## Synopsis + +Creates a new conditional access policy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraConditionalAccessPolicy + [-Id ] + [-DisplayName ] + [-State ] + [-Conditions ] + [-GrantControls ] + [-SessionControls ] + [] +``` + +## Description + +This cmdlet allows an admin to create new conditional access policy in Microsoft Entra ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Creates a new conditional access policy in Microsoft Entra ID that require MFA to access Exchange Online + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = 'all' +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = 'OR' +$controls.BuiltInControls = 'mfa' + +$params = @{ + DisplayName = 'MFA policy' + State = 'Enabled' + Conditions = $conditions + GrantControls = $controls +} + +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:29:09 MFA policy enabled +``` + +This command creates a new conditional access policy in Microsoft Entra ID that requires MFA to access Exchange Online. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +### Example 2: Creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = 'all' +$conditions.Locations = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition +$conditions.Locations.IncludeLocations = '5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9' +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = 'OR' +$controls.BuiltInControls = 'block' + +$params = @{ + DisplayName = 'MFA policy' + State = 'Enabled' + Conditions = $conditions + GrantControls = $controls +} + +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 MFA policy enabled +``` + +This command creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. + +### Example 3: Use all conditions and controls + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' + +$Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") +$Condition.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$Condition.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" +$Condition.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$Condition.Users.IncludeUsers = "all" + +$Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$Controls._Operator = "AND" +$Controls.BuiltInControls = @("mfa") + +$SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls +$ApplicationEnforcedRestrictions = New-Object Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions +$ApplicationEnforcedRestrictions.IsEnabled = $true +$SessionControls.applicationEnforcedRestrictions = $ApplicationEnforcedRestrictions +$params = @{ + DisplayName = "ConditionalAccessPolicy" + Conditions = $conditions + GrantControls = $controls + SessionControls = $SessionControls + } +New-EntraConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId +-- --------------- ----------- ----------- ---------------- ----- ---------- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 ConditionalAccessPolicy enabled +``` + +This example creates new conditional access policy in Microsoft Entra ID with all the conditions and controls. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +## Parameters + +### -DisplayName + +Specifies the display name of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Conditions + +Specifies the conditions for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessConditionSet +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GrantControls + +Specifies the controls for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessGrantControls +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionControls + +Enables limited experiences within specific cloud applications. + +```yaml +Type: ConditionalAccessSessionControls +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..e276f16fd8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md @@ -0,0 +1,224 @@ +--- +title: New-EntraFeatureRolloutPolicy +description: This article provides details on the New-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy + +schema: 2.0.0 +--- + +# New-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to create the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraFeatureRolloutPolicy + -Feature + -IsEnabled + [-Description ] + [-IsAppliedToOrganization ] + [-AppliesTo ] + -DisplayName + [] +``` + +## Description + +The `New-EntraFeatureRolloutPolicy` cmdlet allows an admin to create the policy for cloud authentication roll-out (users moving from federation to cloud auth) in Microsoft Entra ID. + +The policy admin can identify whether the users authenticate using password hashes in Microsoft Entra ID (Password hash-sync) or Microsoft Entra ID on-premises directly (Pass-through authentication). + +## Examples + +### Example 1: Creates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Feature = 'PassthroughAuthentication' + DisplayName = 'FeatureRolloutPolicy' + IsEnabled = $false +} +New-EntraFeatureRolloutPolicy @params +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False + +``` + +This example creates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. + +- `-IsEnabled` specifies the status of cloud authentication roll-out policy. + +### Example 2: Creates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Feature = 'PassthroughAuthentication' + DisplayName = 'FeatureRolloutPolicy' + IsEnabled = $false + IsAppliedToOrganization = $false +} +New-EntraFeatureRolloutPolicy @params +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False + +``` + +This command creates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. + +- `-IsEnabled` specifies the status of cloud authentication roll-out policy. + +- `-IsAppliedToOrganization` specifies if the cloud authentication roll-out policy applied to the entire organization. + +## Parameters + +### -DisplayName + +Specifies the display name of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Feature + +Specifies a feature assigned to the cloud authentication roll-out policy. + +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +```yaml +Type: FeatureEnum +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies the status of cloud authentication roll-out policy. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliesTo + +Specifies a list of Microsoft Entra ID objects that is assigned to the feature. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAppliedToOrganization + +Specifies if the cloud authentication roll-out policy applied to the entire organization. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.MsFeatureRolloutPolicy + +## Notes + +## Related Links + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md new file mode 100644 index 0000000000..246056cf38 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md @@ -0,0 +1,170 @@ +--- +title: New-EntraIdentityProvider +description: This article provides details on the New-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraIdentityProvider + +schema: 2.0.0 +--- + +# New-EntraIdentityProvider + +## Synopsis + +Configure a new identity provider in the directory. + +## Syntax + +```powershell +New-EntraIdentityProvider + -Type + -ClientSecret + -ClientId + [-Name ] + [] +``` + +## Description + +The `New-EntraIdentityProvider` cmdlet is used to configure an identity provider in the directory. + +Adding an identity provider will allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C using the identity provider. + +Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. + +For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. The Gmail user will use their Google account credentials to authenticate and access the documents. + +The current set of identity providers can be: + +- Microsoft +- Google +- Facebook +- Amazon +- LinkedIn + +The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add LinkedIn identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + Type = 'LinkedIn' + Name = 'LinkedInName' + ClientId = 'LinkedInAppClientId' + ClientSecret = 'LinkedInAppClientSecret' +} + +New-EntraIdentityProvider @params +``` + +```Output +Id DisplayName +-- ----------- +LinkedIn-OAUTH LinkedInName +``` + +This example adds a LinkedIn identity provider. + +- `-Type` parameter specifies the identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. +- `-Name` parameter specifies the display name of the identity provider. +- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. +- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. + +## Parameters + +### -ClientId + +The client identifier for the application, obtained during the application's registration with the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecret + +The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The display name of the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. + +For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..997bf4368b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md @@ -0,0 +1,236 @@ +--- +title: New-EntraNamedLocationPolicy +description: This article provides details on the New-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# New-EntraNamedLocationPolicy + +## Synopsis + +Creates a new named location policy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraNamedLocationPolicy + [-OdataType ] + [-Id ] + [-DisplayName ] + [-IpRanges ] + [-IsTrusted ] + [-CountriesAndRegions ] + [-IncludeUnknownCountriesAndRegions ] + [] +``` + +## Description + +This cmdlet allows an admin to create new named location policy in Microsoft Entra ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Creates a new Ip named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange +$ipRanges.cidrAddress = '6.5.4.3/32' +$params = @{ + OdataType = '#microsoft.graph.ipNamedLocation' + DisplayName = 'IP named location policy' + IsTrusted = $false + IpRanges = $ipRanges +} + +New-EntraNamedLocationPolicy @params +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +bbbbbbbb-1111-2222-3333-cccccccccccc 31-07-2024 10:45:27 IP named location policy 31-07-2024 10:45:27 +``` + +This command creates a new country named location policy in Microsoft Entra ID. + +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. +- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. + +### Example 2: Creates a new country named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + OdataType = '#microsoft.graph.countryNamedLocation' + DisplayName = 'Country named location policy' + CountriesAndRegions = 'IN' + IncludeUnknownCountriesAndRegions = $false +} + +New-EntraNamedLocationPolicy @params +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +cccccccc-2222-3333-4444-dddddddddddd 31-07-2024 10:46:16 Country named location policy 31-07-2024 10:46:16 +``` + +This command creates a new country named location policy in Microsoft Entra ID. + +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-CountriesAndRegions` parameter specifies the countries and regions for the named location policy. +- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. + +## Parameters + +### -OdataType + +Specifies the OData type of a named location policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpRanges + +List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsTrusted + +Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CountriesAndRegions + +Specifies the countries and regions for the named location policy in Microsoft Entra ID. List of countries and/or regions in the two-letter format specified by ISO 3166-2. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeUnknownCountriesAndRegions + +Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [Create namedLocation](/graph/api/conditionalaccessroot-post-namedlocations). + +## Related Links + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md new file mode 100644 index 0000000000..85c6a167e4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md @@ -0,0 +1,188 @@ +--- +title: New-EntraOauth2PermissionGrant +description: This article provides details on the New-EntraOauth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/28/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant + +schema: 2.0.0 +--- + +# New-EntraOauth2PermissionGrant + +## Synopsis + +Create a delegated permission grant using an oAuth2PermissionGrant object. This grant allows a client service principal to access a resource service principal on behalf of a signed-in user, with access restricted to the specified delegated permissions. + +## Syntax + +```powershell +New-EntraOauth2PermissionGrant + -ClientId + -ConsentType + -ResourceId + [-PrincipalId ] + [-Scope ] + [] +``` + +## Description + +The `New-EntraOauth2PermissionGrant` cmdlet creates a delegated permission grant using an oAuth2PermissionGrant object. This grant authorizes a client service principal to access a resource service principal on behalf of a signed-in user, with access limited to the specified delegated permissions. + +## Examples + +### Example 1: To grant authorization to impersonate all users + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" +$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" +$params = @{ + ClientId = $servicePrincipal.Id + ConsentType = 'AllPrincipals' + ResourceId = $graphApp.Id + Scope = 'Directory.Read.All' + StartTime = Get-Date + ExpiryTime = (Get-Date).AddYears(1) +} +New-EntraOauth2PermissionGrant @params +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... + +``` + +This command Grant authorization to impersonate all users. + +### Example 2: To grant authorization to impersonate a specific user + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" +$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + ClientId = $servicePrincipal.Id + ConsentType = 'Principal' + PrincipalId = $user.Id + ResourceId = $graphApp.Id + Scope = 'Directory.Read.All' + StartTime = Get-Date + ExpiryTime = (Get-Date).AddYears(1) +} +New-EntraOauth2PermissionGrant @params +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... +``` + +This command Grant authorization to impersonate a specific user. + +## Parameters + +### -ClientId + +The object ID (not appId) of the client service principal for the application, which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentType + +Indicates whether the client application is authorized to impersonate all users or only a specific user. + +- `AllPrincipals`: Authorizes the application to impersonate all users. +- `Principal`: Authorizes the application to impersonate a specific user. +An administrator can grant consent on behalf of all users. In some cases, non-admin users are authorized to consent on behalf of themselves for certain delegated permissions. This parameter is required and supports the $filter query (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The ID of the resource service principal to which access is authorized. This identifies the API, which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrincipalId + +The ID of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal, If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope + +A space-separated list of the claim values for delegated permissions, which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3,850 characters in length. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## RELATED LINKS + +[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) +[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..2f1cf9baf9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md @@ -0,0 +1,372 @@ +--- +title: New-EntraPermissionGrantConditionSet +description: This article provides details on the New-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# New-EntraPermissionGrantConditionSet + +## Synopsis + +Create a new Microsoft Entra ID permission grant condition set in a given policy. + +## Syntax + +```powershell +New-EntraPermissionGrantConditionSet + -PolicyId + -ConditionSetType + [-Permissions ] + [-ClientApplicationTenantIds ] + [-ClientApplicationIds ] + [-ResourceApplication ] + [-PermissionType ] + [-PermissionClassification ] + [-ClientApplicationsFromVerifiedPublisherOnly ] + [-ClientApplicationPublisherIds ] + [] +``` + +## Description + +Create a new Microsoft Entra ID permission grant condition set object in an existing policy. + +## Examples + +### Example 1: Create a basic permission grant condition set in an existing policy with all build in values + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'includes' +PermissionType = 'delegated' +} + +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions +-- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- +aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {all} +``` + +This command creates a basic permission grant condition set in an existing policy with all build in values. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. + +### Example 2: Create a permission grant condition set in an existing policy that includes specific permissions for a resource application + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'includes' +PermissionType = 'delegated' +Permissions = @($permission) +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +} + +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions +-- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- +aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {8b590... +``` + +This command creates a permission grant condition set in an existing policy that includes specific permissions for a resource application. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. + +### Example 3: Create a permission grant condition set in an existing policy that is excluded + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'excludes' +PermissionType = 'delegated' +Permissions = @('All') +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +PermissionClassification = 'low' +ClientApplicationsFromVerifiedPublisherOnly = $true +ClientApplicationIds = @('All') +ClientApplicationTenantIds = @('All') +ClientApplicationPublisherIds = @('All') +} +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification +-- ------------------------------- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------- +dddd3333-ee44-5555-66ff-777777aaaaaa False {all} {all} {all} True low +``` + +This command creates a permission grant condition set in an existing policy that is excluded. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. + +### Example 4: Create a permission grant condition set in an existing policy that is excluded + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'excludes' +PermissionType = 'delegated' +Permissions = @($permission) +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +PermissionClassification = 'low' +ClientApplicationsFromVerifiedPublisherOnly = $true +ClientApplicationIds = @('00001111-aaaa-2222-bbbb-3333cccc4444', '11112222-bbbb-3333-cccc-4444dddd5555') +ClientApplicationTenantIds = @('aaaabbbb-0000-cccc-1111-dddd2222eeee', 'bbbbcccc-1111-dddd-2222-eeee3333ffff', 'ccccdddd-2222-eeee-3333-ffff4444aaaa') +ClientApplicationPublisherIds = @('33334444-dddd-5555-eeee-6666ffff7777') +} +New-EntraPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +cccccccc-2222-3333-4444-dddddddddddd False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command creates a permission grant condition set in an existing policy that is excluded. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionType + +Specific type of permissions (application, delegated) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionClassification + +Specific classification (all, low, medium, high) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions + +The identifier of the resource application to scope consent operation down to. +It could be @("All") or a list of permission IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationIds + +The set of client application IDs to scope consent operation down to. +It could be @("All") or a list of client application IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationTenantIds + +The set of client application tenant IDs to scope consent operation down to. +It could be @("All") or a list of client application tenant IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationPublisherIds + +The set of client applications publisher IDs to scope consent operation down to. +It could be @("All") or a list of client application publisher IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationsFromVerifiedPublisherOnly + +A value indicates whether to only includes client applications from verified publishers. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceApplication + +The identifier of the resource application to scope consent operation down to. +It could be "Any" or a specific resource application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet + +## Notes + +## Related Links + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..ef81f38eb6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md @@ -0,0 +1,133 @@ +--- +title: New-EntraPermissionGrantPolicy +description: This article provides details on the New-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# New-EntraPermissionGrantPolicy + +## Synopsis + +Creates a permission grant policy. + +## Syntax + +```powershell +New-EntraPermissionGrantPolicy + -Id + [-DisplayName ] + [-Description ] + [] +``` + +## Description + +The `New-EntraPermissionGrantPolicy` cmdlet creates a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Create a permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$params = @{ + Id = 'my_new_permission_grant_policy_id' + DisplayName = 'MyNewPermissionGrantPolicy' + Description = 'My new permission grant policy' +} + +New-EntraPermissionGrantPolicy @params +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + My new permission grant policy MyNewPermissionGrantPolicy my_new_permission_grant_policy_id +``` + +This example creates new permission grant policy in Microsoft Entra ID. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-DisplayName` parameter specifies the display name for the permission grant policy. +- `-Description` parameter specifies the description for the permission grant policy. + +## Parameters + +### -Description + +Specifies the description for the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name for the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md new file mode 100644 index 0000000000..1bbe623503 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md @@ -0,0 +1,254 @@ +--- +title: New-EntraPolicy +description: This article provides details on the New-EntraPolicy command. + + +ms.topic: reference +ms.date: 08/02/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPolicy + +schema: 2.0.0 +--- + +# New-EntraPolicy + +## Synopsis + +Creates a policy. + +## Syntax + +```powershell +New-EntraPolicy + -Definition + -DisplayName + -Type + [-IsOrganizationDefault ] + [] +``` + +## Description + +The `New-EntraPolicy` cmdlet creates a policy in Microsoft Entra ID. Specify `DisplayName`, `Definition` and `Type` parameters for create a new policy. + +## Examples + +### Example 1: Create a new policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') + DisplayName = 'NewPolicy' + Type = 'HomeRealmDiscoveryPolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id IsOrganizationD + efault +---------- --------------- ----------- ----------- -- --------------- +{{"HomeReayPolicy":{"AlternateLoginIDLookup":true, "IncluderIds":["UserID"]}}} NewPolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False +``` + +This command creates a new policy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 2: Create a ClaimsMappingPolicy policy by 'IsOrganizationDefault' parameter + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name\",\"JwtClaimType\":\"upn\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://schemas.microsoft.com/identity/claims/displayname\",\"JwtClaimType\":\"name\"}]}}" ], "displayName": "Custom Claims Issuance Policy", "isOrganizationDefault": false }') + DisplayName ='ClaimstestPolicy' + Type = 'claimsMappingPolicies' + IsOrganizationDefault = $false +} +New-EntraPolicy @params +``` + +```Output +Definition +---------- +{{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLCl… +``` + +This command creates a ClaimsMappingPolicy using 'IsOrganizationDefault' parameter in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` - Parameter specifies the type of policy. In this example, `ClaimsMappingPolicy` + represents the type of policy. + +- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. + +### Example 3: Create a TokenLifetimePolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}') + DisplayName = 'TokenLifetimePolicy' + Type = 'TokenLifetimePolicy' + IsOrganizationDefault = $false +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id IsOrganizatio + nDefault +---------- --------------- ----------- ----------- -- ------------- +{{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}} TokenLifetimePolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False +``` + +This command creates a TokenLifetimePolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 4: Create a TokenIssuancePolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly","EmitSAMLNameFormat":"true"}}') + DisplayName = 'tokenIssuance' + Type = 'TokenIssuancePolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition +---------- +{{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly… +``` + +This command creates a TokenIssuancePolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 5: Create a ActivityBasedTimeoutPolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') + DisplayName = 'ActivityBasedTimeoutPolicyname' + Type = 'ActivityBasedTimeoutPolicy' +} +New-EntraPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} ActivityBasedTimeoutPolicyname aaaaaaaa-0000-1111-2222... + +``` + +This command creates a ActivityBasedTimeoutPolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +## Parameters + +### -Definition + +Specifies an array of JSON that contains all the rules of the policy, for example: -Definition @("{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}"). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +String of the policy name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsOrganizationDefault + +True if this policy is the organizational default. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of policy. +For token lifetimes, specify "TokenLifetimePolicy." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..ab18d1f589 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md @@ -0,0 +1,98 @@ +--- +title: New-EntraTrustedCertificateAuthority +description: This article provides details on the New-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# New-EntraTrustedCertificateAuthority + +## Synopsis + +Creates a trusted certificate authority. + +## Syntax + +```powershell +New-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `New-EntraTrustedCertificateAuthority` cmdlet creates a trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Creates the trusted certificate authorities in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' + +$new_ca = New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation #Create CertificateAuthorityInformation object +$new_ca.AuthorityType = "RootAuthority" +$new_ca.CrlDistributionPoint = "https://example.crl" +$new_ca.DeltaCrlDistributionPoint = "https://deltaexample.crl" +$new_ca.TrustedCertificate = "Path to .cer file(including cer file name)" +New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command creates the trusted certificate authorities in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. +It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..f0703bac66 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraConditionalAccessPolicy +description: This article provides details on the Remove-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Remove-EntraConditionalAccessPolicy + +## Synopsis + +Deletes a conditional access policy in Microsoft Entra ID by Id. + +## Syntax + +```powershell +Remove-EntraConditionalAccessPolicy + -PolicyId + [] +``` + +## Description + +This cmdlet allows an admin to delete a conditional access policy in Microsoft Entra ID by Id. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Deletes a conditional access policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +$policy = Get-EntraConditionalAccessPolicy | Where-Object {$_.DisplayName -eq 'MFA policy'} +Remove-EntraConditionalAccessPolicy -PolicyId $policy.ObjectId +``` + +This command deletes a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of a conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..75ae9347b1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraFeatureRolloutPolicy +description: This article provides details on the Remove-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraBetaFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Remove-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to remove the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +Remove-EntraFeatureRolloutPolicy + -Id + [] +``` + +## Description + +An admin uses `Remove-EntraFeatureRolloutPolicy` cmdlet to remove the cloud authentication roll-out policy and have all users where policy applied to be free of the policy. + +Users in groups that were assigned to the policy falls back to the global authentication method (most common case will be federation). Specify `Id` parameter to remove the cloud authentication roll-out policy. + +## Examples + +### Example 1: Removes the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$Policy = Get-EntraFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policy'" +Remove-EntraFeatureRolloutPolicy -Id $Policy.Id +``` + +This example removes the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` - specifies the unique identifier of the cloud authentication roll-out policy. You can use `Get-EntraFeatureRolloutPolicy` to retrieve policy details. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md new file mode 100644 index 0000000000..03968e43e8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraFeatureRolloutPolicyDirectoryObject +description: This article provides details on the Remove-EntraFeatureRolloutPolicyDirectoryObject command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject + +schema: 2.0.0 +--- + +# Remove-EntraFeatureRolloutPolicyDirectoryObject + +## Synopsis + +Allows an admin to remove a group from the cloud authentication rollout policy in Microsoft Entra ID. +Users in this group revert back to the authenticating using the global policy (in most cases this will be federation). + +## Syntax + +```powershell +Remove-EntraFeatureRolloutPolicyDirectoryObject + -ObjectId + -Id + [] +``` + +## Description + +An admin uses the `Remove-EntraFeatureRolloutPolicyDirectoryObject` cmdlet to remove groups from the cloud authentication roll-out policy. + +Users in these groups start authenticating against the global authentication policy (for example, +federation). Specify `ObjectId` and `Id` parameter to remove groups from the cloud authentication roll-out policy. + +## Examples + +### Example 1: Removes a group from the cloud authentication roll-out policy from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + ObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Remove-EntraFeatureRolloutPolicyDirectoryObject @params +``` + +This command removes a group from the cloud authentication roll-out policy from Microsoft Entra ID. + +- `-Id` Parameter specifies the ID of the cloud authentication roll-out policy. +- `-ObjectId` parameter specifies the ID of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy. + +## Parameters + +### -ID + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +The unique identifier of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md new file mode 100644 index 0000000000..c1982b130d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraIdentityProvider +description: This article provides details on the Remove-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Remove-EntraIdentityProvider + +## Synopsis + +This cmdlet is used to delete an identity provider in the directory. + +## Syntax + +```powershell +Remove-EntraIdentityProvider + -IdentityProviderBaseId + [] +``` + +## Description + +This cmdlet is used to delete an identity provider that has been configured in the directory. + +The identity provider is permanently deleted. + +The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. + +## Examples + +### Example 1: Remove the identity provider in the directory + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +Remove-EntraIdentityProvider -IdentityProviderBaseId 'LinkedIn-OAUTH' +``` + +This command demonstrates how to remove the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. + +## Parameters + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraIdentityProvider](New-EntraIdentityProvider.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..405c7db5f6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraNamedLocationPolicy +description: This article provides details on the Remove-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Remove-EntraNamedLocationPolicy + +## Synopsis + +Deletes a Microsoft Entra ID named location policy by PolicyId. + +## Syntax + +```powershell +Remove-EntraNamedLocationPolicy + -PolicyId + [] +``` + +## Description + +This cmdlet allows an admin to delete the Microsoft Entra ID named location policy. + +Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. + +## Examples + +### Example 1: Deletes a named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +Remove-EntraNamedLocationPolicy -PolicyId $policy.Id +``` + +This command demonstrates how to delete the named location policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md new file mode 100644 index 0000000000..5b9cce4030 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraOAuth2PermissionGrant +description: This article provides details on the Remove-EntraOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Remove-EntraOAuth2PermissionGrant + +## Synopsis + +Removes an OAuth2PermissionGrant. + +## Syntax + +```powershell +Remove-EntraOAuth2PermissionGrant + -ObjectId + [] +``` + +## Description + +The `Remove-EntraOAuth2PermissionGrant` cmdlet removes an OAuth2PermissionGrant object in Microsoft Entra ID. + +When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted OAuth2PermissionGrant. + +## Examples + +### Example 1: Remove an OAuth2 permission grant + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$SharePointSP = Get-EntraServicePrincipal | Where-Object {$_.DisplayName -eq 'Microsoft.SharePoint'} +$SharePointOA2AllSitesRead = Get-EntraOAuth2PermissionGrant | Where-Object {$_.ResourceId -eq $SharePointSP.ObjectId} | Where-Object {$_.Scope -eq 'AllSites.Read'} +Remove-EntraOAuth2PermissionGrant -ObjectId $SharePointOA2AllSitesRead.ObjectId +``` + +This example shows how to remove an OAuth2PermissionGrant object in Microsoft Entra ID. + +## Parameters + +### -ObjectId + +Specifies the ID of an OAuth2PermissionGrant object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) + +[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..d46b6e072d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md @@ -0,0 +1,129 @@ +--- +title: Remove-EntraPermissionGrantConditionSet +description: This article provides details on the Remove-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Remove-EntraPermissionGrantConditionSet + +## Synopsis + +Delete a Microsoft Entra ID permission grant condition set by ID. + +## Syntax + +```powershell +Remove-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [] +``` + +## Description + +Delete a Microsoft Entra ID permission grant condition set object by ID. + +## Examples + +### Example 1: Delete a permission grant condition set from a policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$PermissionGrantConditionSetId = '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'excludes' + Id = $PermissionGrantConditionSetId +} +Remove-EntraPermissionGrantConditionSet @params +``` + +This example demonstrates how to remove the Microsoft Entra ID permission grant condition set by ID. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..bd9e0d012a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md @@ -0,0 +1,85 @@ +--- +title: Remove-EntraPermissionGrantPolicy +description: This article provides details on the Remove-EntraPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Remove-EntraPermissionGrantPolicy + +## Synopsis + +Removes a permission grant policy. + +## Syntax + +```powershell +Remove-EntraPermissionGrantPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraPermissionGrantPolicy` cmdlet removes a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Remove a permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +Remove-EntraPermissionGrantPolicy -Id 'my_permission_grant_policy_id' +``` + +This command removes the specified permission grant policy in Microsoft Entra ID. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. + +## Parameters + +### -Id + +The unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md new file mode 100644 index 0000000000..b35076fe82 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md @@ -0,0 +1,83 @@ +--- +title: Remove-EntraPolicy +description: This article provides details on the Remove-EntraPolicy command. + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPolicy +schema: 2.0.0 +--- + +# Remove-EntraPolicy + +## Synopsis + +Removes a policy. + +## Syntax + +```powershell +Remove-EntraPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraPolicy` cmdlet removes a policy from Microsoft Entra ID. Specify `Id` parameter to remove a specific policy. + +## Examples + +### Example 1: Remove a policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.ApplicationConfiguration' +Remove-EntraPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This command removes the specified policy from Microsoft Entra ID. + +- `-Id` - specifies the ID of the policy you want to remove. + +## Parameters + +### -Id + +The Id of the policy you want to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[New-EntraPolicy](New-EntraPolicy.md) + +[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..dce8b479ed --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraTrustedCertificateAuthority +description: This article provides details on the Remove-EntraTrustedCertificateAuthority command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Remove-EntraTrustedCertificateAuthority + +## Synopsis + +Removes a trusted certificate authority. + +## Syntax + +```powershell +Remove-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `Remove-EntraTrustedCertificateAuthority` cmdlet removes a trusted certificate authority from Microsoft Entra ID. + +## Examples + +### Example 1: Remove the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object +Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command deletes the trusted certificate authorities that are defined in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. +It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md new file mode 100644 index 0000000000..f508974760 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md @@ -0,0 +1,241 @@ +--- +title: Set-EntraAuthorizationPolicy +description: This article provides details on the Set-EntraAuthorizationPolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy + +schema: 2.0.0 +--- + +# Set-EntraAuthorizationPolicy + +## Synopsis + +Updates an authorization policy. + +## Syntax + +```powershell +Set-EntraAuthorizationPolicy + [-BlockMsolPowerShell ] + [-AllowedToSignUpEmailBasedSubscriptions ] + [-AllowEmailVerifiedUsersToJoinOrganization ] + [-DisplayName ] + [-Description ] + [-DefaultUserRolePermissions ] + [-AllowedToUseSSPR ] + [] +``` + +## Description + +The `Set-EntraAuthorizationPolicy` cmdlet updates a Microsoft Entra ID authorization policy. + +For delegated scenarios, the user needs to have the `Privileged Role Administrator` Microsoft Entra role. + +## Examples + +### Example 1: Update an authorization policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' +$params = @{ + DisplayName = 'Updated displayName' + Description = 'Updated Description' + BlockMsolPowerShell = $true + AllowedToUseSSPR = $false + AllowEmailVerifiedUsersToJoinOrganization = $true + AllowedToSignUpEmailBasedSubscriptions = $true +} + +Set-EntraAuthorizationPolicy @params +``` + +This example demonstrates how to update a Microsoft Entra ID authorization policy. + +### Example 2: Update DefaultUserRolePermissions of authorization policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' +$DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions +$DefaultUserRolePermissions.AllowedToCreateApps = $false +$DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $false +$DefaultUserRolePermissions.AllowedToReadOtherUsers = $false +Set-EntraAuthorizationPolicy -DefaultUserRolePermissions $DefaultUserRolePermissions +``` + +This example demonstrates how to update a DefaultUserRolePermissions of authorization policy in Microsoft Entra ID. + +## Parameters + +### -AllowedToSignUpEmailBasedSubscriptions + +Specifies whether users can sign up for email based subscriptions. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowedToUseSSPR + +Specifies whether the Self-Serve Password Reset feature can be used by users on the tenant. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowEmailVerifiedUsersToJoinOrganization + +Specifies whether a user can join the tenant by email validation. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BlockMsolPowerShell + +Specifies whether the user-based access to the legacy service endpoint used by Microsoft Online PowerShell is blocked or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowUserConsentForRiskyApps + +Indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allowInvitesFrom + +Indicates who can invite external users to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. Everyone is the default setting for all cloud environments except US Government. + +```yaml +Type: allowInvitesFrom +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultUserRolePermissions + +Contains various customizable default user role permissions. + +```yaml +Type: DefaultUserRolePermissions +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions + +## Outputs + +## Notes + +## Related Links + +[Get-EntraAuthorizationPolicy](Get-EntraAuthorizationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md new file mode 100644 index 0000000000..1c140af2d6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md @@ -0,0 +1,240 @@ +--- +title: Set-EntraConditionalAccessPolicy +description: This article provides details on the Set-EntraConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Set-EntraConditionalAccessPolicy + +## Synopsis + +Updates a conditional access policy in Microsoft Entra ID by Id. + +## Syntax + +```powershell +Set-EntraConditionalAccessPolicy + -PolicyId + [-Conditions ] + [-GrantControls ] + [-DisplayName ] + [-Id ] + [-State ] + [-SessionControls ] + [] +``` + +## Description + +This cmdlet allows an admin to update a conditional access policy in Microsoft Entra ID by Id. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Update a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$cond = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$control = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$session = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + DisplayName = 'MFA policy updated' + State = 'Enabled' + Conditions = $cond + GrantControls = $control + SessionControls = $session +} + +Set-EntraConditionalAccessPolicy @params +``` + +The example shows how to update a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +### Example 2: Update display name for a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + DisplayName = 'MFA policy updated' +} + +Set-EntraConditionalAccessPolicy @params +``` + +This command updates a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-DisplayName` parameter specifies the display name of a conditional access policy. + +### Example 3: Update the state for a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + State = 'Enabled' +} + +Set-EntraConditionalAccessPolicy @params +``` + +This command updates a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Conditions + +Specifies the conditions for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessConditionSet +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GrantControls + +Specifies the controls for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessGrantControls +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionControls + +Enables limited experiences within specific cloud applications. + +```yaml +Type: ConditionalAccessSessionControls +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) + +[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) + +[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md new file mode 100644 index 0000000000..9f60eb62da --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md @@ -0,0 +1,231 @@ +--- +title: Set-EntraFeatureRolloutPolicy +description: This article provides details on the Set-EntraFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Set-EntraFeatureRolloutPolicy + +## Synopsis + +Allows an admin to modify the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraFeatureRolloutPolicy + [-Feature ] + [-IsEnabled ] + -Id + [-IsAppliedToOrganization ] + [-AppliesTo ] + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +An admin uses the `Set-EntraFeatureRolloutPolicy` cmdlet to modify the cloud authentication rollout policy. + +This includes specifying whether the method for cloud authentication is Pass-through Authentication or Password Hash Synchronization, and whether Seamless Single Sign-On (SSO) is enabled. + +Users in groups assigned to the policy will start authenticating using the new method and Seamless SSO, if it is specified. + +## Examples + +### Example 1: Updates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + DisplayName = 'Feature-Rollout-Policytest' + IsEnabled = $false +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` - specifies the ID of cloud authentication roll-out policy. +- `-DisplayName` - specifies the display name of the cloud authentication roll-out policy. +- `-IsEnabled` - specifies the status of cloud authentication roll-out policy. + +### Example 2: Updates the Description + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Description = 'Feature-Rollout-test' +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the `-Description` of policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` Specify the ID of cloud authentication roll-out policy. +- `-Description` Specifies the description of the cloud authentication roll-out policy. + +### Example 3: Updates the IsAppliedToOrganization + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + IsAppliedToOrganization = $false +} +Set-EntraFeatureRolloutPolicy @params +``` + +This command updates the `-IsAppliedToOrganization` parameter of policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` Specify the ID of cloud authentication roll-out policy. +- `-IsAppliedToOrganization` Parameter determines whether a particular feature rollout policy should be applied to the entire organization or not. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Feature + +Specifies a feature assigned to the cloud authentication roll-out policy. + +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +```yaml +Type: FeatureEnum +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies the status of cloud authentication roll-out policy. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliesTo + +Specifies a list of Microsoft Entra ID objects that is assigned to the feature. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAppliedToOrganization + +Specifies if the cloud authentication roll-out policy applied to the entire organization. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) + +[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) + +[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md new file mode 100644 index 0000000000..557f8d8cee --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md @@ -0,0 +1,195 @@ +--- +title: Set-EntraIdentityProvider +description: This article provides details on the Set-EntraIdentityProvider command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraIdentityProvider + +schema: 2.0.0 +--- + +# Set-EntraIdentityProvider + +## Synopsis + +Update the properties of an existing identity provider configured in the directory. + +## Syntax + +```powershell +Set-EntraIdentityProvider + -IdentityProviderBaseId + [-Type ] + [-ClientSecret ] + [-ClientId ] + [-Name ] + [] +``` + +## Description + +The `Set-EntraIdentityProvider` cmdlet is used to update the properties of an existing identity provider. + +The type of the identity provider can't be modified. + +## Examples + +### Example 1: Update client id of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + ClientId = 'NewClientID' +} +Set-EntraIdentityProvider @params +``` + +This example updates the client ID for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. + +### Example 2: Update client secret of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + ClientSecret = 'NewClientSecret' +} +Set-EntraIdentityProvider @params +``` + +This example updates the client secret for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. + +### Example 3: Update display name of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + Name = 'NewGoogleName' +} +Set-EntraIdentityProvider @params +``` + +This example updates the display name for the specified identity provider. + +- `-Id` parameter specifies the unique identifier of the identity provider. +- `-Name` parameter specifies the display name of the identity provider. + +## Parameters + +### -ClientId + +The client identifier for the application, obtained during the application's registration with the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecret + +The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentityProviderBaseId +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Name + +The display name of the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. + +For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraIdentityProvider](New-EntraIdentityProvider.md) + +[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md new file mode 100644 index 0000000000..4f55ee4639 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md @@ -0,0 +1,258 @@ +--- +title: Set-EntraNamedLocationPolicy +description: This article provides details on the Set-EntraNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy + +schema: 2.0.0 +--- + +# Set-EntraNamedLocationPolicy + +## Synopsis + +Updates a named location policy in Microsoft Entra ID by PolicyId. + +## Syntax + +```powershell +Set-EntraNamedLocationPolicy + -PolicyId + [-OdataType ] + [-IpRanges ] + [-IncludeUnknownCountriesAndRegions ] + [-IsTrusted ] + [-DisplayName ] + [-Id ] + [-CountriesAndRegions ] + [] +``` + +## Description + +This cmdlet allows an admin to update a named location policy in Microsoft Entra ID by PolicyId. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Update an IP named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange +$ipRanges.cidrAddress = '6.5.4.3/32' +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.ipNamedLocation' + IsTrusted = $false + IncludeUnknownCountriesAndRegions = $false + IpRanges = $ipRanges +} +Set-EntraNamedLocationPolicy @params +``` + +This example shows how to update an IP named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. +- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. + +### Example 2: Update a country named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.countryNamedLocation' + IncludeUnknownCountriesAndRegions = $true +} +Set-EntraNamedLocationPolicy @params +``` + +This command updates a country named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. + +### Example 3: Update display name of a named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.ipNamedLocation' + DisplayName = 'NewName' +} +Set-EntraNamedLocationPolicy @params +``` + +This command updates display name of named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OdataType + +Specifies the OData type of a named location policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpRanges + +List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsTrusted + +Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CountriesAndRegions + +Specifies the countries and regions for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeUnknownCountriesAndRegions + +Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the Id of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) + +[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) + +[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md new file mode 100644 index 0000000000..45e4ecc72a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md @@ -0,0 +1,309 @@ +--- +title: Set-EntraPermissionGrantConditionSet +description: This article provides details on the Set-EntraPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Set-EntraPermissionGrantConditionSet + +## Synopsis + +Update an existing Microsoft Entra ID permission grant condition set. + +## Syntax + +```powershell +Set-EntraPermissionGrantConditionSet + -ConditionSetType + -Id + -PolicyId + [-Permissions ] + [-ClientApplicationTenantIds ] + [-ClientApplicationIds ] + [-ResourceApplication ] + [-PermissionType ] + [-PermissionClassification ] + [-ClientApplicationsFromVerifiedPublisherOnly ] + [-ClientApplicationPublisherIds ] + [] +``` + +## Description + +Updates a Microsoft Entra ID permission grant condition set object identified by Id. + +## Examples + +### Example 1: Update a permission grant condition set to includes permissions that is classified as low + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' + PermissionClassification = 'low' +} + +Set-EntraPermissionGrantConditionSet @params +``` + +This command updates sets the specified permission grant set to classify as low. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. + +### Example 2: Update a permission grant condition set + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' + PermissionType = 'delegated' + PermissionClassification = 'low' + ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + Permissions = @('All') + ClientApplicationIds = @('All') + ClientApplicationTenantIds = @('All') + ClientApplicationPublisherIds = @('All') + ClientApplicationsFromVerifiedPublisherOnly = $true +} + +Set-EntraPermissionGrantConditionSet @params +``` + +This command updates sets the specified permission grant set. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionType + +Specific type of permissions (application, delegated) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionClassification + +Specific classification (all, low, medium, high) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions + +The identifier of the resource application to scope consent operation down to. +It could be @("All") or a list of permission IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationIds + +The set of client application IDs to scope consent operation down to. +It could be @("All") or a list of client application IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationTenantIds + +The set of client application tenant IDs to scope consent operation down to. +It could be @("All") or a list of client application tenant IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationPublisherIds + +The set of client applications publisher IDs to scope consent operation down to. +It could be @("All") or a list of client application publisher IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationsFromVerifiedPublisherOnly + +A value indicates whether to only includes client applications from verified publishers. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceApplication + +The identifier of the resource application to scope consent operation down to. +It could be "Any" or a specific resource application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) + +[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) + +[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md new file mode 100644 index 0000000000..db649bc8da --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md @@ -0,0 +1,143 @@ +--- +title: Set-EntraPermissionGrantPolicy +description: This article provides details on the Set-EntraPermissionGrantPolicy command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Set-EntraPermissionGrantPolicy + +## Synopsis + +Updates a permission grant policy. + +## Syntax + +```powershell +Set-EntraPermissionGrantPolicy + -Id + [-DisplayName ] + [-Description ] + [] +``` + +## Description + +The `Set-EntraPermissionGrantPolicy` command updates a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Update description of permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +$params = @{ + Id = $policy.Id + Description = 'Updated description' +} + +Set-EntraPermissionGrantPolicy @params +``` + +This command updates the description of the specified permission grant policy. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-Description` parameter specifies the description for the permission grant policy. + +### Example 2: Update display name of permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +$params = @{ + Id = $policy.Id + DisplayName = 'Updated DisplayName' +} + +Set-EntraPermissionGrantPolicy @params +``` + +This command updates the display name of the specified permission grant policy. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-DisplayName` parameter specifies the display name for the permission grant policy. + +## Parameters + +### -Description + +Specifies the description of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) + +[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) + +[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md new file mode 100644 index 0000000000..9f5e238eb2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md @@ -0,0 +1,211 @@ +--- +title: Set-EntraPolicy +description: This article provides details on the Set-EntraPolicy command. + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: +schema: 2.0.0 +--- + +# Set-EntraPolicy + +## Synopsis + +Updates a policy. + +## Syntax + +```powershell +Set-EntraPolicy + -Id + [-Definition ] + [-DisplayName ] + [-Type ] + [-IsOrganizationDefault ] + [] +``` + +## Description + +The `Set-EntraPolicy` cmdlet sets a policy in Microsoft Entra ID. Specify `Id` parameter to updates specific policy. + +## Examples + +### Example 1: Update a policy display name + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DisplayName = 'NewUpdated' +} +Set-EntraPolicy @params +``` + +This command updates display name of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `DisplayName` specifies the display name. + +### Example 2: Update a policy definition + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') +} +Set-EntraPolicy @params +``` + +This command updates definition of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `Definition` specifies the array of stringified JSON that contains all the rules of the policy. +In this example, `@('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}')` represents definition of the activityBasedTimeoutPolicy. + +### Example 3: Update a policy organization default + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + IsOrganizationDefault = $false +} +Set-EntraPolicy @params +``` + +This command updates organization default of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. + +### Example 4: Update policy type + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Type = 'ActivityBasedTimeoutPolicy' +} +Set-EntraPolicy @params +``` + +This example demonstrates how to update the `type` property of a specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `-Type` specifies the type of policy. In this example, `ActivityBasedTimeoutPolicy` represents the type of policy. + +## Parameters + +### -Definition + +Specifies the array of stringified JSON that contains all the rules of the policy. +For example -Definition @('{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}'). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsOrganizationDefault + +True if this policy is the organizational default. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of policy. +For token lifetimes, use "TokenLifetimePolicy." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The ID of the policy for which you want to set values. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraPolicy](Get-EntraPolicy.md) + +[New-EntraPolicy](New-EntraPolicy.md) + +[Remove-EntraPolicy](Remove-EntraPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md new file mode 100644 index 0000000000..cdfdb92eaf --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md @@ -0,0 +1,92 @@ +--- +title: Set-EntraTrustedCertificateAuthority +description: This article provides details on the Set-EntraTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Set-EntraTrustedCertificateAuthority + +## Synopsis + +Updates a trusted certificate authority. + +## Syntax + +```powershell +Set-EntraTrustedCertificateAuthority + -CertificateAuthorityInformation +``` + +## Description + +The `Set-EntraTrustedCertificateAuthority` cmdlet updates a trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Updates the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object +$cer[0].CrlDistributionPoint = "https://example.crl" +Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command updates the trusted certificate authorities that are defined in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) + +[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) + +[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUser.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUser.md new file mode 100644 index 0000000000..b463aa7035 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUser.md @@ -0,0 +1,426 @@ +--- +title: Get-EntraUser +description: This article provides details on the Get-EntraUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUser + +schema: 2.0.0 +--- + +# Get-EntraUser + +## Synopsis + +Gets a user. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraUser + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraUser + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraUser + -UserId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUser` cmdlet gets a user from Microsoft Entra ID. + +## Examples + +### Example 1: Get top three users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Top 3 +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Angel Brown cccccccc-2222-3333-4444-dddddddddddd AngelB@contoso.com AngelB@contoso.com +Avery Smith dddddddd-3333-4444-5555-eeeeeeeeeeee AveryS@contoso.com AveryS@contoso.com +Sawyer Miller eeeeeeee-4444-5555-6666-ffffffffffff SawyerM@contoso.com SawyerM@contoso.com +``` + +This example demonstrates how to get top three users from Microsoft Entra ID. + +### Example 2: Get a user by ID + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -UserId 'SawyerM@contoso.com' +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc sawyerm@tenant.com sawyerm@tenant.com +``` + +This command gets the specified user. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. + +### Example 3: Search among retrieved users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -SearchString 'New' +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User88 bbbbbbbb-1111-2222-3333-cccccccccccc demo99@tenant.com +New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com +``` + +This cmdlet gets all users that match the value of SearchString against the first characters in DisplayName or UserPrincipalName. + +### Example 4: Get a user by userPrincipalName + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "userPrincipalName eq 'SawyerM@contoso.com'" +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Sawyer Miller cccccccc-2222-3333-4444-dddddddddddd SawyerM@contoso.com +``` + +This command gets the specified user. + +### Example 5: Get a user by MailNickname + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "startswith(MailNickname,'Ada')" +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Mark Adams bbbbbbbb-1111-2222-3333-cccccccccccc Adams@contoso.com Adams@contoso.com +``` + +In this example, we retrieve all users whose MailNickname starts with Ada. + +### Example 6: Get SignInActivity of a User + +```powershell +Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All' +Get-EntraUser -UserId 'SawyerM@contoso.com' -Property 'SignInActivity' | Select-Object -ExpandProperty 'SignInActivity' +``` + +```Output +lastNonInteractiveSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa +lastSignInRequestId : cccccccc-2222-3333-4444-dddddddddddd +lastSuccessfulSignInDateTime : 9/9/2024 1:12:13 PM +lastNonInteractiveSignInDateTime : 9/9/2024 1:12:13 PM +lastSuccessfulSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa +lastSignInDateTime : 9/7/2024 9:15:41 AM +``` + +This example demonstrates how to retrieve the SignInActivity of a specific user by selecting a property. + +### Example 7: List users with disabled accounts + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUser -Filter "accountEnabled eq false" | Select-Object DisplayName, Id, Mail, UserPrincipalName +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com +``` + +This example demonstrates how to retrieve all users with disabled accounts. + +### Example 8: List users based in a specific country + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$usersInCanada = Get-EntraUser -Filter "Country eq 'Canada'" +$usersInCanada | Select-Object Id, DisplayName, UserPrincipalName, OfficeLocation, Country | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName OfficeLocation Country +-- ----------- ----------------- -------------- ------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com 23/2102 Canada +``` + +This example demonstrates how to retrieve all users based in Canada. + +### Example 9: List user count per department + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$departmentCounts = Get-EntraUser -All | Group-Object -Property Department | Select-Object Name, @{Name="MemberCount"; Expression={$_.Count}} +$departmentCounts | Format-Table Name, MemberCount -AutoSize +``` + +```Output +Name MemberCount +---- ----------- + 7 +Engineering 2 +Executive Management 1 +Finance 1 +HR 1 +``` + +This example demonstrates how to retrieve user count in each department. + +### Example 10: List disabled users with active licenses + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$disabledUsersWithLicenses = Get-EntraUser -Filter "accountEnabled eq false" -All | Where-Object { + $_.AssignedLicenses -ne $null -and $_.AssignedLicenses.Count -gt 0 +} +$disabledUsersWithLicenses | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AccountEnabled +-- ----------- ----------------- -------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com False +``` + +This example demonstrates how to retrieve disabled users with active licenses. + +### Example 11: Retrieve guest users with active licenses + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All +$guestUsersWithLicenses = foreach ($guest in $guestUsers) { + if ($guest.AssignedLicenses.Count -gt 0) { + [pscustomobject]@{ + Id = $guest.Id + DisplayName = $guest.DisplayName + UserPrincipalName = $guest.UserPrincipalName + AssignedLicenses = ($guest.AssignedLicenses | ForEach-Object { $_.SkuId }) -join ", " + } + } +} +$guestUsersWithLicenses | Format-Table Id, DisplayName, UserPrincipalName, AssignedLicenses -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AssignedLicenses +-- ----------- ----------------- ---------------- +cccccccc-2222-3333-4444-dddddddddddd Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com c42b9cae-ea4f-4ab7-9717-81576235ccac +``` + +This example demonstrates how to retrieve guest users with active licenses. + +### Example 12: Retrieve users without managers + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$allUsers = Get-EntraUser -All +$usersWithoutManagers = foreach ($user in $allUsers) { + $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue + if (-not $manager) { + [pscustomobject]@{ + Id = $user.Id + DisplayName = $user.DisplayName + UserPrincipalName = $user.UserPrincipalName + } + } +} +$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName +-- ----------- ----------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com +bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com +``` + +This example demonstrates how to retrieve users without managers. + +### Example 13: List failed sign-ins for a user + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" +$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize +``` + +This example demonstrates how to retrieve failed sign-ins for a user. + +### Example 14: List all guest users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All +$guestUsers | Select-Object DisplayName, UserPrincipalName, Id, createdDateTime, creationType, accountEnabled, UserState | Format-Table -AutoSize +``` + +```Output +DisplayName UserPrincipalName Id CreatedDateTime CreationType AccountEnabled UserState +----------- ----------------- -- --------------- ------------ -------------- --------- +Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com bbbbbbbb-1111-2222-3333-cccccccccccc 9/13/2024 6:37:33 PM Invitation True Accepted +``` + +This example demonstrates how to retrieve list all guest users. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. +Details on querying with OData can be [found here](https://learn.microsoft.com/graph/aad-advanced-queries?tabs=powershell). + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a User Principal Name (UPN) or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraUser](New-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..5ad745b39b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md @@ -0,0 +1,184 @@ +--- +title: Get-EntraUserAppRoleAssignment +description: This article provides details on the Get-EntraUserAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraUserAppRoleAssignment + +## Synopsis + +Get a user application role assignment. + +## Syntax + +```powershell +Get-EntraUserAppRoleAssignment + -ObjectId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserAppRoleAssignment` cmdlet gets a user application role assignment. + +## Examples + +### Example 1: Get a user application role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +$UserId = (Get-EntraUser -Top 1).ObjectId +Get-EntraUserAppRoleAssignment -ObjectId $UserId +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 + 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 + 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 + +``` + +This example retrieves a user application role assignment for the user in $UserId. You can use the command `Get-EntraUser` to get Service principal Object ID. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +### Example 2: Get all application role assignments + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -All +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 + 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 + 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 +``` + +This example demonstrates how to retrieve all application role assignment for the specified user. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +### Example 3: Get top two application role assignments + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -Top 2 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 +``` + +This example demonstrates how to retrieve top two application role assignment for the specified user. + +- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) + +[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md new file mode 100644 index 0000000000..56eb9c60b5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraUserCreatedObject +description: This article provides details on the Get-EntraUserCreatedObject Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserCreatedObject + +schema: 2.0.0 +--- + +# Get-EntraUserCreatedObject + +## Synopsis + +Get objects created by the user. + +## Syntax + +```powershell +Get-EntraUserCreatedObject + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserCreatedObject` cmdlet gets objects created by a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get a user-created object + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example retrieves an object created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +### Example 2: Get all user-created objects + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example retrieves all objects created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +### Example 3: Get a top one user-created object + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves top one object created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md new file mode 100644 index 0000000000..0a4ea05e0b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraUserDirectReport +description: This article provides details on the Get-EntraUserDirectReport command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserDirectReport + +schema: 2.0.0 +--- + +# Get-EntraUserDirectReport + +## Synopsis + +Get the user's direct reports. + +## Syntax + +```powershell +Get-EntraUserDirectReport + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserDirectReport` cmdlet gets the direct reports for a user in Microsoft Entra ID. Specify `UserId` parameter gets the direct reports for a user. + +## Examples + +### Example 1: Get a user's direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve direct reports for a user in Microsoft Entra ID. + +- `-UserId` Parameter specifies the ID of a user (UserPrincipalName or UserId). + +### Example 2: Get all direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve all direct reports for a user in Microsoft Entra ID. + +- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). + +### Example 3: Get a top two direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve top five direct reports for a user in Microsoft Entra ID. + +- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user's UserPrincipalName or UserId in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md new file mode 100644 index 0000000000..96b66cd878 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md @@ -0,0 +1,111 @@ +--- +title: Get-EntraUserExtension +description: This article provides details on the Get-EntraUserExtension command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserExtension + +schema: 2.0.0 +--- + +# Get-EntraUserExtension + +## Synopsis + +Gets a user extension. + +## Syntax + +```powershell +Get-EntraUserExtension + -UserId + [-Property ] + [] +``` + +## Description + +The Get-EntraUserExtension cmdlet gets a user extension in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve extension attributes for a user + +```powershell +Connect-Entra -Scopes 'User.Read' +$UserId = (Get-EntraUser -ObjectId 'SawyerM@contoso.com').ObjectId +Get-EntraUserExtension -UserId $UserId +``` + +```Output +onPremisesDistinguishedName : +@odata.context : https://graph.microsoft.com/v1.0/$metadata#users(identities,onPremisesDistinguishedName,employeeId,createdDateTime)/$entity +createdDateTime : 18/07/2024 05:13:40 +employeeId : +identities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} +userIdentities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} +``` + +This example shows how to retrieve the extension attributes for a specified user. You can use the command `Get-EntraUser` to get user object Id. + +- `-UserId` parameter specifies the user object Id. + +## Parameters + +### -UserId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraUserExtension](Remove-EntraUserExtension.md) + +[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md new file mode 100644 index 0000000000..6dbad40666 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md @@ -0,0 +1,105 @@ +--- +title: Get-EntraUserLicenseDetail +description: This article provides details on the Get-EntraUserLicenseDetail command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail + +schema: 2.0.0 +--- + +# Get-EntraUserLicenseDetail + +## Synopsis + +Retrieves license details for a user. + +## Syntax + +```powershell +Get-EntraUserLicenseDetail + -UserId + [-Property ] + [] +``` + +## Description + +This cmdlet retrieves license details for a user. + +## Examples + +### Example 1: Retrieve user license details + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserLicenseDetail -UserId 'SawyerM@contoso.com' +``` + +```Output +Id SkuId SkuPartNumber +-- ----- ------------- +X8Wu1RItQkSNL8zKldQ5DiH6ThjDmF1OlavQcFOpbmc aaaaaaaa-0b0b-1c1c-2d2d-333333333333 INFORMATION_PROTECTION_COMPLIANCE +X8Wu1RItQkSNL8zKldQ5Dk8SXrDMx6BFpqqM94yUaWg bbbbbbbb-1c1c-2d2d-3e3e-444444444444 EMSPREMIUM +X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERPRISEPREMIUM +``` + +This example demonstrates how to retrieve license details for a user from Microsoft Entra ID. + +## Parameters + +### -UserId + +The object ID of the user for which the license details are retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md new file mode 100644 index 0000000000..a72d6f6ddb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraUserManager +description: This article provides details on the Get-EntraUserManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserManager + +schema: 2.0.0 +--- + +# Get-EntraUserManager + +## Synopsis + +Gets the manager of a user. + +## Syntax + +```powershell +Get-EntraUserManager + -UserId + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserManager` cmdlet gets the manager of a user in Microsoft Entra ID. Specify +`UserId` parameter to get the specific manager of user. + +## Examples + +### Example 1: Get the manager of a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserManager -UserId 'SawyerM@contoso.com' +``` + +```Output +DeletedDateTime : +Id : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee +@odata.context : https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity +@odata.type : #microsoft.graph.user +accountEnabled : True +businessPhones : {+1 858 555 0109} +city : San Diego +createdDateTime : 2023-07-07T14:18:05Z +country : United States +department : Sales & Marketing +displayName : Sawyer Miller +``` + +This example demonstrates how to retrieve the manager of a specific user. + +- `-UserId` Parameter specifies UserId or User Principal Name of User. + +### Example 2: Retrieve users without managers + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$allUsers = Get-EntraUser -All +$usersWithoutManagers = foreach ($user in $allUsers) { + $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue + if (-not $manager) { + [pscustomobject]@{ + Id = $user.Id + DisplayName = $user.DisplayName + UserPrincipalName = $user.UserPrincipalName + } + } +} +$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName +-- ----------- ----------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com +bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com +``` + +This example demonstrates how to retrieve users without managers. + +## Parameters + +### -UserId + +The unique identifier of a user in Microsoft Entra ID (User Principal Name or UserId). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraUserManager](Remove-EntraUserManager.md) + +[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md new file mode 100644 index 0000000000..0f685737af --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md @@ -0,0 +1,218 @@ +--- +title: Get-EntraUserMembership +description: This article provides details on the Get-EntraUserMembership command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserMembership + +schema: 2.0.0 +--- + +# Get-EntraUserMembership + +## Synopsis + +Get user memberships. + +## Syntax + +```powershell +Get-EntraUserMembership + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserMembership` cmdlet gets user memberships in Microsoft Entra ID. + +## Examples + +### Example 1: Get user memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +33dd33dd-ee44-ff55-aa66-77bb77bb77bb +44ee44ee-ff55-aa66-bb77-88cc88cc88cc +55ff55ff-aa66-bb77-cc88-99dd99dd99dd +``` + +This example demonstrates how to retrieve user memberships in Microsoft Entra ID. + +### Example 2: Get user memberships with additional details + +```powershell +Connect-Entra -Scopes 'User.Read' +$userMemberships = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' +$membershipDetails = $userMemberships | ForEach-Object { + $membershipDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + odataType = $membershipDetail.'@odata.type' + displayName = $membershipDetail.displayName + Id = $membershipDetail.Id + } +} +$membershipDetails | Select-Object odataType, displayName, Id +``` + +```Output +odataType displayName Id +--------- ----------- -- +#microsoft.graph.group Contoso Group 33dd33dd-ee44-ff55-aa66-77bb77bb77bb +#microsoft.graph.group Helpdesk Group 55ff55ff-aa66-bb77-cc88-99dd99dd99dd +#microsoft.graph.directoryRole Attribute Assignment Reader 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +#microsoft.graph.directoryRole Attribute Definition Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This example demonstrates how to retrieve user memberships in Microsoft Entra ID with more lookup details. + +### Example 3: Get All memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +33dd33dd-ee44-ff55-aa66-77bb77bb77bb +44ee44ee-ff55-aa66-bb77-88cc88cc88cc +55ff55ff-aa66-bb77-cc88-99dd99dd99dd +``` + +This example demonstrates how to retrieve users all memberships in Microsoft Entra ID. + +### Example 4: Get top three memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This example demonstrates how to retrieve users top three memberships in Microsoft Entra ID. + +### Example 5: List groups that Sawyer Miller is a member of + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$groups = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' +$groups | Select-Object DisplayName, Id, GroupTypes, Visibility | Format-Table -AutoSize +``` + +```Output +DisplayName Id GroupTypes Visibility +----------- -- ---------- ---------- +Contoso Group bbbbbbbb-1111-2222-3333-cccccccccccc {Unified} Public +``` + +This example demonstrates how to retrieve the groups that a user is a member of. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md new file mode 100644 index 0000000000..b69676b2e5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md @@ -0,0 +1,201 @@ +--- +title: Get-EntraUserOAuth2PermissionGrant +description: This article provides details on the Get-EntraUserOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraUserOAuth2PermissionGrant + +## Synopsis + +Gets an oAuth2PermissionGrant object. + +## Syntax + +```powershell +Get-EntraUserOAuth2PermissionGrant + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for the specified user in Microsoft Entra ID. Specify `UserId` parameter to retrieve an oAuth2PermissionGrant object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation. + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator +- Directory Readers +- Global Reader +- Guest Inviter + +## Examples + +### Example 1: Retrieve the OAuth2 permission grants for a user + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using the ObjectId parameter. Use the `Get-EntraUser` cmdlet to obtain the `UserId` value. + +### Example 2: Retrieve the OAuth2 permission grants for a user using object ID parameter + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using object ID parameter. + +- `-UserId` parameter specifies the user ID. + +### Example 3: Retrieve the OAuth2 permission grants for a user using All parameter + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using All parameter. + +- `-ObjectId` parameter specifies the user ID. + +### Example 4: Retrieve top one OAuth2 permission grant + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraUserOAuth2PermissionGrant -ObjectId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +``` + +This Example Retrieve top one the OAuth2 permission grant in Microsoft Entra ID. + +- `-UserId` parameter specifies the user ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a User Principal Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md new file mode 100644 index 0000000000..b6f4ade3c7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md @@ -0,0 +1,166 @@ +--- +title: Get-EntraUserOwnedDevice +description: This article provides details on the Get-EntraUserOwnedDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice + +schema: 2.0.0 +--- + +# Get-EntraUserOwnedDevice + +## Synopsis + +Get registered devices owned by a user. + +## Syntax + +```powershell +Get-EntraUserOwnedDevice + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOwnedDevice` cmdlet gets registered devices owned by the specified user in Microsoft Entra ID. + +## Examples + +### Example 1: Get devices owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 +``` + +This command gets the registered devices owned by the specified user. + +### Example 2: Get all devices owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -All +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 +``` + +This command gets all the registered devices owned by the specified user. + +### Example 3: Get top one device owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +``` + +This command gets top one registered device owned by the specified user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md new file mode 100644 index 0000000000..cc4f9de59d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md @@ -0,0 +1,208 @@ +--- +title: Get-EntraUserOwnedObject +description: This article provides details on the Get-EntraUserOwnedObject command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedObject + +schema: 2.0.0 +--- + +# Get-EntraUserOwnedObject + +## Synopsis + +Get objects owned by a user. + +## Syntax + +```powershell +Get-EntraUserOwnedObject + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserOwnedObject` cmdlet gets objects owned by a user in Microsoft Entra ID. Specify `UserId` parameter to get objects owned by user. + +## Examples + +### Example 1: Get objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example retrieves objects owned by the specified user. + +- `-UserId` Parameter specifies the ID of a user as a UserPrincipalName or UserId. + +### Example 2: Get objects owned by a user with additional details + +```powershell +Connect-Entra -Scopes 'User.Read' +$ownedObjects = Get-EntraUserOwnedObject -ObjectId 'SawyerM@contoso.com' + +$objectDetails = $ownedObjects | ForEach-Object { + $objectDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + odataType = $objectDetail.'@odata.type' + displayName = $objectDetail.displayName + Id = $objectDetail.Id + } +} +$objectDetails | Format-Table -Property odataType, displayName, Id -AutoSize +``` + +```Output +odataType displayName Id +--------- ----------- -- +#microsoft.graph.group Contoso FTE Group bbbbbbbb-1111-2222-3333-cccccccccccc +#microsoft.graph.group Digital Engineering Group aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example retrieves objects owned by the specified user with more lookup details. + +### Example 3: Get all objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example retrieves all the objects owned by the specified user. + +- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. + +### Example 4: Get top three objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves the top three objects owned by the specified user. + +- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md new file mode 100644 index 0000000000..c58d964a67 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md @@ -0,0 +1,165 @@ +--- +title: Get-EntraUserRegisteredDevice +description: This article provides details on the Get-EntraUserRegisteredDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice + +schema: 2.0.0 +--- + +# Get-EntraUserRegisteredDevice + +## Synopsis + +Get devices registered by a user. + +## Syntax + +```powershell +Get-EntraUserRegisteredDevice + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraUserRegisteredDevice` cmdlet gets devices registered by a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get registered devices + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This command gets the devices that are registered to the specified user. + +### Example 2: Get all registered devices + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This command gets all the devices that are registered to the specified user. + +### Example 3: Get one registered device + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +``` + +This command gets the top one device that are registered to the specified user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md new file mode 100644 index 0000000000..3514e4f4ac --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md @@ -0,0 +1,109 @@ +--- +title: Get-EntraUserThumbnailPhoto +description: This article provides details on the Get-EntraUserThumbnailPhoto command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto + +schema: 2.0.0 +--- + +# Get-EntraUserThumbnailPhoto + +## Synopsis + +Retrieve the thumbnail photo of a user. + +## Syntax + +```powershell +Get-EntraUserThumbnailPhoto + -UserId + [-Property ] + [] +``` + +## Description + +Retrieve the thumbnail photo of a user. + +## Examples + +### Example 1: Retrieve thumbnail photo by Id + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraUserThumbnailPhoto -UserId 'SawyerM@contoso.com' +``` + +```Output +Id Height Width +-- ------ ----- +default 292 278 +``` + +This example shows how to retrieve the thumbnail photo of a user that is specified through the value of the UserId parameter. + +- `-UserId` parameter specifies the user for which the thumbnail photo is retrieved. + +## Parameters + +### -UserId + +The object ID of the user for which the thumbnail photo is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Boolean + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraUserThumbnailPhoto](Set-EntraUserThumbnailPhoto.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUser.md b/moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUser.md new file mode 100644 index 0000000000..62a06bd347 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUser.md @@ -0,0 +1,816 @@ +--- +title: New-EntraUser +description: This article provides details on the New-EntraUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUser + +schema: 2.0.0 +--- + +# New-EntraUser + +## Synopsis + +Creates a Microsoft Entra ID user. + +## Syntax + +```powershell +New-EntraUser + -DisplayName + -AccountEnabled + -PasswordProfile + [-City ] + [-UserStateChangedOn ] + [-CompanyName ] + [-PreferredLanguage ] + [-FacsimileTelephoneNumber ] + [-GivenName ] + [-Mobile ] + [-UsageLocation ] + [-PostalCode ] + [-AgeGroup ] + [-CreationType ] + [-ExtensionProperty ] + [-ConsentProvidedForMinor ] + [-MailNickName ] + [-ImmutableId ] + [-Country ] + [-SignInNames ] + [-Department ] + [-PasswordPolicies ] + [-JobTitle ] + [-IsCompromised ] + [-UserState ] + [-UserType ] + [-OtherMails ] + [-PhysicalDeliveryOfficeName ] + [-UserPrincipalName ] + [-State ] + [-StreetAddress ] + [-TelephoneNumber ] + [-Surname ] + [-ShowInAddressList ] + [] +``` + +## Description + +The `New-EntraUser` cmdlet creates a user in Microsoft Entra ID. Specify the `DisplayName`,`AccountEnabled`, and `PasswordProfile` parameter to create a user. + +## Examples + +### Example 1: Create a user using MailNickName parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$userParams = @{ + DisplayName = 'Avery Iona' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'AveryI@contoso.com' + AccountEnabled = $true + MailNickName = 'averyi' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Avery Iona AveryI@contoso.com Member +``` + +This command creates a new user. + +### Example 2: Create a user using AgeGroup parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$userParams = @{ + DisplayName = 'Peyton Davis' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'PeytonD@contoso.com' + AccountEnabled = $true + MailNickName = 'PeytonD' + AgeGroup = 'adult' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +bbbbbbbb-1111-2222-3333-cccccccccccc Peyton Davis PeytonD@contoso.com Member +``` + +This command creates a new user. + +### Example 3: Create a user using City parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$userParams = @{ + DisplayName = 'Blake Martin' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'BlakeM@contoso.com' + AccountEnabled = $true + MailNickName = 'BlakeM' + City = 'New York' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +cccccccc-2222-3333-4444-dddddddddddd Blake Martin BlakeM@contoso.com Member +``` + +This command creates a new user. + +### Example 4: Create a user using Department parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$userParams = @{ + DisplayName = 'Parker Jones' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'ParkerJ@contoso.com' + AccountEnabled = $true + MailNickName = 'ParkerJ' + Department = 'IT' +} + +New-EntraUser @userParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +dddddddd-3333-4444-5555-eeeeeeeeeeee Parker Jones ParkerJ@contoso.com Member +``` + +This command creates a new user. + +### Example 5: Create a user using Mobile parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' + +$UserParams = @{ + DisplayName = 'Sawyer Miller' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'SawyerM@contoso.com' + AccountEnabled = $true + MailNickName = 'SawyerM' + Mobile = '+18989898989' +} + +New-EntraUser @UserParams +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com Member +``` + +This command creates a new user. + +## Parameters + +### -AccountEnabled + +Indicates whether the user's account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -City + +Specifies the user's city. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country + +Specifies the user's country. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreationType + +Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. +Possible values are "LocalAccount" and null. + +- When user creating a local account, the property is required and you must set it to "LocalAccount". +- When user creating a work or school account, don't specify the property or set it to null. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Department + +Specifies the user's department. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the user's display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProperty + +Add data to custom user properties as the basic **open extensions** or the more versatile **schema extensions**. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GivenName + +Specifies the user's given name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmutableId + +This property is used to associate an on-premises user account to their Microsoft Entra ID user object. +This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. + +Important: The $ and _ characters can't be used when specifying this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompromised + +Indicates whether this user is compromised. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JobTitle + +Specifies the user's job title. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickName + +Specifies the user's mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Mobile + +Specifies the user's mobile phone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OtherMails + +A list of other email addresses for the user; for example: "", "". + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordPolicies + +Specifies password policies for the user. +This value is an enumeration with one possible value being "DisableStrongPassword", which allows weaker passwords than the default policy to be specified. +"DisablePasswordExpiration" can also be specified. +The two might be specified together; for example: "DisablePasswordExpiration, DisableStrongPassword". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordProfile + +Specifies the user's password profile. + +The parameter type for this parameter is "PasswordProfile". + +In order to pass a parameter of this type, you first need to create a variable in PowerShell with that type: + +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + +Then you can proceed to set the value of the password in this variable: + +$PasswordProfile.Password = "\" + +And finally you can pass this variable to the cmdlet: + +New-EntraUser -PasswordProfile $PasswordProfile ... + +Other attributes that can be set in the PasswordProfile are + +- $PasswordProfile.EnforceChangePasswordPolicy - a boolean indicating that the change password policy is enababled or disabled for this user $PasswordProfile. + +- ForceChangePasswordNextLogin - a boolean indicating that the user must change the password at the next sign in. + +```yaml +Type: PasswordProfile +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PhysicalDeliveryOfficeName + +Specifies the user's physical delivery office name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostalCode + +Specifies the user's postal code. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredLanguage + +Specifies the user's preferred language. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShowInAddressList + +If True, show this user in the address list. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInNames + +Specifies the collection of sign-in names for a local account in a Microsoft Entra ID B2C tenant. + +Each sign-in name must be unique across the company/tenant. + +The property must be specified when you create a local account user; don't specify it when you create a work or school account. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the user's state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreetAddress + +Specifies the user's street address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Surname + +Specifies the user's surname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TelephoneNumber + +Specifies a telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsageLocation + +A two letter country code (ISO standard 3166). + +Required for users that are assigned licenses due to legal requirement to check for availability of services in countries. + +Examples include: "US", "JP", and "GB". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPrincipalName + +The user principal name (UPN) of the user. + +The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. + +By convention, this UPN should map to the user's email name. + +The general format is "alias@domain". + +For work or school accounts, the domain must be present in the tenant's collection of verified domains. + +This property is required when a work or school account is created; it's optional for local accounts. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserType + +A string value that can be used to classify user types in your directory, such as "Member" and "Guest". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FacsimileTelephoneNumber + +Specifies the user's telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AgeGroup + +Specifies the user's age group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompanyName + +Specifies the user's company name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentProvidedForMinor + +Sets whether consent was obtained for minors. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserState + +For an external user invited to the tenant using the invitation API, this property represents the invited user's +invitation status. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserStateChangedOn + +Shows the timestamp for the latest change to the userState property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..3ede3eecff --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md @@ -0,0 +1,209 @@ +--- +title: New-EntraUserAppRoleAssignment +description: This article provides details on the New-EntraUserAppRoleAssignment command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraUserAppRoleAssignment + +## Synopsis + +Assigns a user to an application role. + +## Syntax + +```powershell +New-EntraUserAppRoleAssignment + -ObjectId + -PrincipalId + -Id + -ResourceId + [] +``` + +## Description + +The `New-EntraUserAppRoleAssignment` cmdlet assigns a user to an application role in Microsoft Entra ID. + +To grant an app role assignment to a user, you need three identifiers: + +- PrincipalId: The Id of the user to whom you are assigning the app role. + +- ResourceId: The Id of the resource servicePrincipal that has defined the app role. + +- Id: The Id of the appRole (defined on the resource service principal) to assign to the user. + +## Examples + +### Example 1: Assign a user to an application without roles + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$appId = (Get-EntraApplication -SearchString '').AppId +$user = Get-EntraUser -SearchString '' +$servicePrincipal = Get-EntraServicePrincipal -Filter "appId eq '$appId'" + +$params = @{ + ObjectId = $user.ObjectId + PrincipalId = $user.ObjectId + ResourceId = $servicePrincipal.ObjectId + Id = [Guid]::Empty +} + +New-EntraUserAppRoleAssignment @params +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - + A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 18-06-2024 11:22:40 UserPrincipalName aaaaaaaa-bbbb-cccc-1111-222222222222 User App-DisplayName +``` + +This command assigns a user to an application that doesn't have any roles. +You can use the command `Get-EntraUser` to get user object Id. +You can use the command `Get-EntraApplication` to get application Id. +You can use the command `Get-EntraServicePrincipal` to get service principal object Id. + +- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. +- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. + +### Example 2: Assign a user to a specific role within an application + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$userName = 'SawyerM@contoso.com' +$appName = 'Box' +$spo = Get-EntraServicePrincipal -Filter "DisplayName eq '$appName'" +$user = Get-EntraUser -Filter "userPrincipalName eq '$userName'" + +$params = @{ + ObjectId = $user.ObjectId + PrincipalId = $user.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.AppRoles[1].Id +} + +New-EntraUserAppRoleAssignment @params +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 06/18/2024 09:47:00 Sawyer Miller 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 User Box +``` + +This example demonstrates how to assign a user to an application role in Microsoft Entra ID. +You can use the command `Get-EntraUser` to get user object Id. +You can use the command `Get-EntraServicePrincipal` to get service principal object Id. + +- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. +- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. +- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. + +## Parameters + +### -Id + +The ID of the app role to assign. + +If application doesn't have any roles while creating new app role assignment then provide an empty guid, or the Id of the role to assign to the user. + +You can retrieve the application's roles by examining the application object's AppRoles property: + +`Get-EntraApplication -SearchString 'Your-Application-DisplayName' | select Approles | Format-List` + +This cmdlet returns the list of roles that are defined in an application: + +AppRoles: {GUID1, GUID2} + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of the user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID to which the new app role is to be assigned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +The object ID of the principal to which the new app role is assigned. + +When assigning a new role to a user, provide the object ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The object ID of the Service Principal for the application to which the user role is assigned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) + +[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md new file mode 100644 index 0000000000..77c8786f2f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraUser +description: This article provides details on the Remove-EntraUser command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUser + +schema: 2.0.0 +--- + +# Remove-EntraUser + +## Synopsis + +Removes a user. + +## Syntax + +```powershell +Remove-EntraUser + -UserId + [] +``` + +## Description + +The `Remove-EntraUser` cmdlet removes a user in Microsoft Entra ID. Specify the `UserId` parameter to remove the specified user in Microsoft Entra ID. + +The calling user must be assigned at least one of the following Microsoft Entra roles: + +- User Administrator + +- Privileged Authentication Administrator + +## Examples + +### Example 1: Remove a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +Remove-EntraUser -UserId 'SawyerM@Contoso.com' +``` + +This command removes the specified user in Microsoft Entra ID. + +## Parameters + +### -UserId + +Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUser](New-EntraUser.md) + +[Set-EntraUser](Set-EntraUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md new file mode 100644 index 0000000000..4a7f77cbf2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraUserAppRoleAssignment +description: This article provides details on the Remove-EntraUserAppRoleAssignment command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraUserAppRoleAssignment + +## Synopsis + +Removes a user application role assignment. + +## Syntax + +```powershell +Remove-EntraUserAppRoleAssignment + -AppRoleAssignmentId + -ObjectId + [] +``` + +## Description + +The `Remove-EntraUserAppRoleAssignment` cmdlet removes a user application role assignment in Microsoft Entra ID. + +## Examples + +### Example 1: Remove user app role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$RemoveAppRoleParams = @{ + ObjectId = 'SawyerM@Contoso.com' + AppRoleAssignmentId = 'C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w' +} +Remove-EntraUserAppRoleAssignment @RemoveAppRoleParams +``` + +This example demonstrates how to Remove the user app role assignment in Microsoft Entra ID. + +- `-ObjectId` parameter specifies the user ID. +- `-AppRoleAssignmentId` parameter specifies the application role assignment ID. + +Use the `Get-EntraUserAppRoleAssignment` cmdlet to get `AppRoleAssignmentId` details. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the ID of an application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID (as a UserPrincipleName or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) + +[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md new file mode 100644 index 0000000000..7e0aae2e20 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md @@ -0,0 +1,130 @@ +--- +title: Remove-EntraUserExtension +description: This article provides details on the Remove-EntraUserExtension command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserExtension + +schema: 2.0.0 +--- + +# Remove-EntraUserExtension + +## Synopsis + +Removes a user extension. + +## Syntax + +### SetMultiple + +```powershell +Remove-EntraUserExtension + -ObjectId + -ExtensionNames + [] +``` + +### SetSingle + +```powershell +Remove-EntraUserExtension + -ObjectId + -ExtensionName + [] +``` + +## Description + +The `Remove-EntraUserExtension` cmdlet removes a user extension from Microsoft Entra ID. Specify `ObjectId` and `ExtensionNames` parameters to remove a user extension. + +## Examples + +### Example 1: Remove the user extension + +```powershell +$Params = @{ + ObjectId = 'SawyerM@Contoso.com' + ExtensionName = 'Test Extension' +} +Remove-EntraUserExtension @Params +``` + +This example demonstrates how to remove a user extension from Microsoft Entra ID. + +- `ObjectId` parameter specifies the user Object ID. +- `ExtensionName` parameter specifies the user ExtentionName. + +## Parameters + +### -ExtensionName + +Specifies the name of an extension. + +```yaml +Type: System.String +Parameter Sets: SetSingle +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExtensionNames + +Specifies an array of extension names. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: SetMultiple +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUserExtension](Get-EntraUserExtension.md) + +[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md new file mode 100644 index 0000000000..9d2fac8aa1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md @@ -0,0 +1,82 @@ +--- +title: Remove-EntraUserManager +description: This article provides details on the Remove-EntraUserManager command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserManager + +schema: 2.0.0 +--- + +# Remove-EntraUserManager + +## Synopsis + +Removes a user's manager. + +## Syntax + +```powershell +Remove-EntraUserManager + -UserId +``` + +## Description + +The `Remove-EntraUserManager` cmdlet removes a user's manager in Microsoft Entra ID. Specify the `UserId` parameter to remove the manager for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Remove the manager of a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$User = Get-EntraUser -UserId 'SawyerM@Contoso.com' +Remove-EntraUserManager -UserId $User.ObjectId +``` + +This example shows how to remove a user's manager. + +You can use `Get-EntraUser` command to get the user's details. + +## Parameters + +### -UserId + +Specifies the ID of a user (as a User Principle Name or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUserManager](Get-EntraUserManager.md) + +[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUser.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUser.md new file mode 100644 index 0000000000..16500c0669 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUser.md @@ -0,0 +1,677 @@ +--- +title: Set-EntraUser +description: This article provides details on the Set-EntraUser command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUser + +schema: 2.0.0 +--- + +# Set-EntraUser + +## Synopsis + +Updates a user. + +## Syntax + +```powershell +Set-EntraUser + -UserId + [-PostalCode ] + [-CompanyName ] + [-GivenName ] + [-Mobile ] + [-PreferredLanguage ] + [-CreationType ] + [-UsageLocation ] + [-UserType ] + [-AgeGroup ] + [-MailNickName ] + [-ExtensionProperty ] + [-ConsentProvidedForMinor ] + [-ImmutableId ] + [-Country ] + [-SignInNames ] + [-Department ] + [-StreetAddress ] + [-PasswordPolicies ] + [-JobTitle ] + [-City ] + [-OtherMails ] + [-UserPrincipalName ] + [-DisplayName ] + [-AccountEnabled ] + [-PasswordProfile ] + [-State ] + [-TelephoneNumber ] + [-Surname ] + [-ShowInAddressList ] + [] +``` + +## Description + +The `Set-EntraUser` cmdlet updates a user in Microsoft Entra ID. Specify the `UserId` parameter to update a user in Microsoft Entra ID. + +## Examples + +### Example 1: Update a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$user = Get-EntraUser -UserId 'SawyerM@contoso.com' +$params = @{ + UserId = $user.Id + DisplayName = 'Updated user Name' +} +Set-EntraUser @params +``` + +This example updates the specified user's Display name parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. + +### Example 2: Set the specified user's AccountEnabled parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + AccountEnabled = $true +} +Set-EntraUser @params +``` + +This example updates the specified user's AccountEnabled parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-AccountEnabled` Specifies whether the account is enabled. + +### Example 3: Set all but specified users as minors with parental consent + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +Get-EntraUser -All | Where-Object -FilterScript { $_.DisplayName -notmatch '(George|James|Education)' } | +ForEach-Object { Set-EntraUser -UserId $($_.ObjectId) -AgeGroup 'minor' -ConsentProvidedForMinor 'granted' } +``` + +This example updates the specified user's as minors with parental consent. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-ConsentProvidedForMinor` Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. + +### Example 4: Set the specified user's property + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + City = 'Add city name' + CompanyName = 'Microsoft' + Country = 'Add country name' + Department = 'Add department name' + GivenName = 'Mircosoft' + ImmutableId = '#1' + JobTitle = 'Manager' + MailNickName = 'Add mailnickname' + Mobile = '9984534564' + OtherMails = 'test12@M365x99297270.OnMicrosoft.com' + PasswordPolicies = 'DisableStrongPassword' + State = 'UP' + StreetAddress = 'Add address' + UserType = 'Member' +} +Set-EntraUser @params +``` + +This example updates the specified user's property. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-UserType` classify user types in your directory, such as "Member" and "Guest." +- `-PasswordPolicies` Specifies password policies for the user. +- `-OtherMails` Specifies other email addresses for the user + +### Example 5: Set the specified user's PasswordProfile parameter + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$params= @{ +UserId = 'SawyerM@contoso.com' +PasswordProfile = @{ + Password= '*****' + ForceChangePasswordNextLogin = $true + EnforceChangePasswordPolicy = $false + } +} +Set-EntraUser @params +``` + +This example updates the specified user's PasswordProfile parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-PasswordProfile` specifies the user's password profile. + +### Example 6: Set user's usage location for license assignment + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +Set-EntraUser -UserId 'SawyerM@contoso.com' -UsageLocation 'US' +``` + +This example updates the specified user's Usage Location for license management. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-UsageLocation` specifies the user's usage location. Two-letter ISO 3166 country code. Required for licensed users to check service availability. Examples: US, JP, GB. Not nullable. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -City + +Specifies the user's city. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country + +Specifies the user's country. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreationType + +Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. +Possible values are "LocalAccount" and null. +When creating a local account, the property is required and you must set it to "LocalAccount". +When creating a work or school account, don't specify the property or set it to null. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Department + +Specifies the user's department. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the user's display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProperty + +Add data to custom user properties as the basic open extensions or the more versatile schema extensions. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GivenName + +Specifies the user's given name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmutableId + +This property links an on-premises Active Directory user account to its Microsoft Entra ID user object. You must specify this property when creating a new user account in Graph if the user's userPrincipalName uses a federated domain. + +Important: Do not use the $ and _ characters when specifying this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JobTitle + +Specifies the user's job title. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickName + +Specifies a nickname for the user's mail address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Mobile + +Specifies the user's mobile phone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId +Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OtherMails + +Specifies other email addresses for the user. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordPolicies + +Specifies password policies for the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordProfile + +Specifies the user's password profile. + +```yaml +Type: PasswordProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostalCode + +Specifies the user's postal code. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredLanguage + +Specifies the user's preferred language. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShowInAddressList + +Set to True to show this user in the address list. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInNames + +The list of sign in names for this user + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the user's state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreetAddress + +Specifies the user's street address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Surname + +Specifies the user's surname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TelephoneNumber + +Specifies the user's telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsageLocation + +A two letter country or region code (ISO standard 3166). Required for users that assigned licenses due to legal requirement to check for availability of services in country and regions. Examples include: "US," "JP," and "GB." Not nullable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPrincipalName + +Specifies the user's user principal name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserType + +A string value that can be used to classify user types in your directory, such as "Member" and "Guest." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AgeGroup + +Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, minor, notAdult, and adult. See, [legal-age-group](https://learn.microsoft.com/graph/api/resources/user#legal-age-group-property-definitions). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompanyName + +The company name, which the user is associated. This property can be useful for describing the company that an external user comes from. The maximum length of the company name is 64 characters. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentProvidedForMinor + +Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUser](Get-EntraUser.md) + +[New-EntraUser](New-EntraUser.md) + +[Remove-EntraUser](Remove-EntraUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md new file mode 100644 index 0000000000..82ec532e91 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md @@ -0,0 +1,91 @@ +--- +title: Set-EntraUserExtension +description: This article provides details on the Set-EntraUserExtension command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserExtension + +schema: 2.0.0 +--- + +# Set-EntraUserExtension + +## Synopsis + +Sets a user extension. + +## Syntax + +```powershell +Set-EntraUserExtension + -UserId + [] +``` + +## Description + +The `Set-EntraUserExtension` cmdlet updates a user extension in Microsoft Entra ID. + +## Examples + +### Example 1: Set the value of an extension attribute for a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + ExtensionName = 'extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8' + ExtensionValue = 'New Value' +} +Set-EntraUserExtension @params +``` + +This example shows how to update the value of the extension attribute for a specified user. + +- `-UserId` parameter specifies the user Id. +- `-ExtensionName` parameter specifies the name of an extension. +- `-ExtensionValue` parameter specifies the extension name values. + +## Parameters + +### -UserId + +Specifies the ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) + +[Get-EntraUserExtension](Get-EntraUserExtension.md) + +[Remove-EntraUserExtension](Remove-EntraUserExtension.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md new file mode 100644 index 0000000000..ff516e1557 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md @@ -0,0 +1,209 @@ +--- +title: Set-EntraUserLicense +description: This article provides details on the Set-EntraUserLicense command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserLicense + +schema: 2.0.0 +--- + +# Set-EntraUserLicense + +## Synopsis + +Adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. + +## Syntax + +```powershell +Set-EntraUserLicense + -UserId + -AssignedLicenses + [] +``` + +## Description + +The `Set-EntraUserLicense` adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Writers +- License Administrator +- User Administrator + +**Note**: Before assigning a license, assign a usage location to the user using: +`Set-EntraUser -ObjectId user@contoso.com -UsageLocation ''`. + +## Examples + +### Example 1: Add a license to a user based on a template user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$LicensedUser = Get-EntraUser -ObjectId 'TemplateUser@contoso.com' +$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License.SkuId = $LicensedUser.AssignedLicenses.SkuId +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.AddLicenses = $License +$Params = @{ + UserId = 'SawyerM@contoso.com' + AssignedLicenses = $Licenses +} +Set-EntraUserLicense @Params +``` + +```Output +Name Value +---- ----- +externalUserStateChangeDateTi… +businessPhones {8976546787} +postalCode 444601 +createdDateTime 06-11-2023 04:48:19 +surname KTETSs +jobTitle Manager +employeeType +otherMails {SawyerM@contoso.com} +isResourceAccount +usageLocation DE +legalAgeGroupClassification Adult +id cccccccc-2222-3333-4444-dddddddddddd +isLicenseReconciliationNeeded False +``` + +This example demonstrates how to assign a license to a user based on a template user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +### Example 2: Add a license to a user by copying license from another user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$LicensedUser = Get-EntraUser -ObjectId 'AdeleV@contoso.com' +$User = Get-EntraUser -ObjectId 'SawyerM@contoso.com' +$License1 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License1.SkuId = $LicensedUser.AssignedLicenses.SkuId[0] +$License2 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License2.SkuId = $LicensedUser.AssignedLicenses.SkuId[1] +$addLicensesArray = @() +$addLicensesArray += $License1 +$addLicensesArray += $License2 +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.AddLicenses = $addLicensesArray +Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses +``` + +```Output +Name Value +---- ----- +externalUserStateChangeDateTi… +businessPhones {8976546787} +postalCode 444601 +createdDateTime 06-11-2023 04:48:19 +surname KTETSs +jobTitle Manager +employeeType +otherMails {SawyerM@contoso.com} +isResourceAccount +usageLocation DE +legalAgeGroupClassification Adult +id cccccccc-2222-3333-4444-dddddddddddd +isLicenseReconciliationNeeded False +``` + +This example demonstrates how to assign a license to a user by copying license from another user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +### Example 3: Remove an assigned User's License + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$UserPrincipalName = 'SawyerM@contoso.com' +$User = Get-EntraUser -ObjectId $UserPrincipalName +$SkuId = (Get-EntraUserLicenseDetail -ObjectId $UserPrincipalName).SkuId +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.RemoveLicenses = $SkuId +Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses +``` + +```Output +Name Value +---- ----- +displayName SawyerM +id cccccccc-2222-3333-4444-dddddddddddd +jobTitle +surname M +mail +userPrincipalName SawyerM@contoso.com +mobilePhone +preferredLanguage +@odata.context https://graph.microsoft.com/v1.0/$metadata#users/$entity +businessPhones {} +officeLocation +givenName Sawyer +``` + +This example demonstrates how to remove a user's license by retrieving the user details. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +## Parameters + +### -AssignedLicenses + +Specifies a list of licenses to assign or remove. + +```yaml +Type: AssignedLicenses +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraUser](Get-EntraUser.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md new file mode 100644 index 0000000000..f73f6beb1c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md @@ -0,0 +1,101 @@ +--- +title: Set-EntraUserManager +description: This article provides details on the Set-EntraUserManager command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserManager + +schema: 2.0.0 +--- + +# Set-EntraUserManager + +## Synopsis + +Updates a user's manager. + +## Syntax + +```powershell +Set-EntraUserManager + -UserId + -RefObjectId + [] +``` + +## Description + +The `Set-EntraUserManager` cmdlet update the manager for a user in Microsoft Entra ID. Specify the `UserId` and `RefObjectId` parameters to update the manager for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Update a user's manager + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$manager = Get-EntraUser -UserId 'Manager@contoso.com' +$params = @{ + UserId = 'SawyerM@contoso.com' + RefObjectId = $manager.ObjectId +} +Set-EntraUserManager @params +``` + +This example demonstrates how to update the manager for the specified user. + +## Parameters + +### -UserId + +Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraUserManager](Get-EntraUserManager.md) + +[Remove-EntraUserManager](Remove-EntraUserManager.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md new file mode 100644 index 0000000000..8c2db963bf --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md @@ -0,0 +1,164 @@ +--- +title: Set-EntraUserPassword +description: This article provides details on the Set-EntraUserPassword command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserPassword + +schema: 2.0.0 +--- + +# Set-EntraUserPassword + +## Synopsis + +Sets the password of a user. + +## Syntax + +```powershell +Set-EntraUserPassword + [-ForceChangePasswordNextLogin ] + [-EnforceChangePasswordPolicy ] + -UserId + -Password + [] +``` + +## Description + +The `Set-EntraUserPassword` cmdlet sets the password for a user in Microsoft Entra ID. + +Any user can update their password without belonging to any administrator role. + +## Examples + +### Example 1: Set a user's password + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword = '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword +``` + +This command sets the specified user's password. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. + +### Example 2: Set a user's password with EnforceChangePasswordPolicy parameter + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword= '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -EnforceChangePasswordPolicy $True +``` + +This command sets the specified user's password with EnforceChangePasswordPolicy parameter. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. +- `-EnforceChangePasswordPolicy` parameter force the user to change their password, if set to true. + +### Example 3: Set a user's password with ForceChangePasswordNextLogin parameter + +```powershell +connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword= '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -ForceChangePasswordNextLogin $True +``` + +This command sets the specified user's password with ForceChangePasswordNextLogin parameter. + +- `-ObjectId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. +- `-ForceChangePasswordNextLogin` parameter forces a user to change their password during their next log in. + +## Parameters + +### -EnforceChangePasswordPolicy + +If set to true, force the user to change their password. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ForceChangePasswordNextLogin + +Forces a user to change their password during their next sign in. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Password + +Specifies the password. + +```yaml +Type: System.SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md new file mode 100644 index 0000000000..21eef3e9b1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md @@ -0,0 +1,130 @@ +--- +title: Set-EntraUserThumbnailPhoto +description: This article provides details on the Set-EntraUserThumbnailPhoto command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto + +schema: 2.0.0 +--- + +# Set-EntraUserThumbnailPhoto + +## Synopsis + +Set the thumbnail photo for a user. + +## Syntax + +### File (Default) + +```powershell +Set-EntraUserThumbnailPhoto + [-UserId ] + -FilePath + [] +``` + +### Stream + +```powershell +Set-EntraUserThumbnailPhoto + -FileStream + [-UserId ] + [] +``` + +### ByteArray + +```powershell +Set-EntraUserThumbnailPhoto + [-UserId ] + -ImageByteArray + [] +``` + +## Description + +The `Set-EntraUserThumbnailPhoto` cmdlet is used to set the thumbnail photo for a user. + +Updating any user's photo in the organization requires the User.ReadWrite.All permission. Updating only the signed-in user's photo requires the User.ReadWrite permission. + +## Examples + +### Example 1: Sets the thumbnail photo + +```powershell +Connect-Entra -Scopes 'User.ReadWrite','User.ReadWrite.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + FilePath = 'D:\UserThumbnailPhoto.jpg' +} +Set-EntraUserThumbnailPhoto @params +``` + +This example sets the thumbnail photo of the user specified with the UserId parameter to the image specified with the FilePath parameter. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-FilePath` parameter specifies the file path of the image to be uploaded as the user thumbnail photo. + +## Parameters + +### -FilePath + +The file path of the image to be uploaded as the user thumbnail photo. + +```yaml +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +The Object ID of the user for which the user thumbnail photo is set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.IO.Stream System.Byte\[\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraUserThumbnailPhoto](Get-EntraUserThumbnailPhoto.md) diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md new file mode 100644 index 0000000000..1959f83ffc --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md @@ -0,0 +1,106 @@ +--- +title: Update-EntraSignedInUserPassword +description: This article provides details on the Update-EntraSignedInUserPassword command. + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword + +schema: 2.0.0 +--- + +# Update-EntraSignedInUserPassword + +## Synopsis + +Updates the password for the signed-in user. + +## Syntax + +```powershell +Update-EntraSignedInUserPassword + -NewPassword + -CurrentPassword + [] +``` + +## Description + +The `Update-EntraSignedInUserPassword` cmdlet updates the password for the signed-in user in Microsoft Entra ID. + +Enable users to update their own passwords. Any user can change their password without requiring administrator privileges. + +## Examples + +### Example 1: Update a password + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$CurrentPassword = ConvertTo-SecureString '' -AsPlainText -Force +$NewPassword = ConvertTo-SecureString '' -AsPlainText -Force +$params = @{ + CurrentPassword = $CurrentPassword + NewPassword = $NewPassword +} +Update-EntraSignedInUserPassword @params +``` + +This example shows how to update the password for the signed-in user. + +- `-CurrentPassword` parameter specifies the current password of the signed-in user. +- `-NewPassword` parameter specifies the new password for the signed-in user. + +## Parameters + +### -CurrentPassword + +Specifies the current password of the signed-in user. + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NewPassword + +Specifies the new password for the signed-in user. + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [changePassword](https://learn.microsoft.com/graph/api/user-changepassword). + +## Related links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md b/moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md new file mode 100644 index 0000000000..f300d9f135 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md @@ -0,0 +1,105 @@ +--- +title: Update-EntraUserFromFederated +description: This article provides details on the Update-EntraUserFromFederated command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraUserFromFederated + +schema: 2.0.0 +--- + +# Update-EntraUserFromFederated + +## Synopsis + +Updates a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. + +## Syntax + +```powershell +Update-EntraUserFromFederated + -UserPrincipalName + [-NewPassword ] + [] +``` + +## Description + +The `Update-EntraUserFromFederated` cmdlet is used to update a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. A new password must be provided for the user. + +This process writes the new password to Microsoft Entra ID and, if configured with password writeback, pushes it to on-premises Active Directory. The admin can provide a new password or let the system generate one. The user will be prompted to change their password at their next sign-in. + +For delegated scenarios, the administrator needs at least the Authentication Administrator or Privileged Authentication Administrator Microsoft Entra role. + +Admins with User Administrator, Helpdesk Administrator, or Password Administrator roles can also reset passwords for non-admin users and a limited set of admin roles. + +## Examples + +### Example 1: Update a user in a domain + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All' +Update-EntraUserFromFederated -UserPrincipalName 'pattifuller@contoso.com' +``` + +This command updates a user in a domain. + +- `-UserPrincipalName` parameter specifies the Microsoft Entra ID UserID for the user to convert. + +## Parameters + +### -UserPrincipalName + +The Microsoft Entra ID UserID for the user to convert. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NewPassword + +The new password of the user. + +For tenants using hybrid password scenarios, specifying a new password is required. If you omit the password for a cloud-only account, the system generates one automatically. This generated password is a Unicode string without additional encoding. Before acceptance, the password is validated against the tenant's banned password list and must meet the tenant's cloud and/or on-premises password requirements. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [resetPassword](https://learn.microsoft.com/graph/api/authenticationmethod-resetpassword). + +## Related Links diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 8eb5249814..35a7a19e6c 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -22,7 +22,7 @@ Set-StrictMode -Version 5 $this.OutputDirectory = '../bin/' $this.TypeDefsDirectory="../build/Typedefs.txt" - $this.BaseDocsPath='../module/docs/' + $this.BaseDocsPath='../moduleVNext/docs/' } @@ -255,9 +255,9 @@ foreach (`$subModule in `$subModules) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - "../module/Entra" + "../moduleVNext/Entra" } else { - "../module/EntraBeta" + "../moduleVNext/EntraBeta" } $moduleName=if($Module -eq 'Entra'){ @@ -323,14 +323,14 @@ foreach (`$subModule in `$subModules) { [void] CreateModuleManifest($module) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - "../module/Entra" + "../moduleVNext/Entra" } else { - "../module/EntraBeta" + "../moduleVNext/EntraBeta" } $moduleBasePath =if ($Module -eq "Entra") { - "../module/Entra/Microsoft.Graph.Entra" + "../moduleVNext/Entra/Microsoft.Graph.Entra" } else { - "../module/EntraBeta/Microsoft.Graph.Entra.Beta" + "../moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta" } $subDirectories = Get-ChildItem -Path $moduleBasePath -Directory @@ -347,8 +347,8 @@ foreach (`$subModule in `$subModules) { foreach ($subDir in $subDirectories) { # Define module name based on sub-directory name # Skip the 'Migration' sub-directory - if ($subDir.Name -eq 'Migration') { - Log-Message "Skipping 'Migration' directory." -Level 'INFO' + if ($subDir.Name -eq 'Migration' -or $subDir.Name -eq 'Invitations') { + Log-Message "Skipping 'Migration and Invitation' directory." -Level 'INFO' continue } @@ -494,7 +494,7 @@ foreach (`$subModule in `$subModules) { $subDirectories = Get-ChildItem -Path $docsPath -Directory foreach ($subDirectory in $subDirectories) { # Skip the 'Migration' sub-directory - if ($subDirectory.Name -eq 'Migration') { + if ($subDirectory.Name -eq 'Migration' -or $subDirectory.Name -eq 'Invitations') { Log-Message "Skipping 'Migration' directory." -Level 'INFO' continue } diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 643e6491a4..caf000ae94 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -33,9 +33,9 @@ class EntraModuleSplitter { [string] GetOutputDirectory([string]$source) { if ($source -eq 'Entra') { - return "..\module\Entra\" + return "..\moduleVNext\Entra\" } else { - return "..\module\EntraBeta\" + return "..\moduleVNext\EntraBeta\" } } @@ -142,9 +142,9 @@ class EntraModuleSplitter { [void] SplitEntraModule([string]$Module = 'Entra') { $JsonFilePath=if($Module -eq 'Entra'){ - '../module/Entra/config/moduleMapping.json' + '../moduleVNext/Entra/config/moduleMapping.json' }else{ - '../module/EntraBeta/config/moduleMapping.json' + '../moduleVNext/EntraBeta/config/moduleMapping.json' } # Determine file paths and output directories $psm1FilePath = $this.GetModuleFilePath($Module) @@ -159,6 +159,7 @@ class EntraModuleSplitter { $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName $this.CreateOutputDirectory($moduleOutputDirectory) + Log-Message 'PSM1 Path $psm1FilePath' -Level 'WARNING' $psm1Content = Get-Content -Path $psm1FilePath -Raw $functions = $this.ExtractFunctions($psm1Content) @@ -170,6 +171,9 @@ class EntraModuleSplitter { $specificFunctionName = if ($moduleName -eq "Microsoft.Graph.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAliases" } foreach ($function in $functions) { + if($moduleOutputDirectory -eq 'Migration' -or $moduleOutputDirectory -eq 'Invitations'){ + continue; + } $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) } @@ -198,8 +202,8 @@ class EntraModuleSplitter { foreach ($directory in $directories) { # Skip the 'Migration' sub-directory - if ($directory.Name -eq 'Migration') { - Log-Message "Skipping 'Migration' directory." -Level 'INFO' + if ($directory.Name -eq 'Migration' -or $directory.Name -eq 'Invitations') { + Log-Message "Skipping $directory.Name directory." -Level 'INFO' continue } # Get the full path of the directory @@ -244,9 +248,9 @@ class EntraModuleSplitter { [string[]] GetModuleDirectories([string]$Module) { $startDirectory = if ($Module -eq 'EntraBeta') { - "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" + "..\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta\" } else { - "..\module\Entra\Microsoft.Graph.Entra\" + "..\moduleVNext\Entra\Microsoft.Graph.Entra\" } $aliasFileName = if ($Module -eq 'EntraBeta') { From 71bfd9d19942eef1a07fb04552661aa639fe3191 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:25:15 +0300 Subject: [PATCH 071/124] migrate to moduleVNext --- build/Split-Docs.ps1 | 5 + .../Invitations/New-EntraCustomHeaders.ps1 | 31 -- .../Migration/Get-EntraUnsupportedCommand.ps1 | 8 - .../Migration/New-EntraCustomHeaders.ps1 | 31 -- .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraInvitation.ps1 | 0 .../Test-EntraScript.ps1 | 0 .../Invitations/New-EntraInvitation.md | 291 ------------------ .../Migration/Enable-EntraAzureADAlias.md | 57 ---- .../Migration/Test-EntraScript.md | 120 -------- src/EntraModuleBuilder.ps1 | 6 +- src/EntraModuleSplitter.ps1 | 8 +- 12 files changed, 11 insertions(+), 546 deletions(-) delete mode 100644 moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 delete mode 100644 moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 delete mode 100644 moduleVNext/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 rename moduleVNext/Entra/{Microsoft.Graph.Entra/Invitations => UnMappedFiles}/Get-EntraUnsupportedCommand.ps1 (100%) rename moduleVNext/Entra/{Microsoft.Graph.Entra/Invitations => UnMappedFiles}/New-EntraInvitation.ps1 (100%) rename moduleVNext/Entra/{Microsoft.Graph.Entra/Migration => UnMappedFiles}/Test-EntraScript.ps1 (100%) delete mode 100644 moduleVNext/docs/entra-powershell-v1.0/Invitations/New-EntraInvitation.md delete mode 100644 moduleVNext/docs/entra-powershell-v1.0/Migration/Enable-EntraAzureADAlias.md delete mode 100644 moduleVNext/docs/entra-powershell-v1.0/Migration/Test-EntraScript.md diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index d6fbeaae9f..0357671db3 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -57,6 +57,11 @@ function Split-Docs { # Create the sub-directory under the output root directory if it doesn't exist $targetSubDir = Join-Path -Path $TargetRootDirectory -ChildPath $subDirName + + if($subDirName -eq 'Migration' -or $subDirName -eq 'Invitations'){ + Log-Message "Skipping $subDirName" -Level 'WARNING' + continue + } if (-not (Test-Path -Path $targetSubDir -PathType Container)) { New-Item -Path $targetSubDir -ItemType Directory | Out-Null Log-Message -Message "Created sub-directory: $targetSubDir" -Level 'SUCCESS' diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 deleted file mode 100644 index 5f3d3fe2af..0000000000 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraCustomHeaders.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .PARAMETER Command - The command that is being executed. - .EXAMPLE - New-EntraCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 deleted file mode 100644 index 5f3d3fe2af..0000000000 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/New-EntraCustomHeaders.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .PARAMETER Command - The command that is being executed. - .EXAMPLE - New-EntraCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/Entra/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/Get-EntraUnsupportedCommand.ps1 rename to moduleVNext/Entra/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 b/moduleVNext/Entra/UnMappedFiles/New-EntraInvitation.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.ps1 rename to moduleVNext/Entra/UnMappedFiles/New-EntraInvitation.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 b/moduleVNext/Entra/UnMappedFiles/Test-EntraScript.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Migration/Test-EntraScript.ps1 rename to moduleVNext/Entra/UnMappedFiles/Test-EntraScript.ps1 diff --git a/moduleVNext/docs/entra-powershell-v1.0/Invitations/New-EntraInvitation.md b/moduleVNext/docs/entra-powershell-v1.0/Invitations/New-EntraInvitation.md deleted file mode 100644 index df6ead8bb6..0000000000 --- a/moduleVNext/docs/entra-powershell-v1.0/Invitations/New-EntraInvitation.md +++ /dev/null @@ -1,291 +0,0 @@ ---- -title: New-EntraInvitation -description: This article provides details on the New-EntraInvitation command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraInvitation - -schema: 2.0.0 ---- - -# New-EntraInvitation - -## Synopsis - -This cmdlet is used to invite a new external user to your directory. - -## Syntax - -```powershell -New-EntraInvitation - [-InvitedUser ] - [-InvitedUserType ] - -InvitedUserEmailAddress - [-SendInvitationMessage ] --InviteRedirectUrl - [-InvitedUserMessageInfo ] [-InvitedUserDisplayName ] - [] -``` - -## Description - -This cmdlet is used to invite a new external user to your directory. - -Invitation adds an external user to the organization. When creating a new invitation, you have several options available: - -- On invitation creation, Microsoft Graph can automatically send an invitation email directly to the invited user, or your app can use the inviteRedeemUrl returned in the response to craft your own invitation (through your communication mechanism of choice) to the invited user. If you decide to have Microsoft Graph send an invitation email automatically, you can specify the content and language of the email by using invitedUserMessageInfo. - -- When the user is invited, a user entity (of userType Guest) is created and can be used to control access to resources. The invited user has to go through the redemption process to access any resources they have been invited to. - -To reset the redemption status for a guest user, the User.ReadWrite.All permission is the minimum required. - -For delegated scenarios, the signed-in user must have at least one of the following roles: Guest Inviter, Directory Writers, or User Administrator. Additionally, to reset the redemption status, the signed-in user must have the Helpdesk Administrator or User Administrator role. - -## Examples - -### Example 1: Invite a new external user to your directory - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.onmicrosoft.com' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example sent an email to the user who's email address is in the `-InvitedUserEmailAddress` parameter. - -When the user accepts the invitation, they're forwarded to the url as specified in the `-InviteRedirectUrl` parameter. - -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. - -### Example 2: Invite a new external user to your directory with InvitedUserDisplayName parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.onmicrosoft.com' - InvitedUserDisplayName = 'microsoftuser' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with `-InvitedUserDisplayName` parameter. - -- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user -- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. -- `-InvitedUserDisplayName`Parameter specifies the display name of the user. - -### Example 3: Invite a new external user to your directory with InvitedUserMessageInfo parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$a= New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo -$a.CustomizedMessageBody = 'Hi there, how are you' -$a.MessageLanguage = 'EN' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.microsoft.com' - InvitedUserMessageInfo = $a -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with InvitedUserMessageInfo parameter. - -- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. -- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. -- `-InvitedUserMessageInfo`Parameter specifies addition information to specify how the invitation message is sent. - -### Example 4: Invite a new external user to your directory with InvitedUserType parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.microsoft.com' - InvitedUserType = 'Guest' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -9e2b9f02-c2cb-4832-920d-81959f44e397 https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with InvitedUserType parameter. - -## Parameters - -### -InvitedUserDisplayName - -The display name of the user as it appears in your directory. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserEmailAddress - -The Email address to which the invitation is sent. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserMessageInfo - -Addition information to specify how the invitation message is sent. - -```yaml -Type: InvitedUserMessageInfo -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUser - -An existing user object in the directory that you want to add or update the B2B credentials for. - -```yaml -Type: User -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserType - -The userType of the user being invited. By default, this is Guest. - -You can invite as Member if you are company administrator. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InviteRedirectUrl - -The URL to which the invited user is forwarded after accepting the invitation. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SendInvitationMessage - -A Boolean parameter that indicates whether or not an invitation message sent to the invited user. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -- See more information - . - -## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Migration/Enable-EntraAzureADAlias.md b/moduleVNext/docs/entra-powershell-v1.0/Migration/Enable-EntraAzureADAlias.md deleted file mode 100644 index 7667dcb6b1..0000000000 --- a/moduleVNext/docs/entra-powershell-v1.0/Migration/Enable-EntraAzureADAlias.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Enable-EntraAzureADAlias -description: This article provides details on the Enable-EntraAzureADAlias command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraAzureADAlias - -schema: 2.0.0 ---- - -# Enable-EntraAzureADAlias - -## Synopsis - -Enables aliases for AzureAD commands. - -## Syntax - -```powershell -Enable-EntraAzureADAlias -``` - -## Description - -Enables Azure AD command aliases in the current PowerShell session. - -## Examples - -### Example 1: Enable aliasing - -```powershell -Enable-EntraAzureADAlias -``` - -Enables all Azure AD prefixes for the current PowerShell session. - -## Parameters - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/moduleVNext/docs/entra-powershell-v1.0/Migration/Test-EntraScript.md b/moduleVNext/docs/entra-powershell-v1.0/Migration/Test-EntraScript.md deleted file mode 100644 index bdc29b6526..0000000000 --- a/moduleVNext/docs/entra-powershell-v1.0/Migration/Test-EntraScript.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: Test-EntraScript -description: This article provides details on the Test-EntraScript command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Test-EntraScript - -schema: 2.0.0 ---- - -# Test-EntraScript - -## Synopsis - -Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. - -## Syntax - -```powershell -Test-EntraScript - -Path - [-Content ] - [-Quiet] - [] -``` - -## Description - -Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. - -## Examples - -### Example 1 - -```powershell -Test-EntraScript -Path .\usercreation.ps1 -Quiet -``` - -Returns whether the script `usercreation.ps1` could run under Microsoft.Graph.Entra. - -### Example 2 - -```powershell -Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript -``` - -Returns a list of all scripts that wouldn't run under the Microsoft.Graph.Entra module, listing each issue with line and code. - -## Parameters - -### -Path - -Path to one or more script files to scan. -Or name of the content, when also specifying -Content - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: FullName, Name - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Content - -Code content to scan. -Used when scanning code that has no file representation (for example, -straight from a repository). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Quiet - -Only return $true or $ false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($ false) - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 35a7a19e6c..d161a8338d 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -125,9 +125,9 @@ Set-StrictMode -Version 5 [void] CreateSubModuleFile([string]$Module, [string]$typedefsFilePath=$this.TypeDefsDirectory) { # Determine the output path based on the module $startDirectory = if ($Module -eq "Entra") { - "..\module\Entra\Microsoft.Graph.Entra\" + "..\moduleVNext\Entra\Microsoft.Graph.Entra\" } else { - "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\" + "..\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta\" } Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." @@ -333,7 +333,7 @@ foreach (`$subModule in `$subModules) { "../moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta" } - $subDirectories = Get-ChildItem -Path $moduleBasePath -Directory + $subDirectories = Get-ChildItem -Path $moduleBasePath $settingPath = Join-Path $rootPath -ChildPath "/config/ModuleMetadata.json" diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index caf000ae94..1f857e8ca4 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -93,7 +93,7 @@ class EntraModuleSplitter { # Function has been mapped to a directory $isMapped = $false - if($moduleMapping.ContainsKey($functionName)){ + if($moduleMapping.ContainsKey($functionName) -and (-not($moduleMapping.$functionName -eq 'Migration' -or $moduleMapping.$functionName -eq 'Invitations'))){ $subModuleDirectoryName = $moduleMapping.$functionName @@ -157,6 +157,7 @@ class EntraModuleSplitter { $jsonContent = $this.ReadJsonFile($JsonFilePath) $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1FilePath) $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName + Log-Message "ModuleOutputDirectry $moduleOutputDirectory" -Level 'ERROR' $this.CreateOutputDirectory($moduleOutputDirectory) Log-Message 'PSM1 Path $psm1FilePath' -Level 'WARNING' @@ -171,10 +172,7 @@ class EntraModuleSplitter { $specificFunctionName = if ($moduleName -eq "Microsoft.Graph.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAliases" } foreach ($function in $functions) { - if($moduleOutputDirectory -eq 'Migration' -or $moduleOutputDirectory -eq 'Invitations'){ - continue; - } - $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) + $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) } # Call the new method to add functions to all directories From 5b3662fe4b343e11378d5a3f97755109ed162521 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:27:44 +0300 Subject: [PATCH 072/124] migrate to moduleVNext --- .../Applications/Add-EntraApplicationOwner.md | 102 --- ...ncipalDelegatedPermissionClassification.md | 163 ---- .../Add-EntraServicePrincipalOwner.md | 109 --- .../Applications/Get-EntraApplication.md | 276 ------ .../Get-EntraApplicationExtensionProperty.md | 106 --- .../Get-EntraApplicationKeyCredential.md | 89 -- .../Applications/Get-EntraApplicationLogo.md | 136 --- .../Applications/Get-EntraApplicationOwner.md | 212 ----- .../Get-EntraApplicationPasswordCredential.md | 104 --- .../Get-EntraApplicationServiceEndpoint.md | 167 ---- .../Get-EntraApplicationTemplate.md | 173 ---- .../Get-EntraDeletedApplication.md | 257 ------ .../Applications/Get-EntraServicePrincipal.md | 369 -------- ...-EntraServicePrincipalAppRoleAssignedTo.md | 188 ---- ...-EntraServicePrincipalAppRoleAssignment.md | 192 ----- .../Get-EntraServicePrincipalCreatedObject.md | 155 ---- ...ncipalDelegatedPermissionClassification.md | 204 ----- .../Get-EntraServicePrincipalKeyCredential.md | 91 -- .../Get-EntraServicePrincipalMembership.md | 178 ---- ...raServicePrincipalOAuth2PermissionGrant.md | 169 ---- .../Get-EntraServicePrincipalOwnedObject.md | 195 ----- .../Get-EntraServicePrincipalOwner.md | 217 ----- ...EntraServicePrincipalPasswordCredential.md | 93 -- .../Applications/New-EntraApplication.md | 490 ----------- .../New-EntraApplicationExtensionProperty.md | 215 ----- ...EntraApplicationFromApplicationTemplate.md | 111 --- .../Applications/New-EntraApplicationKey.md | 155 ---- .../New-EntraApplicationKeyCredential.md | 258 ------ .../New-EntraApplicationPassword.md | 121 --- .../New-EntraApplicationPasswordCredential.md | 215 ----- .../Applications/New-EntraServicePrincipal.md | 406 --------- ...-EntraServicePrincipalAppRoleAssignment.md | 230 ----- .../New-EntraServicePrincipalKeyCredential.md | 182 ---- ...EntraServicePrincipalPasswordCredential.md | 168 ---- .../Applications/Remove-EntraApplication.md | 84 -- ...emove-EntraApplicationExtensionProperty.md | 106 --- .../Remove-EntraApplicationKey.md | 133 --- .../Remove-EntraApplicationKeyCredential.md | 108 --- .../Remove-EntraApplicationOwner.md | 106 --- .../Remove-EntraApplicationPassword.md | 106 --- ...move-EntraApplicationPasswordCredential.md | 104 --- ...emove-EntraApplicationVerifiedPublisher.md | 83 -- .../Remove-EntraDeletedApplication.md | 92 -- .../Remove-EntraDeletedDirectoryObject.md | 96 --- .../Remove-EntraServicePrincipal.md | 86 -- ...-EntraServicePrincipalAppRoleAssignment.md | 117 --- ...ncipalDelegatedPermissionClassification.md | 105 --- ...move-EntraServicePrincipalKeyCredential.md | 104 --- .../Remove-EntraServicePrincipalOwner.md | 107 --- ...EntraServicePrincipalPasswordCredential.md | 104 --- .../Restore-EntraDeletedApplication.md | 127 --- ...EntraGroupIdsServicePrincipalIsMemberOf.md | 110 --- .../Applications/Set-EntraApplication.md | 496 ----------- .../Applications/Set-EntraApplicationLogo.md | 126 --- .../Set-EntraApplicationVerifiedPublisher.md | 111 --- .../Applications/Set-EntraServicePrincipal.md | 440 ---------- .../Authentication/Add-EntraEnvironment.md | 119 --- .../Authentication/Connect-Entra.md | 583 ------------- .../Authentication/Disconnect-Entra.md | 78 -- .../Authentication/Find-EntraPermission.md | 239 ----- .../Authentication/Get-EntraContext.md | 130 --- .../Authentication/Get-EntraEnvironment.md | 108 --- ...et-EntraStrongAuthenticationMethodByUpn.md | 79 -- ...Revoke-EntraSignedInUserAllRefreshToken.md | 73 -- .../Revoke-EntraUserAllRefreshToken.md | 90 -- .../Add-EntraAdministrativeUnitMember.md | 111 --- ...SecurityAttributeDefinitionAllowedValue.md | 139 --- .../Add-EntraDeviceRegisteredOwner.md | 107 --- .../Add-EntraDeviceRegisteredUser.md | 112 --- .../Add-EntraDirectoryRoleMember.md | 104 --- .../Add-EntraScopedRoleMembership.md | 135 --- .../Confirm-EntraDomain.md | 112 --- .../Enable-EntraDirectoryRole.md | 96 --- .../Get-CrossCloudVerificationCode.md | 72 -- .../Get-EntraAccountSku.md | 117 --- .../Get-EntraAdministrativeUnit.md | 237 ----- .../Get-EntraAdministrativeUnitMember.md | 193 ----- .../Get-EntraAttributeSet.md | 143 --- .../DirectoryManagement/Get-EntraContact.md | 236 ----- .../Get-EntraContactDirectReport.md | 159 ---- .../Get-EntraContactManager.md | 98 --- .../Get-EntraContactMembership.md | 175 ---- .../Get-EntraContactThumbnailPhoto.md | 150 ---- .../DirectoryManagement/Get-EntraContract.md | 195 ----- ...-EntraCustomSecurityAttributeDefinition.md | 142 --- ...SecurityAttributeDefinitionAllowedValue.md | 187 ---- .../Get-EntraDeletedDirectoryObject.md | 122 --- .../DirectoryManagement/Get-EntraDevice.md | 271 ------ .../Get-EntraDeviceRegisteredOwner.md | 196 ----- .../Get-EntraDeviceRegisteredUser.md | 180 ---- .../Get-EntraDirSyncConfiguration.md | 106 --- .../Get-EntraDirSyncFeature.md | 153 ---- ...ectoryObjectOnPremisesProvisioningError.md | 104 --- .../Get-EntraDirectoryRole.md | 181 ---- .../Get-EntraDirectoryRoleMember.md | 106 --- .../Get-EntraDirectoryRoleTemplate.md | 101 --- .../DirectoryManagement/Get-EntraDomain.md | 147 ---- .../Get-EntraDomainFederationSettings.md | 129 --- .../Get-EntraDomainNameReference.md | 113 --- ...t-EntraDomainServiceConfigurationRecord.md | 112 --- .../Get-EntraDomainVerificationDnsRecord.md | 112 --- .../Get-EntraExtensionProperty.md | 97 --- .../Get-EntraFederationProperty.md | 90 -- .../Get-EntraObjectByObjectId.md | 142 --- .../Get-EntraPartnerInformation.md | 135 --- .../Get-EntraPasswordPolicy.md | 101 --- .../Get-EntraScopedRoleMembership.md | 145 ---- .../Get-EntraSubscribedSku.md | 227 ----- .../Get-EntraTenantDetail.md | 167 ---- .../New-EntraAdministrativeUnit.md | 133 --- .../New-EntraAttributeSet.md | 136 --- ...-EntraCustomSecurityAttributeDefinition.md | 234 ----- .../DirectoryManagement/New-EntraDevice.md | 339 -------- .../DirectoryManagement/New-EntraDomain.md | 158 ---- .../Remove-EntraAdministrativeUnit.md | 87 -- .../Remove-EntraAdministrativeUnitMember.md | 108 --- .../Remove-EntraContact.md | 79 -- .../DirectoryManagement/Remove-EntraDevice.md | 85 -- .../Remove-EntraDeviceRegisteredOwner.md | 101 --- .../Remove-EntraDeviceRegisteredUser.md | 99 --- .../Remove-EntraDirectoryRoleMember.md | 106 --- .../DirectoryManagement/Remove-EntraDomain.md | 91 -- .../Remove-EntraExternalDomainFederation.md | 79 -- .../Remove-EntraScopedRoleMembership.md | 106 --- .../Restore-EntraDeletedDirectoryObject.md | 154 ---- .../Set-EntraAdministrativeUnit.md | 145 ---- .../Set-EntraAttributeSet.md | 147 ---- ...-EntraCustomSecurityAttributeDefinition.md | 149 ---- ...SecurityAttributeDefinitionAllowedValue.md | 126 --- .../DirectoryManagement/Set-EntraDevice.md | 387 --------- .../Set-EntraDirSyncConfiguration.md | 144 ---- .../Set-EntraDirSyncEnabled.md | 140 --- .../Set-EntraDirSyncFeature.md | 187 ---- .../DirectoryManagement/Set-EntraDomain.md | 135 --- .../Set-EntraDomainFederationSettings.md | 290 ------- .../Set-EntraPartnerInformation.md | 242 ------ .../Set-EntraTenantDetail.md | 216 ----- .../Get-EntraDirectoryRoleAssignment.md | 282 ------ .../Get-EntraDirectoryRoleDefinition.md | 273 ------ .../New-EntraDirectoryRoleAssignment.md | 136 --- .../New-EntraDirectoryRoleDefinition.md | 330 ------- .../Remove-EntraDirectoryRoleAssignment.md | 88 -- .../Remove-EntraDirectoryRoleDefinition.md | 93 -- .../Set-EntraDirectoryRoleDefinition.md | 267 ------ .../Groups/Add-EntraGroupMember.md | 102 --- .../Groups/Add-EntraGroupOwner.md | 108 --- .../Groups/Add-EntraLifecyclePolicyGroup.md | 111 --- .../Groups/Get-EntraDeletedGroup.md | 293 ------- .../Groups/Get-EntraGroup.md | 309 ------- .../Groups/Get-EntraGroupAppRoleAssignment.md | 181 ---- .../Groups/Get-EntraGroupLifecyclePolicy.md | 134 --- .../Groups/Get-EntraGroupMember.md | 214 ----- .../Groups/Get-EntraGroupOwner.md | 189 ---- .../Groups/Get-EntraGroupPermissionGrant.md | 106 --- .../Groups/Get-EntraLifecyclePolicyGroup.md | 105 --- .../Groups/Get-EntraObjectSetting.md | 252 ------ .../Groups/New-EntraGroup.md | 346 -------- .../Groups/New-EntraGroupAppRoleAssignment.md | 151 ---- .../Groups/New-EntraGroupLifecyclePolicy.md | 138 --- .../Groups/Remove-EntraGroup.md | 93 -- .../Remove-EntraGroupAppRoleAssignment.md | 99 --- .../Remove-EntraGroupLifecyclePolicy.md | 87 -- .../Groups/Remove-EntraGroupMember.md | 102 --- .../Groups/Remove-EntraGroupOwner.md | 101 --- .../Remove-EntraLifecyclePolicyGroup.md | 117 --- .../Groups/Reset-EntraLifeCycleGroup.md | 84 -- .../Select-EntraGroupIdsContactIsMemberOf.md | 99 --- .../Select-EntraGroupIdsGroupIsMemberOf.md | 101 --- .../Select-EntraGroupIdsUserIsMemberOf.md | 110 --- .../Groups/Set-EntraGroup.md | 313 ------- .../Groups/Set-EntraGroupLifecyclePolicy.md | 160 ---- .../Invitations/New-EntraInvitation.md | 291 ------- .../Migration/Enable-EntraAzureADAlias.md | 57 -- .../Migration/Test-EntraScript.md | 120 --- .../Reports/Get-EntraAuditDirectoryLog.md | 179 ---- .../Reports/Get-EntraAuditSignInLog.md | 213 ----- .../SignIns/Get-EntraAuthorizationPolicy.md | 156 ---- .../Get-EntraConditionalAccessPolicy.md | 135 --- .../SignIns/Get-EntraFeatureRolloutPolicy.md | 212 ----- .../SignIns/Get-EntraIdentityProvider.md | 140 --- .../SignIns/Get-EntraNamedLocationPolicy.md | 138 --- .../SignIns/Get-EntraOAuth2PermissionGrant.md | 190 ---- .../Get-EntraPermissionGrantConditionSet.md | 214 ----- .../SignIns/Get-EntraPermissionGrantPolicy.md | 134 --- .../SignIns/Get-EntraPolicy.md | 196 ----- .../Get-EntraTrustedCertificateAuthority.md | 186 ---- .../New-EntraConditionalAccessPolicy.md | 278 ------ .../SignIns/New-EntraFeatureRolloutPolicy.md | 224 ----- .../SignIns/New-EntraIdentityProvider.md | 170 ---- .../SignIns/New-EntraNamedLocationPolicy.md | 236 ----- .../SignIns/New-EntraOauth2PermissionGrant.md | 188 ---- .../New-EntraPermissionGrantConditionSet.md | 372 -------- .../SignIns/New-EntraPermissionGrantPolicy.md | 133 --- .../SignIns/New-EntraPolicy.md | 254 ------ .../New-EntraTrustedCertificateAuthority.md | 98 --- .../Remove-EntraConditionalAccessPolicy.md | 87 -- .../Remove-EntraFeatureRolloutPolicy.md | 87 -- ...ntraFeatureRolloutPolicyDirectoryObject.md | 105 --- .../SignIns/Remove-EntraIdentityProvider.md | 88 -- .../Remove-EntraNamedLocationPolicy.md | 88 -- .../Remove-EntraOAuth2PermissionGrant.md | 84 -- ...Remove-EntraPermissionGrantConditionSet.md | 129 --- .../Remove-EntraPermissionGrantPolicy.md | 85 -- .../SignIns/Remove-EntraPolicy.md | 83 -- ...Remove-EntraTrustedCertificateAuthority.md | 92 -- .../SignIns/Set-EntraAuthorizationPolicy.md | 241 ------ .../Set-EntraConditionalAccessPolicy.md | 240 ------ .../SignIns/Set-EntraFeatureRolloutPolicy.md | 231 ----- .../SignIns/Set-EntraIdentityProvider.md | 195 ----- .../SignIns/Set-EntraNamedLocationPolicy.md | 258 ------ .../Set-EntraPermissionGrantConditionSet.md | 309 ------- .../SignIns/Set-EntraPermissionGrantPolicy.md | 143 --- .../SignIns/Set-EntraPolicy.md | 211 ----- .../Set-EntraTrustedCertificateAuthority.md | 92 -- .../Users/Get-EntraUser.md | 426 --------- .../Users/Get-EntraUserAppRoleAssignment.md | 184 ---- .../Users/Get-EntraUserCreatedObject.md | 175 ---- .../Users/Get-EntraUserDirectReport.md | 175 ---- .../Users/Get-EntraUserExtension.md | 111 --- .../Users/Get-EntraUserLicenseDetail.md | 105 --- .../Users/Get-EntraUserManager.md | 142 --- .../Users/Get-EntraUserMembership.md | 218 ----- .../Get-EntraUserOAuth2PermissionGrant.md | 201 ----- .../Users/Get-EntraUserOwnedDevice.md | 166 ---- .../Users/Get-EntraUserOwnedObject.md | 208 ----- .../Users/Get-EntraUserRegisteredDevice.md | 165 ---- .../Users/Get-EntraUserThumbnailPhoto.md | 109 --- .../Users/New-EntraUser.md | 816 ------------------ .../Users/New-EntraUserAppRoleAssignment.md | 209 ----- .../Users/Remove-EntraUser.md | 88 -- .../Remove-EntraUserAppRoleAssignment.md | 106 --- .../Users/Remove-EntraUserExtension.md | 130 --- .../Users/Remove-EntraUserManager.md | 82 -- .../Users/Set-EntraUser.md | 677 --------------- .../Users/Set-EntraUserExtension.md | 91 -- .../Users/Set-EntraUserLicense.md | 209 ----- .../Users/Set-EntraUserManager.md | 101 --- .../Users/Set-EntraUserPassword.md | 164 ---- .../Users/Set-EntraUserThumbnailPhoto.md | 130 --- .../Users/Update-EntraSignedInUserPassword.md | 106 --- .../Users/Update-EntraUserFromFederated.md | 105 --- 241 files changed, 40141 deletions(-) delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md delete mode 100644 module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md deleted file mode 100644 index c9bfb8a7fa..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Add-EntraApplicationOwner -description: This article provides details on the Add-EntraApplicationOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraApplicationOwner - -schema: 2.0.0 ---- - -# Add-EntraApplicationOwner - -## Synopsis - -Adds an owner to an application. - -## Syntax - -```powershell -Add-EntraApplicationOwner - -ApplicationId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraApplicationOwner` cmdlet adds an owner to a Microsoft Entra ID application. - -## Examples - -### Example 1: Add a user as an owner to an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$ApplicationId = (Get-EntraApplication -Top 1).ObjectId -$UserObjectId = (Get-EntraUser -UserId 'SawyerM@contoso.com').ObjectId -Add-EntraApplicationOwner -ApplicationId $ApplicationId -RefObjectId $UserObjectId -``` - -This example demonstrates how to add an owner to an application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the ID of an application. -- `-RefObjectId` parameter specifies the ID of a user. - -## Parameters - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) - -[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md deleted file mode 100644 index 9cb637423c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -title: Add-EntraServicePrincipalDelegatedPermissionClassification -description: This article provides details on the Add-EntraServicePrincipalDelegatedPermissionClassification command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification - -schema: 2.0.0 ---- - -# Add-EntraServicePrincipalDelegatedPermissionClassification - -## Synopsis - -Add a classification for a delegated permission. - -## Syntax - -```powershell -Add-EntraServicePrincipalDelegatedPermissionClassification - -ServicePrincipalId - -PermissionId - -Classification - -PermissionName - [] -``` - -## Description - -The `Add-EntraServicePrincipalDelegatedPermissionClassification` cmdlet creates a delegated permission classification for the given permission on service principal. - -## Examples - -### Example 1: Create Delegated Permission Classification - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$PermissionId = $ServicePrincipal.PublishedPermissionScopes[0].Id -$PermissionName = $ServicePrincipal.PublishedPermissionScopes[0].Value - -$params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - PermissionId = $PermissionId - Classification = 'Low' - PermissionName = $PermissionName -} - -Add-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -```Output -Id Classification PermissionId PermissionName --- -------------- ------------ -------------- -T2qU_E28O0GgkLLIYRPsTwE low fc946a4f-bc4d-413b-a090-b2c86113ec4f LicenseManager.AccessAsUser -``` - -This command creates a delegated permission classification for the given permission on the service principal. You can use the command `Get-EntraServicePrincipal` to get service principal ID. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. -- `-PermissionId` parameter specifies the ID for a delegated permission. -- `-Classification` parameter specifies the classification for a delegated permission. -- `-PermissionName` parameter specifies the name for a delegated permission. - -## Parameters - -### -ServicePrincipalId - -The unique identifier of a service principal object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PermissionId - -The ID for a delegated permission. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PermissionName - -The name for a delegated permission. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Classification - -The classification for a delegated permission. -This parameter can take one of the following values: - -- Low: Specifies a classification for a permission as low impact. - -- Medium: Specifies a classification for a permission as medium impact. - -- High: Specifies a classification for a permission as high impact. - -```yaml -Type: ClassificationEnum -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.DelegatedPermissionClassification - -## Notes - -## Related Links - -[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) - -[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md deleted file mode 100644 index e526f2d41a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Add-EntraServicePrincipalOwner -description: This article provides details on the Add-EntraServicePrincipalOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner - -schema: 2.0.0 ---- - -# Add-EntraServicePrincipalOwner - -## Synopsis - -Adds an owner to a service principal. - -## Syntax - -```powershell -Add-EntraServicePrincipalOwner - -ServicePrincipalId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraServicePrincipalOwner` cmdlet adds an owner to a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Add a user as an owner to a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId -$OwnerId = (Get-EntraUser -Top 1).ObjectId -$Params = @{ - ServicePrincipalId = $ServicePrincipalId - RefObjectId = $OwnerId -} -Add-EntraServicePrincipalOwner @Params -``` - -This example demonstrates how to add an owner to a service principal. - -- `-ServicePrincipalId` parameter specifies the service principal ID. -- `-RefObjectId` parameter specifies the user object ID. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) - -[Get-EntraUser](Get-EntraUser.md) - -[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md deleted file mode 100644 index d8cdda2c35..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplication.md +++ /dev/null @@ -1,276 +0,0 @@ ---- -title: Get-EntraApplication -description: This article provides details on the Get-EntraApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplication - -schema: 2.0.0 ---- - -# Get-EntraApplication - -## Synopsis - -Gets an application. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraApplication - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraApplication - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraApplication - -ApplicationId - [-Property ] - [-All] - [] -``` - -## Description - -The `Get-EntraApplication` cmdlet gets a Microsoft Entra ID application. - -## Examples - -### Example 1: Get an application by ApplicationId - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -ApplicationId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -ToGraph_443democc3c aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -``` - -This example demonstrates how to retrieve specific application by providing ID. - -### Example 2: Get all applications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -All -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -test app aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADandPersonalMicrosoftAccount contoso.com -ToGraph_443DEM cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -test adms eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADandPersonalMicrosoftAccount contoso.com -test adms app azure gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADandPersonalMicrosoftAccount contoso.com -test adms2 iiiiiiii-aaaa-bbbb-cccc-jjjjjjjjjjjj jjjjjjjj-bbbb-cccc-dddd-kkkkkkkkkkkk AzureADandPersonalMicrosoftAccount contoso.com -``` - -This example demonstrates how to get all applications from Microsoft Entra ID. - -### Example 3: Get applications with expiring secrets - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication | - Where-Object { - $_.PasswordCredentials.keyId -ne $null -and - $_.PasswordCredentials.EndDateTime -lt (Get-Date).AddDays(30) - } | - ForEach-Object { - $_.DisplayName, - $_.Id, - $_.PasswordCredentials - } -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - AppOne 8/19/2024 9:00:00 PM 1jQ aaaaaaaa-0b0b-1c1c-2d2d-333333333333 8/6/2024 6:07:47 PM -``` - -This example retrieves applications with expiring secrets within 30 days. - -### Example 4: Get an application by display name - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -Filter "DisplayName eq 'ToGraph_443DEMO'" -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -ToGraph_443DEMO cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -``` - -In this example, we retrieve application by its display name from Microsoft Entra ID. - -### Example 5: Search among retrieved applications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -SearchString 'My new application 2' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -My new application 2 kkkkkkkk-cccc-dddd-eeee-llllllllllll llllllll-dddd-eeee-ffff-mmmmmmmmmmmm AzureADandPersonalMicrosoftAccount contoso.com -``` - -This example demonstrates how to retrieve applications for specific string from Microsoft Entra ID. - -### Example 6: Retrieve an application by identifierUris - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplication -Filter "identifierUris/any(uri:uri eq 'https://wingtips.wingtiptoysonline.com')" -``` - -This example demonstrates how to retrieve applications by its identifierUris from Microsoft Entra ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplication](New-EntraApplication.md) - -[Remove-EntraApplication](Remove-EntraApplication.md) - -[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md deleted file mode 100644 index bce69cd889..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Get-EntraApplicationExtensionProperty -description: This article provides details on the Get-EntraApplicationExtensionProperty command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty - -schema: 2.0.0 ---- - -# Get-EntraApplicationExtensionProperty - -## Synopsis - -Gets application extension properties. - -## Syntax - -```powershell -Get-EntraApplicationExtensionProperty - -ApplicationId - [-Property ] - [] -``` - -## Description - -The `Get-EntraApplicationExtensionProperty` cmdlet gets application extension properties in Microsoft Entra ID. - -## Examples - -### Example 1: Get extension properties - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$Application = Get-EntraApplication -SearchString '' -Get-EntraApplicationExtensionProperty -ApplicationId $Application.Id -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ------------- ---------------------- ---- ------------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Boolean False False extension_c371a443f6734a3e8982a26357fb7d59_NewAttribute {User} -``` - -This command gets the extension properties for the specified application in Microsoft Entra ID. You cane use the command `Get-EntraApplication` to get application ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. - -## Parameters - -### -ApplicationId - -Specifies the unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) - -[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md deleted file mode 100644 index b0b5a7e66b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Get-EntraApplicationKeyCredential -description: This article provides details on the Get-EntraApplicationKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential - -schema: 2.0.0 ---- - -# Get-EntraApplicationKeyCredential - -## Synopsis - -Gets the key credentials for an application. - -## Syntax - -```powershell -Get-EntraApplicationKeyCredential - -ObjectId - [] -``` - -## Description - -The `Get-EntraApplicationKeyCredential` cmdlet retrieves the key credentials for an application. Specify `ObjectId` parameter to retrieve the key credentials for an application. - -## Examples - -### Example 1: Get key credentials - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationKeyCredential -ObjectId $application.ObjectId -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage -------------------- ----------- ----------- --- ----- ------------- ---- ----- -{116, 101, 115, 116…} MyApp Cert 6/27/2024 11:49:17 AM bbbbbbbb-1c1c-2d2d-3e3e-444444444444 6/27/2023 11:29:17 AM AsymmetricX509Cert Verify -``` - -This command gets the key credentials for the specified application. - -`-ObjectId` parameter specifies the ID of an application object in Microsoft Entra ID. - -## Parameters - -### -ObjectId - -Specifies a unique ID of an application in Microsoft Entra ID to retrieve key credentials. Use `Get-EntraApplication` for more details. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) - -[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md deleted file mode 100644 index 166508d887..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: Get-EntraApplicationLogo -description: This article provides details on the Get-EntraApplicationLogo command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationLogo - -schema: 2.0.0 ---- - -# Get-EntraApplicationLogo - -## Synopsis - -Retrieve the logo of an application. - -## Syntax - -```powershell -Get-EntraApplicationLogo - -ApplicationId - [-FileName ] - [-View ] - [-FilePath ] - [] -``` - -## Description - -The `Get-EntraApplicationLogo` cmdlet retrieves the logo that is set for an application. Specify the `ApplicationId` parameter to get a specific application logo for an application. - -## Examples - -### Example 1: Get an application logo for an application by ID - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplicationLogo -ApplicationId 'bbbbbbbb-1111-1111-1111-cccccccccccc' -FilePath 'D:\outfile1.jpg' -``` - -This example shows how to retrieve the application logo for an application that is specified through the Object ID parameter. - -## Parameters - -### -FileName - -If provided, the application logo is saved to the file using the specified file name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -FilePath - -If provided, the application logo is copied with a random filename to the file path that is specified in this parameter. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -The ApplicationId of the application for which the logo is to be retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -View - -If set to $true, the application's logo is displayed in a new window on the screen. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -### System.Boolean - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Set-EntraApplicationLogo](Set-EntraApplicationLogo.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md deleted file mode 100644 index 80b78d9283..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: Get-EntraApplicationOwner -description: This article provides details on the Get-EntraApplicationOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationOwner - -schema: 2.0.0 ---- - -# Get-EntraApplicationOwner - -## Synopsis - -Gets the owner of an application. - -## Syntax - -```powershell -Get-EntraApplicationOwner - -ApplicationId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraApplicationOwner` cmdlet get an owner of an Microsoft Entra ID application. - -## Examples - -### Example 1: Get the owner of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -``` - -This example demonstrates how to get the owners of an application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. - -### Example 2: Get the details about the owner of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -SearchString '' -$applicationOwners = Get-EntraApplicationOwner -ObjectId $application.ObjectId -$ownerDetails = $applicationOwners | ForEach-Object { - $ownerDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id - [PSCustomObject]@{ - displayName = $ownerDetail.displayName - Id = $ownerDetail.Id - UserPrincipalName = $ownerDetail.UserPrincipalName - UserType = $ownerDetail.UserType - accountEnabled = $ownerDetail.accountEnabled - } -} -$ownerDetails | Format-Table -Property displayName, Id, UserPrincipalName, UserType, accountEnabled -AutoSize -``` - -```Output -displayName Id UserPrincipalName UserType accountEnabled ------------ -- ----------------- -------- -------------- -Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc SawyerM@contoso.com Member True -Adele Vance ec5813fb-346e-4a33-a014-b55ffee3662b AdeleV@contoso.com Member True -``` - -This example demonstrates how to get the owners of an application in Microsoft Entra ID with more owner lookup details. - -### Example 3: Get all owners of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -``` - -This example demonstrates how to get the all owners of a specified application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. - -### Example 4: Get top two owners of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -Get-EntraApplicationOwner -ApplicationId $Application.ObjectId -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example demonstrates how to get the two owners of a specified application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) - -[Remove-EntraApplicationOwner](Remove-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md deleted file mode 100644 index f82b444191..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Get-EntraApplicationPasswordCredential -description: This article provides details on the Get-EntraApplicationPasswordCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential - -schema: 2.0.0 ---- - -# Get-EntraApplicationPasswordCredential - -## Synopsis - -Gets the password credential for an application. - -## Syntax - -```powershell -Get-EntraApplicationPasswordCredential - -ApplicationId - [-Property ] - [] -``` - -## Description - -The `Get-EntraApplicationPasswordCredential` cmdlet receives the password credentials for a Microsoft Entra ID application. Specify `ApplicationId` parameter to cmdlet receives the password credentials. - -## Examples - -### Example 1: Get password credential for specified application - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationPasswordCredential -ApplicationId $application.ObjectId -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- -{100, 101, 109, 111} demo 26/07/2025 10:34:40 Ap6 bbbbbbbb-1111-2222-3333-cccccccccccc 26/07/2024 10:34:40 -``` - -This example shows how to retrieve the password credential for specified application. - -- `-ApplicationId` specifies the ID of an application object in Microsoft Entra ID. - -## Parameters - -### -ApplicationId - -The ApplicationId of the application for which to get the password credential. Use `Get-EntraApplication` for more details. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md deleted file mode 100644 index 69df671ca9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: Get-EntraApplicationServiceEndpoint -description: This article provides details on the Get-EntraApplicationServiceEndpoint command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint - -schema: 2.0.0 ---- - -# Get-EntraApplicationServiceEndpoint - -## Synopsis - -Retrieve the service endpoint of an application. - -## Syntax - -```powershell -Get-EntraApplicationServiceEndpoint - -ApplicationId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraApplicationServiceEndpoint` cmdlet retrieves the service endpoint(s) of an application. - -The service endpoint entity contains service discovery information. The serviceEndpoints property of the Application entity is of type ServiceEndpoint. - -Other services can use the information stored in the ServiceEndpoint entity to find this service and its addressable endpoints. - -## Examples - -### Example 1: Retrieve the application service endpoint by ID - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -``` - -This example demonstrates how to retrieve service endpoint of the application that is specified through the Object ID parameter. - -`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. - -### Example 2: Get all service endpoints - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -All -``` - -This example demonstrates how to retrieve all service endpoints of a specified application. - -`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. - -### Example 3: Get top five service endpoints - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" -Get-EntraApplicationServiceEndpoint -ApplicationId $application.ObjectId -Top 5 -``` - -This example demonstrates how to retrieve five service endpoints of a specified application. - -`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. - -## Parameters - -### -All - -Return all service endpoints. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the object ID of the application for which the service endpoint is retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of results that are returned. -The default is 100. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md deleted file mode 100644 index 3ef510d43f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.md +++ /dev/null @@ -1,173 +0,0 @@ ---- -title: Get-EntraApplicationTemplate -description: This article provides details on the Get-EntraApplicationTemplate command. - - -ms.topic: reference -ms.date: 07/17/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationTemplate -schema: 2.0.0 ---- - -# Get-EntraApplicationTemplate - -## Synopsis - -Retrieve a list of applicationTemplate objects. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraApplicationTemplate - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraApplicationTemplate - -Id - [] -``` - -## Description - -The `Get-EntraApplicationTemplate` cmdlet allows users to get a list of all the application templates or a specific application template. - -## Examples - -### Example 1. Gets a list of application template objects - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplicationTemplate -``` - -This command gets all the application template objects - -### Example 2. Gets an application template object - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraApplicationTemplate -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -Id Categories Description --- ---------- ----------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {businessMgmt, productivity, projectManagement} Cube is perfect for businesses -``` - -This command gets an application template object for the given id. - -- `-Id` Specifies the unique identifier of an application template. - -## Parameters - -### -Id - -The unique identifier of an application template. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.ApplicationTemplate - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md deleted file mode 100644 index 74cdce0fb3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.md +++ /dev/null @@ -1,257 +0,0 @@ ---- -title: Get-EntraDeletedApplication -description: This article provides details on the Get-EntraDeletedApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedApplication - -schema: 2.0.0 ---- - -# Get-EntraDeletedApplication - -## Synopsis - -Retrieves the list of previously deleted applications. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDeletedApplication - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraDeletedApplication - [-SearchString ] - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDeletedApplication` cmdlet Retrieves the list of previously deleted applications. - -Note: Deleted security groups are permanently removed and cannot be retrieved. - -## Examples - -### Example 1: Get list of deleted applications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com -TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com -``` - -This cmdlet retrieves the list of deleted applications. - -### Example 2: Get list of deleted applications using All parameter - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -All -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com -TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com -``` - -This cmdlet retrieves the list of deleted applications using All parameter. - -### Example 3: Get top two deleted applications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -Top 2 -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com -``` - -This cmdlet retrieves top two deleted applications. - -### Example 4: Get deleted applications using SearchString parameter - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -SearchString 'TestApp1' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -``` - -This cmdlet retrieves deleted applications using SearchString parameter. - -### Example 5: Get deleted applications filter by display name - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication -Filter "DisplayName eq 'TestApp1'" -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com -``` - -This cmdlet retrieves deleted applications having specified display name. - -### Example 6: Get deleted applications with deletion age in days - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraDeletedApplication | - Select-Object DisplayName, Id, AppId, SignInAudience, PublisherDomain, DeletedDateTime, - @{Name='DeletionAgeInDays'; Expression={(Get-Date) - $_.DeletedDateTime | Select-Object -ExpandProperty Days}} | - Format-Table -AutoSize -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain DeletedDateTime DeletionAgeInDays ------------ -- ----- -------------- --------------- --------------- ----------------- -Entra PowerShell App aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com 9/18/2024 7:41:44 AM 1 -``` - -This cmdlet retrieves deleted applications with deletion age in days. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Retrieve only those deleted applications that satisfy the filter. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Retrieve only those applications that satisfy the -SearchString value. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -The maximum number of applications returned by this cmdlet. -The default value is 100. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md deleted file mode 100644 index 3f6ed52f43..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.md +++ /dev/null @@ -1,369 +0,0 @@ ---- -title: Get-EntraServicePrincipal -description: This article provides details on the Get-EntraServicePrincipal command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipal - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipal - -## Synopsis - -Gets a service principal. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraServicePrincipal - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetVague - -```powershell -Get-EntraServicePrincipal - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraServicePrincipal - -ServicePrincipalId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipal` cmdlet gets a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve all service principal from the directory - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -``` - -```Output -ObjectId AppId DisplayName --------- ----- ----------- -bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 Demo App -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22223333-cccc-4444-dddd-5555eeee6666 Demo Two App -dddddddd-3333-4444-5555-eeeeeeeeeeee 33334444-dddd-5555-eeee-6666ffff7777 ProjectWorkManagement -``` - -This example retrieves all service principals from the directory. - -### Example 2: Retrieve a service principal by ServicePrincipalId - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -ServicePrincipalId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -``` - -This command retrieves specific service principal. - -- `-ServicePrincipalId` Parameter specifies the ID of a service principal. - -### Example 3: Retrieve all service principals from the directory - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -All -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application -ProvisioningPowerBi cccccccc-2222-3333-4444-dddddddddddd 22223333-cccc-4444-dddd-5555eeee6666 Application -``` - -This example retrieves all service principals from the directory. - -### Example 4: Retrieve top two service principal from the directory - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Top 2 -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application -``` - -This command retrieves top two service principals from the directory. - -### Example 5: Get a service principal by display name - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "DisplayName eq 'M365 License Manager'" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -``` - -This example gets a service principal by its display name. - -### Example 6: Retrieve a list of all service principal, which has a display name that contains "M365 License Manager" - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -SearchString 'M365 License Manager' -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application -``` - -This example gets a list of service principal, which has the specified display name. - -### Example 7: Retrieve all Enterprise apps - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryIntegratedApp')" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Enterprise App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -Enterprise App2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application -``` - -This example demonstrates how to retrieve all enterprise apps. - -### Example 8: Retrieve all App proxy apps - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryOnPremApp')" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -App proxy 1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -App proxy 2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application -``` - -This example demonstrates how to retrieve all app proxy apps. - -### Example 9: Retrieve all disabled apps - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "accountEnabled eq false" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Disabled App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -``` - -This example demonstrates how to retrieve all disabled apps. - -### Example 10: Retrieve all Global Secure Access apps - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -Filter "tags/Any(x: x eq 'PrivateAccessNonWebApplication') or tags/Any(x: x eq 'NetworkAccessManagedApplication')" -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Global secure access app 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -``` - -This example demonstrates how to retrieve all Global secure access apps. - -### Example 11: List all applications without user assignment - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -Get-EntraServicePrincipal -All | Where-Object {$_.appRoleAssignmentRequired -ne 'true'} -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -App without user assignment 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application -``` - -This example demonstrates how to retrieve all applications without user assignment. - -### Example 12: List all SAML application details - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "PreferredSingleSignOnMode eq 'saml'" -$servicePrincipal | Select-Object Id, DisplayName, AccountEnabled, AppId, PreferredSingleSignOnMode, AppRoleAssignmentRequired, SignInAudience, NotificationEmailAddresses, PreferredTokenSigningKeyEndDateTime, PreferredTokenSigningKeyValid, ReplyUrls,LoginUrl, LogoutUrl | Format-Table -AutoSize -``` - -```Output -Id DisplayName AccountEnabled AppId PreferredSingleSignOnMode AppRoleAssignmentRequired SignInAudience NotificationEmailAddresses --- ----------- -------------- ----- ------------------------- ------------------------- -------------- -------------- -00001111-aaaa-2222-bbbb-3333cccc4444 SAML App True 33334444-dddd-5555-eeee-6666ffff7777 saml True AzureADMyOrg {admin@Contoso} -``` - -This example demonstrates how to retrieve all SAML application details. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) - -[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md deleted file mode 100644 index 891274acdb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: Get-EntraServicePrincipalAppRoleAssignedTo -description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignedTo command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalAppRoleAssignedTo - -## Synopsis - -Gets app role assignments for this app or service, granted to users, groups and other service principals. - -## Syntax - -```powershell -Get-EntraServicePrincipalAppRoleAssignedTo - -ServicePrincipalId - [-All ] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalAppRoleAssignedTo` cmdlet gets app role assignments for this app or service, granted to users, groups and other service principals. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. - -- Directory Synchronization Accounts -- Directory Writer -- Hybrid Identity Administrator -- Identity Governance Administrator -- Privileged Role Administrator -- User Administrator -- Application Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Retrieve the app role assignments - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId - Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipalId -``` - -This example shows how to get app role assignments for an app or service, granted to users, groups and other service principals. - -- The first command gets the ID of a service principal and stores it in the $ServicePrincipalId variable. - -- The second command gets the app role assignments for the service principal granted to users, groups and other service principals. - -### Example 2: Get all app role assignments - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -All -``` - -```output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 -``` - -This command gets the all app role assignments for the service principal granted to users, groups and other service principals. - -### Example 3: Get five app role assignments - -```powershell - Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId 00001111-aaaa-2222-bbbb-3333cccc4444 -Top 5 -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 -``` - -This command gets the five app role assignments for the service principal granted to users, groups and other service principals. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -`Get-EntraServiceAppRoleAssignedTo` is an alias for `Get-EntraServicePrincipalAppRoleAssignedTo`. - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md deleted file mode 100644 index 971849856a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.md +++ /dev/null @@ -1,192 +0,0 @@ ---- -title: Get-EntraServicePrincipalAppRoleAssignment -description: This article provides details on the Get-EntraServicePrincipalAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalAppRoleAssignment - -## Synopsis - -Gets a service principal application role assignment. - -## Syntax - -```powershell -Get-EntraServicePrincipalAppRoleAssignment - -ServicePrincipalId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalAppRoleAssignment` cmdlet gets a role assignment for a service principal application in Microsoft Entra ID. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. -- Directory Synchronization Accounts -- Directory Writer -- Hybrid Identity Administrator -- Identity Governance Administrator -- Privileged Role Administrator -- User Administrator -- Application Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Retrieve the application role assignments for a service principal - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - $ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId - Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipalId -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 29-02-2024 05:53:00 Ask HR aaaaaaaa-bbbb-cccc-1111-222222222222 Group M365 License Manager -``` - -This command gets application role assignments for specified service principal. - -- The first command gets the ID of a service principal by using the Get-EntraServicePrincipal (./Get-EntraServicePrincipal.md) cmdlet. The command stores the ID in the $ServicePrincipalId variable. - -- The second command gets the application role assignments for the service principal in identified by $ServicePrincipalId. - -### Example 2: Retrieve all application role assignments for a service principal - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:39 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 -``` - -This command gets all application role assignments for specified service principal. - -### Example 3: Retrieve the top five application role assignments for a service principal - -```powershell - Connect-Entra -Scopes 'Application.Read.All' - Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 3 -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:41 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:38 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 - 3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 20/10/2023 17:03:37 Entra-App-Testing aaaaaaaa-bbbb-cccc-1111-222222222222 -``` - -This command gets three application role assignments for specified service principal. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`Get-EntraServiceAppRoleAssignment` is an alias for `Get-EntraServicePrincipalAppRoleAssignment`. - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) - -[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md deleted file mode 100644 index 8a607194b9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: Get-EntraServicePrincipalCreatedObject -description: This article provides details on the Get-EntraServicePrincipalCreatedObject command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalCreatedObject - -## Synopsis - -Get objects created by a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalCreatedObject - -ServicePrincipalId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalCreatedObject` cmdlet gets an object created by a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the objects that created by a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -This example gets objects created by the service principal identified by $ServicePrincipalId. You can use the command `Get-EntraServicePrincipal` to get service principal ID. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -### Example 2: Retrieve the all objects created by a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All -``` - -This example demonstrates how to get the all object created by a specified service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -### Example 3: Retrieve the top two objects created by a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 -``` - -This example demonstrates how to get the top two object created by a specified service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md deleted file mode 100644 index a236c7769c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -title: Get-EntraServicePrincipalDelegatedPermissionClassification -description: This article provides details on the Get-EntraServicePrincipalDelegatedPermissionClassification command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalDelegatedPermissionClassification - -## Synopsis - -Retrieve the delegated permission classification objects on a service principal. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraServicePrincipalDelegatedPermissionClassification - -ServicePrincipalId - [-Filter ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraServicePrincipalDelegatedPermissionClassification - -ServicePrincipalId - -Id - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalDelegatedPermissionClassification` cmdlet retrieves the delegated permission classifications from a service principal. - -## Examples - -### Example 1: Get a list of delegated permission classifications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId -} -Get-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -```Output -Id Classification PermissionId PermissionName --- -------------- ------------ -------------- -bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All -cccccccc-8888-9999-0000-dddddddddddd low dddd3333-ee44-5555-66ff-777777aaaaaa profile -``` - -This command retrieves all delegated permission classifications from the service principal. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. - -### Example 2: Get a delegated permission classifications - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - Id = '5XBeIKarUkypdm0tRsSAQwE' -} -Get-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -```Output -Id Classification PermissionId PermissionName --- -------------- ------------ -------------- -bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All -``` - -This command retrieves the delegated permission classification by Id from the service principal. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. -- `-Id` parameter specifies the delegated permission classification object Id. - -### Example 3: Get a delegated permission classification with filter - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - Filter = "PermissionName eq 'Sites.Read.All'" -} -Get-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -```Output -Id Classification PermissionId PermissionName --- -------------- ------------ -------------- -bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All -``` - -This command retrieves the filtered delegated permission classifications from the service principal. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraServicePrincipal` to get more details. -- `-Id` parameter specifies the delegated permission classification object Id. - -## Parameters - -### -ServicePrincipalId - -The unique identifier of a service principal object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a delegated permission classification object ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.DelegatedPermissionClassification - -## Notes - -## Related Links - -[Remove-EntraServicePrincipalDelegatedPermissionClassification](Remove-EntraServicePrincipalDelegatedPermissionClassification.md) - -[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md deleted file mode 100644 index 3dcf28a491..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Get-EntraServicePrincipalKeyCredential -description: This article provides details on the Get-EntraServicePrincipalKeyCredential Command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalKeyCredential - -## Synopsis - -Get key credentials for a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalKeyCredential - -ServicePrincipalId - [] -``` - -## Description - -The `Get-EntraServicePrincipalKeyCredential` cmdlet gets the key credentials for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the key credential of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage -------------------- ----------- ----------- --- ----- ------------- ---- ----- - 08-02-2025 09:57:08 68b45e27-fef8-4f0d-bc7a-76bd949c16d1 08-02-2024 09:57:08 Symmetric Sign -``` - -This example retrieves the key credentials for specified service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal object Id. - -- `-ServicePrincipalId` parameter specifies the service principal Id. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of the application for which to get the password credential. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) - -[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md deleted file mode 100644 index 4fcb1f99c2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.md +++ /dev/null @@ -1,178 +0,0 @@ ---- -title: Get-EntraServicePrincipalMembership -description: This article provides details on the Get-EntraServicePrincipalMembership command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalMembership - -## Synopsis - -Get a service principal membership. - -## Syntax - -```powershell -Get-EntraServicePrincipalMembership - -ServicePrincipalId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalMembership` cmdlet gets the memberships of a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the memberships of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -11112222-aaaa-3333-bbbb-4444cccc5555 -``` - -This cmdlet retrieves a specified service principal memberships in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal ID. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -### Example 2: Retrieve all memberships of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -11112222-aaaa-3333-bbbb-4444cccc5555 -22223333-cccc-4444-dddd-5555eeee6666 -33334444-dddd-5555-eeee-6666ffff7777 -``` - -This command gets all memberships of a specified service principal. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -### Example 3: Retrieve top two memberships of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -11112222-aaaa-3333-bbbb-4444cccc5555 -22223333-cccc-4444-dddd-5555eeee6666 - -``` - -This command gets top two memberships of a specified service principal. - -- `-ServicePrincipalId` parameter specifies the service principal ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md deleted file mode 100644 index aaa8e79db5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: Get-EntraServicePrincipalOAuth2PermissionGrant -description: This article provides details on the Get-EntraServicePrincipalOAuth2PermissionGrant command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalOAuth2PermissionGrant - -## Synopsis - -Gets an oAuth2PermissionGrant object. - -## Syntax - -```powershell -Get-EntraServicePrincipalOAuth2PermissionGrant --ServicePrincipalId -[-All] -[-Top ] -[-Property ] -[] -``` - -## Description - -The `Get-EntraServicePrincipalOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the OAuth2 permission grants of a service principal - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -ServicePrincipalId = (Get-EntraServicePrincipal -Top 1).ObjectId -Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId $ServicePrincipalId -``` - -```output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... -``` - -This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. - -### Example 2: Get all OAuth2 permission grants of a service principal - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -All -``` - -```Output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals A1bC2dE3f... openid profile U... -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 996d39aa-fdac-4d97-aa3d-c81fb47362ac aaaaaaaa-bbbb-cccc-1111-222222222222 PrivilegedAccess... -``` - -This example demonstrates how to get all oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. - -### Example 3: Get two OAuth2 permission grants of a service principal - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId '00001111-aaaa-2222-bbbb-3333cccc4444' -Top 2 -``` - -```Output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... -A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... -``` - -This example demonstrates how to get top two oAuth2PermissionGrant object for a service principal in Microsoft Entra ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md deleted file mode 100644 index 890f1d9a67..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: Get-EntraServicePrincipalOwnedObject -description: This article provides details on the Get-EntraServicePrincipalOwnedObject Command. - - -ms.topic: reference -ms.date: 07/22/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalOwnedObject - -## Synopsis - -Gets an object owned by a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalOwnedObject - [-All] - -ServicePrincipalId - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalOwnedObject` cmdlet retrieves an object owned by a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the owned objects of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -The command retrieves the owned objects of a service principal. - -- `-ServicePrincipalId` Parameter specifies the ID of a service principal. - -### Example 2: Retrieve the all owned objects of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipalId = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").ObjectId -Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipalId -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example retrieves an object owned by a service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get service principal Id. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. - -### Example 2: Retrieve all owned objects of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -The command receives the all owned objects of a service principal. - -- `-ServicePrincipalId` Parameter specifies the ID of a service principal. - -### Example 3: Retrieve top one owned object of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 1 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example retrieves the top one owned object of a specified service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md deleted file mode 100644 index 2270323cb2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.md +++ /dev/null @@ -1,217 +0,0 @@ ---- -title: Get-EntraServicePrincipalOwner -description: This article provides details on the Get-EntraServicePrincipalOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalOwner - -## Synopsis - -Get the owner of a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalOwner - -ServicePrincipalId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraServicePrincipalOwner` cmdlet gets the owners of a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the owner of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example gets the owners of a specified service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. - -### Example 2: Retrieve all the owners of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This command gets all the owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. - -### Example 3: Retrieve top two owners of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This command gets top two owners of a service principal. You can use the command `Get-EntraServicePrincipal` to get service principal object ID. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. - -### Example 4: Retrieve service principal owner details - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -# Get the owners of the service principal -$owners = Get-EntraServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All -$result = @() - -# Loop through each owner and get their UserPrincipalName and DisplayName -foreach ($owner in $owners) { - $userId = $owner.Id - $user = Get-EntraUser -UserId $userId - $userDetails = [PSCustomObject]@{ - Id = $owner.Id - UserPrincipalName = $user.UserPrincipalName - DisplayName = $user.DisplayName - } - $result += $userDetails -} - -# Output the result in a table format -$result | Format-Table -AutoSize -``` - -```Output -Id UserPrincipalName DisplayName --- ----------------- ----------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AlexW@contoso.com Alex Wilber -bbbbbbbb-1111-2222-3333-cccccccccccc AdeleV@contoso.com Adele Vance -``` - -This example shows how to retrieve more details of a service principal owner such as displayName, userPrincipalName. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md deleted file mode 100644 index 32f7613b31..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Get-EntraServicePrincipalPasswordCredential -description: This article provides details on the Get-EntraServicePrincipalPasswordCredential Command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential - -schema: 2.0.0 ---- - -# Get-EntraServicePrincipalPasswordCredential - -## Synopsis - -Get credentials for a service principal. - -## Syntax - -```powershell -Get-EntraServicePrincipalPasswordCredential - -ServicePrincipalId - [] -``` - -## Description - -The `Get-EntraServicePrincipalPasswordCredential` cmdlet gets the password credentials for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the password credential of a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId $ServicePrincipal.ObjectId -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - 17-04-2025 07:32:41 gjW bdf6a3df-cc9b-4612-b948-e32804ee88f7 17-04-2024 07:32:41 - 21-03-2025 08:12:08 4fl 7f4414ec-8f72-49a8-b949-70d635899656 21-03-2024 08:12:08 - 12-12-2024 08:39:07 mjl 0fff6b21-0a20-4f7c-93ba-26ed9b648344 12-12-2023 08:39:10 -``` - -This example retrieves the password credentials for specified service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the object ID of a service principal. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of the service principal for which to get password credentials. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) - -[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md deleted file mode 100644 index f8b75c0061..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplication.md +++ /dev/null @@ -1,490 +0,0 @@ ---- -title: New-EntraApplication -description: This article provides details on the New-EntraApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplication - -schema: 2.0.0 ---- - -# New-EntraApplication - -## Synopsis - -Creates (registers) a new application object. - -## Syntax - -```powershell -New-EntraApplication - -DisplayName - [-AddIns ] - [-PasswordCredentials ] - [-TokenEncryptionKeyId ] - [-SignInAudience ] - [-KeyCredentials ] - [-ParentalControlSettings ] - [-IdentifierUris ] - [-AppRoles ] - [-PublicClient ] - [-InformationalUrl ] - [-Tags ] - [-Api ] - [-OptionalClaims ] - [-GroupMembershipClaims ] - [-Web ] - [-IsFallbackPublicClient ] - [-IsDeviceOnlyAuthSupported ] - [-RequiredResourceAccess ] - [] -``` - -## Description - -Creates (registers) a new application object. Specify the `DisplayName` parameter to create a new application. - -## Examples - -### Example 1: Create an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -New-EntraApplication -DisplayName 'My new application' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com -``` - -This command creates an application in Microsoft Entra ID. - -### Example 2: Create an application using IdentifierUris parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -New-EntraApplication -DisplayName 'My new application' -IdentifierUris 'https://mynewapp.contoso.com' -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com -``` - -This command creates an application in Microsoft Entra ID. - -### Example 3: Create an application using AddIns parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$addin = New-Object Microsoft.Open.MSGraph.Model.AddIn -$addin.Type = 'testtype' -$addinproperties = New-Object System.collections.Generic.List[Microsoft.Open.MSGraph.Model.KeyValue] -$addinproperties.Add([Microsoft.Open.MSGraph.Model.KeyValue]@{ Key = "key"; Value = "value" }) -$addin.Properties = $addinproperties -New-EntraApplication -DisplayName 'My new application' -AddIns $addin -``` - -```Output -DisplayName Id AppId SignInAudience PublisherDomain ------------ -- ----- -------------- --------------- -My new application dddd3333-ee44-5555-66ff-777777aaaaaa 22223333-cccc-4444-dddd-5555eeee6666 AzureADMyOrg contoso.com -``` - -This command creates an application in Microsoft Entra ID. - -## Parameters - -### -AddIns - -Defines custom behavior that a consuming service can use to call an app in specific contexts. - -For example, applications that can render file streams may set the addIns property for its "FileHandler" functionality. - -This will let services like Office 365 call the application in the context of a document the user is working on. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Api - -Specifies settings for an application that implements a web API. - -```yaml -Type: ApiApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppRoles - -The collection of application roles that an application might declare. -These roles can be assigned to users, groups, or service principals. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupMembershipClaims - -Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentifierUris - -User-defined URI(s) that uniquely identify a Web application within its Microsoft Entra ID tenant, or within a verified custom domain (see "Domains" tab in the Azure classic portal) if the application is multi-tenant. - -The first element is populated from the Web application's "APP ID URI" field if updated via the Azure classic portal (or respective Microsoft Entra ID PowerShell cmdlet parameter). - -Extra URIs can be added via the application manifest; see Understanding the Microsoft Entra ID Application Manifest for details. - -This collection is also used to populate the Web application's servicePrincipalNames collection. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InformationalUrl - -Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. - -The terms of service and privacy statement are surfaced to users through the user consent experience. - -```yaml -Type: InformationalUrl -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsDeviceOnlyAuthSupported - -Specifies if the application supports authentication using a device token. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsFallbackPublicClient - -Specifies the fallback application type as public client, such as an installed application running on a mobile device. - -The default value is false that means the fallback application type is confidential client such as web app. - -There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). - -In those cases Microsoft Entra ID interprets the application type based on the value of this property. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -KeyCredentials - -The collection of key credentials associated with the application. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OptionalClaims - -Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. - -```yaml -Type: OptionalClaims -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ParentalControlSettings - -Specifies parental control settings for an application. - -```yaml -Type: ParentalControlSettings -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordCredentials - -The collection of password credentials associated with the application. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublicClient - -Specifies whether this application is a public client (such as an installed application running on a mobile device). -Default is false. - -```yaml -Type: PublicClientApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredResourceAccess - -Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. - -This pre-configuration of required resource access drives the consent experience. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignInAudience - -Specifies what Microsoft accounts are supported for the current application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Custom strings that can be used to categorize and identify the application. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TokenEncryptionKeyId - -Specifies the keyId of a public key from the keyCredentials collection. - -When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. - -The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Web - -Specifies settings for a web application. - -```yaml -Type: WebApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### Boolean - -### Microsoft.Open.MSGraph.Model.ApiApplication - -### Microsoft.Open.MSGraph.Model.InformationalUrl - -### Microsoft.Open.MSGraph.Model.OptionalClaims - -### Microsoft.Open.MSGraph.Model.ParentalControlSettings - -### Microsoft.Open.MSGraph.Model.PublicClientApplication - -### Microsoft.Open.MSGraph.Model.WebApplication - -### String - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.Add-in] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] - -### System.Collections.Generic.List`1[System.String] - -### System. Nullable`1[System.Boolean] - -## Outputs - -### Microsoft.Open.MSGraph.Model.MsApplication - -## Notes - -- See more details - - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[Remove-EntraApplication](Remove-EntraApplication.md) - -[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md deleted file mode 100644 index 3635b5b70b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: New-EntraApplicationExtensionProperty -description: This article provides details on the New-EntraApplicationExtensionProperty command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty - -schema: 2.0.0 ---- - -# New-EntraApplicationExtensionProperty - -## Synopsis - -Creates an application extension property. - -## Syntax - -```powershell -New-EntraApplicationExtensionProperty - -ApplicationId - -Name - [-DataType ] - [-TargetObjects ] - [] -``` - -## Description - -The `New-EntraApplicationExtensionProperty` cmdlet creates an application extension property for an object in Microsoft Entra ID. - -## Examples - -### Example 1: Create an extension property - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -$params = @{ - ApplicationId = $Application.ObjectId - Name = 'NewAttribute' -} - -New-EntraApplicationExtensionProperty @params -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ---------------------- ---- ------------- - 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} -``` - -This command creates an application extension property of the string type for the specified object. - -- `-ApplicationId` parameter specifies the unique identifier of an application. -- `-Name` parameter specifies the name of the extension property. - -### Example 2: Create an extension property with data type parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -$params = @{ - ApplicationId = $Application.ObjectId - Name = 'NewAttribute' - DataType = 'Boolean' -} - -New-EntraApplicationExtensionProperty @params -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ---------------------- ---- ------------- - 11112222-bbbb-3333-cccc-4444dddd5555 My new test app Boolean False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} -``` - -This command creates an application extension property of the specified data type for the specified object. - -- `-ApplicationId` parameter specifies the unique identifier of an application. -- `-Name` parameter specifies the name of the extension property. -- `-DataType` parameter specifies the data type of the value the extension property can hold. - -### Example 3: Create an extension property with targets parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -$targets = New-Object System.Collections.Generic.List[System.String] -$targets.Add('User') -$params = @{ - ApplicationId = $Application.ObjectId - Name = 'NewAttribute' - TargetObjects = $targets -} - -New-EntraApplicationExtensionProperty @params -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ---------------------- ---- ------------- - 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {User} -``` - -The example shows how to create an application extension property with the specified target objects for the specified object. - -- `-ApplicationId` parameter specifies the unique identifier of an application. -- `-Name` parameter specifies the name of the extension property. -- `-TargetObjects` parameter specifies the Microsoft Graph resources that use the extension property. All values must be in PascalCase. - -## Parameters - -### -DataType - -Specifies the data type of the value the extension property can hold. Following values are supported. - -- Binary - 256 bytes maximum -- Boolean -- DateTime - Must be specified in ISO 8601 format. Will be stored in UTC. -- Integer - 32-bit value. -- LargeInteger - 64-bit value. -- String - 256 characters maximum - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Specifies the name of the extension property. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies a unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -TargetObjects - -Specifies the Microsoft Graph resources that can use the extension property. All values must be in PascalCase. The following values are supported. - -- User -- Group -- AdministrativeUnit -- Application -- Device -- Organization - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) - -[Remove-EntraApplicationExtensionProperty](Remove-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md deleted file mode 100644 index 3c8821a907..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: New-EntraApplicationFromApplicationTemplate -description: This article provides details on the New-EntraApplicationFromApplicationTemplate command. - - -ms.service: entra -ms.topic: reference -ms.date: 07/10/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate -schema: 2.0.0 ---- - -# New-EntraApplicationFromApplicationTemplate - -## Synopsis - -Add an instance of an application from the Microsoft Entra application gallery into your directory. - -## Syntax - -```powershell -New-EntraApplicationFromApplicationTemplate - -Id - -DisplayName - [] -``` - -## Description - -The `New-EntraApplicationFromApplicationTemplate` cmdlet adds an instance of an application from the Microsoft Entra application gallery into your directory. - -The application template with ID `8adf8e6e-67b2-4cf2-a259-e3dc5476c621` can be used to add a non-gallery app that you can configure different single-sign on (SSO) modes like SAML SSO and password-based SSO. - -## Examples - -### Example 1: Creates an application from application template - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - DisplayName = 'ApplicationTemplate' -} -New-EntraApplicationFromApplicationTemplate @params -``` - -```Output -@odata.context servicePrincipal --------------- ---------------- -https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.applicationServicePrincipal @{oauth2PermissionScopes=System.Object[]; servicePrincipalType=Application; displ...} -``` - -This command instantiates a new application based on application template referenced by the ID. - -- `-Id` specifies Application TemplateId. -- `-DisplayName` specifies application template display name. - -## Parameters - -### -Id - -The Id parameter specifies Application TemplateId. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DisplayName - -Application template display name. - -```yaml -Type: System.ApplicationTemplateDisplayName -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.ApplicationTemplateCopy - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md deleted file mode 100644 index 0f5ed02cf9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: New-EntraApplicationKey -description: This article provides details on the New-EntraApplicationKey command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKey - -schema: 2.0.0 ---- - -# New-EntraApplicationKey - -## Synopsis - -Adds a new key to an application. - -## Syntax - -```powershell -New-EntraApplicationKey - -ObjectId - -KeyCredential - -PasswordCredential ] - -Proof - [] -``` - -## Description - -Adds a new key to an application. - -## Examples - -### Example 1: Add a key credential to an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$app = Get-EntraApplication -Filter "DisplayName eq ''" -$params = @{ - ObjectId = $app.ObjectId - KeyCredential = @{ key=[System.Convert]::FromBase64String('{base64cert}') } - PasswordCredential = @{ DisplayName = 'mypassword' } - Proof = '{token}' -} - -New-EntraApplicationKey @params -``` - -This command adds a key credential to an specified application. - -- `-ObjectId` parameter specifies the unique identifier of an application. -- `-KeyCredential` parameter specifies the application key credential to add. -- `-PasswordCredential` parameter specifies the application password credential to add. -- `-Proof` parameter specifies the signed JWT token used as a proof of possession of the existing keys. - -## Parameters - -### -KeyCredential - -The application key credential to add. - -NOTES: keyId value should be null. - -```yaml -Type: KeyCredential -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -The unique identifier of the application object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PasswordCredential - -The application password credential to add. - -NOTES: keyId value should be null. - -```yaml -Type: PasswordCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proof - -A signed JWT token used as a proof of possession of the existing keys. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -### Microsoft.Open.MSGraph.Model.KeyCredential - -### Microsoft.Open.MSGraph.Model.PasswordCredential - -## Outputs - -### Microsoft.Open.MSGraph.Model.KeyCredential - -## Notes - -## Related Links - -[Remove-EntraApplicationKey](Remove-EntraApplicationKey.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md deleted file mode 100644 index 4d347c6251..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.md +++ /dev/null @@ -1,258 +0,0 @@ ---- -title: New-EntraApplicationKeyCredential -description: This article provides details on the New-EntraApplicationKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential - -schema: 2.0.0 ---- - -# New-EntraApplicationKeyCredential - -## Synopsis - -Creates a key credential for an application. - -## Syntax - -```powershell -New-EntraApplicationKeyCredential - -ApplicationId - [-CustomKeyIdentifier ] - [-Type ] - [-Usage ] - [-Value ] - [-EndDate ] - [-StartDate ] - [] -``` - -## Description - -The `New-EntraApplicationKeyCredential` cmdlet creates a key credential for an application. - -An application can use this command along with `Remove-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. - -As part of the request validation, proof of possession of an existing key is verified before the action can be performed. - -## Examples - -### Example 1: Create a new application key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' - -$AppId = (Get-EntraApplication -Top 1).Objectid -$params = @{ - ApplicationId = $AppId - CustomKeyIdentifier = 'EntraPowerShellKey' - StartDate = '2024-03-21T14:14:14Z' - Type = 'Symmetric' - Usage = 'Sign' - Value = '' -} - -New-EntraApplicationKeyCredential @params -``` - -```Output -CustomKeyIdentifier : {84, 101, 115, 116} -EndDate : 2024-03-21T14:14:14Z -KeyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 -StartDate : 2025-03-21T14:14:14Z -Type : Symmetric -Usage : Sign -Value : {49, 50, 51} -``` - -This example shows how to create an application key credential. - -- `-ApplicationId` Specifies a unique ID of an application -- `-CustomKeyIdentifier` Specifies a custom key ID. -- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. -- `-Type` Specifies the type of the key. -- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. -- `-Value` Specifies the value for the key. - -You can use the `Get-EntraApplication` cmdlet to retrieve the application Object ID. - -### Example 2: Use a certificate to add an application key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' - -$cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 #create a new certificate object -$cer.Import('C:\Users\ContosoUser\appcert.cer') -$bin = $cer.GetRawCertData() -$base64Value = [System.Convert]::ToBase64String($bin) -$bin = $cer.GetCertHash() -$base64Thumbprint = [System.Convert]::ToBase64String($bin) -$keyid = [System.Guid]::NewGuid().ToString() - -$params = @{ - ApplicationId = '22223333-cccc-4444-dddd-5555eeee6666' - CustomKeyIdentifier = $base64Thumbprint - Type = 'AsymmetricX509Cert' - Usage = 'Verify' - Value = $base64Value - StartDate = $cer.GetEffectiveDateString() - EndDate = $cer.GetExpirationDateString() -} - -New-EntraApplicationKeyCredential @params -``` - -This example shows how to create an application key credential. - -- `-ApplicationId` Specifies a unique ID of an application -- `-CustomKeyIdentifier` Specifies a custom key ID. -- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. -- `-EndDate` Specifies the time when the key becomes invalid as a DateTime object. -- `-Type` Specifies the type of the key. -- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. -- `-Value` Specifies the value for the key. - -## Parameters - -### -CustomKeyIdentifier - -Specifies a custom key ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -EndDate - -Specifies the time when the key becomes invalid as a DateTime object. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies a unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -StartDate - -Specifies the time when the key becomes valid as a DateTime object. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Type - -Specifies the type of the key. - -```yaml -Type: KeyType -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Usage - -Specifies the key usage. - -- `AsymmetricX509Cert`: The usage must be `Verify`. -- `X509CertAndPassword`: The usage must be `Sign`. - -```yaml -Type: KeyUsage -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Value - -Specifies the value for the key. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) - -[Remove-EntraApplicationKeyCredential](Remove-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md deleted file mode 100644 index 155f17e3fe..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -title: New-EntraApplicationPassword -description: This article provides details on the New-EntraApplicationPassword command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPassword - -schema: 2.0.0 ---- - -# New-EntraApplicationPassword - -## Synopsis - -Adds a strong password to an application. - -## Syntax - -```powershell -New-EntraApplicationPassword - -ObjectId - -PasswordCredential - [] -``` - -## Description - -Adds a strong password to an application. - -## Examples - -### Example 1: Add a password to an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' -$Application = Get-EntraBetaApplication -SearchString '' -$PasswordCredential= New-Object Microsoft.Open.MSGraph.Model.PasswordCredential -$PasswordCredential.StartDateTime = Get-Date -Year 2024 -Month 12 -Day 28 -$PasswordCredential.EndDateTime = Get-Date -Year 2025 -Month 2 -Day 28 -$PasswordCredential.KeyId = 'bbbbbbbb-1c1c-2d2d-3e3e-444444444444' -$PasswordCredential.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('a') -$PasswordCredential.Hint = 'b' -$params = @{ - ObjectId = $Application.ObjectId - PasswordCredential = $PasswordCredential -} - -New-EntraApplicationPassword @params -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- -{97} 2/28/2025 7:05:39 AM nnW bbbbbbbb-1c1c-2d2d-3e3e-444444444444 12/28/2024 7:05:39 AM -``` - -This example adds a password to the specified application. - -- `-ObjectId` parameter specifies the unique identifier of the application. -- `-PasswordCredential` parameter specifies a password credential associated with an application or a service principal. - -## Parameters - -### -ObjectId - -The unique identifier of the application object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PasswordCredential - -Represents a password credential associated with an application or a service principal. - -```yaml -Type: PasswordCredential -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -### Microsoft.Open.MSGraph.Model.PasswordCredential - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraApplicationPassword](Remove-EntraApplicationPassword.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md deleted file mode 100644 index 55f8da01e5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: New-EntraApplicationPasswordCredential -description: This article provides details on the New-EntraApplicationPasswordCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential - -schema: 2.0.0 ---- - -# New-EntraApplicationPasswordCredential - -## Synopsis - -Creates a password credential for an application. - -## Syntax - -```powershell -New-EntraApplicationPasswordCredential - -ApplicationId - [-CustomKeyIdentifier ] - [-StartDate ] - [-EndDate ] - [] -``` - -## Description - -The `New-EntraApplicationPasswordCredential` cmdlet creates a password credential for an application in Microsoft Entra ID. - -## Examples - -### Example 1: Create a password credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -New-EntraApplicationPasswordCredential -ApplicationId $application.Id -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM -``` - -This command creates new password credential for specified application. - -- `-ApplicationId` Specifies the ID of an application. - -### Example 2: Create a password credential using CustomKeyIdentifier parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -$params = @{ - ApplicationId = $application.Id - CustomKeyIdentifier = '' -} - -New-EntraApplicationPasswordCredential @params -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- -100 101 109 111 demo 8/2/2026 11:47:53 AM 8Mw tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 8/2/2024 11:47:53 AM -``` - -This command creates new password credential for specified application. - -- `-ApplicationId` Specifies the ID of an application. -- `-CustomKeyIdentifier` Speicifies unique binary identifier. - -### Example 3: Create a password credential using StartDate parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -$params = @{ - ApplicationId = $application.Id - StartDate = (Get-Date).AddYears(0) - CustomKeyIdentifier = '' -} - -New-EntraApplicationPasswordCredential @params -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM -``` - -This command creates new password credential for specified application. - -- `-ApplicationId` Specifies the ID of an application. -- `-StartDate` Speicifies the date and time at which the password becomes valid. - -### Example 4: Create a password credential using EndDate parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -$params = @{ - ApplicationId = $application.Id - EndDate = (Get-Date).AddYears(2) - CustomKeyIdentifier = '' -} - -New-EntraApplicationPasswordCredential @params -``` - -```Output -CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime -------------------- ----------- ----------- ---- ----- ---------- ------------- - 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM -``` - -This command creates new password credential for specified application. - -- `-ApplicationId` Specifies the ID of an application. -- `-EndDate` Speicifies The date and time at which the password expires. - -## Parameters - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -CustomKeyIdentifier - -A unique binary identifier. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -StartDate - -The date and time at which the password becomes valid. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -EndDate - -The date and time at which the password expires. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) - -[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md deleted file mode 100644 index 278ad45ebb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.md +++ /dev/null @@ -1,406 +0,0 @@ ---- -title: New-EntraServicePrincipal -description: This article provides details on the New-EntraServicePrincipal command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipal - -schema: 2.0.0 ---- - -# New-EntraServicePrincipal - -## Synopsis - -Creates a service principal. - -## Syntax - -```powershell -New-EntraServicePrincipal - -AppId - [-KeyCredentials ] - [-Homepage ] - [-LogoutUrl ] - [-ServicePrincipalType ] - [-AlternativeNames ] - [-PasswordCredentials ] - [-Tags ] - [-AccountEnabled ] - [-ServicePrincipalNames ] - [-AppRoleAssignmentRequired ] - [-DisplayName ] - [-ReplyUrls ] - [] -``` - -## Description - -Create a new service Principal. - -For multitenant apps, the calling user must also be in at least one of the following Microsoft Entra roles: - -- Application Administrator -- Cloud Application Administrator - -For single-tenant apps where the calling user is a non-admin user but is the owner of the backing application, the user must have the Application Developer role. - -## Examples - -### Example 1: Create a new service principal using DisplayName, AccountEnabled, Tags, and AppRoleAssignmentRequired - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") -$params = @{ - AccountEnabled = $true - AppId = $MyApp.AppId - AppRoleAssignmentRequired = $true - DisplayName = $MyApp.DisplayName - Tags = {WindowsAzureActiveDirectoryIntegratedApp} -} -New-EntraServicePrincipal @params -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application -``` - -This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. - -The tag `-Tags {WindowsAzureActiveDirectoryIntegratedApp}` is used to have this service principal show up in the list of Integrated Applications in the Admin Portal. - -- `-AccountEnabled` parameter specifies true if the service principal account is enabled, otherwise false. -- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). -- `-DisplayName` parameter specifies the service principal display name. -- `-AppRoleAssignmentRequired` parameter indicates whether an application role assignment is required. - -### Example 2: Create a new service principal using Homepage, logoutUrl, and ReplyUrls - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") -$params = @{ - AppId = $MyApp.AppId - Homepage = 'https://localhost/home' - LogoutUrl = 'htpp://localhost/logout' - ReplyUrls = 'https://localhost/redirect' -} -New-EntraServicePrincipal @params -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application -``` - -This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. - -- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). -- `-Homepage` parameter specifies the home page or landing page of the application. -- `-LogoutUrl` parameter specifies the logout URL. -- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. - -### Example 3: Create a new service principal by KeyCredentials - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential -$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') -$startdate = Get-Date -Year 2023 -Month 10 -Day 23 -$creds.StartDate = $startdate -$creds.Type = 'Symmetric' -$creds.Usage = 'Sign' -$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('strong-cred-value') -$creds.EndDate = Get-Date -Year 2024 -Month 10 -Day 23 -$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") -$params = @{ - AppId = $MyApp.AppId - KeyCredentials = $creds -} -New-EntraServicePrincipal @params -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application -``` - -This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. - -- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). -- `-KeyCredentials` parameter specifies the collection of key credentials associated with the service principal. - -### Example 4: Create a new service principal by AlternativeNames, ServicePrincipalType, and ServicePrincipalName - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$MyApp=(Get-EntraApplication -Filter "DisplayName eq 'Demo App'") -$params = @{ - AppId = $MyApp.AppId - AlternativeNames = 'sktest2' - ServicePrincipalType = 'Application' - ServicePrincipalNames = $MyApp.AppId -} -New-EntraServicePrincipal @params -``` - -```Output -DisplayName Id AppId SignInAudience ServicePrincipalType ------------ -- ----- -------------- -------------------- -Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADandPersonalMicrosoftAccount Application -``` - -This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraApplication` to get application app Id. - -- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). -- `-AlternativeNames` parameter specifies the alternative names for this service principal. -- `-ServicePrincipalType` parameter specifies the type of the service principal. -- `-ServicePrincipalNames` parameter specifies an array of service principal names. - -## Parameters - -### -AccountEnabled - -True if the service principal account is enabled; otherwise, false. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AlternativeNames - -The alternative names for this service principal. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppId - -The unique identifier for the associated application (its appId property). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppRoleAssignmentRequired - -Indicates whether an application role assignment is required. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the service principal display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Homepage - -Home page or landing page of the application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -KeyCredentials - -The collection of key credentials associated with the service principal. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LogoutUrl - -Specifies the logout URL. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordCredentials - -The collection of password credentials associated with the application. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplyUrls - -The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalNames - -Specifies an array of service principal names. -Based on the identifierURIs collection, plus the application's appId property, these URIs are used to reference an application's service principal. -A client uses ServicePrincipalNames to: - -- populate requiredResourceAccess, via "Permissions to other applications" in the Azure classic portal. -- Specify a resource URI to acquire an access token, which is the URI returned in the claim. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalType - -The type of the service principal. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Tags linked to this service principal. - -Note that if you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) - -[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md deleted file mode 100644 index 5a44ce185e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.md +++ /dev/null @@ -1,230 +0,0 @@ ---- -title: New-EntraServicePrincipalAppRoleAssignment -description: This article provides details on the New-EntraServicePrincipalAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment - -schema: 2.0.0 ---- - -# New-EntraServicePrincipalAppRoleAssignment - -## Synopsis - -Assigns a service principal to an application role. - -## Syntax - -```powershell -New-EntraServicePrincipalAppRoleAssignment - -ObjectId - -PrincipalId - -Id - -ResourceId - [] -``` - -## Description - -The `New-EntraServicePrincipalAppRoleAssignment` cmdlet assigns a service principal to an application role in Microsoft Entra ID. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. - -- Directory Synchronization Accounts -- Directory Writer -- Hybrid Identity Administrator -- Identity Governance Administrator -- Privileged Role Administrator -- User Administrator -- Application Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Assign an app role to another service principal - -```powershell - Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' - $appname = 'Box' - $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" - $params = @{ - ObjectId = $spo.ObjectId - ResourceId = $spo.ObjectId - Id = $spo.Approles[1].Id - PrincipalId = $spo.ObjectId -} - -New-EntraServicePrincipalAppRoleAssignment @params -``` - -```Output -Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId --- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- -1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box aaaa0000-bb11-2222-33cc-444444dddddd -``` - -This example demonstrates how to assign an app role to another service principal in Microsoft Entra ID. You can use the command `Get-EntraServicePrincipal` to get a service principal Id. - -- `-ObjectId` parameter specifies the ObjectId of a client service principal to which you're assigning the app role. -- `-ResourceId`parameter specifies the ObjectId of the resource service principal. -- `-Id` parameter specifies the Id of the app role (defined on the resource service principal) to assign to the client service principal. If no app roles are defined on the resource app, you can use `00000000-0000-0000-0000-000000000000`. -- `-PrincipalId` parameter specifies the ObjectId of the client service principal to which you're assigning the app role. - -### Example 2: Assign an app role to a user - -```powershell - Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' - $appname = 'Box' - $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" - $user = Get-EntraUser -SearchString 'Test Contoso' - - $params = @{ - ObjectId = $spo.ObjectId - ResourceId = $spo.ObjectId - Id = $spo.Approles[1].Id - PrincipalId = $user.ObjectId -} - -New-EntraServicePrincipalAppRoleAssignment @params -``` - -```Output -Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId --- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- -2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box bbbb1111-cc22-3333-44dd-555555eeeeee -``` - -This example demonstrates how to assign an app role to a user in Microsoft Entra ID. -You can use the command `Get-EntraServicePrincipal` to get a service principal Id. -You can use the command `Get-EntraUser` to get a user Id. - -- `-ObjectId` parameter specifies the ObjectId of the app's service principal. -- `-ResourceId`parameter specifies the ObjectId of the app's service principal. -- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the user. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the user. -- `-PrincipalId` parameter specifies the ObjectId of a user to which you're assigning the app role. - -### Example 3: Assign an app role to a group - -```powershell - Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' - $appname = 'Box' - $spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" - $group = Get-EntraGroup -SearchString 'testGroup' - - $params = @{ - ObjectId = $spo.ObjectId - ResourceId = $spo.ObjectId - Id = $spo.Approles[1].Id - PrincipalId = $group.ObjectId - } - - New-EntraServicePrincipalAppRoleAssignment @params -``` - -```Output -Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId --- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- -3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box cccc2222-dd33-4444-55ee-666666ffffff -``` - -This example demonstrates how to assign an app role to a group in Microsoft Entra ID. -You can use the command `Get-EntraServicePrincipal` to get a service principal Id. -You can use the command `Get-EntraGroup` to get a group Id. - -- `-ObjectId` parameter specifies the ObjectId of the app's service principal. -- `-ResourceId`parameter specifies the ObjectId of the app's service principal. -- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the group. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the group. -- `-PrincipalId` parameter specifies the ObjectId of a group to which you're assigning the app role. - -## Parameters - -### -Id - -Specifies the ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PrincipalId - -Specifies a principal ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId - -Specifies a resource ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`New-EntraServiceAppRoleAssignment` is an alias for `New-EntraServicePrincipalAppRoleAssignment`. - -## Related Links - -[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) - -[Remove-EntraServicePrincipalAppRoleAssignment](Remove-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md deleted file mode 100644 index 74a1a50f71..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalKeyCredential.md +++ /dev/null @@ -1,182 +0,0 @@ ---- -title: New-EntraServicePrincipalKeyCredential -description: This article provides details on the New-EntraServicePrincipalKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential - -schema: 2.0.0 ---- - -# New-EntraServicePrincipalKeyCredential - -## Synopsis - -Creates a password credential for a service principal. - -## Syntax - -```powershell -New-EntraServicePrincipalKeyCredential - -ObjectId - [-CustomKeyIdentifier ] - [-StartDate ] - [-EndDate ] - [-Type ] - [-Usage ] - [-Value ] - [] -``` - -## Description - -The New-EntraServicePrincipalKeyCredential cmdlet creates a key credential for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Create a key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -New-EntraServicePrincipalKeyCredential -``` - -This command creates a key credential for a service principal. - -## Parameters - -### -CustomKeyIdentifier - -Specifies a custom key ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -EndDate - -Specifies the time when the key becomes invalid as a DateTime object. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies an object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -StartDate - -Specifies the time when the key becomes valid as a DateTime object. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Type - -Specifies the type of the key. - -```yaml -Type: KeyType -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Usage - -Specifies the key usage. - -```yaml -Type: KeyUsage -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Value - -Specifies the value for the key. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) - -[Remove-EntraServicePrincipalKeyCredential](Remove-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md deleted file mode 100644 index a8377771c4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -title: New-EntraServicePrincipalPasswordCredential -description: This article provides details on the New-EntraServicePrincipalPasswordCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential - -schema: 2.0.0 ---- - -# New-EntraServicePrincipalPasswordCredential - -## Synopsis - -Creates a password credential for a service principal. - -## Syntax - -```powershell -New-EntraServicePrincipalPasswordCredential - -ServicePrincipalId - [-EndDate ] - [-StartDate ] - [] -``` - -## Description - -The `New-EntraServicePrincipalPasswordCredential` cmdlet creates a password credential for a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Create a password credential with StartDate - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$Params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - StartDate = '2024-04-21T14:14:14Z' -} -New-EntraServicePrincipalPasswordCredential @Params -``` - -```Output -secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u -@odata.type : #microsoft.graph.servicePrincipal -endDateTime : 08-08-2026 10:30:00 -hint : LY. -customKeyIdentifier : -startDateTime : 08-08-2024 14:14:14 -keyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 -@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword -displayName : -StartDate : 08-08-2024 14:14:14 -EndDate : 08-08-2026 10:30:00 -``` - -This example demonstrates how to create a password credential with StartDate for a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-StarteDate` parameter specifies the date and time at which the password becomes valid. - -### Example 2: Create a password credential with EndtDate - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$Params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - EndDate = '2030-03-21T14:14:14Z' -} -New-EntraServicePrincipalPasswordCredential @Params -``` - -```Output -secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u -@odata.type : #microsoft.graph.servicePrincipal -endDateTime : 08-08-2026 10:30:00 -hint : LY. -customKeyIdentifier : -startDateTime : 08-08-2024 14:14:14 -keyId : bbbbbbbb-1c1c-2d2d-3e3e-444444444444 -@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword -displayName : -StartDate : 08-08-2024 14:14:14 -EndDate : 08-08-2026 10:30:00 -``` - -This example demonstrates how to create a password credential with EndDate for a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-EndDate` parameter specifies the date and time at which the password expires represented using ISO 8601 format and is always in UTC time. - -## Parameters - -### -EndDate - -The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of the service principal. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -StartDate - -The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) - -[Remove-EntraServicePrincipalPasswordCredential](Remove-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md deleted file mode 100644 index bb06d0fd75..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Remove-EntraApplication -description: This article provides details on the Remove-EntraApplication command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplication - -schema: 2.0.0 ---- - -# Remove-EntraApplication - -## Synopsis - -Deletes an application object. - -## Syntax - -```powershell -Remove-EntraApplication - -ApplicationId - [] -``` - -## Description - -The `Remove-EntraApplication` cmdlet deletes an application object identified by ApplicationId. Specify the `ApplicationId` parameter to delete an application object. - -## Examples - -### Example 1: Remove an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$Application = Get-EntraApplication -SearchString '' -Remove-EntraApplication -ApplicationId $Application.ObjectId -``` - -This example demonstrates how to delete an application object. - -## Parameters - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[New-EntraApplication](New-EntraApplication.md) - -[Set-EntraApplication](Set-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md deleted file mode 100644 index 3ff1288b6e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraApplicationExtensionProperty -description: This article provides details on the Remove-EntraApplicationExtensionProperty command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty - -schema: 2.0.0 ---- - -# Remove-EntraApplicationExtensionProperty - -## Synopsis - -Removes an application extension property. - -## Syntax - -```powershell -Remove-EntraApplicationExtensionProperty - -ExtensionPropertyId - -ApplicationId - [] -``` - -## Description - -The `Remove-EntraApplicationExtensionProperty` cmdlet removes an application extension property for an object in Microsoft Entra ID. - -## Examples - -### Example 1: Remove an application extension property - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$Application = Get-EntraApplication -SearchString '' -$params = @{ - ApplicationId = $Application.ObjectId - ExtensionPropertyId = 'cccc2222-dd33-4444-55ee-666666ffffff' -} - -Remove-EntraApplicationExtensionProperty @params -``` - -This example removes the extension property that has the specified ID from an application in Microsoft Entra ID. - -- `-ApplicationId` parameter specifies the unique identifier of an application. -- `-ExtensionPropertyId` parameter specifies the unique identifier of the extension property to remove. - -## Parameters - -### -ExtensionPropertyId - -Specifies the unique ID of the extension property to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationExtensionProperty](Get-EntraApplicationExtensionProperty.md) - -[New-EntraApplicationExtensionProperty](New-EntraApplicationExtensionProperty.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md deleted file mode 100644 index 9f0e4a9325..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: Remove-EntraApplicationKey -description: This article provides details on the Remove-EntraApplicationKey command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKey - -schema: 2.0.0 ---- - -# Remove-EntraApplicationKey - -## Synopsis - -Removes a key from an application. - -## Syntax - -```powershell -Remove-EntraApplicationKey - -ObjectId - [-Proof ] - [-KeyId ] - [] -``` - -## Description - -Removes a key from an application. - -## Examples - -### Example 1: Removes a key credential from an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' -$app = Get-EntraApplication -Filter "DisplayName eq ''" -$params = @{ - ObjectId = $app.ObjectId - KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' - Proof = {token} -} - -Remove-EntraApplicationKey @params -``` - -This command removes the specified key credential from the specified application. - -- `-ObjectId` parameter specifies the unique identifier of an application. -- `-KeyId` parameter specifies the key Id corresponding to the key object to be removed. -- `-Proof` parameter specifies the JWT token provided as a proof of possession. - -## Parameters - -### -ObjectId - -Specifies the unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -KeyId - -The key Id corresponding to the key object to be removed. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Proof - -The JWT token provided as a proof of possession. - -A self-signed JWT token used as a proof of possession of the existing keys. This JWT token must be signed with a private key that corresponds to one of the existing valid certificates associated with the application. The token should contain the following claims: - -- `aud`: Audience needs to be 00000002-0000-0000-c000-000000000000. -- `iss`: Issuer needs to be the ID of the application that initiates the request. -- `nbf`: Not before time. -- `exp`: Expiration time should be the value of nbf + 10 minutes. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplicationKey](New-EntraApplicationKey.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md deleted file mode 100644 index 944d130412..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Remove-EntraApplicationKeyCredential -description: This article provides details on the Remove-EntraApplicationKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential - -schema: 2.0.0 ---- - -# Remove-EntraApplicationKeyCredential - -## Synopsis - -Removes a key credential from an application. - -## Syntax - -```powershell -Remove-EntraApplicationKeyCredential - -ApplicationId - -KeyId - [] -``` - -## Description - -The `Remove-EntraApplicationKeyCredential` cmdlet removes a key credential from an application. - -An application can use this command along with `New-EntraApplicationKeyCredential` to automate the rolling of its expiring keys. - -## Examples - -### Example 1: Remove a key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq ''" -$params = @{ - ApplicationId = $application.Id - KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' -} - -Remove-EntraApplicationKeyCredential @params -``` - -This command removes the specified key credential from the specified application. - -- `-ApplicationId` Specifies the ID of an application. -- `-KeyId` Specifies a custom key ID. Use `Get-EntraApplicationKeyCredential` to get the keyId details. - -## Parameters - -### -KeyId - -Specifies a custom key ID. The unique identifier for the password. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies a unique ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplicationKeyCredential](Get-EntraApplicationKeyCredential.md) - -[New-EntraApplicationKeyCredential](New-EntraApplicationKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md deleted file mode 100644 index a8a9019f62..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraApplicationOwner -description: This article provides details on the Remove-EntraApplicationOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationOwner - -schema: 2.0.0 ---- - -# Remove-EntraApplicationOwner - -## Synopsis - -Removes an owner from an application. - -## Syntax - -```powershell -Remove-EntraApplicationOwner - -OwnerId - -ApplicationId - [] -``` - -## Description - -The `Remove-EntraApplicationOwner` cmdlet removes an owner from an application in Microsoft Entra ID. - -## Examples - -### Example 1: Remove an owner from an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$Application = Get-EntraApplication -SearchString '' -$params = @{ - ApplicationId = $Application.ObjectId - OwnerId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' -} - -Remove-EntraApplicationOwner @params -``` - -This example removes the specified owner from the specified application. You can use the command `Get-EntraApplication` to get application Id. - -- `-ApplicationId` parameter specifies the the unique identifier of a application. -- `-OwnerId` parameter specifies the ID of the owner. - -## Parameters - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OwnerId - -Specifies the ID of the owner. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, -`InformationVariable`, `-OutVariable`, -`OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraApplicationOwner](Add-EntraApplicationOwner.md) - -[Get-EntraApplicationOwner](Get-EntraApplicationOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md deleted file mode 100644 index b63496136c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraApplicationPassword -description: This article provides details on the Remove-EntraApplicationPassword command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPassword - -schema: 2.0.0 ---- - -# Remove-EntraApplicationPassword - -## Synopsis - -Remove a password from an application. - -## Syntax - -```powershell -Remove-EntraApplicationPassword - -ObjectId - [-KeyId ] - [] -``` - -## Description - -Remove a password from an application. - -## Examples - -### Example 1: Removes a password from an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq ''" -$params = @{ - ObjectId = $application.Id - KeyId = 'cccccccc-2d2d-3e3e-4f4f-555555555555' -} - -Remove-EntraApplicationPassword @params -``` - -This example removes the specified password from the specified application. - -- `-ObjectId` parameter specifies the unique identifier of the application. -- `-KeyId` parameter specifies the unique identifier of the PasswordCredential. - -## Parameters - -### -ObjectId - -The unique identifier of the application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -KeyId - -The unique identifier for the key. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[New-EntraApplicationPassword](New-EntraApplicationPassword.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md deleted file mode 100644 index 72d34ae5ff..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Remove-EntraApplicationPasswordCredential -description: This article provides details on the Remove-EntraApplicationPasswordCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential - -schema: 2.0.0 ---- - -# Remove-EntraApplicationPasswordCredential - -## Synopsis - -Removes a password credential from an application. - -## Syntax - -```powershell -Remove-EntraApplicationPasswordCredential - -ApplicationId - -KeyId - [] -``` - -## Description - -The `Remove-EntraApplicationPasswordCredential` cmdlet removes a password credential from an application in Microsoft Entra ID. - -## Examples - -### Example 1: Remove an application password credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "displayName eq 'Contoso Helpdesk App'" -$KeyIDs = Get-EntraApplicationPasswordCredential -ApplicationId $application.Id -Remove-EntraApplicationPasswordCredential -ApplicationId $application.Id -KeyId $KeyIds[0].KeyId -``` - -This example demonstrates how to remove the password credential for an application. - -- `ApplicationId` Specifies the ID of the application. Use `Get-EntraApplication` to get application ObjectId value. -- `KeyId` Specifies the ID of the password credential. Use `Get-EntraApplicationPasswordCredential` to retrieve a specific credential details. - -## Parameters - -### -KeyId - -Specifies the ID of the password credential. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the ID of the application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[Get-EntraApplicationPasswordCredential](Get-EntraApplicationPasswordCredential.md) - -[Remove-EntraApplicationPasswordCredential](Remove-EntraApplicationPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md deleted file mode 100644 index d34578e6cb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Remove-EntraApplicationVerifiedPublisher -description: This article provides details on the Remove-EntraApplicationVerifiedPublisher command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher - -schema: 2.0.0 ---- - -# Remove-EntraApplicationVerifiedPublisher - -## Synopsis - -Removes the verified publisher from an application. - -## Syntax - -```powershell -Remove-EntraApplicationVerifiedPublisher - -AppObjectId - [] -``` - -## Description - -Removes the verified publisher from an application. - -## Examples - -### Example 1: Remove the verified publisher from an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$app = Get-EntraApplication -Filter "DisplayName eq ''" -Remove-EntraApplicationVerifiedPublisher -AppObjectId $app.ObjectId -``` - -This command demonstrates how to remove the verified publisher from an application. - -- `-AppObjectId` parameter specifies the unique identifier of an application. - -## Parameters - -### -AppObjectId - -The unique identifier of a Microsoft Entra ID Application object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[Set-EntraApplicationVerifiedPublisher](Set-EntraApplicationVerifiedPublisher.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md deleted file mode 100644 index fb083eb0aa..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Remove-EntraDeletedApplication -description: This article provides details on the Remove-EntraDeletedApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedApplication - -schema: 2.0.0 ---- - -# Remove-EntraDeletedApplication - -## Synopsis - -Permanently delete a recently deleted application object from deleted items. - -## Syntax - -```powershell -Remove-EntraDeletedApplication - [-ObjectId] - [] -``` - -## Description - -Permanently delete a recently deleted application object from deleted items. After an item is permanently deleted, it can't be restored. - -For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. - -- To permanently delete deleted applications or service principals: Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. - -## Examples - -### Example 1: Remove deleted application object - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$App = Get-EntraDeletedApplication -SearchString 'My PowerShell Application' -Remove-EntraDeletedApplication -ObjectId $App.ObjectId -``` - -This command removes recently deleted application. You can use the command `Get-EntraDeletedApplication` to get deleted application Id. - -- `-ObjectId` parameter specifies the Id of a deleted application. - -## Parameters - -### -ObjectId - -The unique identifier of deleted application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) - -[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md deleted file mode 100644 index 9860be4fb3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Remove-EntraDeletedDirectoryObject -description: This article provides details on the Remove-EntraDeletedDirectoryObject command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject - -schema: 2.0.0 ---- - -# Remove-EntraDeletedDirectoryObject - -## Synopsis - -Permanently delete a previously deleted directory object. - -## Syntax - -```powershell -Remove-EntraDeletedDirectoryObject - -DirectoryObjectId - [] -``` - -## Description - -The `Remove-EntraDeletedDirectoryObject` cmdlet is used to permanently delete a previously deleted directory object. - -When a directory object is permanently deleted, it can no longer be restored. - -For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. - -- To permanently delete deleted applications or service principals: `Application Administrator`, `Cloud Application Administrator`, or `Hybrid Identity Administrator`. -- To permanently delete deleted users: `User Administrator`. -- To permanently delete deleted groups: `Groups Administrator`. - -## Examples - -### Example 1: Delete a previously deleted directory object - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Group.ReadWrite.All','Application.ReadWrite.All','User.ReadWrite.All' - -Remove-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -This example demonstrates how to permanently delete a previously deleted directory object by DirectoryObjectId. - -- `-DirectoryObjectId` parameter specifies the Id of the directory object that is permanently deleted. - -## Parameters - -### -DirectoryObjectId - -The DirectoryObjectId of the directory object that is permanently deleted. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) - -[Restore-EntraDeletedDirectoryObject](Restore-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md deleted file mode 100644 index 65cf9d1a54..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -title: Remove-EntraServicePrincipal -description: This article provides details on the Remove-EntraServicePrincipal command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipal - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipal - -## Synopsis - -Removes a service principal. - -## Syntax - -```powershell -Remove-EntraServicePrincipal - -ServicePrincipalId - [] -``` - -## Description - -The `Remove-EntraServicePrincipal` cmdlet removes a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Removes a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Remove-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId -``` - -This example demonstrates how to remove a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the service principal Id. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipal](New-EntraServicePrincipal.md) - -[Set-EntraServicePrincipal](Set-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md deleted file mode 100644 index 333bf29a33..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Remove-EntraServicePrincipalAppRoleAssignment -description: This article provides details on the Remove-EntraServicePrincipalAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalAppRoleAssignment - -## Synopsis - -Removes a service principal application role assignment. - -## Syntax - -```powershell -Remove-EntraServicePrincipalAppRoleAssignment - -AppRoleAssignmentId - -ServicePrincipalId - [] -``` - -## Description - -The `Remove-EntraServicePrincipalAppRoleAssignment` cmdlet removes a service principal application role assignment in Microsoft Entra ID. - -App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. - -- Directory Synchronization Accounts -- Directory Writer -- Hybrid Identity Administrator -- Identity Governance Administrator -- Privileged Role Administrator -- User Administrator -- Application Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Removes a service principal application role assignment - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId $servicePrincipal.Id -AppRoleAssignmentId '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' -``` - -This example demonstrates how to remove a service principal application role assignment in Microsoft Entra ID. - -- `-ServicePrincipalId` - specifies the unique identifier (Object ID) of the service principal or user from which you want to remove an app role assignment. -- `-AppRoleAssignmentId` - specifies the unique identifier (ID) of the app role assignment that you want to remove. The value `2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6` represents the ID of the specific app role assignment to be removed. - -## Parameters - -### -AppRoleAssignmentId - -Specifies the ID of the application role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`Remove-EntraServiceAppRoleAssignment` is an alias for `Remove-EntraServicePrincipalAppRoleAssignment`. - -## Related Links - -[Get-EntraServicePrincipalAppRoleAssignment](Get-EntraServicePrincipalAppRoleAssignment.md) - -[New-EntraServicePrincipalAppRoleAssignment](New-EntraServicePrincipalAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md deleted file mode 100644 index 6f2490f9fd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Remove-EntraServicePrincipalDelegatedPermissionClassification -description: This article provides details on the Remove-EntraServicePrincipalDelegatedPermissionClassification command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalDelegatedPermissionClassification - -## Synopsis - -Remove delegated permission classification. - -## Syntax - -```powershell -Remove-EntraServicePrincipalDelegatedPermissionClassification - -ServicePrincipalId - -Id - [] -``` - -## Description - -The `Remove-EntraServicePrincipalDelegatedPermissionClassification` cmdlet deletes the given delegated permission classification by Id from service principal. - -## Examples - -### Example 1: Remove a delegated permission classification - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' -} -Remove-EntraServicePrincipalDelegatedPermissionClassification @params -``` - -This command deletes the delegated permission classification by Id from the service principal. - -- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. -- `-Id` parameter specifies the unique identifier of a delegated permission classification object Id. - -## Parameters - -### -ServicePrincipalId - -The unique identifier of a service principal object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a delegated permission classification object Id. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalDelegatedPermissionClassification](Get-EntraServicePrincipalDelegatedPermissionClassification.md) - -[Add-EntraServicePrincipalDelegatedPermissionClassification](Add-EntraServicePrincipalDelegatedPermissionClassification.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md deleted file mode 100644 index 18477f4493..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Remove-EntraServicePrincipalKeyCredential -description: This article provides details on the Remove-EntraServicePrincipalKeyCredential command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalKeyCredential - -## Synopsis - -Removes a key credential from a service principal. - -## Syntax - -```powershell -Remove-EntraServicePrincipalKeyCredential - -ServicePrincipalId - -KeyId - [] -``` - -## Description - -The Remove-EntraServicePrincipalKeyCredential cmdlet removes a key credential from a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Remove a key credential - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' #Delegated Permission -Connect-Entra -Scopes 'Application.ReadWrite.OwnedBy' #Application Permission -$SPObjectID = (Get-EntraServicePrincipal -SearchString 'Entra Multi-Factor Auth Client').ObjectID -Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID -Remove-EntraServicePrincipalKeyCredential -ServicePrincipalId $SPObjectID -KeyId -``` - -This example demonstrates how to remove a key credential from a service principal in Microsoft Entra ID. - -- First command stores the ObjectID of your service principal in the $SPObjectID variable. -- The second command gets all the Key Credentials for the service principal. Copy the preferred KeyID associated with the certificate to be removed and paste it at the in the third command. -- The last command removes the certificate (key credential) from the service principal configuration. - -## Parameters - -### -KeyId - -Specifies the ID of a key credential. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of a service principal. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalKeyCredential](Get-EntraServicePrincipalKeyCredential.md) - -[New-EntraServicePrincipalKeyCredential](New-EntraServicePrincipalKeyCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md deleted file mode 100644 index 685585aa07..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: Remove-EntraServicePrincipalOwner -description: This article provides details on the Remove-EntraServicePrincipalOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalOwner - -## Synopsis - -Removes an owner from a service principal. - -## Syntax - -```powershell -Remove-EntraServicePrincipalOwner - -OwnerId - -ServicePrincipalId - [] -``` - -## Description - -The `Remove-EntraServicePrincipalOwner` cmdlet removes an owner from a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Removes an owner from a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$owner = Get-EntraUser -UserId 'SawyerM@contoso.com' - -$params= @{ - ServicePrincipalId = $servicePrincipal.Id - OwnerId = $owner.Id -} -Remove-EntraServicePrincipalOwner @params -``` - -This example demonstrates how to remove an owner from a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the service principal Id. -- `-OwnerId` parameter specifies the service principal owner Id. - -## Parameters - -### -ServicePrincipalId - -Specifies the ID of a service principal. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OwnerId - -Specifies the ID of the owner. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraServicePrincipalOwner](Add-EntraServicePrincipalOwner.md) - -[Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md deleted file mode 100644 index 6706517f45..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Remove-EntraServicePrincipalPasswordCredential -description: This article provides details on the Remove-EntraServicePrincipalPasswordCredential command. - -ms.topic: reference -ms.date: 08/20/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential - -schema: 2.0.0 ---- - -# Remove-EntraServicePrincipalPasswordCredential - -## Synopsis - -Removes a password credential from a service principal. - -## Syntax - -```powershell -Remove-EntraServicePrincipalPasswordCredential - -ServicePrincipalId - -KeyId - [] -``` - -## Description - -The `Remove-EntraServicePrincipalPasswordCredential` cmdlet removes a password credential from a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Remove a password credential from a service principal in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$Params = @{ - ServicePrincipalId = $ServicePrincipal.ObjectId - KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' -} -Remove-EntraServicePrincipalPasswordCredential @Params -``` - -This example demonstrates how to remove a password credential from a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ServicePrincipalId of a specified Service Principal Password Credential. -- `-KeyId` parameter specifies the unique identifier of a Password Credential. - -## Parameters - -### -KeyId - -Specifies the unique identifier of password credential. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipalPasswordCredential](Get-EntraServicePrincipalPasswordCredential.md) - -[New-EntraServicePrincipalPasswordCredential](New-EntraServicePrincipalPasswordCredential.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md deleted file mode 100644 index a3c04f906a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: Restore-EntraDeletedApplication -description: This article provides details on the Restore-EntraDeletedApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedApplication - -schema: 2.0.0 ---- - -# Restore-EntraDeletedApplication - -## Synopsis - -Restores a previously deleted application. - -## Syntax - -```powershell -Restore-EntraDeletedApplication - [-IdentifierUris ] - -ObjectId - [] -``` - -## Description - -This cmdlet restores a previously deleted application. - -Restoring an application doesn't restore the associated service principal automatically. You must explicitly restore the deleted service principal. - -For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. - -- Application Administrator -- Cloud Application Administrator -- Hybrid Identity Administrator - -## Examples - -### Example 1: Restores a previously deleted application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$application = Get-EntraApplication -SearchString 'New Entra Application' - -# Delete a specific application -Remove-EntraApplication -ObjectId $application.ObjectId - -# Confirm deleted application -Get-EntraDeletedApplication -Filter "DisplayName eq 'New Entra Application'" - -# Restore a deleted application -Restore-EntraDeletedApplication -ObjectId $application.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa -``` - -This example shows how an application is deleted, then the deleted application is retrieved using the `Get-EntraDeletedApplication` cmdlet, and subsequently the application is restored by specifying the application's Object ID in the `Restore-EntraDeletedApplication` cmdlet. - -- `-ObjectId` parameter specifies the ObjectId of the deleted application that is to be restored. - -## Parameters - -### -IdentifierUris - -The IdentifierUris of the application that is to be restored. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -The ObjectId of the deleted application that is to be restored. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) - -[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md deleted file mode 100644 index 570791b14e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Select-EntraGroupIdsServicePrincipalIsMemberOf -description: This article provides details on the Select-EntraGroupIdsServicePrincipalIsMemberOf command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf - -schema: 2.0.0 ---- - -# Select-EntraGroupIdsServicePrincipalIsMemberOf - -## Synopsis - -Selects the groups in which a service principal is a member. - -## Syntax - -```powershell -Select-EntraGroupIdsServicePrincipalIsMemberOf - -ObjectId - -GroupIdsForMembershipCheck - [] -``` - -## Description - -The `Select-EntraGroupIdsServicePrincipalIsMemberOf` cmdlet selects the groups in which a service principal is a member in Microsoft Entra ID. - -## Examples - -### Example 1: Get the group membership of a group for a service principal - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck -$Groups.GroupIds = (Get-EntraGroup -Top 10).ObjectId -$ServicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq ''" -$params = @{ - ObjectId = $ServicePrincipal.ObjectId - GroupIdsForMembershipCheck = $Groups -} -Select-EntraGroupIdsServicePrincipalIsMemberOf @params -``` - -```Output -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command gets the group membership of a group for a specified service principal. -You can use the command `Get-EntraGroup` to get group Id. -You can use the command `Get-EntraServicePrincipal` to get service principal Id. - -- `-ObjectId` parameter specifies the service principal Id. -- `-GroupIdsForMembershipCheck` parameter specifies the array of group object IDs. - -## Parameters - -### -GroupIdsForMembershipCheck - -Specifies an array of group object IDs. - -```yaml -Type: GroupIdsForMembershipCheck -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md deleted file mode 100644 index a79faa2c1f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplication.md +++ /dev/null @@ -1,496 +0,0 @@ ---- -title: Set-EntraApplication -description: This article provides details on the Set-EntraApplication command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplication - -schema: 2.0.0 ---- - -# Set-EntraApplication - -## Synopsis - -Updates the properties of an application object. - -## Syntax - -```powershell -Set-EntraApplication - -ApplicationId - [-PasswordCredentials ] - [-TokenEncryptionKeyId ] - [-SignInAudience ] - [-KeyCredentials ] - [-ParentalControlSettings ] - [-IdentifierUris ] - [-AppRoles ] - [-PublicClient ] - [-InformationalUrl ] - [-Tags ] - [-Api ] - [-OptionalClaims ] - [-GroupMembershipClaims ] - [-Web ] - [-DisplayName ] - [-IsFallbackPublicClient ] - [-IsDeviceOnlyAuthSupported ] - [-RequiredResourceAccess ] - [] -``` - -## Description - -Updates the properties of an application object. - -## Examples - -### Example 1: Update an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - DisplayName = 'New Demo Application' -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -### Example 2: Update an application using IdentifierUris parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - IdentifierUris = 'https://mynewapp.contoso.com' -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -### Example 3: Update an application using GroupMembershipClaims parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - GroupMembershipClaims = 'SecurityGroup' -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -### Example 4: Update an application using IsDeviceOnlyAuthSupported parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - IsDeviceOnlyAuthSupported = $false -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -### Example 5: Update an application using Tags parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$application = Get-EntraApplication -Filter "DisplayName eq 'Original Demo Application'" -$params = @{ - ApplicationId = $application.ObjectId - Tags = 'mytag' -} -Set-EntraApplication @params -``` - -This command updates an application in Microsoft Entra ID. - -## Parameters - -### -Api - -Specifies settings for an application that implements a web API. - -```yaml -Type: ApiApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppRoles - -The collection of application roles that an application might declare. - -These roles can be assigned to users, groups, or service principals. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupMembershipClaims - -Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentifierUris - -Specifies identifier Uniform Resource Identifiers (URIs). - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InformationalUrl - -Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. - -The terms of service and privacy statement are surfaced to users through the user consent experience. - -```yaml -Type: InformationalUrl -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsDeviceOnlyAuthSupported - -Specifies if the application supports authentication using a device token. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsFallbackPublicClient - -Specifies the fallback application type as public client, such as an installed application running on a mobile device. - -The default value is `false` that means the fallback application type is confidential client such as web app. - -There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). - -In those cases Microsoft Entra ID interprets the application type based on the value of this property. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -KeyCredentials - -Specifies key credentials. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApplicationId - -Specifies the ID of an application in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OptionalClaims - -Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. - -```yaml -Type: OptionalClaims -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ParentalControlSettings - -Specifies parental control settings for an application. - -```yaml -Type: ParentalControlSettings -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordCredentials - -Specifies password credentials. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PublicClient - -Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is `false`. - -```yaml -Type: PublicClientApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RequiredResourceAccess - -Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. - -This pre-configuration of required resource access drives the consent experience. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignInAudience - -Specifies what Microsoft accounts are supported for the current application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Custom strings that can be used to categorize and identify the application. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TokenEncryptionKeyId - -Specifies the keyId of a public key from the keyCredentials collection. - -When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. - -The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Web - -Specifies settings for a web application. - -```yaml -Type: WebApplication -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### Boolean - -### Microsoft.Open.MSGraph.Model.ApiApplication - -### Microsoft.Open.MSGraph.Model.InformationalUrl - -### Microsoft.Open.MSGraph.Model.OptionalClaims - -### Microsoft.Open.MSGraph.Model.ParentalControlSettings - -### Microsoft.Open.MSGraph.Model.PublicClientApplication - -### Microsoft.Open.MSGraph.Model.WebApplication - -### String - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] - -### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] - -### System.Collections.Generic.List`1[System.String] - -### System.Nullable`1[System.Boolean] - -## Outputs - -## Notes - -## Related Links - -[Get-EntraApplication](Get-EntraApplication.md) - -[New-EntraApplication](New-EntraApplication.md) - -[Remove-EntraApplication](Remove-EntraApplication.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md deleted file mode 100644 index a029dc0470..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: Set-EntraApplicationLogo -description: This article provides details on the Set-EntraApplicationLogo command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationLogo - -schema: 2.0.0 ---- - -# Set-EntraApplicationLogo - -## Synopsis - -Sets the logo for an Application - -## Syntax - -### File (Default) - -```powershell -Set-EntraApplicationLogo - -ApplicationId - -FilePath - [] -``` - -### Stream - -```powershell -Set-EntraApplicationLogo - -ApplicationId - [] -``` - -### ByteArray - -```powershell -Set-EntraApplicationLogo - -ApplicationId - [] -``` - -## Description - -The `Set-EntraApplicationLogo` cmdlet is used to set the logo for an application. - -## Examples - -### Example 1: Sets the application logo for the application specified by the ApplicationId parameter - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$application = Get-EntraApplication -Filter "DisplayName eq 'Demo Application'" -$params = @{ - ObjectId = $application.ObjectId - FilePath = 'D:\applogo.jpg' -} -Set-EntraApplicationLogo @params -``` - -This cmdlet sets the application logo for the application specified by the `-ApplicationId` parameter to the image specified with the `-FilePath` parameter. - -## Parameters - -### -FilePath - -The file path of the file that is to be uploaded as the application logo. - -```yamlset-EntraApplicationLogo -Type: System.String -Parameter Sets: File -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ApplicationId - -The ApplicationId of the Application for which the logo is set. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.IO.Stream System.Byte\[\] - -## Outputs - -### System.Object - -## Notes - -File uploads must be smaller than 500KB. - -## Related Links - -[Get-EntraApplicationLogo](Get-EntraApplicationLogo.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md deleted file mode 100644 index 722021d35c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Set-EntraApplicationVerifiedPublisher -description: This article provides details on the Set-EntraApplicationVerifiedPublisher command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher - -schema: 2.0.0 ---- - -# Set-EntraApplicationVerifiedPublisher - -## Synopsis - -Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. - -## Syntax - -```powershell -Set-EntraApplicationVerifiedPublisher - -AppObjectId - -SetVerifiedPublisherRequest - [] -``` - -## Description - -Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. - -## Examples - -### Example 1: Set the verified publisher of an application - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All' -$app = Get-EntraApplication -Filter "DisplayName eq ''" -$appObjId = $app.ObjectId -$mpnId = '0433167' -$req = @{verifiedPublisherId = $mpnId} -$params = @{ - AppObjectId = $appObjId - SetVerifiedPublisherRequest = $req -} -Set-EntraApplicationVerifiedPublisher @params -``` - -This command sets the verified publisher of an application. - -The Microsoft Partner Network ID (MPNID) of the verified publisher can be obtained from the publisher's Partner Center account. - -- `-AppObjectId` parameter specifies the unique identifier of a Microsoft Entra ID Application. -- `-SetVerifiedPublisherRequest` parameter specifies the request body object containing the verifiedPublisherId property with it's the MPNID value. - -## Parameters - -### -AppObjectId - -The unique identifier of a Microsoft Entra ID Application object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SetVerifiedPublisherRequest - -A request body object containing the verifiedPublisherId property it's the MPNID value. - -```yaml -Type: SetVerifiedPublisherRequest -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraApplicationVerifiedPublisher](Remove-EntraApplicationVerifiedPublisher.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md deleted file mode 100644 index b2dd1e4636..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.md +++ /dev/null @@ -1,440 +0,0 @@ ---- -title: Set-EntraServicePrincipal -description: This article provides details on the Set-EntraServicePrincipal command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraServicePrincipal - -schema: 2.0.0 ---- - -# Set-EntraServicePrincipal - -## Synopsis - -Updates a service principal. - -## Syntax - -```powershell -Set-EntraServicePrincipal - -ServicePrincipalId - [-KeyCredentials ] - [-Homepage ] - [-AppId ] - [-LogoutUrl ] - [-ServicePrincipalType ] - [-AlternativeNames ] - [-PasswordCredentials ] - [-PreferredSingleSignOnMode ] - [-Tags ] - [-AccountEnabled ] - [-ServicePrincipalNames ] - [-AppRoleAssignmentRequired ] - [-DisplayName ] - [-ReplyUrls ] - [] -``` - -## Description - -The `Set-EntraServicePrincipal` cmdlet updates a service principal in Microsoft Entra ID. - -## Examples - -### Example 1: Disable the account of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - AccountEnabled = $False -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update `AccountEnabled` of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-AccountEnabled` parameter specifies indicates whether the account is enabled. - -### Example 2: Update AppId and Homepage of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - AppId = '22223333-cccc-4444-dddd-5555eeee6666' - Homepage = 'https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z' -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update `AppId` and Homepage of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-AppId` parameter specifies the application ID. -- `-Homepage` parameter specifies the home page or landing page of the application. - -### Example 3: Update AlternativeNames and DisplayName of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - AlternativeNames = 'Service Principal Demo' - DisplayName = 'NewName' -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update AlternativeNames and DisplayName of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. - -### Example 4: Update LogoutUrl and ReplyUrls of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - LogoutUrl = 'https://securescore.office.com/SignOut' - ReplyUrls = 'https://admin.contoso.com' -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update LogoutUrl and ReplyUrls of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-LogoutUrl` parameter specifies the sign out URL. -- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. - -### Example 5: Update ServicePrincipalType and AppRoleAssignmentRequired of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - ServicePrincipalType = 'Application' - AppRoleAssignmentRequired = $True -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update `ServicePrincipalType` and `AppRoleAssignmentRequired` of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-ServicePrincipalType` parameter specifies the service principal type. -- `-AppRoleAssignmentRequired` parameter specifies indicates whether an application role assignment is required. - -### Example 6: Update KeyCredentials of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential -$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') -$startdate = Get-Date -Year 2024 -Month 10 -Day 10 -$creds.StartDate = $startdate -$creds.Type = 'Symmetric' -$creds.Usage = 'Sign' -$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('A') -$creds.EndDate = Get-Date -Year 2025 -Month 12 -Day 20 -Set-EntraServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId -KeyCredentials $creds -``` - -This example demonstrates how to update KeyCredentials of a service principal in Microsoft Entra ID. - -Use the `New-EntraServicePrincipalPasswordCredential` and `Remove-EntraServicePrincipalPasswordCredential` cmdlets to update the password or secret for a servicePrincipal. - -### Example 7: Update PreferredSingleSignOnMode of a service principal - -```powershell -Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" -$params = @{ - ServicePrincipalId = $servicePrincipal.ObjectId - PreferredSingleSignOnMode = 'saml' -} -Set-EntraServicePrincipal @params -``` - -This example demonstrates how to update `PreferredSingleSignOnMode` of a service principal in Microsoft Entra ID. - -- `-ServicePrincipalId` parameter specifies the ID of a service principal. -- `-PreferredSingleSignOnMode` parameter specifies the single sign-on mode configured for this application. - -## Parameters - -### -AccountEnabled - -Indicates whether the account is enabled. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AlternativeNames - -The alternative names for this service principal. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppId - -Specifies the application ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppRoleAssignmentRequired - -Indicates whether an application role assignment is required. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Homepage - -Specifies the home page or landing page of the application. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -KeyCredentials - -Specifies key credentials. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LogoutUrl - -Specifies the sign out URL. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalId - -Species the ID of a service principal in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PasswordCredentials - -Specifies password credentials. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PreferredSingleSignOnMode - -Specifies the single sign-on mode configured for this application. Microsoft Entra ID uses the preferred single sign-on mode to launch the application from Microsoft 365 or the My Apps portal. The supported values are password, saml, notSupported, and oidc. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ReplyUrls - -The URLs that user tokens are sent to for sign in with the associated application, or the redirect Uniform Resource Identifiers that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalNames - -Specifies service principal names. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ServicePrincipalType - -The service principal type. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tags - -Specifies an array of tags. - -If you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) - -[New-EntraServicePrincipal](New-EntraServicePrincipal.md) - -[Remove-EntraServicePrincipal](Remove-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md deleted file mode 100644 index 7b5c34637f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.md +++ /dev/null @@ -1,119 +0,0 @@ ---- -title: Add-EntraEnvironment -description: This article provides details on the Add-EntraEnvironment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraEnvironment - -schema: 2.0.0 ---- - -# Add-EntraEnvironment - -## Synopsis - -Adds Microsoft Entra environment to the settings file. - -## Syntax - -### Add Entra Environment Name - -```powershell -Add-EntraEnvironment - [-Name] - [-AzureADEndpoint] - [-GraphEndpoint] - [-ProgressAction ] - [-WhatIf] - [-Confirm] - [] -``` - -## Description - -Adds Microsoft Entra environment to the settings file. - -## Examples - -### Example 1: Add a user defined environment - -```powershell -$params = @{ - Name = 'Canary' - GraphEndpoint = 'https://canary.graph.microsoft.com' - AzureADEndpoint = 'https://login.microsoftonline.com' -} - -Add-EntraEnvironment @params -``` - -```Output -Name AzureADEndpoint GraphEndpoint Type ----- --------------- ------------- ---- -Canary https://login.microsoftonline.com https://microsoftgraph.com User-defined {} -``` - -Adds a user-defined Entra environment to the settings file. - -## Parameters - -### -Name - -Specifies the name of an environment - -```yaml - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GraphEndpoint - -Specifies the GraphEndpoint URL of an environment - -```yaml - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -AzueADEndpoint - -Specifies the AzureADEndpoint URL of an environment - -```yaml - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraEnvironment](Get-EntraEnvironment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md deleted file mode 100644 index 1322d7b844..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Connect-Entra.md +++ /dev/null @@ -1,583 +0,0 @@ ---- -title: Connect-Entra -description: This article provides details on the Connect-Entra Command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi254 -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Connect-Entra - -schema: 2.0.0 ---- - -# Connect-Entra - -## Synopsis - -Connect to Microsoft Entra ID with an authenticated account. - -## Syntax - -### UserParameterSet (Default) - -```powershell -Connect-Entra -[[-Scopes] ] -[[-ClientId] ] -[-TenantId ] -[-ContextScope ] -[-Environment ] -[-UseDeviceCode] -[-ClientTimeout ] -[-NoWelcome] -[] -``` - -### AppCertificateParameterSet - -```powershell -Connect-Entra -[-ClientId] -[[-CertificateSubjectName] ] -[[-CertificateThumbprint] ] -[-Certificate ] -[-TenantId ] -[-ContextScope ] -[-Environment ] -[-ClientTimeout ] -[-NoWelcome] -[] -``` - -### IdentityParameterSet - -```powershell -Connect-Entra -[[-ClientId] ] -[-ContextScope ] -[-Environment ] -[-ClientTimeout ] -[-Identity] -[-NoWelcome] -[] -``` - -### AppSecretCredentialParameterSet - -```powershell -Connect-Entra -[-ClientSecretCredential ] -[-TenantId ] -[-ContextScope ] -[-Environment ] -[-ClientTimeout ] -[-NoWelcome] -[] -``` - -### AccessTokenParameterSet - -```powershell -Connect-Entra -[-AccessToken] -[-Environment ] -[-ClientTimeout ] -[-NoWelcome] -[] -``` - -### EnvironmentVariableParameterSet - -```powershell -Connect-Entra -[-ContextScope ] -[-Environment ] -[-ClientTimeout ] -[-EnvironmentVariable] -[-NoWelcome] -[] -``` - -## Description - -The `Connect-Entra` cmdlet connects to Microsoft Entra ID with an authenticated account. - -Several authentication scenarios are supported based on your use case, such as delegated (interactive) and app-only (non-interactive). - -`Connect-Entra` is an alias for `Connect-MgGraph`. - -## Examples - -### Example 1: Delegated access: Connect a PowerShell session to a tenant - -```powershell -Connect-Entra -``` - -This example shows how to connect your current PowerShell session to a Microsoft Entra ID tenant using credentials. - -### Example 2: Delegated access: Connect a PowerShell session to a tenant with required scopes - -```powershell -Connect-Entra -Scopes 'User.Read.All', 'Group.ReadWrite.All' -``` - -```Output -Welcome to Microsoft Graph! - -``` - -This example shows how to authenticate to Microsoft Entra ID with scopes. - -### Example 3: Delegated access: Using an access token - -```powershell -$secureString = ConvertTo-SecureString -String $AccessToken -AsPlainText -Force -Connect-Entra -AccessToken $secureString -``` - -```Output -Welcome to Microsoft Graph! -``` - -This example shows how to interactively authenticate to Microsoft Entra ID using an access token. - -For more information on how to get or create access token, see [Request an access token](https://learn.microsoft.com/graph/auth-v2-user#3-request-an-access-token). - -### Example 4: Delegated access: Using device code flow - -```powershell -Connect-Entra -UseDeviceCode -``` - -```Output -To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code A1B2CDEFGH to authenticate. -``` - -This example shows how to interactively authenticate to Microsoft Entra ID using device code flow. - -For more information, see [Device Code flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-device-code). - -### Example 5: App-only access: Using client credential with a Certificate thumbprint - -```powershell -$connectParams = @{ - TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' - ApplicationId = '00001111-aaaa-2222-bbbb-3333cccc4444' - CertificateThumbprint = 'AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00' -} - -Connect-Entra @connectParams -``` - -```Output -Welcome to Microsoft Graph! -``` - -This example shows how to authenticate using an ApplicationId and CertificateThumbprint. - -For more information on how to get or create CertificateThumbprint, see [Authenticate with app-only access](https://learn.microsoft.com/powershell/entra-powershell/app-only-access-auth). - -### Example 6: App-only access: Using client credential with a certificate name - -```powershell -$params = @{ - ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' - TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' - CertificateName = 'YOUR_CERT_SUBJECT' -} - -Connect-Entra @params -``` - -```powershell - $Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint - Connect-Entra -ClientId '' -TenantId '' -Certificate $Cert -``` - -You can find the certificate subject by running the above command. - -### Example 7: App-only access: Using client credential with a certificate - -```powershell -$Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint -$params = @{ - ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' - TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' - Certificate = $Cert -} - -Connect-Entra @params -``` - -### Example 8: App-only access: Using client secret credentials - -```powershell -$ClientSecretCredential = Get-Credential -Credential '00001111-aaaa-2222-bbbb-3333cccc4444' -# Enter client_secret in the password prompt. -Connect-Entra -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -ClientSecretCredential $ClientSecretCredential -``` - -This authentication method is ideal for background interactions. - -For more information on how to get credential, see [Get-Credential](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential) command. - -### Example 9: App-only access: Using managed identity: System-assigned managed identity - -```powershell -Connect-Entra -Identity -``` - -Uses an automatically managed identity on a service instance. The identity is tied to the lifecycle of a service instance. - -### Example 10: App-only access: Using managed identity: User-assigned managed identity - -```powershell -Connect-Entra -Identity -ClientId 'User_Assigned_Managed_identity_Client_Id' -``` - -Uses a user created managed identity as a standalone Azure resource. - -### Example 11: Connecting to an environment as a different identity - -```powershell -Connect-Entra -ContextScope 'Process' -``` - -```Output -Welcome to Microsoft Graph! -``` - -To connect as a different identity other than CurrentUser, specify the ContextScope parameter with the value Process. - -For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/microsoft.graph.entra/get-entracontext) command. - -### Example 12: Connecting to an environment or cloud - -```powershell -Get-EntraEnvironment -``` - -```Output -Name AzureADEndpoint GraphEndpoint Type ----- --------------- ------------- ---- -China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in -Global https://login.microsoftonline.com https://graph.microsoft.com Built-in -USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in -USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in -``` - -```powershell -Connect-Entra -Environment 'Global' -``` - -When you use Connect-Entra, you can choose to target other environments. By default, Connect-Entra targets the global public cloud. - -### Example 13: Sets the HTTP client timeout in seconds - -```powershell - Connect-Entra -ClientTimeout 60 -``` - -```Output -Welcome to Microsoft Graph! -``` - -This example Sets the HTTP client timeout in seconds. - -### Example 14: Hides the welcome message - -```powershell -Connect-Entra -NoWelcome -``` - -This example hides the welcome message. - -### Example 15: Allows for authentication using environment variables - -```powershell -Connect-Entra -EnvironmentVariable -``` - -This example allows for authentication using environment variables. - -## Parameters - -### -CertificateThumbprint - -Specifies the certificate thumbprint of a digital public key X.509 certificate of a user account that has permission to perform this action. - -```yaml -Type: System.String -Parameter Sets: AppCertificateParameterSet -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientId - -Specifies the application ID of the service principal. - -```yaml -Type: System.String -Parameter Sets: UserParameterSet, IdentityParameterSet -Aliases: AppId, ApplicationId - -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -```yaml -Type: System.String -Parameter Sets: AppCertificateParameterSet -Aliases: AppId, ApplicationId - -Required: True -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TenantId - -Specifies the ID of a tenant. - -If you don't specify this parameter, the account is authenticated with the home tenant. - -You must specify the TenantId parameter to authenticate as a service principal or when using Microsoft account. - -```yaml -Type: System.String -Parameter Sets: UserParameterSet, AppCertificateParameterSet, AppSecretCredentialParameterSet -Aliases: Audience, Tenant - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AccessToken - -Specifies a bearer token for Microsoft Entra service. Access tokens do time out and you have to handle their refresh. - -```yaml -Type: SecureString -Parameter Sets: AccessTokenParameterSet -Aliases: -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientTimeout - -Sets the HTTP client timeout in seconds. - -```yaml -Type: System.Double -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ContextScope - -Determines the scope of authentication context. This ContextScope accepts `Process` for the current process, or `CurrentUser` for all sessions started by user. - -```yaml -Type: ContextScope -Accepted values: Process, CurrentUser -Parameter Sets: UserParameterSet, AppCertificateParameterSet, IdentityParameterSet, AppSecretCredentialParameterSet, EnvironmentVariableParameterSet -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Environment - -The name of the national cloud environment to connect to. By default global cloud is used. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: EnvironmentName, NationalCloud -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -NoWelcome - -Hides the welcome message. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scopes - -An array of delegated permissions to consent to. - -```yaml -Type: System.String[] -Parameter Sets: UserParameterSet -Aliases: -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UseDeviceCode - -Use device code authentication instead of a browser control. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: UserParameterSet -Aliases: UseDeviceAuthentication, DeviceCode, DeviceAuth, Device -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Certificate - -An X.509 certificate supplied during invocation. - -```yaml -Type: X509Certificate2 -Parameter Sets: AppCertificateParameterSet -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CertificateSubjectName - -The subject distinguished name of a certificate. The certificate is retrieved from the current user's certificate store. - -```yaml -Type: System.String -Parameter Sets: AppCertificateParameterSet -Aliases: CertificateSubject, CertificateName -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientSecretCredential - -The PSCredential object provides the application ID and client secret for service principal credentials. For more information about the PSCredential object, type Get-Help Get-Credential. - -```yaml -Type: PSCredential -Parameter Sets: AppSecretCredentialParameterSet -Aliases: SecretCredential, Credential -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -EnvironmentVariable - -Allows for authentication using environment variables configured on the host machine. See - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: EnvironmentVariableParameterSet -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Identity - -Sign-in using a managed identity - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: IdentityParameterSet -Aliases: ManagedIdentity, ManagedServiceIdentity, MSI -Required: False -Position: 1 -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction - -The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break. - -```yaml -Type: ActionPreference -Parameter Sets: (All) -Aliases: proga -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Disconnect-Entra](Disconnect-Entra.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md deleted file mode 100644 index 4cf9324306..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: Disconnect-Entra -description: This article provides details on the Disconnect-Entra Command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Disconnect-Entra - -schema: 2.0.0 ---- - -# Disconnect-Entra - -## Synopsis - -Disconnects the current session from a Microsoft Entra ID tenant. - -## Syntax - -```powershell -Disconnect-Entra - [] -``` - -## Description - -The Disconnect-Entra cmdlet disconnects the current session from a Microsoft Entra ID tenant. - -## Examples - -### Example 1: Disconnect your session from a tenant - -```powershell - Disconnect-Entra -``` - -```output -ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 -TenantId : bbbbcccc-1111-dddd-2222-eeee3333ffff -Scopes : {Agreement.ReadWrite.All, CustomSecAttributeDefinition.ReadWrite.All, TeamMember.Read.All...} -AuthType : AppOnly -TokenCredentialType : ClientCertificate -CertificateThumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00 -CertificateSubjectName : -Account : -AppName : MG_graph_auth -ContextScope : Process -Certificate : -PSHostVersion : 5.1.22621.2506 -ManagedIdentityId : -ClientSecret : -Environment : Global -``` - -This command disconnects your session from a tenant. - -## Parameters - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Connect-Entra](Connect-Entra.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md deleted file mode 100644 index 8ef326b326..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: Find-EntraPermission -description: This article provides details on the Find-EntraPermission command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Find-EntraPermission - -schema: 2.0.0 ---- - -# Find-EntraPermission - -## Synopsis - -Helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. - -## Syntax - -### Search - -```powershell -Find-EntraPermission - [-SearchString] - [-ExactMatch] - [-PermissionType ] - [-Online] - [-ProgressAction ] - [] -``` - -### All - -```powershell -Find-EntraPermission - [-PermissionType ] - [-Online] - [-All] - [-ProgressAction ] - [] -``` - -## Description - -The `Find-EntraPermission` cmdlet helps users determine the necessary permissions for resources and identify the appropriate permissions required for various commands. - -## Examples - -### Example 1: Get a list of all Application permissions - -```powershell -Find-EntraPermission application -``` - -```Output -PermissionType: Delegated - -Id Consent Name Description --- ------- ---- ----------- -c79f8feb-a9db-4090-85f9-90d820caa0eb Admin Application.Read.All Allows the app to read applications and service principals on behalf of the signed-in user. -bdfbf15f-ee85-4955-8675-146e8e5296b5 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. - -PermissionType: Application - -Id Consent Name Description --- ------- ---- ----------- -9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 Admin Application.Read.All Allows the app to read all applications and service principals without a signed-in user. -1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9 Admin Application.ReadWrite.All Allows the app to create, read, update and delete applications and service principals without a signed-in user. Does not allow management of consent grants. -18a4783c-866b-4cc7-a460-3d5e5662c884 Admin Application.ReadWrite.OwnedBy Allows the app to create other applications, and fully manage those applications (read, update, update application secrets and delete), without a signed-in user... -``` - -### Example 2. Get a list of permissions for the Read permissions - -```powershell -Find-EntraPermission application.Read | Format-List -``` - -```Output -Id : c79f8feb-a9db-4090-85f9-90d820caa0eb -PermissionType : Delegated -Consent : Admin -Name : Application.Read.All -Description : Allows the app to read applications and service principals on behalf of the signed-in user. - -Id : bdfbf15f-ee85-4955-8675-146e8e5296b5 -PermissionType : Delegated -Consent : Admin -Name : Application.ReadWrite.All -Description : Allows the app to create, read, update and delete applications and service principals on behalf of the signed-in user. Does not allow management of consent grants. - -Id : 9a5d68dd-52b0-4cc2-bd40-abcf44ac3a30 -PermissionType : Application -Consent : Admin -Name : Application.Read.All -Description : Allows the app to read all applications and service principals without a signed-in user. -``` - -### Example 3. Search for permissions with exact match - -```powershell -Find-EntraPermission -SearchString 'User.Read.All' -ExactMatch -``` - -```Output - PermissionType: Delegated - -Id Consent Name Description --- ------- ---- ----------- -a154be20-db9c-4678-8ab7-66f6cc099a59 Admin User.Read.All Allows the app to read the full set of profile properties, reports, and ma… - - PermissionType: Application - -Id Consent Name Description --- ------- ---- ----------- -df021288-bdef-4463-88db-98f22de89214 Admin User.Read.All Allows the app to read user profiles without a signed in user. -``` - -This example demonstrates how to search for permissions that exactly match a specified permission name. - -### Example 4. Get all permissions of the specified type - -```powershell -Find-EntraPermission -PermissionType 'Delegated' -``` - -```Output -Id Consent Name Description --- ------- ---- ----------- -ebfcd32b-babb-40f4-a14b-42706e83bd28 Admin AccessReview.Read.All Allows the app to read access re… -e4aa47b9-9a69-4109-82ed-36ec70d85ff1 Admin AccessReview.ReadWrite.All Allows the app to read, update, … -5af8c3f5-baca-439a-97b0-ea58a435e269 Admin AccessReview.ReadWrite.Membership Allows the app to read, -``` - -This example shows how to get all permissions of a specified type, for example, `Delegated` or `Application` permissions. - -## Parameters - -### -SearchString - -Specifies the filter for the permissions, for example, domain and scope. - -```yaml - -Type: System.String -Required: True -Position: Named -Default value: None -Accept pipeline input: True -Accept wildcard characters: False -``` - -### -All - -Sets if the cmdlet returns all parameters. - -```yaml - -Type: System.Management.Automation.SwitchParameter -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExactMatch - -Sets if Search String should be an exact match. - -```yaml - -Type: System.Management.Automation.SwitchParameter -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Online - -Use the -Online parameter with -SearchString in Find-MgGraphPermission to fetch the latest permissions from Microsoft Graph before searching. This ensures Find-MgGraphPermission returns accurate results by including any new permissions added for recent APIs. The command uses the existing Microsoft Graph connection established by Connect-MgGraph. If your connection lacks permissions to access this data or if there’s no network connectivity, the command fails. Once updated, Find-MgGraphPermission will continue using the refreshed permission list for future searches, even without the -Online parameter. - -```yaml - -Type: System.Management.Automation.SwitchParameter -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PermissionType - -Specifies the type of Permission, for example, Delegated or Application. - -```yaml - -Type: System.String -Required: False -Position: Named -Default value: Any -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProgressAction - -Specifics the progra option. - -```yaml -Type: System.Management.Automation.SwitchParameter -Aliases: progra -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md deleted file mode 100644 index 86085f8469..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraContext.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Get-EntraContext -description: This article provides details on the Get-EntraContext command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContext - -schema: 2.0.0 ---- - -# Get-EntraContext - -## Synopsis - -Retrieve information about your current session - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraContext - [-ProgressAction ] - [] -``` - -## Description - -`Get-EntraContext` is used to retrieve the details about your current session, which include: - -- ClientID -- TenantID -- Certificate Thumbprint -- Scopes consented to -- AuthType: Delegated or app-only -- AuthProviderType -- CertificateName -- Account -- AppName -- ContextScope -- Certificate -- PSHostVersion -- ClientTimeOut. - -`Get-EntraCurrentSessionInfo` is an alias for `Get-EntraContext`. - -## Examples - -### Example 1: Get the current session - -```powershell -Get-EntraContext -``` - -```Output -ClientId : 11112222-bbbb-3333-cccc-4444dddd5555 -TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee -CertificateThumbprint : -Scopes : {User.ReadWrite.All,...} -AuthType : Delegated -AuthProviderType : InteractiveAuthenticationProvider -CertificateName : -Account : SawyerM@Contoso.com -AppName : Microsoft Graph PowerShell -ContextScope : CurrentUser -Certificate : -PSHostVersion : 5.1.17763.1 -ClientTimeout : 00:05:00 -``` - -This example demonstrates how to retrieve the details of the current session. - -### Example 2: Get the current session scopes - -```powershell -Get-EntraContext | Select -ExpandProperty Scopes -``` - -```Output -AppRoleAssignment.ReadWrite.All -Directory.AccessAsUser.All -EntitlementManagement.ReadWrite.All -Group.ReadWrite.All -openid -Organization.Read.All -profile -RoleManagement.ReadWrite.Directory -User.Read -User.ReadWrite.All -``` - -Retrieves all scopes. - -## Parameters - -### -ProgressAction - -Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md deleted file mode 100644 index c5cf3a9139..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Get-EntraEnvironment -description: This article provides details on the Get-EntraEnvironment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraEnvironment - -schema: 2.0.0 ---- - -# Get-EntraEnvironment - -## Synopsis - -Gets global public Environments. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraEnvironment - [] -``` - -### GetByName - -```powershell -Get-EntraEnvironment - -Name - [] -``` - -## Description - -When you use `Connect-Entra`, you can choose to target other environments. By default, `Connect-Entra` targets the global public cloud. - -## Examples - -### Example 1: Get a list of public cloud environments - -```powershell -Get-EntraEnvironment -``` - -```Output -Name AzureADEndpoint GraphEndpoint Type ----- --------------- ------------- ---- -Global https://login.microsoftonline.com https://graph.microsoft.com Built-in -China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in -USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in -USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in -Germany https://login.microsoftonline.de https://graph.microsoft.de Built-in -Canary https://login.microsoftonline.com https://canary.graph.microsoft.com User-defined -``` - -This command retrieves a list of global public Environments. - -### Example 2: Get a specific environment created - -```powershell -Get-EntraEnvironment -Name 'Global' -``` - -```Output -Name AzureADEndpoint GraphEndpoint Type ----- --------------- ------------- ---- -Global https://login.microsoftonline.com https://graph.microsoft.com Built-in -``` - -This command retrieves an environment with the specified name. - -## Parameters - -### -Name - -Specifies the name of an environment - -```yaml - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraEnvironment](Add-EntraEnvironment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md deleted file mode 100644 index 2017e7aa8a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Reset-EntraStrongAuthenticationMethodByUpn -description: This article provides details on the Reset-EntraStrongAuthenticationMethodByUpn command. - - -ms.topic: reference -ms.date: 08/20/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn - -schema: 2.0.0 ---- - -# Reset-EntraStrongAuthenticationMethodByUpn - -## Synopsis - -Resets the strong authentication method using the User Principal Name (UPN). - -## Syntax - -```powershell -Reset-EntraStrongAuthenticationMethodByUpn - -UserPrincipalName - [] -``` - -## Description - -The `Reset-EntraStrongAuthenticationMethodByUpn` cmdlet resets the strong authentication method by using the User Principal Name (UPN). - -## Examples - -### Example 1: Resets the strong authentication method by using the User Principal Name - -```powershell -Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite', 'UserAuthenticationMethod.ReadWrite.All' -Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'SawyerM@contoso.com' -``` - -This example demonstrates how to reset the strong authentication method by using the User Principal Name (UPN). - -- `-UserPrincipalName` parameter specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. - -## Parameters - -### -UserPrincipalName - -Specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md deleted file mode 100644 index 3a375cf615..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: Revoke-EntraSignedInUserAllRefreshToken -description: This article provides details on the Revoke-EntraSignedInUserAllRefreshToken command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken - -schema: 2.0.0 ---- - -# Revoke-EntraSignedInUserAllRefreshToken - -## Synopsis - -Invalidates the refresh tokens issued to applications for the current user. - -## Syntax - -```powershell -Revoke-EntraSignedInUserAllRefreshToken - [] -``` - -## Description - -The `Revoke-EntraSignedInUserAllRefreshToken` cmdlet invalidates all the refresh tokens issued to applications for a user (and session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. - -The user or an administrator typically performs this operation if the user's device is lost or stolen. This action prevents access to the organization's data on the device by requiring the user to sign in again to all previously consented applications, regardless of the device. - -Note: If the application attempts to redeem a delegated access token for this user using an invalidated refresh token, the application receives an error. When this happens, the application needs to acquire a new refresh token by making a request to the authorized endpoint, which forces the user to sign in. - -After you run this command, a small delay of a few minutes can occur before tokens are revoked. - -## Examples - -### Example 1: Revoke refresh tokens for the current user - -```powershell -Connect-Entra -Scopes 'User.RevokeSessions.All' -Revoke-EntraSignedInUserAllRefreshToken -``` - -```Output -Value ------ -True -``` - -This command revokes the tokens for the current user. - -## Parameters - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Revoke-EntraUserAllRefreshToken](Revoke-EntraUserAllRefreshToken.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md deleted file mode 100644 index 364ce1fa3a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Revoke-EntraUserAllRefreshToken -description: This article provides details on the Revoke-EntraUserAllRefreshToken command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken -schema: 2.0.0 ---- - -# Revoke-EntraUserAllRefreshToken - -## Synopsis - -Invalidates the refresh tokens issued to applications for a user. - -## Syntax - -```powershell -Revoke-EntraUserAllRefreshToken - -UserId - [] -``` - -## Description - -The `Revoke-EntraUserAllRefreshToken` cmdlet invalidates the refresh tokens issued to applications for a user. - -The cmdlet also invalidates tokens issued to session cookies in a browser for the user. - -The cmdlet operates by resetting the refreshTokensValidFromDateTime user property to the current date and time. - -This operation is usually performed by the user or an administrator if the user's device is lost or stolen. It blocks access to the organization's data by requiring the user to sign in again to all previously authorized applications, regardless of the device. - -## Examples - -### Example 1: Revoke refresh tokens for a user - -```powershell -Connect-Entra -Scopes 'User.RevokeSessions.All' -Revoke-EntraUserAllRefreshToken -UserId 'SawyerM@contoso.com' -``` - -```Output -Value ------ -True -``` - -This example demonstrates how to revoke the tokens for the specified user. - -- `-UserId` parameter specifies the unique identifier of a user. - -## Parameters - -### -UserId - -Specifies the unique ID of a user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Revoke-EntraSignedInUserAllRefreshToken](Revoke-EntraSignedInUserAllRefreshToken.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md deleted file mode 100644 index 7049899b74..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Add-EntraAdministrativeUnitMember -description: This article provides details on the Add-EntraAdministrativeUnitMember command. - - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember - -schema: 2.0.0 ---- - -# Add-EntraAdministrativeUnitMember - -## Synopsis - -Adds an administrative unit member. - -## Syntax - -```powershell -Add-EntraAdministrativeUnitMember - -RefObjectId - -AdministrativeUnitId - [] -``` - -## Description - -The `Add-EntraAdministrativeUnitMember` cmdlet adds a Microsoft Entra ID administrative unit member. - -Administrative units enable more granular management of permissions and access, particularly in large organizations or where administrative responsibilities are divided across departments or regions. - -To add a user, group, or device to an administrative unit, the calling principal must be assigned at least the Privileged Role Administrator Microsoft Entra role. - -## Examples - -### Example 1: Add user as an administrative unit member - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$User = Get-EntraUser -UserId 'SawyerM@contoso.com' -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - RefObjectId = $User.ObjectId -} -Add-EntraAdministrativeUnitMember @params -``` - -This example shows how to add an administrative unit member. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit ID. You can use the command `Get-EntraUser` to get user ID. - -- `AdministrativeUnitId` parameter specifies the ID of an administrative unit. -- `RefObjectId` parameter specifies the ID of the user or group you want to add as a member of the administrative unit. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of a Microsoft Entra ID administrative unit. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the unique ID of the specific Microsoft Entra ID object that are as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) - -[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md deleted file mode 100644 index 59f40bdbf9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -title: Add-EntraCustomSecurityAttributeDefinitionAllowedValue -description: This article provides details on the Add-EntraCustomSecurityAttributeDefinitionAllowedValue command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue -schema: 2.0.0 ---- - -# Add-EntraCustomSecurityAttributeDefinitionAllowedValue - -## Synopsis - -Adds a predefined value for a custom security attribute definition. - -## Syntax - -```powershell -Add-EntraCustomSecurityAttributeDefinitionAllowedValue - -CustomSecurityAttributeDefinitionId - -Id - -IsActive - [] -``` - -## Description - -The `Add-EntraCustomSecurityAttributeDefinitionAllowedValue` adds a predefined value for a Microsoft Entra ID custom security attribute definition. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. - -## Examples - -### Example 1: Add a predefined value for a Microsoft Entra ID custom security attribute definition - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$CustomSecurityAttributeDefinitionId = (Get-EntraCustomSecurityAttributeDefinition -Id '').Id -$params = @{ - CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinitionId - Id = 'Alpine' - IsActive = $true -} -Add-EntraCustomSecurityAttributeDefinitionAllowedValue @params -``` - -```Output - -Id IsActive --- -------- -Alpine True -``` - -This example adds a predefined value to a custom security attribute definition. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use the command `Get-EntraCustomSecurityAttributeDefinition` to get the ID. -- `-Id` parameter specifies the identifier for the predefined value. -- `-IsActive` parameter specifies the predefined value is active or deactivated. - -## Parameters - -### -CustomSecurityAttributeDefinitionId - -The unique identifier for a custom security attribute definition in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters aren't. This identifier is case sensitive, can't be changed later, and is required. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsActive - -Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any another supported directory objects. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -`Add-EntraCustomSecurityAttributeDefinitionAllowedValues` is an alias for `Add-EntraCustomSecurityAttributeDefinitionAllowedValue`. - -## Related Links - -[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) - -[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md deleted file mode 100644 index b0f4c794f1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: Add-EntraDeviceRegisteredOwner -description: This article provides details on the Add-EntraDeviceRegisteredOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner - -schema: 2.0.0 ---- - -# Add-EntraDeviceRegisteredOwner - -## Synopsis - -Adds a registered owner for a device. - -## Syntax - -```powershell -Add-EntraDeviceRegisteredOwner - -DeviceId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraDeviceRegisteredOwner` cmdlet adds a registered owner for a Microsoft Entra ID device. - -## Examples - -### Example 1: Add a user as a registered user - -```powershell -Connect-Entra -Scopes 'Device.ReadWrite.All' -$User = Get-EntraUser -UserId 'SawyerM@contoso.com' -$Device = Get-EntraDevice -SearchString '' -$params = @{ - DeviceId = $Device.ObjectId - RefObjectId = $User.ObjectId -} -Add-EntraDeviceRegisteredOwner @params -``` - -This example shows how to add a registered user to a device. - -- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. - -- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. - -## Parameters - -### -DeviceId - -Specifies the object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Active Directory object to add. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) - -[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md deleted file mode 100644 index 354cbf34c6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Add-EntraDeviceRegisteredUser -description: This article provides details on the Add-EntraDeviceRegisteredUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser - -schema: 2.0.0 ---- - -# Add-EntraDeviceRegisteredUser - -## Synopsis - -Adds a registered user for a device. - -## Syntax - -```powershell -Add-EntraDeviceRegisteredUser - -DeviceId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraDeviceRegisteredUser` cmdlet adds a registered user for a Microsoft Entra ID device. - -## Examples - -### Example 1: Add a user as a registered user - -```powershell -Connect-Entra -Scopes 'Device.ReadWrite.All' -$User = Get-EntraUser -UserId 'SawyerM@contoso.com' -$Device = Get-EntraDevice -SearchString '' -$params = @{ - DeviceId = $Device.ObjectId - RefObjectId = $User.ObjectId -} -Add-EntraDeviceRegisteredUser @params -``` - -This example shows how to add a registered user to a device. - -- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraDevice` to get device Id. - -- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraUser` to get user Id. - -## Parameters - -### -DeviceId - -Specifies the ID of the device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDevice](Get-EntraDevice.md) - -[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) - -[Get-EntraUser](Get-EntraUser.md) - -[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md deleted file mode 100644 index d163b40171..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Add-EntraDirectoryRoleMember -description: This article provides details on the Add-EntraDirectoryRoleMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember - -schema: 2.0.0 ---- - -# Add-EntraDirectoryRoleMember - -## Synopsis - -Adds a member to a directory role. - -## Syntax - -```powershell -Add-EntraDirectoryRoleMember - -DirectoryRoleId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraDirectoryRoleMember` cmdlet adds a member to a Microsoft Entra ID role. - -## Examples - -### Example 1: Add a member to a Microsoft Entra ID role - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$params = @{ - DirectoryRoleId = '019ea7a2-1613-47c9-81cb-20ba35b1ae48' - RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' -} -Add-EntraDirectoryRoleMember @params -``` - -This example adds a member to a directory role. - -- `DirectoryRoleId` parameter specifies the ID of the directory role to which the member is added. Use the Get-EntraDirectoryRole command to retrieve the details of the directory role. -- `RefObjectId` parameter specifies the ID of Microsoft Entra ID object to assign as owner/manager/member. - -## Parameters - -### -DirectoryRoleId - -Specifies the ID of a directory role in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) - -[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md deleted file mode 100644 index 2919fc8285..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Add-EntraScopedRoleMembership -description: This article provides details on the Add-EntraScopedRoleMembership command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership - -schema: 2.0.0 ---- - -# Add-EntraScopedRoleMembership - -## Synopsis - -Assign a Microsoft Entra role with an administrative unit scope. - -## Syntax - -```powershell -Add-EntraScopedRoleMembership - -AdministrativeUnitId - [-RoleObjectId ] - [-RoleMemberInfo ] - [] -``` - -## Description - -The `Add-EntraScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership. - -For delegated scenarios, the calling user needs at least the Privileged Role Administrator Microsoft Entra role. - -## Examples - -### Example 1: Add a scoped role membership to an administrative unit - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$User = Get-EntraUser -SearchString 'MarkWood' -$Role = Get-EntraDirectoryRole -Filter "DisplayName eq ''" -$Unit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo -$RoleMember.ObjectId = $User.ObjectId -$params = @{ - AdministrativeUnitId = $Unit.ObjectId - RoleObjectId = $Role.ObjectId - RoleMemberInfo = $RoleMember -} -Add-EntraScopedRoleMembership @params -``` - -```Output -Id AdministrativeUnitId RoleId --- -------------------- ------ -dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -The example shows how to add a user to the specified role within the specified administrative unit. - -- `-AdministrativeUnitId` Parameter specifies the ID of an administrative unit. -- `-RoleObjectId` Parameter specifies the ID of a directory role. -- `-RoleMemberInfo` Parameter specifies a RoleMemberInfo object. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RoleMemberInfo - -Specifies a RoleMemberInfo object. - -```yaml -Type: System.RoleMemberInfo -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RoleObjectId - -Specifies the ID of a directory role. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) - -[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md deleted file mode 100644 index da02de22be..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Confirm-EntraDomain -description: This article provides details on the Confirm-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Confirm-EntraDomain - -schema: 2.0.0 ---- - -# Confirm-EntraDomain - -## Synopsis - -Validate the ownership of a domain. - -## Syntax - -```powershell -Confirm-EntraDomain - -Name - [-CrossCloudVerificationCode ] - [] -``` - -## Description - -The `Confirm-EntraDomain` cmdlet validates the ownership of a Microsoft Entra ID domain. - -The work or school account needs to belong to at least the **Domain Name Administrator** Microsoft Entra role. - -## Examples - -### Example 1: Confirm the domain - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Confirm-EntraDomain -Name Contoso.com -``` - -This example verifies a domain and updates its status to `verified`. - -### Example 2: Confirm the domain with a cross cloud verification code - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Confirm-EntraDomain -Name Contoso.com -CrossCloudVerificationCode ms84324896 -``` - -This example confirms a domain in dual federation scenarios. - -## Parameters - -### -Name - -Specifies the name of the domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -CrossCloudVerificationCode - -The cross-cloud domain verification code. - -```yaml -Type: CrossCloudVerificationCodeBody -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDomain](Get-EntraDomain.md) - -[New-EntraDomain](New-EntraDomain.md) - -[Remove-EntraDomain](Remove-EntraDomain.md) - -[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md deleted file mode 100644 index f1d4bcccd1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: Enable-EntraDirectoryRole -description: This article provides details on the Enable-EntraDirectoryRole command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraDirectoryRole - -schema: 2.0.0 ---- - -# Enable-EntraDirectoryRole - -## Synopsis - -Activates an existing directory role in Microsoft Entra ID. - -## Syntax - -```powershell -Enable-EntraDirectoryRole - [-RoleTemplateId ] - [] -``` - -## Description - -The `Enable-EntraDirectoryRole` cmdlet activates an existing directory role in Microsoft Entra ID. - -The Company Administrators and the default user directory roles (User, Guest User, and Restricted Guest User) are activated by default. To access and assign members to other directory roles, you must first activate them using their corresponding directory role template ID. - -## Examples - -### Example 1: Enable a directory role - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$InviterRole = Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Guest Inviter'} -Enable-EntraDirectoryRole -RoleTemplateId $InviterRole.ObjectId -``` - -```Output -DeletedDateTime Id Description DisplayName RoleTemplateId ---------------- -- ----------- ----------- -------------- - b5baa59b-86ab-4053-ac3a-0396116d1924 Guest Inviter has access to invite guest users. Guest Inviter 92ed04bf-c94a-4b82-9729-b799a7a4c178 -``` - -The example shows how to enable the directory role. - -You can use `Get-EntraDirectoryRoleTemplate` to fetch a specific directory role to activate. - -- `RoleTemplateId` parameter specifies the ID of the role template to enable. - -## Parameters - -### -RoleTemplateId - -The ID of the Role template to enable. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For additional details see [Activate directoryRole](/graph/api/directoryrole-post-directoryroles). - -## Related Links - -[Get-EntraDirectoryRole](Get-EntraDirectoryRole.md) - -[Get-EntraDirectoryRoleTemplate](Get-EntraDirectoryRoleTemplate.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md deleted file mode 100644 index 9271fdef45..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-CrossCloudVerificationCode.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -title: Get-CrossCloudVerificationCode -description: This article provides details on the Get-CrossCloudVerificationCode command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode - -schema: 2.0.0 ---- - -# Get-CrossCloudVerificationCode - -## Synopsis -Gets the verification code used to validate the ownership of the domain in another connected cloud. -Important: Only applies to a verified domain. - -## Syntax - -```powershell -Get-CrossCloudVerificationCode - -Name - [] -``` - -## Description - -## Examples - -### Example 1: Get the cross cloud verification code -```powershell -PS C:\>Get-CrossCloudVerificationCode -Name Contoso.com -``` - -This command returns a string that can be used to enable cross cloud federation scenarios. - -## Parameters - -### -Name -Specifies the name of a domain. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.GetCrossCloudVerificationCodeResponse -## Notes - -## RELATED LINKS \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md deleted file mode 100644 index d6e6628eca..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Get-EntraAccountSku -description: This article provides details on the Get-EntraAccountSku command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAccountSku - -schema: 2.0.0 ---- - -# Get-EntraAccountSku - -## Synopsis - -Retrieves all the SKUs for a company. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraAccountSku - [] -``` - -### GetById - -```powershell -Get-EntraAccountSku - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraAccountSku` retrieves the list of commercial subscriptions acquired by an organization. - -For a list of license names in the Microsoft Entra or Microsoft 365 admin centers and their corresponding Microsoft Graph `skuId` and `skuPartNumber` properties, refer to the [mapping information](https://learn.microsoft.com/entra/identity/users/licensing-service-plan-reference). - -## Examples - -### Example 1: Gets a list of SKUs - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraAccountSku -``` - -```Output -Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber --- --------- ----------- --------- ---------------- ------------- ----- ------- -eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… -ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… -dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… -``` - -This command returns a list of SKUs. - -### Example 2: Gets a list of SKUs by TenantId - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraAccountSku -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -``` - -```Output -Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber --- --------- ----------- --------- ---------------- ------------- ----- ------- -eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… -ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… -dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… -``` - -This command returns a list of SKUs for a specified tenant. - -- `-TenantId` parameter specifies the unique ID of the tenant. - -## Parameters - -### -TenantId - -The unique ID of the tenant to perform the operation on. -If this isn't provided, then the value will default to the tenant of the current user. -This parameter is only applicable to partner users. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md deleted file mode 100644 index 0c85fb6da1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.md +++ /dev/null @@ -1,237 +0,0 @@ ---- -title: Get-EntraAdministrativeUnit -description: This article provides details on the Get-EntraAdministrativeUnit command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit -schema: 2.0.0 ---- - -# Get-EntraAdministrativeUnit - -## Synopsis - -Gets an administrative unit. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraAdministrativeUnit - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraAdministrativeUnit - -AdministrativeUnitId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraAdministrativeUnit` cmdlet gets a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameter to get a specific administrative unit. - -## Examples - -### Example 1: Get all administrative units - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName - cccccccc-2222-3333-4444-dddddddddddd testdemo test1 - bbbbbbbb-1111-2222-3333-cccccccccccc TestAU - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 -``` - -This command gets all the administrative units. - -### Example 2: Get all administrative units using '-All' parameter - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -All -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - dddddddd-3333-4444-5555-eeeeeeeeeeee Updated Description Updated DisplayName - cccccccc-2222-3333-4444-dddddddddddd testdemo test1 - bbbbbbbb-1111-2222-3333-cccccccccccc TestAU - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test_130624_09 - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb demotest test111 -``` - -This command gets all the administrative units. - -### Example 3: Get a specific administrative unit - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -AdministrativeUnitId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName -``` - -This example returns the details of the specified administrative unit. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -### Example 4: Get administrative units filter by display name - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -Filter "DisplayName eq 'DAU-Test'" -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test -``` - -This example list of administrative units containing display name with the specified name. - -### Example 5: Get top one administrative unit - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -Get-EntraAdministrativeUnit -Top 1 -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Dynamic AU testing in CORP tenant DAU-Test -``` - -This example returns the specified top administrative units. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter filters which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) - -[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) - -[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md deleted file mode 100644 index 99c4fe82d9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.md +++ /dev/null @@ -1,193 +0,0 @@ ---- -title: Get-EntraAdministrativeUnitMember -description: This article provides details on the Get-EntraAdministrativeUnitMember command. - - -ms.topic: reference -ms.date: 07/30/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember - -schema: 2.0.0 ---- - -# Get-EntraAdministrativeUnitMember - -## Synopsis - -Gets a member of an administrative unit. - -## Syntax - -```powershell -Get-EntraAdministrativeUnitMember - -AdministrativeUnitId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraAdministrativeUnitMember` cmdlet gets a member of a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameters to retrieve an administrative unit member. - -In delegated scenarios with work or school accounts, the signed-in user must either be a member user or be assigned a supported Microsoft Entra role, or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: - -- Directory Readers: Read basic properties on administrative units -- Global Reader: Read all properties of administrative units, including members -- Privileged Role Administrator: Create and manage administrative units (including members) - -## Examples - -### Example 1: Get an administrative unit member by AdministrativeUnitId - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -ffffffff-5555-6666-7777-aaaaaaaaaaaa -``` - -This example returns the list of administrative unit members from specified administrative unit AdministrativeUnitId. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -### Example 2: Get all administrative unit members by AdministrativeUnitId - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -ffffffff-5555-6666-7777-aaaaaaaaaaaa -``` - -This example returns the list of all administrative unit members from specified administrative unit AdministrativeUnitId. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -### Example 3: Get top three administrative unit members by AdministrativeUnitId - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Get-EntraAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -Top 3 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example returns top three administrative unit members from specified administrative unit AdministrativeUnitId. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) - -[Remove-EntraAdministrativeUnitMember](Remove-EntraAdministrativeUnitMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md deleted file mode 100644 index 7b235ab88d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: Get-EntraAttributeSet -description: This article provides details on the Get-EntraAttributeSet command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAttributeSet - -schema: 2.0.0 ---- - -# Get-EntraAttributeSet - -## Synopsis - -Gets a list of attribute sets. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraAttributeSet - [] -``` - -### GetById - -```powershell -Get-EntraAttributeSet - -AttributeSetId - [] -``` - -## Description - -The `Get-EntraAttributeSet` cmdlet gets a list of Microsoft Entra ID attribute sets. - -In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The supported roles for this operation are: - -- Attribute Assignment Reader -- Attribute Definition Reader -- Attribute Assignment Administrator -- Attribute Definition Administrator - -By default, other administrator roles cannot read, define, or assign custom security attributes. - -## Examples - -### Example 1: Get an all attribute sets - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -Get-EntraAttributeSet -``` - -```Output -Id Description MaxAttributesPerSet --- ----------- ------------------- -Engineering Attributes for cloud engineering team 25 -Contoso Attributes for Contoso 25 -``` - -This example returns all attribute sets. - -### Example 2: Get an attribute sets - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -Get-EntraAttributeSet -AttributeSetId 'Testing' -``` - -```Output -Id Description MaxAttributesPerSet --- ----------- ------------------- -Testing Attributes for engineering team 10 -``` - -This example demonstrates how to retrieve an attribute set by Id. - -- `AttributeSetId` parameter specifies the unique identifier for the attribute set within a tenant. - -## Parameters - -### -AttributeSetId - -Unique identifier for the attribute set within a tenant. - -This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraAttributeSet](New-EntraAttributeSet.md) - -[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md deleted file mode 100644 index fb0bcb0cb5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.md +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: Get-EntraContact -description: This article provides details on the Get-EntraContact command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContact - -schema: 2.0.0 ---- - -# Get-EntraContact - -## Synopsis - -Gets a contact from Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraContact - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraContact - -OrgContactId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraContact` cmdlet gets a contact from Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve all contact objects in the directory - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 -Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 -Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 -``` - -This example retrieves all contact objects in the directory. - -### Example 2: Retrieve specific contact object in the directory - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -OrgContactId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -``` - -This example retrieves specified contact in the directory. - -- `-OrgContactId` parameter specifies the contact Id. - -### Example 3: Retrieve all contacts objects in the directory - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -All -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 -Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 -Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 -``` - -This example retrieves all the contacts in the directory. - -### Example 4: Retrieve top two contacts objects in the directory - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -Top 2 -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 -``` - -This example retrieves top two contacts in the directory. - -### Example 5: Retrieve all contacts objects in the directory filter by DisplayName - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -``` - -```Output -DisplayName Id Mail MailNickname ------------ -- ---- ------------ -Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact -Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 -Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 -Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 -``` - -This example retrieves contacts having the specified display name. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OrgContactId - -Specifies the ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraContact](Remove-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md deleted file mode 100644 index 5ba96a392d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.md +++ /dev/null @@ -1,159 +0,0 @@ ---- -title: Get-EntraContactDirectReport -description: This article provides details on the Get-EntraContactDirectReport command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactDirectReport - -schema: 2.0.0 ---- - -# Get-EntraContactDirectReport - -## Synopsis - -Get the direct reports for a contact. - -## Syntax - -```powershell -Get-EntraContactDirectReport - -OrgContactId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraContactDirectReport` cmdlet gets the direct reports for a contact. - -## Examples - -### Example 1: Get the direct reports of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraBetaContact -Top 1 -Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -``` - -This example shows how to retrieve direct reports for an organizational contact. - -You can use the command `Get-EntraBetaContact` to get organizational contact. - -- `-OrgContactId` parameter specifies the contact Id. - -### Example 2: Get all direct reports of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraBetaContact -Top 1 -Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -All -``` - -This example shows how to retrieve all direct reports for an organizational contact. - -- `-OrgContactId` parameter specifies the contact Id. - -### Example 3: Get top two direct reports of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraBetaContact -Top 1 -Get-EntraContactDirectReport -OrgContactId $Contact.ObjectId -Top 2 -``` - -This example shows how to retrieve top two direct reports for an organizational contact. - -- `-OrgContactId` parameter specifies the contact Id. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OrgContactId - -Specifies the ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md deleted file mode 100644 index 9aba156048..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: Get-EntraContactManager -description: This article provides details on the Get-EntraContactManager command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactManager - -schema: 2.0.0 ---- - -# Get-EntraContactManager - -## Synopsis - -Gets the manager of a contact. - -## Syntax - -```powershell -Get-EntraContactManager - -OrgContactId - [-Property ] - [] -``` - -## Description - -The `Get-EntraContactManager` cmdlet gets the manager of a contact in Microsoft Entra ID. - -## Examples - -### Example 1: Get the manager of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Top 1 -Get-EntraContactManager -OrgContactId $Contact.ObjectId -``` - -The example demonstrates how to retrieve the manager of a contact. You can use the command `Get-EntraContact` to get organizational contact. - -- `-OrgContactId` parameter specifies the contact Id. - -## Parameters - -### -OrgContactId - -Specifies the ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: OrgContactId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md deleted file mode 100644 index e09631eec8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: Get-EntraContactMembership -description: This article provides details on the Get-EntraContactMembership command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactMembership - -schema: 2.0.0 ---- - -# Get-EntraContactMembership - -## Synopsis - -Get a contact membership. - -## Syntax - -```powershell -Get-EntraContactMembership - -OrgContactId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraContactMembership` cmdlet gets a contact membership in Microsoft Entra ID. - -This command is useful to administrators who need to understand which groups, roles, or administrative units a particular contact belongs to. This can be important for troubleshooting access issues, auditing memberships, and ensuring that contact memberships are correctly configured. - -## Examples - -### Example 1: Get the memberships of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -Get-EntraContactMembership -OrgContactId $Contact.ObjectId -``` - -```Output -Id DeletedDateTime --- --------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb -bbbbbbbb-7777-8888-9999-cccccccccccc -``` - -This command gets all the memberships for specified contact. - -### Example 2: Get all memberships of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -Get-EntraContactMembership -OrgContactId $Contact.ObjectId -All -``` - -```Output -Id DeletedDateTime --- --------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb -bbbbbbbb-7777-8888-9999-cccccccccccc -``` - -This command gets all the memberships for specified contact. - -### Example 3: Get top two memberships of a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -Get-EntraContactMembership -OrgContactId $Contact.ObjectId -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb -``` - -This command gets top two memberships for specified contact. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OrgContactId - -Specifies the ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md deleted file mode 100644 index ab173d765b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactThumbnailPhoto.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -title: Get-EntraContactThumbnailPhoto -description: This article provides details on the Get-EntraContactThumbnailPhoto command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto - -schema: 2.0.0 ---- - -# Get-EntraContactThumbnailPhoto - -## Synopsis - -Retrieves the thumbnail photo of a contact. - -## Syntax - -```powershell -Get-EntraContactThumbnailPhoto - -ObjectId - [-FilePath ] - [-FileName ] - [-View ] - [] -``` - -## Description - -Retrieves the thumbnail photo of a contact. - -## Examples - -### Example 1: Get the memberships of a contact - -```powershell -Connect-Entra -Scopes 'Contacts.Read' -Get-EntraContactThumbnailPhoto -ObjectId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```output -Tag : -PhysicalDimension : {Width=279, Height=390} -Size : {Width=279, Height=390} -Width : 279 -Height : 390 -HorizontalResolution : 96 -VerticalResolution : 96 -Flags : 77840 -RawFormat : [ImageFormat: aaaa0000-bb11-2222-33cc-444444dddddd] -PixelFormat : Format24bppRgb -Palette : System.Drawing.Imaging.ColorPalette -FrameDimensionsList : {eeee4444-ff55-6666-77aa-888888bbbbbb} -PropertyIdList : {274, 305, 306, 36867...} -PropertyItems : {274, 305, 306, 36867...} -``` - -This example retrieves the thumbnail photo of the contact object specified with the object ID parameter. - -## Parameters - -### -FileName - -When provided, the cmdlet writes a copy of the thumbnail photo to this filename. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -FilePath - -When provided, the cmdlet writes a copy of the thumbnail photo to this file path using a random filename. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -The object ID of the contact for which the thumbnail photo is retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -View - -If this parameter value is set to $True, display the retrieved thumbnail photo in a new window. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Boolean - -## Outputs - -### System.Object - -## Notes - -## RELATED LINKS diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md deleted file mode 100644 index c65dae7c2b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: Get-EntraContract -description: This article provides details on the Get-EntraContract command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContract - -schema: 2.0.0 ---- - -# Get-EntraContract - -## Synopsis - -Gets a contract. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraContract - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraContract - -ContractId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraContract` cmdlet gets a contract information associated to a partner tenant. - -The contract object contains the following attributes: - -- `contractType` - type of the contract. - -Possible values are: - -1. SyndicationPartner - indicates a partner that exclusively resells and manages O365 and Intune for this customer. -They resell and support their customers. -1. BreadthPartner - indicates that the partner has the ability to provide administrative support for this customer. -However the partner isn't allowed to resell to the customer. -1. ResellerPartner - indicates a partner that is similar to a syndication partner, except that it doesn't have exclusive access to a tenant. In the syndication case, the customer can't buy additional direct subscriptions from Microsoft or from other partners. - -- `customerContextId` - unique identifier for the customer tenant referenced by this partnership. - -Corresponds to the ObjectId property of the customer tenant's TenantDetail object. - -- `defaultDomainName` - a copy of the customer tenant's default domain name. -The copy is made when the partnership with the customer is established. -It isn't automatically updated if the customer tenant's default domain name changes. - -- `deletionTimestamp` - this property isn't valid for contracts and always returns null. - -- `displayName` - a copy of the customer tenant's display name. -The copy is made when the partnership with the customer is established. -It isn't automatically updated if the customer tenant's display name changes. - -- `objectType` - a string that identifies the object type. The value is always `Contract`. - -- `ContractId` - the unique identifier for the partnership. - -## Examples - -### Example 1: Get all contracts in the directory - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraContract -``` - -This command gets all contracts in the Microsoft Entra ID. - -### Example 2: Get top two contracts in the directory - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraContract -Top 2 -``` - -This command gets top two contracts in the Microsoft Entra ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ContractId - -Specifies the ID of a contract. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md deleted file mode 100644 index ec88ceccfd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: Get-EntraCustomSecurityAttributeDefinition -description: This article provides details on the Get-EntraCustomSecurityAttributeDefinition command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition -schema: 2.0.0 ---- - -# Get-EntraCustomSecurityAttributeDefinition - -## Synopsis - -Gets a list of custom security attribute definitions. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraCustomSecurityAttributeDefinition - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraCustomSecurityAttributeDefinition - -Id - [-Property ] - [] -``` - -## Description - -Gets a list of Microsoft Entra ID custom security attribute definitions. Specify `Id` parameter to get a list of custom security attribute definitions. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following privileged roles are supported for this operation: - -- Attribute Assignment Reader -- Attribute Definition Reader -- Attribute Assignment Administrator -- Attribute Definition Administrator - -## Examples - -### Example 1: Get a list of all custom security attribute definitions - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' -Get-EntraCustomSecurityAttributeDefinition -``` - -```Output -Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly --- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- -Engineering_newvalue Engineering New Eng Value True True NewValue Available String False -Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False -``` - -This example returns all custom security attribute definitions. - -### Example 2: Get a specific custom security attribute definition - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' -Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_ProjectDate' -``` - -```Output -Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly --- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- -Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False -``` - - This example returns a specific custom security attribute definition. - -- `Id` parameter specifies the custom security attribute definition object ID. - -## Parameters - -### -Id - -The unique identifier of a Microsoft Entra ID custom security attribute definition object. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) - -[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md deleted file mode 100644 index e043e38f4b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: Get-EntraCustomSecurityAttributeDefinitionAllowedValue -description: This article provides details on the Get-EntraCustomSecurityAttributeDefinitionAllowedValue command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue -schema: 2.0.0 ---- - -# Get-EntraCustomSecurityAttributeDefinitionAllowedValue - -## Synopsis - -Gets the predefined value for a custom security attribute definition. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraCustomSecurityAttributeDefinitionAllowedValue - -CustomSecurityAttributeDefinitionId - [-Filter ] - [] -``` - -### GetById - -```powershell -Get-EntraCustomSecurityAttributeDefinitionAllowedValue - -CustomSecurityAttributeDefinitionId - -Id - [] -``` - -## Description - -The `Get-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdley gets the predefined value for a Microsoft Entra ID custom security attribute definition. Specify `CustomSecurityAttributeDefinitionId` parameter to get the predefined value custom security attribute definition. - -The signed-in user must be assigned one of the following directory roles: - -- Attribute Definition Reader -- Attribute Definition Administrator - -## Examples - -### Example 1: Get all predefined values - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' -Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $CustomSecurityAttributeDefinition.Id -``` - -```Output -Id IsActive --- -------- -Apline True -``` - -This example retrieves an all predefined values. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. - -### Example 2: Get predefined value with ID parameter - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' -$params = @{ - CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id - Id = 'Alpine' -} -Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params -``` - -```Output -id isActive --- -------- -Apline True -``` - -This example retrieves a specific predefined value. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. -- `-Id` parameter specifies the ID of Microsoft Entra ID Object. - -### Example 3: Get predefined value with Filter parameter - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$CustomSecurityAttributeDefinition = Get-EntraCustomSecurityAttributeDefinition -Id '' -$params = @{ - CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id - Filter = "Id eq 'Apline'" -} -Get-EntraCustomSecurityAttributeDefinitionAllowedValue @params -``` - -```Output -id isActive --- -------- -Apline True -``` - -This example Get a predefined value with Filter. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. - -## Parameters - -### -CustomSecurityAttributeDefinitionId - -The unique identifier of a custom security attribute definition in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -Filter items by property values. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters are not. This identifier is case sensitive, cannot be changed later, and is required. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) - -[Set-EntraCustomSecurityAttributeDefinitionAllowedValue](Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md deleted file mode 100644 index 099bb99475..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -title: Get-EntraDeletedDirectoryObject -description: This article provides details on the Get-EntraDeletedDirectoryObject command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject - -schema: 2.0.0 ---- - -# Get-EntraDeletedDirectoryObject - -## Synopsis - -Retrieves a soft deleted directory object from the directory. - -## Syntax - -```powershell -Get-EntraDeletedDirectoryObject - -DirectoryObjectId - [-Property ] - [] -``` - -## Description - -The `Get-EntraDeletedDirectoryObject` cmdlet retrieves a soft deleted directory object from the directory. -Note that soft delete for groups is currently only implemented for Unified Groups (also known as -Office 365 Groups). - -## Examples - -### Example 1: Retrieve a deleted directory object. - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' -Get-EntraDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 2/2/2024 5:33:56 AM -``` - -This example shows how to retrieve the deleted directory object from the directory. - -- `-DirectoryObjectId` parameter specifies the Id of the directory object to retrieve. - -### Example 2: Retrieve a deleted directory object with more details. - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' -Get-EntraDeletedDirectoryObject -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' | Format-Table -Property Id, displayName, '@odata.type' -AutoSize -``` - -```Output -Id displayName @odata.type --- ----------- ----------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Entra PowerShell App #microsoft.graph.application -``` - -This example shows how to retrieve the deleted directory object details from the directory. - -- `-Id` parameter specifies the Id of the directory object to retrieve. - -## Parameters - -### -DirectoryObjectId - -The Id of the directory object to retrieve. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md deleted file mode 100644 index 9d6749d3d4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.md +++ /dev/null @@ -1,271 +0,0 @@ ---- -title: Get-EntraDevice -description: This article provides details on the Get-EntraDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDevice - -schema: 2.0.0 ---- - -# Get-EntraDevice - -## Synopsis - -Gets a device from Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDevice - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraDevice - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDevice - -DeviceId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDevice` cmdlet gets a device from Microsoft Entra ID. Specify the `DeviceId` parameter to get a specific device. - -## Examples - -### Example 1: Get a device by ID - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example shows how to retrieve a device using its ID. - -### Example 2: Get all devices - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData - cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example demonstrates how to retrieve all devices from Microsoft Entra ID. - -### Example 3: Get top two devices - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -Top 2 -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData - cccccccc-2222-3333-4444-dddddddddddd True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example demonstrates how to retrieve top two devices from Microsoft Entra ID. - -### Example 4: Get a device by display name - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example demonstrates how to retrieve device using the display name. - -### Example 5: Get a device using display name - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -Filter "startsWith(DisplayName,'Woodgrove')" -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example demonstrates how to retrieve all the devices whose display name starts with the word `Woodgrove`. - -### Example 6: Search among retrieved devices - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDevice -SearchString 'DESKTOP' -``` - -```Output -DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetadata DeviceOwnership ---------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- -------------- --------------- - bbbbbbbb-1111-2222-3333-cccccccccccc True eeeeeeee-4444-5555-6666-ffffffffffff MetaData -``` - -This example shows how to retrieve devices containing the word 'DESKTOP.' - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies the OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies the ID of a device in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetValue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraDevice](New-EntraDevice.md) - -[Remove-EntraDevice](Remove-EntraDevice.md) - -[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md deleted file mode 100644 index 1149f5438e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -title: Get-EntraDeviceRegisteredOwner -description: This article provides details on the Get-EntraDeviceRegisteredOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner - -schema: 2.0.0 ---- - -# Get-EntraDeviceRegisteredOwner - -## Synopsis - -Gets the registered owner of a device. - -## Syntax - -```powershell -Get-EntraDeviceRegisteredOwner - -DeviceId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDeviceRegisteredOwner` cmdlet gets the registered owner of a device in Microsoft Entra ID. Specify `DeviceId` parameter gets the registered owner of a device. - -## Examples - -### Example 1: Retrieve the registered owner of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -$DevId = (Get-EntraDevice -Top 1).ObjectId -Get-EntraDeviceRegisteredOwner -DeviceId $DevId -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example shows how to find the registered owner of a device.. - -- `-DeviceId` parameter specifies the device's ID. - -### Example 2: Retrieve the registered owner of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -cccccccc-2222-3333-4444-dddddddddddd -``` - -This command gets the registered owner of a device. - -- `-DeviceId` parameter specifies the device's ID - -### Example 3: Retrieve all the registered owners of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -All -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -cccccccc-2222-3333-4444-dddddddddddd -``` - -This command retrieves all the registered owners of a device. - -- `-DeviceId` parameter specifies the device's ID. - -### Example 4: Retrieve top one registered owner of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredOwner -DeviceId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -Top 1 -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command retrieves all the registered owners of a device. - -- `-DeviceId` parameter specifies the device's ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies the ID of an object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) - -[Get-EntraDevice](Get-EntraDevice.md) - -[Remove-EntraDeviceRegisteredOwner](Remove-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md deleted file mode 100644 index 810e5ec600..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.md +++ /dev/null @@ -1,180 +0,0 @@ ---- -title: Get-EntraDeviceRegisteredUser -description: This article provides details on the Get-EntraDeviceRegisteredUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser - -schema: 2.0.0 ---- - -# Get-EntraDeviceRegisteredUser - -## Synopsis - -Retrieve a list of users that are registered users of the device. - -## Syntax - -```powershell -Get-EntraDeviceRegisteredUser - -DeviceId - [-All ] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDeviceRegisteredUser` cmdlet gets a registered user for a Microsoft Entra ID device. Specify `DeviceId` parameter to get a registered user for a Microsoft Entra ID device. - -## Examples - -### Example 1: Retrieve the registered user of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -$DevId = (Get-EntraDevice -Top 1).ObjectId -Get-EntraDeviceRegisteredUser -DeviceId $DevId -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -``` - -This example demonstrates how to retrieve registered user for a specific Microsoft Entra ID device. - -### Example 2: Get all registered users of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -``` - -This example demonstrates how to retrieve all registered users for a specified device. - -- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. - -### Example 3: Get top two registered users of a device - -```powershell -Connect-Entra -Scopes 'Device.Read.All' -Get-EntraDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example demonstrates how to retrieve top two registered users for the specified device. - -- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies an object ID of a device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) - -[Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md deleted file mode 100644 index a771858b4b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Get-EntraDirSyncConfiguration -description: This article provides details on the Get-EntraDirSyncConfiguration command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration - -schema: 2.0.0 ---- - -# Get-EntraDirSyncConfiguration - -## Synopsis - -Gets the directory synchronization settings. - -## Syntax - -```powershell -Get-EntraDirSyncConfiguration - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraDirSyncConfiguration` cmdlet gets the directory synchronization settings. - -For delegated scenarios, the user needs to be assigned the Global Administrator role. - -## Examples - -### Example 1: Get directory synchronization settings - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -Get-EntraDirSyncConfiguration -``` - -```Output -AccidentalDeletionThreshold DeletionPreventionType ---------------------------- ---------------------- - 500 enabledForCount -``` - -This example gets directory synchronization settings. - -### Example 2: Get directory synchronization settings by TenantId - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -Get-EntraDirSyncConfiguration -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -``` - -```Output -AccidentalDeletionThreshold DeletionPreventionType ---------------------------- ---------------------- - 500 enabledForCount -``` - -This example gets directory synchronization settings by TenantId. - -- `-TenantId` Specifies the unique ID of the tenant. - -## Parameters - -### -TenantId - -The unique ID of the tenant for the operation. If TenantId isn't provided, it defaults to the current user's tenant. This parameter applies only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - -## Outputs - -## Notes - -## Related Links - -[Set-EntraDirSyncConfiguration](Set-EntraDirSyncConfiguration.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md deleted file mode 100644 index 6b0d0dcab6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncFeature.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: Get-EntraDirSyncFeature -description: This article provides details on the Get-EntraDirSyncFeature command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncFeature - -schema: 2.0.0 ---- - -# Get-EntraDirSyncFeature - -## Synopsis - -Checks the status of directory synchronization features for a tenant. - -## Syntax - -```powershell -Get-EntraDirSyncFeature - [-TenantId ] - [-Feature ] - [] -``` - -## Description - -The `Get-EntraDirSyncFeature` cmdlet checks the status of directory synchronization features for a tenant. - -Some of the features that can be used with this cmdlet include: - -- **DeviceWriteback** -- **DirectoryExtensions** -- **DuplicateProxyAddressResiliency** -- **DuplicateUPNResiliency** -- **EnableSoftMatchOnUpn** -- **PasswordSync** -- **SynchronizeUpnForManagedUsers** -- **UnifiedGroupWriteback** -- **UserWriteback** - -The cmdlet can be run without specifying any features, in which case it returns a list of all features and their enabled or disabled status. - -For delegated scenarios, the user needs to be assigned the Global Administrator role. - -## Examples - -### Example 1: Return a list of all directory synchronization features - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' -Get-EntraDirSyncFeature -``` - -```Output -Enabled DirSyncFeature -------- -------------- - False BlockCloudObjectTakeoverThroughHardMatch - False BlockSoftMatch - False BypassDirSyncOverrides - False CloudPasswordPolicyForPasswordSyncedUsers - False ConcurrentCredentialUpdate - True ConcurrentOrgIdProvisioning - False DeviceWriteback - False DirectoryExtensions - False FopeConflictResolution - False GroupWriteBack - False PasswordSync - False PasswordWriteback - True QuarantineUponProxyAddressesConflict - True QuarantineUponUpnConflict - True SoftMatchOnUpn - True SynchronizeUpnForManagedUsers - False UnifiedGroupWriteback - False UserForcePasswordChangeOnLogon - False UserWriteback -``` - -This example gets a list of all directory synchronization features and shows if they are enabled (True) or disabled (False). - -### Example 2: Return the PasswordSync feature status - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' -Get-EntraDirSyncFeature -Feature 'PasswordSync' -``` - -```Output -Enabled DirSyncFeature -------- -------------- - False PasswordSync -``` - -This example shows if PasswordSync is enabled (True) or disabled (False) for the tenant. - -- `-Feature` specifies the directory synchronization feature to check the status of. - -## Parameters - -### -TenantId - -The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Feature - -The directory synchronization feature to check the status of. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Set-EntraDirSyncFeature](Set-EntraDirSyncFeature.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md deleted file mode 100644 index 4bbd98ed43..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -title: Get-EntraDirectoryObjectOnPremisesProvisioningError -description: This article provides details on the Get-EntraDirectoryObjectOnPremisesProvisioningError command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError - -schema: 2.0.0 ---- - -# Get-EntraDirectoryObjectOnPremisesProvisioningError - -## Synopsis - -Returns whether Microsoft Entra ID has objects with DirSync provisioning error. - -## Syntax - -```powershell -Get-EntraDirectoryObjectOnPremisesProvisioningError - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraDirectoryObjectOnPremisesProvisioningError` returns whether Microsoft Entra ID has objects with DirSync provisioning error. - -## Examples - -### Example 1: Return whether Microsoft Entra ID has objects with DirSync provisioning error - -```powershell -Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' - -Get-EntraDirectoryObjectOnPremisesProvisioningError -``` - -```Output -False -``` - -This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. - -### Example 2: Return whether Microsoft Entra ID has objects with DirSync provisioning error - -```powershell -Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' - -Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId '0000aaaa-11bb-cccc-dd22-eeeeee333333' -``` - -```Output -False -``` - -This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. - -- `-TenantId` Specifies the unique ID of the tenant. - -## Parameters - -### -TenantId - -The unique ID of the tenant to perform the operation on. - -If this isn't provided then the value defaults to the tenant of the current user. - -This parameter is only applicable to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md deleted file mode 100644 index aac3e91b9d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Get-EntraDirectoryRole -description: This article provides details on the Get-EntraDirectoryRole command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRole - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRole - -## Synopsis - -Gets a directory role. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDirectoryRole - [-Filter ] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDirectoryRole - -DirectoryRoleId - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRole` cmdlet gets a directory role from Microsoft Entra ID. Specify `ObjectId` parameter to get a directory role. - -## Examples - -### Example 1: Get a directory role by ID - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRole -DirectoryRoleId '019ea7a2-1613-47c9-81cb-20ba35b1ae48' -``` - -```Output -ObjectId DisplayName Description --------- ----------- ----------- -019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. -``` - -This command gets the specified directory role. - -- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. - -### Example 2: Get all directory roles - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRole -``` - -```Output -DeletedDateTime Id Description ---------------- -- ----------- - aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Perform all migration functionality to migrate content to Microsoft 365 usin... - aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb Can manage all aspects of users and groups, including resetting passwords fo... - bbbbbbbb-7777-8888-9999-cccccccccccc Can read basic directory information. Commonly used to grant directory read ... - cccccccc-8888-9999-0000-dddddddddddd Can read and write basic directory information. For granting access to appli... -``` - -This command gets all the directory roles. - -### Example 3: Get a directory role filter by ObjectId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRole -Filter "ObjectId eq '019ea7a2-1613-47c9-81cb-20ba35b1ae48'" -``` - -```Output -ObjectId DisplayName Description --------- ----------- ----------- -019ea7a2-1613-47c9-81cb-20ba35b1ae48 Company Administrator Company Administrator role has full access to perform any operation in the company scope. -``` - -This command gets the directory role by ObjectId. - -- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. - -### Example 4: Get a directory role filter by displayName - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRole -Filter "displayName eq 'Helpdesk Administrator'" -``` - -```Output -DeletedDateTime Id Description ---------------- -- ----------- - 56644e28-bf8b-4dad-8595-24448ffa3cb8 Perform all migration functionality to migrate content to Microsoft 365 usin... -``` - -This command gets the directory role by display name. - -## Parameters - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DirectoryRoleId - -Specifies the ID of a directory role in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Enable-EntraDirectoryRole](Enable-EntraDirectoryRole.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md deleted file mode 100644 index 3238d3cb09..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Get-EntraDirectoryRoleMember -description: This article provides details on the Get-EntraDirectoryRoleMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRoleMember - -## Synopsis - -Gets members of a directory role. - -## Syntax - -```powershell -Get-EntraDirectoryRoleMember - -DirectoryRoleId - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRoleMember` cmdlet retrieves the members of a directory role in Microsoft Entra ID. To obtain the members of a specific directory role, specify the `DirectoryRoleId`. Use the `Get-EntraDirectoryRole` cmdlet to get the `DirectoryRoleId` value. - -## Examples - -### Example 1: Get members by role ID - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRoleMember -DirectoryRoleId '1d73e796-aac5-4b3a-b7e7-74a3d1926a85' -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-7777-8888-9999-cccccccccccc -``` - -This example retrieves the members of the specified role. - -- `-DirectoryRoleId` parameter specifies directory role ID. - -## Parameters - -### -DirectoryRoleId - -Specifies the ID of a directory role in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) - -[Remove-EntraDirectoryRoleMember](Remove-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md deleted file mode 100644 index 6ea213a233..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Get-EntraDirectoryRoleTemplate -description: This article provides details on the Get-EntraDirectoryRoleTemplate command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRoleTemplate - -## Synopsis - -Gets directory role templates. - -## Syntax - -```powershell -Get-EntraDirectoryRoleTemplate - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRoleTemplate` cmdlet gets directory role templates in Microsoft Entra ID. - -## Examples - -### Example 1: Get role templates - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRoleTemplate -``` - -```Output -DeletedDateTime Id Description ---------------- -- ----------- - 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identities. - 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. - 2af84b1e-32c8-42b7-82bc-daa82404023b Default role for guest users with restricted access. Can read a limited set of directory information. - 95e79109-95c0-4d8e-aee3-d01accf2d47b Can invite guest users independent of the 'members can invite guests' setting. - fe930be7-5e62-47db-91af-98c3a49a38b1 Can manage all aspects of users and groups, including resetting passwords for limited admins. -``` - -This example retrieves the role templates in Microsoft Entra ID. - -### Example 2: Get a specific role template - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -Get-EntraDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Helpdesk Administrator'} -``` - -```Output -DeletedDateTime Id Description DisplayName ---------------- -- ----------- ----------- - 729827e3-9c14-49f7-bb1b-9608f156bbb8 Can reset passwords for non-administrators and Helpdesk Administrators. Helpdesk Administrator -``` - -This example retrieves a Helpdesk role template. - -## Parameters - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md deleted file mode 100644 index 6a9d0258f3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: Get-EntraDomain -description: This article provides details on the Get-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomain - -schema: 2.0.0 ---- - -# Get-EntraDomain - -## Synopsis - -Gets a domain. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDomain - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDomain - -Name - [-Property ] - [] -``` - -## Description - -The `Get-EntraDomain` cmdlet gets a domain in Microsoft Entra ID. - -The work or school account must be assigned to at least one of the following Microsoft Entra roles: - -- User Administrator -- Helpdesk Administrator -- Service Support Administrator -- Directory Readers -- AdHoc License Administrator -- Application Administrator -- Security Reader -- Security Administrator -- Privileged Role Administrator -- Cloud Application Administrator - -## Examples - -### Example 1: Get a list of Domains that are created - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomain -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays --- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- -test22.com Managed True False False False False 13 -test33.com Managed True False False False False 15 -test44.com Managed True False False False False 17 -``` - -This command retrieves a list of domains. - -### Example 2: Get a specific Domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomain -Name TEST22.com -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays --- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- -test22.com Managed True False False False False 13 -``` - -This command retrieves a domain with the specified name. - -## Parameters - -### -Name - -Specifies the name of a domain. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Confirm-EntraDomain](Confirm-EntraDomain.md) - -[New-EntraDomain](New-EntraDomain.md) - -[Remove-EntraDomain](Remove-EntraDomain.md) - -[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md deleted file mode 100644 index 2381a779d4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: Get-EntraDomainFederationSettings -description: This article provides details on the Get-EntraDomainFederationSettings command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings - -schema: 2.0.0 ---- - -# Get-EntraDomainFederationSettings - -## Synopsis - -Retrieves settings for a federated domain. - -## Syntax - -```powershell -Get-EntraDomainFederationSettings - -DomainName - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraDomainFederationSettings` cmdlet gets key settings from Microsoft Entra ID. - -Use the `Get-EntraFederationProperty` cmdlet to get settings for both Microsoft Entra ID and the Entra ID Federation Services server. - -For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: - -- Global Reader -- Security Reader -- Domain Name Administrator -- External Identity Provider Administrator -- Hybrid Identity Administrator -- Security Administrator - -## Examples - -### Example 1: Get federation settings for specified domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomainFederationSettings -DomainName 'contoso.com' -``` - -This command gets federation settings for specified domain. - -- `-DomainName` parameter specifies the fully qualified domain name to retrieve. - -## Parameters - -### -DomainName - -The fully qualified domain name to retrieve. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId - -The unique ID of the tenant to perform the operation on. -If this isn't provided, then the value will default to the tenant of the current user. -This parameter is only applicable to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.DomainFederationSettings - -### This cmdlet returns the following settings - -### ActiveLogOnUri - -### FederationBrandName - -### IssuerUri - -### LogOffUri - -### MetadataExchangeUri - -### NextSigningCertificate - -### PassiveLogOnUri - -### SigningCertificate - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md deleted file mode 100644 index d6e7a88bf0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.md +++ /dev/null @@ -1,113 +0,0 @@ ---- -title: Get-EntraDomainNameReference -description: This article provides details on the Get-EntraDomainNameReference command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainNameReference - -schema: 2.0.0 ---- - -# Get-EntraDomainNameReference - -## Synopsis - -Retrieves the objects that are referenced by a given domain name. - -## Syntax - -```powershell -Get-EntraDomainNameReference - -Name - [-Property ] - [] -``` - -## Description - -The `Get-EntraDomainNameReference` cmdlet retrieves the objects that are referenced with a given domain name. Specify `Name` parameter retrieve the objects. - -The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. - -## Examples - -### Example 1: Retrieve the domain name reference objects for a domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomainNameReference -Name contoso.com -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -hhhhhhhh-5555-6666-7777-iiiiiiiiiiii -``` - -This example shows how to retrieve the domain name reference objects for a domain that is specified through the -Name parameter. - -- `-Name` parameter specifies the name of the domain name for which the referenced objects are retrieved. - -## Parameters - -### -Name - -The name of the domain name for which the referenced objects are retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md deleted file mode 100644 index df14887de6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Get-EntraDomainServiceConfigurationRecord -description: This article provides details on the Get-EntraDomainServiceConfigurationRecord command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord - -schema: 2.0.0 ---- - -# Get-EntraDomainServiceConfigurationRecord - -## Synopsis - -Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. - -## Syntax - -```powershell -Get-EntraDomainServiceConfigurationRecord - -Name - [-Property ] - [] -``` - -## Description - -Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. - -After you have successfully verified the ownership of a domain and you have indicated what services you plan to use with the domain, you can request Microsoft Entra ID to return you a set of DNS records which you need to add to the zone file of the domain so that the services can work properly with your domain. - -## Examples - -### Example 1: Retrieve domain service configuration records by Name - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomainServiceConfigurationRecord -Name 'test.mail.contoso.com' -``` - -```Output -Id IsOptional Label RecordType SupportedService Ttl --- ---------- ----- ---------- ---------------- --- -aaaa0000-bb11-2222-33cc-444444dddddd False test.mail.contoso.com Mx Email 3600 -bbbb1111-cc22-3333-44dd-555555eeeeee False test.mail.contoso.com Txt Email 3600 -cccc2222-dd33-4444-55ee-666666ffffff False autodiscover.test.mail.contoso.com CName Email 3600 -dddd3333-ee44-5555-66ff-777777aaaaaa False msoid.test.mail.contoso.com CName OrgIdAuthentication 3600 -eeee4444-ff55-6666-77aa-888888bbbbbb False enterpriseregistration.test.mail.contoso.com CName Intune 3600 -ffff5555-aa66-7777-88bb-999999cccccc False enterpriseenrollment.test.mail.contoso.com CName Intune 3600 -``` - -This example shows how to retrieve the Domain service configuration records for a domain with the given name. - -- `-Name` parameter specifies domain name for which the domain service configuration records are to be retrieved. - -## Parameters - -### -Name - -The name of the domain for which the domain service configuration records are to be retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md deleted file mode 100644 index cd3821fc66..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -title: Get-EntraDomainVerificationDnsRecord -description: This article provides details on the Get-EntraDomainVerificationDnsRecord command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord - -schema: 2.0.0 ---- - -# Get-EntraDomainVerificationDnsRecord - -## Synopsis - -Retrieve the domain verification DNS record for a domain. - -## Syntax - -```powershell -Get-EntraDomainVerificationDnsRecord - -Name - [-Property ] - [] -``` - -## Description - -Gets the domain's verification records from the `verificationDnsRecords` navigation property. - -You can't use the domain with your Microsoft Entra ID tenant until you have successfully verified that you own the domain. - -To verify the ownership of the domain, you need to first retrieve a set of domain verification records that you need to add to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. - -Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. - -The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. - -## Examples - -### Example 1: Retrieve the domain verification DNS record - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraDomainVerificationDnsRecord -Name mail.contoso.com -``` - -```Output -Id IsOptional Label RecordType SupportedService Ttl --- ---------- ----- ---------- ---------------- --- -aaaa0000-bb11-2222-33cc-444444dddddd False mail.contoso.com Txt Email 3600 -bbbb1111-cc22-3333-44dd-555555eeeeee False mail.contoso.com Mx Email 3600 -``` - -This example shows how to retrieve the Domain verification DNS records for a domain with the given name. - -## Parameters - -### -Name - -The domain name for which the domain verification Domain Name System (DNS) records are to be retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md deleted file mode 100644 index 0b48a4f8c1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Get-EntraExtensionProperty -description: This article provides details on the Get-EntraExtensionProperty command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraExtensionProperty - -schema: 2.0.0 ---- - -# Get-EntraExtensionProperty - -## Synopsis - -Gets extension properties registered with Microsoft Entra ID. - -## Syntax - -```powershell -Get-EntraExtensionProperty - [-IsSyncedFromOnPremises ] - [] -``` - -## Description - -The Get-EntraExtensionProperty cmdlet gets a collection that contains the extension properties registered with Microsoft Entra ID through Microsoft Entra ID Connect. - -You can get extension properties that are synced with on-premises Microsoft Entra ID that aren't synced with on-premises Microsoft Entra ID or both types. - -This command returns all directory extension definitions registered in a directory, including those from multitenant apps. The following entities support extension properties: - -- User -- Group -- AdministrativeUnit -- Application -- Device -- Organization - -## Examples - -### Example 1: Get extension properties synced from on-premises Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraExtensionProperty -IsSyncedFromOnPremises $True -``` - -```Output -DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects ---------------- -- -------------- -------- ------------- ---------------------- ---- ------------- - aaaabbbb-0000-cccc-1111-dddd2222eeee Tenant Schema Extension App String False True extension_aaaabbbb-0000-cccc-1111-dddd2222eeee_extensionAttribute1 {User} -``` - -This command gets extension properties that have sync from on-premises Microsoft Entra ID. - -## Parameters - -### -IsSyncedFromOnPremises - -Specifies whether this cmdlet gets extension properties that are synced or not synced. - -- `$True` - get extension properties that are synced from the on-premises Microsoft Entra ID. -- `$False` - get extension properties that aren't synced from the on-premises Microsoft Entra ID. -- `No value` - get all extension properties (both synced and nonsynced). - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md deleted file mode 100644 index 615248b150..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Get-EntraFederationProperty -description: This article provides details on the Get-EntraFederationProperty command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFederationProperty - -schema: 2.0.0 ---- - -# Get-EntraFederationProperty - -## Synopsis - -Displays the properties of the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. - -## Syntax - -```powershell -Get-EntraFederationProperty - -DomainName - [] -``` - -## Description - -The `Get-EntraFederationProperty` cmdlet gets key settings from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. - -You can use this information to troubleshoot authentication problems caused by mismatched settings between the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. - -For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: - -- Global Reader -- Security Reader -- Domain Name Administrator -- External Identity Provider Administrator -- Hybrid Identity Administrator -- Security Administrator - -## Examples - -### Example 1: Display properties for specified domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraFederationProperty -DomainName contoso.com -``` - -This command displays properties for specified domain. - -- `-DomainName` Specifies the domain name. - -## Parameters - -### -DomainName - -The domain name for which the properties from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online are displayed. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md deleted file mode 100644 index 813b97fb34..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: Get-EntraObjectByObjectId -description: This article provides details on the Get-EntraObjectByObjectId command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectByObjectId - -schema: 2.0.0 ---- - -# Get-EntraObjectByObjectId - -## Synopsis - -Retrieves the objects specified by the ObjectIds parameter. - -## Syntax - -```powershell -Get-EntraObjectByObjectId - -ObjectIds - [-Types ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraObjectByObjectId` cmdlet retrieves the objects specified by the ObjectIds parameter. - -## Examples - -### Example 1: Get an object One or more object IDs - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' , 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example demonstrates how to retrieve objects for a specified object Ids. - -- `ObjectIds` parameter specifies the One or more object IDs. - -### Example 2: Get an object by types - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Types User -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example demonstrates how to retrieve objects for a specified object type. - -- `-ObjectIds` parameter specifies the One or more object IDs. -- `-Types` parameter specifies the type of object ID. - -## Parameters - -### -ObjectIds - -One or more object IDs's, separated by commas, for which the objects are retrieved. The IDs are GUIDs, represented as strings. You can specify up to 1,000 IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Types - -Specifies the type of objects that the cmdlet returns. If not specified, the default is directoryObject, which includes all resource types defined in the directory. You can specify any object derived from directoryObject in the collection, such as user, group, and device objects. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md deleted file mode 100644 index c2338d2a49..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Get-EntraPartnerInformation -description: This article provides details on the Get-EntraPartnerInformation command. - -ms.topic: reference -ms.date: 09/25/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPartnerInformation - -schema: 2.0.0 ---- - -# Get-EntraPartnerInformation - -## Synopsis - -Retrieves company-level information for partners. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPartnerInformation - [] -``` - -### GetById - -```powershell -Get-EntraPartnerInformation - [-TenantId ] - [] -``` - -## Description - -The `Get-EntraPartnerInformation` cmdlet is used to retrieve partner-specific information. -This cmdlet should only be used for partner tenants. - -## Examples - -### Example 1: Retrieve partner information - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraPartnerInformation -``` - -```Output -PartnerCompanyName : Contoso -companyType : -PartnerSupportTelephones : {12123, +1911} -PartnerSupportEmails : {} -PartnerHelpUrl : http://www.help.contoso.com -PartnerCommerceUrl : -ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc -PartnerSupportUrl : -``` - -This command retrieves partner-specific information. - -### Example 2: Retrieve partner information with specific TenantId - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -$tenantId = (Get-EntraContext).TenantId -Get-EntraPartnerInformation -TenantId $tenantId -``` - -```Output -PartnerCompanyName : Contoso -companyType : -PartnerSupportTelephones : {12123, +1911} -PartnerSupportEmails : {} -PartnerHelpUrl : http://www.help.contoso.com -PartnerCommerceUrl : -ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc -PartnerSupportUrl : -``` - -This command retrieves partner-specific information. - -`-TenantId` Parameter specifies unique ID of the tenant to perform the operation on. - -## Parameters - -### -TenantId - -The unique ID of the tenant to perform the operation on. -If this is not provided, then the value will default to the tenant of the current user. -This parameter is only applicable to partner users. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Company level information outputs - -- CompanyType: The type of this company (can be partner or regular tenant) -- DapEnabled: Flag to determine if the partner has delegated admin privileges -- PartnerCompanyName: The name of the company -- PartnerSupportTelephones: Support Telephone numbers for the partner -- PartnerSupportEmails: Support E-Mail address for the partner -- PartnerCommerceUrl: URL for the partner's commerce web site -- PartnerSupportUrl: URL for the Partner's support website -- PartnerHelpUrl: URL for the partner's help web site - -## Notes - -## Related Links - -[Set-EntraPartnerInformation](Set-EntraPartnerInformation.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md deleted file mode 100644 index ea27374f11..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Get-EntraPasswordPolicy -description: This article provides details on the Get-EntraPasswordPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPasswordPolicy - -schema: 2.0.0 ---- - -# Get-EntraPasswordPolicy - -## Synopsis - -Retrieves the current password policy for the tenant or the specified domain. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPasswordPolicy - [] -``` - -### GetById - -```powershell -Get-EntraPasswordPolicy - -DomainName - [] -``` - -## Description - -The `Get-EntraPasswordPolicy` cmdlet can be used to retrieve the values associated with the Password Expiry -window or Password Expiry Notification window for a tenant or specified domain. - -When a domain name is specified, it must be a verified domain for the company. - -The work or school account needs to belong to one of the following Microsoft Entra roles: - -- Domain Name Administrator - -## Examples - -### Example 1: Get password policy for a specified domain - -```powershell -Connect-Entra -Scopes 'Domain.Read.All' -Get-EntraPasswordPolicy -DomainName 'contoso.com' -``` - -```Output -NotificationDays ValidityPeriod ----------------- -------------- - 90 180 -``` - -Returns the password policy for the specified domain. - -- `-DomainName` parameter specifies the fully qualified domain name to retrieve. - -## Parameters - -### -DomainName - -The fully qualified name of the domain to be retrieved. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md deleted file mode 100644 index 3d2a8293a7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: Get-EntraScopedRoleMembership -description: This article provides details on the Get-EntraScopedRoleMembership command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership - -schema: 2.0.0 ---- - -# Get-EntraScopedRoleMembership - -## Synopsis - -List Microsoft Entra role assignments with administrative unit scope. - -## Syntax - -```powershell -Get-EntraScopedRoleMembership - -AdministrativeUnitId - [-ScopedRoleMembershipId ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraScopedRoleMembership` cmdlet lists Microsoft Entra role assignments with an administrative unit scope. Use the `ObjectId` parameter to retrieve a specific scoped role membership. - -## Examples - -### Example 1: Get Scoped Role Administrator - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' -} -Get-EntraScopedRoleMembership @params -``` - -```Output -Id AdministrativeUnitId RoleId --- -------------------- ------ -dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example gets scoped role administrator. You cane use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. -- `-ScopedRoleMembershipId` parameter specifies the scoped role membership Id. - -### Example 2: List scoped administrators for administrative unit by ObjectId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Get-EntraScopedRoleMembership -ObjectId $AdministrativeUnit.ObjectId -``` - -```Output -Id AdministrativeUnitId RoleId --- -------------------- ------ -dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example list scoped administrators with objectId. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ScopedRoleMembershipId - -Specifies the ID of a scoped role membership. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) - -[Remove-EntraScopedRoleMembership](Remove-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md deleted file mode 100644 index bcf1591a2e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.md +++ /dev/null @@ -1,227 +0,0 @@ ---- -title: Get-EntraSubscribedSku -description: This article provides details on the Get-EntraSubscribedSku command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraSubscribedSku - -schema: 2.0.0 ---- - -# Get-EntraSubscribedSku - -## Synopsis - -Gets subscribed SKUs to Microsoft services. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraSubscribedSku - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraSubscribedSku - -SubscribedSkuId - [-Property ] - [] -``` - -## Description - -The `Get-EntraSubscribedSku` cmdlet gets subscribed SKUs to Microsoft services. - -## Examples - -### Example 1: Get subscribed SKUs - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraSubscribedSku -``` - -```Output -Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber --- --------- ----------- --------- ---------------- ------------- ----- ------- -aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... -bbbb1111-cc22-3333-44dd-555555eeeeee 1111bbbb-22cc-dddd-ee33-ffffff444444 M365x99297270 User Enabled 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTE... -cccc2222-dd33-4444-55ee-666666ffffff 2222cccc-33dd-eeee-ff44-aaaaaa555555 M365x99297270 User Enabled 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTE... -``` - -This example demonstrates how to retrieve subscribed SKUs to Microsoft services. - -### Example 2: Get subscribed SKUs by SubscribedSkuId - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraSubscribedSku -SubscribedSkuId 'abcdefgh-1111-2222-bbbb-cccc33333333_dddddddd-4444-5555-eeee-666666666666' -``` - -```Output -Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber --- --------- ----------- --------- ---------------- ------------- ----- ------- -aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... -``` - -This example demonstrates how to retrieve specified subscribed SKUs to Microsoft services. - -- `-SubscribedSkuId` parameter specifies the ID of the SKU (Stock Keeping Unit). - -### Example 3: Get available license plans - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Organization.Read.All' -Get-EntraSubscribedSku | Select-Object -Property Sku*, ConsumedUnits -ExpandProperty PrepaidUnits -``` - -```Output -Enabled : 5 -LockedOut : 0 -Suspended : 0 -Warning : 0 -AdditionalProperties : -SkuId : efccb6f7-5641-4e0e-bd10-b4976e1bf68e -SkuPartNumber : EMS -ConsumedUnits : 3 -``` - -This example demonstrates how to retrieve available license plans. - -### Example 4: Retrieve all users assigned a specific license - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -$sku = Get-EntraSubscribedSku | Where-Object { $_.SkuPartNumber -eq 'DEVELOPERPACK_E5' } -$skuId = $sku.SkuId -$usersWithDeveloperPackE5 = Get-EntraUser -All | Where-Object { - $_.AssignedLicenses -and ($_.AssignedLicenses.SkuId -contains $skuId) -} -$usersWithDeveloperPackE5 | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled, UserType | Format-Table -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName AccountEnabled UserType --- ----------- ----------------- -------------- -------- -cccccccc-2222-3333-4444-dddddddddddd Angel Brown AngelB@contoso.com True Member -dddddddd-3333-4444-5555-eeeeeeeeeeee Avery Smith AveryS@contoso.com True Member -eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com True Member -``` - -This example demonstrates how to retrieve all users assigned a specific license. - -### Example 5: Get a list of users, their assigned licenses, and licensing source - -```powershell -Connect-Entra -Scopes 'Organization.Read.All','User.Read.All','Group.Read.All' - -# Get all users with specified properties -$Users = Get-EntraUser -All -Property AssignedLicenses, LicenseAssignmentStates, DisplayName, UserPrincipalName, ObjectId - -$SelectedUsers = $Users | Select-Object ObjectId, UserPrincipalName, DisplayName, AssignedLicenses -ExpandProperty LicenseAssignmentStates - -# Group Name lookup -$GroupDisplayNames = @{} - -# Sku Part Number lookup -$SkuPartNumbers = @{} - -# Populate the hashtable with group display names and SKU part numbers -foreach ($User in $SelectedUsers) { - $AssignedByGroup = $User.AssignedByGroup - $SkuId = $User.SkuId - - try { - # Check if the group display name is already in the hashtable - if (-not $GroupDisplayNames.ContainsKey($AssignedByGroup)) { - $Group = Get-EntraGroup -GroupId $AssignedByGroup - $GroupDisplayNames[$AssignedByGroup] = $Group.DisplayName - } - - $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue $GroupDisplayNames[$AssignedByGroup] - } catch { - $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue 'N/A (Direct Assignment)' - } - - try { - # Check if the SKU part number is already in the hashtable - if (-not $SkuPartNumbers.ContainsKey($SkuId)) { - $Sku = Get-EntraSubscribedSku | Where-Object { $_.SkuId -eq $SkuId } | Select-Object -ExpandProperty SkuPartNumber - $SkuPartNumbers[$SkuId] = $Sku - } - - $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue $SkuPartNumbers[$SkuId] - } catch { - $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue 'N/A' - } -} - -$SelectedUsers | Format-Table UserPrincipalName, DisplayName, AssignedByGroup, GroupDisplayName, SkuId, SkuPartNumber, State, Error -AutoSize -``` - -```Output -userPrincipalName displayName assignedByGroup GroupDisplayName skuId SkuPartNumber state error ------------------ ----------- --------------- ---------------- ----- ------------- ----- ----- -averyh@contoso.com Avery Howard cccccccc-2222-3333-4444-dddddddddddd Contoso Team abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None -devont@contoso.com Devon Torres ffffffff-5555-6666-7777-aaaaaaaaaaaa Retail abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None -``` - -This example shows a list of users, their licenses, and the source of the license such as directly assigned or group assigned. - -## Parameters - -### -SubscribedSkuId - -The object ID of the SKU (Stock Keeping Unit). - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md deleted file mode 100644 index 7bf50037c6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -title: Get-EntraTenantDetail -description: This article provides details on the Get-EntraTenantDetail command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTenantDetail - -schema: 2.0.0 ---- - -# Get-EntraTenantDetail - -## Synopsis - -Gets the details of a tenant. - -## Syntax - -```powershell -Get-EntraTenantDetail - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraTenantDetail` cmdlet gets the details of a tenant in Microsoft Entra ID. - -In delegated scenarios involving work or school accounts, the signed-in user must be assigned either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation: - -- Application Administrator -- Authentication Administrator -- Cloud Application Administrator -- Directory Readers -- Directory Reviewer -- Global Reader -- Helpdesk Administrator -- Security Administrator -- Security Operator -- Security Reader -- Service Support Administrator -- User Administrator -- Privileged Role Administrator - -## Examples - -### Example 1: Get all tenant details - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTenantDetail -All -``` - -```Output -DisplayName Id TenantType CountryLetterCode VerifiedDomains ------------ -- ---------- ----------------- --------------- -Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AAD NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Mana... -``` - -This example shows how to retrieve all tenant details. - -### Example 2: Get top one tenant details - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTenantDetail -Top 1 -``` - -```Output -DisplayName Id CountryLetterCode VerifiedDomains ------------ -- ----------------- --------------- -Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}} -``` - -This example shows how to retrieve details of a top one tenant in Microsoft Entra ID. - -### Example 3: Get directory tenant size quota - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -(Get-EntraTenantDetail).AdditionalProperties.directorySizeQuota -``` - -```Output -Key Value ---- ----- -used 339 -total 50000 -``` - -This example shows how to retrieve the directory tenant size quota. - -A directory quota represents the maximum number of objects allowed in a tenant, including user accounts, app registrations, and groups. Once this limit is reached, attempts to create new objects will result in an error. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Set-EntraTenantDetail](Set-EntraTenantDetail.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md deleted file mode 100644 index f5effc7db0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: New-EntraAdministrativeUnit -description: This article provides details on the New-EntraAdministrativeUnit command. - - -ms.topic: reference -ms.date: 07/25/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAdministrativeUnit - -schema: 2.0.0 ---- - -# New-EntraAdministrativeUnit - -## Synopsis - -Creates an administrative unit. - -## Syntax - -```powershell -New-EntraAdministrativeUnit - [-Description ] - -DisplayName - [] -``` - -## Description - -The `New-EntraAdministrativeUnit` cmdlet creates an administrative unit in Microsoft Entra ID. Specify `DisplayName` parameter to create an administrative unit. - -In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that includes the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. The Privileged Role Administrator role is the least privileged role that meets this requirement. - -## Examples - -### Example 1: Create an administrative unit - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -New-EntraAdministrativeUnit -DisplayName 'TestAU' -``` - -```Output -DeletedDateTime Id Description DisplayName Visibility ---------------- -- ----------- ----------- ---------- - bbbbbbbb-1111-2222-3333-cccccccccccc TestAU -``` - -This example demonstrates how to create an administrative unit. - -- `-DisplayName` parameter specifies the display name for the Administrative unit object. - -### Example 2: Create an administrative unit using '-Description' parameter - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$params = @{ - DisplayName = 'Pacific Administrative Unit' - Description = 'Administrative Unit for Pacific region' -} - -New-EntraAdministrativeUnit @params -``` - -```Output -DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility ---------------- -- ----------- ----------- ---------------------------- ---------- - bbbbbbbb-1111-2222-3333-cccccccccccc Pacific Administrative Unit test111 False -``` - -This example demonstrates how to create an administrative unit. - -- `-DisplayName` parameter specifies the display name for the Administrative unit object. -- `-Description` parameter specifies a description for the Administrative unit object. - -## Parameters - -### -Description - -Specifies a description for the new administrative unit. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the new administrative unit. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) - -[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) - -[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md deleted file mode 100644 index 8a6f2ea0bf..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: New-EntraAttributeSet -description: This article provides details on the New-EntraAttributeSet command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAttributeSet - -schema: 2.0.0 ---- - -# New-EntraAttributeSet - -## Synopsis - -Adds a new attribute set. - -## Syntax - -```powershell -New-EntraAttributeSet - [-AttributeSetId ] - [-Description ] - [-MaxAttributesPerSet ] - [] -``` - -## Description - -Adds a new Microsoft Entra ID attribute set object. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. - -## Examples - -### Example 1: Add a single attribute set - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - AttributeSetId = 'NewCustomAttributeSet' - Description = 'Attributes for engineering team' - MaxAttributesPerSet = 10 -} - -New-EntraAttributeSet @params -``` - -```Output -Id Description MaxAttributesPerSet --- ----------- ------------------- -Testing Attributes for engineering team 10 -``` - -This example demonstrates hoe to add a single attribute set. - -- `-Id` parameter specifies the name of the attribute set. -- `-Description` parameter specifies the description for the attribute set. -- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. - -## Parameters - -### -Description - -Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AttributeSetId - -Name of the attribute set. Unique identifier for the attribute set within a tenant, up to 32 Unicode characters. It can't contain spaces or special characters, is case sensitive, and can't be changed later. Required. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MaxAttributesPerSet - -Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraAttributeSet](Get-EntraAttributeSet.md) - -[Set-EntraAttributeSet](Set-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md deleted file mode 100644 index 6e1299f5b0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md +++ /dev/null @@ -1,234 +0,0 @@ ---- -title: New-EntraCustomSecurityAttributeDefinition -description: This article provides details on the New-EntraCustomSecurityAttributeDefinition command. - - -ms.topic: reference -ms.date: 07/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition - -schema: 2.0.0 ---- - -# New-EntraCustomSecurityAttributeDefinition - -## Synopsis - -Create a new customSecurityAttributeDefinition object. - -## Syntax - -```powershell -New-EntraCustomSecurityAttributeDefinition - -IsSearchable - [-Description ] - -IsCollection - -AttributeSet - -Type - -Name - -Status - -UsePreDefinedValuesOnly - [] -``` - -## Description - -The `New-EntraCustomSecurityAttributeDefinition` cmdlet creates a new customSecurityAttributeDefinition object. Specify `IsSearchable`, `IsCollection`, `AttributeSet`, `Type`, `Name`, `Status` and `UsePreDefinedValuesOnly` parameters for create a new custom security attribute definition. - -You can define up to 500 active objects in a tenant. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. - -## Examples - -### Example 1: Add a custom security attribute - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All','CustomSecAttributeDefinition.ReadWrite.All' -$AttributeSet = Get-EntraAttributeSet -Id '' -$params = @{ - Name = 'ProjectTest' - Description = 'Target completion' - Type = 'String' - Status = 'Available' - AttributeSet = $AttributeSet.Id - IsCollection = $False - IsSearchable = $True - UsePreDefinedValuesOnly = $True -} -New-EntraCustomSecurityAttributeDefinition @params -``` - -```Output -Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly --- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- -Test_ProjectTest Test Target completion False True ProjectTest Available String False -``` - -This example demonstrates how to add a custom security attribute. - -- `-Name` parameter specifies the name of the custom security attribute. -- `-Description` parameter specifies the description of the custom security attribute. -- `-Type` parameter specifies the data type for the custom security attribute values. -- `-Status` parameter specifies the custom security attribute is active or deactivated. -- `-AttributeSet` parameter specifies the name of attribute set. -- `-IsCollection` parameter specifies the allows multiple values can be assigned to the custom security attribute. -- `-IsSearchable` parameter specifies the custom security attribute values are indexed for searching on objects. -- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. - -## Parameters - -### -AttributeSet - -Name of the attribute set. Case insensitive. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCollection - -Indicates whether multiple values can be assigned to the custom security attribute. Can't be changed later. If type is set to Boolean, isCollection can't be set to true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsSearchable - -Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Can't be changed later. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Can't contain spaces or special characters. Can't be changed later. Case insensitive. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Status - -Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Can't be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UsePreDefinedValuesOnly - -Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Set-EntraCustomSecurityAttributeDefinition](Set-EntraCustomSecurityAttributeDefinition.md) - -[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md deleted file mode 100644 index d81f8e00ad..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.md +++ /dev/null @@ -1,339 +0,0 @@ ---- -title: New-EntraDevice -description: This article provides details on the New-EntraDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDevice - -schema: 2.0.0 ---- - -# New-EntraDevice - -## Synopsis - -Creates a device. - -## Syntax - -```powershell -New-EntraDevice - -DisplayName - -DeviceOSType - -AccountEnabled - -DeviceId - -DeviceOSVersion - -AlternativeSecurityIds - [-DevicePhysicalIds ] - [-DeviceTrustType ] - [-DeviceMetadata ] - [-ApproximateLastLogonTimeStamp ] - [-IsManaged ] - [-DeviceObjectVersion ] - [-IsCompliant ] - [-ProfileType ] - [-SystemLabels ] - [] -``` - -## Description - -The `New-EntraDevice` cmdlet creates a device in Microsoft Entra ID. - -The calling user must be in one of the following Microsoft Entra roles: Intune Administrator or Windows 365 Administrator. - -## Examples - -### Example 1: Create a device - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' - -$params = @{ - AccountEnabled = $true - DisplayName = 'My new device' - AlternativeSecurityIds = $altsecid - DeviceId = $guid - DeviceOSType = 'OS/2' - DeviceOSVersion = '9.3' -} - -New-EntraDevice @params -``` - -```Output -ObjectId DeviceId DisplayName --------- -------- ----------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb dddddddd-3333-4444-5555-eeeeeeeeeeee My new device -``` - -This command creates a new device. - -## Parameters - -### -AccountEnabled - -Indicates whether the account is enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AlternativeSecurityIds - -Specifies alternative security IDs. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApproximateLastLogonTimeStamp - -Specifies last sign-in date time. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies the ID of the device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceMetadata - -The metadata for this device - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceObjectVersion - -Specifies the object version of the device. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceOSType - -Specifies the operating system type of the new device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceOSVersion - -Specifies the operating system version of the new device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DevicePhysicalIds - -Specifies the physical ID. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceTrustType - -The trust type for this device - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the new device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCompliant - -True if the device complies with Mobile Device Management (MDM) policies; otherwise, false. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsManaged - -True if the device is managed by a Mobile Device Management (MDM) app such as Intune; otherwise, false. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProfileType - -Specifies profile type of the device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SystemLabels - -Specifies labels for the device. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDevice](Get-EntraDevice.md) - -[Remove-EntraDevice](Remove-EntraDevice.md) - -[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md deleted file mode 100644 index bba50a37cd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.md +++ /dev/null @@ -1,158 +0,0 @@ ---- -title: New-EntraDomain -description: This article provides details on the New-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDomain - -schema: 2.0.0 ---- - -# New-EntraDomain - -## Synopsis - -Creates a domain. - -## Syntax - -```powershell -New-EntraDomain - -Name - [-IsDefault ] - [-SupportedServices ] - [] -``` - -## Description - -The `New-EntraDomain` cmdlet creates a domain in Microsoft Entra ID. - -The work or school account needs to belong to at least the Domain Name Administrator role. - -## Examples - -### Example 1: Create a new Domain - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -New-EntraDomain -Name testingDemo.com -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices --- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- -testingDemo.com Managed True False False False False {} -``` - -This example demonstrates how to create a new domain in Microsoft Entra ID. - -### Example 2: Create a new Domain with a list of domain capabilities - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -New-EntraDomain -Name testingDemo1.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices --- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- -testingDemo1.com Managed True False False False False {} -``` - -This example demonstrates how to create a new domain with the specified services in Microsoft Entra ID. - -### Example 3: Create a new Domain and make if the default new user creation - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -New-EntraDomain -Name testingDemo2.com -IsDefault $True -``` - -```Output -Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified Manufacturer Model PasswordNotificationWindowInDays PasswordValidityPeriodInDays SupportedServices --- ------------------ ------------------ -------------- --------- --------- ------ ---------- ------------ ----- -------------------------------- ---------------------------- ----------------- -testingDemo2.com Managed True False False False False {} -``` - -This example demonstrates how to create a new domain in Microsoft Entra ID and marks it as the default to be used for new user creation. - -## Parameters - -### -IsDefault - -Indicates whether or not this is the default domain that is used for user creation. - -There is only one default domain per company. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -The fully qualified name of the domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SupportedServices - -The capabilities assigned to the domain. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Confirm-EntraDomain](Confirm-EntraDomain.md) - -[Get-EntraDomain](Get-EntraDomain.md) - -[Remove-EntraDomain](Remove-EntraDomain.md) - -[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md deleted file mode 100644 index 2b4e4d8f3b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Remove-EntraAdministrativeUnit -description: This article provides details on the Remove-EntraAdministrativeUnit command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit - -schema: 2.0.0 ---- - -# Remove-EntraAdministrativeUnit - -## Synopsis - -Removes an administrative unit. - -## Syntax - -```powershell -Remove-EntraAdministrativeUnit - -AdministrativeUnitId - [] -``` - -## Description - -The `Remove-EntraAdministrativeUnit` cmdlet removes an administrative unit from Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to delete an administrative unit. - -To delete an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. - -## Examples - -### Example 1: Remove an administrative unit - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -Remove-EntraAdministrativeUnit -ObjectId $AdministrativeUnit.ObjectId -``` - -This command removes the specified administrative unit from Microsoft Entra ID. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) - -[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) - -[Set-EntraAdministrativeUnit](Set-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md deleted file mode 100644 index 306fdee2a1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Remove-EntraAdministrativeUnitMember -description: This article provides details on the Remove-EntraAdministrativeUnitMember command. - -ms.topic: reference -ms.date: 07/17/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember - -schema: 2.0.0 ---- - -# Remove-EntraAdministrativeUnitMember - -## Synopsis - -Removes an administrative unit member. - -## Syntax - -```powershell -Remove-EntraAdministrativeUnitMember - -AdministrativeUnitId - -MemberId - [] -``` - -## Description - -The `Remove-EntraAdministrativeUnitMember` cmdlet removes an administrative unit member in Microsoft Entra ID. Specify `AdministrativeUnitId` and `MemberId` to remove an administrative unit member. - -To remove a member from an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. - -## Examples - -### Example 1: Remove an administrative unit member - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.Read.All' -$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - MemberId = 'eeeeeeee-4444-5555-6666-ffffffffffff' -} -Remove-EntraAdministrativeUnitMember @params -``` - -This command removes a specified member (user or group) from a specified administrative unit. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. -- `-MemberId` parameter specifies the ID of the administrative unit member. - -## Parameters - -### -MemberId - -Specifies the ID of the administrative unit member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraAdministrativeUnitMember](Add-EntraAdministrativeUnitMember.md) - -[Get-EntraAdministrativeUnitMember](Get-EntraAdministrativeUnitMember.md) - -[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md deleted file mode 100644 index 9d5b0e222a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Remove-EntraContact -description: This article provides details on the Remove-EntraContact command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraContact - -schema: 2.0.0 ---- - -# Remove-EntraContact - -## Synopsis - -Removes a contact. - -## Syntax - -```powershell -Remove-EntraContact - -OrgContactId - [] -``` - -## Description - -The `Remove-EntraContact` removes a contact from Microsoft Entra ID. - -## Examples - -### Example 1: Remove a contact - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All' -$Contact = Get-EntraContact -Filter "DisplayName eq 'Contoso Contact'" -Remove-EntraContact -OrgContactId $Contact.ObjectId -``` - -The example shows how to remove a contact. - -## Parameters - -### -OrgContactId - -Specifies the object ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraContact](Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md deleted file mode 100644 index bacb0d4a0c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Remove-EntraDevice -description: This article provides details on the Remove-EntraDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDevice - -schema: 2.0.0 ---- - -# Remove-EntraDevice - -## Synopsis - -Deletes a device. - -## Syntax - -```powershell -Remove-EntraDevice - -DeviceId - [] -``` - -## Description - -The `Remove-EntraDevice` cmdlet removes a device from Microsoft Entra ID. - -The calling user must be in one of the following Microsoft Entra roles: Intune Administrator, Windows 365 Administrator, or Cloud Device Administrator. - -## Examples - -### Example 1: Remove a device - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -$Device = Get-EntraDevice -Filter "DisplayName eq 'Woodgrove Desktop'" -Remove-EntraDevice -DeviceId $Device.ObjectId -``` - -This command removes the specified device. - -## Parameters - -### -DeviceId - -Specifies the object ID of a device in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDevice](Get-EntraDevice.md) - -[New-EntraDevice](New-EntraDevice.md) - -[Set-EntraDevice](Set-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md deleted file mode 100644 index ec6b3a8a33..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Remove-EntraDeviceRegisteredOwner -description: This article provides details on the Remove-EntraDeviceRegisteredOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner - -schema: 2.0.0 ---- - -# Remove-EntraDeviceRegisteredOwner - -## Synopsis - -Removes the registered owner of a device. - -## Syntax - -```powershell -Remove-EntraDeviceRegisteredOwner - -OwnerId - -DeviceId - [] -``` - -## Description - -The `Remove-EntraDeviceRegisteredOwner` cmdlet removes the registered owner of a device in Microsoft Entra ID. - -## Examples - -### Example 1: Remove an owner from a device - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$Device = Get-EntraDevice -Top 1 -$Owner = Get-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId -Remove-EntraDeviceRegisteredOwner -DeviceId $Device.ObjectId -OwnerId $Owner.ObjectId -``` - -This examples shows how to remove the owner of a device. - -## Parameters - -### -DeviceId - -Specifies an object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OwnerId - -Specifies an owner ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDeviceRegisteredOwner](Add-EntraDeviceRegisteredOwner.md) - -[Get-EntraDevice](Get-EntraDevice.md) - -[Get-EntraDeviceRegisteredOwner](Get-EntraDeviceRegisteredOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md deleted file mode 100644 index ec9ca2ff64..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Remove-EntraDeviceRegisteredUser -description: This article provides details on the Remove-EntraDeviceRegisteredUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser - -schema: 2.0.0 ---- - -# Remove-EntraDeviceRegisteredUser - -## Synopsis - -Removes a registered user from a device. - -## Syntax - -```powershell -Remove-EntraDeviceRegisteredUser - -DeviceId - -UserId - [] -``` - -## Description - -The `Remove-EntraDeviceRegisteredUser` cmdlet removes a registered user from a Microsoft Entra ID device. - -## Examples - -### Example 1: Remove a registered user from a device - -```Powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$Device = Get-EntraDevice -Top 1 -$User = Get-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId -Remove-EntraDeviceRegisteredUser -DeviceId $Device.ObjectId -UserId $User.ObjectId -``` - -This example shows how to remove the registered user from device. - -## Parameters - -### -DeviceId - -Specifies the ID of an object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDeviceRegisteredUser](Add-EntraDeviceRegisteredUser.md) - -[Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md deleted file mode 100644 index 4b888305c9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraDirectoryRoleMember -description: This article provides details on the Remove-EntraDirectoryRoleMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember - -schema: 2.0.0 ---- - -# Remove-EntraDirectoryRoleMember - -## Synopsis - -Removes a member of a directory role. - -## Syntax - -```powershell -Remove-EntraDirectoryRoleMember - -DirectoryRoleId - -MemberId - [] -``` - -## Description - -The `Remove-EntraDirectoryRoleMember` cmdlet removes a member from a directory role in Microsoft Entra ID. - -## Examples - -### Example 1: Remove a member from a directory role - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$params = @{ - DirectoryRoleId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' - MemberId = '11bb11bb-cc22-dd33-ee44-55ff55ff55ff' -} - -Remove-EntraDirectoryRoleMember @params -``` - -This example removes the specified member from the specified role. - -- `-DirectoryRoleId` - specifies the unique identifier (ObjectId) of the directory role from which the member will be removed. - -- `-MemberId` - specifies the unique identifier (MemberId) of the member (user, group, or service principal) that is to be removed from the specified directory role. - -## Parameters - -### -MemberId - -Specifies the object ID of a role member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DirectoryRoleId - -Specifies the object ID of a directory role in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraDirectoryRoleMember](Add-EntraDirectoryRoleMember.md) - -[Get-EntraDirectoryRoleMember](Get-EntraDirectoryRoleMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md deleted file mode 100644 index cfd13d0926..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Remove-EntraDomain -description: This article provides details on the Remove-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDomain - -schema: 2.0.0 ---- - -# Remove-EntraDomain - -## Synopsis - -Removes a domain. - -## Syntax - -```powershell -Remove-EntraDomain - -Name - [] -``` - -## Description - -The `Remove-EntraDomain` cmdlet removes a domain from Microsoft Entra ID. - -Important: - -- Deleted domains are not recoverable. -- Attempts to delete will fail if there are any resources or objects still dependent on the domain. - -The work or school account needs to belong to at least the `Domain Name Administrator` Microsoft Entra role. - -## Examples - -### Example 1: Remove a domain - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Remove-EntraDomain -Name Contoso.com -``` - -This command removes a domain from Microsoft Entra ID. - -## Parameters - -### -Name - -Specifies the name of the domain to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Confirm-EntraDomain](Confirm-EntraDomain.md) - -[Get-EntraDomain](Get-EntraDomain.md) - -[New-EntraDomain](New-EntraDomain.md) - -[Set-EntraDomain](Set-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md deleted file mode 100644 index f0b6781699..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraExternalDomainFederation.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: Remove-EntraExternalDomainFederation -description: This article provides details on the Remove-EntraExternalDomainFederation command. - - -ms.topic: reference -ms.date: 06/11/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra - -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation - -schema: 2.0.0 ---- - -# Remove-EntraExternalDomainFederation - -## Synopsis - -Delete an externalDomainFederation by external domain name. - -## Syntax - -```powershell -Remove-EntraExternalDomainFederation - -ExternalDomainName - [] -``` - -## Description - -This `Remove-EntraExternalDomainFederation` cmdlet removes an externalDomainFederation by external domain name. - -## Examples - -### Example 1: Deletes an external domain federation setting for a given external domain - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Remove-EntraExternalDomainFederation -ExternalDomainName 'test.com' -``` - -This command deletes an external domain federation setting. - -- `ExternalDomainName` Parameter specifies unique identifer of an externalDomainFederation. - -## Parameters - -### -ExternalDomainName - -The unique identifer of an externalDomainFederation in Microsoft Entra ID - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md deleted file mode 100644 index 498ce84d81..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraScopedRoleMembership -description: This article provides details on the Remove-EntraScopedRoleMembership command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership - -schema: 2.0.0 ---- - -# Remove-EntraScopedRoleMembership - -## Synopsis - -Removes a scoped role membership. - -## Syntax - -```powershell -Remove-EntraScopedRoleMembership - -AdministrativeUnitId - -ScopedRoleMembershipId - [] -``` - -## Description - -The `Remove-EntraScopedRoleMembership` cmdlet removes a scoped role membership from Microsoft Entra ID. Specify `AdministrativeUnitId` and `ScopedRoleMembershipId` parameter to remove a scoped role membership. - -## Examples - -### Example 1: Remove a scoped role membership - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.AdministrativeUnitId - ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' -} -Remove-EntraScopedRoleMembership @params -``` - -This cmdlet removes a specific scoped role membership from Microsoft Entra ID. You can use the command `Get-EntraAdministrativeUnit` to get administrative unit Id. - -- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. -- `-ScopedRoleMembershipId` parameter specifies the ID of the scoped role membership to remove. To obtain the details of a scoped role membership, you can use the `Get-EntraScopedRoleMembership` command. - -## Parameters - -### -AdministrativeUnitId - -Specifies the ID of an administrative unit object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ScopedRoleMembershipId - -Specifies the ID of the scoped role membership to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraScopedRoleMembership](Add-EntraScopedRoleMembership.md) - -[Get-EntraScopedRoleMembership](Get-EntraScopedRoleMembership.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md deleted file mode 100644 index ce69a357d3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -title: Restore-EntraDeletedDirectoryObject -description: This article provides details on the Restore-EntraDeletedDirectoryObject command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject - -schema: 2.0.0 ---- - -# Restore-EntraDeletedDirectoryObject - -## Synopsis - -Restore a previously deleted object. - -## Syntax - -```powershell -Restore-EntraDeletedDirectoryObject - -Id - [] -``` - -## Description - -The `Restore-EntraDeletedDirectoryObject` cmdlet is used to restore previously deleted objects, such as application, group, service principal, administrative unit, or user objects. - -When a group or application is deleted, it is initially soft deleted and can be recovered within the first 30 days. After 30 days, the deleted object is permanently deleted and cannot be recovered. - -**Notes:** - -- Only Unified Groups (also known as Office 365 Groups) can be restored; Security groups cannot be restored. -- Restoring an application does not automatically restore its associated service principal. You must explicitly use this cmdlet to restore the deleted service principal. - -For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles: - -- **To restore deleted applications or service principals:** Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. -- **To restore deleted users:** User Administrator. - - However, to restore users with privileged administrator roles: - - In delegated scenarios, the app must be assigned the `Directory.AccessAsUser.All` delegated permission, and the calling user must also be assigned a higher privileged administrator role. - - In app-only scenarios, in addition to being granted the `User.ReadWrite.All` application permission, the app must be assigned a higher privileged administrator role. -- **To restore deleted groups:** Groups Administrator. - - However, to restore role-assignable groups, the calling user must be assigned the Privileged Role Administrator role. - -## Examples - -### Example 1: Restore a deleted object with ID - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' #administrativeUnit resource -Connect-Entra -Scopes 'Application.ReadWrite.All' #application resource -Connect-Entra -Scopes 'Group.ReadWrite.All' #group resource -Connect-Entra -Scopes 'Application.ReadWrite.All' #servicePrincipal resource -Connect-Entra -Scopes 'User.ReadWrite.All' #user resource -Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -``` - -```Output -Id DeletedDateTime --- --------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example shows how to restore a deleted object in Microsoft Entra ID. - -- `-Id` parameter specifies the Id of the directory object to restore. - -### Example 2: Restoring a Soft-Deleted User and Removing Conflicting Proxy Addresses - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -Restore-EntraDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -AutoReconcileProxyConflict -``` - -```Output -Id DeletedDateTime --- --------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example shows how to restore a deleted object in Microsoft Entra ID. - -- `-Id` parameter specifies the Id of the directory object to restore. -- `-AutoReconcileProxyConflict` parameter removes any conflicting proxy addresses while restoring a soft-deleted user whose one or more proxy addresses are currently used for an active user. - -## Parameters - -### -Id - -The Id of the directory object to restore. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -AutoReconcileProxyConflict - -Specifies whether Microsoft Entra ID should remove conflicting proxy addresses when restoring a soft-deleted user, if any of the user's proxy addresses are currently in use by an active user. This parameter applies only when restoring a soft-deleted user. The default value is `false`. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) - -[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) - -[Remove-EntraDeletedDirectoryObject](Remove-EntraDeletedDirectoryObject.md) - -[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) - -[Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md deleted file mode 100644 index 9087e6ebfb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.md +++ /dev/null @@ -1,145 +0,0 @@ ---- -title: Set-EntraAdministrativeUnit -description: This article provides details on the Set-EntraAdministrativeUnit command. - -ms.topic: reference -ms.date: 06/19/2023 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit - -schema: 2.0.0 ---- - -# Set-EntraAdministrativeUnit - -## Synopsis - -Updates an administrative unit. - -## Syntax - -```powershell -Set-EntraAdministrativeUnit - -AdministrativeUnitId - [-Description ] - [-DisplayName ] - [] -``` - -## Description - -The `Set-EntraAdministrativeUnit` cmdlet updates an administrative unit in Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to update a specific administrative unit. - -In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. - -The Privileged Role Administrator is the least privileged role required for this operation. - -## Examples - -### Example 1: Update DisplayName - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - DisplayName = 'UpdatedAU' -} -Set-EntraAdministrativeUnit @params -``` - -This Command update DisplayName of specific administrative unit. - -- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. -- `-DisplayName` parameter specifies the display name for the administrative unit. - -### Example 2: Update Description - -```powershell -Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' -$AdministrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq ''" -$params = @{ - AdministrativeUnitId = $AdministrativeUnit.ObjectId - Description = 'Updated AU Description' -} -Set-EntraAdministrativeUnit @params -``` - -This example shows how to update the description of a specific administrative unit. - -- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. -- `-Description` parameter specifies the description for the administrative unit. - -## Parameters - -### -Description - -Specifies a description. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AdministrativeUnitId - -Specifies the Id of an administrative unit in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraAdministrativeUnit](Get-EntraAdministrativeUnit.md) - -[New-EntraAdministrativeUnit](New-EntraAdministrativeUnit.md) - -[Remove-EntraAdministrativeUnit](Remove-EntraAdministrativeUnit.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md deleted file mode 100644 index 71c1d09ff0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.md +++ /dev/null @@ -1,147 +0,0 @@ ---- -title: Set-EntraAttributeSet -description: This article provides details on the Set-EntraAttributeSet command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAttributeSet - -schema: 2.0.0 ---- - -# Set-EntraAttributeSet - -## Synopsis - -Updates an existing attribute set. - -## Syntax - -```powershell -Set-EntraAttributeSet - -AttributeSetId - [-Description ] - [-MaxAttributesPerSet ] - [] -``` - -## DESCRIPTION - -The `Set-EntraAttributeSet` cmdlet updates a Microsoft Entra ID attribute set object specified by its ID. Specify `AttributeSetId` parameter to Update a Microsoft Entra ID attribute set object. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. - -Note: Only the Attribute Definition Administrator role is supported for this operation. Ensure the signed-in user is assigned this role. - -You can only update the `description` and `maxAttributesPerSet` properties. - -## Examples - -### Example 1: Update an attribute set - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - AttributeSetId = 'Engineering' - Description = 'Attributes for cloud engineering team' -} -Set-EntraAttributeSet @params -``` - -This example update an attribute set. - -- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. -- `-Description` parameter specifies the description for the attribute set. - -### Example 2: Update an attribute set using MaxAttributesPerSet - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - AttributeSetId = 'Engineering' - MaxAttributesPerSet = 10 -} -Set-EntraAttributeSet @params -``` - -This example update an attribute set using MaxAttributesPerSet. - -- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraAttributeSet` to get more details. -- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. - -## Parameters - -### -Description - -Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AttributeSetId - -Name of the attribute set. Unique identifier for the attribute set within a tenant. This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MaxAttributesPerSet - -Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraAttributeSet](New-EntraAttributeSet.md) - -[Get-EntraAttributeSet](Get-EntraAttributeSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md deleted file mode 100644 index d91b797cc7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: Set-EntraCustomSecurityAttributeDefinition -description: This article provides details on the Set-EntraCustomSecurityAttributeDefinition command. - - -ms.topic: reference -ms.date: 07/11/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition - -schema: 2.0.0 ---- - -# Set-EntraCustomSecurityAttributeDefinition - -## Synopsis - -Update the properties of a customSecurityAttributeDefinition object. - -## Syntax - -```powershell -Set-EntraCustomSecurityAttributeDefinition - -Id - [-Description ] - [-Status ] - [-UsePreDefinedValuesOnly ] - [] -``` - -## Description - -Update the properties of a customSecurityAttributeDefinition object. Specify `Id` parameter to update a custom security attribute definition. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. - -## Examples - -### Example 1: Update a custom security attribute - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - Id = 'Engineering_ProjectDate' - Description = 'Add-description' - Status = 'Available' - UsePreDefinedValuesOnly = $False -} -Set-EntraCustomSecurityAttributeDefinition @params -``` - -This example update a custom security attribute. - -- `-Id` parameter specifies the custom security attribute definition object ID. -- `-Description` parameter specifies the description of the custom security attribute. -- `-Status` parameter specifies the custom security attribute is active or deactivated. -- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. - -## Parameters - -### -Description - -Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a Microsoft Entra ID custom security attribute definition object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Status - -Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UsePreDefinedValuesOnly - -Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraCustomSecurityAttributeDefinition](Get-EntraCustomSecurityAttributeDefinition.md) - -[New-EntraCustomSecurityAttributeDefinition](New-EntraCustomSecurityAttributeDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md deleted file mode 100644 index a2b37457d9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -title: Set-EntraCustomSecurityAttributeDefinitionAllowedValue -description: This article provides details on the Set-EntraCustomSecurityAttributeDefinitionAllowedValue command. - -ms.topic: reference -ms.date: 07/11/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue - -schema: 2.0.0 ---- - -# Set-EntraCustomSecurityAttributeDefinitionAllowedValue - -## Synopsis - -Updates an existing custom security attribute definition predefined value. - -## Syntax - -```powershell -Set-EntraCustomSecurityAttributeDefinitionAllowedValue - [-IsActive ] - -CustomSecurityAttributeDefinitionId - -Id [] -``` - -## Description - -The `Set-EntraCustomSecurityAttributeDefinitionAllowedValue` cmdlet update a Microsoft Entra ID custom security attribute definition predefined value object identified by ID. Specify `CustomSecurityAttributeDefinitionId` and `Id` parameter to update a Microsoft Entra ID custom security attribute definition predefined value. - -## Examples - -### Example 1: Update a custom security attribute definition predefined value - -```powershell -Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' -$params = @{ - CustomSecurityAttributeDefinitionId = 'Engineering_Project' - Id = 'Alpine' - IsActive = $true -} -Set-EntraCustomSecurityAttributeDefinitionAllowedValue @params -``` - -This example update a custom security attribute definition predefined value. - -- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. -- `-Id` parameter specifies the ID of Microsoft Entra ID Object. -- `-IsActive` parameter specifies the predefined value is active or deactivated. - -## Parameters - -### -CustomSecurityAttributeDefinitionId - -The unique identifier of customSecurityAttributeDefinition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. This field is optional. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -IsActive - -Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any other supported directory objects. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraCustomSecurityAttributeDefinitionAllowedValue](Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md) - -[Add-EntraCustomSecurityAttributeDefinitionAllowedValue](Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md deleted file mode 100644 index 2e21b12941..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.md +++ /dev/null @@ -1,387 +0,0 @@ ---- -title: Set-EntraDevice -description: This article provides details on the Set-EntraDevice command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDevice - -schema: 2.0.0 ---- - -# Set-EntraDevice - -## Synopsis - -Updates a device. - -## Syntax - -```powershell -Set-EntraDevice - -DeviceObjectId - [-DevicePhysicalIds ] - [-DeviceOSType ] - [-DeviceTrustType ] - [-DisplayName ] - [-DeviceMetadata ] - [-ApproximateLastLogonTimeStamp ] - [-AccountEnabled ] - [-IsManaged ] - [-DeviceId ] - [-DeviceObjectVersion ] - [-IsCompliant ] - [-DeviceOSVersion ] - [-AlternativeSecurityIds ] - [-ProfileType ] - [-SystemLabels ] - [] -``` - -## Description - -The `Set-EntraDevice` cmdlet updates a device in Microsoft Entra ID. - -The calling user must have at least the Intune Administrator role in Microsoft Entra. A user with the Cloud Device Administrator role can only enable or disable devices, while a user with the Windows 365 Administrator role can only update basic device properties. - -## Examples - -### Example 1: Update a device display name - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName 'My OS/2 computer' -``` - -This example shows how to update a display name of a specified. - -### Example 2: Update a device alternative security ID - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -$NewId= New-Object Microsoft.Open.AzureAD.Model.AlternativeSecurityId -$NewId.Key =[System.Text.Encoding]::UTF8.GetBytes('test') -$NewId.type = 2 -Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AlternativeSecurityIds $NewId -``` - -This example shows how to update an alternative security ID of a specified device. - -### Example 3: Update a device account enabled - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AccountEnabled $true -``` - -This example shows how to update an account enabled of a specified device. - -### Example 4: Update a device OS type - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' -Set-EntraDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DeviceOSType Windows -``` - -This example shows how to update an OS type of a specified device. - -### Example 5: Update a device - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' - -$params = @{ - DeviceObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - DeviceMetadata = 'Testdevice' - DeviceObjectVersion = 4 - DevicePhysicalIds = '[GID]:g:1234567890123456' - IsCompliant = $false -} - -Set-EntraDevice @params -``` - -This example shows how to update multiple properties of a specified device. - -## Parameters - -### -AccountEnabled - -Indicates whether the account is enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AlternativeSecurityIds - -Specifies alternative security IDs. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ApproximateLastLogonTimeStamp - -The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderby. - -```yaml -Type: System.DateTime -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceId - -Specifies the device ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceMetadata - -The device metadata for this device. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceObjectVersion - -Specifies the object version of the device. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceOSType - -Specifies the operating system. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceOSVersion - -Specifies the operating system version. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DevicePhysicalIds - -Specifies the physical ID. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceTrustType - -Specifies the device trust type. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCompliant - -Indicates whether the device is compliant. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsManaged - -Indicates whether the device is managed. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DeviceObjectId - -Specifies the object ID of a device in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ProfileType - -Specifies the profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SystemLabels - -Specifies list of labels applied to the device by the system. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDevice](Get-EntraDevice.md) - -[New-EntraDevice](New-EntraDevice.md) - -[Remove-EntraDevice](Remove-EntraDevice.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md deleted file mode 100644 index 1226207ac6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: Set-EntraDirSyncConfiguration -description: This article provides details on the Set-EntraDirSyncConfiguration command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration - -schema: 2.0.0 ---- - -# Set-EntraDirSyncConfiguration - -## Synopsis - -Modifies the directory synchronization settings. - -## Syntax - -```powershell -Set-EntraDirSyncConfiguration - -AccidentalDeletionThreshold - [-Force] - [-TenantId ] - [] -``` - -## Description - -The `Set-EntraDirSyncConfiguration` cmdlet modifies the directory synchronization settings. - -## Examples - -### Example 1: Set directory synchronization settings - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold 600 -Force -``` - -This command sets directory synchronization settings. - -- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. -- `-Force` Forces the command to run without asking for user confirmation. - -### Example 2: Set directory synchronization settings for a Tenant - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -$tenantID = (Get-EntraContext).TenantId -$params = @{ - AccidentalDeletionThreshold = 600 - TenantId = $tenantID - Force = $true -} - -Set-EntraDirSyncConfiguration @params -``` - -This command sets directory synchronization settings. - -- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. -- `-Force` Forces the command to run without asking for user confirmation. -- `-TenantId` Specifies the unique ID of the tenant. - -## Parameters - -### -AccidentalDeletionThreshold - -Specifies the accidental deletion prevention configuration for a tenant. - -```yaml -Type: System.UInt32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -Forces the command to run without asking for user confirmation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TenantId - -The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. - -```yaml -Type: System.String -Parameter Sets: SetAccidentalDeletionThreshold -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.UInt32 - -### System.Guid - -## Outputs - -### System.Object - -## Notes - -- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). - -## Related Links - -[Get-EntraDirSyncConfiguration](Get-EntraDirSyncConfiguration.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md deleted file mode 100644 index 75055a97f0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Set-EntraDirSyncEnabled -description: This article provides details on the Set-EntraDirSyncEnabled command. - - -ms.topic: reference -ms.date: 09/27/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled - -schema: 2.0.0 ---- - -# Set-EntraDirSyncEnabled - -## Synopsis - -Turns directory synchronization on or off for a company. - -## Syntax - -```powershell -Set-EntraDirSyncEnabled - -EnableDirSync - [-Force] - [-TenantId ] - [] -``` - -## Description - -The `Set-EntraDirSyncEnabled` cmdlet turns directory synchronization on or off for a company. ->[!IMPORTANT] ->It may take up to 72 hours to complete deactivation once you have disabled DirSync through this cmdlet. The time depends on the number of objects that are in your cloud service subscription account. **You cannot cancel the disable action**. It will need to complete before you can take any other action, including re-enabling of DirSync. If you choose to re-enable DirSync, a full synchronization of your synced objects will happen. This may take a considerable time depending on the number of objects in your Microsoft Entra ID. ->[!NOTE] ->If you disable DirSync and you decide to re-enable it, and you have enabled the BlockCloudObjectTakeoverThroughHardMatch feature, OnPrem to cloud object takeover/update for all objects mastered in the Microsoft Entra ID will be blocked. If this is the case and you want to resume syncing Microsoft Entra ID mastered objects with Microsoft Entra ID, set **BlockCloudObjectTakeoverThroughHardMatch** feature to false. - -## Examples - -### Example 1: Turn on directory synchronization - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' -$params = @{ - EnableDirsync = $True - Force = $True -} -Set-EntraDirSyncEnabled @params -``` - -This example turns on directory synchronization for a company. - -- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. -- `-Force` Forces the command to run without asking for user confirmation. - -### Example 2: Turn off directory synchronization - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' -$params = @{ - EnableDirsync = $False - TenantId = 'aaaaaaaa-1111-1111-1111-000000000000' - Force = $True - -} -Set-EntraDirSyncEnabled @params -``` - -This example turns off directory synchronization for a company. - -- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. -- `-Force` Forces the command to run without asking for user confirmation. -- `-TenantId` Specifies the unique ID of the tenant on which to perform the operation. - -## Parameters - -### -EnableDirsync - -Specifies whether to turn on directory synchronization on for your company. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId - -Specifies the unique ID of the tenant on which to perform the operation. -The default value is the tenant of the current user. -This parameter applies only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -Forces the command to run without asking for user confirmation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md deleted file mode 100644 index 7dcceca78b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.md +++ /dev/null @@ -1,187 +0,0 @@ ---- -title: Set-EntraDirSyncFeature -description: This article provides details on the Set-EntraDirSyncFeature command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncFeature - -schema: 2.0.0 ---- - -# Set-EntraDirSyncFeature - -## Synopsis - -Used to set identity synchronization features for a tenant. - -## Syntax - -```powershell -Set-EntraDirSyncFeature - -Feature - -Enabled - [-TenantId ] - [-Force] - [] -``` - -## Description - -The `Set-EntraDirSyncFeature` cmdlet sets identity synchronization features for a tenant. - -You can use the following synchronization features with this cmdlet: - -- **EnableSoftMatchOnUpn**: Soft match is the process used to link an object being synced from on-premises for the first time with one that already exists in the cloud. When this feature is enabled, soft match is attempted using the standard logic, based on the primary SMTP address. If a match isn't found based on primary SMTP, then a match is attempted based on UserPrincipalName. Once this feature is enabled, it can't be disabled. -- **PasswordSync**: Used to indicate on-premise password synchronization. -- **SynchronizeUpnForManagedUsers**: Allows for the synchronization of UserPrincipalName updates from on-premises for managed (nonfederated) users that are assigned a license. These updates are blocked if this feature isn't enabled. Once this feature is enabled, it can't be disabled. -- **BlockSoftMatch**: When this feature is enabled, it blocks the soft match feature. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching is completed and is no longer needed. -- **BlockCloudObjectTakeoverThroughHardMatch**: Used to block cloud object takeover via source anchor hard match. - -Enabling some of these features, such as EnableSoftMatchOnUpn and SynchronizationUpnForManagedUsers, is a permanent operation. -You can't disable these features once they're enabled. - -## Examples - -### Example 1: Enable a feature for the tenant - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -$params = @{ - Feature = 'BlockCloudObjectTakeoverThroughHardMatch' - Enable = $True -} -Set-EntraDirSyncFeature @params -``` - -This command enables the SoftMatchOnUpn feature for the tenant. - -- `-Feature` specifies the directory synchronization feature to turn on or off. -- `-Enable` specifies whether the specified features are turned on for the company. -- `-Force` Forces the command to run without asking for user confirmation. - -### Example 2: Block Soft Matching for the tenant - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -$params = @{ - Feature = 'BlockSoftMatch' - Enable = $True -} - -Set-EntraDirSyncFeature @params -``` - -This command enables the BlockSoftMatch feature for the tenant - effectively blocking the Soft Matching feature in the tenant. - -- `-Feature` specifies the directory synchronization feature to turn on or off. -- `-Enable` specifies whether the specified features are turned on for the company. - -### Example 3: Block Cloud object takeover through Hard Matching for the tenant - -```powershell -Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' -$params = @{ - Feature = 'BlockCloudObjectTakeoverThroughHardMatch' - Enable = $True -} - -Set-EntraDirSyncFeature @params -``` - -This command enables the BlockCloudObjectTakeoverThroughHardMatch feature for the tenant - effectively blocking the Hard Match object takeover. - -- `-Feature` specifies the directory synchronization feature to turn on or off. -- `-Enable` specifies whether the specified features are turned on for the company. -- `-TenantId` Specifies the unique ID of the tenant. - -## Parameters - -### -Feature - -The DirSync feature to turn on or off. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Enable - -Indicates whether the specified features are turned on for the company. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: False -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId - -The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Force - -Forces the command to run without asking for user confirmation. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). -- For the feature list see the [onPremisesDirectorySynchronizationFeature resource type](https://learn.microsoft.com/graph/api/resources/onpremisesdirectorysynchronizationfeature). - -## Related Links - -[Get-EntraDirSyncFeature](Get-EntraDirSyncFeature.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md deleted file mode 100644 index d2000341f7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Set-EntraDomain -description: This article provides details on the Set-EntraDomain command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomain - -schema: 2.0.0 ---- - -# Set-EntraDomain - -## Synopsis - -Updates a domain. - -## Syntax - -```powershell -Set-EntraDomain - -Name - [-IsDefault ] - [-SupportedServices ] - [] -``` - -## Description - -The `Set-EntraDomain` cmdlet updates a verified domain in Microsoft Entra ID. - -The work or school account needs to belong to at least one of the following Microsoft Entra roles: - -- Domain Name Administrator -- Security Administrator -- External Identity Provider Administrator - -## Examples - -### Example 1: Set the domain as the default domain for new user account creation - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Set-EntraDomain -Name Contoso.com -IsDefault $true -``` - -This example demonstrates how to set default domain for new user account in Microsoft Entra ID. - -### Example 2: Set the list of domain capabilities - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' -Set-EntraDomain -Name Contoso.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') -``` - -This example demonstrates how to set domain capabilities for new user account in Microsoft Entra ID. - -## Parameters - -### -IsDefault - -Indicates whether or not this is the default domain that is used for user creation. -There's only one default domain per company. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -The fully qualified name of the domain. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SupportedServices - -The capabilities assigned to the domain. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Confirm-EntraDomain](Confirm-EntraDomain.md) - -[Get-EntraDomain](Get-EntraDomain.md) - -[New-EntraDomain](New-EntraDomain.md) - -[Remove-EntraDomain](Remove-EntraDomain.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md deleted file mode 100644 index 21dbb0f668..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.md +++ /dev/null @@ -1,290 +0,0 @@ ---- -title: Set-EntraDomainFederationSettings -description: This article provides details on the Set-EntraDomainFederationSettings command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings - -schema: 2.0.0 ---- - -# Set-EntraDomainFederationSettings - -## Synopsis - -Updates settings for a federated domain. - -## Syntax - -```powershell -Set-EntraDomainFederationSettings - -DomainName - [-SigningCertificate ] - [-NextSigningCertificate ] - [-LogOffUri ] - [-PassiveLogOnUri ] - [-ActiveLogOnUri ] - [-IssuerUri ] - [-FederationBrandName ] - [-MetadataExchangeUri ] - [-PreferredAuthenticationProtocol ] - [-SigningCertificateUpdateStatus ] - [-PromptLoginBehavior ] - [] -``` - -## Description - -The `Set-EntraDomainFederationSettings` cmdlet is used to update the settings of a single sign-on domain. - -For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: - -- Domain Name Administrator -- External Identity Provider Administrator -- Hybrid Identity Administrator -- Security Administrator - -## Examples - -### Example 1: Set the PromptLoginBehavior - -```powershell -Connect-Entra -Scopes 'Domain.ReadWrite.All' - -$params = @{ - DomainName = 'contoso.com' - PreferredAuthenticationProtocol = 'WsFed' - PromptLoginBehavior = 'TranslateToFreshPasswordAuth' # Or 'NativeSupport' or 'Disabled', depending on the requirement -} -Set-EntraDomainFederationSettings @params -``` - -This command updates the `PromptLoginBehavior` to either `TranslateToFreshPasswordAuth`, `NativeSupport`, or `Disabled`. These possible values are described: - -- `TranslateToFreshPasswordAuth` - means the default Microsoft Entra ID behavior of translating `prompt=login` to `wauth=https://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password` and `wfresh=0`. -- `NativeSupport` - means that the `prompt=login` parameter is sent as is to ADFS. -- `Disabled` - means that only wfresh=0 is sent to ADFS - -Use the `Get-EntraDomainFederationSettings -DomainName | Format-List *` to get the values for `PreferredAuthenticationProtocol` and `PromptLoginBehavior` for the federated domain. - -- `-DomainName` parameter specifies the fully qualified domain name to retrieve. -- `-PreferredAuthenticationProtocol` parameter specifies the preferred authentication protocol. -- `-PromptLoginBehavior` parameter specifies the prompt sign-in behavior. - -## Parameters - -### -DomainName - -The fully qualified domain name (FQDN) to update. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -SigningCertificate - -The current certificate used to sign tokens passed to the Microsoft Entra ID Identity platform. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NextSigningCertificate - -The next token signing certificate that will be used to sign tokens when the primary signing certificate expires. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 3 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -LogOffUri - -The URL clients are redirected to when they sign out of Microsoft Entra ID services. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 4 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PassiveLogOnUri - -The URL that web-based clients will be directed to when signing in to Microsoft Entra ID services. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 5 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ActiveLogOnUri - -A URL that specifies the end point used by active clients when authenticating with domains set up for single sign-on (also known as identity federation) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 6 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -IssuerUri - -The unique identifier of the domain in the Microsoft Entra ID Identity platform derived from the federation server. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 7 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -FederationBrandName - -The name of the string value shown to users when signing in to Microsoft Entra ID. -We recommend that customers use something that is familiar to -users such as "Contoso Inc." - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 8 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MetadataExchangeUri - -The URL that specifies the metadata exchange end point used for authentication from rich client applications such as Lync Online. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 9 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PreferredAuthenticationProtocol - -Specifies the preferred authentication protocol. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 10 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SigningCertificateUpdateStatus - -Specifies the update status of the signing certificate. - -```yaml -Type: System.Object -Parameter Sets: (All) -Aliases: - -Required: False -Position: 11 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PromptLoginBehavior - -Specifies the prompt login behavior. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 12 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraDomainFederationSettings](Get-EntraDomainFederationSettings.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md deleted file mode 100644 index 1a4ad58b18..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.md +++ /dev/null @@ -1,242 +0,0 @@ ---- -title: Set-EntraPartnerInformation -description: This article provides details on the Set-EntraPartnerInformation command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPartnerInformation - -schema: 2.0.0 ---- - -# Set-EntraPartnerInformation - -## Synopsis - -Sets company information for partners. - -## Syntax - -```powershell -Set-EntraPartnerInformation - [-CompanyType ] - [-PartnerCompanyName ] - [-PartnerSupportTelephones ] - [-PartnerSupportEmails ] - [-PartnerCommerceUrl ] - [-PartnerSupportUrl ] - [-PartnerHelpUrl ] - [-TenantId ] - [] -``` - -## Description - -The `Set-EntraPartnerInformation` cmdlet is used by partners to set partner-specific properties. - -These properties can view by all tenants that the partner has access to. - -## Examples - -### Example 1: Update the help URL - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraPartnerInformation -PartnerHelpUrl 'http://www.help.contoso.com' -``` - -This example shows how to update the help URL. - -### Example 2: Update the Support URL - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraPartnerInformation -PartnerSupportUrl 'http://www.test1.com' -``` - -This example shows how to update the support URL. - -### Example 3: Update the Commerce URL - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraPartnerInformation -PartnerCommerceUrl 'http://www.test1.com' -``` - -This example shows how to update the commerce URL. - -### Example 4: Update the SupportEmails - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraPartnerInformation -PartnerSupportEmails 'contoso@example.com' -``` - -This example shows how to update the support email addresses. - -### Example 5: Update the SupportTelephones - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -$tenantId = (Get-EntraContext).TenantId -$params = @{ - PartnerSupportTelephones = '234234234' - TenantId = $tenantId -} -Set-EntraPartnerInformation @params -``` - -This example shows how to update support telephone numbers. - -## Parameters - -### -PartnerCommerceUrl - -Specifies the URL for the partner's commerce website. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerHelpUrl - -Specifies the URL for the partner's Help website. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerSupportEmails - -Specifies the support email address for the partner. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerSupportTelephones - -Specifies the support telephone numbers for the partner. - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerSupportUrl - -Specifies the URL for the partner's support website. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -TenantId - -Specifies the unique ID of the tenant on which to perform the operation. -The default value is the tenant of the current user. -This parameter applies only to partner users. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -CompanyType - -Specifies the partner's company type. - -```yaml -Type: CompanyType -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -PartnerCompanyName - -Specifies the partner's company name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPartnerInformation](Get-EntraPartnerInformation.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md deleted file mode 100644 index 24191c6eb6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.md +++ /dev/null @@ -1,216 +0,0 @@ ---- -title: Set-EntraTenantDetail -description: This article provides details on the Set-EntraTenantDetail command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTenantDetail - -schema: 2.0.0 ---- - -# Set-EntraTenantDetail - -## Synopsis - -Set contact details for a tenant. - -## Syntax - -```powershell -Set-EntraTenantDetail - [-PrivacyProfile ] - [-MarketingNotificationEmails ] - [-TechnicalNotificationMails ] - [-SecurityComplianceNotificationMails ] - [-SecurityComplianceNotificationPhones ] - [] -``` - -## Description - -This cmdlet is used to set various contact details for a tenant. - -For delegated scenarios, the signed-in user must have at least one of the following Microsoft Entra roles. - -- Application Administrator -- Cloud Application Administrator -- Privileged Role Administrator -- User Administrator -- Helpdesk Administrator - -## Examples - -### Example 1: Set contact details for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -$params = @{ - MarketingNotificationEmails = @('amy@contoso.com', 'henry@contoso.com') - SecurityComplianceNotificationMails = @('john@contoso.com', 'mary@contoso.com') - SecurityComplianceNotificationPhones = @('1-555-625-9999', '1-555-233-5544') - TechnicalNotificationMails = 'peter@contoso.com' -} - -Set-EntraTenantDetail @params -``` - -This example demonstrates how to set various contact details for a tenant. - -- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. -- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. -- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. -- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. - -### Example 2: Set MarketingNotificationEmails for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraTenantDetail -MarketingNotificationEmails @('amy@contoso.com','henry@contoso.com') -``` - -This example demonstrates how to set MarketingNotificationEmails detail for a tenant. - -- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. - -### Example 3: Set SecurityComplianceNotificationMails for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraTenantDetail -SecurityComplianceNotificationMails @('john@contoso.com','mary@contoso.com') -``` - -This example demonstrates how to set SecurityComplianceNotificationMails detail for a tenant. - -- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. - -### Example 4: Set -SecurityComplianceNotificationPhones for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraTenantDetail -SecurityComplianceNotificationPhones @('1-555-625-9999', '1-555-233-5544') -``` - -This example demonstrates how to set MarketingNotificationEmails detail for a tenant. - -- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. - -### Example 5: Set TechnicalNotificationMails for a tenant - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -Set-EntraTenantDetail -TechnicalNotificationMails 'peter@contoso.com' -``` - -This example demonstrates how to set TechnicalNotificationMails detail for a tenant. - -- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. - -## Parameters - -### -MarketingNotificationEmails - -The email addresses that are used to send marketing notification emails. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityComplianceNotificationMails - -The email addresses that are used to send security compliance emails. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityComplianceNotificationPhones - -One or more phone numbers that are used for security compliance. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TechnicalNotificationMails - -The email addresses that are used for technical notification emails. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivacyProfile - -Represents a company's privacy profile, which includes a privacy statement URL and a contact person for questions regarding the privacy statement. - -```yaml -Type: PrivacyProfile -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -- For more details see [Update organization](https://learn.microsoft.com/graph/api/organization-update). - -## Related Links - -[Get-EntraTenantDetail](Get-EntraTenantDetail.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md deleted file mode 100644 index 7c86ba6f95..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.md +++ /dev/null @@ -1,282 +0,0 @@ ---- -title: Get-EntraDirectoryRoleAssignment -description: This article provides details on the Get-EntraDirectoryRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRoleAssignment - -## Synopsis - -Get a Microsoft Entra ID roleAssignment. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDirectoryRoleAssignment - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetValue - -```powershell -Get-EntraDirectoryRoleAssignment - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDirectoryRoleAssignment - -UnifiedRoleAssignmentId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRoleAssignment` cmdlet gets information about role assignments in Microsoft Entra ID. To get a role assignment, specify the `UnifiedRoleAssignmentId` parameter. Specify the `SearchString` or `Filter` parameter to find a particular role assignment. - -In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: - -- microsoft.directory/roleAssignments/standard/read (least privileged) -- microsoft.directory/roleAssignments/allProperties/read -- microsoft.directory/roleAssignments/allProperties/allTasks - -The least privileged roles for this operation, from least to most privileged, are: - -- Directory Readers -- Global Reader -- Privileged Role Administrator - -## Examples - -### Example 1: Get role assignments - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets the role assignments in Microsoft Entra ID. - -### Example 2: Get role assignments using 'All' parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -All -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets all the role assignments in Microsoft Entra ID. - -### Example 3: Get role assignments by Id - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId '00001111-aaaa-2222-bbbb-3333cccc4444' -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets the role assignments using specified roleAssignment Id. - -- `UnifiedRoleAssignmentId` parameter specifies the roleAssignment object ID. - -### Example 4: Get role assignments filter by principalId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -Filter "principalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets the role assignments containing the specified principalId. - -### Example 5: Get role assignments filter by roleDefinitionId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -Filter "roleDefinitionId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets the role assignments containing the specified roleDefinitionId. - -### Example 6: Get top two role assignments - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleAssignment -Top 2 -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command gets top two role assignments. - -## Parameters - -### -UnifiedRoleAssignmentId - -The unique identifier of a Microsoft Entra ID roleAssignment object. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment - -## Notes - -`Get-EntraRoleAssignment` is an alias for `Get-EntraDirectoryRoleAssignment`. - -## Related Links - -[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) - -[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md deleted file mode 100644 index 7fcd4cd5a8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -title: Get-EntraDirectoryRoleDefinition -description: This article provides details on the Get-EntraDirectoryRoleDefinition command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition - -schema: 2.0.0 ---- - -# Get-EntraDirectoryRoleDefinition - -## Synopsis - -Gets information about role definitions in Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDirectoryRoleDefinition - [-All] - [-Top ] - [-Filter ] - [-Property ] - [] -``` - -### GetVague - -```powershell -Get-EntraDirectoryRoleDefinition - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDirectoryRoleDefinition - -UnifiedRoleDefinitionId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraDirectoryRoleDefinition` cmdlet gets information about role definitions in Microsoft Entra ID. To get a role definition, specify the `UnifiedRoleDefinitionId` parameter. Specify the `SearchString` or `Filter` parameter to find particular role definition. - -In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: - -- microsoft.directory/roleAssignments/standard/read (least privileged) -- microsoft.directory/roleAssignments/allProperties/read -- microsoft.directory/roleAssignments/allProperties/allTasks - -The least privileged roles for this operation, from least to most privileged, are: - -- Directory Readers -- Global Reader -- Privileged Role Administrator - -## Examples - -### Example 1: Get all role definitions - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -``` - -```Output -DisplayName Id TemplateId Description ------------ -- ---------- ----------- -Guest User 10dae51f-b6af-4016-8d66-8c2a99b929b3 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. -Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. -``` - -This command returns all the role definitions present. - -### Example 2: Get a role definition by UnifiedRoleDefinitionId - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId '1a327991-10cb-4266-877a-998fb4df78ec' -``` - -```Output -DisplayName Id TemplateId Description ------------ -- ---------- ----------- -Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. -``` - -This command returns a specified role definition. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. - -### Example 3: Filter role definitions by display name - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -Filter "startsWith(displayName, 'Restricted')" -``` - -```Output -DisplayName Id TemplateId Description ------------ -- ---------- ----------- -Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. -``` - -This command return all the role definitions containing the specified display name. - -### Example 4: Get top two role definition - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -Top 2 -``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -Restricted Guest User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. True True -``` - -This command return top two the role definitions in Microsoft Entra DirectoryRoleId. - -### Example 5: Filter role definitions by display name - -```powershell -Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' -Get-EntraDirectoryRoleDefinition -SearchString 'Global' - ``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -Global Administrator 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identit… -Global Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff f2ef992c-3afb-46b9-b7cf-a126ee74c451 Can read everything that a Global Administrator can, but not update anything. -``` - -This command return all the role definitions containing the specified display name. - -## Parameters - -### -UnifiedRoleDefinitionId - -Specifies the UnifiedRoleDefinitionId of the role definition. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records that this cmdlet gets. The default value is 100. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter string to match a set of role definitions. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -`Get-EntraRoleDefinition` is an alias for `Get-EntraDirectoryRoleDefintion`. - -## Related Links - -[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) - -[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) - -[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md deleted file mode 100644 index aae90daa6d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.md +++ /dev/null @@ -1,136 +0,0 @@ ---- -title: New-EntraDirectoryRoleAssignment -description: This article provides details on the New-EntraDirectoryRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment - -schema: 2.0.0 ---- - -# New-EntraDirectoryRoleAssignment - -## Synopsis - -Create a new Microsoft Entra ID roleAssignment. - -## Syntax - -```powershell -New-EntraDirectoryRoleAssignment - -PrincipalId - -RoleDefinitionId - [-DirectoryScopeId ] - [] -``` - -## Description - -The `New-EntraDirectoryRoleAssignment` cmdlet creates a new Microsoft Entra role assignment. - -## Examples - -### Example 1: Create a new Microsoft Entra ID role assignment - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' -$params = @{ - RoleDefinitionId = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' - PrincipalId = 'aaaaaaaa-bbbb-cccc-1111-222222222222' - DirectoryScopeId = '/' - } - -New-EntraDirectoryRoleAssignment @params -``` - -```Output -Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId --- ----------- ---------------- ---------------- ---------- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / -``` - -This command creates a new role assignment in Microsoft Entra ID. - -- `-RoleDefinitionId` parameter specifies the ID of the role definition that you want to assign. Role definitions describe the permissions that are granted to users or groups by the role. This is the Identifier of the `unifiedRoleDefinition` the assignment is for. - -- `-PrincipalId` parameter specifies the ID of the principal (user, group, or service principal) to whom the role is being assigned. - -- `-DirectoryScopeId` parameter specifies the scope of the directory over which the role assignment is effective. The '/' value typically represents the root scope, meaning the role assignment is applicable across the entire directory. - -## Parameters - -### -DirectoryScopeId - -Specifies the scope for the role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrincipalId - -Specifies the principal for role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RoleDefinitionId - -Specifies the role definition for role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment - -## Notes - -`New-EntraRoleAssignment` is an alias for `New-EntraDirectoryRoleAssignment`. - -## Related Links - -[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) - -[Remove-EntraDirectoryRoleAssignment](Remove-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md deleted file mode 100644 index d55868d7d6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.md +++ /dev/null @@ -1,330 +0,0 @@ ---- -title: New-EntraDirectoryRoleDefinition -description: This article provides details on the New-EntraDirectoryRoleDefinition command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition - -schema: 2.0.0 ---- - -# New-EntraDirectoryRoleDefinition - -## Synopsis - -Create a new Microsoft Entra ID roleDefinition. - -## Syntax - -```powershell -New-EntraDirectoryRoleDefinition - [-TemplateId ] - -DisplayName - -RolePermissions - [-Description ] - [-Version ] - -IsEnabled - [-ResourceScopes ] - [] -``` - -## Description - -Create a new Microsoft Entra ID roleDefinition object. - -## Examples - -### Example 1: Creates a new role definition - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output - -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 93ff7659-04bd-4d97-8add-b6c992cce98e False False - -``` - -This command creates a new role definition in Microsoft Entra ID. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. - -### Example 2: Creates a new role definition with Description parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' - Description = 'Role Definition demo' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output - -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 e14cb8e2-d696-4756-bd7f-c7df25271f3d Role Definition demo False False - -``` - -This command creates a new role definition with Description parameter. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-Description` parameter specifies the description for the role definition. - -### Example 3: Creates a new role definition with ResourceScopes parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' - ResourceScopes = '/' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 2bc29892-ca2e-457e-b7c0-03257a0bcd0c False False - -``` - -This command creates a new role definition with ResourceScopes parameter. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-ResourceScopes` parameter specifies the resource scopes for the role definition. - -### Example 4: Creates a new role definition with TemplateId parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' - TemplateId = '4dd5aa9c-cf4d-4895-a993-740d342802b9' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 4dd5aa9c-cf4d-4895-a993-740d342802b9 False False - -``` - -This command creates a new role definition with TemplateId parameter. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-TemplateId` parameter specifies the template ID for the role definition. - -### Example 5: Creates a new role definition with Version parameter - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") -$params = @{ - RolePermissions = $RolePermissions - IsEnabled = $false - DisplayName = 'MyRoleDefinition' - Version = '2' -} - -New-EntraDirectoryRoleDefinition @params -``` - -```Output -DisplayName Id TemplateId Description IsBuiltIn IsEnabled ------------ -- ---------- ----------- --------- --------- -MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 b69d16e9-b3f9-4289-a87f-8f796bd9fa28 False False - -``` - -This command creates a new role definition with Version parameter. - -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-Version` parameter specifies the version for the role definition. - -## Parameters - -### -Description - -Specifies a description for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsEnabled - -Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role isn't available for assignment. Read-only when `isBuiltIn` is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceScopes - -Specifies the resource scopes for the role definition. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RolePermissions - -Specifies permissions for the role definition. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TemplateId - -Specifies the template ID for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Version - -Specifies version for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition - -## Notes - -`New-EntraRoleDefinition` is an alias for `New-EntraDirectoryRoleDefintion`. - -## Related Links - -[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) - -[Remove-EntraDirectoryRoleDefinition](Remove-EntraDirectoryRoleDefinition.md) - -[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md deleted file mode 100644 index ba9841b7cd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Remove-EntraDirectoryRoleAssignment -description: This article provides details on the Remove-EntraDirectoryRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment - -schema: 2.0.0 ---- - -# Remove-EntraDirectoryRoleAssignment - -## Synopsis - -Delete a Microsoft Entra ID roleAssignment. - -## Syntax - -```powershell -Remove-EntraDirectoryRoleAssignment - -UnifiedRoleAssignmentId - [] -``` - -## Description - -The `Remove-EntraDirectoryRoleAssignment` cmdlet removes a role assignment from Microsoft Entra ID. - -## Examples - -### Example 1: Remove a role assignment - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' -Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId Y1vFBcN4i0e3ngdNDocmngJAWGnAbFVAnJQyBBLv1lM-1 -``` - -This example removes the specified role assignment from Microsoft Entra ID. - -- `-Id` parameter specifies the role assignment ID. - -## Parameters - -### -UnifiedRoleAssignmentId - -The unique identifier of an object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -`Remove-EntraRoleAssignment` is an alias for `Remove-EntraDirectoryRoleAssignment`. - -## Related Links - -[Get-EntraDirectoryRoleAssignment](Get-EntraDirectoryRoleAssignment.md) - -[New-EntraDirectoryRoleAssignment](New-EntraDirectoryRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md deleted file mode 100644 index d80058e54d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Remove-EntraDirectoryRoleDefinition -description: This article provides details on the Remove-EntraDirectoryRoleDefinition command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition - -schema: 2.0.0 ---- - -# Remove-EntraDirectoryRoleDefinition - -## Synopsis - -Delete a Microsoft Entra ID Directory roleDefinition object. - -## Syntax - -```powershell -Remove-EntraDirectoryRoleDefinition - -UnifiedRoleDefinitionId - [] -``` - -## Description - -Delete a Microsoft Entra ID Directory roleDefinition object by ID. - -You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. - -## Examples - -### Example 1: Remove a specified role definition - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 -``` - -This example demonstrates how to remove the specified role definition from Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. - -## Parameters - -### -UnifiedRoleDefinitionId - -The unique identifier of an object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -`Remove-EntraRoleDefinition` is an alias for `Remove-EntraDirectoryRoleDefintion`. - -## Related Links - -[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) - -[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) - -[Set-EntraDirectoryRoleDefinition](Set-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md deleted file mode 100644 index d00e0c6818..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.md +++ /dev/null @@ -1,267 +0,0 @@ ---- -title: Set-EntraDirectoryRoleDefinition -description: This article provides details on the Set-EntraDirectoryRoleDefinition command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition - -schema: 2.0.0 ---- - -# Set-EntraDirectoryRoleDefinition - -## Synopsis - -Update an existing Microsoft Entra ID roleDefinition. - -## Syntax - -```powershell -Set-EntraDirectoryRoleDefinition - [-TemplateId ] - [-DisplayName ] - [-RolePermissions ] - -UnifiedRoleDefinitionId - [-Description ] - [-Version ] - [-IsEnabled ] - [-ResourceScopes ] - [] -``` - -## Description - -Updates a Microsoft Entra roleDefinition object identified by ID. You can't update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. - -## Examples - -### Example 1: Update an roleDefinition - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" -Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -DisplayName 'UpdatedDisplayName' -``` - -This example updates the specified role definition in Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. -- `-DisplayName` parameter specifies the display name for the role definition. - -### Example 2: Update an roleDefinition with Description - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" -Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -Description 'MYROLEUPDATE1S' -``` - -This example updates the Description of specified role definition in Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. -- `-Description` parameter specifies the description for the role definition. - -### Example 3: Update an roleDefinition with IsEnabled - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" -Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId $roleDefinition.Id -IsEnabled $true -``` - -This example updates the IsEnabled of specified role definition in Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. -- `-IsEnabled` parameter specifies whether the role definition is enabled. - -### Example 4: Update an roleDefinition - -```powershell -Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' -$roleDefinition = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq ''" -$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission -$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/standard/read") -$params = @{ - UnifiedRoleDefinitionId = $roleDefinition.Id - Description = 'Update' - DisplayName = 'Update' - ResourceScopes = '/' - IsEnabled = $false - RolePermissions = $RolePermissions - TemplateId = '54d418b2-4cc0-47ee-9b39-e8f84ed8e073' - Version = 2 -} - -Set-EntraDirectoryRoleDefinition @params -``` - -This example updates the RolePermissions, TemplateId, TemplateId, ResourceScopes of specified role definition in Microsoft Entra ID. - -- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. -- `-RolePermissions` parameter specifies the permissions for the role definition. -- `-IsEnabled` parameter specifies whether the role definition is enabled. -- `-DisplayName` parameter specifies the display name for the role definition. -- `-Description` parameter specifies the description for the role definition. -- `-ResourceScopes` parameter specifies the resource scopes for the role definition. -- `-TemplateId` parameter specifies the template ID for the role definition. -- `-Version` parameter specifies the version for the role definition. - -## Parameters - -### -UnifiedRoleDefinitionId - -Specifies the roleDefinition object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Description - -Specifies a description for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name for the role definition. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsEnabled - -Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role is not available for assignment. Read-only when `isBuiltIn` is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceScopes - -Specifies the resource scopes for the role definition. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -RolePermissions - -Specifies permissions for the role definition. List of permissions included in the role. Read-only when `isBuiltIn` is `true`. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TemplateId - -Specifies the template ID for the role definition. A custom template ID can be set when `isBuiltIn` is `false`. This ID is typically used to keep the same identifier across different directories. It is read-only when `isBuiltIn` is `true`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Version - -Specifies version for the role definition. Indicates version of the role definition. Read-only when `isBuiltIn` is `true`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -`Set-EntraRoleDefinition` is an alias for `Set-EntraDirectoryRoleDefintion`. - -## Related Links - -[Get-EntraDirectoryRoleDefinition](Get-EntraDirectoryRoleDefinition.md) - -[New-EntraDirectoryRoleDefinition](New-EntraDirectoryRoleDefinition.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md deleted file mode 100644 index cca67243d0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Add-EntraGroupMember -description: This article explains the Add-EntraGroupMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupMember - -schema: 2.0.0 ---- - -# Add-EntraGroupMember - -## Synopsis - -Adds a member to a group. - -## Syntax - -```powershell -Add-EntraGroupMember - -GroupId - -RefObjectId - [] -``` - -## Description - -The Add-EntraGroupMember cmdlet adds a member to a group. - -## Examples - -### Example 1: Add a member to a group - -```powershell -Connect-Entra -Scopes 'GroupMember.ReadWrite.All' -$params = @{ - GroupId = 'dddddddd-2222-3333-5555-rrrrrrrrrrrr' - RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' -} - -Add-EntraGroupMember @params -``` - -This example demonstrates how to add a member to a group. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object that is assigned as an owner, manager, or member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroupMember](Get-EntraGroupMember.md) - -[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md deleted file mode 100644 index 2e74ae568b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.md +++ /dev/null @@ -1,108 +0,0 @@ ---- -title: Add-EntraGroupOwner -description: This article explains the Add-EntraGroupOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupOwner - -schema: 2.0.0 ---- - -# Add-EntraGroupOwner - -## Synopsis - -Adds an owner to a group. - -## Syntax - -```powershell -Add-EntraGroupOwner - -GroupId - -RefObjectId - [] -``` - -## Description - -The `Add-EntraGroupOwner` cmdlet adds an owner to a Microsoft Entra ID group. Specify the `GroupId` and `RefObjectId` parameters to add an owner to a group. - -`-GroupId` - specifies the unique identifier (Object ID) of the group to which you want to add an owner. - -`-RefObjectId` - specifies the unique identifier (Object ID) of the owner to be added to the group. - -## Examples - -### Example 1: Add an owner to a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$user = Get-EntraUser -UserId 'SawyerM@contoso.com' -$params = @{ - GroupId = $group.ObjectId - RefObjectId = $user.ObjectId -} - -Add-EntraGroupOwner @params -``` - -This example demonstrates how to add an owner to a group. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object that will be assigned as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroupOwner](Get-EntraGroupOwner.md) - -[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md deleted file mode 100644 index df79fef7d9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Add-EntraLifecyclePolicyGroup -description: This article provides details on the Add-EntraLifecyclePolicyGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup - -schema: 2.0.0 ---- - -# Add-EntraLifecyclePolicyGroup - -## Synopsis - -Adds a group to a lifecycle policy. - -## Syntax - -```powershell -Add-EntraLifecyclePolicyGroup - -GroupId - -GroupLifecyclePolicyId - [] -``` - -## Description - -The `Add-EntraLifecyclePolicyGroup` cmdlet adds a group to a lifecycle policy in Microsoft Entra ID. - -## Examples - -### Example 1: Add a group to the lifecycle policy - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" -$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 -$params = @{ - GroupLifecyclePolicyId = $policy.Id - groupId = $group.ObjectId -} -Add-EntraLifecyclePolicyGroup @params -``` - -This example adds a group to the lifecycle policy. - -- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy add to the group. -- `-GroupId` parameter specifies the ID of the group add to the Lifecycle Policy. - -## Parameters - -### -GroupId - -Specifies the ID of an Office365 group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifecyclePolicyId - -Specifies the ID of the lifecycle policy object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) - -[Remove-EntraLifecyclePolicyGroup](Remove-EntraLifecyclePolicyGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md deleted file mode 100644 index f85a857377..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.md +++ /dev/null @@ -1,293 +0,0 @@ ---- -title: Get-EntraDeletedGroup -description: This article provides details on the Get-EntraDeletedGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedGroup - -schema: 2.0.0 ---- - -# Get-EntraDeletedGroup - -## Synopsis - -This cmdlet is used to retrieve the soft deleted groups in a Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraDeletedGroup - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraDeletedGroup - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraDeletedGroup - -GroupId - [-All] - [-Property ] - [] -``` - -### GetVague - -```powershell -Get-EntraBetaDeletedGroup - [-All] - [-SearchString ] - [-Property ] - [] -``` - -## Description - -This cmdlet retrieves soft-deleted groups from a directory. When a group is deleted, it is soft deleted and can be recovered within 30 days. After 30 days, the group is permanently deleted and cannot be recovered. - -Please note that soft delete currently applies only to Unified Groups (also known as Office 365 Groups). - -## Examples - -### Example 1: Get deleted groups in the directory - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} -test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} -test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} -``` - -This cmdlet retrieves all recoverable deleted groups in the Microsoft Entra ID. - -### Example 2: Get deleted groups in the directory using All parameter - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -All -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} -test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} -test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} -``` - -This cmdlet retrieves all recoverable deleted groups in the directory, using All parameter. - -### Example 3: Get top two deleted groups - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -Top 2 -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} -``` - -This cmdlet retrieves top two deleted groups in the directory. - -### Example 4: Get deleted groups containing string 'test2' - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -SearchString 'test2' -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} -test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} -test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} -``` - -This cmdlet retrieves deleted groups in the directory, containing the specified string. - -### Example 5: Get deleted groups filter by display name - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -Filter "displayName eq 'test21'" -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -``` - -This cmdlet retrieves deleted groups in the directory, having the specified display name. - -### Example 6: Get deleted group by GroupId - -```powershell -Connect-Entra -Scopes 'Group.Read.All' -Get-EntraDeletedGroup -GroupId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} -``` - -This cmdlet retrieves the deleted group specified by GroupId. - -- `-GroupId` parameter specifies the deleted group GroupId. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GroupId - -The GroupId of the deleted group to be retrieved. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md deleted file mode 100644 index 62d509e6c3..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroup.md +++ /dev/null @@ -1,309 +0,0 @@ ---- -title: Get-EntraGroup -description: This article explains the Get-EntraGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroup - -schema: 2.0.0 ---- - -# Get-EntraGroup - -## Synopsis - -Gets a group. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraGroup - [-Top ] - [-All] - [-Filter ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraGroup - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraGroup - -GroupId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroup` cmdlet gets a group in Microsoft Entra ID. Specify the `ObjectId` parameter to get a specific group. - -## Examples - -### Example 1: Get all groups - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -``` - -```Output -DisplayName Id MailNickname Description ------------ -- ------------ ----------- -SimpleTestGrp aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NickName -SimpleGroup bbbbbbbb-1111-2222-3333-cccccccccccc NickName -testGroupInAU10 cccccccc-2222-3333-4444-dddddddddddd testGroupInAU10 testGroupInAU10 -My new group dddddddd-3333-4444-5555-eeeeeeeeeeee NotSet New created group -SimpleGroup eeeeeeee-4444-5555-6666-ffffffffffff NickName -``` - -This example demonstrates how to get all groups from Microsoft Entra ID. - -### Example 2: Get a specific group by using an GroupId - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -GroupId 'pppppppp-4444-0000-8888-yyyyyyyyyyyy' -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneaglegroup Crimson Eagle Group {Unified} -``` - -This example demonstrates how to retrieve specific group by providing ID. - -### Example 3: Get top five groups - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -Top 5 -``` - -```Output -DisplayName Id MailNickname Description ------------ -- ------------ ----------- -Contoso Group hhhhhhhh-3333-5555-3333-qqqqqqqqqqqq contosogroup Contoso Group -Crimson Eagle pppppppp-4444-0000-8888-yyyyyyyyyyyy crimsoneagle Crimson Eagle Group -Bold Falcon tttttttt-0000-3333-9999-mmmmmmmmmmmm boldfalcon Bold Falcon Group -Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda -Misty Fox kkkkkkkk-3333-5555-1111-nnnnnnnnnnnn mistyfox Misty Fox Group -``` - -This example demonstrates how to get top five groups. - -### Example 4: Get a group by DisplayName - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -Filter "DisplayName eq 'Azure Panda'" -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -Azure Panda qqqqqqqq-5555-0000-1111-hhhhhhhhhhhh azurepanda Azure Panda {Unified} -``` - -In this example, we retrieve group using the Display Name. - -### Example 5: Get groups that contain a search string - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroup -SearchString 'New' -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -New Sparkling Deer bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq newsparklingdeer New Sparkling Deer Group {Unified} -New Golden Fox xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb newgoldenfox New Golden Fox {DynamicMembership} -``` - -This example demonstrates how to retrieve groups that include the text new in their display names from Microsoft Entra ID. - -### Example 6: Listing ownerless groups - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -$allGroups = Get-EntraGroup -All -$groupsWithoutOwners = foreach ($group in $allGroups) { - $owners = Get-EntraGroupOwner -ObjectId $group.Id - if ($owners.Count -eq 0) { - $group - } -} -$groupsWithoutOwners | Format-Table DisplayName, Id, GroupTypes -``` - -```Output -DisplayName Id GroupTypes ------------ -- ---------- -My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} -HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} -``` - -This example demonstrates how to retrieve groups without owners. By identifying ownerless groups, IT admins can improve overall governance and operational efficiency. - -### Example 7: Listing empty groups - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -$allGroups = Get-EntraGroup -All -$groupsWithoutMembers = foreach ($group in $allGroups) { - $members = Get-EntraGroupMember -ObjectId $group.Id - if ($members.Count -eq 0) { - $group - } -} -$groupsWithoutMembers | Format-Table DisplayName, Id, GroupTypes -``` - -```Output -DisplayName Id GroupTypes ------------ -- ---------- -My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} -HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} -``` - -This example demonstrates how to retrieve groups without members. By identifying memberless groups, IT admins can identify and clean up unused or obsolete groups that no longer serve a purpose. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GroupId - -The unique identifier of a group in Microsoft Entra ID (GroupId) - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetValue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraGroup](New-EntraGroup.md) - -[Remove-EntraGroup](Remove-EntraGroup.md) - -[Set-EntraGroup](Set-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md deleted file mode 100644 index 724b696cec..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: Get-EntraGroupAppRoleAssignment -description: This article provides details on the Get-EntraGroupAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment - -schema: 2.0.0 ---- - -# Get-EntraGroupAppRoleAssignment - -## Synopsis - -Gets a group application role assignment. - -## Syntax - -```powershell -Get-EntraGroupAppRoleAssignment - -GroupId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroupAppRoleAssignment` cmdlet gets a group application role assignment in Microsoft Entra ID. Specify the `GroupId` parameter to get a group application role assignment. - -## Examples - -### Example 1: Retrieve application role assignments of a group - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$GroupId = (Get-EntraGroup -Top 1).ObjectId -Get-EntraGroupAppRoleAssignment -GroupId $GroupId -``` - -```Output -ObjectId ResourceDisplayName PrincipalDisplayName --------- ------------------- -------------------- -MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR -MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR -MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR -``` - -This example retrieves the application role assignments of a group. - -- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. - -### Example 2: Retrieve all application role assignments of a group - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -All -``` - -```Output -ObjectId ResourceDisplayName PrincipalDisplayName --------- ------------------- -------------------- -MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR -MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR -MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR -``` - -This example retrieves all application role assignments of the specified group. - -- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. - -### Example 3: Retrieve top two application role assignments of a group - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraGroupAppRoleAssignment -GroupId 'ffffffffff-7777-9999-7777-vvvvvvvvvvv' -Top 2 -``` - -```Output -ObjectId ResourceDisplayName PrincipalDisplayName --------- ------------------- -------------------- -MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR -MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR -``` - -This example retrieves top two application role assignments of the specified group. - -- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) - -[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) - -[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md deleted file mode 100644 index 9df4ac2bb7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Get-EntraGroupLifecyclePolicy -description: This article provides details on the Get-EntraGroupLifecyclePolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy - -schema: 2.0.0 ---- - -# Get-EntraGroupLifecyclePolicy - -## Synopsis - -Retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. -If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraGroupLifecyclePolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraGroupLifecyclePolicy - -GroupLifecyclePolicyId - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroupLifecyclePolicy` command retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. Specify the `-GroupLifecyclePolicyId` parameter to get the group lifecycle policy. -If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. - -## Examples - -### Example 1: Retrieve all groupLifecyclePolicies - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraGroupLifecyclePolicy -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -eeeeeeee-4444-5555-6666-ffffffffffff example@contoso.com 200 Selected -``` - -This example demonstrates how to retrieve the properties and relationships of all groupLifecyclePolicies in Microsoft Entra ID. - -### Example 2: Retrieve properties of an groupLifecyclePolicy - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 Selected -``` - -This command is used to retrieve a specific Microsoft Group Lifecycle Policy. - -- `-GroupLifecyclePolicyId` parameter specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. - -## Parameters - -### -GroupLifecyclePolicyId - -Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md deleted file mode 100644 index bdd0673a08..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: Get-EntraGroupMember -description: This article provides details on the Get-EntraGroupMember command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupMember - -schema: 2.0.0 ---- - -# Get-EntraGroupMember - -## Synopsis - -Gets a member of a group. - -## Syntax - -```powershell -Get-EntraGroupMember - -GroupId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroupMember` cmdlet gets a member of a group in Microsoft Entra ID. Specify the `GroupId` parameter to get a member of a group. - -In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: `microsoft.directory/groups/members/read`, `microsoft.directory/groups/members/limitedRead`, or `microsoft.directory/groups/hiddenMembers/read` (for hidden members). The following least privileged roles support this operation: - -- Group owners -- "Member" users -- "Guest" users (with limited read permissions) -- Directory Readers -- Directory Writers -- Groups Administrator -- User Administrator (includes hidden members) -- Exchange Administrator (includes hidden members) -- SharePoint Administrator (includes hidden members) -- Intune Administrator (includes hidden members) -- Teams Administrator (includes hidden members) -- Yammer Administrator (includes hidden members) - -To list members of a hidden group, the `Member.Read.Hidden` permission is also required. - -## Examples - -### Example 1: Get a group member by ID - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupMember -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-7777-8888-9999-cccccccccccc -``` - -This example demonstrates how to retrieve group member by ID. - -- `-GroupId` Specifies the ID of a group. - -### Example 2: Get two group member - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupMember -GroupId 'hhhhhhhh-8888-9999-8888-cccccccccccc' -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -``` - -This example demonstrates how to retrieve top two groups from Microsoft Entra ID. - -- `-GroupId` specifies the ID of a group. - -### Example 3: Get all members within a group by group ID - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' -All -``` - -```Output -Id DeletedDateTime --- --------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb -bbbbbbbb-7777-8888-9999-cccccccccccc -cccccccc-8888-9999-0000-dddddddddddd -``` - -This example retrieves all members within a group by group ID. - -- `-GroupId` specifies the ID of a group. - -### Example 4: Retrieve and Select Group Member Properties - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' | Select-Object DisplayName, '@odata.type' -``` - -```Output -displayName @odata.type ------------ ----------- -test1 #microsoft.graph.user -test2 #microsoft.graph.user -test2 #microsoft.graph.servicePrincipal -test3 #microsoft.graph.servicePrincipal -``` - -This example retrieves the members of a specified group by its `GroupId` and selects only the `DisplayName` and `@odata.type` properties for each member. - -- `-GroupId` specifies the ID of a group. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraGroupMember](Add-EntraGroupMember.md) - -[Remove-EntraGroupMember](Remove-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md deleted file mode 100644 index 340e3463a9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.md +++ /dev/null @@ -1,189 +0,0 @@ ---- -title: Get-EntraGroupOwner -description: This article provides details on the Get-EntraGroupOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupOwner - -schema: 2.0.0 ---- - -# Get-EntraGroupOwner - -## Synopsis - -Gets an owner of a group. - -## Syntax - -```powershell -Get-EntraGroupOwner - -GroupId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraGroupOwner` cmdlet gets an owner of a group in Microsoft Entra ID. Specify `GroupId` parameter gets an owner of a group. - -In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with the `microsoft.directory/groups/owners/read` permission. The following least privileged roles support this operation: - -- Group owners -- Directory Readers -- Directory Writers -- Groups Administrator -- User Administrator - -## Examples - -### Example 1: Get a group owner by ID - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupOwner -GroupId 'vvvvvvvv-7777-9999-7777-jjjjjjjjjjjj' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example demonstrates how to retrieve the owner of a specific group. - -- `-GroupId` Parameter specifies the ID of a group. - -### Example 2: Gets all group owners - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupOwner -GroupId 'zzzzzzzz-6666-8888-9999-pppppppppppp' -All -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example demonstrates how to retrieve the all owner of a specific group. - -- `-GroupId` Parameter specifies the ID of a group. - -### Example 3: Gets two group owners - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupOwner -GroupId 'vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj' -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example demonstrates how to retrieve the top two owners of a specific group. - -- `-GroupId` parameter specifies the ID of a group. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraGroupOwner](Add-EntraGroupOwner.md) - -[Remove-EntraGroupOwner](Remove-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md deleted file mode 100644 index 51986bf57f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Get-EntraGroupPermissionGrant -description: This article provides details on the Get-EntraGroupPermissionGrant command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant - -schema: 2.0.0 ---- - -# Get-EntraGroupPermissionGrant - -## Synopsis - -Retrieves a list of permission grants consented to for a group. - -## Syntax - -```powershell -Get-EntraGroupPermissionGrant - -GroupId - [-Property ] - [] -``` - -## Description - -Retrieves a list of permission grants consented to for a group. - -## Examples - -### Example 1: List existing permission grants for the group - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -Get-EntraGroupPermissionGrant -GroupId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' -``` - -```Output - Id : CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3 - ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 - ClientAppId : 44445555-eeee-6666-ffff-7777aaaa8888 - ResourceAppId : bbbb1111-cc22-3333-44dd-555555eeeeee - PermissionType : Application - Permission : Member.Read.Group -``` - -This cmdlet list existing permission grants for the specified group. - -## Parameters - -### -GroupId - -The unique identifier of group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -### Microsoft.Open.MSGraph.Model.GetMSGroupPermissionGrantsResponse - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md deleted file mode 100644 index 1555496573..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Get-EntraLifecyclePolicyGroup -description: This article provides details on the Get-EntraLifecyclePolicyGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup - -schema: 2.0.0 ---- - -# Get-EntraLifecyclePolicyGroup - -## Synopsis - -Retrieves the lifecycle policy object to which a group belongs. - -## Syntax - -```powershell -Get-EntraLifecyclePolicyGroup - -GroupId - [-Property ] - [] -``` - -## Description - -The `Get-EntraLifecyclePolicyGroup` retrieves the lifecycle policy object to which a group belongs. Specify the `-GroupId` parameter to get the lifecycle policy object to which a group belongs. - -## Examples - -### Example 1: Retrieve lifecycle policy object - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraLifecyclePolicyGroup -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -bbbbbbbb-1111-2222-3333-cccccccccccc admingroup@contoso.com 200 All -``` - -This example demonstrates how to retrieve lifecycle policy object by Id in Microsoft Entra ID. - -- `-GroupId` - specifies the ID of a group. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md deleted file mode 100644 index 3973de997e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.md +++ /dev/null @@ -1,252 +0,0 @@ ---- -title: Get-EntraObjectSetting -description: This article provides details on the Get-EntraObjectSetting command. - - -ms.topic: reference -ms.date: 07/03/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectSetting -schema: 2.0.0 ---- - -# Get-EntraObjectSetting - -## Synopsis - -Gets an object setting. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraObjectSetting - [-Top ] - [-All] - -TargetType - -TargetObjectId - [] -``` - -### GetById - -```powershell -Get-EntraObjectSetting - -Id [-All] - -TargetType - -TargetObjectId - [] -``` - -## Description - -The `Get-EntraObjectSetting` cmdlet retrieves an object setting from Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve object setting from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$params = @{ - TargetType = 'Groups' - TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' -} -Get-EntraObjectSetting @params -``` - -```Output -Id DisplayName TemplateId --- ----------- ---------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This command retrieves object setting from Microsoft Entra ID. - -- `-TargetType` Parameter specifies the target type. -- `-TargetObjectId` Parameter specifies the ID of the target object. - -### Example 2: Retrieve a specific object setting from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$params = @{ - TargetType = 'Groups' - TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' - Id ='aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -} -Get-EntraObjectSetting @params -``` - -```Output -Id DisplayName TemplateId --- ----------- ---------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This command retrieves Specific object setting from Microsoft Entra ID. - -- `-TargetType` Parameter specifies the target type. -- `-TargetObjectId` Parameter specifies the ID of the target object. -- `-Id` Parameter specifies the ID of a settings object. - -### Example 3: Retrieve top one object setting from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$params = @{ - TargetType = 'Groups' - TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' -} -Get-EntraObjectSetting @params -Top 1 -``` - -```Output -Id DisplayName TemplateId --- ----------- ---------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This command retrieves top one object setting from Microsoft Entra ID. - -- `-TargetType` Parameter specifies the target type. -- `-TargetObjectId` Parameter specifies the ID of the target object. - -### Example 4: Retrieve all object setting from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$params = @{ - TargetType = 'Groups' - TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' -} -Get-EntraObjectSetting @params -All -``` - -```Output -Id DisplayName TemplateId --- ----------- ---------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This command retrieves all records of object setting from Microsoft Entra ID. - -- `-TargetType` Parameter specifies the target type. -- `-TargetObjectId` Parameter specifies the ID of the target object. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the ID of a settings object. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -TargetObjectId - -Specifies the ID of the target object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -TargetType - -Specifies the target type. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md deleted file mode 100644 index 22a87355e6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroup.md +++ /dev/null @@ -1,346 +0,0 @@ ---- -title: New-EntraGroup -description: This article provides details on the New-EntraGroup command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroup - -schema: 2.0.0 ---- - -# New-EntraGroup - -## Synopsis - -Creates a Microsoft Entra ID group. - -## Syntax - -```powershell -New-EntraGroup - -DisplayName - [-GroupTypes ] - -SecurityEnabled - [-Description ] - -MailEnabled - -MailNickname - [-Visibility ] - [-IsAssignableToRole ] - [] -``` - -## Description - -The `New-EntraGroup` cmdlet creates a Microsoft Entra ID group. Specify the `DisplayName`, `MailNickname`, `MailEnabled` and `SecurityEnabled` parameters for creating a Microsoft Entra ID group. - -For information about creating dynamic groups, see: [Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership). - -**Notes on permissions:** - -- To create the group with users as owners or members, the app must have at least the `User.Read.All` permission. -- To create the group with other service principals as owners or members, the app must have at least the `Application.Read.All` permission. -- To create the group with either users or service principals as owners or members, the app must have at least the `Directory.Read.All` permission. - -## Examples - -### Example 1: Create a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group2' - MailEnabled = $False - MailNickname = 'helpDeskAdminGroup' - SecurityEnabled = $True -} - -New-EntraGroup @params -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group2 bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq helpDeskAdminGroup {} -``` - -This example demonstrates how to create the new group. - -### Example 2: Create a group with Description parameter - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group' - MailEnabled = $false - MailNickname = 'helpDeskAdminGroup' - SecurityEnabled = $true - Description = 'Group assignable to role' -} - -New-EntraGroup @params -``` - -```Output - -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group zzzzzzzz-6666-8888-9999-pppppppppppp helpDeskAdminGroup Group assignable to role {} - -``` - -This example demonstrates how to create the new group with description parameter. - -### Example 3: Create a group with IsAssignableToRole parameter - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group2' - Description = 'Group assignable to role' - MailEnabled = $False - MailNickname = 'helpDeskAdminGroup' - SecurityEnabled = $True - IsAssignableToRole = $True -} - -New-EntraGroup @params -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group2 vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj helpDeskAdminGroup Group assignable to role {} -``` - -This example demonstrates how to create the new group with IsAssignableToRole parameter. - -### Example 4: Create a group with Visibility parameter - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group2' - Description = 'Group assignable to role' - MailEnabled = $False - MailNickname = 'helpDeskAdminGroup' - SecurityEnabled = $True - Visibility = 'Private' -} - -New-EntraGroup @params -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group2 gggggggg-0000-4444-3333-llllllllllll helpDeskAdminGroup Group assignable to role {} -``` - -This example demonstrates how to create the new group with Visibility parameter. - -### Example 5: Create a group with GroupTypes parameter - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' -$params = @{ - DisplayName = 'HelpDesk admin group3' - Description = 'group des' - MailEnabled = $False - MailNickname = 'helpDeskAdminGroup1' - SecurityEnabled = $True - GroupTypes = 'Unified' -} - -New-EntraGroup @params -``` - -```Output -DisplayName Id MailNickname Description GroupTypes ------------ -- ------------ ----------- ---------- -HelpDesk admin group3 xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb helpDeskAdminGroup1 group des {Unified} -``` - -This example demonstrates how to create the new group with GroupTypes parameter. - -## Parameters - -### -Description - -Specifies a description for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailEnabled - -Specifies whether this group is mail enabled. - -Currently, you can't create mail enabled groups in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailNickname - -Specifies a mail nickname for the group. -If MailEnabled is $False, you must still specify a mail nickname. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityEnabled - -Specifies whether the group is security enabled. -For security groups, this value must be $True. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupTypes - -Specifies that the group is a unified or dynamic group. - -Notes: - -- This parameter currently can't be used to create dynamic groups. To create a dynamic group in PowerShell, you must use the Entra module. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Visibility - -This parameter determines the visibility of the group's content and members list. - -This parameter can take one of the following values: - -- "Public" - Anyone can view the contents of the group -- "Private" - Only members can view the content of the group -- "HiddenMembership" - Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator and Helpdesk Administrators can view the members list of the group. - -If no value is provided, the default value is "Public". - -Notes: - -- This parameter is only valid for groups that have the groupType set to "Unified". -- If a group has this attribute set to "HiddenMembership", it can't be changed later. -- Anyone can join a group that has this attribute set to "Public". If the attribute is set to Private or HiddenMembership, only owners can add new members to the group and requests to join the group need approval of the owners. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsAssignableToRole - -Indicates whether group can be assigned to a role. This property can only be set at the time of group creation and can't be modified on an existing group. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) - -[Remove-EntraGroup](Remove-EntraGroup.md) - -[Set-EntraGroup](Set-EntraGroup.md) - -[Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md deleted file mode 100644 index d70bac714b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.md +++ /dev/null @@ -1,151 +0,0 @@ ---- -title: New-EntraGroupAppRoleAssignment -description: This article provides details on the New-EntraGroupAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment - -schema: 2.0.0 ---- - -# New-EntraGroupAppRoleAssignment - -## Synopsis - -Assign a group of users to an application role. - -## Syntax - -```powershell -New-EntraGroupAppRoleAssignment - -GroupId - -PrincipalId - -AppRoleId - -ResourceId - [] -``` - -## Description - -The `New-EntraGroupAppRoleAssignment` cmdlet assigns a group of users to an application role in Microsoft Entra ID. - -## Examples - -### Example 1: Assign a group of users to an application - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$appname = 'Box' -$spo = Get-EntraServicePrincipal -Filter "Displayname eq '$appname'" -$group = Get-EntraGroup -SearchString 'Contoso Team' -New-EntraGroupAppRoleAssignment -GroupId $group.ObjectId -PrincipalId $group.ObjectId -ResourceId $spo.ObjectId -AppRoleId $spo.Approles[1].id -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId ---------------- -- --------- --------------- -------------------- ----------- - AaBbCcDdEeFfGgHhIiJjKkLlMmNnOo1 00000000-0000-0000-0000-000000000000 3/13/2024 4:41:43 AM Contoso Team aaaaaaaa-bbbb-cccc-1111-222222222222 -3/13/2024 4:45:00 AM BbCcDdEeFfGgHhIiJjKkLlMmNnOoPp2 00000000-0000-0000-0000-000000000000 3/13/2024 4:45:00 AM Finance Group bbbbbbbb-cccc-dddd-2222-333333333333 -``` - -This example demonstrates how to assign a group of users to an application role in Microsoft Entra ID. - -- `GroupId`: The ID of the group to which you're assigning the app role. - -- `PrincipalId`: The ID of the group to which you're assigning the app role. - -- `ResourceId`: The ID of the resource service Principal, which has defined the app role. - -- `AppRoleId`: The ID of the appRole (defined on the resource service principal) to assign to the group. - -## Parameters - -### -AppRoleId - -Specifies the ID of the app role (defined on the resource service principal) to assign. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PrincipalId - -Specifies the principal ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId - -The unique identifier (ID) for the resource service principal for which the assignment is made. -Required on create. Supports $filter (eq only). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) - -[Remove-EntraGroupAppRoleAssignment](Remove-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md deleted file mode 100644 index 78e3bb4b9f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: New-EntraGroupLifecyclePolicy -description: This article provides details on the New-EntraGroupLifecyclePolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy - -schema: 2.0.0 ---- - -# New-EntraGroupLifecyclePolicy - -## Synopsis - -Creates a new groupLifecyclePolicy. - -## Syntax - -```powershell -New-EntraGroupLifecyclePolicy - -ManagedGroupTypes - -GroupLifetimeInDays - -AlternateNotificationEmails - [] -``` - -## Description - -Creates a new groupLifecyclePolicy in Microsoft Entra ID. - -## Examples - -### Example 1: Creates a new groupLifecyclePolicy - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$Params = @{ - GroupLifetimeInDays = 99 - ManagedGroupTypes = 'Selected' - AlternateNotificationEmails = 'example@contoso.com' -} -New-EntraGroupLifecyclePolicy @params -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb example@contoso.com 99 Selected -``` - -This example creates a new groupLifecyclePolicy with a group lifetime of 99 days for a selected set of Office 365 groups. Renewal notification emails are sent to for groups without owners. - -- `-GroupLifetimeInDays` parameter specifies the number of days a group can exist before it needs to be renewed. -- `-ManagedGroupTypes` parameter allows the admin to select which office 365 groups the policy applies to. -- `-AlternateNotificationEmails` parameter specifies notification emails for group. - -## Parameters - -### -AlternateNotificationEmails - -Notification emails for groups without owners are sent to these email addresses, separated by a ';'. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifetimeInDays - -The number of days a group can exist before it needs to be renewed. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ManagedGroupTypes - -This parameter allows the admin to select which Office 365 groups the policy applies to. -'None' creates the policy in a disabled state. -'All' applies the policy to every Office 365 group in the tenant. -'Selected' allows the admin to choose specific Office 365 groups to which the policy applies. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) - -[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) - -[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md deleted file mode 100644 index ae746e39ed..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -title: Remove-EntraGroup -description: This article provides details on the Remove-EntraGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroup - -schema: 2.0.0 ---- - -# Remove-EntraGroup - -## Synopsis - -Removes a group. - -## Syntax - -```powershell -Remove-EntraGroup - -GroupId - [] -``` - -## Description - -The `Remove-EntraGroup` cmdlet removes a group from Microsoft Entra ID. Specify the `GroupId` parameter removes a group. - -Unified Group can be restored withing 30 days after deletion using the `Restore-EntraBetaDeletedDirectoryObject` cmdlet. Security groups can't be restored after deletion. - -**Notes on permissions:** - -The following conditions apply for apps to delete role-assignable groups: - -- For delegated scenarios, the app must be assigned the `RoleManagement.ReadWrite.Directory` delegated permission, and the calling user must be the creator of the group or be assigned at least the Privileged Role Administrator Microsoft Entra role. -- For app-only scenarios, the calling app must be the owner of the group or be assigned the `RoleManagement.ReadWrite.Directory` application permission or be assigned at least the Privileged Role Administrator Microsoft Entra role. - -## Examples - -### Example 1: Remove a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -Remove-EntraGroup -GroupId $group.Id -``` - -This example demonstrates how to remove a group in Microsoft Entra ID. - -- `GroupId` parameter specifies the group ID . - -## Parameters - -### -GroupId - -Specifies the object ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) - -[New-EntraGroup](New-EntraGroup.md) - -[Set-EntraGroup](Set-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md deleted file mode 100644 index c5306735b7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Remove-EntraGroupAppRoleAssignment -description: This article provides details on the Remove-EntraGroupAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment - -schema: 2.0.0 ---- - -# Remove-EntraGroupAppRoleAssignment - -## Synopsis - -Delete a group application role assignment. - -## Syntax - -```powershell -Remove-EntraGroupAppRoleAssignment - -AppRoleAssignmentId - -GroupId -[] -``` - -## Description - -The `Remove-EntraGroupAppRoleAssignment` cmdlet removes a group application role assignment from Microsoft Entra ID. - -## Examples - -### Example 1: Remove group app role assignment - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -Remove-EntraGroupAppRoleAssignment -GroupId $group.Id -AppRoleAssignmentId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' -``` - -This example demonstrates how to remove the specified group application role assignment. -GroupId - Specifies the object ID of a group. -AppRoleAssignmentId - Specifies the object ID of the group application role assignment. - -## Parameters - -### -AppRoleAssignmentId - -Specifies the object ID of the group application role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the object ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroupAppRoleAssignment](Get-EntraGroupAppRoleAssignment.md) - -[New-EntraGroupAppRoleAssignment](New-EntraGroupAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md deleted file mode 100644 index d60bc7953d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Remove-EntraGroupLifecyclePolicy -description: This article provides details on the Remove-EntraGroupLifecyclePolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy - -schema: 2.0.0 ---- - -# Remove-EntraGroupLifecyclePolicy - -## Synopsis - -Deletes a groupLifecyclePolicies object - -## Syntax - -```powershell -Remove-EntraGroupLifecyclePolicy - -GroupLifecyclePolicyId - [] -``` - -## Description - -The `Remove-EntraGroupLifecyclePolicy` command deletes a groupLifecyclePolicies object in Microsoft Entra ID. Specify `Id` parameter deletes the groupLifecyclePolicies object. - -## Examples - -### Example 1: Remove a groupLifecyclePolicies - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' -``` - -This example demonstrates how to delete the groupLifecyclePolicies object that has the specified ID. You can use `Get-EntraGroupLifecyclePolicy` to get Id details. - -## Parameters - -### -GroupLifecyclePolicyId - -Specifies the ID of the groupLifecyclePolicies object that this cmdlet removes. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related links - -[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) - -[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) - -[Set-EntraGroupLifecyclePolicy](Set-EntraGroupLifecyclePolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md deleted file mode 100644 index ca01328299..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Remove-EntraGroupMember -description: This article provides details on the Remove-EntraGroupMember command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupMember - -schema: 2.0.0 ---- - -# Remove-EntraGroupMember - -## Synopsis - -Removes a member from a group. - -## Syntax - -```powershell -Remove-EntraGroupMember - -GroupId - -MemberId - [] -``` - -## Description - -The `Remove-EntraGroupMember` cmdlet removes a member from a group in Microsoft Entra ID. Specify the `ObjectId` and `MemberId` parameters to remove a member from a group. - -## Examples - -### Example 1: Remove a member - -```powershell -Connect-Entra -Scopes 'GroupMember.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -Remove-EntraGroupMember -GroupId $group.Id -MemberId 'zzzzzzzz-6666-8888-9999-pppppppppppp' -``` - -This command removes the specified member from the specified group. - -GroupId - Specifies the object ID of a group in Microsoft Entra ID. - -MemberId - Specifies the ID of the member to remove. - -## Parameters - -### -MemberId - -Specifies the ID of the member to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the object ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Add-EntraGroupMember](Add-EntraGroupMember.md) - -[Get-EntraGroupMember](Get-EntraGroupMember.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md deleted file mode 100644 index 759c736651..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Remove-EntraGroupOwner -description: This article provides details on the Remove-EntraGroupOwner command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupOwner - -schema: 2.0.0 ---- - -# Remove-EntraGroupOwner - -## Synopsis - -Removes an owner from a group. - -## Syntax - -```powershell -Remove-EntraGroupOwner - -OwnerId - -GroupId - [] -``` - -## Description - -The `Remove-EntraGroupOwner` cmdlet removes an owner from a group in Microsoft Entra ID. Specify the `GroupId` and `OwnerId` parameters to remove an owner from a group. - -## Examples - -### Example 1: Remove an owner - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -Remove-EntraGroupOwner -GroupId $group.Id -OwnerId 'xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb' -``` - -This example demonstrates how to remove an owner from a group in Microsoft Entra ID. - -GroupId - Specifies the ID of a group in Microsoft Entra ID. - -- `OwnerId` specifies the ID of an owner. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OwnerId - -Specifies the ID of an owner. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related links - -[Add-EntraGroupOwner](Add-EntraGroupOwner.md) - -[Get-EntraGroupOwner](Get-EntraGroupOwner.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md deleted file mode 100644 index 888872cd48..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: Remove-EntraLifecyclePolicyGroup -description: This article provides details on the Remove-EntraLifecyclePolicyGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup - -schema: 2.0.0 ---- - -# Remove-EntraLifecyclePolicyGroup - -## Synopsis - -Removes a group from a lifecycle policy. - -## Syntax - -```powershell -Remove-EntraLifecyclePolicyGroup - -GroupId - -GroupLifecyclePolicyId - [] -``` - -## Description - -The `Remove-EntraLifecyclePolicyGroup` cmdlet removes a group from a lifecycle policy in Microsoft Entra ID. - -## Examples - -### Example 1: Remove lifecycle policy group - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'Office365 group'" -$policy = Get-EntraLifecyclePolicyGroup -Id $group.ObjectId -$params = @{ - GroupLifecyclePolicyId = $policy.Id - GroupId = $group.ObjectId -} -Remove-EntraLifecyclePolicyGroup @params -``` - -```Output -Value ------ -True -``` - -This example demonstrates how to remove a group from a lifecycle policy in Microsoft Entra ID with specified Id and groupId. - -- `-GroupLifecyclePolicyId` parameter specifies the lifecycle policy object ID. -- `-GroupId` parameter specifies the ID of Office365 group. - -## Parameters - -### -GroupId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifecyclePolicyId - -Specifies the ID of the lifecycle policy object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraLifecyclePolicyGroup](Get-EntraLifecyclePolicyGroup.md) - -[Add-EntraLifecyclePolicyGroup](Add-EntraLifecyclePolicyGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md deleted file mode 100644 index b8aeaa6a36..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Reset-EntraLifeCycleGroup -description: This article provides details on the Reset-EntraLifeCycleGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup - -schema: 2.0.0 ---- - -# Reset-EntraLifeCycleGroup - -## Synopsis - -Renews a group by updating the RenewedDateTime property on a group to the current DateTime. - -## Syntax - -```powershell -Reset-EntraLifeCycleGroup - -Id - [] -``` - -## Description - -The `Reset-EntraLifeCycleGroup` renews a group by updating the RenewedDateTime property on a group to the current DateTime. -When a group is renewed, the group expiration is extended by the number of days defined in the policy. - -## Examples - -### Example 1: Renew a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -Reset-EntraLifeCycleGroup -Id 'hhhhhhhh-8888-9999-8888-cccccccccccc' -``` - -This example demonstrates how to renew a specified group. - -- `-Id` - Specifies the lifecycle policy object ID. - -## Parameters - -### -Id - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md deleted file mode 100644 index 80f5ee8ca8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Select-EntraGroupIdsContactIsMemberOf -description: This article provides details on the Select-EntraGroupIdsContactIsMemberOf command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf - -schema: 2.0.0 ---- - -# Select-EntraGroupIdsContactIsMemberOf - -## Synopsis - -Get groups in which a contact is a member. - -## Syntax - -```powershell -Select-EntraGroupIdsContactIsMemberOf - -ObjectId - -GroupIdsForMembershipCheck - [] -``` - -## Description - -The `Select-EntraGroupIdsContactIsMemberOf` cmdlet gets groups in Microsoft Entra ID in which a contact is a member. - -## Examples - -### Example 1: Get groups in which a contact is a member - -```powershell -Connect-Entra -Scopes 'OrgContact.Read.All,Group.Read.All' -$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck -$Groups.GroupIds = (Get-EntraGroup -Filter "DisplayName eq 'Entra PowerShell Group'").ObjectId -$UserID = (Get-EntraContact -ObjectId 'hhhhhhhh-8888-9999-8888-cccccccccccc').ObjectId -Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups -``` - -This example demonstrates how to get groups in which a contact is a member. - -- `-ObjectId` parameter specifies the contact Object ID. -- `-GroupIdsForMembershipCheck` parameter specifies the group Object ID. - -## Parameters - -### -GroupIdsForMembershipCheck - -Specifies an array of group object IDs. - -```yaml -Type: GroupIdsForMembershipCheck -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the object ID of a contact in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md deleted file mode 100644 index f0eabc7873..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Select-EntraGroupIdsGroupIsMemberOf -description: This article provides details on the Select-EntraGroupIdsGroupIsMemberOf command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf - -schema: 2.0.0 ---- - -# Select-EntraGroupIdsGroupIsMemberOf - -## Synopsis - -Gets group IDs that a group is a member of. - -## Syntax - -```powershell -Select-EntraGroupIdsGroupIsMemberOf - -ObjectId - -GroupIdsForMembershipCheck - [] -``` - -## Description - -The `Select-EntraGroupIdsGroupIsMemberOf` cmdlet gets the groups that a specified group is a member of in Microsoft Entra ID. - -## Examples - -### Example 1: Get the group membership of a group for a group - -```powershell -Connect-Entra -Scopes 'GroupMember.Read.All' -$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck -$Groups.GroupIds = (Get-EntraGroup -Top 1).ObjectId -$GroupId = (Get-EntraGroup -Top 1).ObjectId -Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupId -GroupIdsForMembershipCheck $Groups -``` - -This example gets the group membership of a group identified by $GroupId. Use `Get-EntraGroup` cmdlet to obtain group `ObjectId` value. - -- `-ObjectId` parameter specifies the group ID. -- `-GroupIdsForMembershipCheck` Specifies an array of group object IDs. - -## Parameters - -### -GroupIdsForMembershipCheck - -Specifies an array of group object IDs. - -```yaml -Type: GroupIdsForMembershipCheck -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a group in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md deleted file mode 100644 index d5cb471ca8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Select-EntraGroupIdsUserIsMemberOf -description: This article provides details on the Select-EntraGroupIdsUserIsMemberOf command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf - -schema: 2.0.0 ---- - -# Select-EntraGroupIdsUserIsMemberOf - -## Synopsis - -Selects the groups that a user is a member of. - -## Syntax - -```powershell -Select-EntraGroupIdsUserIsMemberOf - -ObjectId - -GroupIdsForMembershipCheck - [] -``` - -## Description - -The `Select-EntraGroupIdsUserIsMemberOf` cmdlet selects the groups that a user is a member of in Microsoft Entra ID. - -## Examples - -### Example 1: Get the group membership of a group for a user - -```powershell -Connect-Entra -Scopes 'Application.Read.All' -$myGroup = Get-EntraGroup -Filter "DisplayName eq ''" -$UserId = 'SawyerM@contoso.com' -$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck -$Groups.GroupIds = $myGroup.ObjectId -$Params = @{ - ObjectId = $UserId - GroupIdsForMembershipCheck = $Groups -} -Select-EntraGroupIdsUserIsMemberOf @Params -``` - -```Output -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example retrieves the group membership of a group for a user. - -- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). -- `-GroupIdsForMembershipCheck` parameter specifies the group Object Ids. - -## Parameters - -### -GroupIdsForMembershipCheck - -Specifies an array of group object IDs. - -```yaml -Type: GroupIdsForMembershipCheck -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraGroup](Get-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md deleted file mode 100644 index 1886cefa89..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroup.md +++ /dev/null @@ -1,313 +0,0 @@ ---- -title: Set-EntraGroup -description: This article provides details on the Set-EntraGroup command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroup - -schema: 2.0.0 ---- - -# Set-EntraGroup - -## Synopsis - -Sets the properties for an existing Microsoft Entra ID group. - -## Syntax - -```powershell -Set-EntraGroup - -GroupId - [-DisplayName ] - [-GroupTypes ] - [-SecurityEnabled ] - [-Description ] - [-MailEnabled ] - [-MailNickname ] - [-Visibility ] - [-IsAssignableToRole ] - [] -``` - -## Description - -The `Set-EntraGroup` cmdlet sets the properties for an existing Microsoft Entra ID group. Specify the `GroupId` parameter to set the properties for an existing Microsoft Entra ID group. - -## Examples - -### Example 1: Update a group display name - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - DisplayName = 'UPDATE HelpDesk Team Leaders' -} -Set-EntraGroup @params -``` - -This command updates the display name of a specified group in Microsoft Entra ID. - -### Example 2: Update a group description - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - Description = 'This is my new group' -} -Set-EntraGroup @params -``` - -This example demonstrates how to update a group description. - -### Example 3: Update a group mail nickname - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - MailNickName = 'newnickname' -} -Set-EntraGroup @params -``` - -This command updates the mail nickname of a specified group in Microsoft Entra ID. - -### Example 4: Update a group security enabled - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - SecurityEnabled = $true -} -Set-EntraGroup @params -``` - -This command updates the security enabled of a specified group in Microsoft Entra ID. - -### Example 5: Update a group mail enabled - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - MailEnabled = $false -} -Set-EntraGroup @params -``` - -This example demonstrates how to update a group main enabled. - -### Example 6: Update a property for a group - -```powershell -Connect-Entra -Scopes 'Group.ReadWrite.All' -$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" -$params = @{ - GroupId = $group.ObjectId - Visibility = 'Private' - GroupTypes = 'DynamicMembership' - IsAssignableToRole = $true -} -Set-EntraGroup @params -``` - -This example demonstrates how to update a property for an existing Microsoft Entra ID group. - -## Parameters - -### -Description - -Specifies a description for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies a display name for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupTypes - -Specifies that the group is a dynamic group. -To create a dynamic group, specify a value of DynamicMembership. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupId - -Specifies the object ID of a group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -MailEnabled - -Indicates whether this group is mail enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailNickname - -Specifies a mail nickname for the group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SecurityEnabled - -Indicates whether the group is security enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Visibility - -Specifies the visibility of the group's content and members list. -This parameter can take one of the following values: - -* "Public": Anyone can view the contents of the group. -* "Private": Only members can view the content of the group. -* "HiddenMembership": Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator, and Helpdesk Administrators can view the members list of the group. - -If no value is provided, the default value is "Public." - -Notes: - -* This parameter is only valid for groups that have the groupType set to "Unified." -* If a group has this attribute set to "HiddenMembership," it can't be changed later. -* Anyone can join a group that has this attribute set to "Public." If the attribute is set to Private or HiddenMembership, only owner can add new members to the group and requests to join the group need approval of the owner. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsAssignableToRole - -This property can only be set at the time of group creation and can't be modified on an existing group. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related links - -[Get-EntraGroup](Get-EntraGroup.md) - -[New-EntraGroup](New-EntraGroup.md) - -[Remove-EntraGroup](Remove-EntraGroup.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md deleted file mode 100644 index df8b9a3a99..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -title: Set-EntraGroupLifecyclePolicy -description: This article provides details on the Set-EntraGroupLifecyclePolicy command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy - -schema: 2.0.0 ---- - -# Set-EntraGroupLifecyclePolicy - -## Synopsis - -Updates a specific group Lifecycle Policy in Microsoft Entra ID. - -## Syntax - -```powershell -Set-EntraGroupLifecyclePolicy - -GroupLifecyclePolicyId - [-AlternateNotificationEmails ] - [-GroupLifetimeInDays ] - [-ManagedGroupTypes ] - [] -``` - -## Description - -The `Set-EntraGroupLifecyclePolicy` command updates a specific group Lifecycle Policy in Microsoft Entra ID. - -## Examples - -### Example 1: Updates group lifecycle policy - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$policy = Get-EntraGroupLifecyclePolicy | Select-Object -First 1 -$params = @{ - GroupLifecyclePolicyId = $policy.Id - GroupLifetimeInDays = 200 - AlternateNotificationEmails = 'example@contoso.com' - ManagedGroupTypes = 'All' -} -Set-EntraGroupLifecyclePolicy @params -``` - -```Output -Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes --- --------------------------- ------------------- ----------------- -ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 All -``` - -This example updates the specified groupLifecyclePolicy in Microsoft Entra ID. - -- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy to be modified. -- `-GroupLifetimeInDays` parameter specifies the lifetime of the groups in the policy to 200 days. The GroupLifetimeInDays represents the number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. -- `-AlternateNotificationEmails` parameter specifies the email address that receives notifications about the policy. Multiple email address can be defined by separating email address with a semicolon. -- `-ManagedGroupTypes` parameter specifies which office 365 groups the policy applies to. Possible values are `All`, `Selected`, or `None`. -In this case, 'All' suggests that the policy manages all types of groups. - -## Parameters - -### -AlternateNotificationEmails - -Notification emails for groups that have no owners are sent to these email addresses. -List of email addresses separated by a ";". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifetimeInDays - -The number of days a group can exist before it needs to be renewed. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GroupLifecyclePolicyId - -Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ManagedGroupTypes - -Allows the admin to select which office 365 groups the policy applies to. - -- "None" will create the policy in a disabled state. -- "All" will apply the policy to every Office 365 group in the tenant. -- "Selected" will allow the admin to choose specific Office 365 groups that the policy applies to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraGroupLifecyclePolicy](Get-EntraGroupLifecyclePolicy.md) - -[New-EntraGroupLifecyclePolicy](New-EntraGroupLifecyclePolicy.md) - -[Remove-EntraGroupLifecyclePolicy](Remove-EntraGroupLifecyclePolicy.md) \ No newline at end of file diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md deleted file mode 100644 index df6ead8bb6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Invitations/New-EntraInvitation.md +++ /dev/null @@ -1,291 +0,0 @@ ---- -title: New-EntraInvitation -description: This article provides details on the New-EntraInvitation command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraInvitation - -schema: 2.0.0 ---- - -# New-EntraInvitation - -## Synopsis - -This cmdlet is used to invite a new external user to your directory. - -## Syntax - -```powershell -New-EntraInvitation - [-InvitedUser ] - [-InvitedUserType ] - -InvitedUserEmailAddress - [-SendInvitationMessage ] --InviteRedirectUrl - [-InvitedUserMessageInfo ] [-InvitedUserDisplayName ] - [] -``` - -## Description - -This cmdlet is used to invite a new external user to your directory. - -Invitation adds an external user to the organization. When creating a new invitation, you have several options available: - -- On invitation creation, Microsoft Graph can automatically send an invitation email directly to the invited user, or your app can use the inviteRedeemUrl returned in the response to craft your own invitation (through your communication mechanism of choice) to the invited user. If you decide to have Microsoft Graph send an invitation email automatically, you can specify the content and language of the email by using invitedUserMessageInfo. - -- When the user is invited, a user entity (of userType Guest) is created and can be used to control access to resources. The invited user has to go through the redemption process to access any resources they have been invited to. - -To reset the redemption status for a guest user, the User.ReadWrite.All permission is the minimum required. - -For delegated scenarios, the signed-in user must have at least one of the following roles: Guest Inviter, Directory Writers, or User Administrator. Additionally, to reset the redemption status, the signed-in user must have the Helpdesk Administrator or User Administrator role. - -## Examples - -### Example 1: Invite a new external user to your directory - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.onmicrosoft.com' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example sent an email to the user who's email address is in the `-InvitedUserEmailAddress` parameter. - -When the user accepts the invitation, they're forwarded to the url as specified in the `-InviteRedirectUrl` parameter. - -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. - -### Example 2: Invite a new external user to your directory with InvitedUserDisplayName parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.onmicrosoft.com' - InvitedUserDisplayName = 'microsoftuser' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with `-InvitedUserDisplayName` parameter. - -- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user -- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. -- `-InvitedUserDisplayName`Parameter specifies the display name of the user. - -### Example 3: Invite a new external user to your directory with InvitedUserMessageInfo parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$a= New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo -$a.CustomizedMessageBody = 'Hi there, how are you' -$a.MessageLanguage = 'EN' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.microsoft.com' - InvitedUserMessageInfo = $a -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with InvitedUserMessageInfo parameter. - -- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. -- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. -- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. -- `-InvitedUserMessageInfo`Parameter specifies addition information to specify how the invitation message is sent. - -### Example 4: Invite a new external user to your directory with InvitedUserType parameter - -```powershell -Connect-Entra -Scopes 'User.Invite.All' -$params = @{ - InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' - SendInvitationMessage = $True - InviteRedirectUrl = 'https://myapps.microsoft.com' - InvitedUserType = 'Guest' -} - -New-EntraInvitation @params -``` - -```Output -Id InviteRedeemUrl --- --------------- -9e2b9f02-c2cb-4832-920d-81959f44e397 https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… -``` - -This example demonstrates how to invite a new external user to your directory with InvitedUserType parameter. - -## Parameters - -### -InvitedUserDisplayName - -The display name of the user as it appears in your directory. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserEmailAddress - -The Email address to which the invitation is sent. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserMessageInfo - -Addition information to specify how the invitation message is sent. - -```yaml -Type: InvitedUserMessageInfo -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUser - -An existing user object in the directory that you want to add or update the B2B credentials for. - -```yaml -Type: User -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InvitedUserType - -The userType of the user being invited. By default, this is Guest. - -You can invite as Member if you are company administrator. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InviteRedirectUrl - -The URL to which the invited user is forwarded after accepting the invitation. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SendInvitationMessage - -A Boolean parameter that indicates whether or not an invitation message sent to the invited user. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -- See more information - . - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md deleted file mode 100644 index 7667dcb6b1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Enable-EntraAzureADAlias.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: Enable-EntraAzureADAlias -description: This article provides details on the Enable-EntraAzureADAlias command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraAzureADAlias - -schema: 2.0.0 ---- - -# Enable-EntraAzureADAlias - -## Synopsis - -Enables aliases for AzureAD commands. - -## Syntax - -```powershell -Enable-EntraAzureADAlias -``` - -## Description - -Enables Azure AD command aliases in the current PowerShell session. - -## Examples - -### Example 1: Enable aliasing - -```powershell -Enable-EntraAzureADAlias -``` - -Enables all Azure AD prefixes for the current PowerShell session. - -## Parameters - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md deleted file mode 100644 index bdc29b6526..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Migration/Test-EntraScript.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: Test-EntraScript -description: This article provides details on the Test-EntraScript command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Test-EntraScript - -schema: 2.0.0 ---- - -# Test-EntraScript - -## Synopsis - -Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. - -## Syntax - -```powershell -Test-EntraScript - -Path - [-Content ] - [-Quiet] - [] -``` - -## Description - -Checks if the provided script uses Azure AD commands compatible with the Microsoft Entra PowerShell module. - -## Examples - -### Example 1 - -```powershell -Test-EntraScript -Path .\usercreation.ps1 -Quiet -``` - -Returns whether the script `usercreation.ps1` could run under Microsoft.Graph.Entra. - -### Example 2 - -```powershell -Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript -``` - -Returns a list of all scripts that wouldn't run under the Microsoft.Graph.Entra module, listing each issue with line and code. - -## Parameters - -### -Path - -Path to one or more script files to scan. -Or name of the content, when also specifying -Content - -```yaml -Type: String[] -Parameter Sets: (All) -Aliases: FullName, Name - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Content - -Code content to scan. -Used when scanning code that has no file representation (for example, -straight from a repository). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### -Quiet - -Only return $true or $ false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($ false) - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md deleted file mode 100644 index 640ed63b0e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.md +++ /dev/null @@ -1,179 +0,0 @@ ---- -title: Get-EntraAuditDirectoryLog -description: This article provides details on the Get-EntraAuditDirectoryLog command. - - -ms.topic: reference -ms.date: 07/01/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: -schema: 2.0.0 ---- - -# Get-EntraAuditDirectoryLog - -## Synopsis - -Get directory audit logs. - -## Syntax - -```powershell -Get-EntraAuditDirectoryLog -[-All] -[-Top ] -[-Filter ] -[] -``` - -## Description - -The `Get-EntraAuditDirectoryLog` cmdlet gets a Microsoft Entra ID audit log. - -Retrieve audit logs from Microsoft Entra ID, covering logs from various services such as user, app, device, and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (SSPR and admin resets), and self-service group management. - -## Examples - -### Example 1: Get all logs - -```powershell - Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' - Get-EntraAuditDirectoryLog -All -``` - -```Output -Id ActivityDateTime ActivityDisplayName Category CorrelationId --- ---------------- ------------------- -------- ------------- -Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd -Directory_bbbbbbbb-1111-2222-3333-cccccccccccc 17/07/2024 07:31:54 Update user UserManagement bbbb1111-cc22-3333-44dd-555555eeeeee -SSGM_cccccccc-2222-3333-4444-dddddddddddd 17/07/2024 07:13:08 GroupsODataV4_GetgroupLifecyclePolicies GroupManagement cccc2222-dd33-4444-55ee-666666ffffff - -``` - -This command gets all audit logs. - -### Example 2: Get first n logs - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' -Get-EntraAuditDirectoryLog -Top 1 -``` - -```Output -Id ActivityDateTime ActivityDisplayName Category CorrelationId LoggedB - yServic - e --- ---------------- ------------------- -------- ------------- ------- -Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb_8IAPT_617717139 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd Core... - -``` - -This example returns the first N logs. - -### Example 3: Get audit logs containing a given ActivityDisplayName - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' -Get-EntraAuditDirectoryLog -Filter "ActivityDisplayName eq 'Update rollout policy of feature'" -Top 1 -``` - -```Output -Id ActivityDateTime ActivityDisplayName Category CorrelationId --- ---------------- ------------------- -------- ------------- -Application Proxy_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 16/07/2024 05:13:49 Update rollout policy of feature Authentication aaaa0000-bb11-2222-33cc-444444dddddd -``` - -This command shows how to get audit logs by ActivityDisplayName. - -### Example 4: Get all audit logs with a given result - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' -Get-EntraAuditDirectoryLog -Filter "result eq 'failure'" -All -``` - -This command shows how to get audit logs by the result. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`Get-EntraAuditDirectoryLogs` is an alias for `Get-EntraAuditDirectoryLog`. - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md deleted file mode 100644 index 5f710b7c0d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.md +++ /dev/null @@ -1,213 +0,0 @@ ---- -title: Get-EntraAuditSignInLog -description: This article provides details on the Get-EntraAuditSignInLog command. - - -ms.topic: reference -ms.date: 07/15/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: -schema: 2.0.0 ---- - -# Get-EntraAuditSignInLog - -## Synopsis - -Get audit logs of sign-ins. - -## Syntax - -```powershell -Get-EntraAuditSignInLog - [-SignInId] - [-All] - [-Top ] - [-Filter ] - [] -``` - -## Description - -The `Get-EntraAuditSignInLog` cmdlet gets the Microsoft Entra ID sign-in log. - -In addition to delegated permissions, the signed-in user must belong to at least one of the following Microsoft Entra roles to read sign-in reports: - -- Global Reader -- Reports Reader -- Security Administrator -- Security Operator -- Security Reader - -## Examples - -### Example 1: Get all logs - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -Get-EntraAuditSignInLog -All -``` - -```Output -Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol --- -------------- ----- ------------------------ ------------------------- ---------------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none -bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none -cccccccc-2222-3333-4444-dddddddddddd Azure Active Directory PowerShell 22223333-cccc-4444-dddd-5555eeee6666 {} none -dddddddd-3333-4444-5555-eeeeeeeeeeee Azure Active Directory PowerShell 33334444-dddd-5555-eeee-6666ffff7777 {} none -``` - -This example returns all audit logs of sign-ins. - -### Example 2: Get the first two logs - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -Get-EntraAuditSignInLog -Top 2 -``` - -```Output -Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol --- -------------- ----- ------------------------ ------------------------- ---------------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none -bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none -``` - -This example returns the first two audit logs of sign-ins. - -### Example 3: Get audit logs containing a given AppDisplayName - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -Get-EntraAuditSignInLog -Filter "AppDisplayName eq 'Graph Explorer'" -Top 1 -``` - -```Output -Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol --- -------------- ----- ------------------------ ------------------------- ---------------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 -``` - -This example demonstrates how to retrieve sign-in logs by AppDisplayName. - -### Example 4: Get all sign-in logs between dates - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -Get-EntraAuditSignInLog -Filter "createdDateTime ge 2024-07-01T00:00:00Z and createdDateTime le 2024-07-14T23:59:59Z" -``` - -This example shows how to retrieve sign-in logs between dates. - -### Example 5: List failed sign-ins for a user - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" -$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize -``` - -This example demonstrates how to retrieve failed sign-ins for a user. - -## Parameters - -### -SignInId - -Specifies unique ID of the Audit Log. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -The OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -`Get-EntraAuditSignInLogs` is an alias for `Get-EntraAuditSignInLog`. - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md deleted file mode 100644 index c735ee4d6c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.md +++ /dev/null @@ -1,156 +0,0 @@ ---- -title: Get-EntraAuthorizationPolicy -description: This article provides details on the Get-EntraAuthorizationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy - -schema: 2.0.0 ---- - -# Get-EntraAuthorizationPolicy - -## Synopsis - -Gets an authorization policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraAuthorizationPolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraAuthorizationPolicy - -Id - [-Property ] - [] -``` - -## Description - -The `Get-EntraAuthorizationPolicy` cmdlet gets a Microsoft Entra ID authorization policy. - -## Examples - -### Example 1: Get all policies - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraAuthorizationPolicy -``` - -```Output -DeletedDateTime Description DisplayName Id AllowEmailVerifiedUsersToJoinOrganization AllowI - nvites - From ---------------- ----------- ----------- -- ----------------------------------------- ------ - Used to manage authorization related settings across the company. Authorization Policy authorizationPolicy True every… -``` - -This example gets the Microsoft Entra ID authorization policy. - -### Example 2: Get an authorization policy by ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraAuthorizationPolicy -Id 'authorizationPolicy' | Format-List -``` - -```Output -allowInvitesFrom : everyone -allowUserConsentForRiskyApps : -id : authorizationPolicy -defaultUserRolePermissions : @{allowedToCreateSecurityGroups=True; allowedToReadBitlockerKeysForOwnedDevice=True; allowedToCreateTenants=True; - allowedToReadOtherUsers=True; allowedToCreateApps=False; permissionGrantPoliciesAssigned=System.Object[]} -blockMsolPowerShell : False -guestUserRoleId : a0b1b346-4d3e-4e8b-98f8-753987be4970 -displayName : Authorization Policy -@odata.context : https://graph.microsoft.com/v1.0/$metadata#policies/authorizationPolicy/$entity -allowedToSignUpEmailBasedSubscriptions : True -description : Used to manage authorization related settings across the company. -allowEmailVerifiedUsersToJoinOrganization : True -allowedToUseSSPR : True -DeletedDateTime : -AdditionalProperties : {} -``` - -This example gets the Microsoft Entra ID authorization policy. - -- `-Id` parameter specifies the unique identifier of the authorization policy. - -The response properties are: - -- `allowedToSignUpEmailBasedSubscriptions` - indicates whether users can sign up for email based subscriptions. -- `allowedToUseSSPR` - indicates whether administrators of the tenant can use the Self-Service Password Reset (SSPR). -- `allowEmailVerifiedUsersToJoinOrganization` - indicates whether a user can join the tenant by email validation. -- `allowInvitesFrom` - indicates who can invite guests to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. `everyone` is the default setting for all cloud environments except US Government. -- `allowUserConsentForRiskyApps` - indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. -- `blockMsolPowerShell` - to disable the use of the MSOnline PowerShell module set this property to `true`. This also disables user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This doesn't affect Microsoft Entra Connect or Microsoft Graph. -- `defaultUserRolePermissions` - specifies certain customizable permissions for default user role. -- `description` - description of this policy. -- `displayName` - display name for this policy. -- `enabledPreviewFeatures` - list of features enabled for private preview on the tenant. -- `guestUserRoleId` -represents role templateId for the role that should be granted to guests. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). -- `permissionGrantPolicyIdsAssignedToDefaultUserRole` - indicates if user consent to apps is allowed, and if it is, the app consent policy that governs the permission for users to grant consent. Values should be in the format `managePermissionGrantsForSelf.{id}` for user consent policies or `managePermissionGrantsForOwnedResource.{id}` for resource-specific consent policies, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. - -## Parameters - -### -Id - -Specifies the unique identifier of the authorization policy. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Set-EntraAuthorizationPolicy](Set-EntraAuthorizationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md deleted file mode 100644 index 406c7ef223..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -title: Get-EntraConditionalAccessPolicy -description: This article provides details on the Get-EntraConditionalAccessPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy - -schema: 2.0.0 ---- - -# Get-EntraConditionalAccessPolicy - -## Synopsis - -Gets a Microsoft Entra ID conditional access policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraConditionalAccessPolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraConditionalAccessPolicy - -PolicyId - [-Property ] - [] -``` - -## Description - -This cmdlet allows an admin to get the Microsoft Entra ID conditional access policy. -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Retrieves a list of all conditional access policies in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraConditionalAccessPolicy -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled -ffffffff-5555-6666-7777-aaaaaaaaaaaa 2/27/2024 6:26:00 AM ConditionalAccessPolicy 2/29/2024 2:41:34 PM disabled -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 2/27/2024 6:30:48 AM ConditionalAccessPolicy 2/29/2024 2:43:53 PM disabled -``` - -This example retrieves a list of all conditional access policies in Microsoft Entra ID. - -### Example 2: Retrieves a conditional access policy in Microsoft Entra ID with given ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraConditionalAccessPolicy -PolicyId 'eeeeeeee-4444-5555-6666-ffffffffffff' -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled -``` - -This example retrieves a specified conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of a conditional access policy. - -## Parameters - -### -PolicyId - -Specifies the ID of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) - -[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) - -[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md deleted file mode 100644 index b4dd3a5fd2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.md +++ /dev/null @@ -1,212 +0,0 @@ ---- -title: Get-EntraFeatureRolloutPolicy -description: This article provides details on the Get-EntraFeatureRolloutPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy -schema: 2.0.0 ---- - -# Get-EntraFeatureRolloutPolicy - -## Synopsis - -Gets the policy for cloud authentication roll-out in Microsoft Entra ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraFeatureRolloutPolicy - [-Filter ] - [-Property ] - [] -``` - -### GetVague - -```powershell -Get-EntraFeatureRolloutPolicy - [-SearchString ] - [] -``` - -### GetById - -```powershell -Get-EntraFeatureRolloutPolicy - -Id - [] -``` - -## Description - -The `Get-EntraFeatureRolloutPolicy` cmdlet allows an admin to get the policy for cloud authentication rollout (users moving from federation to cloud auth) in Microsoft Entra ID. - -This policy consists of one or two FeatureRolloutPolicy objects. These objects hold the groups assigned for cloud authentication (Pass-through authentication or Password Hash Sync) and groups assigned for Seamless single sign-on. - -## Examples - -### Example 1: Retrieves a list of all cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Get-EntraFeatureRolloutPolicy -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False True -bbbbbbbb-1111-2222-3333-cccccccccccc Feature-Rollout-Policy change emailAsAlternateId False False -``` - -This command retrieves a list of all cloud authentication roll-out policies in Microsoft Entra ID. - -### Example 2: Retrieves cloud authentication roll-out in Microsoft Entra ID with given ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Get-EntraFeatureRolloutPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -```Output - -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False - -``` - -This example retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. - -- `-Id` - Specify The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -### Example 3: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Search String - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Get-EntraFeatureRolloutPolicy -SearchString 'Feature-Rollout-Policy' -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False -``` - -This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. - -### Example 4: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Filter parameter - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -Get-EntraFeatureRolloutPolicy -Filter "Description eq 'Feature-Rollout-Policy'" -``` - -```Output - -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Feature-Rollout-Policy change emailAsAlternateId False False - -``` - -This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. - -## Parameters - -### -Id - -The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetVague -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -Controls which objects are returned. - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.MsFeatureRolloutPolicy - -## Notes - -## Related Links - -[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) - -[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) - -[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md deleted file mode 100644 index 358563649f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -title: Get-EntraIdentityProvider -description: This article provides details on the Get-EntraIdentityProvider command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraIdentityProvider - -schema: 2.0.0 ---- - -# Get-EntraIdentityProvider - -## Synopsis - -This cmdlet is used to retrieve the configured identity providers in the directory. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraIdentityProvider - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraIdentityProvider - -IdentityProviderBaseId - [-Property ] - [] -``` - -## Description - -The `Get-EntraIdentityProvider` cmdlet is used to retrieve the identity providers that have been configured in the directory. -These identity providers can be used to allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C. - -Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. -For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. -The Gmail user will use their Google account credentials to authenticate and access the documents. - -The current set of identity providers can be Microsoft, Google, Facebook, Amazon, or LinkedIn. - -## Examples - -### Example 1: Retrieve all identity providers - -```powershell -Connect-Entra -Scopes 'IdentityProvider.Read.All' -Get-EntraIdentityProvider -``` - -```Output -Id DisplayName --- ----------- -AADSignup-OAUTH Directory Sign up -Google-OAUTH Test -EmailOtpSignup-OAUTH Email One Time Passcode -MSASignup-OAUTH Microsoft Account -``` - -This example retrieves the list of all configured identity providers and their properties. - -### Example 2: Retrieve identity provider by Id - -```powershell -Connect-Entra -Scopes 'IdentityProvider.Read.All' -Get-EntraIdentityProvider -IdentityProviderBaseId Google-OAUTH -``` - -```Output -Id DisplayName --- ----------- -Google-OAUTH GoogleName -``` - -This example retrieves the properties for the specified identity provider. - -- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. - -## Parameters - -### -IdentityProviderBaseId - -The unique identifier for an identity provider. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md deleted file mode 100644 index edab5a7bd4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: Get-EntraNamedLocationPolicy -description: This article provides details on the Get-EntraNamedLocationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy - -schema: 2.0.0 ---- - -# Get-EntraNamedLocationPolicy - -## Synopsis - -Gets a Microsoft Entra ID named location policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraNamedLocationPolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraNamedLocationPolicy - -PolicyId - [-Property ] - [] -``` - -## Description - -This cmdlet allows an admin to get the Microsoft Entra ID named location policies. - -Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. - -## Examples - -### Example 1: Retrieves a list of all named location policies in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraNamedLocationPolicy -``` - -```Output -Id CreatedDateTime DisplayName ModifiedDateTime --- --------------- ----------- ---------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee 31/07/2024 9:53:10 NamedLocation 31/07/2024 9:53:10 -eeeeeeee-4444-5555-6666-ffffffffffff 31/07/2024 4:38:42 NamedLocation1 31/07/2024 4:38:42 -ffffffff-5555-6666-7777-aaaaaaaaaaaa 01/08/2024 4:39:42 NamedLocation2 01/08/2024 4:39:42 -aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 01/08/2024 4:57:03 NamedLocation3 01/08/2024 4:57:03 -``` - -This command retrieves a list of all named location policies in Microsoft Entra ID. - -### Example 2: Retrieves a named location policy by Id - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraNamedLocationPolicy -PolicyId 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -``` - -```Output -Id CreatedDateTime DisplayName ModifiedDateTime --- --------------- ----------- ---------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee 3/1/2024 9:53:10 AM NamedLocation 3/1/2024 9:53:10 AM -``` - -This example retrieves a specified named location policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the policy Id of a named location policy. - -## Parameters - -### -PolicyId - -Specifies the ID of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) - -[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) - -[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md deleted file mode 100644 index 7d77a9299d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -title: Get-EntraOAuth2PermissionGrant -description: This article provides details on the Get-EntraOAuth2PermissionGrant Command. - - -ms.topic: reference -ms.date: 10/16/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant - -schema: 2.0.0 ---- - -# Get-EntraOAuth2PermissionGrant - -## Synopsis - -Gets OAuth2PermissionGrant entities. - -## Syntax - -```powershell -Get-EntraOAuth2PermissionGrant - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraOAuth2PermissionGrant` cmdlet gets OAuth2PermissionGrant entities in Microsoft Entra ID. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: - -- Application Administrator -- Application Developer -- Cloud Application Administrator -- Directory Writers -- Privileged Role Administrator -- User Administrator -- Directory Readers -- Global Reader - -## Examples - -### Example 1: Get the OAuth2 permission grants - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraOAuth2PermissionGrant -``` - -```Output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All -C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read -E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read -H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read -``` - -This command gets the OAuth2 permission grants. - -### Example 2: Get all the OAuth2 permission grants - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraOAuth2PermissionGrant -All -``` - -```Output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All -C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read -E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read -H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read -``` - -This command gets all the OAuth2 permission grants. - -### Example 3: Get OAuth2 permission grants for a user in a service principal - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -$user = Get-EntraUser -UserId 'SawyerM@contoso.com' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Helpdesk Application'" -Get-EntraOAuth2PermissionGrant | Where-Object {$_.ClientId -eq $servicePrincipal.Id -and $_.PrincipalId -eq $user.Id} | Format-List -``` - -```Output -ObjectId : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 -ClientId : 22223333-cccc-4444-dddd-5555eeee6666 -ConsentType : Principal -Id : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 -PrincipalId : aaaaaaaa-bbbb-cccc-1111-222222222222 -ResourceId : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 -Scope : User.Read.All openid profile offline_access Organization.Read.All User.ReadWrite.All Device.Read.All Device.ReadWrite.All Directory.Read.All User.Read RoleManagement.ReadWrite.Directory Group.ReadWrite.All -AdditionalProperties : {} -``` - -This example gets the OAuth2 permission grants for a user in a service principal. - - -### Example 4: Get top 2 OAuth2 permission grants record - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraOAuth2PermissionGrant -Top 2 -``` - -```output -Id ClientId ConsentType PrincipalId ResourceId Scope --- -------- ----------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All -C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read -``` - -This command retrieves the top 2 OAuth2 permission grant records. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) -[New-EntraOAuth2PermissionGrant](New-EntraOauth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md deleted file mode 100644 index 35e31777dd..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.md +++ /dev/null @@ -1,214 +0,0 @@ ---- -title: Get-EntraPermissionGrantConditionSet -description: This article provides details on the Get-EntraPermissionGrantConditionSet command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet - -schema: 2.0.0 ---- - -# Get-EntraPermissionGrantConditionSet - -## Synopsis - -Get a Microsoft Entra ID permission grant condition set by ID. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPermissionGrantConditionSet - -ConditionSetType - -PolicyId - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraPermissionGrantConditionSet - -ConditionSetType - -Id - -PolicyId - [-Property ] - [] -``` - -## Description - -Get a Microsoft Entra ID permission grant condition set object by ID. - -## Examples - -### Example 1: Get all permission grant condition sets that are included in the permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'includes' -} - -Get-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds --- ------------------------------- -------------------- ----------------------------- -------------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -``` - -This command gets all permission grant condition sets that are included in the policy. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. - -### Example 2: Get all permission grant condition sets that are excluded in the permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'excludes' -} - -Get-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds --- ------------------------------- -------------------- ----------------------------- -------------------- -bbbbbbbb-1111-2222-3333-cccccccccccc False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -cccccccc-2222-3333-4444-dddddddddddd False {44445555-eeee-6666-ffff-7777gggg8888} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -``` - -This command gets all permission grant condition sets that are excluded in the policy. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. - -### Example 3: Get a permission grant condition set - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'includes' - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -} - -Get-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds --- ------------------------------- -------------------- ----------------------------- -------------------- -dddddddd-3333-4444-5555-eeeeeeeeeeee False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -``` - -This command gets a permission grant condition set specified by Id. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-Id` parameter specifies the unique identifier of the permission grant condition set object. - -## Parameters - -### -PolicyId - -The unique identifier of a Microsoft Entra ID permission grant policy object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ConditionSetType - -The value indicates whether the condition sets are included in the policy or excluded. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a Microsoft Entra ID permission grant condition set object. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet - -## Notes - -## Related Links - -[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) - -[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) - -[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md deleted file mode 100644 index 800032dcc0..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -title: Get-EntraPermissionGrantPolicy -description: This article provides details on the Get-EntraPermissionGrantPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy - -schema: 2.0.0 ---- - -# Get-EntraPermissionGrantPolicy - -## Synopsis - -Gets a permission grant policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPermissionGrantPolicy - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraPermissionGrantPolicy - -Id - [-Property ] - [] -``` - -## Description - -The `Get-EntraPermissionGrantPolicy` cmdlet gets a Microsoft Entra ID permission grant policy. - -## Examples - -### Example 1: Get all permission grant policies - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -Get-EntraPermissionGrantPolicy -``` - -```Output -DeletedDateTime Description ---------------- ----------- - Includes all application permissions (app roles), for all APIs, for any client application. - Includes all chat resoruce-specific application permissions, for all APIs, for any client application. - (Deprecated) Includes all team resource-specific application permissions, for all APIs, for any client application. -``` - -This command gets all the permission grant policies. - -### Example 2: Get a permission grant policy by ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.PermissionGrant' -Get-EntraPermissionGrantPolicy -Id 'testtenant-sampleapp-permissions' -``` - -```Output -DeletedDateTime Description DisplayName Id ---------------- ----------- ----------- -- - Permissions for sample app in test tenant Sample app permissions testtenant-sampleapp-permissions -``` - -This command gets the specified permission grant policy. - -- `Id` parameter specifies the permission grant policy ID. - -## Parameters - -### -Id - -Specifies the unique identifier of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) - -[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) - -[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md deleted file mode 100644 index 77785c64c1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.md +++ /dev/null @@ -1,196 +0,0 @@ ---- -title: Get-EntraPolicy -description: This article provides details on the Get-EntraPolicy command. - -ms.topic: reference -ms.date: 07/19/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPolicy - -schema: 2.0.0 ---- - -# Get-EntraPolicy - -## Synopsis - -Gets a policy. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraPolicy - [-Top ] - [-All] - [] -``` - -### GetById - -```powershell -Get-EntraPolicy - -Id - [-All] - [] -``` - -## Description - -The `Get-EntraPolicy` cmdlet gets a policy in Microsoft Entra ID. Specify `Id` parameter to get a policy. - -## Examples - -### Example 1: Get all policies - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy -``` - -```Output -Definition DeletedDateTime Description DisplayName Id ----------- --------------- ----------- ----------- -- -{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc -{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 -``` - -This example shows how to return all policies. - -### Example 2: Get policy using Display Name - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} -``` - -```Output -DeletedDateTime Description DisplayName Id ---------------- ----------- ----------- -- - Permissions consentable based on Microsoft's current recommendations. Microsoft User Default Recommended Policy microsoft-user-default-recommended -``` - -This example shows how to get a specific policy using Display Name. - -### Example 3: Get a policy with specific ID - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy -Id 'bbbbbbbb-1111-2222-3333-cccccccccccc' -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True -``` - -This example demonstrated how to receive policy with specific ID. - -- `Id` parameter specifies the unique policy ID, which you want to receive. In this example, `bbbbbbbb-1111-2222-3333-cccccccccccc` represents the ID of the policy. - -### Example 4: Get all policies - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy -All -``` - -```Output -Definition DeletedDateTime Description DisplayName Id ----------- --------------- ----------- ----------- -- -{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc -{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 -``` - -This example demonstrates how to retrieve all policies in Microsoft Entra ID. - -### Example 5: Get the top one policy - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -Get-EntraPolicy -Top 1 -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True -``` - -This example demonstrates how to retrieve top one policies in Microsoft Entra ID. - -## Parameters - -### -Id - -The Id of the policy you want to retrieve. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -All - -List all policies. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraPolicy](New-EntraPolicy.md) - -[Remove-EntraPolicy](Remove-EntraPolicy.md) - -[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md deleted file mode 100644 index a26bfd778e..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.md +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: Get-EntraTrustedCertificateAuthority -description: This article provides details on the Get-EntraTrustedCertificateAuthority command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority - -schema: 2.0.0 ---- - -# Get-EntraTrustedCertificateAuthority - -## Synopsis - -Gets the trusted certificate authority. - -## Syntax - -```powershell -Get-EntraTrustedCertificateAuthority - [-TrustedIssuerSki ] - [-TrustedIssuer ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraTrustedCertificateAuthority` cmdlet gets the trusted certificate authority in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve the trusted certificate authorities that are defined in your directory - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTrustedCertificateAuthority -``` - -```Output -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl1 -DeltaCrlDistributionPoint : -TrustedCertificate : {48, 130, 3, 4...} -TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A - -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl -DeltaCrlDistributionPoint : https://deltaexample.crl -TrustedCertificate : {48, 130, 3, 4...} -TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C - -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl -DeltaCrlDistributionPoint : -TrustedCertificate : {48, 130, 3, 0...} -TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD -``` - -This command retrieves the trusted certificate authorities that are defined in your directory. - -### Example 2: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuer - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTrustedCertificateAuthority -TrustedIssuer 'CN=mscmdlet' -``` - -```Output -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl1 -DeltaCrlDistributionPoint : -TrustedCertificate : {48, 130, 3, 4...} -TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A - -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl -DeltaCrlDistributionPoint : https://deltaexample.crl -TrustedCertificate : {48, 130, 3, 4...} -TrustedIssuer : CN=example.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : 69506400C9806497DCB48F160C31CFFEA87E544C -``` - -This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuer. - -- `-TrustedIssuer` parameter specifies the trusted issuer. - -### Example 3: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki - -```powershell -Connect-Entra -Scopes 'Organization.Read.All' -Get-EntraTrustedCertificateAuthority -TrustedIssuerSki 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD -``` - -```Output -AuthorityType : RootAuthority -CrlDistributionPoint : https://example.crl -DeltaCrlDistributionPoint : -TrustedCertificate : {48, 130, 3, 0...} -TrustedIssuer : CN=example1.azure.com, O=MSIT. Ltd, L=Redmond, C=US -TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD -``` - -This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki. - -- `-TrustedIssuerSki` parameter specifies the trusted issuer ski. - -## Parameters - -### -TrustedIssuer - -Specifies a trusted issuer. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -TrustedIssuerSki - -Specifies a trusted issuer ski. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) - -[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) - -[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md deleted file mode 100644 index 3b9cb44f36..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.md +++ /dev/null @@ -1,278 +0,0 @@ ---- -title: New-EntraConditionalAccessPolicy -description: This article provides details on the New-EntraConditionalAccessPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy - -schema: 2.0.0 ---- - -# New-EntraConditionalAccessPolicy - -## Synopsis - -Creates a new conditional access policy in Microsoft Entra ID. - -## Syntax - -```powershell -New-EntraConditionalAccessPolicy - [-Id ] - [-DisplayName ] - [-State ] - [-Conditions ] - [-GrantControls ] - [-SessionControls ] - [] -``` - -## Description - -This cmdlet allows an admin to create new conditional access policy in Microsoft Entra ID. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Creates a new conditional access policy in Microsoft Entra ID that require MFA to access Exchange Online - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet -$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition -$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' -$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition -$conditions.Users.IncludeUsers = 'all' -$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls -$controls._Operator = 'OR' -$controls.BuiltInControls = 'mfa' - -$params = @{ - DisplayName = 'MFA policy' - State = 'Enabled' - Conditions = $conditions - GrantControls = $controls -} - -New-EntraConditionalAccessPolicy @params -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:29:09 MFA policy enabled -``` - -This command creates a new conditional access policy in Microsoft Entra ID that requires MFA to access Exchange Online. - -- `-DisplayName` parameter specifies the display name of a conditional access policy. -- `-State` parameter specifies the enabled or disabled state of the conditional access policy. -- `-Conditions` parameter specifies the conditions for the conditional access policy. -- `-GrantControls` parameter specifies the controls for the conditional access policy. -- `-SessionControls` parameter Enables limited experiences within specific cloud applications. - -### Example 2: Creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet -$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition -$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' -$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition -$conditions.Users.IncludeUsers = 'all' -$conditions.Locations = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition -$conditions.Locations.IncludeLocations = '5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9' -$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls -$controls._Operator = 'OR' -$controls.BuiltInControls = 'block' - -$params = @{ - DisplayName = 'MFA policy' - State = 'Enabled' - Conditions = $conditions - GrantControls = $controls -} - -New-EntraConditionalAccessPolicy @params -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 MFA policy enabled -``` - -This command creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions. - -- `-DisplayName` parameter specifies the display name of a conditional access policy. -- `-State` parameter specifies the enabled or disabled state of the conditional access policy. -- `-Conditions` parameter specifies the conditions for the conditional access policy. -- `-GrantControls` parameter specifies the controls for the conditional access policy. - -### Example 3: Use all conditions and controls - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' - -$Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet -$Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") -$Condition.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition -$Condition.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" -$Condition.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition -$Condition.Users.IncludeUsers = "all" - -$Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls -$Controls._Operator = "AND" -$Controls.BuiltInControls = @("mfa") - -$SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls -$ApplicationEnforcedRestrictions = New-Object Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions -$ApplicationEnforcedRestrictions.IsEnabled = $true -$SessionControls.applicationEnforcedRestrictions = $ApplicationEnforcedRestrictions -$params = @{ - DisplayName = "ConditionalAccessPolicy" - Conditions = $conditions - GrantControls = $controls - SessionControls = $SessionControls - } -New-EntraConditionalAccessPolicy @params -``` - -```Output -Id CreatedDateTime Description DisplayName ModifiedDateTime State TemplateId --- --------------- ----------- ----------- ---------------- ----- ---------- -aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 07:31:25 ConditionalAccessPolicy enabled -``` - -This example creates new conditional access policy in Microsoft Entra ID with all the conditions and controls. - -- `-DisplayName` parameter specifies the display name of a conditional access policy. -- `-Conditions` parameter specifies the conditions for the conditional access policy. -- `-GrantControls` parameter specifies the controls for the conditional access policy. -- `-SessionControls` parameter Enables limited experiences within specific cloud applications. - -## Parameters - -### -DisplayName - -Specifies the display name of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State - -Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Conditions - -Specifies the conditions for the conditional access policy in Microsoft Entra ID. - -```yaml -Type: ConditionalAccessConditionSet -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GrantControls - -Specifies the controls for the conditional access policy in Microsoft Entra ID. - -```yaml -Type: ConditionalAccessGrantControls -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the policy Id of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SessionControls - -Enables limited experiences within specific cloud applications. - -```yaml -Type: ConditionalAccessSessionControls -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) - -[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) - -[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md deleted file mode 100644 index e276f16fd8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.md +++ /dev/null @@ -1,224 +0,0 @@ ---- -title: New-EntraFeatureRolloutPolicy -description: This article provides details on the New-EntraFeatureRolloutPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy - -schema: 2.0.0 ---- - -# New-EntraFeatureRolloutPolicy - -## Synopsis - -Allows an admin to create the policy for cloud authentication roll-out in Microsoft Entra ID. - -## Syntax - -```powershell -New-EntraFeatureRolloutPolicy - -Feature - -IsEnabled - [-Description ] - [-IsAppliedToOrganization ] - [-AppliesTo ] - -DisplayName - [] -``` - -## Description - -The `New-EntraFeatureRolloutPolicy` cmdlet allows an admin to create the policy for cloud authentication roll-out (users moving from federation to cloud auth) in Microsoft Entra ID. - -The policy admin can identify whether the users authenticate using password hashes in Microsoft Entra ID (Password hash-sync) or Microsoft Entra ID on-premises directly (Pass-through authentication). - -## Examples - -### Example 1: Creates the policy for cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Feature = 'PassthroughAuthentication' - DisplayName = 'FeatureRolloutPolicy' - IsEnabled = $false -} -New-EntraFeatureRolloutPolicy @params -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False - -``` - -This example creates the policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. -Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. - -- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. - -- `-IsEnabled` specifies the status of cloud authentication roll-out policy. - -### Example 2: Creates the policy for cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Feature = 'PassthroughAuthentication' - DisplayName = 'FeatureRolloutPolicy' - IsEnabled = $false - IsAppliedToOrganization = $false -} -New-EntraFeatureRolloutPolicy @params -``` - -```Output -Id Description DisplayName Feature IsAppliedToOrganization IsEnabled --- ----------- ----------- ------- ----------------------- --------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy FeatureRolloutPolicy passthroughAuthentication False False - -``` - -This command creates the policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. -Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. - -- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. - -- `-IsEnabled` specifies the status of cloud authentication roll-out policy. - -- `-IsAppliedToOrganization` specifies if the cloud authentication roll-out policy applied to the entire organization. - -## Parameters - -### -DisplayName - -Specifies the display name of the cloud authentication roll-out policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Feature - -Specifies a feature assigned to the cloud authentication roll-out policy. - -Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. - -```yaml -Type: FeatureEnum -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsEnabled - -Specifies the status of cloud authentication roll-out policy. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies the description of the cloud authentication roll-out policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppliesTo - -Specifies a list of Microsoft Entra ID objects that is assigned to the feature. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsAppliedToOrganization - -Specifies if the cloud authentication roll-out policy applied to the entire organization. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -### Microsoft.Online.Administration.MsFeatureRolloutPolicy - -## Notes - -## Related Links - -[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) - -[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) - -[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md deleted file mode 100644 index 246056cf38..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -title: New-EntraIdentityProvider -description: This article provides details on the New-EntraIdentityProvider command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraIdentityProvider - -schema: 2.0.0 ---- - -# New-EntraIdentityProvider - -## Synopsis - -Configure a new identity provider in the directory. - -## Syntax - -```powershell -New-EntraIdentityProvider - -Type - -ClientSecret - -ClientId - [-Name ] - [] -``` - -## Description - -The `New-EntraIdentityProvider` cmdlet is used to configure an identity provider in the directory. - -Adding an identity provider will allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C using the identity provider. - -Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. - -For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. The Gmail user will use their Google account credentials to authenticate and access the documents. - -The current set of identity providers can be: - -- Microsoft -- Google -- Facebook -- Amazon -- LinkedIn - -The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. - -## Examples - -### Example 1: Add LinkedIn identity provider - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -$params = @{ - Type = 'LinkedIn' - Name = 'LinkedInName' - ClientId = 'LinkedInAppClientId' - ClientSecret = 'LinkedInAppClientSecret' -} - -New-EntraIdentityProvider @params -``` - -```Output -Id DisplayName --- ----------- -LinkedIn-OAUTH LinkedInName -``` - -This example adds a LinkedIn identity provider. - -- `-Type` parameter specifies the identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. -- `-Name` parameter specifies the display name of the identity provider. -- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. -- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. - -## Parameters - -### -ClientId - -The client identifier for the application, obtained during the application's registration with the identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientSecret - -The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name - -The display name of the identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. - -For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### None - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md deleted file mode 100644 index 997bf4368b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.md +++ /dev/null @@ -1,236 +0,0 @@ ---- -title: New-EntraNamedLocationPolicy -description: This article provides details on the New-EntraNamedLocationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy - -schema: 2.0.0 ---- - -# New-EntraNamedLocationPolicy - -## Synopsis - -Creates a new named location policy in Microsoft Entra ID. - -## Syntax - -```powershell -New-EntraNamedLocationPolicy - [-OdataType ] - [-Id ] - [-DisplayName ] - [-IpRanges ] - [-IsTrusted ] - [-CountriesAndRegions ] - [-IncludeUnknownCountriesAndRegions ] - [] -``` - -## Description - -This cmdlet allows an admin to create new named location policy in Microsoft Entra ID. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Creates a new Ip named location policy in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange -$ipRanges.cidrAddress = '6.5.4.3/32' -$params = @{ - OdataType = '#microsoft.graph.ipNamedLocation' - DisplayName = 'IP named location policy' - IsTrusted = $false - IpRanges = $ipRanges -} - -New-EntraNamedLocationPolicy @params -``` - -```Output -Id CreatedDateTime DisplayName ModifiedDateTime --- --------------- ----------- ---------------- -bbbbbbbb-1111-2222-3333-cccccccccccc 31-07-2024 10:45:27 IP named location policy 31-07-2024 10:45:27 -``` - -This command creates a new country named location policy in Microsoft Entra ID. - -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-DisplayName` parameter specifies the display name of a named location policy. -- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. -- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. - -### Example 2: Creates a new country named location policy in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$params = @{ - OdataType = '#microsoft.graph.countryNamedLocation' - DisplayName = 'Country named location policy' - CountriesAndRegions = 'IN' - IncludeUnknownCountriesAndRegions = $false -} - -New-EntraNamedLocationPolicy @params -``` - -```Output -Id CreatedDateTime DisplayName ModifiedDateTime --- --------------- ----------- ---------------- -cccccccc-2222-3333-4444-dddddddddddd 31-07-2024 10:46:16 Country named location policy 31-07-2024 10:46:16 -``` - -This command creates a new country named location policy in Microsoft Entra ID. - -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-DisplayName` parameter specifies the display name of a named location policy. -- `-CountriesAndRegions` parameter specifies the countries and regions for the named location policy. -- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. - -## Parameters - -### -OdataType - -Specifies the OData type of a named location policy object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IpRanges - -List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsTrusted - -Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CountriesAndRegions - -Specifies the countries and regions for the named location policy in Microsoft Entra ID. List of countries and/or regions in the two-letter format specified by ISO 3166-2. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeUnknownCountriesAndRegions - -Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the ID of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For more information, see [Create namedLocation](/graph/api/conditionalaccessroot-post-namedlocations). - -## Related Links - -[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) - -[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) - -[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md deleted file mode 100644 index 85c6a167e4..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -title: New-EntraOauth2PermissionGrant -description: This article provides details on the New-EntraOauth2PermissionGrant command. - - -ms.topic: reference -ms.date: 06/28/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant - -schema: 2.0.0 ---- - -# New-EntraOauth2PermissionGrant - -## Synopsis - -Create a delegated permission grant using an oAuth2PermissionGrant object. This grant allows a client service principal to access a resource service principal on behalf of a signed-in user, with access restricted to the specified delegated permissions. - -## Syntax - -```powershell -New-EntraOauth2PermissionGrant - -ClientId - -ConsentType - -ResourceId - [-PrincipalId ] - [-Scope ] - [] -``` - -## Description - -The `New-EntraOauth2PermissionGrant` cmdlet creates a delegated permission grant using an oAuth2PermissionGrant object. This grant authorizes a client service principal to access a resource service principal on behalf of a signed-in user, with access limited to the specified delegated permissions. - -## Examples - -### Example 1: To grant authorization to impersonate all users - -```powershell -Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" -$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" -$params = @{ - ClientId = $servicePrincipal.Id - ConsentType = 'AllPrincipals' - ResourceId = $graphApp.Id - Scope = 'Directory.Read.All' - StartTime = Get-Date - ExpiryTime = (Get-Date).AddYears(1) -} -New-EntraOauth2PermissionGrant @params -``` - -```Output -Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope --- -------- ----------- ---------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... - -``` - -This command Grant authorization to impersonate all users. - -### Example 2: To grant authorization to impersonate a specific user - -```powershell -Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' -$servicePrincipal = Get-EntraServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" -$graphApp = Get-EntraServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" -$user = Get-EntraUser -UserId 'SawyerM@contoso.com' -$params = @{ - ClientId = $servicePrincipal.Id - ConsentType = 'Principal' - PrincipalId = $user.Id - ResourceId = $graphApp.Id - Scope = 'Directory.Read.All' - StartTime = Get-Date - ExpiryTime = (Get-Date).AddYears(1) -} -New-EntraOauth2PermissionGrant @params -``` - -```Output -Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope --- -------- ----------- ---------- ----------- ---------- ----- -A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... -``` - -This command Grant authorization to impersonate a specific user. - -## Parameters - -### -ClientId - -The object ID (not appId) of the client service principal for the application, which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConsentType - -Indicates whether the client application is authorized to impersonate all users or only a specific user. - -- `AllPrincipals`: Authorizes the application to impersonate all users. -- `Principal`: Authorizes the application to impersonate a specific user. -An administrator can grant consent on behalf of all users. In some cases, non-admin users are authorized to consent on behalf of themselves for certain delegated permissions. This parameter is required and supports the $filter query (eq only). - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId - -The ID of the resource service principal to which access is authorized. This identifies the API, which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrincipalId - -The ID of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal, If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Scope - -A space-separated list of the claim values for delegated permissions, which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3,850 characters in length. - -```yaml -Type: System.String -Parameter Sets: CreateExpanded -Aliases: -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## RELATED LINKS - -[Remove-EntraOAuth2PermissionGrant](Remove-EntraOAuth2PermissionGrant.md) -[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md deleted file mode 100644 index 2f1cf9baf9..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.md +++ /dev/null @@ -1,372 +0,0 @@ ---- -title: New-EntraPermissionGrantConditionSet -description: This article provides details on the New-EntraPermissionGrantConditionSet command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet - -schema: 2.0.0 ---- - -# New-EntraPermissionGrantConditionSet - -## Synopsis - -Create a new Microsoft Entra ID permission grant condition set in a given policy. - -## Syntax - -```powershell -New-EntraPermissionGrantConditionSet - -PolicyId - -ConditionSetType - [-Permissions ] - [-ClientApplicationTenantIds ] - [-ClientApplicationIds ] - [-ResourceApplication ] - [-PermissionType ] - [-PermissionClassification ] - [-ClientApplicationsFromVerifiedPublisherOnly ] - [-ClientApplicationPublisherIds ] - [] -``` - -## Description - -Create a new Microsoft Entra ID permission grant condition set object in an existing policy. - -## Examples - -### Example 1: Create a basic permission grant condition set in an existing policy with all build in values - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ -PolicyId = $permissionGrantPolicyId -ConditionSetType = 'includes' -PermissionType = 'delegated' -} - -New-EntraPermissionGrantConditionSet @params -``` - -```Output -Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions --- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- -aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {all} -``` - -This command creates a basic permission grant condition set in an existing policy with all build in values. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. - -### Example 2: Create a permission grant condition set in an existing policy that includes specific permissions for a resource application - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id -$params = @{ -PolicyId = $permissionGrantPolicyId -ConditionSetType = 'includes' -PermissionType = 'delegated' -Permissions = @($permission) -ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' -} - -New-EntraPermissionGrantConditionSet @params -``` - -```Output -Id ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification PermissionType Permissions --- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------------ -------------- --------- -aaaa0000-bb11-2222-33cc-444444dddddd {all} {all} {all} False all delegated {8b590... -``` - -This command creates a permission grant condition set in an existing policy that includes specific permissions for a resource application. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. -- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. -- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. - -### Example 3: Create a permission grant condition set in an existing policy that is excluded - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ -PolicyId = $permissionGrantPolicyId -ConditionSetType = 'excludes' -PermissionType = 'delegated' -Permissions = @('All') -ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' -PermissionClassification = 'low' -ClientApplicationsFromVerifiedPublisherOnly = $true -ClientApplicationIds = @('All') -ClientApplicationTenantIds = @('All') -ClientApplicationPublisherIds = @('All') -} -New-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification --- ------------------------------- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------- -dddd3333-ee44-5555-66ff-777777aaaaaa False {all} {all} {all} True low -``` - -This command creates a permission grant condition set in an existing policy that is excluded. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. -- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. -- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. -- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. -- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. -- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. -- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. -- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. - -### Example 4: Create a permission grant condition set in an existing policy that is excluded - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$permission = (Get-EntraServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id -$params = @{ -PolicyId = $permissionGrantPolicyId -ConditionSetType = 'excludes' -PermissionType = 'delegated' -Permissions = @($permission) -ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' -PermissionClassification = 'low' -ClientApplicationsFromVerifiedPublisherOnly = $true -ClientApplicationIds = @('00001111-aaaa-2222-bbbb-3333cccc4444', '11112222-bbbb-3333-cccc-4444dddd5555') -ClientApplicationTenantIds = @('aaaabbbb-0000-cccc-1111-dddd2222eeee', 'bbbbcccc-1111-dddd-2222-eeee3333ffff', 'ccccdddd-2222-eeee-3333-ffff4444aaaa') -ClientApplicationPublisherIds = @('33334444-dddd-5555-eeee-6666ffff7777') -} -New-EntraPermissionGrantConditionSet @params -``` - -```Output -Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds --- ------------------------------- -------------------- ----------------------------- -------------------- -cccccccc-2222-3333-4444-dddddddddddd False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} -``` - -This command creates a permission grant condition set in an existing policy that is excluded. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. -- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. -- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. -- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. -- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. -- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. -- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. -- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. - -## Parameters - -### -PolicyId - -The unique identifier of a Microsoft Entra ID permission grant policy object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ConditionSetType - -The value indicates whether the condition sets are included in the policy or excluded. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PermissionType - -Specific type of permissions (application, delegated) to scope consent operation down to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PermissionClassification - -Specific classification (all, low, medium, high) to scope consent operation down to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Permissions - -The identifier of the resource application to scope consent operation down to. -It could be @("All") or a list of permission IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationIds - -The set of client application IDs to scope consent operation down to. -It could be @("All") or a list of client application IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationTenantIds - -The set of client application tenant IDs to scope consent operation down to. -It could be @("All") or a list of client application tenant IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationPublisherIds - -The set of client applications publisher IDs to scope consent operation down to. -It could be @("All") or a list of client application publisher IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationsFromVerifiedPublisherOnly - -A value indicates whether to only includes client applications from verified publishers. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceApplication - -The identifier of the resource application to scope consent operation down to. -It could be "Any" or a specific resource application ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet - -## Notes - -## Related Links - -[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) - -[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) - -[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md deleted file mode 100644 index ef81f38eb6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -title: New-EntraPermissionGrantPolicy -description: This article provides details on the New-EntraPermissionGrantPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy - -schema: 2.0.0 ---- - -# New-EntraPermissionGrantPolicy - -## Synopsis - -Creates a permission grant policy. - -## Syntax - -```powershell -New-EntraPermissionGrantPolicy - -Id - [-DisplayName ] - [-Description ] - [] -``` - -## Description - -The `New-EntraPermissionGrantPolicy` cmdlet creates a Microsoft Entra ID permission grant policy. - -## Examples - -### Example 1: Create a permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$params = @{ - Id = 'my_new_permission_grant_policy_id' - DisplayName = 'MyNewPermissionGrantPolicy' - Description = 'My new permission grant policy' -} - -New-EntraPermissionGrantPolicy @params -``` - -```Output -DeletedDateTime Description DisplayName Id ---------------- ----------- ----------- -- - My new permission grant policy MyNewPermissionGrantPolicy my_new_permission_grant_policy_id -``` - -This example creates new permission grant policy in Microsoft Entra ID. - -- `-Id` parameter specifies the unique identifier of the permission grant policy. -- `-DisplayName` parameter specifies the display name for the permission grant policy. -- `-Description` parameter specifies the description for the permission grant policy. - -## Parameters - -### -Description - -Specifies the description for the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name for the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the unique identifier of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) - -[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) - -[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md deleted file mode 100644 index 1bbe623503..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -title: New-EntraPolicy -description: This article provides details on the New-EntraPolicy command. - - -ms.topic: reference -ms.date: 08/02/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPolicy - -schema: 2.0.0 ---- - -# New-EntraPolicy - -## Synopsis - -Creates a policy. - -## Syntax - -```powershell -New-EntraPolicy - -Definition - -DisplayName - -Type - [-IsOrganizationDefault ] - [] -``` - -## Description - -The `New-EntraPolicy` cmdlet creates a policy in Microsoft Entra ID. Specify `DisplayName`, `Definition` and `Type` parameters for create a new policy. - -## Examples - -### Example 1: Create a new policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') - DisplayName = 'NewPolicy' - Type = 'HomeRealmDiscoveryPolicy' -} -New-EntraPolicy @params -``` - -```Output -Definition DeletedDateTime Description DisplayName Id IsOrganizationD - efault ----------- --------------- ----------- ----------- -- --------------- -{{"HomeReayPolicy":{"AlternateLoginIDLookup":true, "IncluderIds":["UserID"]}}} NewPolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False -``` - -This command creates a new policy in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` Parameter specifies the type of policy. - -### Example 2: Create a ClaimsMappingPolicy policy by 'IsOrganizationDefault' parameter - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name\",\"JwtClaimType\":\"upn\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://schemas.microsoft.com/identity/claims/displayname\",\"JwtClaimType\":\"name\"}]}}" ], "displayName": "Custom Claims Issuance Policy", "isOrganizationDefault": false }') - DisplayName ='ClaimstestPolicy' - Type = 'claimsMappingPolicies' - IsOrganizationDefault = $false -} -New-EntraPolicy @params -``` - -```Output -Definition ----------- -{{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLCl… -``` - -This command creates a ClaimsMappingPolicy using 'IsOrganizationDefault' parameter in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` - Parameter specifies the type of policy. In this example, `ClaimsMappingPolicy` - represents the type of policy. - -- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. - -### Example 3: Create a TokenLifetimePolicy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}') - DisplayName = 'TokenLifetimePolicy' - Type = 'TokenLifetimePolicy' - IsOrganizationDefault = $false -} -New-EntraPolicy @params -``` - -```Output -Definition DeletedDateTime Description DisplayName Id IsOrganizatio - nDefault ----------- --------------- ----------- ----------- -- ------------- -{{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}} TokenLifetimePolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False -``` - -This command creates a TokenLifetimePolicy in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` Parameter specifies the type of policy. - -### Example 4: Create a TokenIssuancePolicy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly","EmitSAMLNameFormat":"true"}}') - DisplayName = 'tokenIssuance' - Type = 'TokenIssuancePolicy' -} -New-EntraPolicy @params -``` - -```Output -Definition ----------- -{{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly… -``` - -This command creates a TokenIssuancePolicy in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` Parameter specifies the type of policy. - -### Example 5: Create a ActivityBasedTimeoutPolicy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') - DisplayName = 'ActivityBasedTimeoutPolicyname' - Type = 'ActivityBasedTimeoutPolicy' -} -New-EntraPolicy @params -``` - -```Output -Definition DeletedDateTime Description DisplayName Id ----------- --------------- ----------- ----------- -- -{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} ActivityBasedTimeoutPolicyname aaaaaaaa-0000-1111-2222... - -``` - -This command creates a ActivityBasedTimeoutPolicy in Microsoft Entra ID. - -- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. - -- `-Type` Parameter specifies the type of policy. - -## Parameters - -### -Definition - -Specifies an array of JSON that contains all the rules of the policy, for example: -Definition @("{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}"). - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -String of the policy name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsOrganizationDefault - -True if this policy is the organizational default. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies the type of policy. -For token lifetimes, specify "TokenLifetimePolicy." - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPolicy](Get-EntraPolicy.md) - -[Remove-EntraPolicy](Remove-EntraPolicy.md) - -[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md deleted file mode 100644 index ab18d1f589..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: New-EntraTrustedCertificateAuthority -description: This article provides details on the New-EntraTrustedCertificateAuthority command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority - -schema: 2.0.0 ---- - -# New-EntraTrustedCertificateAuthority - -## Synopsis - -Creates a trusted certificate authority. - -## Syntax - -```powershell -New-EntraTrustedCertificateAuthority - -CertificateAuthorityInformation - [] -``` - -## Description - -The `New-EntraTrustedCertificateAuthority` cmdlet creates a trusted certificate authority in Microsoft Entra ID. - -## Examples - -### Example 1: Creates the trusted certificate authorities in your directory - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' - -$new_ca = New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation #Create CertificateAuthorityInformation object -$new_ca.AuthorityType = "RootAuthority" -$new_ca.CrlDistributionPoint = "https://example.crl" -$new_ca.DeltaCrlDistributionPoint = "https://deltaexample.crl" -$new_ca.TrustedCertificate = "Path to .cer file(including cer file name)" -New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca -``` - -```Output -Id --- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command creates the trusted certificate authorities in your directory. - -- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. -It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. - -## Parameters - -### -CertificateAuthorityInformation - -Specifies a CertificateAuthorityInformation object. - -```yaml -Type: CertificateAuthorityInformation -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) - -[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) - -[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md deleted file mode 100644 index f0703bac66..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Remove-EntraConditionalAccessPolicy -description: This article provides details on the Remove-EntraConditionalAccessPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy - -schema: 2.0.0 ---- - -# Remove-EntraConditionalAccessPolicy - -## Synopsis - -Deletes a conditional access policy in Microsoft Entra ID by Id. - -## Syntax - -```powershell -Remove-EntraConditionalAccessPolicy - -PolicyId - [] -``` - -## Description - -This cmdlet allows an admin to delete a conditional access policy in Microsoft Entra ID by Id. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Deletes a conditional access policy in Microsoft Entra ID by PolicyId - -```powershell -Connect-Entra -Scopes 'Policy.Read.All' -$policy = Get-EntraConditionalAccessPolicy | Where-Object {$_.DisplayName -eq 'MFA policy'} -Remove-EntraConditionalAccessPolicy -PolicyId $policy.ObjectId -``` - -This command deletes a conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of a conditional access policy. - -## Parameters - -### -PolicyId - -Specifies the policy Id of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) - -[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) - -[Set-EntraConditionalAccessPolicy](Set-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md deleted file mode 100644 index 75ae9347b1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Remove-EntraFeatureRolloutPolicy -description: This article provides details on the Remove-EntraFeatureRolloutPolicy command. - - -ms.topic: reference -ms.date: 07/22/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraBetaFeatureRolloutPolicy -schema: 2.0.0 ---- - -# Remove-EntraFeatureRolloutPolicy - -## Synopsis - -Allows an admin to remove the policy for cloud authentication roll-out in Microsoft Entra ID. - -## Syntax - -```powershell -Remove-EntraFeatureRolloutPolicy - -Id - [] -``` - -## Description - -An admin uses `Remove-EntraFeatureRolloutPolicy` cmdlet to remove the cloud authentication roll-out policy and have all users where policy applied to be free of the policy. - -Users in groups that were assigned to the policy falls back to the global authentication method (most common case will be federation). Specify `Id` parameter to remove the cloud authentication roll-out policy. - -## Examples - -### Example 1: Removes the policy for cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$Policy = Get-EntraFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policy'" -Remove-EntraFeatureRolloutPolicy -Id $Policy.Id -``` - -This example removes the policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Id` - specifies the unique identifier of the cloud authentication roll-out policy. You can use `Get-EntraFeatureRolloutPolicy` to retrieve policy details. - -## Parameters - -### -Id - -The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) - -[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) - -[Set-EntraFeatureRolloutPolicy](Set-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md deleted file mode 100644 index 03968e43e8..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Remove-EntraFeatureRolloutPolicyDirectoryObject -description: This article provides details on the Remove-EntraFeatureRolloutPolicyDirectoryObject command. - - -ms.topic: reference -ms.date: 07/22/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject - -schema: 2.0.0 ---- - -# Remove-EntraFeatureRolloutPolicyDirectoryObject - -## Synopsis - -Allows an admin to remove a group from the cloud authentication rollout policy in Microsoft Entra ID. -Users in this group revert back to the authenticating using the global policy (in most cases this will be federation). - -## Syntax - -```powershell -Remove-EntraFeatureRolloutPolicyDirectoryObject - -ObjectId - -Id - [] -``` - -## Description - -An admin uses the `Remove-EntraFeatureRolloutPolicyDirectoryObject` cmdlet to remove groups from the cloud authentication roll-out policy. - -Users in these groups start authenticating against the global authentication policy (for example, -federation). Specify `ObjectId` and `Id` parameter to remove groups from the cloud authentication roll-out policy. - -## Examples - -### Example 1: Removes a group from the cloud authentication roll-out policy from Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - ObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -} -Remove-EntraFeatureRolloutPolicyDirectoryObject @params -``` - -This command removes a group from the cloud authentication roll-out policy from Microsoft Entra ID. - -- `-Id` Parameter specifies the ID of the cloud authentication roll-out policy. -- `-ObjectId` parameter specifies the ID of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy. - -## Parameters - -### -ID - -The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -The unique identifier of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md deleted file mode 100644 index c1982b130d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Remove-EntraIdentityProvider -description: This article provides details on the Remove-EntraIdentityProvider command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraIdentityProvider - -schema: 2.0.0 ---- - -# Remove-EntraIdentityProvider - -## Synopsis - -This cmdlet is used to delete an identity provider in the directory. - -## Syntax - -```powershell -Remove-EntraIdentityProvider - -IdentityProviderBaseId - [] -``` - -## Description - -This cmdlet is used to delete an identity provider that has been configured in the directory. - -The identity provider is permanently deleted. - -The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. - -## Examples - -### Example 1: Remove the identity provider in the directory - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -Remove-EntraIdentityProvider -IdentityProviderBaseId 'LinkedIn-OAUTH' -``` - -This command demonstrates how to remove the specified identity provider. - -- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. - -## Parameters - -### -IdentityProviderBaseId - -The unique identifier for an identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraIdentityProvider](New-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md deleted file mode 100644 index 405c7db5f6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Remove-EntraNamedLocationPolicy -description: This article provides details on the Remove-EntraNamedLocationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy - -schema: 2.0.0 ---- - -# Remove-EntraNamedLocationPolicy - -## Synopsis - -Deletes a Microsoft Entra ID named location policy by PolicyId. - -## Syntax - -```powershell -Remove-EntraNamedLocationPolicy - -PolicyId - [] -``` - -## Description - -This cmdlet allows an admin to delete the Microsoft Entra ID named location policy. - -Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. - -## Examples - -### Example 1: Deletes a named location policy in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} -Remove-EntraNamedLocationPolicy -PolicyId $policy.Id -``` - -This command demonstrates how to delete the named location policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of named location policy. - -## Parameters - -### -PolicyId - -Specifies the ID of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) - -[Set-EntraNamedLocationPolicy](Set-EntraNamedLocationPolicy.md) - -[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md deleted file mode 100644 index 5b9cce4030..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Remove-EntraOAuth2PermissionGrant -description: This article provides details on the Remove-EntraOAuth2PermissionGrant command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant - -schema: 2.0.0 ---- - -# Remove-EntraOAuth2PermissionGrant - -## Synopsis - -Removes an OAuth2PermissionGrant. - -## Syntax - -```powershell -Remove-EntraOAuth2PermissionGrant - -ObjectId - [] -``` - -## Description - -The `Remove-EntraOAuth2PermissionGrant` cmdlet removes an OAuth2PermissionGrant object in Microsoft Entra ID. - -When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted OAuth2PermissionGrant. - -## Examples - -### Example 1: Remove an OAuth2 permission grant - -```powershell -Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' -$SharePointSP = Get-EntraServicePrincipal | Where-Object {$_.DisplayName -eq 'Microsoft.SharePoint'} -$SharePointOA2AllSitesRead = Get-EntraOAuth2PermissionGrant | Where-Object {$_.ResourceId -eq $SharePointSP.ObjectId} | Where-Object {$_.Scope -eq 'AllSites.Read'} -Remove-EntraOAuth2PermissionGrant -ObjectId $SharePointOA2AllSitesRead.ObjectId -``` - -This example shows how to remove an OAuth2PermissionGrant object in Microsoft Entra ID. - -## Parameters - -### -ObjectId - -Specifies the ID of an OAuth2PermissionGrant object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) - -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md deleted file mode 100644 index d46b6e072d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -title: Remove-EntraPermissionGrantConditionSet -description: This article provides details on the Remove-EntraPermissionGrantConditionSet command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet - -schema: 2.0.0 ---- - -# Remove-EntraPermissionGrantConditionSet - -## Synopsis - -Delete a Microsoft Entra ID permission grant condition set by ID. - -## Syntax - -```powershell -Remove-EntraPermissionGrantConditionSet - -ConditionSetType - -Id - -PolicyId - [] -``` - -## Description - -Delete a Microsoft Entra ID permission grant condition set object by ID. - -## Examples - -### Example 1: Delete a permission grant condition set from a policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$PermissionGrantConditionSetId = '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'excludes' - Id = $PermissionGrantConditionSetId -} -Remove-EntraPermissionGrantConditionSet @params -``` - -This example demonstrates how to remove the Microsoft Entra ID permission grant condition set by ID. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-Id` parameter specifies the unique identifier of a permission grant condition set object. - -## Parameters - -### -PolicyId - -The unique identifier of a Microsoft Entra ID permission grant policy object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ConditionSetType - -The value indicates whether the condition sets are included in the policy or excluded. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a Microsoft Entra ID permission grant condition set object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) - -[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) - -[Set-EntraPermissionGrantConditionSet](Set-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md deleted file mode 100644 index bd9e0d012a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: Remove-EntraPermissionGrantPolicy -description: This article provides details on the Remove-EntraPermissionGrantPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy - -schema: 2.0.0 ---- - -# Remove-EntraPermissionGrantPolicy - -## Synopsis - -Removes a permission grant policy. - -## Syntax - -```powershell -Remove-EntraPermissionGrantPolicy - -Id - [] -``` - -## Description - -The `Remove-EntraPermissionGrantPolicy` cmdlet removes a Microsoft Entra ID permission grant policy. - -## Examples - -### Example 1: Remove a permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -Remove-EntraPermissionGrantPolicy -Id 'my_permission_grant_policy_id' -``` - -This command removes the specified permission grant policy in Microsoft Entra ID. - -- `-Id` parameter specifies the unique identifier of the permission grant policy. - -## Parameters - -### -Id - -The unique identifier of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) - -[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) - -[Set-EntraPermissionGrantPolicy](Set-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md deleted file mode 100644 index b35076fe82..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: Remove-EntraPolicy -description: This article provides details on the Remove-EntraPolicy command. - -ms.topic: reference -ms.date: 07/16/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPolicy -schema: 2.0.0 ---- - -# Remove-EntraPolicy - -## Synopsis - -Removes a policy. - -## Syntax - -```powershell -Remove-EntraPolicy - -Id - [] -``` - -## Description - -The `Remove-EntraPolicy` cmdlet removes a policy from Microsoft Entra ID. Specify `Id` parameter to remove a specific policy. - -## Examples - -### Example 1: Remove a policy - -```powershell -Connect-Entra -Scopes 'Policy.Read.ApplicationConfiguration' -Remove-EntraPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -``` - -This command removes the specified policy from Microsoft Entra ID. - -- `-Id` - specifies the ID of the policy you want to remove. - -## Parameters - -### -Id - -The Id of the policy you want to remove. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPolicy](Get-EntraPolicy.md) - -[New-EntraPolicy](New-EntraPolicy.md) - -[Set-EntraPolicy](Set-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md deleted file mode 100644 index dce8b479ed..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Remove-EntraTrustedCertificateAuthority -description: This article provides details on the Remove-EntraTrustedCertificateAuthority command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority - -schema: 2.0.0 ---- - -# Remove-EntraTrustedCertificateAuthority - -## Synopsis - -Removes a trusted certificate authority. - -## Syntax - -```powershell -Remove-EntraTrustedCertificateAuthority - -CertificateAuthorityInformation - [] -``` - -## Description - -The `Remove-EntraTrustedCertificateAuthority` cmdlet removes a trusted certificate authority from Microsoft Entra ID. - -## Examples - -### Example 1: Remove the trusted certificate authorities that are defined in your directory - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object -Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] -``` - -```Output -Id --- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command deletes the trusted certificate authorities that are defined in your directory. - -- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. -It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. - -## Parameters - -### -CertificateAuthorityInformation - -Specifies a CertificateAuthorityInformation object. - -```yaml -Type: CertificateAuthorityInformation -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) - -[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) - -[Set-EntraTrustedCertificateAuthority](Set-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md deleted file mode 100644 index f508974760..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.md +++ /dev/null @@ -1,241 +0,0 @@ ---- -title: Set-EntraAuthorizationPolicy -description: This article provides details on the Set-EntraAuthorizationPolicy command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy - -schema: 2.0.0 ---- - -# Set-EntraAuthorizationPolicy - -## Synopsis - -Updates an authorization policy. - -## Syntax - -```powershell -Set-EntraAuthorizationPolicy - [-BlockMsolPowerShell ] - [-AllowedToSignUpEmailBasedSubscriptions ] - [-AllowEmailVerifiedUsersToJoinOrganization ] - [-DisplayName ] - [-Description ] - [-DefaultUserRolePermissions ] - [-AllowedToUseSSPR ] - [] -``` - -## Description - -The `Set-EntraAuthorizationPolicy` cmdlet updates a Microsoft Entra ID authorization policy. - -For delegated scenarios, the user needs to have the `Privileged Role Administrator` Microsoft Entra role. - -## Examples - -### Example 1: Update an authorization policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' -$params = @{ - DisplayName = 'Updated displayName' - Description = 'Updated Description' - BlockMsolPowerShell = $true - AllowedToUseSSPR = $false - AllowEmailVerifiedUsersToJoinOrganization = $true - AllowedToSignUpEmailBasedSubscriptions = $true -} - -Set-EntraAuthorizationPolicy @params -``` - -This example demonstrates how to update a Microsoft Entra ID authorization policy. - -### Example 2: Update DefaultUserRolePermissions of authorization policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' -$DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions -$DefaultUserRolePermissions.AllowedToCreateApps = $false -$DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $false -$DefaultUserRolePermissions.AllowedToReadOtherUsers = $false -Set-EntraAuthorizationPolicy -DefaultUserRolePermissions $DefaultUserRolePermissions -``` - -This example demonstrates how to update a DefaultUserRolePermissions of authorization policy in Microsoft Entra ID. - -## Parameters - -### -AllowedToSignUpEmailBasedSubscriptions - -Specifies whether users can sign up for email based subscriptions. -The initial default value is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowedToUseSSPR - -Specifies whether the Self-Serve Password Reset feature can be used by users on the tenant. -The initial default value is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AllowEmailVerifiedUsersToJoinOrganization - -Specifies whether a user can join the tenant by email validation. -The initial default value is true. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -BlockMsolPowerShell - -Specifies whether the user-based access to the legacy service endpoint used by Microsoft Online PowerShell is blocked or not. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -allowUserConsentForRiskyApps - -Indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -allowInvitesFrom - -Indicates who can invite external users to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. Everyone is the default setting for all cloud environments except US Government. - -```yaml -Type: allowInvitesFrom -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultUserRolePermissions - -Contains various customizable default user role permissions. - -```yaml -Type: DefaultUserRolePermissions -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies the description of the authorization policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the authorization policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions - -## Outputs - -## Notes - -## Related Links - -[Get-EntraAuthorizationPolicy](Get-EntraAuthorizationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md deleted file mode 100644 index 1c140af2d6..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -title: Set-EntraConditionalAccessPolicy -description: This article provides details on the Set-EntraConditionalAccessPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy - -schema: 2.0.0 ---- - -# Set-EntraConditionalAccessPolicy - -## Synopsis - -Updates a conditional access policy in Microsoft Entra ID by Id. - -## Syntax - -```powershell -Set-EntraConditionalAccessPolicy - -PolicyId - [-Conditions ] - [-GrantControls ] - [-DisplayName ] - [-Id ] - [-State ] - [-SessionControls ] - [] -``` - -## Description - -This cmdlet allows an admin to update a conditional access policy in Microsoft Entra ID by Id. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Update a conditional access policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$cond = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet -$control = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls -$session = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls -$params = @{ - PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' - DisplayName = 'MFA policy updated' - State = 'Enabled' - Conditions = $cond - GrantControls = $control - SessionControls = $session -} - -Set-EntraConditionalAccessPolicy @params -``` - -The example shows how to update a conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of conditional access policy. -- `-DisplayName` parameter specifies the display name of a conditional access policy. -- `-State` parameter specifies the enabled or disabled state of the conditional access policy. -- `-Conditions` parameter specifies the conditions for the conditional access policy. -- `-GrantControls` parameter specifies the controls for the conditional access policy. -- `-SessionControls` parameter Enables limited experiences within specific cloud applications. - -### Example 2: Update display name for a conditional access policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$params = @{ - PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' - DisplayName = 'MFA policy updated' -} - -Set-EntraConditionalAccessPolicy @params -``` - -This command updates a conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of conditional access policy. -- `-DisplayName` parameter specifies the display name of a conditional access policy. - -### Example 3: Update the state for a conditional access policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$params = @{ - PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' - State = 'Enabled' -} - -Set-EntraConditionalAccessPolicy @params -``` - -This command updates a conditional access policy in Microsoft Entra ID. - -- `-PolicyId` parameter specifies the Id of conditional access policy. -- `-State` parameter specifies the enabled or disabled state of the conditional access policy. - -## Parameters - -### -PolicyId - -Specifies the policy Id of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State - -Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Conditions - -Specifies the conditions for the conditional access policy in Microsoft Entra ID. - -```yaml -Type: ConditionalAccessConditionSet -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GrantControls - -Specifies the controls for the conditional access policy in Microsoft Entra ID. - -```yaml -Type: ConditionalAccessGrantControls -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the policy Id of a conditional access policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SessionControls - -Enables limited experiences within specific cloud applications. - -```yaml -Type: ConditionalAccessSessionControls -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraConditionalAccessPolicy](Get-EntraConditionalAccessPolicy.md) - -[New-EntraConditionalAccessPolicy](New-EntraConditionalAccessPolicy.md) - -[Remove-EntraConditionalAccessPolicy](Remove-EntraConditionalAccessPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md deleted file mode 100644 index 9f60eb62da..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.md +++ /dev/null @@ -1,231 +0,0 @@ ---- -title: Set-EntraFeatureRolloutPolicy -description: This article provides details on the Set-EntraFeatureRolloutPolicy command. - - -ms.topic: reference -ms.date: 07/16/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy -schema: 2.0.0 ---- - -# Set-EntraFeatureRolloutPolicy - -## Synopsis - -Allows an admin to modify the policy for cloud authentication roll-out in Microsoft Entra ID. - -## Syntax - -```powershell -Set-EntraFeatureRolloutPolicy - [-Feature ] - [-IsEnabled ] - -Id - [-IsAppliedToOrganization ] - [-AppliesTo ] - [-Description ] - [-DisplayName ] - [] -``` - -## Description - -An admin uses the `Set-EntraFeatureRolloutPolicy` cmdlet to modify the cloud authentication rollout policy. - -This includes specifying whether the method for cloud authentication is Pass-through Authentication or Password Hash Synchronization, and whether Seamless Single Sign-On (SSO) is enabled. - -Users in groups assigned to the policy will start authenticating using the new method and Seamless SSO, if it is specified. - -## Examples - -### Example 1: Updates the policy for cloud authentication roll-out in Microsoft Entra ID - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' - DisplayName = 'Feature-Rollout-Policytest' - IsEnabled = $false -} -Set-EntraFeatureRolloutPolicy @params -``` - -This command updates the policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Id` - specifies the ID of cloud authentication roll-out policy. -- `-DisplayName` - specifies the display name of the cloud authentication roll-out policy. -- `-IsEnabled` - specifies the status of cloud authentication roll-out policy. - -### Example 2: Updates the Description - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Description = 'Feature-Rollout-test' -} -Set-EntraFeatureRolloutPolicy @params -``` - -This command updates the `-Description` of policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Id` Specify the ID of cloud authentication roll-out policy. -- `-Description` Specifies the description of the cloud authentication roll-out policy. - -### Example 3: Updates the IsAppliedToOrganization - -```powershell -Connect-Entra -Scopes 'Directory.ReadWrite.All' -$params = @{ - Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' - IsAppliedToOrganization = $false -} -Set-EntraFeatureRolloutPolicy @params -``` - -This command updates the `-IsAppliedToOrganization` parameter of policy for cloud authentication roll-out in Microsoft Entra ID. - -- `-Id` Specify the ID of cloud authentication roll-out policy. -- `-IsAppliedToOrganization` Parameter determines whether a particular feature rollout policy should be applied to the entire organization or not. - -## Parameters - -### -Id - -The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the cloud authentication roll-out policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Feature - -Specifies a feature assigned to the cloud authentication roll-out policy. - -Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. - -```yaml -Type: FeatureEnum -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsEnabled - -Specifies the status of cloud authentication roll-out policy. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Description - -Specifies the description of the cloud authentication roll-out policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AppliesTo - -Specifies a list of Microsoft Entra ID objects that is assigned to the feature. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsAppliedToOrganization - -Specifies if the cloud authentication roll-out policy applied to the entire organization. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraFeatureRolloutPolicy](New-EntraFeatureRolloutPolicy.md) - -[Get-EntraFeatureRolloutPolicy](Get-EntraFeatureRolloutPolicy.md) - -[Remove-EntraFeatureRolloutPolicy](Remove-EntraFeatureRolloutPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md deleted file mode 100644 index 557f8d8cee..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.md +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: Set-EntraIdentityProvider -description: This article provides details on the Set-EntraIdentityProvider command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraIdentityProvider - -schema: 2.0.0 ---- - -# Set-EntraIdentityProvider - -## Synopsis - -Update the properties of an existing identity provider configured in the directory. - -## Syntax - -```powershell -Set-EntraIdentityProvider - -IdentityProviderBaseId - [-Type ] - [-ClientSecret ] - [-ClientId ] - [-Name ] - [] -``` - -## Description - -The `Set-EntraIdentityProvider` cmdlet is used to update the properties of an existing identity provider. - -The type of the identity provider can't be modified. - -## Examples - -### Example 1: Update client id of an identity provider - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -$params = @{ - IdentityProviderBaseId = 'Google-OAuth' - ClientId = 'NewClientID' -} -Set-EntraIdentityProvider @params -``` - -This example updates the client ID for the specified identity provider. - -- `-Id` parameter specifies the unique identifier of the identity provider. -- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. - -### Example 2: Update client secret of an identity provider - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -$params = @{ - IdentityProviderBaseId = 'Google-OAuth' - ClientSecret = 'NewClientSecret' -} -Set-EntraIdentityProvider @params -``` - -This example updates the client secret for the specified identity provider. - -- `-Id` parameter specifies the unique identifier of the identity provider. -- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. - -### Example 3: Update display name of an identity provider - -```powershell -Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' -$params = @{ - IdentityProviderBaseId = 'Google-OAuth' - Name = 'NewGoogleName' -} -Set-EntraIdentityProvider @params -``` - -This example updates the display name for the specified identity provider. - -- `-Id` parameter specifies the unique identifier of the identity provider. -- `-Name` parameter specifies the display name of the identity provider. - -## Parameters - -### -ClientId - -The client identifier for the application, obtained during the application's registration with the identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientSecret - -The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentityProviderBaseId -The unique identifier for an identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: Id - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Name - -The display name of the identity provider. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. - -For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[New-EntraIdentityProvider](New-EntraIdentityProvider.md) - -[Remove-EntraIdentityProvider](Remove-EntraIdentityProvider.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md deleted file mode 100644 index 4f55ee4639..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.md +++ /dev/null @@ -1,258 +0,0 @@ ---- -title: Set-EntraNamedLocationPolicy -description: This article provides details on the Set-EntraNamedLocationPolicy command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy - -schema: 2.0.0 ---- - -# Set-EntraNamedLocationPolicy - -## Synopsis - -Updates a named location policy in Microsoft Entra ID by PolicyId. - -## Syntax - -```powershell -Set-EntraNamedLocationPolicy - -PolicyId - [-OdataType ] - [-IpRanges ] - [-IncludeUnknownCountriesAndRegions ] - [-IsTrusted ] - [-DisplayName ] - [-Id ] - [-CountriesAndRegions ] - [] -``` - -## Description - -This cmdlet allows an admin to update a named location policy in Microsoft Entra ID by PolicyId. - -Conditional access policies are custom rules that define an access scenario. - -## Examples - -### Example 1: Update an IP named location policy in Microsoft Entra ID by PolicyId - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} -$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange -$ipRanges.cidrAddress = '6.5.4.3/32' -$params = @{ - PolicyId = $policy.Id - OdataType = '#microsoft.graph.ipNamedLocation' - IsTrusted = $false - IncludeUnknownCountriesAndRegions = $false - IpRanges = $ipRanges -} -Set-EntraNamedLocationPolicy @params -``` - -This example shows how to update an IP named location policy in Microsoft Entra ID by PolicyId. - -- `-PolicyId` parameter specifies the Id of a named location policy. -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-DisplayName` parameter specifies the display name of a named location policy. -- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. -- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. - -### Example 2: Update a country named location policy in Microsoft Entra ID by PolicyId - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} -$params = @{ - PolicyId = $policy.Id - OdataType = '#microsoft.graph.countryNamedLocation' - IncludeUnknownCountriesAndRegions = $true -} -Set-EntraNamedLocationPolicy @params -``` - -This command updates a country named location policy in Microsoft Entra ID by PolicyId. - -- `-PolicyId` parameter specifies the Id of a named location policy. -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. - -### Example 3: Update display name of a named location policy in Microsoft Entra ID by PolicyId - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' -$policy = Get-EntraNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} -$params = @{ - PolicyId = $policy.Id - OdataType = '#microsoft.graph.ipNamedLocation' - DisplayName = 'NewName' -} -Set-EntraNamedLocationPolicy @params -``` - -This command updates display name of named location policy in Microsoft Entra ID by PolicyId. - -- `-PolicyId` parameter specifies the Id of a named location policy. -- `-OdataType` parameter specifies the odata type of a named location policy. -- `-DisplayName` parameter specifies the display name of a named location policy. - -## Parameters - -### -PolicyId - -Specifies the ID of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OdataType - -Specifies the OData type of a named location policy object in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IpRanges - -List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsTrusted - -Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CountriesAndRegions - -Specifies the countries and regions for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IncludeUnknownCountriesAndRegions - -Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the Id of a named location policy in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraNamedLocationPolicy](Get-EntraNamedLocationPolicy.md) - -[New-EntraNamedLocationPolicy](New-EntraNamedLocationPolicy.md) - -[Remove-EntraNamedLocationPolicy](Remove-EntraNamedLocationPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md deleted file mode 100644 index 45e4ecc72a..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.md +++ /dev/null @@ -1,309 +0,0 @@ ---- -title: Set-EntraPermissionGrantConditionSet -description: This article provides details on the Set-EntraPermissionGrantConditionSet command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet - -schema: 2.0.0 ---- - -# Set-EntraPermissionGrantConditionSet - -## Synopsis - -Update an existing Microsoft Entra ID permission grant condition set. - -## Syntax - -```powershell -Set-EntraPermissionGrantConditionSet - -ConditionSetType - -Id - -PolicyId - [-Permissions ] - [-ClientApplicationTenantIds ] - [-ClientApplicationIds ] - [-ResourceApplication ] - [-PermissionType ] - [-PermissionClassification ] - [-ClientApplicationsFromVerifiedPublisherOnly ] - [-ClientApplicationPublisherIds ] - [] -``` - -## Description - -Updates a Microsoft Entra ID permission grant condition set object identified by Id. - -## Examples - -### Example 1: Update a permission grant condition set to includes permissions that is classified as low - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'includes' - Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' - PermissionClassification = 'low' -} - -Set-EntraPermissionGrantConditionSet @params -``` - -This command updates sets the specified permission grant set to classify as low. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-Id` parameter specifies the unique identifier of a permission grant condition set object. -- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. - -### Example 2: Update a permission grant condition set - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$permissionGrantPolicyId = 'policy1' -$params = @{ - PolicyId = $permissionGrantPolicyId - ConditionSetType = 'includes' - Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' - PermissionType = 'delegated' - PermissionClassification = 'low' - ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' - Permissions = @('All') - ClientApplicationIds = @('All') - ClientApplicationTenantIds = @('All') - ClientApplicationPublisherIds = @('All') - ClientApplicationsFromVerifiedPublisherOnly = $true -} - -Set-EntraPermissionGrantConditionSet @params -``` - -This command updates sets the specified permission grant set. - -- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. -- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. -- `-Id` parameter specifies the unique identifier of a permission grant condition set object. -- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. -- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. -- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. -- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. -- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. -- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. -- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. -- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. - -## Parameters - -### -PolicyId - -The unique identifier of a Microsoft Entra ID permission grant policy object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ConditionSetType - -The value indicates whether the condition sets are included in the policy or excluded. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Id - -The unique identifier of a Microsoft Entra ID permission grant condition set object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PermissionType - -Specific type of permissions (application, delegated) to scope consent operation down to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PermissionClassification - -Specific classification (all, low, medium, high) to scope consent operation down to. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Permissions - -The identifier of the resource application to scope consent operation down to. -It could be @("All") or a list of permission IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationIds - -The set of client application IDs to scope consent operation down to. -It could be @("All") or a list of client application IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationTenantIds - -The set of client application tenant IDs to scope consent operation down to. -It could be @("All") or a list of client application tenant IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationPublisherIds - -The set of client applications publisher IDs to scope consent operation down to. -It could be @("All") or a list of client application publisher IDs. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ClientApplicationsFromVerifiedPublisherOnly - -A value indicates whether to only includes client applications from verified publishers. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceApplication - -The identifier of the resource application to scope consent operation down to. -It could be "Any" or a specific resource application ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### String - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantConditionSet](New-EntraPermissionGrantConditionSet.md) - -[Get-EntraPermissionGrantConditionSet](Get-EntraPermissionGrantConditionSet.md) - -[Remove-EntraPermissionGrantConditionSet](Remove-EntraPermissionGrantConditionSet.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md deleted file mode 100644 index db649bc8da..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: Set-EntraPermissionGrantPolicy -description: This article provides details on the Set-EntraPermissionGrantPolicy command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy - -schema: 2.0.0 ---- - -# Set-EntraPermissionGrantPolicy - -## Synopsis - -Updates a permission grant policy. - -## Syntax - -```powershell -Set-EntraPermissionGrantPolicy - -Id - [-DisplayName ] - [-Description ] - [] -``` - -## Description - -The `Set-EntraPermissionGrantPolicy` command updates a Microsoft Entra ID permission grant policy. - -## Examples - -### Example 1: Update description of permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} -$params = @{ - Id = $policy.Id - Description = 'Updated description' -} - -Set-EntraPermissionGrantPolicy @params -``` - -This command updates the description of the specified permission grant policy. - -- `-Id` parameter specifies the unique identifier of the permission grant policy. -- `-Description` parameter specifies the description for the permission grant policy. - -### Example 2: Update display name of permission grant policy - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' -$policy = Get-EntraPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} -$params = @{ - Id = $policy.Id - DisplayName = 'Updated DisplayName' -} - -Set-EntraPermissionGrantPolicy @params -``` - -This command updates the display name of the specified permission grant policy. - -- `-Id` parameter specifies the unique identifier of the permission grant policy. -- `-DisplayName` parameter specifies the display name for the permission grant policy. - -## Parameters - -### -Description - -Specifies the description of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -Specifies the unique identifier of the permission grant policy. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraPermissionGrantPolicy](New-EntraPermissionGrantPolicy.md) - -[Get-EntraPermissionGrantPolicy](Get-EntraPermissionGrantPolicy.md) - -[Remove-EntraPermissionGrantPolicy](Remove-EntraPermissionGrantPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md deleted file mode 100644 index 9f5e238eb2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -title: Set-EntraPolicy -description: This article provides details on the Set-EntraPolicy command. - -ms.topic: reference -ms.date: 07/22/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: -schema: 2.0.0 ---- - -# Set-EntraPolicy - -## Synopsis - -Updates a policy. - -## Syntax - -```powershell -Set-EntraPolicy - -Id - [-Definition ] - [-DisplayName ] - [-Type ] - [-IsOrganizationDefault ] - [] -``` - -## Description - -The `Set-EntraPolicy` cmdlet sets a policy in Microsoft Entra ID. Specify `Id` parameter to updates specific policy. - -## Examples - -### Example 1: Update a policy display name - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - DisplayName = 'NewUpdated' -} -Set-EntraPolicy @params -``` - -This command updates display name of the specified policy in Microsoft Entra ID. - -- `-Id` specifies the ID of the policy for which you want to set values. - -- `DisplayName` specifies the display name. - -### Example 2: Update a policy definition - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') -} -Set-EntraPolicy @params -``` - -This command updates definition of the specified policy in Microsoft Entra ID. - -- `-Id` specifies the ID of the policy for which you want to set values. - -- `Definition` specifies the array of stringified JSON that contains all the rules of the policy. -In this example, `@('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}')` represents definition of the activityBasedTimeoutPolicy. - -### Example 3: Update a policy organization default - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - IsOrganizationDefault = $false -} -Set-EntraPolicy @params -``` - -This command updates organization default of the specified policy in Microsoft Entra ID. - -- `-Id` specifies the ID of the policy for which you want to set values. - -- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. - -### Example 4: Update policy type - -```powershell -Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' -$params = @{ - Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Type = 'ActivityBasedTimeoutPolicy' -} -Set-EntraPolicy @params -``` - -This example demonstrates how to update the `type` property of a specified policy in Microsoft Entra ID. - -- `-Id` specifies the ID of the policy for which you want to set values. - -- `-Type` specifies the type of policy. In this example, `ActivityBasedTimeoutPolicy` represents the type of policy. - -## Parameters - -### -Definition - -Specifies the array of stringified JSON that contains all the rules of the policy. -For example -Definition @('{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}'). - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsOrganizationDefault - -True if this policy is the organizational default. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Type - -Specifies the type of policy. -For token lifetimes, use "TokenLifetimePolicy." - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Id - -The ID of the policy for which you want to set values. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraPolicy](Get-EntraPolicy.md) - -[New-EntraPolicy](New-EntraPolicy.md) - -[Remove-EntraPolicy](Remove-EntraPolicy.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md deleted file mode 100644 index cdfdb92eaf..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: Set-EntraTrustedCertificateAuthority -description: This article provides details on the Set-EntraTrustedCertificateAuthority command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority - -schema: 2.0.0 ---- - -# Set-EntraTrustedCertificateAuthority - -## Synopsis - -Updates a trusted certificate authority. - -## Syntax - -```powershell -Set-EntraTrustedCertificateAuthority - -CertificateAuthorityInformation -``` - -## Description - -The `Set-EntraTrustedCertificateAuthority` cmdlet updates a trusted certificate authority in Microsoft Entra ID. - -## Examples - -### Example 1: Updates the trusted certificate authorities that are defined in your directory - -```powershell -Connect-Entra -Scopes 'Organization.ReadWrite.All' -$cer = Get-EntraTrustedCertificateAuthority #Get the CertificateAuthorityInformation object -$cer[0].CrlDistributionPoint = "https://example.crl" -Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] -``` - -```Output -Id --- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This command updates the trusted certificate authorities that are defined in your directory. - -- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. - -## Parameters - -### -CertificateAuthorityInformation - -Specifies a CertificateAuthorityInformation object. - -```yaml -Type: CertificateAuthorityInformation -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraTrustedCertificateAuthority](Get-EntraTrustedCertificateAuthority.md) - -[New-EntraTrustedCertificateAuthority](New-EntraTrustedCertificateAuthority.md) - -[Remove-EntraTrustedCertificateAuthority](Remove-EntraTrustedCertificateAuthority.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md deleted file mode 100644 index b463aa7035..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUser.md +++ /dev/null @@ -1,426 +0,0 @@ ---- -title: Get-EntraUser -description: This article provides details on the Get-EntraUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUser - -schema: 2.0.0 ---- - -# Get-EntraUser - -## Synopsis - -Gets a user. - -## Syntax - -### GetQuery (Default) - -```powershell -Get-EntraUser - [-Filter ] - [-All] - [-Top ] - [-Property ] - [] -``` - -### GetByValue - -```powershell -Get-EntraUser - [-SearchString ] - [-All] - [-Property ] - [] -``` - -### GetById - -```powershell -Get-EntraUser - -UserId - [-All] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUser` cmdlet gets a user from Microsoft Entra ID. - -## Examples - -### Example 1: Get top three users - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -Top 3 -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -Angel Brown cccccccc-2222-3333-4444-dddddddddddd AngelB@contoso.com AngelB@contoso.com -Avery Smith dddddddd-3333-4444-5555-eeeeeeeeeeee AveryS@contoso.com AveryS@contoso.com -Sawyer Miller eeeeeeee-4444-5555-6666-ffffffffffff SawyerM@contoso.com SawyerM@contoso.com -``` - -This example demonstrates how to get top three users from Microsoft Entra ID. - -### Example 2: Get a user by ID - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -UserId 'SawyerM@contoso.com' -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc sawyerm@tenant.com sawyerm@tenant.com -``` - -This command gets the specified user. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. - -### Example 3: Search among retrieved users - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -SearchString 'New' -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -New User88 bbbbbbbb-1111-2222-3333-cccccccccccc demo99@tenant.com -New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com -``` - -This cmdlet gets all users that match the value of SearchString against the first characters in DisplayName or UserPrincipalName. - -### Example 4: Get a user by userPrincipalName - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -Filter "userPrincipalName eq 'SawyerM@contoso.com'" -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -Sawyer Miller cccccccc-2222-3333-4444-dddddddddddd SawyerM@contoso.com -``` - -This command gets the specified user. - -### Example 5: Get a user by MailNickname - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -Filter "startswith(MailNickname,'Ada')" -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -Mark Adams bbbbbbbb-1111-2222-3333-cccccccccccc Adams@contoso.com Adams@contoso.com -``` - -In this example, we retrieve all users whose MailNickname starts with Ada. - -### Example 6: Get SignInActivity of a User - -```powershell -Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All' -Get-EntraUser -UserId 'SawyerM@contoso.com' -Property 'SignInActivity' | Select-Object -ExpandProperty 'SignInActivity' -``` - -```Output -lastNonInteractiveSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa -lastSignInRequestId : cccccccc-2222-3333-4444-dddddddddddd -lastSuccessfulSignInDateTime : 9/9/2024 1:12:13 PM -lastNonInteractiveSignInDateTime : 9/9/2024 1:12:13 PM -lastSuccessfulSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa -lastSignInDateTime : 9/7/2024 9:15:41 AM -``` - -This example demonstrates how to retrieve the SignInActivity of a specific user by selecting a property. - -### Example 7: List users with disabled accounts - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUser -Filter "accountEnabled eq false" | Select-Object DisplayName, Id, Mail, UserPrincipalName -``` - -```Output -DisplayName Id Mail UserPrincipalName ------------ -- ---- ----------------- -New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com -``` - -This example demonstrates how to retrieve all users with disabled accounts. - -### Example 8: List users based in a specific country - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$usersInCanada = Get-EntraUser -Filter "Country eq 'Canada'" -$usersInCanada | Select-Object Id, DisplayName, UserPrincipalName, OfficeLocation, Country | Format-Table -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName OfficeLocation Country --- ----------- ----------------- -------------- ------- -cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com 23/2102 Canada -``` - -This example demonstrates how to retrieve all users based in Canada. - -### Example 9: List user count per department - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$departmentCounts = Get-EntraUser -All | Group-Object -Property Department | Select-Object Name, @{Name="MemberCount"; Expression={$_.Count}} -$departmentCounts | Format-Table Name, MemberCount -AutoSize -``` - -```Output -Name MemberCount ----- ----------- - 7 -Engineering 2 -Executive Management 1 -Finance 1 -HR 1 -``` - -This example demonstrates how to retrieve user count in each department. - -### Example 10: List disabled users with active licenses - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$disabledUsersWithLicenses = Get-EntraUser -Filter "accountEnabled eq false" -All | Where-Object { - $_.AssignedLicenses -ne $null -and $_.AssignedLicenses.Count -gt 0 -} -$disabledUsersWithLicenses | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled | Format-Table -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName AccountEnabled --- ----------- ----------------- -------------- -cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com False -``` - -This example demonstrates how to retrieve disabled users with active licenses. - -### Example 11: Retrieve guest users with active licenses - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All -$guestUsersWithLicenses = foreach ($guest in $guestUsers) { - if ($guest.AssignedLicenses.Count -gt 0) { - [pscustomobject]@{ - Id = $guest.Id - DisplayName = $guest.DisplayName - UserPrincipalName = $guest.UserPrincipalName - AssignedLicenses = ($guest.AssignedLicenses | ForEach-Object { $_.SkuId }) -join ", " - } - } -} -$guestUsersWithLicenses | Format-Table Id, DisplayName, UserPrincipalName, AssignedLicenses -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName AssignedLicenses --- ----------- ----------------- ---------------- -cccccccc-2222-3333-4444-dddddddddddd Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com c42b9cae-ea4f-4ab7-9717-81576235ccac -``` - -This example demonstrates how to retrieve guest users with active licenses. - -### Example 12: Retrieve users without managers - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$allUsers = Get-EntraUser -All -$usersWithoutManagers = foreach ($user in $allUsers) { - $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue - if (-not $manager) { - [pscustomobject]@{ - Id = $user.Id - DisplayName = $user.DisplayName - UserPrincipalName = $user.UserPrincipalName - } - } -} -$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName --- ----------- ----------------- -cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com -bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com -``` - -This example demonstrates how to retrieve users without managers. - -### Example 13: List failed sign-ins for a user - -```powershell -Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' -$failedSignIns = Get-EntraAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" -$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize -``` - -This example demonstrates how to retrieve failed sign-ins for a user. - -### Example 14: List all guest users - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$guestUsers = Get-EntraUser -Filter "userType eq 'Guest'" -All -$guestUsers | Select-Object DisplayName, UserPrincipalName, Id, createdDateTime, creationType, accountEnabled, UserState | Format-Table -AutoSize -``` - -```Output -DisplayName UserPrincipalName Id CreatedDateTime CreationType AccountEnabled UserState ------------ ----------------- -- --------------- ------------ -------------- --------- -Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com bbbbbbbb-1111-2222-3333-cccccccccccc 9/13/2024 6:37:33 PM Invitation True Accepted -``` - -This example demonstrates how to retrieve list all guest users. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter - -Specifies an OData v4.0 filter statement. -This parameter controls which objects are returned. -Details on querying with OData can be [found here](https://learn.microsoft.com/graph/aad-advanced-queries?tabs=powershell). - -```yaml -Type: System.String -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID (as a User Principal Name (UPN) or UserId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: GetById -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -SearchString - -Specifies a search string. - -```yaml -Type: System.String -Parameter Sets: GetValue -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: GetQuery -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[New-EntraUser](New-EntraUser.md) - -[Remove-EntraUser](Remove-EntraUser.md) - -[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md deleted file mode 100644 index 5ad745b39b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.md +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: Get-EntraUserAppRoleAssignment -description: This article provides details on the Get-EntraUserAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment - -schema: 2.0.0 ---- - -# Get-EntraUserAppRoleAssignment - -## Synopsis - -Get a user application role assignment. - -## Syntax - -```powershell -Get-EntraUserAppRoleAssignment - -ObjectId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserAppRoleAssignment` cmdlet gets a user application role assignment. - -## Examples - -### Example 1: Get a user application role assignment - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' -$UserId = (Get-EntraUser -Top 1).ObjectId -Get-EntraUserAppRoleAssignment -ObjectId $UserId -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 - 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 - 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 - 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 - -``` - -This example retrieves a user application role assignment for the user in $UserId. You can use the command `Get-EntraUser` to get Service principal Object ID. - -- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). - -### Example 2: Get all application role assignments - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' -Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -All -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 - 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 - 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 - 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 -``` - -This example demonstrates how to retrieve all application role assignment for the specified user. - -- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). - -### Example 3: Get top two application role assignments - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' -Get-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -Top 2 -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 - 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 -``` - -This example demonstrates how to retrieve top two application role assignment for the specified user. - -- `-ObjectId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) - -[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md deleted file mode 100644 index 56eb9c60b5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: Get-EntraUserCreatedObject -description: This article provides details on the Get-EntraUserCreatedObject Command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserCreatedObject - -schema: 2.0.0 ---- - -# Get-EntraUserCreatedObject - -## Synopsis - -Get objects created by the user. - -## Syntax - -```powershell -Get-EntraUserCreatedObject - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserCreatedObject` cmdlet gets objects created by a user in Microsoft Entra ID. - -## Examples - -### Example 1: Get a user-created object - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -``` - -This example retrieves an object created by the specified user. - -- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). - -### Example 2: Get all user-created objects - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -eeeeeeee-4444-5555-6666-ffffffffffff -``` - -This example retrieves all objects created by the specified user. - -- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). - -### Example 3: Get a top one user-created object - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserCreatedObject -UserId 'SawyerM@contoso.com' -Top 1 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -``` - -This example retrieves top one object created by the specified user. - -- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md deleted file mode 100644 index 0a4ea05e0b..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -title: Get-EntraUserDirectReport -description: This article provides details on the Get-EntraUserDirectReport command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserDirectReport - -schema: 2.0.0 ---- - -# Get-EntraUserDirectReport - -## Synopsis - -Get the user's direct reports. - -## Syntax - -```powershell -Get-EntraUserDirectReport - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserDirectReport` cmdlet gets the direct reports for a user in Microsoft Entra ID. Specify `UserId` parameter gets the direct reports for a user. - -## Examples - -### Example 1: Get a user's direct reports - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -``` - -This example demonstrates how to retrieve direct reports for a user in Microsoft Entra ID. - -- `-UserId` Parameter specifies the ID of a user (UserPrincipalName or UserId). - -### Example 2: Get all direct reports - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example demonstrates how to retrieve all direct reports for a user in Microsoft Entra ID. - -- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). - -### Example 3: Get a top two direct reports - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserDirectReport -UserId 'SawyerM@contoso.com' -Top 2 -``` - -```Output -Id DeletedDateTime --- --------------- -bbbbbbbb-1111-2222-3333-cccccccccccc -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -``` - -This example demonstrates how to retrieve top five direct reports for a user in Microsoft Entra ID. - -- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user's UserPrincipalName or UserId in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md deleted file mode 100644 index 96b66cd878..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -title: Get-EntraUserExtension -description: This article provides details on the Get-EntraUserExtension command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserExtension - -schema: 2.0.0 ---- - -# Get-EntraUserExtension - -## Synopsis - -Gets a user extension. - -## Syntax - -```powershell -Get-EntraUserExtension - -UserId - [-Property ] - [] -``` - -## Description - -The Get-EntraUserExtension cmdlet gets a user extension in Microsoft Entra ID. - -## Examples - -### Example 1: Retrieve extension attributes for a user - -```powershell -Connect-Entra -Scopes 'User.Read' -$UserId = (Get-EntraUser -ObjectId 'SawyerM@contoso.com').ObjectId -Get-EntraUserExtension -UserId $UserId -``` - -```Output -onPremisesDistinguishedName : -@odata.context : https://graph.microsoft.com/v1.0/$metadata#users(identities,onPremisesDistinguishedName,employeeId,createdDateTime)/$entity -createdDateTime : 18/07/2024 05:13:40 -employeeId : -identities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} -userIdentities : {@{signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com; issuer=SawyerM@contoso.com}} -``` - -This example shows how to retrieve the extension attributes for a specified user. You can use the command `Get-EntraUser` to get user object Id. - -- `-UserId` parameter specifies the user object Id. - -## Parameters - -### -UserId - -Specifies the ID of an object. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[Remove-EntraUserExtension](Remove-EntraUserExtension.md) - -[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md deleted file mode 100644 index 6dbad40666..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Get-EntraUserLicenseDetail -description: This article provides details on the Get-EntraUserLicenseDetail command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail - -schema: 2.0.0 ---- - -# Get-EntraUserLicenseDetail - -## Synopsis - -Retrieves license details for a user. - -## Syntax - -```powershell -Get-EntraUserLicenseDetail - -UserId - [-Property ] - [] -``` - -## Description - -This cmdlet retrieves license details for a user. - -## Examples - -### Example 1: Retrieve user license details - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserLicenseDetail -UserId 'SawyerM@contoso.com' -``` - -```Output -Id SkuId SkuPartNumber --- ----- ------------- -X8Wu1RItQkSNL8zKldQ5DiH6ThjDmF1OlavQcFOpbmc aaaaaaaa-0b0b-1c1c-2d2d-333333333333 INFORMATION_PROTECTION_COMPLIANCE -X8Wu1RItQkSNL8zKldQ5Dk8SXrDMx6BFpqqM94yUaWg bbbbbbbb-1c1c-2d2d-3e3e-444444444444 EMSPREMIUM -X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERPRISEPREMIUM -``` - -This example demonstrates how to retrieve license details for a user from Microsoft Entra ID. - -## Parameters - -### -UserId - -The object ID of the user for which the license details are retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -## Outputs - -### System.Object - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md deleted file mode 100644 index a72d6f6ddb..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserManager.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -title: Get-EntraUserManager -description: This article provides details on the Get-EntraUserManager command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserManager - -schema: 2.0.0 ---- - -# Get-EntraUserManager - -## Synopsis - -Gets the manager of a user. - -## Syntax - -```powershell -Get-EntraUserManager - -UserId - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserManager` cmdlet gets the manager of a user in Microsoft Entra ID. Specify -`UserId` parameter to get the specific manager of user. - -## Examples - -### Example 1: Get the manager of a user - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserManager -UserId 'SawyerM@contoso.com' -``` - -```Output -DeletedDateTime : -Id : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee -@odata.context : https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity -@odata.type : #microsoft.graph.user -accountEnabled : True -businessPhones : {+1 858 555 0109} -city : San Diego -createdDateTime : 2023-07-07T14:18:05Z -country : United States -department : Sales & Marketing -displayName : Sawyer Miller -``` - -This example demonstrates how to retrieve the manager of a specific user. - -- `-UserId` Parameter specifies UserId or User Principal Name of User. - -### Example 2: Retrieve users without managers - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$allUsers = Get-EntraUser -All -$usersWithoutManagers = foreach ($user in $allUsers) { - $manager = Get-EntraUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue - if (-not $manager) { - [pscustomobject]@{ - Id = $user.Id - DisplayName = $user.DisplayName - UserPrincipalName = $user.UserPrincipalName - } - } -} -$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize -``` - -```Output -Id DisplayName UserPrincipalName --- ----------- ----------------- -cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com -bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com -``` - -This example demonstrates how to retrieve users without managers. - -## Parameters - -### -UserId - -The unique identifier of a user in Microsoft Entra ID (User Principal Name or UserId). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Remove-EntraUserManager](Remove-EntraUserManager.md) - -[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md deleted file mode 100644 index 0f685737af..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.md +++ /dev/null @@ -1,218 +0,0 @@ ---- -title: Get-EntraUserMembership -description: This article provides details on the Get-EntraUserMembership command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserMembership - -schema: 2.0.0 ---- - -# Get-EntraUserMembership - -## Synopsis - -Get user memberships. - -## Syntax - -```powershell -Get-EntraUserMembership - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserMembership` cmdlet gets user memberships in Microsoft Entra ID. - -## Examples - -### Example 1: Get user memberships - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -22cc22cc-dd33-ee44-ff55-66aa66aa66aa -33dd33dd-ee44-ff55-aa66-77bb77bb77bb -44ee44ee-ff55-aa66-bb77-88cc88cc88cc -55ff55ff-aa66-bb77-cc88-99dd99dd99dd -``` - -This example demonstrates how to retrieve user memberships in Microsoft Entra ID. - -### Example 2: Get user memberships with additional details - -```powershell -Connect-Entra -Scopes 'User.Read' -$userMemberships = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' -$membershipDetails = $userMemberships | ForEach-Object { - $membershipDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id - [PSCustomObject]@{ - odataType = $membershipDetail.'@odata.type' - displayName = $membershipDetail.displayName - Id = $membershipDetail.Id - } -} -$membershipDetails | Select-Object odataType, displayName, Id -``` - -```Output -odataType displayName Id ---------- ----------- -- -#microsoft.graph.group Contoso Group 33dd33dd-ee44-ff55-aa66-77bb77bb77bb -#microsoft.graph.group Helpdesk Group 55ff55ff-aa66-bb77-cc88-99dd99dd99dd -#microsoft.graph.directoryRole Attribute Assignment Reader 22cc22cc-dd33-ee44-ff55-66aa66aa66aa -#microsoft.graph.directoryRole Attribute Definition Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff -``` - -This example demonstrates how to retrieve user memberships in Microsoft Entra ID with more lookup details. - -### Example 3: Get All memberships - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -22cc22cc-dd33-ee44-ff55-66aa66aa66aa -33dd33dd-ee44-ff55-aa66-77bb77bb77bb -44ee44ee-ff55-aa66-bb77-88cc88cc88cc -55ff55ff-aa66-bb77-cc88-99dd99dd99dd -``` - -This example demonstrates how to retrieve users all memberships in Microsoft Entra ID. - -### Example 4: Get top three memberships - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserMembership -UserId 'SawyerM@contoso.com' -Top 3 -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -22cc22cc-dd33-ee44-ff55-66aa66aa66aa -``` - -This example demonstrates how to retrieve users top three memberships in Microsoft Entra ID. - -### Example 5: List groups that Sawyer Miller is a member of - -```powershell -Connect-Entra -Scopes 'User.Read.All' -$groups = Get-EntraUserMembership -ObjectId 'SawyerM@contoso.com' -$groups | Select-Object DisplayName, Id, GroupTypes, Visibility | Format-Table -AutoSize -``` - -```Output -DisplayName Id GroupTypes Visibility ------------ -- ---------- ---------- -Contoso Group bbbbbbbb-1111-2222-3333-cccccccccccc {Unified} Public -``` - -This example demonstrates how to retrieve the groups that a user is a member of. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a User Principal Name or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md deleted file mode 100644 index b69676b2e5..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.md +++ /dev/null @@ -1,201 +0,0 @@ ---- -title: Get-EntraUserOAuth2PermissionGrant -description: This article provides details on the Get-EntraUserOAuth2PermissionGrant command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant - -schema: 2.0.0 ---- - -# Get-EntraUserOAuth2PermissionGrant - -## Synopsis - -Gets an oAuth2PermissionGrant object. - -## Syntax - -```powershell -Get-EntraUserOAuth2PermissionGrant - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for the specified user in Microsoft Entra ID. Specify `UserId` parameter to retrieve an oAuth2PermissionGrant object. - -In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation. - -- Application Administrator -- Application Developer -- Cloud Application Administrator -- Directory Writers -- Privileged Role Administrator -- User Administrator -- Directory Readers -- Global Reader -- Guest Inviter - -## Examples - -### Example 1: Retrieve the OAuth2 permission grants for a user - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -``` - -```Output -Id ClientId ConsentType ExpiryTime --- -------- ----------- ---------- -HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... -9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... -``` - -This example retrieves the OAuth2 permission grants for a user using the ObjectId parameter. Use the `Get-EntraUser` cmdlet to obtain the `UserId` value. - -### Example 2: Retrieve the OAuth2 permission grants for a user using object ID parameter - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -``` - -```Output -Id ClientId ConsentType ExpiryTime --- -------- ----------- ---------- -HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... -9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... -``` - -This example retrieves the OAuth2 permission grants for a user using object ID parameter. - -- `-UserId` parameter specifies the user ID. - -### Example 3: Retrieve the OAuth2 permission grants for a user using All parameter - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id ClientId ConsentType ExpiryTime --- -------- ----------- ---------- -HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... -9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... -``` - -This example retrieves the OAuth2 permission grants for a user using All parameter. - -- `-ObjectId` parameter specifies the user ID. - -### Example 4: Retrieve top one OAuth2 permission grant - -```powershell -Connect-Entra -Scopes 'Directory.Read.All' -Get-EntraUserOAuth2PermissionGrant -ObjectId 'SawyerM@contoso.com' -Top 1 -``` - -```Output -Id ClientId ConsentType ExpiryTime --- -------- ----------- ---------- -HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... -``` - -This Example Retrieve top one the OAuth2 permission grant in Microsoft Entra ID. - -- `-UserId` parameter specifies the user ID. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID (as a User Principal Name or ObjectId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md deleted file mode 100644 index b6f4ade3c7..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: Get-EntraUserOwnedDevice -description: This article provides details on the Get-EntraUserOwnedDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice - -schema: 2.0.0 ---- - -# Get-EntraUserOwnedDevice - -## Synopsis - -Get registered devices owned by a user. - -## Syntax - -```powershell -Get-EntraUserOwnedDevice - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserOwnedDevice` cmdlet gets registered devices owned by the specified user in Microsoft Entra ID. - -## Examples - -### Example 1: Get devices owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -``` - -```Output -ObjectId DeviceId DisplayName --------- -------- ----------- -bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 -cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 -``` - -This command gets the registered devices owned by the specified user. - -### Example 2: Get all devices owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -All -``` - -```Output -ObjectId DeviceId DisplayName --------- -------- ----------- -bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 -cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 -``` - -This command gets all the registered devices owned by the specified user. - -### Example 3: Get top one device owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserOwnedDevice -UserId 'SawyerM@contoso.com' -Top 1 -``` - -```Output -ObjectId DeviceId DisplayName --------- -------- ----------- -bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 -``` - -This command gets top one registered device owned by the specified user. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md deleted file mode 100644 index cc4f9de59d..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.md +++ /dev/null @@ -1,208 +0,0 @@ ---- -title: Get-EntraUserOwnedObject -description: This article provides details on the Get-EntraUserOwnedObject command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedObject - -schema: 2.0.0 ---- - -# Get-EntraUserOwnedObject - -## Synopsis - -Get objects owned by a user. - -## Syntax - -```powershell -Get-EntraUserOwnedObject - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserOwnedObject` cmdlet gets objects owned by a user in Microsoft Entra ID. Specify `UserId` parameter to get objects owned by user. - -## Examples - -### Example 1: Get objects owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -hhhhhhhh-5555-6666-7777-iiiiiiiiiiii -``` - -This example retrieves objects owned by the specified user. - -- `-UserId` Parameter specifies the ID of a user as a UserPrincipalName or UserId. - -### Example 2: Get objects owned by a user with additional details - -```powershell -Connect-Entra -Scopes 'User.Read' -$ownedObjects = Get-EntraUserOwnedObject -ObjectId 'SawyerM@contoso.com' - -$objectDetails = $ownedObjects | ForEach-Object { - $objectDetail = Get-EntraObjectByObjectId -ObjectIds $_.Id - [PSCustomObject]@{ - odataType = $objectDetail.'@odata.type' - displayName = $objectDetail.displayName - Id = $objectDetail.Id - } -} -$objectDetails | Format-Table -Property odataType, displayName, Id -AutoSize -``` - -```Output -odataType displayName Id ---------- ----------- -- -#microsoft.graph.group Contoso FTE Group bbbbbbbb-1111-2222-3333-cccccccccccc -#microsoft.graph.group Digital Engineering Group aaaaaaaa-1111-1111-1111-000000000000 -``` - -This example retrieves objects owned by the specified user with more lookup details. - -### Example 3: Get all objects owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -dddddddd-3333-4444-5555-eeeeeeeeeeee -ffffffff-4444-5555-6666-gggggggggggg -hhhhhhhh-5555-6666-7777-iiiiiiiiiiii -``` - -This example retrieves all the objects owned by the specified user. - -- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. - -### Example 4: Get top three objects owned by a user - -```powershell -Connect-Entra -Scopes 'User.Read' -Get-EntraUserOwnedObject -UserId 'SawyerM@contoso.com' -Top 3 -``` - -```Output -Id DeletedDateTime --- --------------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -bbbbbbbb-1111-2222-3333-cccccccccccc -cccccccc-2222-3333-4444-dddddddddddd -``` - -This example retrieves the top three objects owned by the specified user. - -- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies the maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md deleted file mode 100644 index c58d964a67..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -title: Get-EntraUserRegisteredDevice -description: This article provides details on the Get-EntraUserRegisteredDevice command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice - -schema: 2.0.0 ---- - -# Get-EntraUserRegisteredDevice - -## Synopsis - -Get devices registered by a user. - -## Syntax - -```powershell -Get-EntraUserRegisteredDevice - -UserId - [-All] - [-Top ] - [-Property ] - [] -``` - -## Description - -The `Get-EntraUserRegisteredDevice` cmdlet gets devices registered by a user in Microsoft Entra ID. - -## Examples - -### Example 1: Get registered devices - -```Powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -``` - -This command gets the devices that are registered to the specified user. - -### Example 2: Get all registered devices - -```Powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -All -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -11bb11bb-cc22-dd33-ee44-55ff55ff55ff -``` - -This command gets all the devices that are registered to the specified user. - -### Example 3: Get one registered device - -```Powershell -Connect-Entra -Scopes 'User.Read.All' -Get-EntraUserRegisteredDevice -UserId 'SawyerM@contoso.com' -Top 1 -``` - -```Output -Id DeletedDateTime --- --------------- -00aa00aa-bb11-cc22-dd33-44ee44ee44ee -``` - -This command gets the top one device that are registered to the specified user. - -## Parameters - -### -All - -List all pages. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Top - -Specifies The maximum number of records to return. - -```yaml -Type: System.Int32 -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md deleted file mode 100644 index 3514e4f4ac..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: Get-EntraUserThumbnailPhoto -description: This article provides details on the Get-EntraUserThumbnailPhoto command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto - -schema: 2.0.0 ---- - -# Get-EntraUserThumbnailPhoto - -## Synopsis - -Retrieve the thumbnail photo of a user. - -## Syntax - -```powershell -Get-EntraUserThumbnailPhoto - -UserId - [-Property ] - [] -``` - -## Description - -Retrieve the thumbnail photo of a user. - -## Examples - -### Example 1: Retrieve thumbnail photo by Id - -```powershell -Connect-Entra -Scopes 'User.Read','User.Read.All' -Get-EntraUserThumbnailPhoto -UserId 'SawyerM@contoso.com' -``` - -```Output -Id Height Width --- ------ ----- -default 292 278 -``` - -This example shows how to retrieve the thumbnail photo of a user that is specified through the value of the UserId parameter. - -- `-UserId` parameter specifies the user for which the thumbnail photo is retrieved. - -## Parameters - -### -UserId - -The object ID of the user for which the thumbnail photo is retrieved. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Property - -Specifies properties to be returned - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.Boolean - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Set-EntraUserThumbnailPhoto](Set-EntraUserThumbnailPhoto.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md deleted file mode 100644 index 62a06bd347..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUser.md +++ /dev/null @@ -1,816 +0,0 @@ ---- -title: New-EntraUser -description: This article provides details on the New-EntraUser command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUser - -schema: 2.0.0 ---- - -# New-EntraUser - -## Synopsis - -Creates a Microsoft Entra ID user. - -## Syntax - -```powershell -New-EntraUser - -DisplayName - -AccountEnabled - -PasswordProfile - [-City ] - [-UserStateChangedOn ] - [-CompanyName ] - [-PreferredLanguage ] - [-FacsimileTelephoneNumber ] - [-GivenName ] - [-Mobile ] - [-UsageLocation ] - [-PostalCode ] - [-AgeGroup ] - [-CreationType ] - [-ExtensionProperty ] - [-ConsentProvidedForMinor ] - [-MailNickName ] - [-ImmutableId ] - [-Country ] - [-SignInNames ] - [-Department ] - [-PasswordPolicies ] - [-JobTitle ] - [-IsCompromised ] - [-UserState ] - [-UserType ] - [-OtherMails ] - [-PhysicalDeliveryOfficeName ] - [-UserPrincipalName ] - [-State ] - [-StreetAddress ] - [-TelephoneNumber ] - [-Surname ] - [-ShowInAddressList ] - [] -``` - -## Description - -The `New-EntraUser` cmdlet creates a user in Microsoft Entra ID. Specify the `DisplayName`,`AccountEnabled`, and `PasswordProfile` parameter to create a user. - -## Examples - -### Example 1: Create a user using MailNickName parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' -$userParams = @{ - DisplayName = 'Avery Iona' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'AveryI@contoso.com' - AccountEnabled = $true - MailNickName = 'averyi' -} - -New-EntraUser @userParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Avery Iona AveryI@contoso.com Member -``` - -This command creates a new user. - -### Example 2: Create a user using AgeGroup parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' - -$userParams = @{ - DisplayName = 'Peyton Davis' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'PeytonD@contoso.com' - AccountEnabled = $true - MailNickName = 'PeytonD' - AgeGroup = 'adult' -} - -New-EntraUser @userParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -bbbbbbbb-1111-2222-3333-cccccccccccc Peyton Davis PeytonD@contoso.com Member -``` - -This command creates a new user. - -### Example 3: Create a user using City parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' - -$userParams = @{ - DisplayName = 'Blake Martin' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'BlakeM@contoso.com' - AccountEnabled = $true - MailNickName = 'BlakeM' - City = 'New York' -} - -New-EntraUser @userParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -cccccccc-2222-3333-4444-dddddddddddd Blake Martin BlakeM@contoso.com Member -``` - -This command creates a new user. - -### Example 4: Create a user using Department parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' -$userParams = @{ - DisplayName = 'Parker Jones' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'ParkerJ@contoso.com' - AccountEnabled = $true - MailNickName = 'ParkerJ' - Department = 'IT' -} - -New-EntraUser @userParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -dddddddd-3333-4444-5555-eeeeeeeeeeee Parker Jones ParkerJ@contoso.com Member -``` - -This command creates a new user. - -### Example 5: Create a user using Mobile parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile -$PasswordProfile.Password = '' - -$UserParams = @{ - DisplayName = 'Sawyer Miller' - PasswordProfile = $PasswordProfile - UserPrincipalName = 'SawyerM@contoso.com' - AccountEnabled = $true - MailNickName = 'SawyerM' - Mobile = '+18989898989' -} - -New-EntraUser @UserParams -``` - -```Output -ObjectId DisplayName UserPrincipalName UserType --------- ----------- ----------------- -------- -eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com Member -``` - -This command creates a new user. - -## Parameters - -### -AccountEnabled - -Indicates whether the user's account is enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -City - -Specifies the user's city. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Country - -Specifies the user's country. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CreationType - -Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. -Possible values are "LocalAccount" and null. - -- When user creating a local account, the property is required and you must set it to "LocalAccount". -- When user creating a work or school account, don't specify the property or set it to null. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Department - -Specifies the user's department. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the user's display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExtensionProperty - -Add data to custom user properties as the basic **open extensions** or the more versatile **schema extensions**. - -```yaml -Type: System.Collections.Generic.Dictionary`2[System.String,System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GivenName - -Specifies the user's given name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ImmutableId - -This property is used to associate an on-premises user account to their Microsoft Entra ID user object. -This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. - -Important: The $ and _ characters can't be used when specifying this property. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IsCompromised - -Indicates whether this user is compromised. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JobTitle - -Specifies the user's job title. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailNickName - -Specifies the user's mail nickname. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Mobile - -Specifies the user's mobile phone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -OtherMails - -A list of other email addresses for the user; for example: "", "". - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordPolicies - -Specifies password policies for the user. -This value is an enumeration with one possible value being "DisableStrongPassword", which allows weaker passwords than the default policy to be specified. -"DisablePasswordExpiration" can also be specified. -The two might be specified together; for example: "DisablePasswordExpiration, DisableStrongPassword". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordProfile - -Specifies the user's password profile. - -The parameter type for this parameter is "PasswordProfile". - -In order to pass a parameter of this type, you first need to create a variable in PowerShell with that type: - -$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile - -Then you can proceed to set the value of the password in this variable: - -$PasswordProfile.Password = "\" - -And finally you can pass this variable to the cmdlet: - -New-EntraUser -PasswordProfile $PasswordProfile ... - -Other attributes that can be set in the PasswordProfile are - -- $PasswordProfile.EnforceChangePasswordPolicy - a boolean indicating that the change password policy is enababled or disabled for this user $PasswordProfile. - -- ForceChangePasswordNextLogin - a boolean indicating that the user must change the password at the next sign in. - -```yaml -Type: PasswordProfile -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PhysicalDeliveryOfficeName - -Specifies the user's physical delivery office name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PostalCode - -Specifies the user's postal code. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PreferredLanguage - -Specifies the user's preferred language. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ShowInAddressList - -If True, show this user in the address list. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignInNames - -Specifies the collection of sign-in names for a local account in a Microsoft Entra ID B2C tenant. - -Each sign-in name must be unique across the company/tenant. - -The property must be specified when you create a local account user; don't specify it when you create a work or school account. - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State - -Specifies the user's state. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -StreetAddress - -Specifies the user's street address. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Surname - -Specifies the user's surname. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TelephoneNumber - -Specifies a telephone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UsageLocation - -A two letter country code (ISO standard 3166). - -Required for users that are assigned licenses due to legal requirement to check for availability of services in countries. - -Examples include: "US", "JP", and "GB". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserPrincipalName - -The user principal name (UPN) of the user. - -The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. - -By convention, this UPN should map to the user's email name. - -The general format is "alias@domain". - -For work or school accounts, the domain must be present in the tenant's collection of verified domains. - -This property is required when a work or school account is created; it's optional for local accounts. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserType - -A string value that can be used to classify user types in your directory, such as "Member" and "Guest". - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -FacsimileTelephoneNumber - -Specifies the user's telephone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AgeGroup - -Specifies the user's age group. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CompanyName - -Specifies the user's company name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConsentProvidedForMinor - -Sets whether consent was obtained for minors. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserState - -For an external user invited to the tenant using the invitation API, this property represents the invited user's -invitation status. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserStateChangedOn - -Shows the timestamp for the latest change to the userState property. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[Remove-EntraUser](Remove-EntraUser.md) - -[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md deleted file mode 100644 index 3ede3eecff..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: New-EntraUserAppRoleAssignment -description: This article provides details on the New-EntraUserAppRoleAssignment command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment - -schema: 2.0.0 ---- - -# New-EntraUserAppRoleAssignment - -## Synopsis - -Assigns a user to an application role. - -## Syntax - -```powershell -New-EntraUserAppRoleAssignment - -ObjectId - -PrincipalId - -Id - -ResourceId - [] -``` - -## Description - -The `New-EntraUserAppRoleAssignment` cmdlet assigns a user to an application role in Microsoft Entra ID. - -To grant an app role assignment to a user, you need three identifiers: - -- PrincipalId: The Id of the user to whom you are assigning the app role. - -- ResourceId: The Id of the resource servicePrincipal that has defined the app role. - -- Id: The Id of the appRole (defined on the resource service principal) to assign to the user. - -## Examples - -### Example 1: Assign a user to an application without roles - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$appId = (Get-EntraApplication -SearchString '').AppId -$user = Get-EntraUser -SearchString '' -$servicePrincipal = Get-EntraServicePrincipal -Filter "appId eq '$appId'" - -$params = @{ - ObjectId = $user.ObjectId - PrincipalId = $user.ObjectId - ResourceId = $servicePrincipal.ObjectId - Id = [Guid]::Empty -} - -New-EntraUserAppRoleAssignment @params -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - - A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 18-06-2024 11:22:40 UserPrincipalName aaaaaaaa-bbbb-cccc-1111-222222222222 User App-DisplayName -``` - -This command assigns a user to an application that doesn't have any roles. -You can use the command `Get-EntraUser` to get user object Id. -You can use the command `Get-EntraApplication` to get application Id. -You can use the command `Get-EntraServicePrincipal` to get service principal object Id. - -- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. -- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. -- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. -- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. - -### Example 2: Assign a user to a specific role within an application - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$userName = 'SawyerM@contoso.com' -$appName = 'Box' -$spo = Get-EntraServicePrincipal -Filter "DisplayName eq '$appName'" -$user = Get-EntraUser -Filter "userPrincipalName eq '$userName'" - -$params = @{ - ObjectId = $user.ObjectId - PrincipalId = $user.ObjectId - ResourceId = $spo.ObjectId - Id = $spo.AppRoles[1].Id -} - -New-EntraUserAppRoleAssignment @params -``` - -```Output -DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ---------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- - A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 06/18/2024 09:47:00 Sawyer Miller 1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 User Box -``` - -This example demonstrates how to assign a user to an application role in Microsoft Entra ID. -You can use the command `Get-EntraUser` to get user object Id. -You can use the command `Get-EntraServicePrincipal` to get service principal object Id. - -- `-ObjectId` parameter specifies the Id of a user to whom you are assigning the app role. -- `-PrincipalId` parameter specifies the Id of a user to whom you are assigning the app role. -- `-ResourceId` parameter specifies the Id of a resource servicePrincipal that has defined the app role. -- `-Id` parameter specifies the Id of a appRole (defined on the resource service principal) to assign to the user. - -## Parameters - -### -Id - -The ID of the app role to assign. - -If application doesn't have any roles while creating new app role assignment then provide an empty guid, or the Id of the role to assign to the user. - -You can retrieve the application's roles by examining the application object's AppRoles property: - -`Get-EntraApplication -SearchString 'Your-Application-DisplayName' | select Approles | Format-List` - -This cmdlet returns the list of roles that are defined in an application: - -AppRoles: {GUID1, GUID2} - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID of the user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID to which the new app role is to be assigned. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -PrincipalId - -The object ID of the principal to which the new app role is assigned. - -When assigning a new role to a user, provide the object ID of the user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceId - -The object ID of the Service Principal for the application to which the user role is assigned. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) - -[Remove-EntraUserAppRoleAssignment](Remove-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md deleted file mode 100644 index 77c8786f2f..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUser.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: Remove-EntraUser -description: This article provides details on the Remove-EntraUser command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUser - -schema: 2.0.0 ---- - -# Remove-EntraUser - -## Synopsis - -Removes a user. - -## Syntax - -```powershell -Remove-EntraUser - -UserId - [] -``` - -## Description - -The `Remove-EntraUser` cmdlet removes a user in Microsoft Entra ID. Specify the `UserId` parameter to remove the specified user in Microsoft Entra ID. - -The calling user must be assigned at least one of the following Microsoft Entra roles: - -- User Administrator - -- Privileged Authentication Administrator - -## Examples - -### Example 1: Remove a user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -Remove-EntraUser -UserId 'SawyerM@Contoso.com' -``` - -This command removes the specified user in Microsoft Entra ID. - -## Parameters - -### -UserId - -Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[New-EntraUser](New-EntraUser.md) - -[Set-EntraUser](Set-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md deleted file mode 100644 index 4a7f77cbf2..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Remove-EntraUserAppRoleAssignment -description: This article provides details on the Remove-EntraUserAppRoleAssignment command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment - -schema: 2.0.0 ---- - -# Remove-EntraUserAppRoleAssignment - -## Synopsis - -Removes a user application role assignment. - -## Syntax - -```powershell -Remove-EntraUserAppRoleAssignment - -AppRoleAssignmentId - -ObjectId - [] -``` - -## Description - -The `Remove-EntraUserAppRoleAssignment` cmdlet removes a user application role assignment in Microsoft Entra ID. - -## Examples - -### Example 1: Remove user app role assignment - -```powershell -Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' -$RemoveAppRoleParams = @{ - ObjectId = 'SawyerM@Contoso.com' - AppRoleAssignmentId = 'C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w' -} -Remove-EntraUserAppRoleAssignment @RemoveAppRoleParams -``` - -This example demonstrates how to Remove the user app role assignment in Microsoft Entra ID. - -- `-ObjectId` parameter specifies the user ID. -- `-AppRoleAssignmentId` parameter specifies the application role assignment ID. - -Use the `Get-EntraUserAppRoleAssignment` cmdlet to get `AppRoleAssignmentId` details. - -## Parameters - -### -AppRoleAssignmentId - -Specifies the ID of an application role assignment. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies the ID (as a UserPrincipleName or ObjectId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUserAppRoleAssignment](Get-EntraUserAppRoleAssignment.md) - -[New-EntraUserAppRoleAssignment](New-EntraUserAppRoleAssignment.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md deleted file mode 100644 index 7e0aae2e20..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Remove-EntraUserExtension -description: This article provides details on the Remove-EntraUserExtension command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserExtension - -schema: 2.0.0 ---- - -# Remove-EntraUserExtension - -## Synopsis - -Removes a user extension. - -## Syntax - -### SetMultiple - -```powershell -Remove-EntraUserExtension - -ObjectId - -ExtensionNames - [] -``` - -### SetSingle - -```powershell -Remove-EntraUserExtension - -ObjectId - -ExtensionName - [] -``` - -## Description - -The `Remove-EntraUserExtension` cmdlet removes a user extension from Microsoft Entra ID. Specify `ObjectId` and `ExtensionNames` parameters to remove a user extension. - -## Examples - -### Example 1: Remove the user extension - -```powershell -$Params = @{ - ObjectId = 'SawyerM@Contoso.com' - ExtensionName = 'Test Extension' -} -Remove-EntraUserExtension @Params -``` - -This example demonstrates how to remove a user extension from Microsoft Entra ID. - -- `ObjectId` parameter specifies the user Object ID. -- `ExtensionName` parameter specifies the user ExtentionName. - -## Parameters - -### -ExtensionName - -Specifies the name of an extension. - -```yaml -Type: System.String -Parameter Sets: SetSingle -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ExtensionNames - -Specifies an array of extension names. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: SetMultiple -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ObjectId - -Specifies an object ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUserExtension](Get-EntraUserExtension.md) - -[Set-EntraUserExtension](Set-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md deleted file mode 100644 index 9d2fac8aa1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Remove-EntraUserManager -description: This article provides details on the Remove-EntraUserManager command. - - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserManager - -schema: 2.0.0 ---- - -# Remove-EntraUserManager - -## Synopsis - -Removes a user's manager. - -## Syntax - -```powershell -Remove-EntraUserManager - -UserId -``` - -## Description - -The `Remove-EntraUserManager` cmdlet removes a user's manager in Microsoft Entra ID. Specify the `UserId` parameter to remove the manager for a user in Microsoft Entra ID. - -## Examples - -### Example 1: Remove the manager of a user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$User = Get-EntraUser -UserId 'SawyerM@Contoso.com' -Remove-EntraUserManager -UserId $User.ObjectId -``` - -This example shows how to remove a user's manager. - -You can use `Get-EntraUser` command to get the user's details. - -## Parameters - -### -UserId - -Specifies the ID of a user (as a User Principle Name or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related links - -[Get-EntraUserManager](Get-EntraUserManager.md) - -[Set-EntraUserManager](Set-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md deleted file mode 100644 index 16500c0669..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUser.md +++ /dev/null @@ -1,677 +0,0 @@ ---- -title: Set-EntraUser -description: This article provides details on the Set-EntraUser command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUser - -schema: 2.0.0 ---- - -# Set-EntraUser - -## Synopsis - -Updates a user. - -## Syntax - -```powershell -Set-EntraUser - -UserId - [-PostalCode ] - [-CompanyName ] - [-GivenName ] - [-Mobile ] - [-PreferredLanguage ] - [-CreationType ] - [-UsageLocation ] - [-UserType ] - [-AgeGroup ] - [-MailNickName ] - [-ExtensionProperty ] - [-ConsentProvidedForMinor ] - [-ImmutableId ] - [-Country ] - [-SignInNames ] - [-Department ] - [-StreetAddress ] - [-PasswordPolicies ] - [-JobTitle ] - [-City ] - [-OtherMails ] - [-UserPrincipalName ] - [-DisplayName ] - [-AccountEnabled ] - [-PasswordProfile ] - [-State ] - [-TelephoneNumber ] - [-Surname ] - [-ShowInAddressList ] - [] -``` - -## Description - -The `Set-EntraUser` cmdlet updates a user in Microsoft Entra ID. Specify the `UserId` parameter to update a user in Microsoft Entra ID. - -## Examples - -### Example 1: Update a user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' -$user = Get-EntraUser -UserId 'SawyerM@contoso.com' -$params = @{ - UserId = $user.Id - DisplayName = 'Updated user Name' -} -Set-EntraUser @params -``` - -This example updates the specified user's Display name parameter. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. - -### Example 2: Set the specified user's AccountEnabled parameter - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' -$params = @{ - UserId = 'SawyerM@contoso.com' - AccountEnabled = $true -} -Set-EntraUser @params -``` - -This example updates the specified user's AccountEnabled parameter. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-AccountEnabled` Specifies whether the account is enabled. - -### Example 3: Set all but specified users as minors with parental consent - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' -Get-EntraUser -All | Where-Object -FilterScript { $_.DisplayName -notmatch '(George|James|Education)' } | -ForEach-Object { Set-EntraUser -UserId $($_.ObjectId) -AgeGroup 'minor' -ConsentProvidedForMinor 'granted' } -``` - -This example updates the specified user's as minors with parental consent. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-ConsentProvidedForMinor` Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. - -### Example 4: Set the specified user's property - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' -$params = @{ - UserId = 'SawyerM@contoso.com' - City = 'Add city name' - CompanyName = 'Microsoft' - Country = 'Add country name' - Department = 'Add department name' - GivenName = 'Mircosoft' - ImmutableId = '#1' - JobTitle = 'Manager' - MailNickName = 'Add mailnickname' - Mobile = '9984534564' - OtherMails = 'test12@M365x99297270.OnMicrosoft.com' - PasswordPolicies = 'DisableStrongPassword' - State = 'UP' - StreetAddress = 'Add address' - UserType = 'Member' -} -Set-EntraUser @params -``` - -This example updates the specified user's property. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-UserType` classify user types in your directory, such as "Member" and "Guest." -- `-PasswordPolicies` Specifies password policies for the user. -- `-OtherMails` Specifies other email addresses for the user - -### Example 5: Set the specified user's PasswordProfile parameter - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$params= @{ -UserId = 'SawyerM@contoso.com' -PasswordProfile = @{ - Password= '*****' - ForceChangePasswordNextLogin = $true - EnforceChangePasswordPolicy = $false - } -} -Set-EntraUser @params -``` - -This example updates the specified user's PasswordProfile parameter. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-PasswordProfile` specifies the user's password profile. - -### Example 6: Set user's usage location for license assignment - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -Set-EntraUser -UserId 'SawyerM@contoso.com' -UsageLocation 'US' -``` - -This example updates the specified user's Usage Location for license management. - -- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. -- `-UsageLocation` specifies the user's usage location. Two-letter ISO 3166 country code. Required for licensed users to check service availability. Examples: US, JP, GB. Not nullable. - -## Parameters - -### -AccountEnabled - -Indicates whether the account is enabled. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -City - -Specifies the user's city. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Country - -Specifies the user's country. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CreationType - -Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. -Possible values are "LocalAccount" and null. -When creating a local account, the property is required and you must set it to "LocalAccount". -When creating a work or school account, don't specify the property or set it to null. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Department - -Specifies the user's department. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DisplayName - -Specifies the user's display name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ExtensionProperty - -Add data to custom user properties as the basic open extensions or the more versatile schema extensions. - -```yaml -Type: System.Collections.Generic.Dictionary`2[System.String,System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -GivenName - -Specifies the user's given name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ImmutableId - -This property links an on-premises Active Directory user account to its Microsoft Entra ID user object. You must specify this property when creating a new user account in Graph if the user's userPrincipalName uses a federated domain. - -Important: Do not use the $ and _ characters when specifying this property. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JobTitle - -Specifies the user's job title. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -MailNickName - -Specifies a nickname for the user's mail address. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Mobile - -Specifies the user's mobile phone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserId -Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -OtherMails - -Specifies other email addresses for the user. - -```yaml -Type: System.Collections.Generic.List`1[System.String] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordPolicies - -Specifies password policies for the user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PasswordProfile - -Specifies the user's password profile. - -```yaml -Type: PasswordProfile -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PostalCode - -Specifies the user's postal code. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PreferredLanguage - -Specifies the user's preferred language. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ShowInAddressList - -Set to True to show this user in the address list. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SignInNames - -The list of sign in names for this user - -```yaml -Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -State - -Specifies the user's state. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -StreetAddress - -Specifies the user's street address. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Surname - -Specifies the user's surname. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -TelephoneNumber - -Specifies the user's telephone number. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UsageLocation - -A two letter country or region code (ISO standard 3166). Required for users that assigned licenses due to legal requirement to check for availability of services in country and regions. Examples include: "US," "JP," and "GB." Not nullable. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserPrincipalName - -Specifies the user's user principal name. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -UserType - -A string value that can be used to classify user types in your directory, such as "Member" and "Guest." - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AgeGroup - -Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, minor, notAdult, and adult. See, [legal-age-group](https://learn.microsoft.com/graph/api/resources/user#legal-age-group-property-definitions). - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -CompanyName - -The company name, which the user is associated. This property can be useful for describing the company that an external user comes from. The maximum length of the company name is 64 characters. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ConsentProvidedForMinor - -Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related links - -[Get-EntraUser](Get-EntraUser.md) - -[New-EntraUser](New-EntraUser.md) - -[Remove-EntraUser](Remove-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md deleted file mode 100644 index 82ec532e91..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: Set-EntraUserExtension -description: This article provides details on the Set-EntraUserExtension command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserExtension - -schema: 2.0.0 ---- - -# Set-EntraUserExtension - -## Synopsis - -Sets a user extension. - -## Syntax - -```powershell -Set-EntraUserExtension - -UserId - [] -``` - -## Description - -The `Set-EntraUserExtension` cmdlet updates a user extension in Microsoft Entra ID. - -## Examples - -### Example 1: Set the value of an extension attribute for a user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$params = @{ - UserId = 'SawyerM@contoso.com' - ExtensionName = 'extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8' - ExtensionValue = 'New Value' -} -Set-EntraUserExtension @params -``` - -This example shows how to update the value of the extension attribute for a specified user. - -- `-UserId` parameter specifies the user Id. -- `-ExtensionName` parameter specifies the name of an extension. -- `-ExtensionValue` parameter specifies the extension name values. - -## Parameters - -### -UserId - -Specifies the ID of the user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) - -[Get-EntraUserExtension](Get-EntraUserExtension.md) - -[Remove-EntraUserExtension](Remove-EntraUserExtension.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md deleted file mode 100644 index ff516e1557..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -title: Set-EntraUserLicense -description: This article provides details on the Set-EntraUserLicense command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserLicense - -schema: 2.0.0 ---- - -# Set-EntraUserLicense - -## Synopsis - -Adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. - -## Syntax - -```powershell -Set-EntraUserLicense - -UserId - -AssignedLicenses - [] -``` - -## Description - -The `Set-EntraUserLicense` adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. - -For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. - -- Directory Writers -- License Administrator -- User Administrator - -**Note**: Before assigning a license, assign a usage location to the user using: -`Set-EntraUser -ObjectId user@contoso.com -UsageLocation ''`. - -## Examples - -### Example 1: Add a license to a user based on a template user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$LicensedUser = Get-EntraUser -ObjectId 'TemplateUser@contoso.com' -$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense -$License.SkuId = $LicensedUser.AssignedLicenses.SkuId -$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses -$Licenses.AddLicenses = $License -$Params = @{ - UserId = 'SawyerM@contoso.com' - AssignedLicenses = $Licenses -} -Set-EntraUserLicense @Params -``` - -```Output -Name Value ----- ----- -externalUserStateChangeDateTi… -businessPhones {8976546787} -postalCode 444601 -createdDateTime 06-11-2023 04:48:19 -surname KTETSs -jobTitle Manager -employeeType -otherMails {SawyerM@contoso.com} -isResourceAccount -usageLocation DE -legalAgeGroupClassification Adult -id cccccccc-2222-3333-4444-dddddddddddd -isLicenseReconciliationNeeded False -``` - -This example demonstrates how to assign a license to a user based on a template user. - -- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). -- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. - -### Example 2: Add a license to a user by copying license from another user - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$LicensedUser = Get-EntraUser -ObjectId 'AdeleV@contoso.com' -$User = Get-EntraUser -ObjectId 'SawyerM@contoso.com' -$License1 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense -$License1.SkuId = $LicensedUser.AssignedLicenses.SkuId[0] -$License2 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense -$License2.SkuId = $LicensedUser.AssignedLicenses.SkuId[1] -$addLicensesArray = @() -$addLicensesArray += $License1 -$addLicensesArray += $License2 -$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses -$Licenses.AddLicenses = $addLicensesArray -Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses -``` - -```Output -Name Value ----- ----- -externalUserStateChangeDateTi… -businessPhones {8976546787} -postalCode 444601 -createdDateTime 06-11-2023 04:48:19 -surname KTETSs -jobTitle Manager -employeeType -otherMails {SawyerM@contoso.com} -isResourceAccount -usageLocation DE -legalAgeGroupClassification Adult -id cccccccc-2222-3333-4444-dddddddddddd -isLicenseReconciliationNeeded False -``` - -This example demonstrates how to assign a license to a user by copying license from another user. - -- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). -- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. - -### Example 3: Remove an assigned User's License - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$UserPrincipalName = 'SawyerM@contoso.com' -$User = Get-EntraUser -ObjectId $UserPrincipalName -$SkuId = (Get-EntraUserLicenseDetail -ObjectId $UserPrincipalName).SkuId -$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses -$Licenses.RemoveLicenses = $SkuId -Set-EntraUserLicense -UserId $User.ObjectId -AssignedLicenses $Licenses -``` - -```Output -Name Value ----- ----- -displayName SawyerM -id cccccccc-2222-3333-4444-dddddddddddd -jobTitle -surname M -mail -userPrincipalName SawyerM@contoso.com -mobilePhone -preferredLanguage -@odata.context https://graph.microsoft.com/v1.0/$metadata#users/$entity -businessPhones {} -officeLocation -givenName Sawyer -``` - -This example demonstrates how to remove a user's license by retrieving the user details. - -- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). -- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. - -## Parameters - -### -AssignedLicenses - -Specifies a list of licenses to assign or remove. - -```yaml -Type: AssignedLicenses -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links - -[Get-EntraUser](Get-EntraUser.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md deleted file mode 100644 index f73f6beb1c..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserManager.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: Set-EntraUserManager -description: This article provides details on the Set-EntraUserManager command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserManager - -schema: 2.0.0 ---- - -# Set-EntraUserManager - -## Synopsis - -Updates a user's manager. - -## Syntax - -```powershell -Set-EntraUserManager - -UserId - -RefObjectId - [] -``` - -## Description - -The `Set-EntraUserManager` cmdlet update the manager for a user in Microsoft Entra ID. Specify the `UserId` and `RefObjectId` parameters to update the manager for a user in Microsoft Entra ID. - -## Examples - -### Example 1: Update a user's manager - -```powershell -Connect-Entra -Scopes 'User.ReadWrite.All' -$manager = Get-EntraUser -UserId 'Manager@contoso.com' -$params = @{ - UserId = 'SawyerM@contoso.com' - RefObjectId = $manager.ObjectId -} -Set-EntraUserManager @params -``` - -This example demonstrates how to update the manager for the specified user. - -## Parameters - -### -UserId - -Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -RefObjectId - -Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related links - -[Get-EntraUserManager](Get-EntraUserManager.md) - -[Remove-EntraUserManager](Remove-EntraUserManager.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md deleted file mode 100644 index 8c2db963bf..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: Set-EntraUserPassword -description: This article provides details on the Set-EntraUserPassword command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserPassword - -schema: 2.0.0 ---- - -# Set-EntraUserPassword - -## Synopsis - -Sets the password of a user. - -## Syntax - -```powershell -Set-EntraUserPassword - [-ForceChangePasswordNextLogin ] - [-EnforceChangePasswordPolicy ] - -UserId - -Password - [] -``` - -## Description - -The `Set-EntraUserPassword` cmdlet sets the password for a user in Microsoft Entra ID. - -Any user can update their password without belonging to any administrator role. - -## Examples - -### Example 1: Set a user's password - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$newPassword = '' -$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force -Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -``` - -This command sets the specified user's password. - -- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. -- `-Password` parameter specifies the password to set. - -### Example 2: Set a user's password with EnforceChangePasswordPolicy parameter - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$newPassword= '' -$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force -Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -EnforceChangePasswordPolicy $True -``` - -This command sets the specified user's password with EnforceChangePasswordPolicy parameter. - -- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. -- `-Password` parameter specifies the password to set. -- `-EnforceChangePasswordPolicy` parameter force the user to change their password, if set to true. - -### Example 3: Set a user's password with ForceChangePasswordNextLogin parameter - -```powershell -connect-Entra -Scopes 'Directory.AccessAsUser.All' -$newPassword= '' -$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force -Set-EntraUserPassword -UserId 'SawyerM@contoso.com' -Password $securePassword -ForceChangePasswordNextLogin $True -``` - -This command sets the specified user's password with ForceChangePasswordNextLogin parameter. - -- `-ObjectId` parameter specifies the ID of a user in Microsoft Entra ID. -- `-Password` parameter specifies the password to set. -- `-ForceChangePasswordNextLogin` parameter forces a user to change their password during their next log in. - -## Parameters - -### -EnforceChangePasswordPolicy - -If set to true, force the user to change their password. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -ForceChangePasswordNextLogin - -Forces a user to change their password during their next sign in. - -```yaml -Type: System.Boolean -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -Specifies the ID of a user. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Password - -Specifies the password. - -```yaml -Type: System.SecureString -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -## Related Links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md deleted file mode 100644 index 21eef3e9b1..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -title: Set-EntraUserThumbnailPhoto -description: This article provides details on the Set-EntraUserThumbnailPhoto command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto - -schema: 2.0.0 ---- - -# Set-EntraUserThumbnailPhoto - -## Synopsis - -Set the thumbnail photo for a user. - -## Syntax - -### File (Default) - -```powershell -Set-EntraUserThumbnailPhoto - [-UserId ] - -FilePath - [] -``` - -### Stream - -```powershell -Set-EntraUserThumbnailPhoto - -FileStream - [-UserId ] - [] -``` - -### ByteArray - -```powershell -Set-EntraUserThumbnailPhoto - [-UserId ] - -ImageByteArray - [] -``` - -## Description - -The `Set-EntraUserThumbnailPhoto` cmdlet is used to set the thumbnail photo for a user. - -Updating any user's photo in the organization requires the User.ReadWrite.All permission. Updating only the signed-in user's photo requires the User.ReadWrite permission. - -## Examples - -### Example 1: Sets the thumbnail photo - -```powershell -Connect-Entra -Scopes 'User.ReadWrite','User.ReadWrite.All' -$params = @{ - UserId = 'SawyerM@contoso.com' - FilePath = 'D:\UserThumbnailPhoto.jpg' -} -Set-EntraUserThumbnailPhoto @params -``` - -This example sets the thumbnail photo of the user specified with the UserId parameter to the image specified with the FilePath parameter. - -- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. -- `-FilePath` parameter specifies the file path of the image to be uploaded as the user thumbnail photo. - -## Parameters - -### -FilePath - -The file path of the image to be uploaded as the user thumbnail photo. - -```yaml -Type: System.String -Parameter Sets: File -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -UserId - -The Object ID of the user for which the user thumbnail photo is set. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: ObjectId - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -### System.String - -System.IO.Stream System.Byte\[\] - -## Outputs - -### System.Object - -## Notes - -## Related Links - -[Get-EntraUserThumbnailPhoto](Get-EntraUserThumbnailPhoto.md) diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md deleted file mode 100644 index 1959f83ffc..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Update-EntraSignedInUserPassword -description: This article provides details on the Update-EntraSignedInUserPassword command. - -ms.topic: reference -ms.date: 08/20/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword - -schema: 2.0.0 ---- - -# Update-EntraSignedInUserPassword - -## Synopsis - -Updates the password for the signed-in user. - -## Syntax - -```powershell -Update-EntraSignedInUserPassword - -NewPassword - -CurrentPassword - [] -``` - -## Description - -The `Update-EntraSignedInUserPassword` cmdlet updates the password for the signed-in user in Microsoft Entra ID. - -Enable users to update their own passwords. Any user can change their password without requiring administrator privileges. - -## Examples - -### Example 1: Update a password - -```powershell -Connect-Entra -Scopes 'Directory.AccessAsUser.All' -$CurrentPassword = ConvertTo-SecureString '' -AsPlainText -Force -$NewPassword = ConvertTo-SecureString '' -AsPlainText -Force -$params = @{ - CurrentPassword = $CurrentPassword - NewPassword = $NewPassword -} -Update-EntraSignedInUserPassword @params -``` - -This example shows how to update the password for the signed-in user. - -- `-CurrentPassword` parameter specifies the current password of the signed-in user. -- `-NewPassword` parameter specifies the new password for the signed-in user. - -## Parameters - -### -CurrentPassword - -Specifies the current password of the signed-in user. - -```yaml -Type: SecureString -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NewPassword - -Specifies the new password for the signed-in user. - -```yaml -Type: SecureString -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For more information, see [changePassword](https://learn.microsoft.com/graph/api/user-changepassword). - -## Related links diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md b/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md deleted file mode 100644 index f300d9f135..0000000000 --- a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Update-EntraUserFromFederated -description: This article provides details on the Update-EntraUserFromFederated command. - -ms.topic: reference -ms.date: 06/26/2024 -ms.author: eunicewaweru -ms.reviewer: stevemutungi -manager: CelesteDG -author: msewaweru - -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraUserFromFederated - -schema: 2.0.0 ---- - -# Update-EntraUserFromFederated - -## Synopsis - -Updates a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. - -## Syntax - -```powershell -Update-EntraUserFromFederated - -UserPrincipalName - [-NewPassword ] - [] -``` - -## Description - -The `Update-EntraUserFromFederated` cmdlet is used to update a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. A new password must be provided for the user. - -This process writes the new password to Microsoft Entra ID and, if configured with password writeback, pushes it to on-premises Active Directory. The admin can provide a new password or let the system generate one. The user will be prompted to change their password at their next sign-in. - -For delegated scenarios, the administrator needs at least the Authentication Administrator or Privileged Authentication Administrator Microsoft Entra role. - -Admins with User Administrator, Helpdesk Administrator, or Password Administrator roles can also reset passwords for non-admin users and a limited set of admin roles. - -## Examples - -### Example 1: Update a user in a domain - -```powershell -Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All' -Update-EntraUserFromFederated -UserPrincipalName 'pattifuller@contoso.com' -``` - -This command updates a user in a domain. - -- `-UserPrincipalName` parameter specifies the Microsoft Entra ID UserID for the user to convert. - -## Parameters - -### -UserPrincipalName - -The Microsoft Entra ID UserID for the user to convert. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -NewPassword - -The new password of the user. - -For tenants using hybrid password scenarios, specifying a new password is required. If you omit the password for a cloud-only account, the system generates one automatically. This generated password is a Unicode string without additional encoding. Before acceptance, the password is validated against the tenant's banned password list and must meet the tenant's cloud and/or on-premises password requirements. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: False -Position: 2 -Default value: None -Accept pipeline input: True (ByPropertyName) -Accept wildcard characters: False -``` - -### CommonParameters - -This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). - -## Inputs - -## Outputs - -## Notes - -- For more information, see [resetPassword](https://learn.microsoft.com/graph/api/authenticationmethod-resetpassword). - -## Related Links From 0ac418c30f68641d2d0514ebf5cc55e830629747 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:45:00 +0300 Subject: [PATCH 073/124] fixes --- src/EntraModuleBuilder.ps1 | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index d161a8338d..e04380d737 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -125,9 +125,9 @@ Set-StrictMode -Version 5 [void] CreateSubModuleFile([string]$Module, [string]$typedefsFilePath=$this.TypeDefsDirectory) { # Determine the output path based on the module $startDirectory = if ($Module -eq "Entra") { - "..\moduleVNext\Entra\Microsoft.Graph.Entra\" + "..\moduleVNext\Entra\Microsoft.Graph.Entra" } else { - "..\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta\" + "..\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta" } Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." @@ -155,7 +155,7 @@ Set-StrictMode -Version 5 foreach ($subDir in $subDirectories) { # Skip the 'Migration' sub-directory - if ($subDir.Name -eq 'Migration') { + if ($subDir.Name -eq 'Migration' -or $subDir.Name -eq 'Invitations') { Log-Message "Skipping 'Migration' directory." -Level 'INFO' continue } @@ -333,7 +333,7 @@ foreach (`$subModule in `$subModules) { "../moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta" } - $subDirectories = Get-ChildItem -Path $moduleBasePath + $subDirectories = Get-ChildItem -Path $moduleBasePath -Directory $settingPath = Join-Path $rootPath -ChildPath "/config/ModuleMetadata.json" @@ -346,12 +346,6 @@ foreach (`$subModule in `$subModules) { foreach ($subDir in $subDirectories) { # Define module name based on sub-directory name - # Skip the 'Migration' sub-directory - if ($subDir.Name -eq 'Migration' -or $subDir.Name -eq 'Invitations') { - Log-Message "Skipping 'Migration and Invitation' directory." -Level 'INFO' - continue - } - $moduleName = $subDir.Name $helpFileName = if ($Module -eq "Entra") { @@ -415,7 +409,6 @@ foreach (`$subModule in `$subModules) { if ($dependencyMapping.ContainsKey($keyModuleName)) { foreach ($dependency in $dependencyMapping[$keyModuleName]) { $requiredModules += @{ ModuleName = $dependency; RequiredVersion = $content.requiredModulesVersion } - Log-Message $requiredModules.Count } } } @@ -476,9 +469,9 @@ foreach (`$subModule in `$subModules) { # Determine the base docs path based on the specified module $docsPath = $this.BaseDocsPath if ($Module -eq "Entra") { - $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-v1.0/Microsoft.Graph.Entra" + $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-v1.0" } elseif ($Module -eq "EntraBeta") { - $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-beta/Microsoft.Graph.Entra.Beta" + $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-beta" } else { Log-Message "Invalid module specified: $Module" -Level 'ERROR' return From dcc64b8050c218b4ce9495865858de8d46725008 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:12:01 +0300 Subject: [PATCH 074/124] fixes --- src/EntraModuleBuilder.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index e04380d737..bd733049e4 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -196,9 +196,9 @@ Set-StrictMode -Version 5 [void] CreateRootModule([string] $Module){ $rootModuleName=if($Module -eq 'Entra'){ - 'Microsoft.Graph.Entra.root.psm1' + 'Microsoft.Graph.Entra.psm1' }else{ - 'Microsoft.Graph.Enta.Beta.root.psm1' + 'Microsoft.Graph.Enta.Beta.psm1' } $subModuleFiles=$this.GetSubModuleFiles($Module,$this.OutputDirectory) @@ -261,9 +261,9 @@ foreach (`$subModule in `$subModules) { } $moduleName=if($Module -eq 'Entra'){ - 'Microsoft.Graph.Entra.root' + 'Microsoft.Graph.Entra' }else{ - 'Microsoft.Grap.Entra.Beta.root' + 'Microsoft.Grap.Entra.Beta' } $settingPath = Join-Path $rootPath -ChildPath "/config/ModuleMetadata.json" From a68e957cc1f3e4c55d4ec50b37aa6cc05b24327e Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:40:52 +0300 Subject: [PATCH 075/124] Update VNext-Build.md file --- build/Split-EntraModule.ps1 | 5 +++- build/{New-Build.md => VNext-Build.md} | 37 +++++++++++++------------- 2 files changed, 22 insertions(+), 20 deletions(-) rename build/{New-Build.md => VNext-Build.md} (84%) diff --git a/build/Split-EntraModule.ps1 b/build/Split-EntraModule.ps1 index 8afd805c98..9c13bfc3a6 100644 --- a/build/Split-EntraModule.ps1 +++ b/build/Split-EntraModule.ps1 @@ -8,10 +8,13 @@ param ( # Import the necessary scripts . ..\src\EntraModuleSplitter.ps1 +. .\Split-Docs # Split the module and take into account the AzureADAliases as well $entraModuleSplitter = [EntraModuleSplitter]::new() $entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument -$entraModuleSplitter.ProcessEntraAzureADAliases($Module) \ No newline at end of file +$entraModuleSplitter.ProcessEntraAzureADAliases($Module) + +Split-Docs -Source $Module \ No newline at end of file diff --git a/build/New-Build.md b/build/VNext-Build.md similarity index 84% rename from build/New-Build.md rename to build/VNext-Build.md index 336b7ee343..1fbb31b9ef 100644 --- a/build/New-Build.md +++ b/build/VNext-Build.md @@ -5,8 +5,14 @@ Clone the module and follow the instructions described. You need **Microsoft.Gra ```powershell git clone https://github.com/microsoftgraph/entra-powershell.git cd entra-powershell + ``` +### Checkout the Modularization Feature Branch + +git pull +git checkout modularize + ### Install dependencies This module depends on some Microsoft Graph PowerShell modules. The following command installs the required dependencies. @@ -27,22 +33,31 @@ Or > If you encounter Execution Policies error, run the command `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`. ### Install PlatyPS + The module help files are generated from markdown documentation (using platyPS module). To install PlatyPS module, run the command `Install-Module -Name PlatyPS`. ```powershell # Install PlatyPS module Install-Module -Name PlatyPS ``` +### Split Legacy Module + +Run if you've made any changes to the legacy module e.g. Any files under .\module directory. + +```powershell + .\build\Split-EntraModule -Module 'Entra' ``` -### Build module + + +### Build vNext module Use a clean PowerShell session when you're building the module. The building process attempts to load the required versions of the module, which fails if another version of the dependencies is already loaded. ```powershell .\build\Create-CreateModule.ps1 -Module Entra // or EntraBeta ``` -The generated module is in the output folder `./bin` +The generated module is in the output folder `./bin` In order to import it, you need to run `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` SubModule in this case is the name of the specific sub-module you want to use. @@ -74,22 +89,6 @@ Connect-Graph Get-AzureADUser ``` -## Installing a test version (Optional) - -Install a test version (optional), which is recommended if you're trying to test with automation, which tries to load the module from the default PowerShell modules folder. - -```powershell -. .\build\Common-functions.ps1 -Create-ModuleFolder -Register-LocalGallery -.\build\Publish-LocalCompatModule.ps1 -Install -Unregister-LocalGallery -#When you install, you can load the module without the Path to the files. -Import-Module Microsoft.Graph.Entra..psd1 -Force -``` - -The snippet in the optional testing section publishes the module to a local repository and installs the module. - ## FAQs 1. Installation error: `cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.` @@ -112,7 +111,7 @@ Or Use the latest version of PowerShell 7+ as the runtime version (highly recommended). -3. Build Help error: `New-ExternalHelp : The term 'New-ExternalHelp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. `. +3. Build Help error: `New-ExternalHelp : The term 'New-ExternalHelp' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.`. To solve this error, install PlatyPS module by running the command: From 06649942d434c325c99be0112f2e845ce0db5213 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:43:11 +0300 Subject: [PATCH 076/124] Update VNext-Build.md file --- build/VNext-Build.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/VNext-Build.md b/build/VNext-Build.md index 1fbb31b9ef..323deaed00 100644 --- a/build/VNext-Build.md +++ b/build/VNext-Build.md @@ -57,10 +57,12 @@ Use a clean PowerShell session when you're building the module. The building pro .\build\Create-CreateModule.ps1 -Module Entra // or EntraBeta ``` -The generated module is in the output folder `./bin` +The generated modules are in the output folder `./bin` In order to import it, you need to run `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` -SubModule in this case is the name of the specific sub-module you want to use. +Alternatively, import the root module(that encompases and includes all the sub-modules and their help and dependencies) `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` + +SubModule in this case is the name of the specific sub-module you want to use. They are `Authentication,Users,DirectoryManagement, Groups, Applications,Governance,SignIns and Reports` ## Usage From e802b26411f010b228d10bba7d50feff0dab6fa8 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:44:09 +0300 Subject: [PATCH 077/124] Update VNext-Build.md file --- build/VNext-Build.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/VNext-Build.md b/build/VNext-Build.md index 323deaed00..7f3f7a7266 100644 --- a/build/VNext-Build.md +++ b/build/VNext-Build.md @@ -40,6 +40,7 @@ The module help files are generated from markdown documentation (using platyPS m # Install PlatyPS module Install-Module -Name PlatyPS ``` + ### Split Legacy Module Run if you've made any changes to the legacy module e.g. Any files under .\module directory. @@ -51,6 +52,7 @@ Run if you've made any changes to the legacy module e.g. Any files under .\modul ### Build vNext module + Use a clean PowerShell session when you're building the module. The building process attempts to load the required versions of the module, which fails if another version of the dependencies is already loaded. ```powershell From 00699002e6afb9a38c58eb1ffdad5b8b27f724d0 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:14:52 +0300 Subject: [PATCH 078/124] Update VNext-Build.md file --- build/VNext-Build.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/VNext-Build.md b/build/VNext-Build.md index 7f3f7a7266..ed95ff6695 100644 --- a/build/VNext-Build.md +++ b/build/VNext-Build.md @@ -1,4 +1,4 @@ -## Building module +### Building module Clone the module and follow the instructions described. You need **Microsoft.Graph PowerShell version 2.15.X** in order to build the module. @@ -50,10 +50,9 @@ Run if you've made any changes to the legacy module e.g. Any files under .\modul ``` - ### Build vNext module -Use a clean PowerShell session when you're building the module. The building process attempts to load the required versions of the module, which fails if another version of the dependencies is already loaded. +Use a clean PowerShell session when you're building the module. The building process attempts to load the required versions of the module, which fails if another version of the dependencies is already loaded. ```powershell .\build\Create-CreateModule.ps1 -Module Entra // or EntraBeta From 7b484ee5c6ee86d40a11fb984da44037ff75d3dd Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:40:59 +0300 Subject: [PATCH 079/124] Update VNext-Build.md file --- build/VNext-Build.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build/VNext-Build.md b/build/VNext-Build.md index ed95ff6695..bf22685cc5 100644 --- a/build/VNext-Build.md +++ b/build/VNext-Build.md @@ -43,13 +43,15 @@ Install-Module -Name PlatyPS ### Split Legacy Module -Run if you've made any changes to the legacy module e.g. Any files under .\module directory. +If you've made any changes to the legacy module e.g. Any files under `.\module` directory. Run the following script. ```powershell - .\build\Split-EntraModule -Module 'Entra' + .\build\Split-EntraModule.ps1 -Module 'Entra' ``` +This will ensure that the cmdlet function files are moved to the right sub-module directory under `.\moduleVNext` directory. + ### Build vNext module Use a clean PowerShell session when you're building the module. The building process attempts to load the required versions of the module, which fails if another version of the dependencies is already loaded. @@ -59,12 +61,13 @@ Use a clean PowerShell session when you're building the module. The building pro ``` The generated modules are in the output folder `./bin` + +SubModule in this case is the name of the specific sub-module you want to use. They are `Authentication,Users,DirectoryManagement, Groups, Applications,Governance,SignIns and Reports` + In order to import it, you need to run `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` Alternatively, import the root module(that encompases and includes all the sub-modules and their help and dependencies) `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` -SubModule in this case is the name of the specific sub-module you want to use. They are `Authentication,Users,DirectoryManagement, Groups, Applications,Governance,SignIns and Reports` - ## Usage Import the module and test the generated commands. From f08c65a1f7e31782358b2c37d3ab8bf0609496f5 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:53:13 +0300 Subject: [PATCH 080/124] Update VNext-Build.md file --- build/VNext-Build.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build/VNext-Build.md b/build/VNext-Build.md index bf22685cc5..5805864f80 100644 --- a/build/VNext-Build.md +++ b/build/VNext-Build.md @@ -43,7 +43,20 @@ Install-Module -Name PlatyPS ### Split Legacy Module -If you've made any changes to the legacy module e.g. Any files under `.\module` directory. Run the following script. +If you've made any changes to the legacy module e.g. Any files under `.\module` directory. + +1. Build the legacy module. + +```powershell +# Build help module for the Microsoft Entra Module +. .\build\Common-functions.ps1 +Create-ModuleHelp -Module Entra // or EntraBeta for the preview version + +# Rebuild the legacy module +.\build\Create-CompatModule.ps1 -Module Entra // or EntraBeta +``` + +2. Split the legacy module into functions .ps1 files into the respective sub-module directories. ```powershell .\build\Split-EntraModule.ps1 -Module 'Entra' @@ -62,7 +75,7 @@ Use a clean PowerShell session when you're building the module. The building pro The generated modules are in the output folder `./bin` -SubModule in this case is the name of the specific sub-module you want to use. They are `Authentication,Users,DirectoryManagement, Groups, Applications,Governance,SignIns and Reports` +SubModule in this case is the name of the specific sub-module you want to use. They are: `Authentication,Users,DirectoryManagement, Groups, Applications,Governance,SignIns and Reports` In order to import it, you need to run `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` From ff3a94b7c72dd0e78ff06320a336aa97d692c1da Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:31:50 +0300 Subject: [PATCH 081/124] Update RootModule Import for Tests --- test/module/Entra/Entra.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/module/Entra/Entra.Tests.ps1 b/test/module/Entra/Entra.Tests.ps1 index 4fa9df9b09..e6b0c31795 100644 --- a/test/module/Entra/Entra.Tests.ps1 +++ b/test/module/Entra/Entra.Tests.ps1 @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------ if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra + Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force } Import-Module Pester From 9f0d5d2549f974dbdd9337590341079193bf577b Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Tue, 29 Oct 2024 14:36:17 +0300 Subject: [PATCH 082/124] Update modularization paths (#1177) * Update modularization paths * Update casing --- build/Create-EntraModule.ps1 | 2 +- src/EntraModuleBuilder.ps1 | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 0e8f363dfb..332232d0b4 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -11,5 +11,5 @@ $moduleBuilder = [EntraModuleBuilder]::new() $moduleBuilder.CreateModuleHelp($Module) -$moduleBuilder.CreateSubModuleFile($Module, ".\Typedefs.txt") +$moduleBuilder.CreateSubModuleFile($Module, ".\build\TypeDefs.txt") $moduleBuilder.CreateModuleManifest($Module) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index bd733049e4..a6f0532981 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -1,7 +1,7 @@ # ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -. ../build/common-functions.ps1 + # This class builds the submodules i.e. generate the .psm1 file, help-xml and .psd1 file class EntraModuleBuilder { [string]$headerText @@ -20,9 +20,9 @@ Set-StrictMode -Version 5 "@ - $this.OutputDirectory = '../bin/' - $this.TypeDefsDirectory="../build/Typedefs.txt" - $this.BaseDocsPath='../moduleVNext/docs/' + $this.OutputDirectory = './bin/' + $this.TypeDefsDirectory="./build/TypeDefs.txt" + $this.BaseDocsPath='./moduleVNext/docs/' } @@ -125,9 +125,9 @@ Set-StrictMode -Version 5 [void] CreateSubModuleFile([string]$Module, [string]$typedefsFilePath=$this.TypeDefsDirectory) { # Determine the output path based on the module $startDirectory = if ($Module -eq "Entra") { - "..\moduleVNext\Entra\Microsoft.Graph.Entra" + ".\moduleVNext\Entra\Microsoft.Graph.Entra" } else { - "..\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta" + ".\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta" } Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." @@ -255,9 +255,9 @@ foreach (`$subModule in `$subModules) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - "../moduleVNext/Entra" + "./moduleVNext/Entra" } else { - "../moduleVNext/EntraBeta" + "./moduleVNext/EntraBeta" } $moduleName=if($Module -eq 'Entra'){ @@ -323,14 +323,14 @@ foreach (`$subModule in `$subModules) { [void] CreateModuleManifest($module) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - "../moduleVNext/Entra" + "./moduleVNext/Entra" } else { - "../moduleVNext/EntraBeta" + "./moduleVNext/EntraBeta" } $moduleBasePath =if ($Module -eq "Entra") { - "../moduleVNext/Entra/Microsoft.Graph.Entra" + "./moduleVNext/Entra/Microsoft.Graph.Entra" } else { - "../moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta" + "./moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta" } $subDirectories = Get-ChildItem -Path $moduleBasePath -Directory From 0ed42eadf1462c516a45858d17e04cfe0b7a31c1 Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Wed, 30 Oct 2024 10:19:54 +0300 Subject: [PATCH 083/124] Fix telemetry custom headers (#1179) --- .../Applications/New-EntraCustomHeaders.ps1 | 2 +- .../Authentication/New-EntraCustomHeaders.ps1 | 2 +- .../DirectoryManagement/New-EntraCustomHeaders.ps1 | 2 +- .../Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 | 2 +- .../Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 | 2 +- .../Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 | 2 +- .../Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 | 2 +- .../Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 index 5f3d3fe2af..1556f5af5a 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Graph.Entra.Applications | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 index 5f3d3fe2af..0db9ea99a6 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Graph.Entra.Authentication | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 index 5f3d3fe2af..0ad43653ad 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Graph.Entra.DirectoryManagement | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 index 5f3d3fe2af..4199d746c9 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Graph.Entra.Governance | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 index 5f3d3fe2af..163a20e10d 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Graph.Entra.Groups | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 index 5f3d3fe2af..5c3697e6b1 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Graph.Entra.Reports | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 index 5f3d3fe2af..8e156df31d 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Graph.Entra.SignIns | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 index 5f3d3fe2af..218f1b70d4 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Graph.Entra.Users | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue From c05f33ba88e478ee1b6da96d2277c3ee7a4285f1 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 5 Nov 2024 09:16:52 +0300 Subject: [PATCH 084/124] Split Test files to sub-module directories (#1180) * Test Splitting * Test Splitting * Test Splitting * Test Splitting * updated common-functions.ps1 import in every test file * Split Beta Tests * Updated common-functions.ps1 import in every test file * Updated common-functions.ps1 import in every test file * Updated logging for builder * Updated logging for builder * comestic fixes * common-functions import change for tests --- build/Beta-TypeDefs.txt | 965 ++++++++++++++++++ build/Create-EntraModule.ps1 | 7 +- build/Split-Docs.ps1 | 24 +- build/Split-EntraModule.ps1 | 3 +- build/Split-Tests.ps1 | 184 ++++ build/Update-CommonFunctionsImport.ps1 | 46 + build/{TypeDefs.txt => V1.0-TypeDefs.txt} | 0 .../Add-EntraBetaApplicationOwner.ps1 | 93 ++ .../Add-EntraBetaApplicationPolicy.ps1 | 39 + ...cipalDelegatedPermissionClassification.ps1 | 105 ++ .../Add-EntraBetaServicePrincipalOwner.ps1 | 93 ++ .../Applications/Get-EntraBetaApplication.ps1 | 159 +++ ...-EntraBetaApplicationExtensionProperty.ps1 | 90 ++ .../Get-EntraBetaApplicationKeyCredential.ps1 | 18 + .../Get-EntraBetaApplicationLogo.ps1 | 52 + .../Get-EntraBetaApplicationOwner.ps1 | 108 ++ ...EntraBetaApplicationPasswordCredential.ps1 | 57 ++ .../Get-EntraBetaApplicationPolicy.ps1 | 53 + ...t-EntraBetaApplicationProxyApplication.ps1 | 83 ++ ...Get-EntraBetaApplicationProxyConnector.ps1 | 76 ++ ...ntraBetaApplicationProxyConnectorGroup.ps1 | 76 ++ ...aApplicationProxyConnectorGroupMembers.ps1 | 70 ++ ...aBetaApplicationProxyConnectorMemberOf.ps1 | 49 + .../Get-EntraBetaApplicationTemplate.ps1 | 74 ++ .../Get-EntraBetaDeletedApplication.ps1 | 147 +++ ...ntraBetaPasswordSingleSignOnCredential.ps1 | 97 ++ .../Get-EntraBetaServicePrincipal.ps1 | 128 +++ ...aBetaServicePrincipalAppRoleAssignedTo.ps1 | 107 ++ ...aBetaServicePrincipalAppRoleAssignment.ps1 | 107 ++ ...EntraBetaServicePrincipalCreatedObject.ps1 | 107 ++ ...cipalDelegatedPermissionClassification.ps1 | 109 ++ ...EntraBetaServicePrincipalKeyCredential.ps1 | 25 + ...et-EntraBetaServicePrincipalMembership.ps1 | 108 ++ ...aServicePrincipalOAuth2PermissionGrant.ps1 | 107 ++ ...t-EntraBetaServicePrincipalOwnedObject.ps1 | 108 ++ .../Get-EntraBetaServicePrincipalOwner.ps1 | 70 ++ ...BetaServicePrincipalPasswordCredential.ps1 | 16 + .../Get-EntraUnsupportedCommand.ps1 | 8 + .../Applications/New-EntraBetaApplication.ps1 | 295 ++++++ ...-EntraBetaApplicationExtensionProperty.ps1 | 105 ++ ...BetaApplicationFromApplicationTemplate.ps1 | 119 +++ .../New-EntraBetaApplicationKey.ps1 | 105 ++ .../New-EntraBetaApplicationKeyCredential.ps1 | 126 +++ .../New-EntraBetaApplicationPassword.ps1 | 100 ++ ...EntraBetaApplicationPasswordCredential.ps1 | 104 ++ ...w-EntraBetaApplicationProxyApplication.ps1 | 176 ++++ ...ntraBetaApplicationProxyConnectorGroup.ps1 | 78 ++ ...ntraBetaPasswordSingleSignOnCredential.ps1 | 93 ++ .../New-EntraBetaServicePrincipal.ps1 | 229 +++++ ...aBetaServicePrincipalAppRoleAssignment.ps1 | 105 ++ ...BetaServicePrincipalPasswordCredential.ps1 | 70 ++ .../Remove-EntraBetaApplication.ps1 | 84 ++ ...-EntraBetaApplicationExtensionProperty.ps1 | 91 ++ .../Remove-EntraBetaApplicationKey.ps1 | 98 ++ ...move-EntraBetaApplicationKeyCredential.ps1 | 91 ++ .../Remove-EntraBetaApplicationOwner.ps1 | 91 ++ .../Remove-EntraBetaApplicationPassword.ps1 | 91 ++ ...EntraBetaApplicationPasswordCredential.ps1 | 91 ++ .../Remove-EntraBetaApplicationPolicy.ps1 | 34 + ...e-EntraBetaApplicationProxyApplication.ps1 | 50 + ...licationProxyApplicationConnectorGroup.ps1 | 29 + ...ntraBetaApplicationProxyConnectorGroup.ps1 | 28 + ...-EntraBetaApplicationVerifiedPublisher.ps1 | 84 ++ .../Remove-EntraBetaDeletedApplication.ps1 | 84 ++ ...Remove-EntraBetaDeletedDirectoryObject.ps1 | 21 + ...ntraBetaPasswordSingleSignOnCredential.ps1 | 93 ++ .../Remove-EntraBetaServicePrincipal.ps1 | 84 ++ ...aBetaServicePrincipalAppRoleAssignment.ps1 | 91 ++ ...cipalDelegatedPermissionClassification.ps1 | 21 + .../Remove-EntraBetaServicePrincipalOwner.ps1 | 91 ++ ...BetaServicePrincipalPasswordCredential.ps1 | 35 + .../Restore-EntraBetaDeletedApplication.ps1 | 104 ++ ...BetaGroupIdsServicePrincipalIsMemberOf.ps1 | 77 ++ .../Applications/Set-EntraBetaApplication.ps1 | 278 +++++ .../Set-EntraBetaApplicationLogo.ps1 | 60 ++ ...t-EntraBetaApplicationProxyApplication.ps1 | 140 +++ ...licationProxyApplicationConnectorGroup.ps1 | 39 + ...pplicationProxyApplicationSingleSignOn.ps1 | 75 ++ ...Set-EntraBetaApplicationProxyConnector.ps1 | 39 + ...ntraBetaApplicationProxyConnectorGroup.ps1 | 37 + ...-EntraBetaApplicationVerifiedPublisher.ps1 | 91 ++ ...ntraBetaPasswordSingleSignOnCredential.ps1 | 93 ++ .../Set-EntraBetaServicePrincipal.ps1 | 169 +++ .../Authentication/Connect-Entra.ps1 | 173 ++++ .../Authentication/Disconnect-Entra.ps1 | 10 + .../Authentication/Get-EntraContext.ps1 | 72 ++ .../Get-EntraUnsupportedCommand.ps1 | 8 + ...traBetaStrongAuthenticationMethodByUpn.ps1 | 58 ++ ...e-EntraBetaSignedInUserAllRefreshToken.ps1 | 28 + .../Revoke-EntraBetaUserAllRefreshToken.ps1 | 84 ++ .../Add-EntraBetaAdministrativeUnitMember.ps1 | 88 ++ ...ecurityAttributeDefinitionAllowedValue.ps1 | 98 ++ .../Add-EntraBetaDeviceRegisteredOwner.ps1 | 93 ++ .../Add-EntraBetaDeviceRegisteredUser.ps1 | 93 ++ .../Add-EntraBetaDirectoryRoleMember.ps1 | 93 ++ .../Add-EntraBetaScopedRoleMembership.ps1 | 110 ++ .../Confirm-EntraBetaDomain.ps1 | 33 + .../Enable-EntraBetaDirectoryRole.ps1 | 84 ++ .../Get-EntraBetaAccountSku.ps1 | 74 ++ .../Get-EntraBetaAdministrativeUnit.ps1 | 119 +++ .../Get-EntraBetaAdministrativeUnitMember.ps1 | 107 ++ .../Get-EntraBetaAttributeSet.ps1 | 90 ++ .../Get-EntraBetaContact.ps1 | 121 +++ .../Get-EntraBetaContactDirectReport.ps1 | 107 ++ .../Get-EntraBetaContactManager.ps1 | 90 ++ .../Get-EntraBetaContactMembership.ps1 | 108 ++ .../Get-EntraBetaContract.ps1 | 119 +++ ...aBetaCustomSecurityAttributeDefinition.ps1 | 90 ++ ...ecurityAttributeDefinitionAllowedValue.ps1 | 109 ++ .../Get-EntraBetaDeletedDirectoryObject.ps1 | 91 ++ .../Get-EntraBetaDevice.ps1 | 138 +++ .../Get-EntraBetaDeviceRegisteredOwner.ps1 | 126 +++ .../Get-EntraBetaDeviceRegisteredUser.ps1 | 127 +++ .../Get-EntraBetaDirSyncConfiguration.ps1 | 72 ++ .../Get-EntraBetaDirSyncfeature.ps1 | 89 ++ ...ctoryObjectOnPremisesProvisioningError.ps1 | 39 + .../Get-EntraBetaDirectoryRole.ps1 | 102 ++ .../Get-EntraBetaDirectoryRoleMember.ps1 | 98 ++ .../Get-EntraBetaDirectoryRoleTemplate.ps1 | 83 ++ .../Get-EntraBetaDirectorySetting.ps1 | 107 ++ .../Get-EntraBetaDirectorySettingTemplate.ps1 | 95 ++ .../Get-EntraBetaDomain.ps1 | 93 ++ .../Get-EntraBetaDomainFederationSettings.ps1 | 91 ++ .../Get-EntraBetaDomainNameReference.ps1 | 114 +++ ...raBetaDomainServiceConfigurationRecord.ps1 | 92 ++ ...t-EntraBetaDomainVerificationDnsRecord.ps1 | 92 ++ .../Get-EntraBetaFederationProperty.ps1 | 78 ++ .../Get-EntraBetaPartnerInformation.ps1 | 39 + .../Get-EntraBetaPasswordPolicy.ps1 | 72 ++ .../Get-EntraBetaScopedRoleMembership.ps1 | 97 ++ .../Get-EntraBetaSubscribedSku.ps1 | 89 ++ .../Get-EntraBetaTenantDetail.ps1 | 103 ++ .../Get-EntraUnsupportedCommand.ps1 | 8 + .../New-EntraBetaAdministrativeUnit.ps1 | 119 +++ .../New-EntraBetaAdministrativeUnitMember.ps1 | 143 +++ .../New-EntraBetaAttributeSet.ps1 | 48 + ...aBetaCustomSecurityAttributeDefinition.ps1 | 133 +++ .../New-EntraBetaDevice.ps1 | 182 ++++ .../New-EntraBetaDirectorySetting.ps1 | 89 ++ .../New-EntraBetaDomain.ps1 | 106 ++ .../Remove-EntraBetaAdministrativeUnit.ps1 | 84 ++ ...move-EntraBetaAdministrativeUnitMember.ps1 | 91 ++ .../Remove-EntraBetaContact.ps1 | 84 ++ .../Remove-EntraBetaDevice.ps1 | 84 ++ .../Remove-EntraBetaDeviceRegisteredOwner.ps1 | 91 ++ .../Remove-EntraBetaDeviceRegisteredUser.ps1 | 91 ++ .../Remove-EntraBetaDirectoryRoleMember.ps1 | 91 ++ .../Remove-EntraBetaDirectorySetting.ps1 | 84 ++ .../Remove-EntraBetaDomain.ps1 | 84 ++ .../Remove-EntraBetaScopedRoleMembership.ps1 | 91 ++ ...estore-EntraBetaDeletedDirectoryObject.ps1 | 50 + .../Set-EntraBetaAdministrativeUnit.ps1 | 126 +++ .../Set-EntraBetaAttributeSet.ps1 | 41 + ...aBetaCustomSecurityAttributeDefinition.ps1 | 105 ++ ...ecurityAttributeDefinitionAllowedValue.ps1 | 98 ++ .../Set-EntraBetaDevice.ps1 | 185 ++++ .../Set-EntraBetaDirSyncConfiguration.ps1 | 104 ++ .../Set-EntraBetaDirSyncEnabled.ps1 | 90 ++ .../Set-EntraBetaDirSyncFeature.ps1 | 120 +++ .../Set-EntraBetaDirectorySetting.ps1 | 96 ++ .../Set-EntraBetaDomain.ps1 | 105 ++ .../Set-EntraBetaDomainFederationSettings.ps1 | 130 +++ .../Set-EntraBetaPartnerInformation.ps1 | 68 ++ .../Set-EntraBetaTenantDetail.ps1 | 101 ++ .../Get-EntraBetaDirectoryRoleAssignment.ps1 | 126 +++ .../Get-EntraBetaDirectoryRoleDefinition.ps1 | 125 +++ .../Get-EntraBetaPrivilegedResource.ps1 | 116 +++ .../Get-EntraBetaPrivilegedRole.ps1 | 102 ++ ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 116 +++ .../Get-EntraBetaPrivilegedRoleDefinition.ps1 | 123 +++ .../Get-EntraBetaPrivilegedRoleSetting.ps1 | 120 +++ .../Get-EntraUnsupportedCommand.ps1 | 8 + .../New-EntraBetaDirectoryRoleAssignment.ps1 | 98 ++ .../New-EntraBetaDirectoryRoleDefinition.ps1 | 139 +++ .../New-EntraBetaPrivilegedRoleAssignment.ps1 | 119 +++ ...emove-EntraBetaDirectoryRoleAssignment.ps1 | 84 ++ ...emove-EntraBetaDirectoryRoleDefinition.ps1 | 84 ++ .../Set-EntraBetaDirectoryRoleDefinition.ps1 | 150 +++ ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 119 +++ .../Set-EntraBetaPrivilegedRoleSetting.ps1 | 165 +++ .../Groups/Add-EntraBetaGroupMember.ps1 | 91 ++ .../Groups/Add-EntraBetaGroupOwner.ps1 | 93 ++ .../Add-EntraBetaLifecyclePolicyGroup.ps1 | 91 ++ .../Groups/Get-EntraBetaDeletedGroup.ps1 | 128 +++ .../Groups/Get-EntraBetaGroup.ps1 | 128 +++ .../Get-EntraBetaGroupAppRoleAssignment.ps1 | 107 ++ .../Get-EntraBetaGroupLifecyclePolicy.ps1 | 90 ++ .../Groups/Get-EntraBetaGroupMember.ps1 | 107 ++ .../Groups/Get-EntraBetaGroupOwner.ps1 | 75 ++ .../Get-EntraBetaGroupPermissionGrant.ps1 | 90 ++ .../Get-EntraBetaLifecyclePolicyGroup.ps1 | 90 ++ .../Groups/Get-EntraBetaObjectByObjectId.ps1 | 100 ++ .../Groups/Get-EntraBetaObjectSetting.ps1 | 96 ++ .../Groups/Get-EntraUnsupportedCommand.ps1 | 8 + .../Groups/New-EntraBetaGroup.ps1 | 154 +++ .../New-EntraBetaGroupAppRoleAssignment.ps1 | 105 ++ .../New-EntraBetaGroupLifecyclePolicy.ps1 | 98 ++ .../Groups/New-EntraBetaObjectSetting.ps1 | 55 + .../Groups/Remove-EntraBetaGroup.ps1 | 84 ++ ...Remove-EntraBetaGroupAppRoleAssignment.ps1 | 91 ++ .../Remove-EntraBetaGroupLifecyclePolicy.ps1 | 84 ++ .../Groups/Remove-EntraBetaGroupMember.ps1 | 91 ++ .../Groups/Remove-EntraBetaGroupOwner.ps1 | 91 ++ .../Remove-EntraBetaLifecyclePolicyGroup.ps1 | 91 ++ .../Groups/Remove-EntraBetaObjectSetting.ps1 | 40 + .../Groups/Reset-EntraBetaLifeCycleGroup.ps1 | 84 ++ ...ect-EntraBetaGroupIdsContactIsMemberOf.ps1 | 77 ++ ...elect-EntraBetaGroupIdsGroupIsMemberOf.ps1 | 94 ++ ...Select-EntraBetaGroupIdsUserIsMemberOf.ps1 | 77 ++ .../Groups/Set-EntraBetaGroup.ps1 | 161 +++ .../Set-EntraBetaGroupLifecyclePolicy.ps1 | 105 ++ .../Groups/Set-EntraBetaObjectSetting.ps1 | 49 + ...traBetaPrivateAccessApplicationSegment.ps1 | 33 + .../Get-EntraUnsupportedCommand.ps1 | 8 + ...traBetaPrivateAccessApplicationSegment.ps1 | 84 ++ ...traBetaPrivateAccessApplicationSegment.ps1 | 22 + ...raBetaApplicationSignInDetailedSummary.ps1 | 91 ++ .../Get-EntraBetaApplicationSignInSummary.ps1 | 56 + .../Get-EntraBetaAuditDirectoryLog.ps1 | 113 ++ .../Reports/Get-EntraBetaAuditSignInLog.ps1 | 115 +++ .../Reports/Get-EntraUnsupportedCommand.ps1 | 8 + ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 93 ++ .../Add-EntraBetaServicePrincipalPolicy.ps1 | 40 + .../Get-EntraBetaAuthorizationPolicy.ps1 | 89 ++ .../Get-EntraBetaConditionalAccessPolicy.ps1 | 90 ++ .../Get-EntraBetaFeatureRolloutPolicy.ps1 | 111 ++ .../SignIns/Get-EntraBetaIdentityProvider.ps1 | 93 ++ .../Get-EntraBetaNamedLocationPolicy.ps1 | 94 ++ .../Get-EntraBetaOAuth2PermissionGrant.ps1 | 100 ++ ...t-EntraBetaPermissionGrantConditionSet.ps1 | 101 ++ .../Get-EntraBetaPermissionGrantPolicy.ps1 | 90 ++ .../SignIns/Get-EntraBetaPolicy.ps1 | 102 ++ .../Get-EntraBetaPolicyAppliedObject.ps1 | 42 + .../Get-EntraBetaServicePrincipalPolicy.ps1 | 48 + .../Get-EntraBetaTrustFrameworkPolicy.ps1 | 55 + ...t-EntraBetaTrustedCertificateAuthority.ps1 | 114 +++ .../SignIns/Get-EntraUnsupportedCommand.ps1 | 8 + .../New-EntraBetaConditionalAccessPolicy.ps1 | 174 ++++ .../New-EntraBetaFeatureRolloutPolicy.ps1 | 119 +++ .../SignIns/New-EntraBetaIdentityProvider.ps1 | 109 ++ .../SignIns/New-EntraBetaInvitation.ps1 | 140 +++ .../New-EntraBetaNamedLocationPolicy.ps1 | 136 +++ .../New-EntraBetaOauth2PermissionGrant.ps1 | 80 ++ ...w-EntraBetaPermissionGrantConditionSet.ps1 | 146 +++ .../New-EntraBetaPermissionGrantPolicy.ps1 | 98 ++ .../SignIns/New-EntraBetaPolicy.ps1 | 101 ++ .../New-EntraBetaTrustFrameworkPolicy.ps1 | 54 + ...w-EntraBetaTrustedCertificateAuthority.ps1 | 77 ++ ...emove-EntraBetaConditionalAccessPolicy.ps1 | 84 ++ .../Remove-EntraBetaFeatureRolloutPolicy.ps1 | 84 ++ ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 91 ++ .../Remove-EntraBetaIdentityProvider.ps1 | 84 ++ .../Remove-EntraBetaNamedLocationPolicy.ps1 | 84 ++ .../Remove-EntraBetaOAuth2PermissionGrant.ps1 | 84 ++ ...e-EntraBetaPermissionGrantConditionSet.ps1 | 98 ++ .../Remove-EntraBetaPermissionGrantPolicy.ps1 | 84 ++ .../SignIns/Remove-EntraBetaPolicy.ps1 | 40 + ...Remove-EntraBetaServicePrincipalPolicy.ps1 | 34 + .../Remove-EntraBetaTrustFrameworkPolicy.ps1 | 84 ++ ...e-EntraBetaTrustedCertificateAuthority.ps1 | 67 ++ .../Set-EntraBetaAuthorizationPolicy.ps1 | 161 +++ .../Set-EntraBetaConditionalAccessPolicy.ps1 | 211 ++++ .../Set-EntraBetaFeatureRolloutPolicy.ps1 | 126 +++ .../SignIns/Set-EntraBetaIdentityProvider.ps1 | 105 ++ .../Set-EntraBetaNamedLocationPolicy.ps1 | 135 +++ ...t-EntraBetaPermissionGrantConditionSet.ps1 | 154 +++ .../Set-EntraBetaPermissionGrantPolicy.ps1 | 98 ++ .../SignIns/Set-EntraBetaPolicy.ps1 | 112 ++ .../Set-EntraBetaTrustFrameworkPolicy.ps1 | 61 ++ ...t-EntraBetaTrustedCertificateAuthority.ps1 | 83 ++ .../Users/Get-EntraBetaUser.ps1 | 140 +++ .../Get-EntraBetaUserAppRoleAssignment.ps1 | 107 ++ .../Users/Get-EntraBetaUserCreatedObject.ps1 | 120 +++ .../Users/Get-EntraBetaUserDirectReport.ps1 | 68 ++ .../Users/Get-EntraBetaUserExtension.ps1 | 43 + .../Users/Get-EntraBetaUserLicenseDetail.ps1 | 90 ++ .../Users/Get-EntraBetaUserManager.ps1 | 93 ++ .../Users/Get-EntraBetaUserMembership.ps1 | 108 ++ ...Get-EntraBetaUserOAuth2PermissionGrant.ps1 | 107 ++ .../Users/Get-EntraBetaUserOwnedDevice.ps1 | 103 ++ .../Users/Get-EntraBetaUserOwnedObject.ps1 | 60 ++ .../Get-EntraBetaUserRegisteredDevice.ps1 | 103 ++ .../Users/Get-EntraBetaUserThumbnailPhoto.ps1 | 111 ++ .../Users/Get-EntraUnsupportedCommand.ps1 | 8 + .../Users/New-EntraBetaUser.ps1 | 287 ++++++ .../New-EntraBetaUserAppRoleAssignment.ps1 | 105 ++ .../Users/Remove-EntraBetaUser.ps1 | 84 ++ .../Remove-EntraBetaUserAppRoleAssignment.ps1 | 91 ++ .../Users/Remove-EntraBetaUserExtension.ps1 | 99 ++ .../Users/Remove-EntraBetaUserManager.ps1 | 84 ++ .../Users/Set-EntraBetaUser.ps1 | 328 ++++++ .../Users/Set-EntraBetaUserExtension.ps1 | 106 ++ .../Users/Set-EntraBetaUserLicense.ps1 | 54 + .../Users/Set-EntraBetaUserManager.ps1 | 93 ++ .../Users/Set-EntraBetaUserPassword.ps1 | 102 ++ .../Users/Set-EntraBetaUserThumbnailPhoto.ps1 | 108 ++ .../Update-EntraBetaSignedInUserPassword.ps1 | 49 + .../Update-EntraBetaUserFromFederated.ps1 | 83 ++ .../Enable-EntraAzureADAlias.ps1 | 308 ++++++ .../Get-EntraBetaDirSyncfeature.ps1 | 89 ++ .../Get-EntraUnsupportedCommand.ps1 | 8 + .../New-EntraBetaCustomHeaders.ps1 | 29 + .../UnMappedFiles/Test-EntraScript.ps1 | 139 +++ .../EntraBeta/config/moduleMapping.json | 303 +++++- .../Add-EntraBetaApplicationOwner.md | 106 ++ .../Add-EntraBetaApplicationPolicy.md | 102 ++ ...ncipalDelegatedPermissionClassification.md | 163 +++ .../Add-EntraBetaServicePrincipalOwner.md | 109 ++ .../Applications/Get-EntraBetaApplication.md | 275 +++++ ...t-EntraBetaApplicationExtensionProperty.md | 106 ++ .../Get-EntraBetaApplicationKeyCredential.md | 87 ++ .../Get-EntraBetaApplicationLogo.md | 136 +++ .../Get-EntraBetaApplicationOwner.md | 211 ++++ ...-EntraBetaApplicationPasswordCredential.md | 106 ++ .../Get-EntraBetaApplicationPolicy.md | 89 ++ ...et-EntraBetaApplicationProxyApplication.md | 114 +++ ...plicationProxyApplicationConnectorGroup.md | 95 ++ .../Get-EntraBetaApplicationProxyConnector.md | 243 +++++ ...EntraBetaApplicationProxyConnectorGroup.md | 248 +++++ ...taApplicationProxyConnectorGroupMembers.md | 178 ++++ ...raBetaApplicationProxyConnectorMemberOf.md | 92 ++ ...Get-EntraBetaApplicationServiceEndpoint.md | 165 +++ .../Get-EntraBetaApplicationTemplate.md | 123 +++ .../Get-EntraBetaDeletedApplication.md | 257 +++++ ...EntraBetaPasswordSingleSignOnCredential.md | 117 +++ .../Get-EntraBetaServicePrincipal.md | 369 +++++++ ...raBetaServicePrincipalAppRoleAssignedTo.md | 200 ++++ ...raBetaServicePrincipalAppRoleAssignment.md | 198 ++++ ...-EntraBetaServicePrincipalCreatedObject.md | 157 +++ ...ncipalDelegatedPermissionClassification.md | 205 ++++ ...-EntraBetaServicePrincipalKeyCredential.md | 88 ++ ...Get-EntraBetaServicePrincipalMembership.md | 179 ++++ ...taServicePrincipalOAuth2PermissionGrant.md | 178 ++++ ...et-EntraBetaServicePrincipalOwnedObject.md | 194 ++++ .../Get-EntraBetaServicePrincipalOwner.md | 216 ++++ ...aBetaServicePrincipalPasswordCredential.md | 92 ++ .../Applications/New-EntraBetaApplication.md | 565 ++++++++++ ...w-EntraBetaApplicationExtensionProperty.md | 215 ++++ ...aBetaApplicationFromApplicationTemplate.md | 86 ++ .../New-EntraBetaApplicationKey.md | 153 +++ .../New-EntraBetaApplicationKeyCredential.md | 257 +++++ .../New-EntraBetaApplicationPassword.md | 120 +++ ...-EntraBetaApplicationPasswordCredential.md | 212 ++++ ...ew-EntraBetaApplicationProxyApplication.md | 388 +++++++ ...EntraBetaApplicationProxyConnectorGroup.md | 99 ++ ...EntraBetaPasswordSingleSignOnCredential.md | 121 +++ .../New-EntraBetaServicePrincipal.md | 407 ++++++++ ...raBetaServicePrincipalAppRoleAssignment.md | 231 +++++ ...aBetaServicePrincipalPasswordCredential.md | 168 +++ .../Remove-EntraBetaApplication.md | 84 ++ ...e-EntraBetaApplicationExtensionProperty.md | 106 ++ .../Remove-EntraBetaApplicationKey.md | 133 +++ ...emove-EntraBetaApplicationKeyCredential.md | 107 ++ .../Remove-EntraBetaApplicationOwner.md | 105 ++ .../Remove-EntraBetaApplicationPassword.md | 104 ++ ...-EntraBetaApplicationPasswordCredential.md | 103 ++ .../Remove-EntraBetaApplicationPolicy.md | 102 ++ ...ve-EntraBetaApplicationProxyApplication.md | 119 +++ ...plicationProxyApplicationConnectorGroup.md | 89 ++ ...EntraBetaApplicationProxyConnectorGroup.md | 90 ++ ...e-EntraBetaApplicationVerifiedPublisher.md | 84 ++ .../Remove-EntraBetaDeletedApplication.md | 92 ++ .../Remove-EntraBetaDeletedDirectoryObject.md | 96 ++ ...EntraBetaPasswordSingleSignOnCredential.md | 108 ++ .../Remove-EntraBetaServicePrincipal.md | 86 ++ ...raBetaServicePrincipalAppRoleAssignment.md | 123 +++ ...ncipalDelegatedPermissionClassification.md | 106 ++ .../Remove-EntraBetaServicePrincipalOwner.md | 106 ++ ...aBetaServicePrincipalPasswordCredential.md | 106 ++ .../Restore-EntraBetaDeletedApplication.md | 127 +++ ...aBetaGroupIdsServicePrincipalIsMemberOf.md | 110 ++ .../Applications/Set-EntraBetaApplication.md | 560 ++++++++++ .../Set-EntraBetaApplicationLogo.md | 126 +++ ...et-EntraBetaApplicationProxyApplication.md | 387 +++++++ ...plicationProxyApplicationConnectorGroup.md | 112 ++ ...ApplicationProxyApplicationSingleSignOn.md | 168 +++ .../Set-EntraBetaApplicationProxyConnector.md | 105 ++ ...EntraBetaApplicationProxyConnectorGroup.md | 103 ++ ...t-EntraBetaApplicationVerifiedPublisher.md | 111 ++ ...EntraBetaPasswordSingleSignOnCredential.md | 113 ++ .../Set-EntraBetaServicePrincipal.md | 440 ++++++++ .../Authentication/Connect-Entra.md | 583 +++++++++++ .../Authentication/Disconnect-Entra.md | 78 ++ .../Authentication/Get-EntraContext.md | 130 +++ ...ntraBetaStrongAuthenticationMethodByUpn.md | 79 ++ ...ke-EntraBetaSignedInUserAllRefreshToken.md | 72 ++ .../Revoke-EntraBetaUserAllRefreshToken.md | 90 ++ .../Add-EntraBetaAdministrativeUnitMember.md | 113 ++ ...SecurityAttributeDefinitionAllowedValue.md | 138 +++ .../Add-EntraBetaDeviceRegisteredOwner.md | 108 ++ .../Add-EntraBetaDeviceRegisteredUser.md | 108 ++ .../Add-EntraBetaDirectoryRoleMember.md | 104 ++ .../Add-EntraBetaScopedRoleMembership.md | 137 +++ .../Confirm-EntraBetaDomain.md | 109 ++ .../Enable-EntraBetaDirectoryRole.md | 94 ++ .../Get-EntraBetaAccountSku.md | 117 +++ .../Get-EntraBetaAdministrativeUnit.md | 243 +++++ .../Get-EntraBetaAdministrativeUnitMember.md | 195 ++++ .../Get-EntraBetaAttributeSet.md | 145 +++ .../Get-EntraBetaContact.md | 235 +++++ .../Get-EntraBetaContactDirectReport.md | 157 +++ .../Get-EntraBetaContactManager.md | 97 ++ .../Get-EntraBetaContactMembership.md | 175 ++++ .../Get-EntraBetaContract.md | 196 ++++ ...raBetaCustomSecurityAttributeDefinition.md | 142 +++ ...SecurityAttributeDefinitionAllowedValue.md | 205 ++++ .../Get-EntraBetaDeletedDirectoryObject.md | 125 +++ .../Get-EntraBetaDevice.md | 278 +++++ .../Get-EntraBetaDeviceRegisteredOwner.md | 196 ++++ .../Get-EntraBetaDeviceRegisteredUser.md | 180 ++++ .../Get-EntraBetaDirSyncConfiguration.md | 106 ++ .../Get-EntraBetaDirSyncFeature.md | 153 +++ ...ectoryObjectOnPremisesProvisioningError.md | 104 ++ .../Get-EntraBetaDirectoryRole.md | 182 ++++ .../Get-EntraBetaDirectoryRoleMember.md | 106 ++ .../Get-EntraBetaDirectoryRoleTemplate.md | 101 ++ .../Get-EntraBetaDirectorySetting.md | 193 ++++ .../Get-EntraBetaDirectorySettingTemplate.md | 127 +++ .../Get-EntraBetaDomain.md | 147 +++ .../Get-EntraBetaDomainFederationSettings.md | 131 +++ .../Get-EntraBetaDomainNameReference.md | 112 ++ ...traBetaDomainServiceConfigurationRecord.md | 113 ++ ...et-EntraBetaDomainVerificationDnsRecord.md | 113 ++ .../Get-EntraBetaFederationProperty.md | 90 ++ .../Get-EntraBetaPartnerInformation.md | 135 +++ .../Get-EntraBetaPasswordPolicy.md | 101 ++ .../Get-EntraBetaScopedRoleMembership.md | 147 +++ .../Get-EntraBetaSubscribedSku.md | 229 +++++ .../Get-EntraBetaTenantDetail.md | 169 +++ .../New-EntraBetaAdministrativeUnit.md | 171 ++++ .../New-EntraBetaAdministrativeUnitMember.md | 368 +++++++ .../New-EntraBetaAttributeSet.md | 136 +++ ...raBetaCustomSecurityAttributeDefinition.md | 233 +++++ .../New-EntraBetaDevice.md | 339 ++++++ .../New-EntraBetaDirectorySetting.md | 96 ++ .../New-EntraBetaDomain.md | 159 +++ .../Remove-EntraBetaAdministrativeUnit.md | 86 ++ ...emove-EntraBetaAdministrativeUnitMember.md | 109 ++ .../Remove-EntraBetaContact.md | 80 ++ .../Remove-EntraBetaDevice.md | 86 ++ .../Remove-EntraBetaDeviceRegisteredOwner.md | 102 ++ .../Remove-EntraBetaDeviceRegisteredUser.md | 100 ++ .../Remove-EntraBetaDirectoryRoleMember.md | 104 ++ .../Remove-EntraBetaDirectorySetting.md | 95 ++ .../Remove-EntraBetaDomain.md | 92 ++ .../Remove-EntraBetaScopedRoleMembership.md | 106 ++ ...Restore-EntraBetaDeletedDirectoryObject.md | 155 +++ .../Set-EntraBetaAdministrativeUnit.md | 178 ++++ .../Set-EntraBetaAttributeSet.md | 147 +++ ...raBetaCustomSecurityAttributeDefinition.md | 147 +++ ...SecurityAttributeDefinitionAllowedValue.md | 127 +++ .../Set-EntraBetaDevice.md | 387 +++++++ .../Set-EntraBetaDirSyncConfiguration.md | 154 +++ .../Set-EntraBetaDirSyncEnabled.md | 144 +++ .../Set-EntraBetaDirSyncFeature.md | 190 ++++ .../Set-EntraBetaDirectorySetting.md | 111 ++ .../Set-EntraBetaDomain.md | 135 +++ .../Set-EntraBetaDomainFederationSettings.md | 315 ++++++ .../Set-EntraBetaPartnerInformation.md | 242 +++++ .../Set-EntraBetaTenantDetail.md | 216 ++++ .../Get-EntraBetaDirectoryRoleAssignment.md | 282 +++++ .../Get-EntraBetaDirectoryRoleDefinition.md | 276 +++++ .../Get-EntraBetaPrivilegedResource.md | 232 +++++ .../Governance/Get-EntraBetaPrivilegedRole.md | 106 ++ .../Get-EntraBetaPrivilegedRoleDefinition.md | 263 +++++ .../Get-EntraBetaPrivilegedRoleSetting.md | 243 +++++ .../New-EntraBetaDirectoryRoleAssignment.md | 136 +++ .../New-EntraBetaDirectoryRoleDefinition.md | 347 +++++++ .../New-EntraBetaPrivilegedRoleAssignment.md | 136 +++ ...Remove-EntraBetaDirectoryRoleAssignment.md | 88 ++ ...Remove-EntraBetaDirectoryRoleDefinition.md | 92 ++ .../Set-EntraBetaDirectoryRoleDefinition.md | 298 ++++++ ...ntraBetaPrivilegedRoleAssignmentRequest.md | 139 +++ .../Set-EntraBetaPrivilegedRoleSetting.md | 314 ++++++ .../Groups/Add-EntraBetaGroupMember.md | 105 ++ .../Groups/Add-EntraBetaGroupOwner.md | 108 ++ .../Add-EntraBetaLifecyclePolicyGroup.md | 111 ++ .../Groups/Get-EntraBetaDeletedGroup.md | 283 +++++ .../Groups/Get-EntraBetaGroup.md | 308 ++++++ .../Get-EntraBetaGroupAppRoleAssignment.md | 181 ++++ .../Get-EntraBetaGroupLifecyclePolicy.md | 140 +++ .../Groups/Get-EntraBetaGroupMember.md | 214 ++++ .../Groups/Get-EntraBetaGroupOwner.md | 183 ++++ .../Get-EntraBetaGroupPermissionGrant.md | 106 ++ .../Get-EntraBetaLifecyclePolicyGroup.md | 110 ++ .../Groups/Get-EntraBetaObjectByObjectId.md | 140 +++ .../Groups/Get-EntraBetaObjectSetting.md | 262 +++++ .../Groups/New-EntraBetaGroup.md | 446 ++++++++ .../New-EntraBetaGroupAppRoleAssignment.md | 148 +++ .../New-EntraBetaGroupLifecyclePolicy.md | 138 +++ .../Groups/New-EntraBetaObjectSetting.md | 131 +++ .../Groups/Remove-EntraBetaGroup.md | 94 ++ .../Remove-EntraBetaGroupAppRoleAssignment.md | 103 ++ .../Remove-EntraBetaGroupLifecyclePolicy.md | 86 ++ .../Groups/Remove-EntraBetaGroupMember.md | 103 ++ .../Groups/Remove-EntraBetaGroupOwner.md | 107 ++ .../Remove-EntraBetaLifecyclePolicyGroup.md | 117 +++ .../Groups/Remove-EntraBetaObjectSetting.md | 126 +++ .../Groups/Reset-EntraBetaLifeCycleGroup.md | 84 ++ ...lect-EntraBetaGroupIdsContactIsMemberOf.md | 99 ++ ...Select-EntraBetaGroupIdsGroupIsMemberOf.md | 101 ++ .../Select-EntraBetaGroupIdsUserIsMemberOf.md | 109 ++ .../Groups/Set-EntraBetaGroup.md | 373 +++++++ .../Set-EntraBetaGroupLifecyclePolicy.md | 160 +++ .../Groups/Set-EntraBetaObjectSetting.md | 148 +++ ...ntraBetaPrivateAccessApplicationSegment.md | 130 +++ ...ntraBetaPrivateAccessApplicationSegment.md | 223 ++++ ...ntraBetaPrivateAccessApplicationSegment.md | 105 ++ ...traBetaApplicationSignInDetailedSummary.md | 153 +++ .../Get-EntraBetaApplicationSignInSummary.md | 166 +++ .../Reports/Get-EntraBetaAuditDirectoryLog.md | 183 ++++ .../Reports/Get-EntraBetaAuditSignInLog.md | 198 ++++ ...BetaFeatureRolloutPolicyDirectoryObject.md | 106 ++ .../Add-EntraBetaServicePrincipalPolicy.md | 102 ++ .../Get-EntraBetaAuthorizationPolicy.md | 148 +++ .../Get-EntraBetaConditionalAccessPolicy.md | 136 +++ .../Get-EntraBetaFeatureRolloutPolicy.md | 209 ++++ .../SignIns/Get-EntraBetaIdentityProvider.md | 140 +++ .../Get-EntraBetaNamedLocationPolicy.md | 138 +++ .../Get-EntraBetaOAuth2PermissionGrant.md | 190 ++++ ...et-EntraBetaPermissionGrantConditionSet.md | 216 ++++ .../Get-EntraBetaPermissionGrantPolicy.md | 135 +++ .../SignIns/Get-EntraBetaPolicy.md | 197 ++++ .../Get-EntraBetaPolicyAppliedObject.md | 86 ++ .../Get-EntraBetaServicePrincipalPolicy.md | 89 ++ .../Get-EntraBetaTrustFrameworkPolicy.md | 167 +++ ...et-EntraBetaTrustedCertificateAuthority.md | 165 +++ .../New-EntraBetaConditionalAccessPolicy.md | 311 ++++++ .../New-EntraBetaFeatureRolloutPolicy.md | 224 ++++ .../SignIns/New-EntraBetaIdentityProvider.md | 172 ++++ .../SignIns/New-EntraBetaInvitation.md | 335 ++++++ .../New-EntraBetaNamedLocationPolicy.md | 236 +++++ .../New-EntraBetaOauth2PermissionGrant.md | 220 ++++ ...ew-EntraBetaPermissionGrantConditionSet.md | 372 +++++++ .../New-EntraBetaPermissionGrantPolicy.md | 133 +++ .../SignIns/New-EntraBetaPolicy.md | 254 +++++ .../New-EntraBetaTrustFrameworkPolicy.md | 193 ++++ ...ew-EntraBetaTrustedCertificateAuthority.md | 98 ++ ...Remove-EntraBetaConditionalAccessPolicy.md | 87 ++ .../Remove-EntraBetaFeatureRolloutPolicy.md | 88 ++ ...BetaFeatureRolloutPolicyDirectoryObject.md | 107 ++ .../Remove-EntraBetaIdentityProvider.md | 91 ++ .../Remove-EntraBetaNamedLocationPolicy.md | 88 ++ .../Remove-EntraBetaOAuth2PermissionGrant.md | 84 ++ ...ve-EntraBetaPermissionGrantConditionSet.md | 130 +++ .../Remove-EntraBetaPermissionGrantPolicy.md | 85 ++ .../SignIns/Remove-EntraBetaPolicy.md | 84 ++ .../Remove-EntraBetaServicePrincipalPolicy.md | 102 ++ .../Remove-EntraBetaTrustFrameworkPolicy.md | 91 ++ ...ve-EntraBetaTrustedCertificateAuthority.md | 92 ++ .../Set-EntraBetaAuthorizationPolicy.md | 288 ++++++ .../Set-EntraBetaConditionalAccessPolicy.md | 274 +++++ .../Set-EntraBetaFeatureRolloutPolicy.md | 231 +++++ .../SignIns/Set-EntraBetaIdentityProvider.md | 196 ++++ .../Set-EntraBetaNamedLocationPolicy.md | 258 +++++ ...et-EntraBetaPermissionGrantConditionSet.md | 309 ++++++ .../Set-EntraBetaPermissionGrantPolicy.md | 143 +++ .../SignIns/Set-EntraBetaPolicy.md | 212 ++++ .../Set-EntraBetaTrustFrameworkPolicy.md | 222 ++++ ...et-EntraBetaTrustedCertificateAuthority.md | 93 ++ .../Users/Get-EntraBetaUser.md | 427 ++++++++ .../Get-EntraBetaUserAppRoleAssignment.md | 184 ++++ .../Users/Get-EntraBetaUserCreatedObject.md | 174 ++++ .../Users/Get-EntraBetaUserDirectReport.md | 171 ++++ .../Users/Get-EntraBetaUserExtension.md | 112 ++ .../Users/Get-EntraBetaUserLicenseDetail.md | 105 ++ .../Users/Get-EntraBetaUserManager.md | 142 +++ .../Users/Get-EntraBetaUserMembership.md | 218 ++++ .../Get-EntraBetaUserOAuth2PermissionGrant.md | 202 ++++ .../Users/Get-EntraBetaUserOwnedDevice.md | 165 +++ .../Users/Get-EntraBetaUserOwnedObject.md | 200 ++++ .../Get-EntraBetaUserRegisteredDevice.md | 166 +++ .../Users/Get-EntraBetaUserThumbnailPhoto.md | 109 ++ .../Users/New-EntraBetaUser.md | 812 +++++++++++++++ .../New-EntraBetaUserAppRoleAssignment.md | 207 ++++ .../Users/Remove-EntraBetaUser.md | 86 ++ .../Remove-EntraBetaUserAppRoleAssignment.md | 105 ++ .../Users/Remove-EntraBetaUserExtension.md | 130 +++ .../Users/Remove-EntraBetaUserManager.md | 83 ++ .../Users/Set-EntraBetaUser.md | 678 ++++++++++++ .../Users/Set-EntraBetaUserExtension.md | 152 +++ .../Users/Set-EntraBetaUserLicense.md | 213 ++++ .../Users/Set-EntraBetaUserManager.md | 101 ++ .../Users/Set-EntraBetaUserPassword.md | 164 +++ .../Users/Set-EntraBetaUserThumbnailPhoto.md | 162 +++ .../Update-EntraBetaSignedInUserPassword.md | 105 ++ .../Update-EntraBetaUserFromFederated.md | 105 ++ src/EntraModuleBuilder.ps1 | 45 +- src/EntraModuleSplitter.ps1 | 8 +- .../Add-EntraApplicationOwner.Tests.ps1 | 55 + ...elegatedPermissionClassification.Tests.ps1 | 70 ++ .../Add-EntraServicePrincipalOwner.Tests.ps1 | 84 ++ testVNext/Entra/Applications/Entra.Tests.ps1 | 31 + .../Get-EntraApplication.Tests.ps1 | 154 +++ ...ntraApplicationExtensionProperty.Tests.ps1 | 89 ++ ...et-EntraApplicationKeyCredential.Tests.ps1 | 65 ++ .../Get-EntraApplicationLogo.Tests.ps1 | 81 ++ .../Get-EntraApplicationModule.Tests.ps1 | 45 + .../Get-EntraApplicationOwner.Tests.ps1 | 87 ++ ...traApplicationPasswordCredential.Tests.ps1 | 80 ++ .../Get-EntraApplicationTemplate.Tests.ps1 | 88 ++ .../Get-EntraDeletedApplication.Tests.ps1 | 132 +++ .../Get-EntraServicePrincipal.Tests.ps1 | 215 ++++ ...ervicePrincipalAppRoleAssignedTo.Tests.ps1 | 105 ++ ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 106 ++ ...elegatedPermissionClassification.Tests.ps1 | 97 ++ ...traServicePrincipalKeyCredential.Tests.ps1 | 95 ++ ...-EntraServicePrincipalMembership.Tests.ps1 | 92 ++ ...cePrincipalOAuth2PermissionGrant.Tests.ps1 | 96 ++ ...EntraServicePrincipalOwnedObject.Tests.ps1 | 98 ++ .../Get-EntraServicePrincipalOwner.Tests.ps1 | 116 +++ ...rvicePrincipalPasswordCredential.Tests.ps1 | 98 ++ .../Entra/Applications/Invalid.Tests.ps1 | 105 ++ testVNext/Entra/Applications/Module.Tests.ps1 | 52 + .../New-EntraApplication.Tests.ps1 | 77 ++ ...ntraApplicationExtensionProperty.Tests.ps1 | 102 ++ ...plicationFromApplicationTemplate.Tests.ps1 | 147 +++ .../New-EntraApplicationPassword.Tests.ps1 | 91 ++ ...traApplicationPasswordCredential.Tests.ps1 | 97 ++ .../New-EntraServicePrincipal.Tests.ps1 | 122 +++ ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 99 ++ ...rvicePrincipalPasswordCredential.Tests.ps1 | 96 ++ .../Remove-EntraApplication.Tests.ps1 | 52 + ...ntraApplicationExtensionProperty.Tests.ps1 | 72 ++ .../Remove-EntraApplicationOwner.Tests.ps1 | 66 ++ .../Remove-EntraApplicationPassword.Tests.ps1 | 61 ++ ...traApplicationPasswordCredential.Tests.ps1 | 69 ++ .../Remove-EntraDeletedApplication.Tests.ps1 | 62 ++ ...move-EntraDeletedDirectoryObject.Tests.ps1 | 64 ++ .../Remove-EntraServicePrincipal.Tests.ps1 | 66 ++ ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 67 ++ ...elegatedPermissionClassification.Tests.ps1 | 67 ++ ...emove-EntraServicePrincipalOwner.Tests.ps1 | 80 ++ ...rvicePrincipalPasswordCredential.Tests.ps1 | 73 ++ .../Restore-EntraDeletedApplication.Tests.ps1 | 110 ++ ...oupIdsServicePrincipalIsMemberOf.Tests.ps1 | 76 ++ .../Set-EntraApplication.Tests.ps1 | 69 ++ .../Set-EntraApplicationLogo.Tests.ps1 | 62 ++ .../Set-EntraServicePrincipal.Tests.ps1 | 90 ++ testVNext/Entra/Applications/Valid.Tests.ps1 | 109 ++ .../Authentication/Connect-Entra.Tests.ps1 | 100 ++ .../Authentication/Disconnect-Entra.Tests.ps1 | 36 + .../Entra/Authentication/Entra.Tests.ps1 | 31 + .../Entra/Authentication/Invalid.Tests.ps1 | 105 ++ .../Entra/Authentication/Module.Tests.ps1 | 52 + ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 68 ++ ...EntraSignedInUserAllRefreshToken.Tests.ps1 | 58 ++ .../Revoke-EntraUserAllRefreshToken.Tests.ps1 | 68 ++ .../Entra/Authentication/Valid.Tests.ps1 | 109 ++ ...dd-EntraAdministrativeUnitMember.Tests.ps1 | 62 ++ ...yAttributeDefinitionAllowedValue.Tests.ps1 | 73 ++ .../Add-EntraDeviceRegisteredOwner.Tests.ps1 | 86 ++ .../Add-EntraDeviceRegisteredUser.Tests.ps1 | 88 ++ .../Add-EntraDirectoryRoleMember.Tests.ps1 | 81 ++ .../Add-EntraScopedRoleMembership.Tests.ps1 | 83 ++ .../Enable-EntraDirectoryRole.Tests.ps1 | 49 + .../Entra/DirectoryManagement/Entra.Tests.ps1 | 31 + .../Get-EntraAccountSku.Tests.ps1 | 76 ++ .../Get-EntraAdministrativeUnit.Tests.ps1 | 94 ++ ...et-EntraAdministrativeUnitMember.Tests.ps1 | 85 ++ .../Get-EntraAttributeSet.Tests.ps1 | 78 ++ .../Get-EntraAuditDirectoryLog.Tests.ps1 | 114 +++ .../Get-EntraContact.Tests.ps1 | 174 ++++ .../Get-EntraContactMembership.Tests.ps1 | 134 +++ ...ustomSecurityAttributeDefinition.Tests.ps1 | 78 ++ ...yAttributeDefinitionAllowedValue.Tests.ps1 | 86 ++ .../Get-EntraDeletedDirectoryObject.Tests.ps1 | 82 ++ .../Get-EntraDevice.Tests.ps1 | 158 +++ .../Get-EntraDeviceRegisteredOwner.Tests.ps1 | 146 +++ .../Get-EntraDeviceRegisteredUser.Tests.ps1 | 146 +++ .../Get-EntraDirSyncConfiguration.Tests.ps1 | 69 ++ .../Get-EntraDirSyncFeatures.Tests.ps1 | 85 ++ ...bjectOnPremisesProvisioningError.Tests.ps1 | 57 ++ .../Get-EntraDirectoryRole.Tests.ps1 | 100 ++ ...Get-EntraDirectoryRoleAssignment.Tests.ps1 | 129 +++ ...Get-EntraDirectoryRoleDefinition.Tests.ps1 | 145 +++ .../Get-EntraDirectoryRoleMember.Tests.ps1 | 105 ++ .../Get-EntraDirectoryRoleTemplate.Tests.ps1 | 76 ++ .../Get-EntraDomain.Tests.ps1 | 105 ++ ...et-EntraDomainFederationSettings.Tests.ps1 | 84 ++ .../Get-EntraDomainNameReference.Tests.ps1 | 111 ++ ...DomainServiceConfigurationRecord.Tests.ps1 | 103 ++ ...EntraDomainVerificationDnsRecord.Tests.ps1 | 104 ++ .../Get-EntraFederationProperty.Tests.ps1 | 83 ++ .../Get-EntraObjectByObjectId.Tests.ps1 | 107 ++ .../Get-EntraPasswordPolicy.Tests.ps1 | 70 ++ .../Get-EntraScopedRoleMembership.Tests.ps1 | 86 ++ .../Get-EntraSubscribedSku.Tests.ps1 | 101 ++ .../Get-EntraTenantDetail.Tests.ps1 | 101 ++ .../Get-EntraUserDirectReport.Tests.ps1 | 140 +++ .../DirectoryManagement/Invalid.Tests.ps1 | 105 ++ .../DirectoryManagement/Module.Tests.ps1 | 52 + .../New-EntraAdministrativeUnit.Tests.ps1 | 67 ++ .../New-EntraAttributeSet.Tests.ps1 | 82 ++ ...ustomSecurityAttributeDefinition.Tests.ps1 | 105 ++ ...New-EntraDirectoryRoleAssignment.Tests.ps1 | 88 ++ ...New-EntraDirectoryRoleDefinition.Tests.ps1 | 130 +++ .../New-EntraDomain.Tests.ps1 | 112 ++ .../Remove-EntraAdministrativeUnit.Tests.ps1 | 54 + ...ve-EntraAdministrativeUnitMember.Tests.ps1 | 68 ++ ...move-EntraDeletedDirectoryObject.Tests.ps1 | 64 ++ .../Remove-EntraDevice.Tests.ps1 | 68 ++ ...emove-EntraDeviceRegisteredOwner.Tests.ps1 | 82 ++ ...Remove-EntraDeviceRegisteredUser.Tests.ps1 | 82 ++ ...ove-EntraDirectoryRoleAssignment.Tests.ps1 | 66 ++ ...ove-EntraDirectoryRoleDefinition.Tests.ps1 | 66 ++ .../Remove-EntraDirectoryRoleMember.Tests.ps1 | 80 ++ .../Remove-EntraDomain.Tests.ps1 | 66 ++ ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 59 ++ ...Remove-EntraScopedRoleMembership.Tests.ps1 | 65 ++ ...tore-EntraDeletedDirectoryObject.Tests.ps1 | 77 ++ .../Set-EntraAdministrativeUnit.Tests.ps1 | 55 + .../Set-EntraAttributeSet.Tests.ps1 | 65 ++ ...ustomSecurityAttributeDefinition.Tests.ps1 | 52 + ...yAttributeDefinitionAllowedValue.Tests.ps1 | 66 ++ .../Set-EntraDevice.Tests.ps1 | 68 ++ .../Set-EntraDirSyncConfiguration.Tests.ps1 | 75 ++ .../Set-EntraDirSyncEnabled.Tests.ps1 | 64 ++ .../Set-EntraDirSyncFeature.Tests.ps1 | 83 ++ ...Set-EntraDirectoryRoleDefinition.Tests.ps1 | 110 ++ .../Set-EntraDomain.Tests.ps1 | 76 ++ ...et-EntraDomainFederationSettings.Tests.ps1 | 100 ++ .../Set-EntraPartnerInformation.Tests.ps1 | 89 ++ .../Set-EntraTenantDetail.Tests.ps1 | 65 ++ .../Entra/DirectoryManagement/Valid.Tests.ps1 | 109 ++ testVNext/Entra/Governance/Entra.Tests.ps1 | 31 + ...Get-EntraDirectoryRoleAssignment.Tests.ps1 | 129 +++ ...Get-EntraDirectoryRoleDefinition.Tests.ps1 | 145 +++ testVNext/Entra/Governance/Invalid.Tests.ps1 | 105 ++ testVNext/Entra/Governance/Module.Tests.ps1 | 53 + ...New-EntraDirectoryRoleAssignment.Tests.ps1 | 88 ++ ...New-EntraDirectoryRoleDefinition.Tests.ps1 | 130 +++ ...ove-EntraDirectoryRoleAssignment.Tests.ps1 | 66 ++ ...ove-EntraDirectoryRoleDefinition.Tests.ps1 | 66 ++ ...Set-EntraDirectoryRoleDefinition.Tests.ps1 | 110 ++ testVNext/Entra/Governance/Valid.Tests.ps1 | 109 ++ .../Groups/Add-EntraGroupMember.Tests.ps1 | 81 ++ .../Groups/Add-EntraGroupOwner.Tests.ps1 | 70 ++ .../Add-EntraLifecyclePolicyGroup.Tests.ps1 | 78 ++ testVNext/Entra/Groups/Entra.Tests.ps1 | 31 + .../Groups/Get-EntraDeletedGroup.Tests.ps1 | 150 +++ .../Entra/Groups/Get-EntraGroup.Tests.ps1 | 120 +++ .../Get-EntraGroupAppRoleAssignment.Tests.ps1 | 141 +++ .../Get-EntraGroupLifecyclePolicy.Tests.ps1 | 110 ++ .../Groups/Get-EntraGroupMember.Tests.ps1 | 109 ++ .../Groups/Get-EntraGroupOwner.Tests.ps1 | 141 +++ .../Get-EntraLifecyclePolicyGroup.Tests.ps1 | 106 ++ .../Groups/Get-EntraObjectSetting.Tests.ps1 | 88 ++ testVNext/Entra/Groups/Invalid.Tests.ps1 | 105 ++ testVNext/Entra/Groups/Module.Tests.ps1 | 52 + .../Entra/Groups/New-EntraGroup.Tests.ps1 | 76 ++ .../New-EntraGroupAppRoleAssignment.Tests.ps1 | 117 +++ .../New-EntraGroupLifecyclePolicy.Tests.ps1 | 87 ++ .../Entra/Groups/Remove-EntraGroup.Tests.ps1 | 68 ++ ...move-EntraGroupAppRoleAssignment.Tests.ps1 | 72 ++ ...Remove-EntraGroupLifecyclePolicy.Tests.ps1 | 70 ++ .../Groups/Remove-EntraGroupMember.Tests.ps1 | 73 ++ .../Groups/Remove-EntraGroupOwner.Tests.ps1 | 73 ++ ...Remove-EntraLifecyclePolicyGroup.Tests.ps1 | 92 ++ .../Reset-EntraLifeCycleGroup.Tests.ps1 | 65 ++ ...t-EntraGroupIdsContactIsMemberOf.Tests.ps1 | 89 ++ ...ect-EntraGroupIdsGroupIsMemberOf.Tests.ps1 | 103 ++ ...lect-EntraGroupIdsUserIsMemberOf.Tests.ps1 | 79 ++ .../Entra/Groups/Set-EntraGroup.Tests.ps1 | 67 ++ .../Set-EntraGroupLifecyclePolicy.Tests.ps1 | 91 ++ testVNext/Entra/Groups/Valid.Tests.ps1 | 109 ++ testVNext/Entra/New-EntraInvitation.Tests.ps1 | 230 +++++ testVNext/Entra/Reports/Entra.Tests.ps1 | 31 + .../Get-EntraAuditDirectoryLog.Tests.ps1 | 114 +++ .../Reports/Get-EntraAuditSignInLog.Tests.ps1 | 122 +++ testVNext/Entra/Reports/Invalid.Tests.ps1 | 105 ++ testVNext/Entra/Reports/Module.Tests.ps1 | 53 + testVNext/Entra/Reports/Valid.Tests.ps1 | 109 ++ testVNext/Entra/SignIns/Entra.Tests.ps1 | 31 + .../Get-EntraAuthorizationPolicy.Tests.ps1 | 103 ++ ...Get-EntraConditionalAccessPolicy.Tests.ps1 | 117 +++ .../Get-EntraFeatureRolloutPolicy.Tests.ps1 | 97 ++ .../Get-EntraIdentityProvider.Tests.ps1 | 105 ++ .../Get-EntraOAuth2PermissionGrant.Tests.ps1 | 114 +++ ...EntraPermissionGrantConditionSet.Tests.ps1 | 89 ++ .../Get-EntraPermissionGrantPolicy.Tests.ps1 | 89 ++ .../Entra/SignIns/Get-EntraPolicy.Tests.ps1 | 110 ++ ...EntraTrustedCertificateAuthority.Tests.ps1 | 92 ++ testVNext/Entra/SignIns/Invalid.Tests.ps1 | 105 ++ testVNext/Entra/SignIns/Module.Tests.ps1 | 52 + ...New-EntraConditionalAccessPolicy.Tests.ps1 | 177 ++++ .../New-EntraFeatureRolloutPolicy.Tests.ps1 | 86 ++ .../New-EntraIdentityProvider.Tests.ps1 | 110 ++ .../New-EntraNamedLocationPolicy.Tests.ps1 | 122 +++ .../New-EntraOauth2PermissionGrant.Tests.ps1 | 81 ++ ...EntraPermissionGrantConditionSet.Tests.ps1 | 76 ++ .../New-EntraPermissionGrantPolicy.Tests.ps1 | 81 ++ .../Entra/SignIns/New-EntraPolicy.Tests.ps1 | 75 ++ ...EntraTrustedCertificateAuthority.Tests.ps1 | 150 +++ ...Remove-EntraFeatureRolloutPolicy.Tests.ps1 | 53 + ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 59 ++ .../Remove-EntraIdentityProvider.Tests.ps1 | 69 ++ .../Remove-EntraNamedLocationPolicy.Tests.ps1 | 60 ++ ...emove-EntraOAuth2PermissionGrant.Tests.ps1 | 60 ++ ...EntraPermissionGrantConditionSet.Tests.ps1 | 114 +++ ...emove-EntraPermissionGrantPolicy.Tests.ps1 | 60 ++ .../SignIns/Remove-EntraPolicy.Tests.ps1 | 63 ++ ...EntraTrustedCertificateAuthority.Tests.ps1 | 102 ++ .../Set-EntraAuthorizationPolicy.Tests.ps1 | 97 ++ ...Set-EntraConditionalAccessPolicy.Tests.ps1 | 139 +++ .../Set-EntraFeatureRolloutPolicy.Tests.ps1 | 70 ++ .../Set-EntraNamedLocationPolicy.Tests.ps1 | 104 ++ ...EntraPermissionGrantConditionSet.Tests.ps1 | 68 ++ .../Set-EntraPermissionGrantPolicy.Tests.ps1 | 60 ++ .../Entra/SignIns/Set-EntraPolicy.Tests.ps1 | 87 ++ ...EntraTrustedCertificateAuthority.Tests.ps1 | 136 +++ testVNext/Entra/SignIns/Valid.Tests.ps1 | 109 ++ testVNext/Entra/Users/Entra.Tests.ps1 | 31 + testVNext/Entra/Users/Get-EntraUser.Tests.ps1 | 175 ++++ .../Get-EntraUserAppRoleAssignment.Tests.ps1 | 134 +++ .../Get-EntraUserCreatedObject.Tests.ps1 | 154 +++ .../Users/Get-EntraUserDirectReport.Tests.ps1 | 140 +++ .../Users/Get-EntraUserExtension.Tests.ps1 | 82 ++ .../Get-EntraUserLicenseDetail.Tests.ps1 | 104 ++ .../Users/Get-EntraUserManager.Tests.ps1 | 131 +++ .../Users/Get-EntraUserMembership.Tests.ps1 | 129 +++ ...t-EntraUserOAuth2PermissionGrant.Tests.ps1 | 135 +++ .../Users/Get-EntraUserOwnedDevice.Tests.ps1 | 144 +++ .../Users/Get-EntraUserOwnedObject.Tests.ps1 | 142 +++ .../Get-EntraUserRegisteredDevice.Tests.ps1 | 130 +++ testVNext/Entra/Users/Invalid.Tests.ps1 | 105 ++ testVNext/Entra/Users/Module.Tests.ps1 | 52 + testVNext/Entra/Users/New-EntraUser.Tests.ps1 | 229 +++++ .../New-EntraUserAppRoleAssignment.Tests.ps1 | 118 +++ .../Entra/Users/Remove-EntraUser.Tests.ps1 | 67 ++ ...emove-EntraUserAppRoleAssignment.Tests.ps1 | 75 ++ .../Users/Remove-EntraUserManager.Tests.ps1 | 69 ++ testVNext/Entra/Users/Set-EntraUser.Tests.ps1 | 98 ++ .../Users/Set-EntraUserLicense.Tests.ps1 | 125 +++ .../Users/Set-EntraUserManager.Tests.ps1 | 78 ++ .../Users/Set-EntraUserPassword.Tests.ps1 | 123 +++ .../Set-EntraUserThumbnailPhoto.Tests.ps1 | 86 ++ ...Update-EntraSignedInUserPassword.Tests.ps1 | 67 ++ .../Update-EntraUserFromFederated.Tests.ps1 | 72 ++ testVNext/Entra/Users/Valid.Tests.ps1 | 109 ++ .../Add-EntraBetaApplicationPolicy.Tests.ps1 | 61 ++ .../Get-EntraBetaApplication.Tests.ps1 | 162 +++ .../Get-EntraBetaApplicationLogo.Tests.ps1 | 60 ++ ...etaApplicationPasswordCredential.Tests.ps1 | 75 ++ .../Get-EntraBetaApplicationPolicy.Tests.ps1 | 86 ++ ...ApplicationSignInDetailedSummary.Tests.ps1 | 89 ++ ...ntraBetaApplicationSignInSummary.Tests.ps1 | 97 ++ ...Get-EntraBetaApplicationTemplate.Tests.ps1 | 114 +++ ...taPasswordSingleSignOnCredential.Tests.ps1 | 100 ++ .../Get-EntraBetaServicePrincipal.Tests.ps1 | 258 +++++ ...aBetaServicePrincipalOwnedObject.Tests.ps1 | 207 ++++ .../New-EntraBetaApplication.Tests.ps1 | 80 ++ ...taPasswordSingleSignOnCredential.Tests.ps1 | 233 +++++ .../Remove-EntraBetaApplication.Tests.ps1 | 62 ++ ...emove-EntraBetaApplicationPolicy.Tests.ps1 | 68 ++ ...taPasswordSingleSignOnCredential.Tests.ps1 | 77 ++ .../Set-EntraBetaApplication.Tests.ps1 | 62 ++ .../Set-EntraBetaApplicationLogo.Tests.ps1 | 55 + ...taPasswordSingleSignOnCredential.Tests.ps1 | 197 ++++ .../Set-EntraBetaServicePrincipal.Tests.ps1 | 58 ++ ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 69 ++ ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 75 ++ ...yAttributeDefinitionAllowedValue.Tests.ps1 | 91 ++ ...d-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 86 ++ ...dd-EntraBetaDeviceRegisteredUser.Tests.ps1 | 88 ++ ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 84 ++ ...dd-EntraBetaScopedRoleMembership.Tests.ps1 | 131 +++ .../Confirm-EntraBetaDomain.Tests.ps1 | 58 ++ .../Get-EntraBetaAccountSku.Tests.ps1 | 76 ++ .../Get-EntraBetaAdministrativeUnit.Tests.ps1 | 136 +++ ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 128 +++ .../Get-EntraBetaAttributeSet.Tests.ps1 | 101 ++ .../Get-EntraBetaAuditDirectoryLog.Tests.ps1 | 147 +++ ...ustomSecurityAttributeDefinition.Tests.ps1 | 107 ++ ...yAttributeDefinitionAllowedValue.Tests.ps1 | 132 +++ .../Get-EntraBetaDevice.Tests.ps1 | 160 +++ ...t-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 125 +++ ...et-EntraBetaDeviceRegisteredUser.Tests.ps1 | 130 +++ ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 71 ++ .../Get-EntraBetaDirSyncFeature.Tests.ps1 | 97 ++ ...bjectOnPremisesProvisioningError.Tests.ps1 | 58 ++ .../Get-EntraBetaDirectorySetting.Tests.ps1 | 116 +++ ...ntraBetaDirectorySettingTemplate.Tests.ps1 | 97 ++ ...ntraBetaDomainFederationSettings.Tests.ps1 | 89 ++ .../Get-EntraBetaFederationProperty.Tests.ps1 | 82 ++ .../Get-EntraBetaPasswordPolicy.Tests.ps1 | 70 ++ ...et-EntraBetaScopedRoleMembership.Tests.ps1 | 108 ++ .../New-EntraBetaAdministrativeUnit.Tests.ps1 | 87 ++ ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 160 +++ .../New-EntraBetaAttributeSet.Tests.ps1 | 97 ++ ...ustomSecurityAttributeDefinition.Tests.ps1 | 146 +++ .../New-EntraBetaDirectorySetting.Tests.ps1 | 120 +++ ...move-EntraBetaAdministrativeUnit.Tests.ps1 | 68 ++ ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 68 ++ .../Remove-EntraBetaDevice.Tests.ps1 | 65 ++ ...e-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 81 ++ ...ve-EntraBetaDeviceRegisteredUser.Tests.ps1 | 81 ++ ...Remove-EntraBetaDirectorySetting.Tests.ps1 | 68 ++ ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 81 ++ ...ve-EntraBetaScopedRoleMembership.Tests.ps1 | 74 ++ .../Set-EntraBetaAdministrativeUnit.Tests.ps1 | 74 ++ .../Set-EntraBetaAttributeSet.Tests.ps1 | 80 ++ ...ustomSecurityAttributeDefinition.Tests.ps1 | 82 ++ ...yAttributeDefinitionAllowedValue.Tests.ps1 | 81 ++ .../Set-EntraBetaDevice.Tests.ps1 | 65 ++ ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 75 ++ .../Set-EntraBetaDirSyncEnabled.Tests.ps1 | 73 ++ .../Set-EntraBetaDirSyncFeature.Tests.ps1 | 81 ++ .../Set-EntraBetaDirectorySetting.Tests.ps1 | 126 +++ ...ntraBetaDomainFederationSettings.Tests.ps1 | 93 ++ .../Set-EntraBetaPartnerInformation.Tests.ps1 | 85 ++ testVNext/EntraBeta/EntraBeta.Tests.ps1 | 31 + testVNext/EntraBeta/General.Tests.ps1 | 40 + .../Get-EntraBetaPrivilegedResource.Tests.ps1 | 158 +++ ...ntraBetaPrivilegedRoleDefinition.Tests.ps1 | 137 +++ ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 162 +++ ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 142 +++ .../Groups/Add-EntraBetaGroupMember.Tests.ps1 | 82 ++ .../Groups/Add-EntraBetaGroupOwner.Tests.ps1 | 85 ++ .../Get-EntraBetaDeletedGroup.Tests.ps1 | 150 +++ .../Groups/Get-EntraBetaGroup.Tests.ps1 | 157 +++ ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 134 +++ ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 107 ++ .../Groups/Get-EntraBetaGroupMember.Tests.ps1 | 106 ++ .../Groups/Get-EntraBetaGroupOwner.Tests.ps1 | 140 +++ .../Get-EntraBetaObjectSetting.Tests.ps1 | 97 ++ .../Groups/New-EntraBetaGroup.Tests.ps1 | 103 ++ ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 112 ++ .../New-EntraBetaObjectSetting.Tests.ps1 | 125 +++ .../Groups/Remove-EntraBetaGroup.Tests.ps1 | 75 ++ ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 69 ++ ...ve-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 72 ++ .../Remove-EntraBetaGroupMember.Tests.ps1 | 73 ++ .../Remove-EntraBetaGroupOwner.Tests.ps1 | 81 ++ .../Remove-EntraBetaObjectSetting.Tests.ps1 | 65 ++ .../Groups/Set-EntraBetaGroup.Tests.ps1 | 96 ++ ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 88 ++ .../Set-EntraBetaObjectSetting.Tests.ps1 | 117 +++ ...ApplicationSignInDetailedSummary.Tests.ps1 | 89 ++ ...ntraBetaApplicationSignInSummary.Tests.ps1 | 97 ++ .../Get-EntraBetaAuditDirectoryLog.Tests.ps1 | 147 +++ .../Get-EntraBetaAuditSignInLog.Tests.ps1 | 341 +++++++ ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 84 ++ ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 61 ++ ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 132 +++ ...t-EntraBetaPermissionGrantPolicy.Tests.ps1 | 89 ++ .../SignIns/Get-EntraBetaPolicy.Tests.ps1 | 111 ++ ...Get-EntraBetaPolicyAppliedObject.Tests.ps1 | 83 ++ ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 84 ++ ...ew-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 125 +++ ...w-EntraBetaOauth2PermissionGrant.Tests.ps1 | 97 ++ ...ve-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 65 ++ ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 81 ++ .../SignIns/Remove-EntraBetaPolicy.Tests.ps1 | 61 ++ ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 61 ++ ...ve-EntraBetaTrustFrameworkPolicy.Tests.ps1 | 65 ++ ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 95 ++ .../SignIns/Set-EntraBetaPolicy.Tests.ps1 | 101 ++ .../Users/Get-EntraBetaUser.Tests.ps1 | 179 ++++ .../Get-EntraBetaUserExtension.Tests.ps1 | 82 ++ .../Get-EntraBetaUserLicenseDetail.Tests.ps1 | 95 ++ .../Users/Get-EntraBetaUserManager.Tests.ps1 | 162 +++ .../Get-EntraBetaUserMembership.Tests.ps1 | 128 +++ .../Get-EntraBetaUserOwnedDevice.Tests.ps1 | 122 +++ ...et-EntraBetaUserRegisteredDevice.Tests.ps1 | 121 +++ .../Users/New-EntraBetaUser.Tests.ps1 | 196 ++++ .../Users/Remove-EntraBetaUser.Tests.ps1 | 63 ++ .../Remove-EntraBetaUserManager.Tests.ps1 | 63 ++ .../Users/Set-EntraBetaUser.Tests.ps1 | 63 ++ .../Users/Set-EntraBetaUserManager.Tests.ps1 | 64 ++ ...te-EntraBetaSignedInUserPassword.Tests.ps1 | 78 ++ ...pdate-EntraBetaUserFromFederated.Tests.ps1 | 72 ++ 972 files changed, 113322 insertions(+), 50 deletions(-) create mode 100644 build/Beta-TypeDefs.txt create mode 100644 build/Split-Tests.ps1 create mode 100644 build/Update-CommonFunctionsImport.ps1 rename build/{TypeDefs.txt => V1.0-TypeDefs.txt} (100%) create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 create mode 100644 moduleVNext/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 create mode 100644 moduleVNext/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 create mode 100644 moduleVNext/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 create mode 100644 moduleVNext/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Authentication/Connect-Entra.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Authentication/Get-EntraContext.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md create mode 100644 moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md create mode 100644 moduleVNext/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md create mode 100644 moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUser.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md create mode 100644 moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md create mode 100644 testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Entra.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Invalid.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Module.Tests.ps1 create mode 100644 testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 create mode 100644 testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 create mode 100644 testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 create mode 100644 testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 create mode 100644 testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 create mode 100644 testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 create mode 100644 testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 create mode 100644 testVNext/Entra/Applications/Valid.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Connect-Entra.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Disconnect-Entra.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Entra.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Invalid.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Module.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 create mode 100644 testVNext/Entra/Authentication/Valid.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Entra.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraAuditDirectoryLog.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeatures.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraUserDirectReport.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Module.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDeletedDirectoryObject.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 create mode 100644 testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Entra.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Invalid.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Module.Tests.ps1 create mode 100644 testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/Governance/Valid.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Entra.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Invalid.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Module.Tests.ps1 create mode 100644 testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 create mode 100644 testVNext/Entra/Groups/Valid.Tests.ps1 create mode 100644 testVNext/Entra/New-EntraInvitation.Tests.ps1 create mode 100644 testVNext/Entra/Reports/Entra.Tests.ps1 create mode 100644 testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 create mode 100644 testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 create mode 100644 testVNext/Entra/Reports/Invalid.Tests.ps1 create mode 100644 testVNext/Entra/Reports/Module.Tests.ps1 create mode 100644 testVNext/Entra/Reports/Valid.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Entra.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Invalid.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Module.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 create mode 100644 testVNext/Entra/SignIns/Valid.Tests.ps1 create mode 100644 testVNext/Entra/Users/Entra.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUser.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 create mode 100644 testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 create mode 100644 testVNext/Entra/Users/Invalid.Tests.ps1 create mode 100644 testVNext/Entra/Users/Module.Tests.ps1 create mode 100644 testVNext/Entra/Users/New-EntraUser.Tests.ps1 create mode 100644 testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 create mode 100644 testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 create mode 100644 testVNext/Entra/Users/Set-EntraUser.Tests.ps1 create mode 100644 testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 create mode 100644 testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 create mode 100644 testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 create mode 100644 testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 create mode 100644 testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 create mode 100644 testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 create mode 100644 testVNext/Entra/Users/Valid.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInSummary.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 create mode 100644 testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 create mode 100644 testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAuditDirectoryLog.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 create mode 100644 testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 create mode 100644 testVNext/EntraBeta/EntraBeta.Tests.ps1 create mode 100644 testVNext/EntraBeta/General.Tests.ps1 create mode 100644 testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 create mode 100644 testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 create mode 100644 testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 create mode 100644 testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 create mode 100644 testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 create mode 100644 testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 create mode 100644 testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 create mode 100644 testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 diff --git a/build/Beta-TypeDefs.txt b/build/Beta-TypeDefs.txt new file mode 100644 index 0000000000..551e675620 --- /dev/null +++ b/build/Beta-TypeDefs.txt @@ -0,0 +1,965 @@ +# ------------------------------------------------------------------------------ +# Type definitios required for commands inputs +# ------------------------------------------------------------------------------ + +$def = @" + +namespace Microsoft.Open.AzureAD.Graph.PowerShell.Custom +{ + + using System.Linq; + public enum KeyType{ + Symmetric = 0, + AsymmetricX509Cert = 1, + } + public enum KeyUsage{ + Sign = 0, + Verify = 1, + Decrypt = 2, + Encrypt = 3, + } +} + +namespace Microsoft.Open.AzureAD.Model +{ + + using System.Linq; + public class AlternativeSecurityId + { + public System.String IdentityProvider; + public System.Byte[] Key; + public System.Nullable Type; + + } + public class AppRole + { + public System.Collections.Generic.List AllowedMemberTypes; + public System.String Description; + public System.String DisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Origin; + public System.String Value; + } + public class AssignedLicense + { + public System.Collections.Generic.List DisabledPlans; + public System.String SkuId; + + } + public class AssignedLicenses + { + public System.Collections.Generic.List AddLicenses; + public System.Collections.Generic.List RemoveLicenses; + + } + public class CertificateAuthorityInformation + { + public enum AuthorityTypeEnum{ + RootAuthority = 0, + IntermediateAuthority = 1, + } + public System.Nullable AuthorityType; + public System.String CrlDistributionPoint; + public System.String DeltaCrlDistributionPoint; + public System.Byte[] TrustedCertificate; + public System.String TrustedIssuer; + public System.String TrustedIssuerSki; + + } + public class CrossCloudVerificationCodeBody + { + public System.String CrossCloudVerificationCode; + public CrossCloudVerificationCodeBody() + { + } + + public CrossCloudVerificationCodeBody(System.String value) + { + CrossCloudVerificationCode = value; + } + } + public class GroupIdsForMembershipCheck + { + public System.Collections.Generic.List GroupIds; + public GroupIdsForMembershipCheck() + { + } + + public GroupIdsForMembershipCheck(System.Collections.Generic.List value) + { + GroupIds = value; + } + } + public class KeyCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDate; + public System.String KeyId; + public System.Nullable StartDate; + public System.String Type; + public System.String Usage; + public System.Byte[] Value; + + } + public class PasswordCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDate; + public System.String KeyId; + public System.Nullable StartDate; + public System.String Value; + + } + public class PasswordProfile + { + public System.String Password; + public System.Nullable ForceChangePasswordNextLogin; + public System.Nullable EnforceChangePasswordPolicy; + + } + public class PrivacyProfile + { + public System.String ContactEmail; + public System.String StatementUrl; + + } + public class RoleMemberInfo + { + public System.String DisplayName; + public System.String ObjectId; + public System.String UserPrincipalName; + + } + public class SignInName + { + public System.String Type; + public System.String Value; + + } +} + +namespace Microsoft.Open.MSGraph.Model +{ + + using System.Linq; + public class AddIn + { + public System.String Id; + public System.String Type; + public System.Collections.Generic.List Properties; + + } + public class ApiApplication + { + public System.Nullable RequestedAccessTokenVersion; + public System.Collections.Generic.List Oauth2PermissionScopes; + + } + public class ApplicationTemplateDisplayName + { + public System.String DisplayName; + public ApplicationTemplateDisplayName() + { + } + + public ApplicationTemplateDisplayName(System.String value) + { + DisplayName = value; + } + } + public class AppRole + { + public System.Collections.Generic.List AllowedMemberTypes; + public System.String Description; + public System.String DisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Value; + + } + public class AssignedLabel + { + public System.String LabelId; + public System.String DisplayName; + + } + public class AzureADMSPrivilegedRuleSetting + { + public System.String RuleIdentifier; + public System.String Setting; + + } + public class AzureADMSPrivilegedSchedule + { + public System.Nullable StartDateTime; + public System.Nullable EndDateTime; + public System.String Type; + public System.String Duration; + + } + public class ConditionalAccessApplicationCondition + { + public System.Collections.Generic.List IncludeApplications; + public System.Collections.Generic.List ExcludeApplications; + public System.Collections.Generic.List IncludeUserActions; + public System.Collections.Generic.List IncludeAuthenticationContextClassReferences; + + } + public class ConditionalAccessApplicationEnforcedRestrictions + { + public System.Nullable IsEnabled; + public ConditionalAccessApplicationEnforcedRestrictions() + { + } + + public ConditionalAccessApplicationEnforcedRestrictions(System.Nullable value) + { + IsEnabled = value; + } + } + public class ConditionalAccessCloudAppSecurity + { + public enum CloudAppSecurityTypeEnum{ + McasConfigured = 0, + MonitorOnly = 1, + BlockDownloads = 2, + } + public System.Nullable CloudAppSecurityType; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessConditionSet + { + public Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition Applications; + public Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition Users; + public Microsoft.Open.MSGraph.Model.ConditionalAccessPlatformCondition Platforms; + public Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition Locations; + public enum ConditionalAccessRiskLevel{ + Low = 0, + Medium = 1, + High = 2, + Hidden = 3, + None = 4, + UnknownFutureValue = 5, + } + public System.Collections.Generic.List UserRiskLevels; + public System.Collections.Generic.List SignInRiskLevels; + public enum ConditionalAccessClientApp{ + All = 0, + Browser = 1, + MobileAppsAndDesktopClients = 2, + ExchangeActiveSync = 3, + EasSupported = 4, + Other = 5, + } + public System.Collections.Generic.List ClientAppTypes; + public Microsoft.Open.MSGraph.Model.ConditionalAccessDevicesCondition Devices; + + } + public class ConditionalAccessDevicesCondition + { + public System.Collections.Generic.List IncludeDevices; + public System.Collections.Generic.List ExcludeDevices; + public Microsoft.Open.MSGraph.Model.ConditionalAccessFilter DeviceFilter; + + } + public class ConditionalAccessFilter + { + public enum ModeEnum{ + Include = 0, + Exclude = 1, + } + public System.Nullable Mode; + public System.String Rule; + + } + public class ConditionalAccessGrantControls + { + public System.String _Operator; + public enum ConditionalAccessGrantControl{ + Block = 0, + Mfa = 1, + CompliantDevice = 2, + DomainJoinedDevice = 3, + ApprovedApplication = 4, + CompliantApplication = 5, + PasswordChange = 6, + } + public System.Collections.Generic.List BuiltInControls; + public System.Collections.Generic.List CustomAuthenticationFactors; + public System.Collections.Generic.List TermsOfUse; + + } + public class ConditionalAccessLocationCondition + { + public System.Collections.Generic.List IncludeLocations; + public System.Collections.Generic.List ExcludeLocations; + + } + public class ConditionalAccessPersistentBrowser + { + public enum ModeEnum{ + Always = 0, + Never = 1, + } + public System.Nullable Mode; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessPlatformCondition + { + public enum ConditionalAccessDevicePlatforms{ + Android = 0, + IOS = 1, + Windows = 2, + WindowsPhone = 3, + MacOS = 4, + All = 5, + } + public System.Collections.Generic.List IncludePlatforms; + public System.Collections.Generic.List ExcludePlatforms; + + } + public class ConditionalAccessSessionControls + { + public Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions ApplicationEnforcedRestrictions; + public Microsoft.Open.MSGraph.Model.ConditionalAccessCloudAppSecurity CloudAppSecurity; + public Microsoft.Open.MSGraph.Model.ConditionalAccessSignInFrequency SignInFrequency; + public Microsoft.Open.MSGraph.Model.ConditionalAccessPersistentBrowser PersistentBrowser; + + } + public class ConditionalAccessSignInFrequency + { + public enum TypeEnum{ + Days = 0, + Hours = 1, + } + public System.Nullable Type; + public System.Nullable Value; + public System.Nullable IsEnabled; + + } + public class ConditionalAccessUserCondition + { + public System.Collections.Generic.List IncludeUsers; + public System.Collections.Generic.List ExcludeUsers; + public System.Collections.Generic.List IncludeGroups; + public System.Collections.Generic.List ExcludeGroups; + public System.Collections.Generic.List IncludeRoles; + public System.Collections.Generic.List ExcludeRoles; + + } + public enum CountriesAndRegion{ + AD = 0, + AE = 1, + AF = 2, + AG = 3, + AI = 4, + AL = 5, + AM = 6, + AN = 7, + AO = 8, + AQ = 9, + AR = 10, + AS = 11, + AT = 12, + AU = 13, + AW = 14, + AX = 15, + AZ = 16, + BA = 17, + BB = 18, + BD = 19, + BE = 20, + BF = 21, + BG = 22, + BH = 23, + BI = 24, + BJ = 25, + BL = 26, + BM = 27, + BN = 28, + BO = 29, + BQ = 30, + BR = 31, + BS = 32, + BT = 33, + BV = 34, + BW = 35, + BY = 36, + BZ = 37, + CA = 38, + CC = 39, + CD = 40, + CF = 41, + CG = 42, + CH = 43, + CI = 44, + CK = 45, + CL = 46, + CM = 47, + CN = 48, + CO = 49, + CR = 50, + CU = 51, + CV = 52, + CW = 53, + CX = 54, + CY = 55, + CZ = 56, + DE = 57, + DJ = 58, + DK = 59, + DM = 60, + DO = 61, + DZ = 62, + EC = 63, + EE = 64, + EG = 65, + EH = 66, + ER = 67, + ES = 68, + ET = 69, + FI = 70, + FJ = 71, + FK = 72, + FM = 73, + FO = 74, + FR = 75, + GA = 76, + GB = 77, + GD = 78, + GE = 79, + GF = 80, + GG = 81, + GH = 82, + GI = 83, + GL = 84, + GM = 85, + GN = 86, + GP = 87, + GQ = 88, + GR = 89, + GS = 90, + GT = 91, + GU = 92, + GW = 93, + GY = 94, + HK = 95, + HM = 96, + HN = 97, + HR = 98, + HT = 99, + HU = 100, + ID = 101, + IE = 102, + IL = 103, + IM = 104, + IN = 105, + IO = 106, + IQ = 107, + IR = 108, + IS = 109, + IT = 110, + JE = 111, + JM = 112, + JO = 113, + JP = 114, + KE = 115, + KG = 116, + KH = 117, + KI = 118, + KM = 119, + KN = 120, + KP = 121, + KR = 122, + KW = 123, + KY = 124, + KZ = 125, + LA = 126, + LB = 127, + LC = 128, + LI = 129, + LK = 130, + LR = 131, + LS = 132, + LT = 133, + LU = 134, + LV = 135, + LY = 136, + MA = 137, + MC = 138, + MD = 139, + ME = 140, + MF = 141, + MG = 142, + MH = 143, + MK = 144, + ML = 145, + MM = 146, + MN = 147, + MO = 148, + MP = 149, + MQ = 150, + MR = 151, + MS = 152, + MT = 153, + MU = 154, + MV = 155, + MW = 156, + MX = 157, + MY = 158, + MZ = 159, + NA = 160, + NC = 161, + NE = 162, + NF = 163, + NG = 164, + NI = 165, + NL = 166, + NO = 167, + NP = 168, + NR = 169, + NU = 170, + NZ = 171, + OM = 172, + PA = 173, + PE = 174, + PF = 175, + PG = 176, + PH = 177, + PK = 178, + PL = 179, + PM = 180, + PN = 181, + PR = 182, + PS = 183, + PT = 184, + PW = 185, + PY = 186, + QA = 187, + RE = 188, + RO = 189, + RS = 190, + RU = 191, + RW = 192, + SA = 193, + SB = 194, + SC = 195, + SD = 196, + SE = 197, + SG = 198, + SH = 199, + SI = 200, + SJ = 201, + SK = 202, + SL = 203, + SM = 204, + SN = 205, + SO = 206, + SR = 207, + SS = 208, + ST = 209, + SV = 210, + SX = 211, + SY = 212, + SZ = 213, + TC = 214, + TD = 215, + TF = 216, + TG = 217, + TH = 218, + TJ = 219, + TK = 220, + TL = 221, + TM = 222, + TN = 223, + TO = 224, + TR = 225, + TT = 226, + TV = 227, + TW = 228, + TZ = 229, + UA = 230, + UG = 231, + UM = 232, + US = 233, + UY = 234, + UZ = 235, + VA = 236, + VC = 237, + VE = 238, + VG = 239, + VI = 240, + VN = 241, + VU = 242, + WF = 243, + WS = 244, + YE = 245, + YT = 246, + ZA = 247, + ZM = 248, + ZW = 249, + } + public class DefaultUserRolePermissions + { + public System.Nullable AllowedToCreateApps; + public System.Nullable AllowedToCreateSecurityGroups; + public System.Nullable AllowedToReadOtherUsers; + + } + public class DelegatedPermissionClassification + { + public enum ClassificationEnum{ + Low = 0, + Medium = 1, + High = 2, + } + public System.Nullable Classification; + public System.String Id; + public System.String PermissionId; + public System.String PermissionName; + + } + public class DirectoryRoleDefinition + { + public System.String Id; + public System.String OdataType; + public System.String Description; + public System.String DisplayName; + public System.Nullable IsBuiltIn; + public System.Collections.Generic.List ResourceScopes; + public System.Nullable IsEnabled; + public System.Collections.Generic.List RolePermissions; + public System.String TemplateId; + public System.String Version; + public System.Collections.Generic.List InheritsPermissionsFrom; + + } + public class DirectorySetting + { + public System.String Id; + public System.String DisplayName; + public System.String TemplateId; + public System.Collections.Generic.List Values; + + public string this[string name] + { + get + { + SettingValue setting = this.Values.FirstOrDefault(namevaluepair => namevaluepair.Name.Equals(name)); + return (setting != null) ? setting.Value : string.Empty; + } + set + { + SettingValue setting = this.Values.FirstOrDefault(namevaluepair => namevaluepair.Name.Equals(name)); + if (setting != null) + { + // Capitalize the forst character of the value. + if (string.IsNullOrEmpty(value)) + { + setting.Value = value; + } + else if (value.Length == 1) + { + setting.Value = value.ToUpper(); + } + else + { + setting.Value = char.ToUpper(value[0]) + value.Substring(1); + } + } + } + } + } + public class DirectorySettingTemplate + { + public System.String Id; + public System.String DisplayName; + public System.String Description; + public System.Collections.Generic.List Values; + + public DirectorySetting CreateDirectorySetting() + { + DirectorySetting directorySetting = new DirectorySetting(); + + directorySetting.TemplateId = this.Id; + + directorySetting.Values = new System.Collections.Generic.List(); + foreach (var definition in this.Values) + { + SettingValue item = new SettingValue(); + item.Name = definition.Name; + + string value = definition.DefaultValue; + if (string.IsNullOrEmpty(value)) + { + item.Value = value; + } + else if (value.Length == 1) + { + item.Value = value.ToUpper(); + } + else + { + item.Value = char.ToUpper(value[0]) + value.Substring(1); + } + + directorySetting.Values.Add(item); + } + + return directorySetting; + } + } + public class EmailAddress + { + public System.String Name; + public System.String Address; + + } + public class ImplicitGrantSettings + { + public System.Nullable EnableIdTokenIssuance; + public System.Nullable EnableAccessTokenIssuance; + + } + public class InformationalUrl + { + public System.String TermsOfServiceUrl; + public System.String MarketingUrl; + public System.String PrivacyStatementUrl; + public System.String SupportUrl; + public System.String LogoUrl; + + } + public class InvitedUserMessageInfo + { + public System.Collections.Generic.List CcRecipients; + public System.String CustomizedMessageBody; + public System.String MessageLanguage; + + } + public class IpRange + { + public System.String CidrAddress; + public IpRange() + { + } + + public IpRange(System.String value) + { + CidrAddress = value; + } + } + public class KeyCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDateTime; + public System.String KeyId; + public System.Nullable StartDateTime; + public System.String Type; + public System.String Usage; + public System.Byte[] Key; + + } + public class KeyValue + { + public System.String Key; + public System.String Value; + + } + public class MsDirectoryObject + { + public System.String Id; + public System.String OdataType; + + } + public class MsFeatureRolloutPolicy + { + public enum FeatureEnum{ + PassthroughAuthentication = 0, + SeamlessSso = 1, + PasswordHashSync = 2, + EmailAsAlternateId = 3, + } + public System.Nullable Feature; + public System.String Id; + public System.String DisplayName; + public System.String Description; + public System.Nullable IsEnabled; + public System.Nullable IsAppliedToOrganization; + public System.Collections.Generic.List AppliesTo; + + } + public class OptionalClaim + { + public System.String Name; + public System.String Source; + public System.Nullable Essential; + public System.Collections.Generic.List AdditionalProperties; + + } + public class OptionalClaims + { + public System.Collections.Generic.List IdToken; + public System.Collections.Generic.List AccessToken; + public System.Collections.Generic.List SamlToken; + + } + public class ParentalControlSettings + { + public enum LegalAgeGroupRuleEnum{ + Allow = 0, + RequireConsentForPrivacyServices = 1, + RequireConsentForMinors = 2, + RequireConsentForKids = 3, + BlockMinors = 4, + } + public System.Nullable LegalAgeGroupRule; + public System.Collections.Generic.List CountriesBlockedForMinors; + + } + public class PasswordCredential + { + public System.Byte[] CustomKeyIdentifier; + public System.Nullable EndDateTime; + public System.String KeyId; + public System.Nullable StartDateTime; + public System.String SecretText; + public System.String Hint; + + } + public class PasswordSSOCredential + { + public System.String FieldId; + public System.String Value; + public System.String Type; + + } + public class PasswordSSOCredentials + { + public System.String Id; + public System.Collections.Generic.List Credentials; + + } + public class PasswordSSOObjectId + { + public System.String Id; + public PasswordSSOObjectId() + { + } + + public PasswordSSOObjectId(System.String value) + { + Id = value; + } + } + public class PermissionScope + { + public System.String AdminConsentDescription; + public System.String AdminConsentDisplayName; + public System.String Id; + public System.Nullable IsEnabled; + public System.String Type; + public System.String UserConsentDescription; + public System.String UserConsentDisplayName; + public System.String Value; + + } + public class PreAuthorizedApplication + { + public System.String AppId; + public System.Collections.Generic.List PermissionIds; + + } + public class PublicClientApplication + { + public System.Collections.Generic.List RedirectUris; + public PublicClientApplication() + { + } + + public PublicClientApplication(System.Collections.Generic.List value) + { + RedirectUris = value; + } + } + public class Recipient + { + public Microsoft.Open.MSGraph.Model.EmailAddress EmailAddress; + public Recipient() + { + } + + public Recipient(Microsoft.Open.MSGraph.Model.EmailAddress value) + { + EmailAddress = value; + } + } + public class RequiredResourceAccess + { + public System.String ResourceAppId; + public System.Collections.Generic.List ResourceAccess; + + } + public class ResourceAccess + { + public System.String Id; + public System.String Type; + + } + public class RolePermission + { + public System.Collections.Generic.List AllowedResourceActions; + public System.String Condition; + + } + public class SettingTemplateValue + { + public System.String Name; + public System.String Description; + public System.String Type; + public System.String DefaultValue; + + } + public class SettingValue + { + public System.String Name; + public System.String Value; + + } + public class SetVerifiedPublisherRequest + { + public System.String VerifiedPublisherId; + public SetVerifiedPublisherRequest() + { + } + + public SetVerifiedPublisherRequest(System.String value) + { + VerifiedPublisherId = value; + } + } + public class User + { + public System.String Id; + public System.String OdataType; + + } + public class WebApplication + { + public System.String LogoutUrl; + public System.Nullable Oauth2AllowImplicitFlow; + public System.Collections.Generic.List RedirectUris; + public Microsoft.Open.MSGraph.Model.ImplicitGrantSettings ImplicitGrantSettings; + + } +} +"@ + try{ Add-Type -TypeDefinition $def } + catch{} + +# ------------------------------------------------------------------------------ +# End of Type definitios required for commands inputs +# ------------------------------------------------------------------------------ \ No newline at end of file diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 332232d0b4..8134e81015 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -9,7 +9,12 @@ param ( $moduleBuilder = [EntraModuleBuilder]::new() +if($Module -eq 'Entra'){ + $typeDefsPath=".\V1.0-Typedefs.txt" +}else{ + $typeDefsPath='.\Beta-TypeDefs.txt' +} $moduleBuilder.CreateModuleHelp($Module) -$moduleBuilder.CreateSubModuleFile($Module, ".\build\TypeDefs.txt") +$moduleBuilder.CreateSubModuleFile($Module, $typeDefsPath) $moduleBuilder.CreateModuleManifest($Module) diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 0357671db3..cfbdc5802a 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -10,12 +10,12 @@ function Split-Docs { param ( - [string]$Source = 'Entra', # Default to 'Entra' + [string]$Module = 'Entra', # Default to 'Entra' [string]$OutputDirectory # Allow custom output directory ) # Determine source directories and mapping file paths based on the Source parameter - switch ($Source) { + switch ($Module) { 'Entra' { $DocsSourceDirectory = "../module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" $MappingFilePath = '../moduleVNext/Entra/config/moduleMapping.json' @@ -27,7 +27,7 @@ function Split-Docs { $OutputDirectory="../moduleVNext/docs/entra-powershell-beta" } default { - Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' + Log-Message -Message "[Split-Docs]: Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' return } } @@ -37,7 +37,7 @@ function Split-Docs { # Check if the mapping file exists if (-not (Test-Path -Path $MappingFilePath -PathType Leaf)) { - Log-Message -Message "Mapping file '$MappingFilePath' does not exist." -Level 'ERROR' + Log-Message -Message "[Split-Docs]: Mapping file '$MappingFilePath' does not exist." -Level 'ERROR' return } @@ -47,7 +47,7 @@ function Split-Docs { # Ensure the root documentation directory exists, create if it doesn't if (-not (Test-Path -Path $TargetRootDirectory -PathType Container)) { New-Item -Path $TargetRootDirectory -ItemType Directory | Out-Null - Log-Message -Message "Created directory: $TargetRootDirectory" -Level 'SUCCESS' + Log-Message -Message "[Split-Docs]: Created directory: $TargetRootDirectory" -Level 'SUCCESS' } # Iterate over each file-directory pair in the moduleMapping.json @@ -59,12 +59,12 @@ function Split-Docs { $targetSubDir = Join-Path -Path $TargetRootDirectory -ChildPath $subDirName if($subDirName -eq 'Migration' -or $subDirName -eq 'Invitations'){ - Log-Message "Skipping $subDirName" -Level 'WARNING' + Log-Message "[Split-Docs]: Skipping $subDirName" -Level 'WARNING' continue } if (-not (Test-Path -Path $targetSubDir -PathType Container)) { New-Item -Path $targetSubDir -ItemType Directory | Out-Null - Log-Message -Message "Created sub-directory: $targetSubDir" -Level 'SUCCESS' + Log-Message -Message "[Split-Docs]: Created sub-directory: $targetSubDir" -Level 'SUCCESS' } # Build the full source file path for the .md file @@ -72,14 +72,12 @@ function Split-Docs { if (Test-Path -Path $sourceFile -PathType Leaf) { # Copy the .md file to the target sub-directory Copy-Item -Path $sourceFile -Destination $targetSubDir - Log-Message -Message "Copied '$sourceFile' to '$targetSubDir'" -Level 'SUCCESS' + Log-Message -Message "[Split-Docs]: Copied '$sourceFile' to '$targetSubDir'" -Level 'SUCCESS' } else { # Log a warning if the .md file doesn't exist in the source directory - Log-Message -Message "File '$fileName.md' not found in '$DocsSourceDirectory'" -Level 'WARNING' + Log-Message -Message "[Split-Docs]: File '$fileName.md' not found in '$DocsSourceDirectory'" -Level 'WARNING' } } - Log-Message -Message "Markdown file copying complete." -Level 'INFO' -} - -Split-Docs -Source 'Entra' \ No newline at end of file + Log-Message -Message "[Split-Docs]: Markdown file copying complete." -Level 'INFO' +} \ No newline at end of file diff --git a/build/Split-EntraModule.ps1 b/build/Split-EntraModule.ps1 index 9c13bfc3a6..2f010ba248 100644 --- a/build/Split-EntraModule.ps1 +++ b/build/Split-EntraModule.ps1 @@ -17,4 +17,5 @@ $entraModuleSplitter = [EntraModuleSplitter]::new() $entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument $entraModuleSplitter.ProcessEntraAzureADAliases($Module) -Split-Docs -Source $Module \ No newline at end of file +./Split-Docs.ps1 -Module $Module +./Split-Tests.ps1 -Module $Module \ No newline at end of file diff --git a/build/Split-Tests.ps1 b/build/Split-Tests.ps1 new file mode 100644 index 0000000000..65a47774bc --- /dev/null +++ b/build/Split-Tests.ps1 @@ -0,0 +1,184 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +# This function copies the docs using the moduleMapping.json into their submodule directories. +# For each entry, it uses the Key (cmdlet name) to map it to the Value (a subdirectory created in the respective docs directory). + +. ./common-functions.ps1 + +function Split-Tests { + param ( + [string]$Module = 'Entra', # Default to 'Entra' + [string]$OutputDirectory # Allow custom output directory + ) + + # Determine source directories and mapping file paths based on the Source parameter + + switch ($Module) { + 'Entra' { + $TestSourceDirectory = "../test/module/Entra" + $MappingFilePath = '../moduleVNext/Entra/config/moduleMapping.json' + $OutputDirectory = '../testVNext/Entra' + $modulePrefix = 'Microsoft.Graph.Entra' + } + 'EntraBeta' { + $TestSourceDirectory = "../test/module/EntraBeta" + $MappingFilePath = "../moduleVNext/EntraBeta/config/moduleMapping.json" + $OutputDirectory = "../testVNext/EntraBeta" + $modulePrefix = 'Microsoft.Graph.Entra.Beta' + } + default { + Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' + return + } + } + + # Check if the mapping file exists + if (-not (Test-Path -Path $MappingFilePath -PathType Leaf)) { + Log-Message -Message "Mapping file '$MappingFilePath' does not exist." -Level 'ERROR' + return + } + + # Load the JSON content from the mapping file + $moduleMapping = Get-Content -Path $MappingFilePath | ConvertFrom-Json + + # Create a set to track files that have been processed + $processedFiles = @{} + + # Ensure the root documentation directory exists + if (-not (Test-Path -Path $OutputDirectory -PathType Container)) { + New-Item -Path $OutputDirectory -ItemType Directory | Out-Null + Log-Message -Message "Created directory: $OutputDirectory" -Level 'SUCCESS' + } + + # Collect all test files in the source directory + $allTestFiles = Get-ChildItem -Path $TestSourceDirectory -Filter "*.Tests.ps1" -File + + # Define additional test files to be copied to each subdirectory + $additionalTestFiles = @("General.Test.ps1", "Invalid.Tests.ps1", "Module.Tests.ps1", "Valid.Tests.ps1", "Entra.Tests.ps1") + + # Iterate over each file-directory pair in the moduleMapping.json + foreach ($fileEntry in $moduleMapping.PSObject.Properties) { + $fileName = $fileEntry.Name # Key (file name without extension) + $subDirName = $fileEntry.Value # Value (sub-directory name) + + # Create the sub-directory under the output root directory if it doesn't exist + $targetSubDir = Join-Path -Path $OutputDirectory -ChildPath $subDirName + + # Skip specified subdirectories + if ($subDirName -eq 'Migration' -or $subDirName -eq 'Invitations') { + Log-Message "Skipping $subDirName" -Level 'WARNING' + continue + } + + if (-not (Test-Path -Path $targetSubDir -PathType Container)) { + New-Item -Path $targetSubDir -ItemType Directory | Out-Null + Log-Message -Message "Created sub-directory: $targetSubDir" -Level 'SUCCESS' + } + + # Build the full source file path for the .Tests.ps1 file + $sourceFile = Join-Path -Path $TestSourceDirectory -ChildPath "$fileName.Tests.ps1" + + if (Test-Path -Path $sourceFile -PathType Leaf) { + # Copy the file to the target sub-directory + Copy-Item -Path $sourceFile -Destination $targetSubDir + Log-Message -Message "Copied '$sourceFile' to '$targetSubDir'" -Level 'SUCCESS' + + # Track the processed file + $processedFiles[$fileName] = $true + } else { + Log-Message -Message "File '$fileName.Tests.ps1' not found in '$TestSourceDirectory'" -Level 'WARNING' + } + + # Copy additional test files to the target sub-directory + foreach ($additionalTestFile in $additionalTestFiles) { + $additionalSourceFile = Join-Path -Path $TestSourceDirectory -ChildPath $additionalTestFile + if (Test-Path -Path $additionalSourceFile -PathType Leaf) { + # Copy the additional test file + Copy-Item -Path $additionalSourceFile -Destination $targetSubDir + Log-Message -Message "Copied additional test file '$additionalSourceFile' to '$targetSubDir'" -Level 'SUCCESS' + + # Track the processed additional file + $processedFiles[$additionalTestFile] = $true + } else { + Log-Message -Message "Additional test file '$additionalTestFile' not found in '$TestSourceDirectory'" -Level 'WARNING' + } + } + + # Check if the current test file name contains "Dir" or "Application" and handle them appropriately + if ($fileName -like "*Dir*" -or $fileName -like "*Application*") { + # Prepare the modified content for Dir or Application tests + $sourceFileDir = Join-Path -Path $TestSourceDirectory -ChildPath "$fileName.Tests.ps1" + if (Test-Path -Path $sourceFileDir -PathType Leaf) { + # Copy the file to the appropriate target directory + $targetDirSubDir = if ($fileName -like "*Dir*") { + Join-Path -Path $OutputDirectory -ChildPath "DirectoryManagement" + } elseif ($fileName -like "*Application*") { + Join-Path -Path $OutputDirectory -ChildPath "Applications" + } else { + $targetSubDir + } + + if (-not (Test-Path -Path $targetDirSubDir -PathType Container)) { + New-Item -Path $targetDirSubDir -ItemType Directory | Out-Null + Log-Message -Message "Created target directory: $targetDirSubDir" -Level 'SUCCESS' + } + + # Copy the file to the determined sub-directory + Copy-Item -Path $sourceFileDir -Destination $targetDirSubDir + Log-Message -Message "Copied '$sourceFileDir' to '$targetDirSubDir'" -Level 'SUCCESS' + + # Track the processed Dir/Application file + + $processedFiles[$fileName] = $true + } + } + } + + # Process all copied files to update their contents + foreach ($subDir in Get-ChildItem -Path $OutputDirectory -Directory) { + $subDirPath = $subDir.FullName + $testFilesInSubDir = Get-ChildItem -Path $subDirPath -Filter "*.Tests.ps1" + + foreach ($testFile in $testFilesInSubDir) { + $fileContent = Get-Content -Path $testFile.FullName -Raw + $updatedContent = $fileContent -replace [regex]::Escape($modulePrefix), "$modulePrefix.$($subDir.Name)" + + + # Save the modified content back to the file + $updatedContent | Set-Content -Path $testFile.FullName + Log-Message -Message "Updated content in '$testFile.FullName'" -Level 'SUCCESS' + } + } + + + + # Handle unmapped files that do not exist in the mapping + foreach ($testFile in $allTestFiles) { + $baseName = $testFile.BaseName -replace '\.Tests$', '' # Remove '.Tests' suffix + + # Only consider unmapped files if they haven't been processed + if (-not $processedFiles.ContainsKey($baseName)) { + # Check if the test file already exists in the output directories + $isMapped = $false + + # Check for both Entra and EntraBeta directories + if (Test-Path -Path (Join-Path -Path $OutputDirectory -ChildPath $baseName)) { + $isMapped = $true + } + + # If not mapped, copy it to the root output directory + if (-not $isMapped) { + Copy-Item -Path $testFile.FullName -Destination $OutputDirectory + Log-Message -Message "Copied unmapped test '$testFile' to '$OutputDirectory'" -Level 'INFO' + } + } + } + + Log-Message -Message "Split-Tests completed for source: $Module" -Level 'SUCCESS' +} + + +Split-Tests -Module 'EntraBeta' diff --git a/build/Update-CommonFunctionsImport.ps1 b/build/Update-CommonFunctionsImport.ps1 new file mode 100644 index 0000000000..d9f028b2d9 --- /dev/null +++ b/build/Update-CommonFunctionsImport.ps1 @@ -0,0 +1,46 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +. ./common-functions.ps1 + +function Update-CommonFunctionsImport { + param ( + [string]$Module = 'Entra' # Default to 'Entra' if no path is provided + ) + + $rootPath = if ($Module -eq 'Entra') { + "../testVNext/Entra" + } else { + "../testVNext/EntraBeta" + } + + # Get all .Tests.ps1 files in the specified directory and its subdirectories + $testFiles = Get-ChildItem -Path $rootPath -Recurse -Filter *.Tests.ps1 + + Log-Message "Starting common-functions import update" + + # Loop through each file + foreach ($file in $testFiles) { + # Read the content of the file + $content = Get-Content -Path $file.FullName -Raw + + Log-Message "Processing $file" + + # Check and replace all occurrences of the target string + if ($content -match 'Import-Module\s*\(\s*Join-Path\s*\$psscriptroot\s*["'']\.\.\\Common-Functions\.ps1["'']\s*\)\s*-Force') { + # Replace the old string with the new one + $newContent = $content -replace 'Import-Module\s*\(\s*Join-Path\s*\$psscriptroot\s*["'']\.\.\\Common-Functions\.ps1["'']\s*\)\s*-Force', 'Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force' + + # Write the updated content back to the file + Set-Content -Path $file.FullName -Value $newContent + + # Output the change + Log-Message "Updated file: $($file.FullName)" + } + } +} + +# Run the function for both modules +Update-CommonFunctionsImport -Module 'Entra' +Update-CommonFunctionsImport -Module 'EntraBeta' diff --git a/build/TypeDefs.txt b/build/V1.0-TypeDefs.txt similarity index 100% rename from build/TypeDefs.txt rename to build/V1.0-TypeDefs.txt diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 new file mode 100644 index 0000000000..8ef822b5ca --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaApplicationOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaApplicationOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 new file mode 100644 index 0000000000..6e77542901 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaApplicationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ID"]) { + $id = $PSBoundParameters["ID"] + } + if ($null -ne $PSBoundParameters["RefObjectId"]) { + $RefObjectId = $PSBoundParameters["RefObjectId"] + } + $uri = "https://graph.microsoft.com/beta/applications/$id/Policies/" + '$ref' + $body = @{ + "@odata.id" = "https://graph.microsoft.com/beta/legacy/policies/$RefObjectId" + } + $body = $body | ConvertTo-Json + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-MgGraphRequest -Headers $customHeaders -Method POST -Uri $uri -Body $body -ContentType "application/json" + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 new file mode 100644 index 0000000000..820bc1ccff --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaServicePrincipalDelegatedPermissionClassification { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PermissionName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PermissionId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["PermissionName"]) + { + $params["PermissionName"] = $PSBoundParameters["PermissionName"] + } + if ($null -ne $PSBoundParameters["Classification"]) + { + $params["Classification"] = $PSBoundParameters["Classification"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PermissionId"]) + { + $params["PermissionId"] = $PSBoundParameters["PermissionId"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaServicePrincipalDelegatedPermissionClassification @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 new file mode 100644 index 0000000000..7af2f0b7b7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaServicePrincipalOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaServicePrincipalOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 new file mode 100644 index 0000000000..ed72d70cf3 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 @@ -0,0 +1,159 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplication { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias("ObjectId")] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================") + + $response = Get-MgBetaApplication @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name InformationalUrls -Value Info + + $myAppRoles = New-Object System.Collections.Generic.List[Microsoft.Open.AzureAD.Model.AppRole] + foreach ($appRole in $_.AppRoles) { + $hash = New-Object Microsoft.Open.AzureAD.Model.AppRole + foreach ($propertyName in $hash.psobject.Properties.Name) { + $hash.$propertyName = $appRole.$propertyName + } + $myAppRoles.Add($hash) + } + Add-Member -InputObject $_ -MemberType NoteProperty -Name AppRoles -Value ($myAppRoles) -Force + $propsToConvert = @( + 'Logo','GroupMembershipClaims','IdentifierUris','Info', + 'IsDeviceOnlyAuthSupported','KeyCredentials','Oauth2RequirePostResponse','OptionalClaims', + 'ParentalControlSettings','PasswordCredentials','Api','PublicClient', + 'PublisherDomain','Web','RequiredResourceAccess','SignInAudience') + try { + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + foreach ($credType in @('KeyCredentials', 'PasswordCredentials')) { + if ($null -ne $_.PSObject.Properties[$credType]) { + $_.$credType | ForEach-Object { + try { + if ($null -ne $_.EndDateTime -or $null -ne $_.StartDateTime) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name EndDate -Value $_.EndDateTime + Add-Member -InputObject $_ -MemberType NoteProperty -Name StartDate -Value $_.StartDateTime + $_.PSObject.Properties.Remove('EndDateTime') + $_.PSObject.Properties.Remove('StartDateTime') + } + } + catch {} + } + } + } + } + + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 new file mode 100644 index 0000000000..44126b227c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationExtensionProperty { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaApplicationExtensionProperty @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 new file mode 100644 index 0000000000..3cf90195ad --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 @@ -0,0 +1,18 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + (Get-MgBetaApplication -Headers $customHeaders -ApplicationId $PSBoundParameters["ObjectId"]).KeyCredentials + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 new file mode 100644 index 0000000000..8cdfd7fc3f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationLogo { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FileName, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $View, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = 'https://graph.microsoft.com/beta/applications' + $Method = "GET" + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $URI = "$baseUri/$($params.ApplicationId)" + } + if($null -ne $PSBoundParameters["FilePath"]){ + $params["FilePath"] = $PSBoundParameters["FilePath"] + $imageExtensions = @(".jpg", ".jpeg", ".png", ".gif", ".bmp") + if(-not (Test-Path $($params.FilePath) -PathType Leaf) -and $imageExtensions -notcontains [System.IO.Path]::GetExtension($($params.FilePath))){ + Write-Error -Message "Get-EntraBetaApplicationLogo : FilePath is invalid" + break; + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $logoUrl = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).Info.logoUrl + if($null -ne $logoUrl){ + try { + Invoke-WebRequest -Uri $logoUrl -OutFile $($params.FilePath) + } + catch { + + } + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 new file mode 100644 index 0000000000..05d02a4f02 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationOwner { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaApplicationOwner @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('assignedLicenses','assignedPlans','provisionedPlans','identities') + try { + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 new file mode 100644 index 0000000000..0865d3014f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 @@ -0,0 +1,57 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $ApplicationId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $baseUri = "https://graph.microsoft.com/beta/applications/$ApplicationId/passwordCredentials" + $params["Method"] = "GET" + $params["Uri"] = "$baseUri" + + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + try { + $response = $response.value + } + catch {} + $response | ForEach-Object { + if($null -ne $_) { + $CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_.CustomKeyIdentifier))) + Add-Member -InputObject $_ -MemberType NoteProperty -Name CustomKeyIdentifier -Value $CustomKeyIdentifier -Force + Add-Member -InputObject $_ -MemberType AliasProperty -Name EndDate -Value endDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name StartDate -Value startDateTime + } + } + if($response) + { + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphPasswordCredential + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + if($null -ne $PSBoundParameters["Property"]) + { + $userList | Select-Object $PSBoundParameters["Property"] + } + else { + $userList + } + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 new file mode 100644 index 0000000000..afac1cc31c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["Id"]) { + $params["Id"] = $PSBoundParameters["Id"] + } + $Method = "GET" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $URI = 'https://graph.microsoft.com/beta/applications/{0}/policies' -f $Id + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method | ConvertTo-Json -Depth 10 | ConvertFrom-Json).value + $response | Add-Member -MemberType AliasProperty -Value '@odata.type' -Name 'odata.type' + + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $respList = @() + + foreach ($res in $data) { + switch ($res.type) { + "activityBasedTimeoutPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGrphActivityBasedTimeoutPolicy } + "appManagementPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAppManagementPolicy } + "claimsMappingPolicies" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphClaimsMappingPolicy } + "featureRolloutPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy } + "HomeRealmDiscoveryPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphHomeRealmDiscoveryPolicy } + "tokenIssuancePolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTokenIssuancePolicy } + "tokenLifetimePolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTokenLifetimePolicy } + "permissionGrantPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphPermissionGrantPolicy } + default { Write-Error "Unknown type: $Type" } + } + + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $respType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $respList += $respType + } + $respList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 new file mode 100644 index 0000000000..1f9403a5b3 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationProxyApplication { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["Select"] = "onPremisesPublishing" + } + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $app = Get-MgBetaApplication @params -Headers $customHeaders + $response = $app.OnPremisesPublishing + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 new file mode 100644 index 0000000000..904c3a6627 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationProxyConnector { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("Id")] + [System.String] $OnPremisesPublishingProfileId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "GET" + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors" + if($null -ne $PSBoundParameters["SearchString"]) + { + $f = '$' + 'Filter' + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors?$f=machineName eq '$SearchString' OR startswith(machineName,'$SearchString')" + } + if($null -ne $PSBoundParameters["OnPremisesPublishingProfileId"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors/$OnPremisesPublishingProfileId" + } + if($null -ne $PSBoundParameters["Filter"]) + { + $f = '$' + 'Filter' + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors?$f=$filter" + } + if($null -ne $PSBoundParameters["All"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $t = '$' + 'Top' + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors?$t=$top" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri + + try { + $data = $response.Value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + catch { + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + + $targetList = @() + foreach ($res in $data) { + $targetType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $targetType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetList += $targetType + } + $targetList + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 new file mode 100644 index 0000000000..23a59d2ac4 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationProxyConnectorGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "GET" + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups" + if($null -ne $PSBoundParameters["SearchString"]) + { + $f = '$' + 'Filter' + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups?$f=name eq '$SearchString' OR startswith(name,'$SearchString')" + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$Id" + } + if($null -ne $PSBoundParameters["Filter"]) + { + $f = '$' + 'Filter' + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups?$f=$filter" + } + if($null -ne $PSBoundParameters["All"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $t = '$' + 'Top' + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups?$t=$top" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri + + try { + $data = $response.Value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + catch { + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + + $targetList = @() + foreach ($res in $data) { + $targetType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphConnectorGroup + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $targetType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetList += $targetType + } + $targetList + + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 new file mode 100644 index 0000000000..e6a56cd1f6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationProxyConnectorGroupMembers { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("Id")] + [System.String] $OnPremisesPublishingProfileId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter( ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "GET" + $Id = $PSBoundParameters["OnPremisesPublishingProfileId"] + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$Id/members" + if($PSBoundParameters.ContainsKey("OnPremisesPublishingProfileId")) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$Id/members" + } + if($PSBoundParameters.ContainsKey("Filter")) + { + $f = '$' + 'Filter' + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$Id/members?$f=$filter" + } + if($PSBoundParameters.ContainsKey("All")) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$Id/members" + } + if($PSBoundParameters.ContainsKey("top")) + { + $t = '$' + 'Top' + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$Id/members?$t=$top" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri + try { + $data = $response.Value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + catch { + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + + $targetList = @() + foreach ($res in $data) { + $targetType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphConnector + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $targetType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetList += $targetType + } + $targetList + + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 new file mode 100644 index 0000000000..98cc853223 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 @@ -0,0 +1,49 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationProxyConnectorMemberOf { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("Id")] + [System.String] $OnPremisesPublishingProfileId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "GET" + $Id = $PSBoundParameters["OnPremisesPublishingProfileId"] + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors/$Id/memberOf" + if($PSBoundParameters.ContainsKey("OnPremisesPublishingProfileId")) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors/$Id/memberOf" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri + try { + $data = $response.Value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + catch { + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + + $targetList = @() + foreach ($res in $data) { + $targetType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphConnectorGroup + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $targetType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetList += $targetType + } + $targetList + + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 new file mode 100644 index 0000000000..b06e4a3b0a --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationTemplate { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["Id"]) + { + $params["ApplicationTemplateId"] = $PSBoundParameters["Id"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Get-MgBetaApplicationTemplate @params -Headers $customHeaders + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 new file mode 100644 index 0000000000..68e7132997 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 @@ -0,0 +1,147 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDeletedApplication { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryDeletedItemAsApplication @params -Headers $customHeaders + + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + + $propsToConvert = @( + 'addIns','AppRoles','GroupMembershipClaims','IdentifierUris','Info', + 'IsDeviceOnlyAuthSupported','KeyCredentials','OptionalClaims', + 'ParentalControlSettings','PasswordCredentials','Api','PublicClient', + 'PublisherDomain','Web','RequiredResourceAccess') + + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + + Add-Member -InputObject $_ -MemberType AliasProperty -Name AppLogoUrl -Value Logo + Add-Member -InputObject $_ -MemberType AliasProperty -Name InformationalUrls -Value Info + Add-Member -InputObject $_ -MemberType AliasProperty -Name HomePage -Value Web.HomePageUrl + Add-Member -InputObject $_ -MemberType AliasProperty -Name LogoutUrl -Value Web.LogoutUrl + Add-Member -InputObject $_ -MemberType AliasProperty -Name ReplyUrls -Value Web.RedirectUris + Add-Member -InputObject $_ -MemberType AliasProperty -Name KnownClientApplications -Value Api.KnownClientApplications + Add-Member -InputObject $_ -MemberType AliasProperty -Name PreAuthorizedApplications -Value Api.PreAuthorizedApplications + Add-Member -InputObject $_ -MemberType AliasProperty -Name Oauth2AllowImplicitFlow -Value Web.Oauth2AllowImplicitFlow + } + + } + + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 new file mode 100644 index 0000000000..208f685b76 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPasswordSingleSignOnCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) + { + $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] + $Value = $TmpValue.Id + $params["Id"] = $Value + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalPasswordSingleSignOnCredential @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 new file mode 100644 index 0000000000..ebd3afc182 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 @@ -0,0 +1,128 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipal { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "publisherName eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue'))" + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipal @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 new file mode 100644 index 0000000000..b8dede26ef --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalAppRoleAssignedTo { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 new file mode 100644 index 0000000000..5b2133bd31 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalAppRoleAssignedTo @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 new file mode 100644 index 0000000000..6b161ad403 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalCreatedObject { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalCreatedObject @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 new file mode 100644 index 0000000000..8d4f1932c9 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalDelegatedPermissionClassification { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalDelegatedPermissionClassification @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 new file mode 100644 index 0000000000..f9a490e3e8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalKeyCredential { + function Get-EntraBetaServicePrincipalKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $ServicePrincipalId + ) + + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $response = (Get-MgBetaServicePrincipal -Headers $customHeaders -ServicePrincipalId $PSBoundParameters["ServicePrincipalId"]).KeyCredentials + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name StartDate -Value StartDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name EndDate -Value EndDateTime + } + } + $response +} +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 new file mode 100644 index 0000000000..f9a8710f14 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalMembership { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalTransitiveMemberOf @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 new file mode 100644 index 0000000000..994d5c36c5 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalOAuth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalOauth2PermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 new file mode 100644 index 0000000000..67238251a9 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalOwnedObject { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalOwnedObject @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 new file mode 100644 index 0000000000..fd849ab81b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalOwner { + function Get-EntraBetaServicePrincipalOwner { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaServicePrincipalOwner @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('appRoles','publishedPermissionScopes') + try{ + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + }catch{} + } + } + $response + } +} +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 new file mode 100644 index 0000000000..18ddd24926 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalPasswordCredential { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $response = (Get-MgBetaServicePrincipal -Headers $customHeaders -ServicePrincipalId $PSBoundParameters["ServicePrincipalId"]).PasswordCredentials + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name StartDate -Value StartDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name EndDate -Value EndDateTime + } + } + $response +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 new file mode 100644 index 0000000000..e619f663fa --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 @@ -0,0 +1,295 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplication { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TokenEncryptionKeyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Tags, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.WebApplication] $Web, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GroupMembershipClaims, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $OrgRestrictions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $SignInAudience, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) + { + $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["PasswordCredentials"]) + { + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $Temp = $v | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} + $a += $hash + } + + $Value = $a + $params["PasswordCredentials"] = $Value + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + { + $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + } + if($null -ne $PSBoundParameters["Api"]) + { + $TmpValue = $PSBoundParameters["Api"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Api"] = $Value + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["Tags"]) + { + $params["Tags"] = $PSBoundParameters["Tags"] + } + if($null -ne $PSBoundParameters["Web"]) + { + $TmpValue = $PSBoundParameters["Web"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Web"] = $Value + } + if($null -ne $PSBoundParameters["RequiredResourceAccess"]) + { + $TmpValue = $PSBoundParameters["RequiredResourceAccess"] + $Value = $TmpValue | ConvertTo-Json + $params["RequiredResourceAccess"] = $Value + } + if($null -ne $PSBoundParameters["InformationalUrl"]) + { + $TmpValue = $PSBoundParameters["InformationalUrl"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Info"] = $Value + } + if($null -ne $PSBoundParameters["AppRoles"]) + { + $TmpValue = $PSBoundParameters["AppRoles"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $Temp = $v | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} + $a += $hash + } + + $Value = $a + $params["AppRoles"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["ParentalControlSettings"]) + { + $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["ParentalControlSettings"] = $Value + } + if ($null -ne $PSBoundParameters["PreAuthorizedApplications"]) + { + $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["KeyCredentials"]) + { + $TmpValue = $PSBoundParameters["KeyCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDateTime + Key= $v.Key + StartDateTime= $v.StartDateTime + Type= $v.Type + Usage= $v.Usage + } + + $a += $hash + } + + $Value = $a + $params["KeyCredentials"] = $Value + } + if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) + { + $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] + } + if($null -ne $PSBoundParameters["PublicClient"]) + { + $TmpValue = $PSBoundParameters["PublicClient"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["PublicClient"] = $Value + } + if ($null -ne $PSBoundParameters["OrgRestrictions"]) + { + $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] + } + if ($null -ne $PSBoundParameters["AddIns"]) + { + $params["AddIns"] = $PSBoundParameters["AddIns"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["IdentifierUris"]) + { + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["SignInAudience"]) + { + $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] + } + if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) + { + $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] + } + if($null -ne $PSBoundParameters["OptionalClaims"]) + { + $TmpValue = $PSBoundParameters["OptionalClaims"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["OptionalClaims"] = $Value + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaApplication @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 new file mode 100644 index 0000000000..1a8515e9b0 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplicationExtensionProperty { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DataType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $TargetObjects, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Name + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["DataType"]) + { + $params["DataType"] = $PSBoundParameters["DataType"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["TargetObjects"]) + { + $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["Name"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaApplicationExtensionProperty @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 new file mode 100644 index 0000000000..581b0f7884 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 @@ -0,0 +1,119 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplicationFromApplicationTemplate { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.ApplicationTemplateDisplayName] $DisplayName + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["Id"]) { + $params["ApplicationTemplateId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) { + $params["displayName"] = ($PSBoundParameters["displayName"]).displayname + } + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-MgBetaInstantiateApplicationTemplate @params -Headers $customHeaders + $Application = [PSCustomObject]@{ + "ObjectId" = ($response.Application | select-object -ExpandProperty AdditionalProperties)["objectId"] + "ApplicationTemplateId" = ($response.Application | select-object -ExpandProperty AdditionalProperties)["applicationTemplateId"] + "AppId" = ($response.Application).AppId + "DisplayName" = ($response.Application).DisplayName + "Homepage" = ($response.Application | select-object -ExpandProperty AdditionalProperties)["homepage"] + "IdentifierUris" = ($response.Application).IdentifierUris + "PublicClient" = ($response.Application).PublicClient.RedirectUris + "ReplyUrls" = ($response.Application | select-object -ExpandProperty AdditionalProperties)["replyUrls"] + "LogoutUrl" = ($response.Application | select-object -ExpandProperty web).LogoutUrl + "GroupMembershipClaims" = ($response.Application).GroupMembershipClaims + "AvailableToOtherTenants" = ($response.Application | select-object -ExpandProperty AdditionalProperties)["availableToOtherTenants"] + } + $ServicePrincipal = [PSCustomObject]@{ + "Id" = ($response.ServicePrincipal).Id + "ObjectId" = ($response.ServicePrincipal | select-object -ExpandProperty AdditionalProperties)["objectId"] + "AccountEnabled" = ($response.ServicePrincipal).AccountEnabled + "AppDisplayName" = ($response.ServicePrincipal).AppDisplayName + "ApplicationTemplateId" = ($response.ServicePrincipal | select-object -ExpandProperty AdditionalProperties)["applicationTemplateId"] + "AppId" = ($response.ServicePrincipal).AppId + "AppRoleAssignmentRequired" = ($response.ServicePrincipal).AppRoleAssignmentRequired + "CustomSecurityAttributes" = ($response.ServicePrincipal).CustomSecurityAttributes + "DisplayName" = ($response.ServicePrincipal).DisplayName + "ErrorUrl" = ($response.ServicePrincipal).ErrorUrl + "LogoutUrl" = ($response.ServicePrincipal).LogoutUrl + "Homepage" = ($response.ServicePrincipal).Homepage + "SamlMetadataUrl" = ($response.ServicePrincipal).SamlMetadataUrl + "PublisherName" = ($response.ServicePrincipal).PublisherName + "PreferredTokenSigningKeyThumbprint" = ($response.ServicePrincipal).PreferredTokenSigningKeyThumbprint + "ReplyUrls" = ($response.ServicePrincipal).ReplyUrls + "Tags" = ($response.ServicePrincipal).Tags + "ServicePrincipalNames" = ($response.ServicePrincipal).ServicePrincipalNames + "KeyCredentials" = ($response.ServicePrincipal).KeyCredentials + "PasswordCredentials" = ($response.ServicePrincipal).PasswordCredentials + "IdentifierUris" = ($response.Application).IdentifierUris + "PublicClient" = ($response.Application).PublicClient.RedirectUris + "GroupMembershipClaims" = ($response.Application).GroupMembershipClaims + "AvailableToOtherTenants" = ($response.Application | select-object -ExpandProperty AdditionalProperties)["availableToOtherTenants"] + } + $re = [PSCustomObject]@{ + "application" = $Application + "serviceprincipal" = $ServicePrincipal + } + $re + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 new file mode 100644 index 0000000000..63943e2a58 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplicationKey { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Proof, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["PasswordCredential"]) + { + $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["Proof"]) + { + $params["Proof"] = $PSBoundParameters["Proof"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["KeyCredential"]) + { + $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Add-MgBetaApplicationKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 new file mode 100644 index 0000000000..0351736632 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplicationKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomKeyIdentifier, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Value, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $StartDate, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $EndDate, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) + { + $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["Value"]) + { + $params["Value"] = $PSBoundParameters["Value"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["StartDate"]) + { + $params["StartDate"] = $PSBoundParameters["StartDate"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["Usage"]) + { + $params["Usage"] = $PSBoundParameters["Usage"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["EndDate"]) + { + $params["EndDate"] = $PSBoundParameters["EndDate"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["Type"]) + { + $params["Type"] = $PSBoundParameters["Type"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Add-MgBetaApplicationKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 new file mode 100644 index 0000000000..5b8c4777a7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplicationPassword { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["PasswordCredential"]) + { + $TmpValue = $PSBoundParameters["PasswordCredential"] + $hash = @{} + $TmpValue.PSObject.Properties | ForEach-Object { + if ($_.Value) { + $hash[$_.Name] = $_.Value + } + } + + $Value = $hash + $params["PasswordCredential"] = $Value + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Add-MgBetaApplicationPassword @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 new file mode 100644 index 0000000000..33592568a8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 @@ -0,0 +1,104 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplicationPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $EndDate, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomKeyIdentifier, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $StartDate, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Value + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + $body=@{} + + if($null -ne $PSBoundParameters["StartDate"]) + { + $body["startDateTime"] = $PSBoundParameters["StartDate"] + } + if($null -ne $PSBoundParameters["EndDate"]) + { + $body["endDateTime"] = $PSBoundParameters["EndDate"] + } + if($null -ne $PSBoundParameters["CustomKeyIdentifier"]) + { + $body["displayName"] = $PSBoundParameters["CustomKeyIdentifier"] + } + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + $params["PasswordCredential"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Add-MgBetaApplicationPassword @params -Headers $customHeaders + $response | ForEach-Object { + If($_.DisplayName){ + $Value = [System.Text.Encoding]::ASCII.GetBytes($_.DisplayName) + Add-Member -InputObject $_ -MemberType NoteProperty -Name CustomKeyIdentifier -Value $Value -Force + } + Add-Member -InputObject $_ -MemberType AliasProperty -Name Value -Value SecretText + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 new file mode 100644 index 0000000000..aacdd9477e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 @@ -0,0 +1,176 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplicationProxyApplication { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DisplayName, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExternalUrl, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $InternalUrl, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [String] $ExternalAuthenticationType, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsTranslateHostHeaderEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsHttpOnlyCookieEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsSecureCookieEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsPersistentCookieEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsTranslateLinksInBodyEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationServerTimeout, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConnectorGroupId + + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $onPremisesPublishing = @{} + if($null -ne $PSBoundParameters["DisplayName"]) + { + $DisplayName = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["ExternalUrl"]) + { + $onPremisesPublishing["externalUrl"] = $PSBoundParameters["ExternalUrl"] + } + if($null -ne $PSBoundParameters["InternalUrl"]) + { + $onPremisesPublishing["internalUrl"] = $PSBoundParameters["InternalUrl"] + } + if($null -ne $PSBoundParameters["ExternalAuthenticationType"]) + { + $onPremisesPublishing["externalAuthenticationType"] = $PSBoundParameters["ExternalAuthenticationType"] + $onPremisesPublishing["externalAuthenticationType"] = $onPremisesPublishing.externalAuthenticationType.Substring(0, 1).ToLower() + $onPremisesPublishing.externalAuthenticationType.Substring(1) + } + if($null -ne $PSBoundParameters["IsTranslateHostHeaderEnabled"]) + { + $onPremisesPublishing["isTranslateHostHeaderEnabled"] = $PSBoundParameters["IsTranslateHostHeaderEnabled"] + } + if($null -ne $PSBoundParameters["IsHttpOnlyCookieEnabled"]) + { + $onPremisesPublishing["isHttpOnlyCookieEnabled"] = $PSBoundParameters["IsHttpOnlyCookieEnabled"] + } + if($null -ne $PSBoundParameters["IsSecureCookieEnabled"]) + { + $onPremisesPublishing["isSecureCookieEnabled"] = $PSBoundParameters["IsSecureCookieEnabled"] + } + if($null -ne $PSBoundParameters["IsPersistentCookieEnabled"]) + { + $onPremisesPublishing["isPersistentCookieEnabled"] = $PSBoundParameters["IsPersistentCookieEnabled"] + } + if($null -ne $PSBoundParameters["IsTranslateLinksInBodyEnabled"]) + { + $onPremisesPublishing["isTranslateLinksInBodyEnabled"] = $PSBoundParameters["IsTranslateLinksInBodyEnabled"] + } + if($null -ne $PSBoundParameters["ApplicationServerTimeout"]) + { + $onPremisesPublishing["applicationServerTimeout"] = $PSBoundParameters["ApplicationServerTimeout"] + } + + #Create New App + $newAppBody = @{ + displayName = $DisplayName + } | ConvertTo-Json + try { + $NewApp = Invoke-GraphRequest -Uri 'https://graph.microsoft.com/v1.0/applications' -Method POST -Body $newAppBody + $Id = $NewApp.Id + } catch { + Write-Error $_ + return + } + + # Update InternalUrl and ExternalUrl + if($null -ne $NewApp){ + if ($ExternalUrl.EndsWith("/")) { + $exUrl = $ExternalUrl.TrimEnd("/") + } + else { + $exUrl = $ExternalUrl + } + $UpdateUrlBody = @{ + identifierUris = @($exUrl) + web = @{ + redirectUris = @($ExternalUrl) + homePageUrl = $InternalUrl + } + } + try { + Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$Id" -Method PATCH -Body $updateUrlBody + } catch { + Write-Error $_ + return + } + } + + # Create ServicePrincipal + if($null -ne $NewApp){ + $serviceBody = @{ + appId = $NewApp.AppId + } | ConvertTo-Json + try { + $ServicePrincipal = Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/servicePrincipals" -Method POST -Body $serviceBody + } catch { + Write-Error $_ + return + } + } + + # update onpremises + if($null -ne $ServicePrincipal -and $null -ne $NewApp){ + $onPremisesPublishingBody = @{onPremisesPublishing = $onPremisesPublishing} + try { + Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$Id" -Method PATCH -Body $onPremisesPublishingBody + } catch { + Write-Error $_ + return + } + } + + #update connector group + if($null -ne $PSBoundParameters["ConnectorGroupId"] -and $null -ne $NewApp){ + $ConnectorGroupId = $PSBoundParameters["ConnectorGroupId"] + $ConnectorGroupBody = @{ + "@odata.id" = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationproxy/connectorGroups/$ConnectorGroupId" + } + $ConnectorGroupBody = $ConnectorGroupBody | ConvertTo-Json + $ConnectorGroupUri = "https://graph.microsoft.com/beta/applications/$Id/connectorGroup/" + '$ref' + try { + Invoke-GraphRequest -Method PUT -Uri $ConnectorGroupUri -Body $ConnectorGroupBody -ContentType "application/json" + } catch { + Write-Error $_ + return + } + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$Id/onPremisesPublishing" -Headers $customHeaders -Method GET) | ConvertTo-Json -depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name ObjectId -Value $Id + } + } + + $response = $response | Select-Object ObjectId,ExternalAuthenticationType,ApplicationServerTimeout,ExternalUrl,InternalUrl,IsTranslateHostHeaderEnabled,IsTranslateLinksInBodyEnabled,IsOnPremPublishingEnabled,VerifiedCustomDomainCertificatesMetadata,VerifiedCustomDomainKeyCredential,VerifiedCustomDomainPasswordCredential,SingleSignOnSettings,IsHttpOnlyCookieEnabled,IsSecureCookieEnabled,IsPersistentCookieEnabled | ConvertTo-Json -depth 10 | ConvertFrom-Json + + $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphonPremisesPublishing + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $respType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + + } + + $respType + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 new file mode 100644 index 0000000000..3b3d20bad8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaApplicationProxyConnectorGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "POST" + $body = @{} + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups" + + if($null -ne $PSBoundParameters["Name"]) + { + $body = @{ + "name" = $PSBoundParameters["Name"] + } + $body = $body | ConvertTo-Json + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-MgGraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri -Body $body -ContentType "application/json" + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 new file mode 100644 index 0000000000..e5de19bd52 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaPasswordSingleSignOnCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["PasswordSSOCredential"]) + { + $TmpValue = $PSBoundParameters["PasswordSSOCredential"] + $Value = $TmpValue | ConvertTo-Json + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaServicePrincipalPasswordSingleSignOnCredential @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 new file mode 100644 index 0000000000..6c019d3ed8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 @@ -0,0 +1,229 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaServicePrincipal { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ServicePrincipalType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ErrorUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Tags, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PublisherName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Homepage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $SamlMetadataUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $AlternativeNames, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $LogoutUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ReplyUrls, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ServicePrincipalType"]) + { + $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) + { + $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["PasswordCredentials"]) + { + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDate + SecretText= $v.Value + StartDateTime= $v.StartDate + } + + $a += $hash + } + $Value = $a + $params["PasswordCredentials"] = $Value + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ErrorUrl"]) + { + $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["Tags"]) + { + $params["Tags"] = $PSBoundParameters["Tags"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PublisherName"]) + { + $params["PublisherName"] = $PSBoundParameters["PublisherName"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["Homepage"]) + { + $params["Homepage"] = $PSBoundParameters["Homepage"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["SamlMetadataUrl"]) + { + $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] + } + if ($null -ne $PSBoundParameters["AlternativeNames"]) + { + $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] + } + if($null -ne $PSBoundParameters["KeyCredentials"]) + { + $TmpValue = $PSBoundParameters["KeyCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $hash = @{ + CustomKeyIdentifier= $v.CustomKeyIdentifier + EndDateTime = $v.EndDate + Key= $v.Value + StartDateTime= $v.StartDate + Type= $v.Type + Usage= $v.Usage + } + + $a += $hash + } + $Value = $a + $params["KeyCredentials"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) + { + $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $TmpValue = $PSBoundParameters["AccountEnabled"] + $Value = $null + + if (-not [bool]::TryParse($TmpValue, [ref]$Value)) { + throw 'Invalid input for AccountEnabled' + return + } + $params["AccountEnabled"] = $Value + } + if ($null -ne $PSBoundParameters["LogoutUrl"]) + { + $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] + } + if ($null -ne $PSBoundParameters["ReplyUrls"]) + { + $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] + } + if ($null -ne $PSBoundParameters["AppId"]) + { + $params["AppId"] = $PSBoundParameters["AppId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaServicePrincipal @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name AppOwnerTenantId -Value AppOwnerOrganizationId + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 new file mode 100644 index 0000000000..cf6de3dd25 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaServicePrincipalAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PrincipalId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["AppRoleId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["PrincipalId"]) + { + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaServicePrincipalAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 new file mode 100644 index 0000000000..7b16611587 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaServicePrincipalPasswordCredential { + function New-EntraBetaServicePrincipalPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomKeyIdentifier, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $StartDate, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Value, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.DateTime]] $EndDate + ) + + PROCESS{ + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = 'https://graph.microsoft.com/beta/servicePrincipals' + $Method = "POST" + if($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["StartDate"] = $PSBoundParameters["StartDate"] + $params["EndDate"] = $PSBoundParameters["EndDate"] + + $URI = "$baseUri/$($params.ServicePrincipalId)/addPassword" + $body = @{ + passwordCredential = @{ + startDateTime = $PSBoundParameters["StartDate"]; + endDateTime = $PSBoundParameters["EndDate"]; + } + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method -Body $body) + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name StartDate -Value StartDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name EndDate -Value EndDateTime + } + } + + $targetTypeList = @() + foreach($data in $response){ + $target = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphPasswordCredential + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $target | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetTypeList += $target + } + $targetTypeList + } +} +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 new file mode 100644 index 0000000000..fd5afde7f6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplication { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaApplication @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 new file mode 100644 index 0000000000..fe1367998f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationExtensionProperty { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionPropertyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ExtensionPropertyId"]) + { + $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaApplicationExtensionProperty @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 new file mode 100644 index 0000000000..92cb34a504 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationKey { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $KeyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Proof, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["Proof"]) + { + $params["Proof"] = $PSBoundParameters["Proof"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaApplicationKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 new file mode 100644 index 0000000000..5c64834554 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationKeyCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaApplicationKey @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 new file mode 100644 index 0000000000..5a205a3ca7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["OwnerId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaApplicationOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 new file mode 100644 index 0000000000..b0dd5425f1 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationPassword { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $KeyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaApplicationPassword @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 new file mode 100644 index 0000000000..77cc98c711 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["KeyId"]) + { + $params["KeyId"] = $PSBoundParameters["KeyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaApplicationPassword @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 new file mode 100644 index 0000000000..c2e089e165 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 @@ -0,0 +1,34 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["Id"]) { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) { + $params["PolicyId"] = $PSBoundParameters["PolicyId"] + } + $Method = "DELETE" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $URI = 'https://graph.microsoft.com/beta/applications/{0}/policies/{1}/$ref' -f $Id,$PolicyId + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 new file mode 100644 index 0000000000..e6f14799ba --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationProxyApplication { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $RemoveADApplication + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $ObjectId = $PSBoundParameters["ApplicationId"] + } + if($null -ne $PSBoundParameters["RemoveADApplication"] -and $true -eq $PSBoundParameters["RemoveADApplication"] ) + { + $body = @{ + onPremisesPublishing = @{ + internalUrl = "PowerShellDeleteApplication" + externalUrl = "PowerShellDeleteApplication" + } + } | ConvertTo-Json + Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$ObjectId" -Method PATCH -Body $body + Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$ObjectId" -Method DELETE -Headers $customHeaders + } + if($null -eq $PSBoundParameters["RemoveADApplication"] -or ($null -ne $PSBoundParameters["RemoveADApplication"] -and $false -eq $PSBoundParameters["RemoveADApplication"])) + { + $body = @{ + onPremisesPublishing = @{ + internalUrl = "PowerShellDeleteApplication" + externalUrl = "PowerShellDeleteApplication" + } + } | ConvertTo-Json + Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$ObjectId" -Method PATCH -Headers $customHeaders -Body $body + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 new file mode 100644 index 0000000000..3a12cbf8cc --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationProxyApplicationConnectorGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $OnPremisesPublishingProfileId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "DELETE" + if($null -ne $PSBoundParameters["OnPremisesPublishingProfileId"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/applications/$OnPremisesPublishingProfileId/connectorGroup/"+'$ref' + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-MgGraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 new file mode 100644 index 0000000000..223beccb35 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationProxyConnectorGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "DELETE" + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$Id" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 new file mode 100644 index 0000000000..3c8b0c9bf8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaApplicationVerifiedPublisher { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["AppObjectId"]) + { + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Clear-MgBetaApplicationVerifiedPublisher @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 new file mode 100644 index 0000000000..9a1f36c217 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDeletedApplication { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDirectoryDeletedItem @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 new file mode 100644 index 0000000000..d8e3e632d2 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDeletedDirectoryObject { + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["Id"]) { + $params["Id"] = $PSBoundParameters["Id"] + } + $Method = "DELETE" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $URI = "https://graph.microsoft.com/v1.0/directory/deletedItems/$Id" + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 new file mode 100644 index 0000000000..375f7bfa63 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaPasswordSingleSignOnCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) + { + $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] + $Value = $TmpValue.Id + $params["Id"] = $Value + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 new file mode 100644 index 0000000000..ca9c692b00 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaServicePrincipal { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaServicePrincipal @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 new file mode 100644 index 0000000000..d132a0dc79 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaServicePrincipalAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppRoleAssignmentId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + { + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaServicePrincipalAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 new file mode 100644 index 0000000000..a5ae6f0d90 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -0,0 +1,21 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaServicePrincipalDelegatedPermissionClassification { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId + ) + + PROCESS{ + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + Remove-MgBetaServicePrincipalDelegatedPermissionClassification -Headers $customHeaders -ServicePrincipalId $PSBoundParameters["ServicePrincipalId"] -DelegatedPermissionClassificationId $PSBoundParameters["Id"] + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 new file mode 100644 index 0000000000..1ca53d5f43 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaServicePrincipalOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["OwnerId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaServicePrincipalOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 new file mode 100644 index 0000000000..e3a9f25226 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 @@ -0,0 +1,35 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaServicePrincipalPasswordCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KeyId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $ServicePrincipalId + ) + + PROCESS{ + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = 'https://graph.microsoft.com/beta/servicePrincipals' + $Method = "POST" + if($null -ne $PSBoundParameters["ServicePrincipalId"] -and $null -ne $PSBoundParameters["KeyId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["KeyId"] = $PSBoundParameters["KeyId"] + $URI = "$baseUri/$($params.ServicePrincipalId)/removePassword" + $body = @{ + "keyId" = $($params.KeyId) + } + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method -Body $body) + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 new file mode 100644 index 0000000000..d9262a6865 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 @@ -0,0 +1,104 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Restore-EntraBetaDeletedApplication { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] + } + if($null -ne $PSBoundParameters["IdentifierUris"]) + { + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Restore-MgBetaDirectoryDeletedItem @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name Homepage -value $_.AdditionalProperties['web']['homePageUrl'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name ReplyUrls -value $_.AdditionalProperties['web']['redirectUris'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name ParentalControlSettings -value $_.AdditionalProperties['parentalControlSettings'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name PasswordCredentials -value $_.AdditionalProperties['passwordCredentials'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name KeyCredentials -value $_.AdditionalProperties['keyCredentials'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name AddIns -value $_.AdditionalProperties['addIns'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name AppId -value $_.AdditionalProperties['appId'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name AppRoles -value $_.AdditionalProperties['appRoles'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name DisplayName -value $_.AdditionalProperties['displayName'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name IdentifierUris -value $_.AdditionalProperties['identifierUris'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name KnownClientApplications -value $_.AdditionalProperties['api']['knownClientApplications'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name Oauth2Permissions -value $_.AdditionalProperties['api']['oauth2PermissionScopes'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name PreAuthorizedApplications -value $_.AdditionalProperties['api']['preAuthorizedApplications'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name PublicClient -value $_.AdditionalProperties['publicClient'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name PublisherDomain -value $_.AdditionalProperties['publisherDomain'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name RequiredResourceAccess -value $_.AdditionalProperties['requiredResourceAccess'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name SignInAudience -value $_.AdditionalProperties['signInAudience'] + Add-Member -InputObject $_ -MemberType NoteProperty -Name ObjectType -value $_.AdditionalProperties['@odata.type'] + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 new file mode 100644 index 0000000000..85c91998d7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Select-EntraBetaGroupIdsServicePrincipalIsMemberOf { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $initalResponse = Get-MgBetaServicePrincipalMemberOf @params -Headers $customHeaders + $response = $initalResponse | Where-Object -Filterscript {$_.Id -in ($GroupIdsForMembershipCheck.GroupIds)} + if($response){ + $response.Id + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 new file mode 100644 index 0000000000..1434ad3ae2 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 @@ -0,0 +1,278 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaApplication { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.WebApplication] $Web, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Tags, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TokenEncryptionKeyId, + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GroupMembershipClaims, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $OrgRestrictions, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $SignInAudience, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["Api"]) + { + $TmpValue = $PSBoundParameters["Api"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["Api"] = $Value + } + if($null -ne $PSBoundParameters["OptionalClaims"]) + { + $TmpValue = $PSBoundParameters["OptionalClaims"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["OptionalClaims"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["Tags"]) + { + $params["Tags"] = $PSBoundParameters["Tags"] + } + if($null -ne $PSBoundParameters["Web"]) + { + $TmpValue = $PSBoundParameters["Web"] + $Value = @{} + if($TmpValue.LogoutUrl) { $Value["LogoutUrl"] = $TmpValue.LogoutUrl } + if($TmpValue.RedirectUris) { $Value["RedirectUris"] = $TmpValue.RedirectUris } + if($TmpValue.ImplicitGrantSettings) { $Value["ImplicitGrantSettings"] = $TmpValue.ImplicitGrantSettings } + + $params["Web"] = $Value + } + if($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + { + $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + } + if($null -ne $PSBoundParameters["RequiredResourceAccess"]) + { + $TmpValue = $PSBoundParameters["RequiredResourceAccess"] + $Value = $TmpValue | ConvertTo-Json + $params["RequiredResourceAccess"] = $Value + } + if($null -ne $PSBoundParameters["PublicClient"]) + { + $TmpValue = $PSBoundParameters["PublicClient"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["PublicClient"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) + { + $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] + } + if($null -ne $PSBoundParameters["KeyCredentials"]) + { + $TmpValue = $PSBoundParameters["KeyCredentials"] + $a = @() + $inpu = $TmpValue + foreach($v in $inpu) + { + $hash = @{} + if($TmpValue.CustomKeyIdentifier) { $hash["CustomKeyIdentifier"] = $v.CustomKeyIdentifier } + if($TmpValue.EndDateTime) { $hash["EndDateTime"] = $v.EndDateTime } + if($TmpValue.Key) { $hash["Key"] = $v.Key } + if($TmpValue.StartDateTime) { $hash["StartDateTime"] = $v.StartDateTime } + if($TmpValue.Type) { $hash["Type"] = $v.Type } + if($TmpValue.Usage) { $hash["Usage"] = $v.Usage } + if($TmpValue.KeyId) { $hash["KeyId"] = $v.KeyId } + + $a += $hash + } + + $Value = $a + $params["KeyCredentials"] = $Value + } + if($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) + { + $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + } + if($null -ne $PSBoundParameters["IdentifierUris"]) + { + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + } + if($null -ne $PSBoundParameters["ParentalControlSettings"]) + { + $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["ParentalControlSettings"] = $Value + } + if($null -ne $PSBoundParameters["GroupMembershipClaims"]) + { + $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] + } + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + } + if($null -ne $PSBoundParameters["AppRoles"]) + { + $TmpValue = $PSBoundParameters["AppRoles"] + $a = @() + $inpu = $TmpValue + foreach($v in $inpu) + { + $hash = @{} + if($TmpValue.AllowedMemberTypes) { $hash["AllowedMemberTypes"] = $v.AllowedMemberTypes } + if($TmpValue.Description) { $hash["Description"] = $v.Description } + if($TmpValue.DisplayName) { $hash["DisplayName"] = $v.DisplayName } + if($TmpValue.Id) { $hash["Id"] = $v.Id } + if($TmpValue.IsEnabled) { $hash["IsEnabled"] = $v.IsEnabled } + if($TmpValue.Value) { $hash["Value"] = $v.Value } + + $a += $hash + } + + $Value = $a + $params["AppRoles"] = $Value + } + if($null -ne $PSBoundParameters["PasswordCredentials"]) + { + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $inpu = $TmpValue + foreach($v in $inpu) + { + $hash = @{} + if($TmpValue.CustomKeyIdentifier) { $hash["CustomKeyIdentifier"] = $v.CustomKeyIdentifier } + if($TmpValue.EndDateTime) { $hash["EndDateTime"] = $v.EndDateTime } + if($TmpValue.Hint) { $hash["Hint"] = $v.Hint } + if($TmpValue.StartDateTime) { $hash["StartDateTime"] = $v.StartDateTime } + if($TmpValue.SecretText) { $hash["SecretText"] = $v.SecretText } + if($TmpValue.KeyId) { $hash["KeyId"] = $v.KeyId } + + $a += $hash + } + + $Value = $a + $params["PasswordCredentials"] = $Value + } + if($null -ne $PSBoundParameters["SignInAudience"]) + { + $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] + } + if($null -ne $PSBoundParameters["InformationalUrl"]) + { + $TmpValue = $PSBoundParameters["InformationalUrl"] + $Temp = $TmpValue | ConvertTo-Json + $Value = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $Value[$_.Name] = $_.Value } + $params["Info"] = $Value + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaApplication @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 new file mode 100644 index 0000000000..c26144b8e9 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaApplicationLogo { + [CmdletBinding(DefaultParameterSetName = 'File')] + param ( + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "Stream")] + [Parameter(ParameterSetName = "File")] + [Parameter(ParameterSetName = "ByteArray")] + [System.String] $ApplicationId, + [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Byte[]] $ImageByteArray, + [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.IO.Stream] $FileStream + ) + PROCESS { + try{ + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = 'https://graph.microsoft.com/beta/applications' + $Method = "PUT" + + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $URI = "$baseUri/$($params.ApplicationId)/logo" + } + if($null -ne $PSBoundParameters["FilePath"]){ + $params["FilePath"] = $PSBoundParameters["FilePath"] + $isUrl = [System.Uri]::IsWellFormedUriString($($params.FilePath), [System.UriKind]::Absolute) + $isLocalFile = [System.IO.File]::Exists($($params.FilePath)) + + if($isUrl){ + $logoBytes = (Invoke-WebRequest $($params.FilePath)).Content + } + elseif($isLocalFile){ + $logoBytes = [System.IO.File]::ReadAllBytes($($params.FilePath)) + } + else{ + Write-Error -Message "FilePath is invalid" -ErrorAction Stop + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method -ContentType "image/*" -Body $logoBytes + } + catch [System.Net.WebException]{ + Write-Error -Message "FilePath is invalid. Invalid or malformed url" -ErrorAction Stop + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 new file mode 100644 index 0000000000..60ea488a7f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 @@ -0,0 +1,140 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaApplicationProxyApplication { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $ApplicationId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExternalUrl, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $InternalUrl, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [String] $ExternalAuthenticationType, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsTranslateHostHeaderEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsHttpOnlyCookieEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsSecureCookieEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsPersistentCookieEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Boolean]] $IsTranslateLinksInBodyEnabled, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationServerTimeout, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConnectorGroupId + + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $onPremisesPublishing = @{} + if($null -ne $PSBoundParameters["ApplicationId"]) + { + $ApplicationId = $PSBoundParameters["ApplicationId"] + } + if($null -ne $PSBoundParameters["ExternalUrl"]) + { + $onPremisesPublishing["externalUrl"] = $PSBoundParameters["ExternalUrl"] + } + if($null -ne $PSBoundParameters["InternalUrl"]) + { + $onPremisesPublishing["internalUrl"] = $PSBoundParameters["InternalUrl"] + } + if($null -ne $PSBoundParameters["ExternalAuthenticationType"]) + { + $onPremisesPublishing["externalAuthenticationType"] = $PSBoundParameters["ExternalAuthenticationType"] + $onPremisesPublishing["externalAuthenticationType"] = $onPremisesPublishing.externalAuthenticationType.Substring(0, 1).ToLower() + $onPremisesPublishing.externalAuthenticationType.Substring(1) + } + if($null -ne $PSBoundParameters["IsTranslateHostHeaderEnabled"]) + { + $onPremisesPublishing["isTranslateHostHeaderEnabled"] = $PSBoundParameters["IsTranslateHostHeaderEnabled"] + } + if($null -ne $PSBoundParameters["IsHttpOnlyCookieEnabled"]) + { + $onPremisesPublishing["isHttpOnlyCookieEnabled"] = $PSBoundParameters["IsHttpOnlyCookieEnabled"] + } + if($null -ne $PSBoundParameters["IsSecureCookieEnabled"]) + { + $onPremisesPublishing["isSecureCookieEnabled"] = $PSBoundParameters["IsSecureCookieEnabled"] + } + if($null -ne $PSBoundParameters["IsPersistentCookieEnabled"]) + { + $onPremisesPublishing["isPersistentCookieEnabled"] = $PSBoundParameters["IsPersistentCookieEnabled"] + } + if($null -ne $PSBoundParameters["IsTranslateLinksInBodyEnabled"]) + { + $onPremisesPublishing["isTranslateLinksInBodyEnabled"] = $PSBoundParameters["IsTranslateLinksInBodyEnabled"] + } + if($null -ne $PSBoundParameters["ApplicationServerTimeout"]) + { + $onPremisesPublishing["applicationServerTimeout"] = $PSBoundParameters["ApplicationServerTimeout"] + } + + # Update InternalUrl and ExternalUrl + if ($ExternalUrl.EndsWith("/")) { + $exUrl = $ExternalUrl.TrimEnd("/") + } + else { + $exUrl = $ExternalUrl + } + $updateUrlBody = @{ + identifierUris = @($exUrl) + web = @{ + redirectUris = @($ExternalUrl) + homePageUrl = $InternalUrl + logoutUrl = $ExternalUrl+"?appproxy=logout" + } + } + try { + Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$ObjectId" -Method PATCH -Body $updateUrlBody + } catch { + Write-Error $_ + return + } + + # update onpremises + $onPremisesPublishingBody = @{onPremisesPublishing = $onPremisesPublishing} + try { + Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$ObjectId" -Method PATCH -Body $onPremisesPublishingBody + } catch { + Write-Error $_ + return + } + + #update connector group + if($null -ne $PSBoundParameters["ConnectorGroupId"]){ + $ConnectorGroupId = $PSBoundParameters["ConnectorGroupId"] + $ConnectorGroupBody = @{ + "@odata.id" = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationproxy/connectorGroups/$ConnectorGroupId" + } + $ConnectorGroupBody = $ConnectorGroupBody | ConvertTo-Json + $ConnectorGroupUri = "https://graph.microsoft.com/beta/applications/$ObjectId/connectorGroup/" + '$ref' + try { + Invoke-GraphRequest -Method PUT -Uri $ConnectorGroupUri -Body $ConnectorGroupBody -ContentType "application/json" + } catch { + Write-Error $_ + return + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Uri "https://graph.microsoft.com/beta/applications/$ObjectId/onPremisesPublishing" -Method GET -Headers $customHeaders) | ConvertTo-Json -depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name ObjectId -Value $ObjectId + } + } + $response | Select-Object ObjectId,ExternalAuthenticationType,ApplicationServerTimeout,ExternalUrl,InternalUrl,IsTranslateHostHeaderEnabled,IsTranslateLinksInBodyEnabled,IsOnPremPublishingEnabled,VerifiedCustomDomainCertificatesMetadata,VerifiedCustomDomainKeyCredential,VerifiedCustomDomainPasswordCredential,SingleSignOnSettings,IsHttpOnlyCookieEnabled,IsSecureCookieEnabled,IsPersistentCookieEnabled + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 new file mode 100644 index 0000000000..4c0b6e7840 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaApplicationProxyApplicationConnectorGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $OnPremisesPublishingProfileId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConnectorGroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "PUT" + $body = @{} + if($null -ne $PSBoundParameters["OnPremisesPublishingProfileId"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/applications/$OnPremisesPublishingProfileId/connectorGroup/" + '$ref' + } + if($null -ne $PSBoundParameters["ConnectorGroupId"]) + { + $body = @{ + "@odata.id" = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationproxy/connectorGroups/$ConnectorGroupId" + } + $body = $body | ConvertTo-Json + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-MgGraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri -Body $body -ContentType "application/json" + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 new file mode 100644 index 0000000000..4fc3d74d0d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaApplicationProxyApplicationSingleSignOn { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SingleSignOnMode, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $KerberosDelegatedLoginIdentity, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [String] $KerberosInternalApplicationServicePrincipalName + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "PATCH" + $body = @{} + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/applications/$ObjectId" + } + if($null -ne $PSBoundParameters["SingleSignOnMode"]) + { + $SingleSignOnMode = $PSBoundParameters["SingleSignOnMode"] + $SingleSignOnMode = $SingleSignOnMode.Substring(0, 1).ToLower() + $SingleSignOnMode.Substring(1) + } + if($null -ne $PSBoundParameters["KerberosDelegatedLoginIdentity"]) + { + $KerberosDelegatedLoginIdentity = $PSBoundParameters["KerberosDelegatedLoginIdentity"] + $KerberosDelegatedLoginIdentity = $KerberosDelegatedLoginIdentity.Substring(0, 1).ToLower() + $KerberosDelegatedLoginIdentity.Substring(1) + } + if($null -ne $PSBoundParameters["KerberosInternalApplicationServicePrincipalName"]) + { + $KerberosInternalApplicationServicePrincipalName = $PSBoundParameters["KerberosInternalApplicationServicePrincipalName"] + $KerberosInternalApplicationServicePrincipalName = $KerberosInternalApplicationServicePrincipalName.Substring(0, 1).ToLower() + $KerberosInternalApplicationServicePrincipalName.Substring(1) + } + $body = @{ + onPremisesPublishing = @{ + singleSignOnSettings = @{ + singleSignOnMode = $SingleSignOnMode + } + } + } + + if (-not [string]::IsNullOrWhiteSpace($KerberosInternalApplicationServicePrincipalName) -or -not [string]::IsNullOrWhiteSpace($KerberosDelegatedLoginIdentity) -and ($SingleSignOnMode -ne 'none' -and $SingleSignOnMode -ne 'headerbased')) + { + if ($KerberosInternalApplicationServicePrincipalName -eq '') { + Write-Error "Set-EntraBetaApplicationProxyApplicationSingleSignOn : KerberosInternalApplicationServicePrincipalName is a required field for kerberos mode." + break + } + elseif ($KerberosDelegatedLoginIdentity -eq '') { + Write-Error "Set-EntraBetaApplicationProxyApplicationSingleSignOn : KerberosDelegatedLoginIdentity is a required field for kerberos mode." + break + } + $body.onPremisesPublishing.singleSignOnSettings.kerberosSignOnSettings = @{ + kerberosServicePrincipalName = $KerberosInternalApplicationServicePrincipalName + kerberosSignOnMappingAttributeType = $KerberosDelegatedLoginIdentity + } + } + + $body = $body | ConvertTo-Json -Depth 10 + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri -Body $body -ContentType "application/json" + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 new file mode 100644 index 0000000000..c22d14120c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaApplicationProxyConnector { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("Id")] + [System.String] $OnPremisesPublishingProfileId, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConnectorGroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "POST" + $body = @{} + if($null -ne $PSBoundParameters["OnPremisesPublishingProfileId"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectors/$OnPremisesPublishingProfileId/memberOf/" + '$ref' + } + if($null -ne $PSBoundParameters["ConnectorGroupId"]) + { + $body = @{ + "@odata.id" = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$ConnectorGroupId" + } + $body = $body | ConvertTo-Json + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-MgGraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri -Body $body -ContentType "application/json" + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 new file mode 100644 index 0000000000..f5fcb4339b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 @@ -0,0 +1,37 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaApplicationProxyConnectorGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Method"] = "PATCH" + $body = @{} + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationProxy/connectorGroups/$Id" + } + if($null -ne $PSBoundParameters["Name"]) + { + $body["Name"] = $PSBoundParameters["Name"] + } + + $body = $body | ConvertTo-Json + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri -Body $body + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 new file mode 100644 index 0000000000..697f5344a7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaApplicationVerifiedPublisher { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppObjectId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.SetVerifiedPublisherRequest] $SetVerifiedPublisherRequest + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["AppObjectId"]) + { + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) + { + $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Set-MgBetaApplicationVerifiedPublisher @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 new file mode 100644 index 0000000000..b7991ab66e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaPasswordSingleSignOnCredential { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["PasswordSSOCredential"]) + { + $TmpValue = $PSBoundParameters["PasswordSSOCredential"] + $Value = $TmpValue | ConvertTo-Json + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaServicePrincipalPasswordSingleSignOnCredential @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 new file mode 100644 index 0000000000..73cc77c244 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 @@ -0,0 +1,169 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaServicePrincipal { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $AlternativeNames, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PublisherName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ReplyUrls, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $LogoutUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ErrorUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $SamlMetadataUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AccountEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ServicePrincipalType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Tags, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $ServicePrincipalId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Homepage, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AppId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PreferredSingleSignOnMode + ) + + PROCESS { + $params = @{} + $params["Uri"] = "https://graph.microsoft.com/beta/servicePrincipals" + $params["Method"] = "PATCH" + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $body["accountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if($null -ne $PSBoundParameters["AlternativeNames"]) + { + $body["alternativeNames"] = $PSBoundParameters["AlternativeNames"] + } + if($null -ne $PSBoundParameters["PreferredSingleSignOnMode"]) + { + $body["preferredSingleSignOnMode"] = $PSBoundParameters["PreferredSingleSignOnMode"] + } + if($null -ne $PSBoundParameters["Tags"]) + { + $body["tags"] = $PSBoundParameters["Tags"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $body["displayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["AppId"]) + { + $body["appId"] = $PSBoundParameters["AppId"] + } + if($null -ne $PSBoundParameters["ErrorUrl"]) + { + $body["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + } + if($null -ne $PSBoundParameters["KeyCredentials"]) + { + $a = @() + $inpu = $PSBoundParameters["KeyCredentials"] + foreach($value in $inpu) + { + $hash = @{ + customKeyIdentifier= $value.CustomKeyIdentifier + endDateTime = $value.EndDate + key= $value.Value + startDateTime= $value.StartDate + type= $value.Type + usage= $value.Usage + } + $a += $hash + } + $body["keyCredentials"] = $a + } + if($null -ne $PSBoundParameters["ReplyUrls"]) + { + $body["replyUrls"] = $PSBoundParameters["ReplyUrls"] + } + if($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["Uri"] += "/$ServicePrincipalId" + } + if($null -ne $PSBoundParameters["LogoutUrl"]) + { + $body["logoutUrl"] = $PSBoundParameters["LogoutUrl"] + } + if($null -ne $PSBoundParameters["SamlMetadataUrl"]) + { + $body["samlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] + } + if($null -ne $PSBoundParameters["Homepage"]) + { + $body["homePage"] = $PSBoundParameters["Homepage"] + } + if($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) + { + $body["appRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] + } + if($null -ne $PSBoundParameters["PasswordCredentials"]) + { + $a = @() + $inpu = $PSBoundParameters["PasswordCredentials"] + foreach($value in $inpu) + { + $hash = @{ + customKeyIdentifier= $value.CustomKeyIdentifier + endDateTime = $value.EndDate + secretText= $value.Value + startDateTime= $value.StartDate + } + $a += $hash + } + + $body["passwordCredentials"] = $a + } + if($null -ne $PSBoundParameters["ServicePrincipalType"]) + { + $body["servicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] + } + if($null -ne $PSBoundParameters["PublisherName"]) + { + $body["publisherName"] = $PSBoundParameters["PublisherName"] + } + if($null -ne $PSBoundParameters["ServicePrincipalNames"]) + { + $body["servicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] + } + if($null -ne $PSBoundParameters["PreferredTokenSigningKeyThumbprint"]) + { + $body["preferredTokenSigningKeyThumbprint"] = $PSBoundParameters["PreferredTokenSigningKeyThumbprint"] + } + if($null -ne $PSBoundParameters["CustomSecurityAttributes"]) + { + $body["customSecurityAttributes"] = $PSBoundParameters["CustomSecurityAttributes"] + } + $params["Body"] = $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + $response = Invoke-GraphRequest @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 new file mode 100644 index 0000000000..b1ba0a25d9 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 @@ -0,0 +1,173 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Connect-Entra { + [CmdletBinding(DefaultParameterSetName = 'UserParameterSet')] + param ( + [Parameter(ParameterSetName = "UserParameterSet",Position = 1)] + [System.String[]] $Scopes, + [Parameter(ParameterSetName = "AppCertificateParameterSet",Position = 1)] + [Parameter(ParameterSetName = "UserParameterSet")] + [Parameter(ParameterSetName = "IdentityParameterSet")] + [Alias("AppId", "ApplicationId")][System.String] $ClientId, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Parameter(ParameterSetName = "UserParameterSet",Position = 4)] + [Alias("Audience", "Tenant")][System.String] $TenantId, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Parameter(ParameterSetName = "UserParameterSet")] + [Parameter(ParameterSetName = "IdentityParameterSet")] + [Parameter(ParameterSetName = "EnvironmentVariableParameterSet")] + $ContextScope, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Parameter(ParameterSetName = "AccessTokenParameterSet")] + [Parameter(ParameterSetName = "UserParameterSet")] + [Parameter(ParameterSetName = "IdentityParameterSet")] + [Parameter(ParameterSetName = "EnvironmentVariableParameterSet")] + [ValidateNotNullOrEmpty()] + [Alias("EnvironmentName", "NationalCloud")][System.String] $Environment, + [Parameter(ParameterSetName = "EnvironmentVariableParameterSet")] + [Switch] $EnvironmentVariable, + [Parameter(ParameterSetName = "UserParameterSet")] + [Alias("UseDeviceAuthentication", "DeviceCode", "DeviceAuth", "Device")][System.Management.Automation.SwitchParameter] $UseDeviceCode, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Parameter(ParameterSetName = "AccessTokenParameterSet")] + [Parameter(ParameterSetName = "UserParameterSet")] + [Parameter(ParameterSetName = "IdentityParameterSet")] + [Parameter(ParameterSetName = "EnvironmentVariableParameterSet")] + [ValidateNotNullOrEmpty()] + [Double] $ClientTimeout, + [Parameter()] + [Switch] $NoWelcome, + [Parameter(ParameterSetName = "IdentityParameterSet",Position = 1)] + [Alias("ManagedIdentity", "ManagedServiceIdentity", "MSI")][System.Management.Automation.SwitchParameter] $Identity, + [Parameter(ParameterSetName = "AppCertificateParameterSet",Position = 2)] + [Alias("CertificateSubject", "CertificateName")][System.String] $CertificateSubjectName, + [Parameter(ParameterSetName = "AppCertificateParameterSet",Position = 3)] + [System.String] $CertificateThumbprint, + [Parameter(ParameterSetName = "AppCertificateParameterSet")] + [System.Security.Cryptography.X509Certificates.X509Certificate2] $Certificate, + [Parameter(ParameterSetName = "AppSecretCredentialParameterSet")] + [Alias("SecretCredential", "Credential")][System.Management.Automation.PSCredential] $ClientSecretCredential, + [Parameter(ParameterSetName = "AccessTokenParameterSet",Position = 1)] + [System.Security.SecureString] $AccessToken + ) + + PROCESS { + $params = @{} + + if ($null -ne $PSBoundParameters["Scopes"]) { + $params["Scopes"] = $PSBoundParameters["Scopes"] + } + + if ($null -ne $PSBoundParameters["ClientId"]) { + $params["ClientId"] = $PSBoundParameters["ClientId"] + } + + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["TenantId"] = $PSBoundParameters["TenantId"] + } + + if ($null -ne $PSBoundParameters["ContextScope"]) { + $params["ContextScope"] = $PSBoundParameters["ContextScope"] + } + + if ($null -ne $PSBoundParameters["Environment"]) { + $params["Environment"] = $PSBoundParameters["Environment"] + } + + if ($PSBoundParameters.ContainsKey("EnvironmentVariable")) { + $params["EnvironmentVariable"] = $PSBoundParameters["EnvironmentVariable"] + } + + if ($null -ne $PSBoundParameters["UseDeviceCode"]) { + $params["UseDeviceCode"] = $PSBoundParameters["UseDeviceCode"] + } + + if ($null -ne $PSBoundParameters["ClientTimeout"]) { + $params["ClientTimeout"] = $PSBoundParameters["ClientTimeout"] + } + + if ($PSBoundParameters.ContainsKey("NoWelcome")) { + $params["NoWelcome"] = $PSBoundParameters["NoWelcome"] + } + + if ($PSBoundParameters.ContainsKey("Identity")) { + $params["Identity"] = $PSBoundParameters["Identity"] + } + + if ($null -ne $PSBoundParameters["CertificateSubjectName"]) { + $params["CertificateSubjectName"] = $PSBoundParameters["CertificateSubjectName"] + } + + if ($null -ne $PSBoundParameters["CertificateThumbprint"]) { + $params["CertificateThumbprint"] = $PSBoundParameters["CertificateThumbprint"] + } + + if ($null -ne $PSBoundParameters["Certificate"]) { + $params["Certificate"] = $PSBoundParameters["Certificate"] + } + + if ($null -ne $PSBoundParameters["ClientSecretCredential"]) { + $params["ClientSecretCredential"] = $PSBoundParameters["ClientSecretCredential"] + } + + if ($null -ne $PSBoundParameters["AccessToken"]) { + $params["AccessToken"] = $PSBoundParameters["AccessToken"] + } + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + Connect-MgGraph @params + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 new file mode 100644 index 0000000000..9a8a691a44 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 @@ -0,0 +1,10 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Disconnect-Entra { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param () + Disconnect-MgGraph +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 new file mode 100644 index 0000000000..22c810597d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraContext { + [CmdletBinding(DefaultParameterSetName = '')] + param () + + PROCESS { + $params = @{} + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["Confirm"]) + { + $params["Confirm"] = $PSBoundParameters["Confirm"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["WhatIf"]) + { + $params["WhatIf"] = $PSBoundParameters["WhatIf"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgContext @params + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 new file mode 100644 index 0000000000..9a2d069329 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 @@ -0,0 +1,58 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Reset-EntraBetaStrongAuthenticationMethodByUpn { + [CmdletBinding(DefaultParameterSetName = 'SetAccidentalDeletionThreshold')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserPrincipalName, + [Parameter(ParameterSetName = "SetAccidentalDeletionThreshold", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["UserPrincipalName"]) { + $userId = $PSBoundParameters.UserPrincipalName + } + function DeleteAuthMethod($uid, $method){ + switch ($method.AdditionalProperties['@odata.type']) { + '#microsoft.graph.emailAuthenticationMethod' { + Remove-MgBetaUserAuthenticationEmailMethod -UserId $uid -EmailAuthenticationMethodId $method.Id + } + '#microsoft.graph.phoneAuthenticationMethod' { + Remove-MgBetaUserAuthenticationPhoneMethod -UserId $uid -PhoneAuthenticationMethodId $method.Id + } + Default { + + } + } + return $? # Return true if no error and false if there is an error + } + + $methods = Get-MgBetaUserAuthenticationMethod -UserId $userId -Headers $customHeaders + # -1 to account for passwordAuthenticationMethod + + foreach ($authMethod in $methods) { + $deleted = DeleteAuthMethod -uid $userId -method $authMethod + if(!$deleted){ + # We need to use the error to identify and delete the default method. + $defaultMethod = $authMethod + } + } + + # Graph API does not support reading default method of a user. + # Plus default method can only be deleted when it is the only (last) auth method for a user. + # We need to use the error to identify and delete the default method. + try { + if($null -ne $defaultMethod){ + $result = DeleteAuthMethod -uid $userId -method $defaultMethod + } + } + catch {} + + if($null -ne $methods){ + $methods = Get-MgBetaUserAuthenticationMethod -UserId $userId + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 new file mode 100644 index 0000000000..8e1d0ed755 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Revoke-EntraBetaSignedInUserAllRefreshToken { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri 'https://graph.microsoft.com/beta/me/revokeSignInSessions' -Method POST).value + if($response){ + $responseType = New-Object Microsoft.Graph.Beta.PowerShell.Models.ComponentsMwc6EoResponsesRevokesigninsessionsresponseContentApplicationJsonSchema + $responseType.Value= $response + $responseType + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 new file mode 100644 index 0000000000..c92d12398f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Revoke-EntraBetaUserAllRefreshToken { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Revoke-MgBetaUserSignInSession @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 new file mode 100644 index 0000000000..bcee774d4a --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaAdministrativeUnitMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = New-MgBetaAdministrativeUnitMemberByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 new file mode 100644 index 0000000000..435493fbd9 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsActive, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomSecurityAttributeDefinitionId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["IsActive"]) + { + $params["IsActive"] = $PSBoundParameters["IsActive"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 new file mode 100644 index 0000000000..f43bb31968 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaDeviceRegisteredOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDeviceRegisteredOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 new file mode 100644 index 0000000000..92c6af02f2 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaDeviceRegisteredUser { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDeviceRegisteredUserByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 new file mode 100644 index 0000000000..18d61eb65d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaDirectoryRoleMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + { + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDirectoryRoleMemberByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 new file mode 100644 index 0000000000..befe5f3153 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 @@ -0,0 +1,110 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaScopedRoleMembership { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $RoleObjectId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AdministrativeUnitObjectId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.AzureAD.Model.RoleMemberInfo] $RoleMemberInfo, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["RoleObjectId"]) + { + $params["RoleId"] = $PSBoundParameters["RoleObjectId"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["RoleMemberInfo"]) + { + $TmpValue = $PSBoundParameters["RoleMemberInfo"] + $Value = @{ + id = ($TmpValue).ObjectId + } | ConvertTo-Json + $params["RoleMemberInfo"] = $Value + } + if($null -ne $PSBoundParameters["AdministrativeUnitObjectId"]) + { + $params["AdministrativeUnitId1"] = $PSBoundParameters["AdministrativeUnitObjectId"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDirectoryAdministrativeUnitScopedRoleMember @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name AdministrativeUnitObjectId -Value AdministrativeUnitId + Add-Member -InputObject $_ -MemberType AliasProperty -Name RoleObjectId -Value RoleId + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('RoleMemberInfo') + try{ + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + }catch{} + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 new file mode 100644 index 0000000000..bfff21d933 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 @@ -0,0 +1,33 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Confirm-EntraBetaDomain { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)][System.String] $DomainName, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)][System.Boolean] $ForceTakeover + ) + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/beta/domains/$DomainName/verify" + $params["Method"] = "POST" + + if($null -ne $PSBoundParameters["ForceTakeover"]) + { + $body["ForceTakeover"] = $PSBoundParameters["ForceTakeover"] + } + + $params["Body"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + $response = Invoke-GraphRequest @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 new file mode 100644 index 0000000000..fedbcdb2a8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraBetaDirectoryRole { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $RoleTemplateId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["RoleTemplateId"]) + { + $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDirectoryRole @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 new file mode 100644 index 0000000000..3a04d7b07d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaAccountSku { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgBetaSubscribedSku @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType NoteProperty -Name ActiveUnits -Value $_.PrepaidUnits.Enabled + Add-Member -InputObject $_ -MemberType NoteProperty -Name LockedOutUnits -Value $_.PrepaidUnits.LockedOut + Add-Member -InputObject $_ -MemberType NoteProperty -Name SuspendedUnits -Value $_.PrepaidUnits.Suspended + Add-Member -InputObject $_ -MemberType NoteProperty -Name WarningUnits -Value $_.PrepaidUnits.Warning + Add-Member -InputObject $_ -MemberType NoteProperty -Name AccountObjectId -Value $_.AccountId + Add-Member -InputObject $_ -MemberType NoteProperty -Name TargetClass -Value $_.AppliesTo + } + } + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 new file mode 100644 index 0000000000..f84eac1292 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 @@ -0,0 +1,119 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaAdministrativeUnit { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{ObjectId = "Id"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaAdministrativeUnit @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 new file mode 100644 index 0000000000..277db8f9cf --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaAdministrativeUnitMember { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaAdministrativeUnitMember @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 new file mode 100644 index 0000000000..b25551944b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaAttributeSet { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AttributeSetId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["AttributeSetId"]) + { + $params["AttributeSetId"] = $PSBoundParameters["AttributeSetId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryAttributeSet @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 new file mode 100644 index 0000000000..5a367b640f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 @@ -0,0 +1,121 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaContact { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{OrgContactId = "Id"} + if($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaContact @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value Phones + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value ServiceProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value Phones + $propsToConvert = @('Addresses','Manager','Phones') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 new file mode 100644 index 0000000000..38e11067c3 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaContactDirectReport { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaContactDirectReport @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 new file mode 100644 index 0000000000..54906e95a5 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaContactManager { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaContactManager @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 new file mode 100644 index 0000000000..b2d9b0e8f8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaContactMembership { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaContactMemberOf @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 new file mode 100644 index 0000000000..e914b7e814 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 @@ -0,0 +1,119 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaContract { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ContractId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ContractId"]) + { + $params["ContractId"] = $PSBoundParameters["ContractId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaContract @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 new file mode 100644 index 0000000000..6595dcf58d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaCustomSecurityAttributeDefinition { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryCustomSecurityAttributeDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 new file mode 100644 index 0000000000..ed8fa8897f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomSecurityAttributeDefinitionId, + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{} + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["AllowedValueId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 new file mode 100644 index 0000000000..bd547328eb --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryObjectId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DirectoryObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryDeletedItem @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 new file mode 100644 index 0000000000..6342f9684f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 @@ -0,0 +1,138 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDevice { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDevice @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceTrustType -Value TrustType + Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceObjectVersion -Value DeviceVersion + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem + Add-Member -InputObject $_ -MemberType AliasProperty -Name DevicePhysicalIds -Value PhysicalIds + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ComplianceExpiryTime -Value ComplianceExpirationDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSVersion -Value OperatingSystemVersion + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 new file mode 100644 index 0000000000..a19b699331 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDeviceRegisteredOwner { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDeviceRegisteredOwner @params -Headers $customHeaders + $properties = @{ + ObjectId = "Id" + DeletionTimestamp = "deletedDateTime" + DirSyncEnabled = "onPremisesSyncEnabled" + ImmutableId = "onPremisesImmutableId" + LastDirSyncTime = "OnPremisesLastSyncDateTime" + Mobile = "mobilePhone" + ProvisioningErrors = "onPremisesProvisioningErrors" + TelephoneNumber = "businessPhones" + } + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + foreach ($prop in $properties.GetEnumerator()) { + $propertyName = $prop.Name + $propertyValue = $prop.Value + if ($_.PSObject.Properties.Match($propertyName)) { + $_ | Add-Member -MemberType AliasProperty -Name $propertyName -Value $propertyValue + } + } + $propsToConvert = @('AssignedPlans','assignedLicenses','deviceKeys','identities','provisionedPlans') + foreach ($prop in $propsToConvert) { + try { + if($_.PSObject.Properties.Match($prop)) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 new file mode 100644 index 0000000000..44cf83c04e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 @@ -0,0 +1,127 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDeviceRegisteredUser { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDeviceRegisteredUser @params -Headers $customHeaders + $properties = @{ + ObjectId = "Id" + DeletionTimestamp = "deletedDateTime" + DirSyncEnabled = "onPremisesSyncEnabled" + ImmutableId = "onPremisesImmutableId" + LastDirSyncTime = "OnPremisesLastSyncDateTime" + Mobile = "mobilePhone" + ProvisioningErrors = "onPremisesProvisioningErrors" + TelephoneNumber = "businessPhones" + } + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + foreach ($prop in $properties.GetEnumerator()) { + $propertyName = $prop.Name + $propertyValue = $prop.Value + if ($_.PSObject.Properties.Match($propertyName)) { + $_ | Add-Member -MemberType AliasProperty -Name $propertyName -Value $propertyValue + } + } + $propsToConvert = @('AssignedPlans','assignedLicenses','deviceKeys','identities','provisionedPlans') + foreach ($prop in $propsToConvert) { + try { + if($_.PSObject.Properties.Match($prop)) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 new file mode 100644 index 0000000000..b5941a4a3e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirSyncConfiguration { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][ValidateNotNullOrEmpty()][ValidateScript({ if ($_ -is [System.Guid]) { $true } else { throw "TenantId must be of type [System.Guid]." } })][System.guid] $TenantId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["OnPremisesDirectorySynchronizationId"] = $PSBoundParameters["TenantId"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = ((Get-MgBetaDirectoryOnPremiseSynchronization @params -Headers $customHeaders).configuration | Select-Object -Property AccidentalDeletionPrevention).AccidentalDeletionPrevention + # Create a custom table + $customTable = [PSCustomObject]@{ + "AccidentalDeletionThreshold" = $response.AlertThreshold + "DeletionPreventionType" = $response.SynchronizationPreventionType + } + $customTable + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 new file mode 100644 index 0000000000..c56d6afba6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirSyncfeature { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String]$Feature + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["Feature"]) { + $Feature = $PSBoundParameters["Feature"] + } + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["OnPremisesDirectorySynchronizationId"] = $PSBoundParameters["TenantId"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $jsonData = Get-MgBetaDirectoryOnPremiseSynchronization @params -Headers $customHeaders | ConvertTo-Json + $object = ConvertFrom-Json $jsonData + $table =@() + foreach ($featureName in $object.Features.PSObject.Properties.Name) { + $row = New-Object PSObject -Property @{ + 'DirSyncFeature' = $featureName -replace "Enabled", "" + 'Enabled' = $object.Features.$featureName + } + $table += $row + } + if([string]::IsNullOrWhiteSpace($Feature)) { + $table | Format-Table -AutoSize + } + else { + $output = $table | Where-Object {$_.dirsyncFeature -eq $Feature} + if($null -eq $output) { + Write-Error "Get-EntraBetaDirSyncfeature : Invalid value for parameter. Parameter Name: Feature." + } + else { + $output + } + } + } + }# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 new file mode 100644 index 0000000000..f7b7aea15d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirectoryObjectOnPremisesProvisioningError { + [CmdletBinding(DefaultParameterSetName = 'GetById')] + param ( + [Parameter(ParameterSetName = "GetById")][ValidateNotNullOrEmpty()][ValidateScript({if ($_ -is [System.Guid]) { $true } else {throw "TenantId must be of type [System.Guid]."}})][System.Guid] $TenantId + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["TenantId"] = $PSBoundParameters["TenantId"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $Object = @("users", "groups", "contacts") + $response = @() + + try { + foreach ($obj in $object) { + $obj = ($obj | Out-String).trimend() + $uri = 'https://graph.microsoft.com/beta/' + $obj + '?$select=onPremisesProvisioningErrors' + $response += ((Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method GET).value).onPremisesProvisioningErrors + } + } + catch {} + + if ([string]::IsNullOrWhiteSpace($response)) { + write-host "False" + } + else { + $response + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 new file mode 100644 index 0000000000..c14e11ede5 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirectoryRole { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + { + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryRole @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 new file mode 100644 index 0000000000..055f8f9271 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirectoryRoleMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DirectoryRoleId"]) + { + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + try { + $response = Get-MgBetaDirectoryRoleMember @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value ServiceProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value businessPhones + $propsToConvert = @('assignedLicenses','assignedPlans','identities','provisionedPlans') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } + catch {} + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 new file mode 100644 index 0000000000..61a3593bdf --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirectoryRoleTemplate { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryRoleTemplate @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 new file mode 100644 index 0000000000..d15ec6dce6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirectorySetting { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["DirectorySettingId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectorySetting @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 new file mode 100644 index 0000000000..aafed0174c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 @@ -0,0 +1,95 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirectorySettingTemplate { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["DirectorySettingTemplateId"] = $PSBoundParameters["Id"] + } if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $apiResponse = Get-MgBetaDirectorySettingTemplate @params -Headers $customHeaders + $response = @() + $apiResponse | ForEach-Object { + if($null -ne $_) { + $item = New-Object -TypeName Microsoft.Open.MSGraph.Model.DirectorySettingTemplate + $item.Id = $_.Id + $item.DisplayName = $_.DisplayName + $item.Description = $_.Description + $item.Values = @() + $_.Values | ForEach-Object { + $value = New-Object -TypeName Microsoft.Open.MSGraph.Model.SettingTemplateValue + $value.Name = $_.Name + $value.DefaultValue = $_.DefaultValue + $item.Values.Add($value) + } + $response += $item + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 new file mode 100644 index 0000000000..97358e1917 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDomain { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value Id + $propsToConvert = @('State') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + + $response + } + +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 new file mode 100644 index 0000000000..f32c6492d6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDomainFederationSettings { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param( + [Parameter(Mandatory=$true,Position=0,ValueFromPipelineByPropertyName=$true)][string]$DomainName, + [Parameter(Mandatory=$false,Position=1,ValueFromPipelineByPropertyName=$true)][ValidateNotNullOrEmpty()][ValidateScript({ if ($_ -is [System.Guid]) { $true } else { throw "TenantId must be of type [System.Guid]." } })][System.guid] $TenantId + ) + process { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $Null + } + if ($PSBoundParameters.ContainsKey("TenantId")) { + $params["TenantId"] = $TenantId + } + if ($PSBoundParameters.ContainsKey("DomainName")) { + $params["DomainId"] = $DomainName + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgBetaDomainFederationConfiguration -Headers $customHeaders -DomainId $params["DomainId"] | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $customTable = [PSCustomObject]@{ + "ActiveLogOnUri" = $response.ActiveSignInUri + #"DefaultInteractiveAuthenticationMethod" = $response. + "FederationBrandName" = $response.DisplayName + "IssuerUri" = $response.IssuerUri + "LogOffUri" = $response.SignOutUri + "MetadataExchangeUri" = $response.MetadataExchangeUri + "NextSigningCertificate" = $response.NextSigningCertificate + #"OpenIdConnectDiscoveryEndpoint" = $response. + "PassiveLogOnUri" = $response.PassiveSignInUri + #"PasswordChangeUri" = $response. + #"PasswordResetUri" = $response. + "PreferredAuthenticationProtocol" = $response.PreferredAuthenticationProtocol + "PromptLoginBehavior" = $response.PromptLoginBehavior + "SigningCertificate" = $response.SigningCertificate + "SigningCertificateUpdateStatus" = $response.SigningCertificateUpdateStatus + #"SupportsMfa" = $response. + } + if($null -ne $response) + { + $customTable + } + } + } + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 new file mode 100644 index 0000000000..a39d9e2a8e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDomainNameReference { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDomainNameReference @params -Headers $customHeaders + $properties = @{ + ObjectId = "Id" + DeletionTimestamp = "deletedDateTime" + DirSyncEnabled = "onPremisesSyncEnabled" + ImmutableId = "onPremisesImmutableId" + Mobile = "mobilePhone" + ProvisioningErrors = "onPremisesProvisioningErrors" + TelephoneNumber = "businessPhones" + UserState = "externalUserState" + UserStateChangedOn = "externalUserStateChangeDate" + } + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + foreach ($prop in $properties.GetEnumerator()) { + $propertyName = $prop.Name + $propertyValue = $prop.Value + if ($_.PSObject.Properties.Match($propertyName)) { + $_ | Add-Member -MemberType AliasProperty -Name $propertyName -Value $propertyValue + } + } + $propsToConvert = @('provisionedPlans','assignedPlans','assignedLicenses','appRoles','keyCredentials','identities') + foreach ($prop in $propsToConvert) { + try { + if($_.PSObject.Properties.Match($prop)) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 new file mode 100644 index 0000000000..8bb2a23f99 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDomainServiceConfigurationRecord { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDomainServiceConfigurationRecord @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 new file mode 100644 index 0000000000..2541b23f3c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDomainVerificationDnsRecord { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDomainVerificationDnsRecord @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 new file mode 100644 index 0000000000..d0d8ec3313 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaFederationProperty { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)][System.String] $DomainName, + [Parameter(ParameterSetName = "GetQuery", Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $false)][Switch] $SupportMultipleDomain + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["DomainName"]) { + $params["DomainId"] = $PSBoundParameters["DomainName"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgBetaDomainFederationConfiguration @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ActiveClientSignInUrl -Value ActiveSignInUri + Add-Member -InputObject $_ -MemberType AliasProperty -Name FederationServiceDisplayName -Value DisplayName + Add-Member -InputObject $_ -MemberType AliasProperty -Name FederationServiceIdentifier -Value IssuerUri + Add-Member -InputObject $_ -MemberType AliasProperty -Name FederationMetadataUrl -Value MetadataExchangeUri + Add-Member -InputObject $_ -MemberType AliasProperty -Name PassiveClientSignInUrl -Value PassiveSignInUri + Add-Member -InputObject $_ -MemberType AliasProperty -Name PassiveClientSignOutUrl -Value SignOutUri + } + } + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 new file mode 100644 index 0000000000..cb1375bd46 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 @@ -0,0 +1,39 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPartnerInformation { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["TenantID"] = $PSBoundParameters["TenantId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $TenantID = ((invoke-mggraphrequest -Method GET -Uri "https://graph.microsoft.com/beta/organization").value).id + } + $response = invoke-mggraphrequest -Headers $customHeaders -Method GET -Uri "https://graph.microsoft.com/beta/organization/$TenantID/partnerInformation" + # Create a custom table + $customTable = [PSCustomObject]@{ + "PartnerCompanyName" = $response.companyName + "companyType" = $response.companyType + "PartnerSupportTelephones" = $response.supportTelephones + "PartnerSupportEmails" = $response.supportEmails + "PartnerHelpUrl" = $response.helpUrl + "PartnerCommerceUrl" = $response.commerceUrl + "PartnerSupportUrl" = $response.supportUrl + "ObjectID" = $response.partnerTenantId + } + $customTable + } + }# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 new file mode 100644 index 0000000000..6ca7a23bf3 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPasswordPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $DomainName + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["DomainName"]) { + $params["DomainId"] = $PSBoundParameters["DomainName"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgBetaDomain @params -Headers $customHeaders + # Create a custom table + $customTable = [PSCustomObject]@{ + "NotificationDays" = $response.PasswordNotificationWindowInDays + "ValidityPeriod" = $response.PasswordValidityPeriodInDays + } + $customTable + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 new file mode 100644 index 0000000000..8ecff0253f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaScopedRoleMembership { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ScopedRoleMembershipId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) + { + $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + + $propsToConvert = @('RoleMemberInfo') + + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 new file mode 100644 index 0000000000..10bc6870c3 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaSubscribedSku { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SubscribedSkuId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["SubscribedSkuId"]) + { + $params["SubscribedSkuId"] = $PSBoundParameters["SubscribedSkuId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Get-MgBetaSubscribedSku @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('PrepaidUnits') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 new file mode 100644 index 0000000000..1db1bc9858 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaTenantDetail { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaOrganization @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name CompanyLastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + $propsToConvert = @('AssignedPlans','ProvisionedPlans','VerifiedDomains','PrivacyProfile') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 new file mode 100644 index 0000000000..e8f06f9bc7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 @@ -0,0 +1,119 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaAdministrativeUnit { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRule, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRuleProcessingState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["MembershipRule"]) + { + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["MembershipType"]) + { + $params["MembershipType"] = $PSBoundParameters["MembershipType"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + { + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) + { + $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaAdministrativeUnit @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 new file mode 100644 index 0000000000..703659bbe3 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 @@ -0,0 +1,143 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaAdministrativeUnitMember { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $MailEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $GroupTypes, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRule, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $SecurityEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ProxyAddresses, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Visibility, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRuleProcessingState, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $MailNickname, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $OdataType, + [Alias("Id")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AssignedLabel]] $AssignedLabels + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["OdataType"]) + { + $params["@odata.type"] = $PSBoundParameters["OdataType"] + } + if($null -ne $PSBoundParameters["AssignedLabels"]) + { + $params["AssignedLabels"] = $PSBoundParameters["AssignedLabels"] + } + if($null -ne $PSBoundParameters["Description"]) + { + $params["description"] = $PSBoundParameters["Description"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["displayName"] = $PSBoundParameters["DisplayName"] + } + if( ($PSBoundParameters["IsAssignableToRole"]) -or (-not $PSBoundParameters["IsAssignableToRole"])) + { + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + } + if( ($PSBoundParameters["MailEnabled"]) -or (-not $PSBoundParameters["MailEnabled"])) + { + $params["mailEnabled"] = $PSBoundParameters["MailEnabled"] + } + if( $PSBoundParameters["mailNickname"]) + { + $params["mailNickname"] = $PSBoundParameters["mailNickname"] + } + if( ($PSBoundParameters["SecurityEnabled"]) -or (-not $PSBoundParameters["SecurityEnabled"])) + { + $params["securityEnabled"] = $PSBoundParameters["SecurityEnabled"] + } + if($null -ne $PSBoundParameters["GroupTypes"]) + { + $params["groupTypes"] = $PSBoundParameters["GroupTypes"] + } + if($null -ne $PSBoundParameters["membershipRule"]) + { + $params["membershipRule"] = $PSBoundParameters["membershipRule"] + } + if($null -ne $PSBoundParameters["membershipRuleProcessingState"]) + { + $params["membershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + } + if($null -ne $PSBoundParameters["visibility"]) + { + $params["visibility"] = $PSBoundParameters["Visibility"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = New-MGBetaAdministrativeUnitMember -Headers $customHeaders -AdministrativeUnitId $AdministrativeUnitId -BodyParameter $params + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 new file mode 100644 index 0000000000..5eb67275db --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 @@ -0,0 +1,48 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaAttributeSet { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AttributeSetId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $MaxAttributesPerSet, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["AttributeSetId"]) + { + $params["Id"] = $PSBoundParameters["AttributeSetId"] + } + if ($null -ne $PSBoundParameters["MaxAttributesPerSet"]) + { + $params["MaxAttributesPerSet"] = $PSBoundParameters["MaxAttributesPerSet"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDirectoryAttributeSet @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 new file mode 100644 index 0000000000..6b620bde29 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -0,0 +1,133 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaCustomSecurityAttributeDefinition { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Type, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AttributeSet, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsCollection, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Name, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsSearchable, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Status + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) + { + $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["Type"]) + { + $params["Type"] = $PSBoundParameters["Type"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AttributeSet"]) + { + $params["AttributeSet"] = $PSBoundParameters["AttributeSet"] + } + if ($null -ne $PSBoundParameters["IsCollection"]) + { + $params["IsCollection"] = $PSBoundParameters["IsCollection"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["Name"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["IsSearchable"]) + { + $params["IsSearchable"] = $PSBoundParameters["IsSearchable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["Status"]) + { + $params["Status"] = $PSBoundParameters["Status"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDirectoryCustomSecurityAttributeDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 new file mode 100644 index 0000000000..7ca274631b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 @@ -0,0 +1,182 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaDevice { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompliant, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ProfileType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DeviceOSType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DeviceId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SystemLabels, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DeviceOSVersion, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceMetadata, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsManaged, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $DeviceObjectVersion, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceTrustType + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["IsCompliant"]) + { + $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] + } + if ($null -ne $PSBoundParameters["ProfileType"]) + { + $params["ProfileType"] = $PSBoundParameters["ProfileType"] + } + if ($null -ne $PSBoundParameters["DeviceOSType"]) + { + $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["SystemLabels"]) + { + $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] + } + if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) + { + $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["DeviceOSVersion"]) + { + $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] + } + if ($null -ne $PSBoundParameters["DeviceMetadata"]) + { + $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + } + if ($null -ne $PSBoundParameters["DevicePhysicalIds"]) + { + $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["IsManaged"]) + { + $params["IsManaged"] = $PSBoundParameters["IsManaged"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) + { + $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] + } + if ($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) + { + $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] + } + if ($null -ne $PSBoundParameters["DeviceTrustType"]) + { + $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDevice @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 new file mode 100644 index 0000000000..89a8a5aff6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaDirectorySetting { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["DirectorySetting"]) + { + $TmpValue = $PSBoundParameters["DirectorySetting"] + $Value = $TmpValue | ForEach-Object { + $NonEmptyProperties = $_.psobject.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name + $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json + } + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDirectorySetting @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 new file mode 100644 index 0000000000..e41f89c415 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaDomain { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SupportedServices, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Name, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefault + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["SupportedServices"]) + { + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) + { + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["Id"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["IsDefault"]) + { + $params["IsDefault"] = $PSBoundParameters["IsDefault"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 new file mode 100644 index 0000000000..338c47586d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaAdministrativeUnit { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaAdministrativeUnit @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 new file mode 100644 index 0000000000..60860cb9f2 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaAdministrativeUnitMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDirectoryAdministrativeUnitMemberByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 new file mode 100644 index 0000000000..55d8d2a236 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaContact { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaContact @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 new file mode 100644 index 0000000000..59785ff1d4 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDevice { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDevice @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 new file mode 100644 index 0000000000..6b2981e20e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDeviceRegisteredOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["OwnerId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDeviceRegisteredOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 new file mode 100644 index 0000000000..3f755f060d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDeviceRegisteredUser { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDeviceRegisteredUserByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 new file mode 100644 index 0000000000..b5b037ec8d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDirectoryRoleMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + { + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDirectoryRoleMemberByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 new file mode 100644 index 0000000000..374554ba37 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDirectorySetting { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["DirectorySettingId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDirectorySetting @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 new file mode 100644 index 0000000000..449b200027 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDomain { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 new file mode 100644 index 0000000000..b65efd9cb6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaScopedRoleMembership { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ScopedRoleMembershipId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) + { + $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 new file mode 100644 index 0000000000..f3f28d626d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Restore-EntraBetaDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $AutoReconcileProxyConflict + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = 'https://graph.microsoft.com/beta/directory/deletedItems/' + $params["Method"] = "POST" + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] += $Id+"/microsoft.graph.restore" + } + if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) + { + $params["Body"] = @{ + autoReconcileProxyConflict = $true + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 new file mode 100644 index 0000000000..4c1d238280 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaAdministrativeUnit { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRule, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRuleProcessingState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["MembershipRule"]) + { + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["MembershipType"]) + { + $params["MembershipType"] = $PSBoundParameters["MembershipType"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + { + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) + { + $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaAdministrativeUnit @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 new file mode 100644 index 0000000000..b646ec64f0 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 @@ -0,0 +1,41 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaAttributeSet { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias("Id")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AttributeSetId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String] $Description, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $MaxAttributesPerSet + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["AttributeSetId"]) + { + $params["AttributeSetId"] = $PSBoundParameters["AttributeSetId"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["MaxAttributesPerSet"]) + { + $params["MaxAttributesPerSet"] = $PSBoundParameters["MaxAttributesPerSet"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaDirectoryAttributeSet @params -Headers $customHeaders + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 new file mode 100644 index 0000000000..967c8c2374 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaCustomSecurityAttributeDefinition { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Status + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) + { + $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["Status"]) + { + $params["Status"] = $PSBoundParameters["Status"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaDirectoryCustomSecurityAttributeDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 new file mode 100644 index 0000000000..72b736f62e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomSecurityAttributeDefinitionId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsActive + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["AllowedValueId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["IsActive"]) + { + $params["IsActive"] = $PSBoundParameters["IsActive"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 new file mode 100644 index 0000000000..e95a701879 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 @@ -0,0 +1,185 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaDevice { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsManaged, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceOSVersion, + [Alias("ObjectId")] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceObjectId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceOSType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ProfileType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompliant, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceTrustType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $DeviceObjectVersion, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceMetadata, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SystemLabels + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["DevicePhysicalIds"]) + { + $params["PhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] + } + if($null -ne $PSBoundParameters["AlternativeSecurityIds"]) + { + $TmpValue = $PSBoundParameters["AlternativeSecurityIds"] + $key = [System.Text.Encoding]::UTF8.GetString($TmpValue.key) + $Temp = @{ + alternativeSecurityIds = @( + @{ + type = $TmpValue.type + key = [System.Text.Encoding]::ASCII.GetBytes($key) + } + ) + } + $Value = $Temp + $params["BodyParameter"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["IsManaged"]) + { + $params["IsManaged"] = $PSBoundParameters["IsManaged"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["DeviceOSVersion"]) + { + $params["OperatingSystemVersion"] = $PSBoundParameters["DeviceOSVersion"] + } + if($null -ne $PSBoundParameters["DeviceObjectId"]) + { + $params["DeviceId"] = $PSBoundParameters["DeviceObjectId"] + } + if($null -ne $PSBoundParameters["DeviceOSType"]) + { + $params["OperatingSystem"] = $PSBoundParameters["DeviceOSType"] + } + if($null -ne $PSBoundParameters["ProfileType"]) + { + $params["ProfileType"] = $PSBoundParameters["ProfileType"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["DeviceId"]) + { + $params["DeviceId1"] = $PSBoundParameters["DeviceId"] + } + if($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) + { + $params["ApproximateLastSignInDateTime"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["IsCompliant"]) + { + $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["DeviceTrustType"]) + { + $params["TrustType"] = $PSBoundParameters["DeviceTrustType"] + } + if($null -ne $PSBoundParameters["DeviceObjectVersion"]) + { + $params["DeviceVersion"] = $PSBoundParameters["DeviceObjectVersion"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DeviceMetadata"]) + { + $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + } + if($null -ne $PSBoundParameters["SystemLabels"]) + { + $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaDevice @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 new file mode 100644 index 0000000000..ffcd8014a2 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 @@ -0,0 +1,104 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaDirSyncConfiguration { + [CmdletBinding(DefaultParameterSetName = 'SetAccidentalDeletionThreshold')] + param ( + [Parameter(ParameterSetName = "SetAccidentalDeletionThreshold", ValueFromPipelineByPropertyName = $true, Mandatory = $true)][System.UInt32] $AccidentalDeletionThreshold, + [Parameter(ParameterSetName = "SetAccidentalDeletionThreshold", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, + [switch] $Force + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["AccidentalDeletionThreshold"]) { + $AccidentalDeletionThreshold = $PSBoundParameters["AccidentalDeletionThreshold"] + } + if ($null -ne $PSBoundParameters["TenantId"]) { + $TenantId = $PSBoundParameters["TenantId"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + if ($Force) { + $decision = 0 + } + else { + $title = 'Confirm' + $question = 'Do you want to continue?' + $Suspend = New-Object System.Management.Automation.Host.ChoiceDescription "&Suspend", "S" + $Yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Y" + $No = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "S" + $choices = [System.Management.Automation.Host.ChoiceDescription[]]($Yes, $No, $Suspend) + $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) + } + + if ($decision -eq 0) { + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $OnPremisesDirectorySynchronizationId = (Get-MgBetaDirectoryOnPremiseSynchronization).Id + } + else { + $OnPremisesDirectorySynchronizationId = $TenantId + } + $params = @{ + configuration = @{ + accidentalDeletionPrevention = @{ + synchronizationPreventionType = "enabledForCount" + alertThreshold = $AccidentalDeletionThreshold + } + } + } + $response = Update-MgBetaDirectoryOnPremiseSynchronization -Headers $customHeaders -OnPremisesDirectorySynchronizationId $OnPremisesDirectorySynchronizationId -BodyParameter $params + $response + } + else { + return + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 new file mode 100644 index 0000000000..d2a4352535 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaDirSyncEnabled { + [CmdletBinding(DefaultParameterSetName = 'All')] + param ( + [Parameter(ParameterSetName = "All", ValueFromPipelineByPropertyName = $true, Mandatory = $true)][System.Boolean] $EnableDirsync, + [Parameter(ParameterSetName = "All", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, + [switch] $Force + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($EnableDirsync -or (-not($EnableDirsync))) { + $params["OnPremisesSyncEnabled"] =$PSBoundParameters["EnableDirsync"] + } + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["OrganizationId"] = $PSBoundParameters["TenantId"] + } + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $OnPremisesDirectorySynchronizationId = (Get-MgBetaDirectoryOnPremiseSynchronization).Id + $params["OrganizationId"] = $OnPremisesDirectorySynchronizationId + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + if ($Force) { + $decision = 0 + } + else { + $title = 'Confirm' + $question = 'Do you want to continue?' + $Suspend = New-Object System.Management.Automation.Host.ChoiceDescription "&Suspend", "S" + $Yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Y" + $No = New-Object System.Management.Automation.Host.ChoiceDescription "&No", "S" + $choices = [System.Management.Automation.Host.ChoiceDescription[]]($Yes, $No, $Suspend) + $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) + } + $response = Update-MgBetaOrganization @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 new file mode 100644 index 0000000000..031c46e6e2 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaDirSyncFeature { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", Mandatory = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Feature, + [Parameter(ParameterSetName = "GetQuery", Mandatory = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $Enabled, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, + [switch] $Force + ) + PROCESS { + + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $Null + } + if ($null -ne $PSBoundParameters["Feature"]) { + $Feature = $PSBoundParameters["Feature"] + "Enabled" + } + if ($null -ne $PSBoundParameters["Enabled"]) { + $Enabled = $PSBoundParameters["Enabled"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $OnPremisesDirectorySynchronizationId = (Get-MgBetaDirectoryOnPremiseSynchronization).Id + } + else { + $OnPremisesDirectorySynchronizationId = Get-MgBetaDirectoryOnPremiseSynchronization -OnPremisesDirectorySynchronizationId $TenantId -ErrorAction SilentlyContinue -ErrorVariable er + if ([string]::IsNullOrWhiteSpace($er)) { + $OnPremisesDirectorySynchronizationId = $OnPremisesDirectorySynchronizationId.Id + } + else { + throw "Set-EntraBetaDirsyncFeature :$er" + break + } + } + + $body = @{ + features = @{ $Feature = $Enabled } + } + $body = $body | ConvertTo-Json + if ($Force) { + # If -Force is used, skip confirmation and proceed with the action. + $decision = 0 + } + else { + $title = 'Confirm' + $question = 'Do you want to continue?' + $Suspend = new-Object System.Management.Automation.Host.ChoiceDescription "&Suspend", "S" + $Yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Y" + $No = new-Object System.Management.Automation.Host.ChoiceDescription "&No", "N" + $choices = [System.Management.Automation.Host.ChoiceDescription[]]( $Yes, $No, $Suspend) + $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) + } + if ($decision -eq 0) { + $response = Update-MgBetaDirectoryOnPremiseSynchronization -Headers $customHeaders -OnPremisesDirectorySynchronizationId $OnPremisesDirectorySynchronizationId -BodyParameter $body -ErrorAction SilentlyContinue -ErrorVariable "er" + $er + break + if ([string]::IsNullOrWhiteSpace($er)) { + $response + } + else { + Write-Error "Cannot bind parameter 'TenantId'. Cannot convert value `"$TenantId`" to type + `"System.Guid`". Error: `"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).`" " + } + + } + else { + return + } + + + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 new file mode 100644 index 0000000000..7d7b8905e7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 @@ -0,0 +1,96 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaDirectorySetting { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["DirectorySettingId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["DirectorySetting"]) + { + $TmpValue = $PSBoundParameters["DirectorySetting"] + $Value = $TmpValue | ForEach-Object { + $NonEmptyProperties = $_.psobject.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name + $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json + } + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaDirectorySetting @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 new file mode 100644 index 0000000000..fefa9b41e7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaDomain { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SupportedServices, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefault + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["SupportedServices"]) + { + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) + { + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["DomainId"] = $PSBoundParameters["Name"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["IsDefault"]) + { + $params["IsDefault"] = $PSBoundParameters["IsDefault"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaDomain @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 new file mode 100644 index 0000000000..c4f214038e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 @@ -0,0 +1,130 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaDomainFederationSettings { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param( + [Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)][string]$DomainName, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$SigningCertificate, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$NextSigningCertificate, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$LogOffUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$PassiveLogOnUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$ActiveLogOnUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$IssuerUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$FederationBrandName, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$MetadataExchangeUri, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$PreferredAuthenticationProtocol, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]$SigningCertificateUpdateStatus, + [Parameter(Mandatory = $false,ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][string]$PromptLoginBehavior + ) + process { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DomainName"]) + { + $params["DomainId"] = $PSBoundParameters["DomainName"] + $Id = $PSBoundParameters["DomainName"] + if($null -ne $Id) + { + $params["InternalDomainFederationId"] = (Get-MgBetaDomainFederationConfiguration -DomainId $Id).Id + } + } + if($null -ne $PSBoundParameters["SigningCertificate"]) + { + $params["SigningCertificate"] = $PSBoundParameters["SigningCertificate"] + } + if($null -ne $PSBoundParameters["NextSigningCertificate"]) + { + $params["NextSigningCertificate"] = $PSBoundParameters["NextSigningCertificate"] + } + if($null -ne $PSBoundParameters["LogOffUri"]) + { + $params["SignOutUri"] = $PSBoundParameters["LogOffUri"] + } + if($null -ne $PSBoundParameters["PassiveLogOnUri"]) + { + $params["PassiveSignInUri"] = $PSBoundParameters["PassiveLogOnUri"] + } + if($null -ne $PSBoundParameters["ActiveLogOnUri"]) + { + $params["ActiveSignInUri"] = $PSBoundParameters["ActiveLogOnUri"] + } + if($null -ne $PSBoundParameters["IssuerUri"]) + { + $params["IssuerUri"] = $PSBoundParameters["IssuerUri"] + } + if($null -ne $PSBoundParameters["FederationBrandName"]) + { + $params["DisplayName"] = $PSBoundParameters["FederationBrandName"] + } + if($null -ne $PSBoundParameters["MetadataExchangeUri"]) + { + $params["MetadataExchangeUri"] = $PSBoundParameters["MetadataExchangeUri"] + } + if($null -ne $PSBoundParameters["PreferredAuthenticationProtocol"]) + { + $params["PreferredAuthenticationProtocol"] = $PSBoundParameters["PreferredAuthenticationProtocol"] + } + if($null -ne $PSBoundParameters["SigningCertificateUpdateStatus"]) + { + $params["SigningCertificateUpdateStatus"] = $PSBoundParameters["SigningCertificateUpdateStatus"] + } + if($null -ne $PSBoundParameters["PromptLoginBehavior"]) + { + $params["PromptLoginBehavior"] = $PSBoundParameters["PromptLoginBehavior"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if($null -ne $params.InternalDomainFederationId) + { + $response = Update-MgBetaDomainFederationConfiguration @params -Headers $customHeaders + $response + } + } + } + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 new file mode 100644 index 0000000000..6da38bf87d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaPartnerInformation { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter( ValueFromPipelineByPropertyName = $true)] + [System.Guid] $ObjectId, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $CompanyType, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $PartnerCommerceUrl, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $PartnerCompanyName, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $PartnerHelpUrl, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string[]] $PartnerSupportEmails, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string[]] $PartnerSupportTelephones, + [Parameter(ParameterSetName = 'SetPartnerInformation', ValueFromPipelineByPropertyName = $true)] + [string] $PartnerSupportUrl, + [Parameter(ValueFromPipelineByPropertyName = $true)] + [System.Guid] $TenantId + ) + + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["TenantId"]) { + $body["partnerTenantId"] = $PSBoundParameters["TenantId"] + } + if ($null -ne $PSBoundParameters["CompanyType"]) { + $body["companyType"] = $PSBoundParameters["CompanyType"] + } + if ($null -ne $PSBoundParameters["PartnerCommerceUrl"]) { + $body["commerceUrl"] = $PSBoundParameters["PartnerCommerceUrl"] + } + if ($null -ne $PSBoundParameters["PartnerCompanyName"]) { + $body["companyName"] = $PSBoundParameters["PartnerCompanyName"] + } + if ($null -ne $PSBoundParameters["PartnerHelpUrl"]) { + $body["helpUrl"] = $PSBoundParameters["PartnerHelpUrl"] + } + if ($null -ne $PSBoundParameters["PartnerSupportEmails"]) { + $body["supportEmails"] = @($PSBoundParameters["PartnerSupportEmails"]) + } + if ($null -ne $PSBoundParameters["PartnerSupportTelephones"]) { + $body["supportTelephones"] = @($PSBoundParameters["PartnerSupportTelephones"] -as [string[]]) + } + if ($null -ne $PSBoundParameters["PartnerSupportUrl"]) { + $body["supportUrl"] = $PSBoundParameters["PartnerSupportUrl"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if ([string]::IsNullOrWhiteSpace($TenantId)) { + $TenantID = ((Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/beta/organization").value).id + } + Invoke-MgGraphRequest -Headers $customHeaders -Method PATCH -Uri "https://graph.microsoft.com/beta/organization/$TenantID/partnerInformation" -Body $body + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 new file mode 100644 index 0000000000..06301906c7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaTenantDetail { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationPhones, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationMails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["MarketingNotificationEmails"]) + { + $params["MarketingNotificationEmails"] = $PSBoundParameters["MarketingNotificationEmails"] + } + + if($null -ne $PSBoundParameters["SecurityComplianceNotificationMails"]) + { + $params["SecurityComplianceNotificationMails"] = $PSBoundParameters["SecurityComplianceNotificationMails"] + } + + if($null -ne $PSBoundParameters["SecurityComplianceNotificationPhones"]) + { + $params["SecurityComplianceNotificationPhones"] = $PSBoundParameters["SecurityComplianceNotificationPhones"] + } + + if($null -ne $PSBoundParameters["TechnicalNotificationMails"]) + { + $params["TechnicalNotificationMails"] = $PSBoundParameters["TechnicalNotificationMails"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================") + + $params["OrganizationId"] = (Get-MgBetaOrganization).Id + Update-MgBetaOrganization @params -Headers $customHeaders + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 new file mode 100644 index 0000000000..171aa61050 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirectoryRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleAssignmentId, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + { + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["SearchString"]) + { + $params["SearchString"] = $PSBoundParameters["SearchString"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaRoleManagementDirectoryRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 new file mode 100644 index 0000000000..e92f59ba18 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 @@ -0,0 +1,125 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirectoryRoleDefinition { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleDefinitionId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"} + if($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + { + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaRoleManagementDirectoryRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + $propsToConvert = @('RolePermissions') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 new file mode 100644 index 0000000000..2005b35446 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPrivilegedResource { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{ProviderId = "PrivilegedAccessId"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["GovernanceResourceId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ProviderId"]) + { + $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaPrivilegedAccessResource @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 new file mode 100644 index 0000000000..115218c6d5 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPrivilegedRole { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PrivilegedRoleId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaPrivilegedRole @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 new file mode 100644 index 0000000000..ee0e56dee4 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPrivilegedRoleAssignmentRequest { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ProviderId"]) + { + $params["ProviderId"] = $PSBoundParameters["ProviderId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaPrivilegedRoleAssignmentRequest @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 new file mode 100644 index 0000000000..69e695dd4d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPrivilegedRoleDefinition { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ResourceId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{ResourceId = "GovernanceResourceId"; ProviderId = "PrivilegedAccessId"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["GovernanceRoleDefinitionId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["GovernanceResourceId"] = $PSBoundParameters["ResourceId"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ProviderId"]) + { + $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaPrivilegedAccessResourceRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 new file mode 100644 index 0000000000..0af9bce53e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPrivilegedRoleSetting { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{} + + if($null -ne $PSBoundParameters["ProviderId"]) + { + $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] + } + + if($null -ne $PSBoundParameters["Id"]) + { + $params["GovernanceRoleSettingId"] = $PSBoundParameters["Id"] + } + + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Get-MgBetaPrivilegedAccessRoleSetting @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('AdminEligibleSettings', 'AdminMemberSettings', 'UserEligibleSettings','UserMemberSettings') + + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 new file mode 100644 index 0000000000..3f16f1be7d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaDirectoryRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $RoleDefinitionId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PrincipalId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DirectoryScopeId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + { + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + } + if ($null -ne $PSBoundParameters["PrincipalId"]) + { + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["DirectoryScopeId"]) + { + $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaRoleManagementDirectoryRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 new file mode 100644 index 0000000000..34f7ad2977 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 @@ -0,0 +1,139 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaDirectoryRoleDefinition { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Version, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TemplateId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition]] $InheritsPermissionsFrom, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["RolePermissions"]) + { + $TmpValue = $PSBoundParameters["RolePermissions"] + $Temp = @{ + allowedResourceActions = $TmpValue.allowedResourceActions + condition = $TmpValue.condition + } + $Value = $Temp + $params["RolePermissions"] = $Value + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["Version"]) + { + $params["Version"] = $PSBoundParameters["Version"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) + { + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["TemplateId"]) + { + $params["TemplateId"] = $PSBoundParameters["TemplateId"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) + { + $params["InheritsPermissionsFrom"] = $PSBoundParameters["InheritsPermissionsFrom"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ResourceScopes"]) + { + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaRoleManagementDirectoryRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 new file mode 100644 index 0000000000..7b43988416 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 @@ -0,0 +1,119 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaPrivilegedRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsElevated, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $UserId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.DateTime]] $ExpirationDateTime, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ResultMessage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $RoleId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["IsElevated"]) + { + $params["IsElevated"] = $PSBoundParameters["IsElevated"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ExpirationDateTime"]) + { + $params["ExpirationDateTime"] = $PSBoundParameters["ExpirationDateTime"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ResultMessage"]) + { + $params["ResultMessage"] = $PSBoundParameters["ResultMessage"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["RoleId"]) + { + $params["RoleId"] = $PSBoundParameters["RoleId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaPrivilegedRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 new file mode 100644 index 0000000000..a507fd15ff --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDirectoryRoleAssignment { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleAssignmentId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + { + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaRoleManagementDirectoryRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 new file mode 100644 index 0000000000..98f3a02077 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaDirectoryRoleDefinition { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleDefinitionId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + { + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaRoleManagementDirectoryRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 new file mode 100644 index 0000000000..517196dcf0 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 @@ -0,0 +1,150 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaDirectoryRoleDefinition { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleDefinitionId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Version, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TemplateId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition]] $InheritsPermissionsFrom, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsEnabled + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + { + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["Version"]) + { + $params["Version"] = $PSBoundParameters["Version"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["TemplateId"]) + { + $params["TemplateId"] = $PSBoundParameters["TemplateId"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) + { + $params["InheritsPermissionsFrom"] = $PSBoundParameters["InheritsPermissionsFrom"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ResourceScopes"]) + { + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["RolePermissions"]) + { + $TmpValue = $PSBoundParameters["RolePermissions"] + $Value = @() + foreach($val in $TmpValue) + { + $Temp = $val | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $hash[$_.Name] = $_.Value } + $Value += $hash + } + $params["RolePermissions"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) + { + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaRoleManagementDirectoryRoleDefinition @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 new file mode 100644 index 0000000000..26b4c82eb2 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 @@ -0,0 +1,119 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaPrivilegedRoleAssignmentRequest { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Decision, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Reason, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule] $Schedule, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AssignmentState, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Decision"]) + { + $params["Decision"] = $PSBoundParameters["Decision"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["Reason"]) + { + $params["Reason"] = $PSBoundParameters["Reason"] + } + if ($null -ne $PSBoundParameters["Schedule"]) + { + $params["Schedule"] = $PSBoundParameters["Schedule"] + } + if ($null -ne $PSBoundParameters["AssignmentState"]) + { + $params["AssignmentState"] = $PSBoundParameters["AssignmentState"] + } + if ($null -ne $PSBoundParameters["ProviderId"]) + { + $params["ProviderId"] = $PSBoundParameters["ProviderId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaPrivilegedRoleAssignmentRequest @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 new file mode 100644 index 0000000000..68425f289a --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 @@ -0,0 +1,165 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaPrivilegedRoleSetting { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $RoleDefinitionId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserMemberSettings, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $AdminMemberSettings, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserEligibleSettings, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $AdminEligibleSettings, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ResourceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["GovernanceRoleSettingId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + { + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + } + if($null -ne $PSBoundParameters["UserMemberSettings"]) + { + $TmpValue = $PSBoundParameters["UserMemberSettings"] + $a = @() + foreach($setting in $TmpValue) { + $Temp = $setting | ConvertTo-Json + $a += $Temp + } + + $Value = $a + $params["UserMemberSettings"] = $Value + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["AdminMemberSettings"]) + { + $TmpValue = $PSBoundParameters["AdminMemberSettings"] + $a = @() + foreach($setting in $TmpValue) { + $Temp = $setting | ConvertTo-Json + $a += $Temp + } + + $Value = $a + $params["AdminMemberSettings"] = $Value + } + if($null -ne $PSBoundParameters["UserEligibleSettings"]) + { + $TmpValue = $PSBoundParameters["UserEligibleSettings"] + $a = @() + foreach($setting in $TmpValue) { + $Temp = $setting | ConvertTo-Json + $a += $Temp + } + + $Value = $a + $params["UserEligibleSettings"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["AdminEligibleSettings"]) + { + $TmpValue = $PSBoundParameters["AdminEligibleSettings"] + $a = @() + foreach($setting in $TmpValue) { + $Temp = $setting | ConvertTo-Json + $a += $Temp + } + + $Value = $a + $params["AdminEligibleSettings"] = $Value + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] + } + if ($null -ne $PSBoundParameters["ProviderId"]) + { + $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaPrivilegedAccessRoleSetting @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 new file mode 100644 index 0000000000..8c1c56ec38 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaGroupMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["RefObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaGroupMember @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 new file mode 100644 index 0000000000..73a561b078 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaGroupOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaGroupOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 new file mode 100644 index 0000000000..8130006870 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaLifecyclePolicyGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Add-MgBetaGroupToLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 new file mode 100644 index 0000000000..9c60446103 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 @@ -0,0 +1,128 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDeletedGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"} + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" + $params["Filter"] = $Value + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryDeletedItemAsGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 new file mode 100644 index 0000000000..747a2d04c4 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 @@ -0,0 +1,128 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaGroup { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 new file mode 100644 index 0000000000..2aa265e72f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaGroupAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaGroupAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 new file mode 100644 index 0000000000..096a7b04e1 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaGroupLifecyclePolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaGroupLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 new file mode 100644 index 0000000000..5486c01c63 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaGroupMember { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaGroupMember @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('assignedLicenses','assignedPlans','provisionedPlans','identities') + foreach ($prop in $propsToConvert) { + if ($null -ne $_.PSObject.Properties[$prop]) { + $value = $_.$prop | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 new file mode 100644 index 0000000000..6fe26c069d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaGroupOwner { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $baseUri = 'https://graph.microsoft.com/beta/groups' + $properties = '$select=*' + $Method = "GET" + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + + if($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + $URI = "$baseUri/$($params.GroupId)/owners?$properties" + } + + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.GroupId)/owners?$properties" + } + + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + $URI = "$baseUri/$($params.GroupId)/owners?`$top=$topCount&$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $response = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 new file mode 100644 index 0000000000..c07789a4fc --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaGroupPermissionGrant { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaGroupPermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 new file mode 100644 index 0000000000..8e67fbc3fe --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaLifecyclePolicyGroup { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaGroupLifecyclePolicyByGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 new file mode 100644 index 0000000000..9158a76572 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaObjectByObjectId { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Types, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[System.String]] $ObjectIds, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["Types"]) + { + $params["Types"] = $PSBoundParameters["Types"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ObjectIds"]) + { + $params["Ids"] = $PSBoundParameters["ObjectIds"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaDirectoryObjectById @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + $dictionary = $_.AdditionalProperties + + foreach ($key in $dictionary.Keys) { + $value = ($dictionary[$key] | Convertto-json -Depth 10) | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $key -Value ($value) -Force + } + } + } + + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 new file mode 100644 index 0000000000..8cb3cdac44 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 @@ -0,0 +1,96 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaObjectSetting { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetObjectId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetType, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $topCount = $null + $baseUri = "https://graph.microsoft.com/beta/$TargetType/$TargetObjectId/settings" + $params["Method"] = "GET" + $params["Uri"] = $baseUri+'?$select=*' + + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $params["Uri"] = $baseUri+"?`$select=$($selectProperties)" + } + + if($PSBoundParameters.ContainsKey("Top") -and (-not $PSBoundParameters.ContainsKey("All"))) + { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $params["Uri"] += "&`$top=999" + } + else{ + $params["Uri"] += "&`$top=$topCount" + } + } + + if($null -ne $PSBoundParameters["Id"]) + { + $Id = $PSBoundParameters["Id"] + $params["Uri"] = "$baseUri/$($Id)" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + try { + $data = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $all = $All.IsPresent + $increment = $topCount - $data.Count + while ($response.'@odata.nextLink' -and (($all) -or ($increment -gt 0 -and -not $all))) { + $params["Uri"] = $response.'@odata.nextLink' + if (-not $all) { + $topValue = [Math]::Min($increment, 999) + $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $increment -= $topValue + } + $response = Invoke-GraphRequest @params + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } catch {} + + $targetTypeList = @() + + foreach($res in $data){ + $target = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectorySetting + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $target | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetTypeList += $target + } + + $targetTypeList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 new file mode 100644 index 0000000000..be031b92af --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 @@ -0,0 +1,154 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRule, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $MailNickname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $MailEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Visibility, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRuleProcessingState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $SecurityEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $LabelId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $GroupTypes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["MembershipRule"]) + { + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["MailNickname"]) + { + $params["MailNickname"] = $PSBoundParameters["MailNickname"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["MailEnabled"]) + { + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["Visibility"]) + { + $params["Visibility"] = $PSBoundParameters["Visibility"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + { + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + } + if ($null -ne $PSBoundParameters["SecurityEnabled"]) + { + $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["LabelId"]) + { + $params["LabelId"] = $PSBoundParameters["LabelId"] + } + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + { + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + } + if ($null -ne $PSBoundParameters["GroupTypes"]) + { + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 new file mode 100644 index 0000000000..7ed6bf56c4 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaGroupAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppRoleId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PrincipalId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["AppRoleId"]) + { + $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["PrincipalId"]) + { + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaGroupAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 new file mode 100644 index 0000000000..d5e3a2dcc8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaGroupLifecyclePolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AlternateNotificationEmails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ManagedGroupTypes + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) + { + $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + { + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + } + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + { + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaGroupLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 new file mode 100644 index 0000000000..c513ecfca6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 @@ -0,0 +1,55 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaObjectSetting { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetObjectId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetType + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["TargetType"]) { + $params["TargetType"] = $PSBoundParameters["TargetType"] + } + if ($null -ne $PSBoundParameters["TargetObjectId"]) { + $params["TargetObjectId"] = $PSBoundParameters["TargetObjectId"] + } + if ($null -ne $PSBoundParameters["DirectorySetting"]) { + $params["DirectorySetting"] = $PSBoundParameters["DirectorySetting"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $directorySettingsJson = $DirectorySetting| ForEach-Object { + $NonEmptyProperties = $_.psobject.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name + $propertyValues = $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json + [regex]::Replace($propertyValues,'(?<=")(\w+)(?=":)',{$args[0].Groups[1].Value.ToLower()}) + } + $response = Invoke-GraphRequest -Headers $customHeaders -Method POST -Uri https://graph.microsoft.com/beta/$TargetType/$TargetObjectId/settings -Body $directorySettingsJson + $response = $response | ConvertTo-Json | ConvertFrom-Json + + $targetTypeList = @() + foreach($data in $response){ + $target = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectorySetting + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $target | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetTypeList += $target + } + $targetTypeList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 new file mode 100644 index 0000000000..e434fa19c1 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaGroup { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 new file mode 100644 index 0000000000..1bb9c64c82 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaGroupAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppRoleAssignmentId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + { + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaGroupAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 new file mode 100644 index 0000000000..d2a838d4b3 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaGroupLifecyclePolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaGroupLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 new file mode 100644 index 0000000000..3bcbb973ec --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaGroupMember { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaGroupMemberByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 new file mode 100644 index 0000000000..6fc94d4da8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaGroupOwner { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["OwnerId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaGroupOwnerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 new file mode 100644 index 0000000000..ca985cfd06 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaLifecyclePolicyGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaGroupFromLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 new file mode 100644 index 0000000000..e8bda6bc71 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 @@ -0,0 +1,40 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaObjectSetting { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetObjectId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetType + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["TargetType"]) { + $params["TargetType"] = $PSBoundParameters["TargetType"] + } + if ($null -ne $PSBoundParameters["TargetObjectId"]) { + $params["TargetObjectId"] = $PSBoundParameters["TargetObjectId"] + } + if ($null -ne $PSBoundParameters["Id"]) { + $params["Id"] = $PSBoundParameters["Id"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $Method = "DELETE" + $URI = ' https://graph.microsoft.com/beta/{0}/{1}/settings/{2}' -f $TargetType,$TargetObjectId, $ID + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 new file mode 100644 index 0000000000..7cbf7d85cf --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Reset-EntraBetaLifeCycleGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $GroupId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-MgBetaRenewGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 new file mode 100644 index 0000000000..d32e86c149 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Select-EntraBetaGroupIdsContactIsMemberOf { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["OrgContactId"] = $PSBoundParameters["ObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $initalResponse = Get-MgBetaContactMemberOfAsGroup @params -Headers $customHeaders + $response = $initalResponse | Where-Object -Filterscript {$_.Id -in ($GroupIdsForMembershipCheck.GroupIds)} + if($response){ + $response.Id + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 new file mode 100644 index 0000000000..1ef06b33d7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 @@ -0,0 +1,94 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Select-EntraBetaGroupIdsGroupIsMemberOf { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["GroupId"] = $PSBoundParameters["ObjectId"] + } + if($null -ne $PSBoundParameters["GroupIdsForMembershipCheck"]) + { + $GroupIdData = Get-EntraBetaGroup -All + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $initalResponse = Get-MgBetaGroupMemberOf @params -Headers $customHeaders + $response = $initalResponse | Where-Object -Filterscript {$_.Id -in ($GroupIdsForMembershipCheck.GroupIds)} + $result=@() + if($response){ + $result = $response.Id + } + $notMember = $GroupIdsForMembershipCheck.GroupIds | Where-Object -Filterscript { $_ -notin $result } + foreach ($Id in $notMember) { + if ($GroupIdData.Id -notcontains $Id) { + Write-Error "Error occurred while executing SelectEntraBetaGroupIdsGroupIsMemberOf +Code: Request_BadRequest +Message: Invalid GUID:$Id" + return + } + } + if($response){ + $response.Id + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 new file mode 100644 index 0000000000..4752e61865 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Select-EntraBetaGroupIdsUserIsMemberOf { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $initalResponse = Get-MgBetaUserMemberOfAsGroup -Headers $customHeaders -UserId $params["UserId"] + $response = $initalResponse | Where-Object -Filterscript {$_.ID -in ($GroupIdsForMembershipCheck.GroupIds)} + if($response){ + $response.ID + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 new file mode 100644 index 0000000000..5c06e49515 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 @@ -0,0 +1,161 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaGroup { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRule, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MailNickname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $MailEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRuleProcessingState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Visibility, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $SecurityEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $LabelId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $GroupTypes, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["MembershipRule"]) + { + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["MailNickname"]) + { + $params["MailNickname"] = $PSBoundParameters["MailNickname"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["MailEnabled"]) + { + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + } + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + { + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["Visibility"]) + { + $params["Visibility"] = $PSBoundParameters["Visibility"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["SecurityEnabled"]) + { + $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["LabelId"]) + { + $params["LabelId"] = $PSBoundParameters["LabelId"] + } + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + { + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + } + if ($null -ne $PSBoundParameters["GroupTypes"]) + { + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaGroup @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 new file mode 100644 index 0000000000..ac6f91b2ca --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaGroupLifecyclePolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AlternateNotificationEmails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ManagedGroupTypes + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + { + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) + { + $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + { + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + } + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + { + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaGroupLifecyclePolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 new file mode 100644 index 0000000000..6354e38743 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 @@ -0,0 +1,49 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaObjectSetting { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetObjectId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetType + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["TargetType"]) { + $params["TargetType"] = $PSBoundParameters["TargetType"] + } + if ($null -ne $PSBoundParameters["TargetObjectId"]) { + $params["TargetObjectId"] = $PSBoundParameters["TargetObjectId"] + } + if ($null -ne $PSBoundParameters["DirectorySetting"]) { + $params["DirectorySetting"] = $PSBoundParameters["DirectorySetting"] + } + if ($null -ne $PSBoundParameters["ID"]) { + $params["ID"] = $PSBoundParameters["ID"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $directorySettingsJson = $DirectorySetting| ForEach-Object { + $NonEmptyProperties = $_.psobject.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name + $propertyValues = $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json + [regex]::Replace($propertyValues,'(?<=")(\w+)(?=":)',{$args[0].Groups[1].Value.ToLower()}) + } + $response = Invoke-GraphRequest -Headers $customHeaders -Method PATCH -Uri https://graph.microsoft.com/beta/$TargetType/$TargetObjectId/settings/$ID -Body $directorySettingsJson + $response | ConvertTo-Json | ConvertFrom-Json + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 new file mode 100644 index 0000000000..550349ad0e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -0,0 +1,33 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPrivateAccessApplicationSegment { + + [CmdletBinding(DefaultParameterSetName = 'AllApplicationSegments')] + param ( + [Alias('id')] + [Parameter(Mandatory = $True, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [string] + $ObjectId, + [Parameter(Mandatory = $False, Position = 2, ParameterSetName = 'SingleApplicationSegment')] + [string] + $ApplicationSegmentId + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + switch ($PSCmdlet.ParameterSetName) { + "AllApplicationSegments" { + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments" + $response.value + break + } + "SingleApplicationSegment" { + Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" + break + } + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 new file mode 100644 index 0000000000..6e08860a2a --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaPrivateAccessApplicationSegment { + + [CmdletBinding()] + param ( + + [Alias('id')] + [Parameter(Mandatory = $True, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [string] + $ObjectID, + + [Parameter(Mandatory = $True)] + [string] + $DestinationHost, + + [Parameter(Mandatory = $False)] + [string[]] + $Ports, + + [Parameter(Mandatory = $False)] + [ValidateSet("TCP", "UDP")] + [string[]] + $Protocol, + + [Parameter(Mandatory = $True)] + [ValidateSet("ipAddress", "dnsSuffix", "ipRangeCidr","ipRange","FQDN")] + [string] + $DestinationType + ) + + PROCESS { + + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $portRanges = @() + + foreach ($port in $Ports){ + if (!$port.Contains("-")) { + $portRanges += $port + "-" + $port + } + else { + $portRanges += $port + } + } + + if ($DestinationType -eq "dnsSuffix") + { + $body = @{ + destinationHost = $DestinationHost.ToLower() + destinationType = 'dnsSuffix' + } + } + else + { + switch ($DestinationType) { + "ipAddress" { $dstType = 'ip' } + "ipRange" { $dstType = 'ipRange' } + "fqdn" { $dstType = 'fqdn' } + "ipRangeCidr" { $dstType = 'ipRangeCidr' } + } + $body = @{ + destinationHost = $DestinationHost.ToLower() + protocol = $Protocol.ToLower() -join "," + ports = $portRanges + destinationType = $dstType + } + } + + $bodyJson = $body | ConvertTo-Json -Depth 99 -Compress + + $params = @{ + Method = 'POST' + Uri = "https://graph.microsoft.com/beta/applications/$ObjectID/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/" + Headers = $customHeaders + Body = $bodyJson + OutputType = 'PSObject' + } + + Invoke-GraphRequest @params +} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 new file mode 100644 index 0000000000..9ef92b3bee --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaPrivateAccessApplicationSegment { + + [CmdletBinding()] + param ( + [Parameter(Mandatory = $True, Position = 1)] + [string] + $ObjectID, + [Parameter(Mandatory = $False, Position = 2)] + [string] + $ApplicationSegmentId + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + Invoke-GraphRequest -Method DELETE -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectID/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 new file mode 100644 index 0000000000..ba5c5777a6 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationSignInDetailedSummary { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $params["Filter"] = $PSBoundParameters["Filter"] + } + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Get-MgBetaReportApplicationSignInDetailedSummary @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $value = $_.Status | ConvertTo-Json | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name Status -Value ($value) -Force + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 new file mode 100644 index 0000000000..bb60f0511d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 @@ -0,0 +1,56 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaApplicationSignInSummary { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Days, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $filterApplied = $null + $topCount = $null + if ($null -ne $PSBoundParameters["Days"]) { + $params["Days"] = $PSBoundParameters["Days"] + } + if ($null -ne $PSBoundParameters["Filter"]) { + $params["Filter"] = $PSBoundParameters["Filter"] + $filterApplied = '?$filter=' + $params["Filter"] + } + if ($PSBoundParameters.ContainsKey("Top")) { + $params["Top"] = $PSBoundParameters["Top"] + $topCount = '?$top=' + $params["Top"] + } + $Method = "GET" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $URI = "https://graph.microsoft.com/beta/reports/getAzureADApplicationSignInSummary(period='D{0}'){1}{2}" -f $Days, $filterApplied, $topCount + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method | ConvertTo-Json | ConvertFrom-Json).value + + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $targetList = @() + foreach ($res in $data) { + $targetType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphApplicationSignInSummary + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $targetType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetList += $targetType + } + $targetList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 new file mode 100644 index 0000000000..a62c75478b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaAuditDirectoryLog { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{} + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Get-MgBetaAuditLogDirectoryAudit @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('InitiatedBy', 'TargetResources', 'AdditionalDetails') + + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 new file mode 100644 index 0000000000..35eadd4fbc --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaAuditSignInLog { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{} + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Get-MgBetaAuditLogSignIn @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $_ | Add-Member -MemberType AliasProperty -Name RiskEventTypes -Value RiskEventTypesV2 -Force + + $propsToConvert = @('MfaDetail', 'AppliedConditionalAccessPolicies', 'NetworkLocationDetails', 'Location', 'DeviceDetail', 'Status', 'AuthenticationProcessingDetails') + + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 new file mode 100644 index 0000000000..5a6f093940 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaFeatureRolloutPolicyDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 new file mode 100644 index 0000000000..e0d1c66d77 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 @@ -0,0 +1,40 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Add-EntraBetaServicePrincipalPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["ID"]) { + $id = $PSBoundParameters["ID"] + } + if ($null -ne $PSBoundParameters["RefObjectId"]) { + $RefObjectId = $PSBoundParameters["RefObjectId"] + } + $uri = "https://graph.microsoft.com/beta/serviceprincipals/$id/Policies/" + '$ref' + $body = @{ + "@odata.id" = "https://graph.microsoft.com/beta/legacy/policies/$RefObjectId" + } + $body = $body | ConvertTo-Json + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-MgGraphRequest -Headers $customHeaders -Method POST -Uri $uri -Body $body -ContentType "application/json" + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 new file mode 100644 index 0000000000..cdc2aba44e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaAuthorizationPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + + if($PSBoundParameters.ContainsKey("Id")) + { + $params["AuthorizationPolicyId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaPolicyAuthorizationPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('DefaultUserRolePermissions') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 new file mode 100644 index 0000000000..26c20e0b79 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaConditionalAccessPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaIdentityConditionalAccessPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 new file mode 100644 index 0000000000..d7ca7e7443 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 @@ -0,0 +1,111 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaFeatureRolloutPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $keysChanged = @{SearchString = "Filter"} + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaPolicyFeatureRolloutPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 new file mode 100644 index 0000000000..5295ce3132 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaIdentityProvider { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $IdentityProviderBaseId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + { + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaIdentityProvider @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName + Add-Member -InputObject $_ -MemberType AliasProperty -Name Type -Value identityProviderType + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 new file mode 100644 index 0000000000..491de3618a --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 @@ -0,0 +1,94 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaNamedLocationPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaIdentityConditionalAccessNamedLocation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('ipRanges') + try { + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 new file mode 100644 index 0000000000..da81e28c9a --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaOAuth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaOAuth2PermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 new file mode 100644 index 0000000000..e6bd758e9c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPermissionGrantConditionSet { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["ConditionSetType"]) + { + $conditionalSet = $PSBoundParameters["ConditionSetType"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + if("$conditionalSet" -eq "includes"){ + $response = Get-MgBetaPolicyPermissionGrantPolicyInclude @params -Headers $customHeaders + } + elseif("$conditionalSet" -eq "excludes"){ + $response = Get-MgBetaPolicyPermissionGrantPolicyExclude @params -Headers $customHeaders + } + else{ + Write-Error("Message: Resource not found for the segment '$conditionalSet'.") + return + } + + $response +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 new file mode 100644 index 0000000000..d429a78971 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPermissionGrantPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaPolicyPermissionGrantPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 new file mode 100644 index 0000000000..91d5b04669 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $baseUrl = "https://graph.microsoft.com/beta/policies/" + $endpoints = @("homeRealmDiscoveryPolicies", + "claimsMappingPolicies", + "tokenIssuancePolicies", + "tokenLifetimePolicies", + "activityBasedTimeoutPolicies", + "featureRolloutPolicies", + "defaultAppManagementPolicy", + "appManagementPolicies", + "authenticationFlowsPolicy", + "authenticationMethodsPolicy", + "permissionGrantPolicies") + + if($PSBoundParameters.ContainsKey("Top") -and ($null -eq $Top -or $Top -eq 0)){ + Write-Error "Invalid page size specified: '0'. Must be between 1 and 999 inclusive. +Status: 400 (BadRequest) +ErrorCode: Request_UnsupportedQuery" + break + } + $response = @() + foreach ($endpoint in $endpoints) { + $url = "${baseUrl}${endpoint}" + try { + $policies = (Invoke-GraphRequest -Headers $customHeaders -Uri $url -Method GET).value + } + catch { + $policies = (Invoke-GraphRequest -Headers $customHeaders -Uri $url -Method GET) + } + + $policies | ForEach-Object { + $_.Type = ($endpoint.Substring(0, 1).ToUpper() + $endpoint.Substring(1) -replace "ies", "y") + $response += $_ + if ($Top -and ($response.Count -ge $Top)) { + break + } + } + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================") + + if ($PSBoundParameters.ContainsKey("ID")) { + $response = $response | Where-Object { $_.id -eq $Id } + if($Null -eq $response ) { + Write-Error "Get-EntraBetaPolicy : Error occurred while executing Get-Policy + Code: Request_BadRequest + Message: Invalid object identifier '$Id' ." + } + } elseif (-not $All -and $Top) { + $response = $response | Select-Object -First $Top + } + + $data = $response | ConvertTo-Json -Depth 50 | ConvertFrom-Json + $respList = @() + foreach ($res in $data) { + switch ($res.type) { + "ActivityBasedTimeoutPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphActivityBasedTimeoutPolicy } + "AppManagementPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAppManagementPolicy } + "ClaimsMappingPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphClaimsMappingPolicy } + "FeatureRolloutPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy } + "HomeRealmDiscoveryPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphHomeRealmDiscoveryPolicy } + "TokenIssuancePolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTokenIssuancePolicy } + "TokenLifetimePolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTokenLifetimePolicy } + "PermissionGrantPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphPermissionGrantPolicy } + "DefaultAppManagementPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphappManagementPolicy } + "AuthenticationFlowsPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphauthenticationFlowsPolicy } + "AuthenticationMethodsPolicy" { $respType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphauthenticationMethodsPolicy } + default { Write-Error "Unknown type: '$res.type'" } + } + + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $respType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $respList += $respType + } + $respList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 new file mode 100644 index 0000000000..46942bba74 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 @@ -0,0 +1,42 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPolicyAppliedObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $Id = $PSBoundParameters["Id"] + $params["Uri"] = "https://graph.microsoft.com/beta/legacy/policies/$Id/appliesTo" + $params["Method"] = "GET" + if ($PSBoundParameters.ContainsKey("ID")) { + $params["Uri"] = "https://graph.microsoft.com/beta/legacy/policies/$Id/appliesTo" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = (Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri | ConvertTo-Json -Depth 10 | ConvertFrom-Json).value + $response | Add-Member -MemberType AliasProperty -Value '@odata.type' -Name 'odata.type' + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 new file mode 100644 index 0000000000..940f4cf1ab --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 @@ -0,0 +1,48 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaServicePrincipalPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["Id"]) { + $params["Id"] = $PSBoundParameters["Id"] + } + $Method = "GET" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $URI = "https://graph.microsoft.com/beta/serviceprincipals/$Id/policies" + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method | ConvertTo-Json -Depth 20 | ConvertFrom-Json).value + + $data = $response + $userList = @() + foreach ($res in $data) { + $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphServicePrincipal + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + + if($_.Name -eq 'type'){ + $userType | Add-Member -MemberType NoteProperty -Name 'ServicePrincipalType' -Value $propertyValue -Force + + }else{ + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + } + $userList += $userType + } + $userList + + + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 new file mode 100644 index 0000000000..f12b841efb --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 @@ -0,0 +1,55 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaTrustFrameworkPolicy { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "GetById", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OutputFilePath + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -eq $PSBoundParameters["Id"] -and $null -eq $PSBoundParameters["OutputFilePath"]) + { + $response = Get-MgBetaTrustFrameworkPolicy @params -Headers $customHeaders + $response + } + elseif($null -ne $PSBoundParameters["Id"]) { + # Define a temporary file path + $Id = $PSBoundParameters["Id"] + $tempFilePath = [System.IO.Path]::GetTempFileName() + + $outFile = $tempFilePath + + if($null -ne $PSBoundParameters["OutputFilePath"]){ + $outFile = $PSBoundParameters["OutputFilePath"] + } + + $V = '$value' + $uri = '/beta/trustframework/policies/'+$Id+'/'+$V + + $response = Invoke-GraphRequest -Headers $customHeaders -Method 'GET' -Uri $uri -OutputFilePath $outFile + + # Read the content from the temporary file + $xmlContent = Get-Content -Path $tempFilePath + + # Display the content if output file path not specified + if($null -eq $PSBoundParameters["OutputFilePath"]){ + $xmlContent + } + + # Clean up the temporary file + Remove-Item -Path $tempFilePath -Force + } + + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 new file mode 100644 index 0000000000..269894b130 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaTrustedCertificateAuthority { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TrustedIssuerSki, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TrustedIssuer, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + $params["OrganizationId"] = (Get-MgContext).TenantId + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["TrustedIssuerSki"]) + { + $trustedIssuerSki = $PSBoundParameters["TrustedIssuerSki"] + } + if($null -ne $PSBoundParameters["TrustedIssuer"]) + { + $trustedIssuer = $PSBoundParameters["TrustedIssuer"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $responseData = Get-MgBetaOrganizationCertificateBasedAuthConfiguration @params -Headers $customHeaders + $response= @() + if($responseData){ + $responseData.CertificateAuthorities | ForEach-Object { + if ( + ([string]::IsNullOrEmpty($TrustedIssuer) -and [string]::IsNullOrEmpty($TrustedIssuerSki)) -or + (![string]::IsNullOrEmpty($TrustedIssuer) -and ![string]::IsNullOrEmpty($TrustedIssuerSki) -and $_.Issuer -eq $TrustedIssuer -and $_.IssuerSki -eq $TrustedIssuerSki) -or + (![string]::IsNullOrEmpty($TrustedIssuer) -and [string]::IsNullOrEmpty($TrustedIssuerSki) -and $_.Issuer -eq $TrustedIssuer) -or + (![string]::IsNullOrEmpty($TrustedIssuerSki) -and [string]::IsNullOrEmpty($TrustedIssuer) -and $_.IssuerSki -eq $TrustedIssuerSki)) + { + $data = @{ + AuthorityType = "IntermediateAuthority" + TrustedCertificate = $_.Certificate + CrlDistributionPoint = $_.CertificateRevocationListUrl + DeltaCrlDistributionPoint = $_.DeltaCertificateRevocationListUrl + TrustedIssuer = $_.Issuer + TrustedIssuerSki = $_.IssuerSki + } + + if($_.IsRootAuthority){ + $data.AuthorityType = "RootAuthority" + } + $dataJson = ConvertTo-Json $data + $response += [Newtonsoft.Json.JsonConvert]::DeserializeObject($dataJson, [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation]) + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 new file mode 100644 index 0000000000..0ed86edf1c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 @@ -0,0 +1,174 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaConditionalAccessPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ModifiedDateTime, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CreatedDateTime, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $State + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ModifiedDateTime"]) + { + $params["ModifiedDateTime"] = $PSBoundParameters["ModifiedDateTime"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["CreatedDateTime"]) + { + $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["Conditions"]) + { + $TmpValue = $PSBoundParameters["Conditions"] + $Value = @{} + $TmpValue.PSObject.Properties | foreach { + $propName = $_.Name + $propValue = $_.Value + if ($propName -eq 'clientAppTypes') { + $Value[$propName] = $propValue + } + elseif ($propValue -is [System.Object]) { + $nestedProps = @{} + $propValue.PSObject.Properties | foreach { + $nestedPropName = $_.Name + $nestedPropValue = $_.Value + $nestedProps[$nestedPropName] = $nestedPropValue + } + $Value[$propName] = $nestedProps + } + } + $params["Conditions"] = $Value + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["GrantControls"]) + { + $TmpValue = $PSBoundParameters["GrantControls"] + $hash = @{} + if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } + if($null -ne $TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } + if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } + if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } + + $Value = $hash + $params["GrantControls"] = $Value + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["SessionControls"]) + { + $TmpValue = $PSBoundParameters["SessionControls"] + $Value = @{} + $TmpValue.PSObject.Properties | foreach { + $propName = $_.Name + $propValue = $_.Value + if ($propValue -is [System.Object]) { + $nestedProps = @{} + $propValue.PSObject.Properties | foreach { + $nestedPropName = $_.Name + $nestedPropValue = $_.Value + $nestedProps[$nestedPropName] = $nestedPropValue + } + $Value[$propName] = $nestedProps + } + } + $params["SessionControls"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaIdentityConditionalAccessPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 new file mode 100644 index 0000000000..2cb5c42dd3 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 @@ -0,0 +1,119 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaFeatureRolloutPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) + { + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) + { + $params["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AppliesTo"]) + { + $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Feature"]) + { + $params["Feature"] = $PSBoundParameters["Feature"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaPolicyFeatureRolloutPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 new file mode 100644 index 0000000000..861aa8265c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaIdentityProvider { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Type, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ClientId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ClientSecret, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Name + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + if($null -ne $PSBoundParameters["Id"]) + { + $params["IdentityProviderBaseId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["Type"]) + { + $body["identityProviderType"] = $PSBoundParameters["Type"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["Name"]) + { + $body["displayName"] = $PSBoundParameters["Name"] + } + if($null -ne $PSBoundParameters["ClientId"]) + { + $body["clientId"] = $PSBoundParameters["ClientId"] + } + if($null -ne $PSBoundParameters["ClientSecret"]) + { + $body["clientSecret"] = $PSBoundParameters["ClientSecret"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + $body["@odata.type"] = "#microsoft.graph.socialIdentityProvider" + $params["BodyParameter"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaIdentityProvider @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName + Add-Member -InputObject $_ -MemberType AliasProperty -Name Type -Value identityProviderType + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 new file mode 100644 index 0000000000..aad5cefb98 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 @@ -0,0 +1,140 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaInvitation { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $SendInvitationMessage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.User] $InvitedUser, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $InvitedUserType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ResetRedemption, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $InvitedUserDisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $InviteRedirectUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $InvitedUserEmailAddress + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["InvitedUser"]) + { + $TmpValue = $PSBoundParameters["InvitedUser"] + $Temp = @{} + foreach ($property in $TmpValue.PSObject.Properties) { + $Temp[$property.Name] = $property.Value + } + $params["InvitedUser"] = $Temp + } + if($null -ne $PSBoundParameters["ResetRedemption"]) + { + $params["ResetRedemption"] = $PSBoundParameters["ResetRedemption"] + } + if($null -ne $PSBoundParameters["InvitedUserMessageInfo"]) + { + $TmpValue = $PSBoundParameters["InvitedUserMessageInfo"] + $Temp = @{} + $Temp["CustomizedMessageBody"] = $TmpValue.CustomizedMessageBody + $Temp["MessageLanguage"] = $TmpValue.MessageLanguage + $Temp["CcRecipients"] = $TmpValue.CcRecipients + $Value = $Temp + $params["InvitedUserMessageInfo"] = $Value + } + if($null -ne $PSBoundParameters["InvitedUserType"]) + { + $params["InvitedUserType"] = $PSBoundParameters["InvitedUserType"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["SendInvitationMessage"]) + { + $params["SendInvitationMessage"] = $PSBoundParameters["SendInvitationMessage"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["InvitedUserEmailAddress"]) + { + $params["InvitedUserEmailAddress"] = $PSBoundParameters["InvitedUserEmailAddress"] + } + if($null -ne $PSBoundParameters["InvitedUserDisplayName"]) + { + $params["InvitedUserDisplayName"] = $PSBoundParameters["InvitedUserDisplayName"] + } + if($null -ne $PSBoundParameters["InviteRedirectUrl"]) + { + $params["InviteRedirectUrl"] = $PSBoundParameters["InviteRedirectUrl"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaInvitation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 new file mode 100644 index 0000000000..b9439f7a4d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 @@ -0,0 +1,136 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaNamedLocationPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $OdataType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsTrusted, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id + ) + + PROCESS { + $body = @{} + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["IncludeUnknownCountriesAndRegions"]) + { + $body["IncludeUnknownCountriesAndRegions"] = $PSBoundParameters["IncludeUnknownCountriesAndRegions"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $body["Id"] = $PSBoundParameters["Id"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["IsTrusted"]) + { + $body["IsTrusted"] = $PSBoundParameters["IsTrusted"] + } + if($null -ne $PSBoundParameters["OdataType"]) + { + $body["@odata.type"] = $PSBoundParameters["OdataType"] + } + if($null -ne $PSBoundParameters["CountriesAndRegions"]) + { + $body["CountriesAndRegions"] = $PSBoundParameters["CountriesAndRegions"] + } + if($null -ne $PSBoundParameters["IpRanges"]) + { + $Tmp = $PSBoundParameters["IpRanges"] + $hash =@() + foreach($i in $Tmp){ + $hash += @{cidrAddress=$i.CidrAddress} + } + $body["IpRanges"] = $hash + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $body["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + $params["BodyParameter"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaIdentityConditionalAccessNamedLocation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + $propsToConvert = @('ipRanges') + try { + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 new file mode 100644 index 0000000000..abfe0e8e8c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 @@ -0,0 +1,80 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaOauth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'CreateExpanded')] + param ( + [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ClientId, + [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true)] + [System.String] $ConsentType, + [Parameter(ParameterSetName = "CreateExpanded")] + [System.String] $PrincipalId, + [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true)] + [System.String] $ResourceId, + [Parameter(ParameterSetName = "CreateExpanded")] + [System.String] $Scope, + [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true)] + [System.Nullable`1[System.DateTime]]$StartTime, + [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true)] + [System.Nullable`1[System.DateTime]]$ExpiryTime + ) + + PROCESS { + $params = @{} + $body = @{} + $params["Uri"] = "https://graph.microsoft.com/beta/oauth2PermissionGrants" + $params["Method"] = "POST" + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ClientId"]) + { + $body["clientId"] = $PSBoundParameters["ClientId"] + } + if($null -ne $PSBoundParameters["ConsentType"]) + { + $body["consentType"] = $PSBoundParameters["ConsentType"] + } + if($null -ne $PSBoundParameters["PrincipalId"]) + { + $body["principalId"] = $PSBoundParameters["PrincipalId"] + } + if($null -ne $PSBoundParameters["ResourceId"]) + { + $body["resourceId"] = $PSBoundParameters["ResourceId"] + } + if($null -ne $PSBoundParameters["Scope"]) + { + $body["scope"] = $PSBoundParameters["Scope"] + } + if($null -ne $PSBoundParameters["ExpiryTime"]) + { + $body["expiryTime"] = $PSBoundParameters["ExpiryTime"] + } + if($null -ne $PSBoundParameters["StartTime"]) + { + $body["startTime"] = $PSBoundParameters["StartTime"] + } + $params["Body"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + if($response){ + $response = $response | ConvertTo-Json | ConvertFrom-Json + $response | ForEach-Object { + if ($null -ne $_) { + $userData = [Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphOAuth2PermissionGrant]::new() + $_.PSObject.Properties | ForEach-Object { + $userData | Add-Member -MemberType NoteProperty -Name $_.Name -Value $_.Value -Force + } + } + } + $userData + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 new file mode 100644 index 0000000000..bc3aad0100 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 @@ -0,0 +1,146 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaPermissionGrantConditionSet { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionClassification, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Permissions, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ResourceApplication, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["PermissionType"]) + { + $params["PermissionType"] = $PSBoundParameters["PermissionType"] + } + if($null -ne $PSBoundParameters["PermissionClassification"]) + { + $params["PermissionClassification"] = $PSBoundParameters["PermissionClassification"] + } + if($null -ne $PSBoundParameters["ResourceApplication"]) + { + $params["ResourceApplication"] = $PSBoundParameters["ResourceApplication"] + } + if($null -ne $PSBoundParameters["Permissions"]) + { + $params["Permissions"] = $PSBoundParameters["Permissions"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ClientApplicationTenantIds"]) + { + $params["ClientApplicationTenantIds"] = $PSBoundParameters["ClientApplicationTenantIds"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($null -ne $PSBoundParameters["ConditionSetType"]) + { + $conditionalSet = $PSBoundParameters["ConditionSetType"] + } + if($null -ne $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"]) + { + $params["ClientApplicationsFromVerifiedPublisherOnly"] = $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"] + } + if($null -ne $PSBoundParameters["ClientApplicationPublisherIds"]) + { + $params["ClientApplicationPublisherIds"] = $PSBoundParameters["ClientApplicationPublisherIds"] + } + if($null -ne $PSBoundParameters["ClientApplicationIds"]) + { + $params["ClientApplicationIds"] = $PSBoundParameters["ClientApplicationIds"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + + if("$conditionalSet" -eq "includes"){ + $response = New-MgBetaPolicyPermissionGrantPolicyInclude @params -Headers $customHeaders + } + elseif("$conditionalSet" -eq "excludes"){ + $response = New-MgBetaPolicyPermissionGrantPolicyExclude @params -Headers $customHeaders + } + else{ + Write-Error("Message: Resource not found for the segment '$conditionalSet'.") + return + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 new file mode 100644 index 0000000000..f2aabeaece --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaPermissionGrantPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaPolicyPermissionGrantPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 new file mode 100644 index 0000000000..aea901302a --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Type, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AlternativeIdentifier, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[System.String]] $Definition, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsOrganizationDefault + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Type"] = $Type + $respType = $null + + if($params.type -eq "activityBasedTimeoutPolicy" ) { + $params.type = "activityBasedTimeoutPolicies" + $respType = New-Object -TypeName Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphActivityBasedTimeoutPolicy + } + elseif ($params.type -eq "appManagementPolicy") { + $params.type = "appManagementPolicies" + $respType = New-Object -TypeName Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAppManagementPolicy + } + elseif ($params.type -eq "claimsMappingPolicies") { + $params.type = "claimsMappingPolicies" + $respType = New-Object -TypeName Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphClaimsMappingPolicy + } + elseif ($params.type -eq "featureRolloutPolicy") { + $params.type = "featureRolloutPolicies" + $respType = New-Object -TypeName Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy + } + elseif ($params.type -eq "HomeRealmDiscoveryPolicy") { + $params.type = "homeRealmDiscoveryPolicies" + $respType = New-Object -TypeName Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphHomeRealmDiscoveryPolicy + } + elseif ($params.type -eq "tokenIssuancePolicy") { + $params.type = "tokenIssuancePolicies" + $respType = New-Object -TypeName Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTokenIssuancePolicy + } + elseif ($params.type -eq "tokenLifetimePolicy") { + $params.type = "tokenLifetimePolicies" + $respType = New-Object -TypeName Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphTokenLifetimePolicy + } + elseif ($params.type -eq "permissionGrantPolicy") { + $params.type = "permissionGrantPolicies" + $respType = New-Object -TypeName Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphPermissionGrantPolicy + } + + $params["Uri"] = "https://graph.microsoft.com/beta/policies/" + $params.type + $Definition =$PSBoundParameters["Definition"] + $DisplayName=$PSBoundParameters["DisplayName"] + $AlternativeIdentifier = $PSBoundParameters["AlternativeIdentifier"] + $KeyCredentials = $PSBoundParameters["KeyCredentials"] + $IsOrganizationDefault =$PSBoundParameters["IsOrganizationDefault"] + $params["Method"] = "POST" + + $body = @{ + Definition = $Definition + DisplayName = $DisplayName + IsOrganizationDefault = $IsOrganizationDefault + AlternativeIdentifier =$AlternativeIdentifier + KeyCredentials = $KeyCredentials + Type = $Type + } + $body = $body | ConvertTo-Json + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $params.uri -Method $params.method -Body $body | ConvertTo-Json | ConvertFrom-Json + + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $respType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + + } + + $respType + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 new file mode 100644 index 0000000000..26818bcb79 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 @@ -0,0 +1,54 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaTrustFrameworkPolicy { + [CmdletBinding(DefaultParameterSetName = 'Content')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "Content")] + [Parameter(ParameterSetName = "File")] + [System.String] $OutputFilePath, + + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $InputFilePath, + + [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Content + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + # Define a temporary file path + $tempFilePath = [System.IO.Path]::GetTempFileName() + + $outFile = $tempFilePath + + if($null -ne $PSBoundParameters["OutputFilePath"]){ + $outFile = $PSBoundParameters["OutputFilePath"] + } + + $Body = $PSBoundParameters["Content"] + + if($null -ne $PSBoundParameters["InputFilePath"]) { + $Body = Get-Content -Path $PSBoundParameters["InputFilePath"] + } + + $uri = '/beta/trustframework/policies' + + Invoke-GraphRequest -Headers $customHeaders -Method 'POST' -ContentType 'application/xml' -Uri $uri -Body $Body -OutputFilePath $outFile + + # Read the content from the temporary file + # Display the content if output file path not specified + if($null -eq $PSBoundParameters["OutputFilePath"]){ + $xmlContent = Get-Content -Path $tempFilePath + $xmlContent + } + + # Clean up the temporary file + Remove-Item -Path $tempFilePath -Force + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 new file mode 100644 index 0000000000..4420243b7b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaTrustedCertificateAuthority { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $tenantId = (Get-MgContext).TenantId + $params["Uri"] = "/beta/organization/$tenantId/certificateBasedAuthConfiguration" + $params["Method"] = "POST" + $newCert = $PSBoundParameters["CertificateAuthorityInformation"] + $previousCerts = @() + Get-EntraBetaTrustedCertificateAuthority | ForEach-Object { + $previousCerts += $_ + if(($_.TrustedIssuer -eq $newCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $newCert.TrustedIssuerSki)){ + Throw [System.Management.Automation.PSArgumentException] "A certificate already exists on the server with associated trustedIssuer and trustedIssuerSki fields." + } + } + $previousCerts += $newCert + $body = @{ + certificateAuthorities = @() + } + $previousCerts | ForEach-Object { + $isRoot = $false + if("RootAuthority" -eq $_.AuthorityType){ + $isRoot = $true + } + $cert = @{ + isRootAuthority = $isRoot + certificateRevocationListUrl = $_.CrlDistributionPoint + deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint + certificate = [convert]::tobase64string($_.TrustedCertificate) + } + $body.certificateAuthorities += $cert + } + $params["Body"] = ConvertTo-Json $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest @params -Headers $customHeaders + + $customObject = [PSCustomObject]@{ + "@odata.context" = $response["@odata.context"] + certificateAuthorities = @{ + AuthorityType = if ($response.certificateAuthorities.isRootAuthority) { "RootAuthority" } else { "" } + CrlDistributionPoint = $response.certificateAuthorities.certificateRevocationListUrl + DeltaCrlDistributionPoint = $response.certificateAuthorities.deltaCertificateRevocationListUrl + TrustedCertificate = [Convert]::FromBase64String($response.certificateAuthorities.certificate) + TrustedIssuer = $response.certificateAuthorities.issuer + TrustedIssuerSki = $response.certificateAuthorities.issuerSki + } + Id = $response.id + } + $customObject = $customObject | ConvertTo-Json -depth 5 | ConvertFrom-Json + $certificateList = @() + + foreach ($certAuthority in $customObject) { + $certificateType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphCertificateBasedAuthConfiguration + $certAuthority.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + Add-Member -InputObject $certificateType -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $certificateList += $certificateType + } + $certificateList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 new file mode 100644 index 0000000000..097bdad52b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaConditionalAccessPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaIdentityConditionalAccessPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 new file mode 100644 index 0000000000..4d350076f8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaFeatureRolloutPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaPolicyFeatureRolloutPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 new file mode 100644 index 0000000000..5f8095a94b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaFeatureRolloutPolicyDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 new file mode 100644 index 0000000000..b4217f874b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaIdentityProvider { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $IdentityProviderBaseId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + { + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaIdentityProvider @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 new file mode 100644 index 0000000000..51025be063 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaNamedLocationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaIdentityConditionalAccessNamedLocation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 new file mode 100644 index 0000000000..62c20b9842 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaOAuth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaOAuth2PermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 new file mode 100644 index 0000000000..78b116ec91 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaPermissionGrantConditionSet { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["ConditionSetType"]) + { + $conditionalSet = $PSBoundParameters["ConditionSetType"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + + if("$conditionalSet" -eq "includes"){ + $response = Remove-MgBetaPolicyPermissionGrantPolicyInclude @params -Headers $customHeaders + } + elseif("$conditionalSet" -eq "excludes"){ + $response = Remove-MgBetaPolicyPermissionGrantPolicyExclude @params -Headers $customHeaders + } + else{ + Write-Error("Message: Resource not found for the segment '$conditionalSet'.") + return + } + + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 new file mode 100644 index 0000000000..fbfbbab1de --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaPermissionGrantPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaPolicyPermissionGrantPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 new file mode 100644 index 0000000000..976c656265 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 @@ -0,0 +1,40 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $array = ("activityBasedTimeoutPolicies", "defaultAppManagementPolicy", "appManagementPolicies", "authenticationFlowsPolicy", "authenticationMethodsPolicy", "claimsMappingPolicies", "featureRolloutPolicies", "homeRealmDiscoveryPolicies", "permissionGrantPolicies", "tokenIssuancePolicies", "tokenLifetimePolicies") + + foreach ($a in $array) { + $uri = "https://graph.microsoft.com/beta/policies/" + $a + "/" + $id + try { + $response = Invoke-GraphRequest -Uri $uri -Method GET + break + } + catch {} + } + $policy = ($response.'@odata.context') -match 'policies/([^/]+)/\$entity' + + $type = $Matches[1] + if (($null -ne $PSBoundParameters["id"]) -and ($null -ne $type )) { + $URI = "https://graph.microsoft.com/beta/policies/" + $type + "/" + $id + } + $Method = "DELETE" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 new file mode 100644 index 0000000000..d041c7b970 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 @@ -0,0 +1,34 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaServicePrincipalPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["Id"]) { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) { + $params["PolicyId"] = $PSBoundParameters["PolicyId"] + } + $Method = "DELETE" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $URI = 'https://graph.microsoft.com/beta/serviceprincipals/{0}/policies/{1}/$ref' -f $Id,$PolicyId + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 new file mode 100644 index 0000000000..3557ccdccf --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaTrustFrameworkPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["TrustFrameworkPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaTrustFrameworkPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 new file mode 100644 index 0000000000..bbbe9b17a9 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaTrustedCertificateAuthority { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $tenantId = (Get-MgContext).TenantId + $params["Uri"] = "/beta/organization/$tenantId/certificateBasedAuthConfiguration" + $params["Method"] = "POST" + $certNotFound = $true + $modifiedCert = $PSBoundParameters["CertificateAuthorityInformation"] + $previousCerts = @() + Get-EntraBetaTrustedCertificateAuthority | ForEach-Object { + if(($_.TrustedIssuer -eq $modifiedCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $modifiedCert.TrustedIssuerSki)){ + $certNotFound = $false + } + else{ + $previousCerts += $_ + } + } + if($certNotFound){ + Throw [System.Management.Automation.PSArgumentException] "Provided certificate authority not found on the server. Please make sure you have provided the correct information in trustedIssuer and trustedIssuerSki fields." + } + $body = @{ + certificateAuthorities = @() + } + $previousCerts | ForEach-Object { + $isRoot = $false + if("RootAuthority" -eq $_.AuthorityType){ + $isRoot = $true + } + $cert = @{ + isRootAuthority = $isRoot + certificateRevocationListUrl = $_.CrlDistributionPoint + deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint + certificate = [convert]::tobase64string($_.TrustedCertificate) + } + $body.certificateAuthorities += $cert + } + $params["Body"] = ConvertTo-Json $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $certificateList = @() + foreach ($data in $response) { + $certificateType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphCertificateBasedAuthConfiguration + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $certificateType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $certificateList += $certificateType + } + $certificateList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 new file mode 100644 index 0000000000..3a37dd8b95 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 @@ -0,0 +1,161 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaAuthorizationPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $PermissionGrantPolicyIdsAssignedToDefaultUserRole, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $EnabledPreviewFeatures, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GuestUserRoleId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["AuthorizationPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"]) + { + $params["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] = $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) + { + $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["EnabledPreviewFeatures"]) + { + $params["EnabledPreviewFeatures"] = $PSBoundParameters["EnabledPreviewFeatures"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) + { + $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) + { + $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] + } + if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) + { + $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) + { + $TmpValue = $PSBoundParameters["DefaultUserRolePermissions"] + $hash = @{} + $hash["AllowedToCreateApps"] = $TmpValue.AllowedToCreateApps + $hash["AllowedToCreateSecurityGroups"] = $TmpValue.AllowedToCreateSecurityGroups + $hash["AllowedToReadOtherUsers"] = $TmpValue.AllowedToReadOtherUsers + + $Value = $hash + $params["DefaultUserRolePermissions"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["GuestUserRoleId"]) + { + $params["GuestUserRoleId"] = $PSBoundParameters["GuestUserRoleId"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaPolicyAuthorizationPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 new file mode 100644 index 0000000000..001908caf7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 @@ -0,0 +1,211 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaConditionalAccessPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ModifiedDateTime, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CreatedDateTime, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $State + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ModifiedDateTime"]) + { + $params["ModifiedDateTime"] = $PSBoundParameters["ModifiedDateTime"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["CreatedDateTime"]) + { + $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["PolicyId"]) + { + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($null -ne $PSBoundParameters["Conditions"]) + { + $TmpValue = $PSBoundParameters["Conditions"] + if($TmpValue.Applications){ + $Applications=@{} + $Applications["IncludeApplications"] = $TmpValue.Applications.IncludeApplications + $Applications["ExcludeApplications"] = $TmpValue.Applications.ExcludeApplications + $Applications["IncludeUserActions"] = $TmpValue.Applications.IncludeUserActions + $Applications["IncludeProtectionLevels"] = $TmpValue.Applications.IncludeProtectionLevels + } + if($TmpValue.Locations){ + $Locations = @{} + $Locations["IncludeLocations"] = $TmpValue.Locations.IncludeLocations + $Locations["ExcludeLocations"] = $TmpValue.Locations.ExcludeLocations + } + if($TmpValue.Platforms){ + $Platforms = @{} + $Platforms["IncludePlatforms"] = $TmpValue.Platforms.IncludePlatforms + $Platforms["ExcludePlatforms"] = $TmpValue.Platforms.ExcludePlatforms + } + if($TmpValue.Users){ + $Users = @{} + $Users["IncludeUsers"] = $TmpValue.Users.IncludeUsers + $Users["ExcludeUsers"] = $TmpValue.Users.ExcludeUsers + $Users["IncludeGroups"] = $TmpValue.Users.IncludeGroups + $Users["ExcludeGroups"] = $TmpValue.Users.ExcludeGroups + $Users["IncludeRoles"] = $TmpValue.Users.IncludeRoles + $Users["ExcludeRoles"] = $TmpValue.Users.ExcludeRoles + } + + $hash = @{} + if($TmpValue.Applications) {$hash["Applications"] = $Applications } + if($TmpValue.ClientAppTypes) { $hash["ClientAppTypes"] = $TmpValue.ClientAppTypes } + if($TmpValue.Locations) { $hash["Locations"] = $Locations } + if($TmpValue.Platforms) { $hash["Platforms"] = $Platforms } + if($TmpValue.SignInRiskLevels) { $hash["SignInRiskLevels"] = $TmpValue.SignInRiskLevels } + if($TmpValue.Users) { $hash["Users"] = $Users } + $Value = $hash + $params["Conditions"] = $Value + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["GrantControls"]) + { + $TmpValue = $PSBoundParameters["GrantControls"] + $hash = @{} + if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } + if($TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } + if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } + if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } + $Value = $hash + $params["GrantControls"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["SessionControls"]) + { + $TmpValue = $PSBoundParameters["SessionControls"] + if($TmpValue.ApplicationEnforcedRestrictions){ + $ApplicationEnforcedRestrictions = @{} + $ApplicationEnforcedRestrictions["IsEnabled"] = $TmpValue.ApplicationEnforcedRestrictions.IsEnabled + } + if($TmpValue.CloudAppSecurity){ + $CloudAppSecurity = @{} + $CloudAppSecurity["IsEnabled"] = $TmpValue.CloudAppSecurity.IsEnabled + $CloudAppSecurity["CloudAppSecurityType"] = $TmpValue.CloudAppSecurity.CloudAppSecurityType + } + if($TmpValue.PersistentBrowser){ + $PersistentBrowser = @{} + $PersistentBrowser["IsEnabled"] = $TmpValue.PersistentBrowser.IsEnabled + $PersistentBrowser["Mode"] = $TmpValue.PersistentBrowser.Mode + } + if($TmpValue.SignInFrequency){ + $SignInFrequency = @{} + $SignInFrequency["IsEnabled"] = $TmpValue.SignInFrequency.IsEnabled + $SignInFrequency["Type"] = $TmpValue.SignInFrequency.Type + $SignInFrequency["Value"] = $TmpValue.SignInFrequency.Value + } + + $hash = @{} + if($TmpValue.ApplicationEnforcedRestrictions) { $hash["ApplicationEnforcedRestrictions"] = $ApplicationEnforcedRestrictions } + if($TmpValue.CloudAppSecurity) { $hash["CloudAppSecurity"] = $CloudAppSecurity } + if($TmpValue.SignInFrequency) { $hash["SignInFrequency"] = $SignInFrequency } + if($TmpValue.PersistentBrowser) { $hash["PersistentBrowser"] = $PersistentBrowser } + $Value = $hash + $params["SessionControls"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaIdentityConditionalAccessPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 new file mode 100644 index 0000000000..ab37100724 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaFeatureRolloutPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsEnabled + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) + { + $params["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AppliesTo"]) + { + $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Feature"]) + { + $params["Feature"] = $PSBoundParameters["Feature"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) + { + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaPolicyFeatureRolloutPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 new file mode 100644 index 0000000000..779209f8fe --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaIdentityProvider { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Type, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ClientSecret, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $IdentityProviderBaseId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ClientId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Name + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + if($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + { + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + } + if($null -ne $PSBoundParameters["Type"]) + { + $body["identityProviderType"] = $PSBoundParameters["Type"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Name"]) + { + $body["displayName"] = $PSBoundParameters["Name"] + } + if($null -ne $PSBoundParameters["ClientId"]) + { + $body["clientId"] = $PSBoundParameters["ClientId"] + } + if($null -ne $PSBoundParameters["ClientSecret"]) + { + $body["clientSecret"] = $PSBoundParameters["ClientSecret"] + } + $body["@odata.type"] = "#microsoft.graph.socialIdentityProvider" + $params["BodyParameter"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaIdentityProvider @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 new file mode 100644 index 0000000000..23873079b9 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 @@ -0,0 +1,135 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaNamedLocationPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $OdataType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsTrusted, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Id + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $body = @{} + if($null -ne $PSBoundParameters["IncludeUnknownCountriesAndRegions"]) + { + $body["IncludeUnknownCountriesAndRegions"] = $PSBoundParameters["IncludeUnknownCountriesAndRegions"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $body["Id"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["IsTrusted"]) + { + $body["IsTrusted"] = $PSBoundParameters["IsTrusted"] + } + if($null -ne $PSBoundParameters["OdataType"]) + { + $body["@odata.type"] = $PSBoundParameters["OdataType"] + } + if($null -ne $PSBoundParameters["CountriesAndRegions"]) + { + $body["CountriesAndRegions"] = $PSBoundParameters["CountriesAndRegions"] + } + if($null -ne $PSBoundParameters["IpRanges"]) + { + $Tmp = $PSBoundParameters["IpRanges"] + $hash =@() + foreach($i in $Tmp){ + $hash += @{cidrAddress=$i.CidrAddress} + } + $body["IpRanges"] = $hash + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $body["DisplayName"] = $PSBoundParameters["DisplayName"] + } + + $params["BodyParameter"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaIdentityConditionalAccessNamedLocation @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 new file mode 100644 index 0000000000..c7dc4d01c0 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 @@ -0,0 +1,154 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaPermissionGrantConditionSet { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Permissions, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PermissionClassification, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ResourceApplication, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ClientApplicationTenantIds"]) + { + $params["ClientApplicationTenantIds"] = $PSBoundParameters["ClientApplicationTenantIds"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"]) + { + $params["ClientApplicationsFromVerifiedPublisherOnly"] = $PSBoundParameters["ClientApplicationsFromVerifiedPublisherOnly"] + } + if($null -ne $PSBoundParameters["ClientApplicationPublisherIds"]) + { + $params["ClientApplicationPublisherIds"] = $PSBoundParameters["ClientApplicationPublisherIds"] + } + if($null -ne $PSBoundParameters["PermissionType"]) + { + $params["PermissionType"] = $PSBoundParameters["PermissionType"] + } + if($null -ne $PSBoundParameters["ConditionSetType"]) + { + $conditionalSet = $PSBoundParameters["ConditionSetType"] + } + if($null -ne $PSBoundParameters["Permissions"]) + { + $params["Permissions"] = $PSBoundParameters["Permissions"] + } + if($null -ne $PSBoundParameters["ClientApplicationIds"]) + { + $params["ClientApplicationIds"] = $PSBoundParameters["ClientApplicationIds"] + } + if($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantConditionSetId"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["ResourceApplication"]) + { + $params["ResourceApplication"] = $PSBoundParameters["ResourceApplication"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["PermissionClassification"]) + { + $params["PermissionClassification"] = $PSBoundParameters["PermissionClassification"] + } + if($null -ne $PSBoundParameters["PolicyId"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["PolicyId"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + if("$conditionalSet" -eq "includes"){ + $response = Update-MgBetaPolicyPermissionGrantPolicyInclude @params -Headers $customHeaders + } + elseif("$conditionalSet" -eq "excludes"){ + $response = Update-MgBetaPolicyPermissionGrantPolicyExclude @params -Headers $customHeaders + } + else{ + Write-Error("Message: Resource not found for the segment '$conditionalSet'.") + return + } + + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 new file mode 100644 index 0000000000..564ffd9d56 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaPermissionGrantPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["Description"]) + { + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaPolicyPermissionGrantPolicy @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 new file mode 100644 index 0000000000..0b75488400 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaPolicy { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AlternativeIdentifier, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Definition, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Type, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsOrganizationDefault + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + $policyTypeMap = @{ + "ActivityBasedTimeoutPolicy" = "activityBasedTimeoutPolicies" + "ApplicationManagementPolicy" = "appManagementPolicies" + "DefaultAppManagementPolicy" = "defaultAppManagementPolicy" + "AuthenticationFlowsPolicy" = "authenticationFlowsPolicy" + "AuthenticationMethodsPolicy" = "authenticationMethodsPolicy" + "ClaimsMappingPolicy" = "claimsMappingPolicies" + "FeatureRolloutPolicy" = "featureRolloutPolicies" + "HomeRealmDiscoveryPolicy" = "homeRealmDiscoveryPolicies" + "PermissionGrantPolicy" = "permissionGrantPolicies" + "TokenIssuancePolicy" = "tokenIssuancePolicies" + "TokenLifetimePolicy" = "tokenLifetimePolicies" + } + + $policyTypes = $policyTypeMap.Values + + if ($null -ne $PSBoundParameters["type"]) { + $type = if ($policyTypeMap.ContainsKey($type)) { $policyTypeMap[$type] } else { + Write-Error "Set-EntraBetADPolicy : Error occurred while executing SetPolicy + Code: Request_BadRequest + Message: Invalid value specified for property 'type' of resource 'Policy'." + return; + } + } else { + $type = $null + } + + if(!$type) { + foreach ($pType in $policyTypes) { + $uri = "https://graph.microsoft.com/beta/policies/" + $pType + "/" + $id + try { + $response = Invoke-GraphRequest -Uri $uri -Method GET + break + } + catch {} + } + $policy = ($response.'@odata.context') -match 'policies/([^/]+)/\$entity' + $type = $Matches[1] + } + + if($policyTypes -notcontains $type) { + Write-Error "Set-EntraBetADPolicy : Error occurred while executing SetPolicy + Code: Request_BadRequest + Message: Invalid value specified for property 'type' of resource 'Policy'." + } + else { + if ($null -ne $PSBoundParameters["Definition"]) { + $params["Definition"] = $PSBoundParameters["Definition"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["Definition"]) { + $params["Definition"] = $PSBoundParameters["Definition"] + } + if ($null -ne $PSBoundParameters["IsOrganizationDefault"]) { + $params["IsOrganizationDefault"] = $PSBoundParameters["IsOrganizationDefault"] + } + if (($null -ne $PSBoundParameters["id"]) -and ($null -ne $type )) { + $URI = "https://graph.microsoft.com/beta/policies/" + $type + "/" + $id + } + if ($null -ne $PSBoundParameters["IsOrganizationDefault"]) { + $params["IsOrganizationDefault"] = $PSBoundParameters["IsOrganizationDefault"] + } + $Method = "PATCH" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $body = $params | ConvertTo-Json + Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Body $body -Method $Method + } + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 new file mode 100644 index 0000000000..bb6ea05195 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaTrustFrameworkPolicy { + [CmdletBinding(DefaultParameterSetName = 'Content')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "Content")] + [Parameter(ParameterSetName = "File")] + [System.String] $Id, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "Content")] + [Parameter(ParameterSetName = "File")] + [System.String] $OutputFilePath, + + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $InputFilePath, + + [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Content + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + # Define a temporary file path + $tempFilePath = [System.IO.Path]::GetTempFileName() + + $outFile = $tempFilePath + + if($null -ne $PSBoundParameters["OutputFilePath"]){ + $outFile = $PSBoundParameters["OutputFilePath"] + } + + $Body = $PSBoundParameters["Content"] + + if($null -ne $PSBoundParameters["InputFilePath"]) { + $Body = Get-Content -Path $PSBoundParameters["InputFilePath"] + } + + $Id = $PSBoundParameters["Id"] + + $V = '$value' + $uri = '/beta/trustframework/policies/'+$Id+'/'+$V + + Invoke-GraphRequest -Headers $customHeaders -Method 'PUT' -ContentType 'application/xml' -Uri $uri -Body $Body -OutputFilePath $outFile + + # Read the content from the temporary file + # Display the content if output file path not specified + if($null -eq $PSBoundParameters["OutputFilePath"]){ + $xmlContent = Get-Content -Path $tempFilePath + $xmlContent + } + + # Clean up the temporary file + Remove-Item -Path $tempFilePath -Force + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 new file mode 100644 index 0000000000..fb607806ca --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaTrustedCertificateAuthority { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation] $CertificateAuthorityInformation + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $tenantId = (Get-MgContext).TenantId + $params["Uri"] = "/beta/organization/$tenantId/certificateBasedAuthConfiguration" + $params["Method"] = "POST" + $certNotFound = $true + $modifiedCert = $PSBoundParameters["CertificateAuthorityInformation"] + $previusCerts = @() + Get-EntraBetaTrustedCertificateAuthority | ForEach-Object { + if(($_.TrustedIssuer -eq $modifiedCert.TrustedIssuer) -and ($_.TrustedIssuerSki -eq $modifiedCert.TrustedIssuerSki)){ + $previusCerts += $modifiedCert + $certNotFound = $false + } + else{ + $previusCerts += $_ + } + } + if($certNotFound){ + Throw [System.Management.Automation.PSArgumentException] "Provided certificate authority not found on the server. Please make sure you have provided the correct information in trustedIssuer and trustedIssuerSki fields." + } + $body = @{ + certificateAuthorities = @() + } + $previusCerts | ForEach-Object { + $isRoot = $false + if("RootAuthority" -eq $_.AuthorityType){ + $isRoot = $true + } + $cert = @{ + isRootAuthority = $isRoot + certificateRevocationListUrl = $_.CrlDistributionPoint + deltaCertificateRevocationListUrl = $_.DeltaCrlDistributionPoint + certificate = [convert]::tobase64string($_.TrustedCertificate) + } + $body.certificateAuthorities += $cert + } + $params["Body"] = ConvertTo-Json $body + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest @params -Headers $customHeaders + + $customObject = [PSCustomObject]@{ + "@odata.context" = $response["@odata.context"] + certificateAuthorities = @{ + AuthorityType = if ($response.certificateAuthorities.isRootAuthority) { "RootAuthority" } else { "" } + CrlDistributionPoint = $response.certificateAuthorities.certificateRevocationListUrl + DeltaCrlDistributionPoint = $response.certificateAuthorities.deltaCertificateRevocationListUrl + TrustedCertificate = [Convert]::FromBase64String($response.certificateAuthorities.certificate) + TrustedIssuer = $response.certificateAuthorities.issuer + TrustedIssuerSki = $response.certificateAuthorities.issuerSki + } + Id = $response.id + } + $customObject = $customObject | ConvertTo-Json -depth 5 | ConvertFrom-Json + $certificateList = @() + + foreach ($certAuthority in $customObject) { + $certificateType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphCertificateBasedAuthConfiguration + $certAuthority.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + Add-Member -InputObject $certificateType -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $certificateList += $certificateType + } + $certificateList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 new file mode 100644 index 0000000000..269da30da2 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 @@ -0,0 +1,140 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUser { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias("ObjectId")] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $topCount = $null + $upnPresent = $false + $baseUri = 'https://graph.microsoft.com/beta/users' + $properties = $null + $params["Method"] = "GET" + $params["Uri"] = "$baseUri" + $query = $null + + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $query = "$properties" + } + + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + if ($topCount -gt 999) { + $query += "&`$top=999" + } + else{ + $query += "&`$top=$topCount" + } + } + + if($null -ne $PSBoundParameters["SearchString"]) + { + $TmpValue = $PSBoundParameters["SearchString"] + $SearchString = "`$search=`"userprincipalname:$TmpValue`" OR `"state:$TmpValue`" OR `"mailNickName:$TmpValue`" OR `"mail:$TmpValue`" OR `"jobTitle:$TmpValue`" OR `"displayName:$TmpValue`" OR `"department:$TmpValue`" OR `"country:$TmpValue`" OR `"city:$TmpValue`"" + $query += "&$SearchString" + $customHeaders['ConsistencyLevel'] = 'eventual' + } + if($null -ne $PSBoundParameters["UserId"]) + { + $UserId = $PSBoundParameters["UserId"] + if ($UserId -match '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'){ + $f = '$' + 'Filter' + $Filter = "UserPrincipalName eq '$UserId'" + $query += "&$f=$Filter" + $upnPresent = $true + } + else{ + $params["Uri"] = "$baseUri/$($UserId)" + } + } + if($null -ne $PSBoundParameters["Filter"]) + { + $Filter = $PSBoundParameters["Filter"] + $f = '$' + 'Filter' + $query += "&$f=$Filter" + } + + if($null -ne $query) + { + $query = "?" + $query.TrimStart("&") + $params["Uri"] += $query + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + if ($upnPresent -and ($null -eq $response.value -or $response.value.Count -eq 0)){ + Write-Error "Resource '$UserId' does not exist or one of its queried reference-property objects are not present. + +Status: 404 (NotFound) +ErrorCode: Request_ResourceNotFound" + } + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + try { + $data = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $all = $All.IsPresent + $increment = $topCount - $data.Count + while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { + $params["Uri"] = $response.'@odata.nextLink' + if ($increment -gt 0) { + $topValue = [Math]::Min($increment, 999) + $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $increment -= $topValue + } + $response = Invoke-GraphRequest @params + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } catch {} + $data | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserState -Value ExternalUserState + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserStateChangedOn -Value ExternalUserStateChangeDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ImmutableId -Value onPremisesImmutableId + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value onPremisesProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + } + } + $userList = @() + foreach ($response in $data) { + $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphUser + $response.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 new file mode 100644 index 0000000000..4ed9a5953f --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaUserAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 new file mode 100644 index 0000000000..c6407d6e57 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserCreatedObject { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaUserCreatedObject @params -Headers $customHeaders + $properties = @{ + ObjectId = "Id" + DeletionTimestamp = "deletedDateTime" + AppOwnerTenantId = "appOwnerOrganizationId" + } + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + foreach ($prop in $properties.GetEnumerator()) { + $propertyName = $prop.Name + $propertyValue = $prop.Value + if ($_.PSObject.Properties.Match($propertyName)) { + $_ | Add-Member -MemberType AliasProperty -Name $propertyName -Value $propertyValue + } + } + $propsToConvert = @('keyCredentials','passwordCredentials','requiredResourceAccess') + foreach ($prop in $propsToConvert) { + try { + if($_.PSObject.Properties.Match($prop)) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + catch {} + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 new file mode 100644 index 0000000000..e46289fd78 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserDirectReport { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $topCount = $null + $baseUri = 'https://graph.microsoft.com/beta/users' + $properties = '$select=*' + $Method = "GET" + + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + $URI = "$baseUri/$($params.UserId)/directReports?$properties" + } + + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.UserId)/directReports?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + $URI = "$baseUri/$($params.UserId)/directReports?`$top=$topCount&$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + $targetList = @() + foreach ($res in $data) { + $targetType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $targetType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetList += $targetType + } + $targetList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 new file mode 100644 index 0000000000..c31b568679 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserExtension { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = "https://graph.microsoft.com/beta/users/$UserId" + $properties = '$select=Identities,OnPremisesDistinguishedName,EmployeeId,CreatedDateTime' + $params["Uri"] = "$baseUri/?$properties" + + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $params["Uri"] = "$baseUri/?$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $data = Invoke-GraphRequest -Uri $($params.Uri) -Method GET -Headers $customHeaders | Convertto-json | convertfrom-json + $data | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name userIdentities -Value identities + } + } + $data + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 new file mode 100644 index 0000000000..e33fb1728c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserLicenseDetail { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaUserLicenseDetail @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 new file mode 100644 index 0000000000..df686c55e7 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserManager { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [ALias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Get-MgBetaUserManager @params -Headers $customHeaders -ErrorAction Stop + try { + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + $targetList = @() + foreach ($res in $data) { + $targetType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $targetType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetList += $targetType + } + $targetList + } + catch {} + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 new file mode 100644 index 0000000000..d948a39fcb --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserMembership { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaUserMemberOf @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 new file mode 100644 index 0000000000..4891cdff65 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserOAuth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaUserOAuth2PermissionGrant @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 new file mode 100644 index 0000000000..b21e3da098 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserOwnedDevice { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaUserOwnedDevice @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('AdditionalProperties') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 new file mode 100644 index 0000000000..7dac4cb34c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserOwnedObject { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $Method = "GET" + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["UserId"]) { + $params["UserId"] = $PSBoundParameters["UserId"] + } + + $URI = "/beta/users/$($params.UserId)/ownedObjects/?" + + if ($PSBoundParameters.ContainsKey("Top")) + { + $URI += "&`$top=$Top" + } + + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $URI += "&$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method).value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + $targetList = @() + foreach ($res in $response) { + $targetType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $targetType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $targetList += $targetType + } + $targetList + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 new file mode 100644 index 0000000000..6099ad0810 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserRegisteredDevice { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaUserRegisteredDevice @params -Headers $customHeaders + $response | ForEach-Object { + if ($null -ne $_) { + $propsToConvert = @('AdditionalProperties') + foreach ($prop in $propsToConvert) { + $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force + } + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 new file mode 100644 index 0000000000..75733bcda8 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 @@ -0,0 +1,111 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserThumbnailPhoto { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FileName, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $View, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["FileName"]) + { + $params["FileName"] = $PSBoundParameters["FileName"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["FilePath"]) + { + $params["FilePath"] = $PSBoundParameters["FilePath"] + } + if ($null -ne $PSBoundParameters["View"]) + { + $params["View"] = $PSBoundParameters["View"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($null -ne $PSBoundParameters["Property"]) + { + $params["Property"] = $PSBoundParameters["Property"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Get-MgBetaUserPhoto @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 new file mode 100644 index 0000000000..5ff9fb5915 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 @@ -0,0 +1,287 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaUser { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CompanyName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Surname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $JobTitle, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ImmutableId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AgeGroup, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GivenName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $OtherMails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TelephoneNumber, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ConsentProvidedForMinor, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $City, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ShowInAddressList, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserPrincipalName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $FacsimileTelephoneNumber, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MailNickName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserStateChangedOn, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Country, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PostalCode, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UsageLocation, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Mobile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Department, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PreferredLanguage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompromised, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PhysicalDeliveryOfficeName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CreationType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $StreetAddress, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $State, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PasswordPolicies + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["PostalCode"]) + { + $params["PostalCode"] = $PSBoundParameters["PostalCode"] + } + if($null -ne $PSBoundParameters["MailNickName"]) + { + $params["MailNickName"] = $PSBoundParameters["MailNickName"] + } + if($null -ne $PSBoundParameters["ShowInAddressList"]) + { + $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] + } + if($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if($null -ne $PSBoundParameters["Mobile"]) + { + $params["MobilePhone"] = $PSBoundParameters["Mobile"] + } + if($null -ne $PSBoundParameters["JobTitle"]) + { + $params["JobTitle"] = $PSBoundParameters["JobTitle"] + } + if($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + { + $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] + } + if($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) + { + $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] + } + if($null -ne $PSBoundParameters["OtherMails"]) + { + $params["OtherMails"] = $PSBoundParameters["OtherMails"] + } + if($null -ne $PSBoundParameters["PasswordPolicies"]) + { + $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] + } + if($null -ne $PSBoundParameters["IsCompromised"]) + { + $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + } + if($null -ne $PSBoundParameters["SignInNames"]) + { + $params["Identities"] = $PSBoundParameters["SignInNames"] + } + if($null -ne $PSBoundParameters["PreferredLanguage"]) + { + $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] + } + if($null -ne $PSBoundParameters["UserState"]) + { + $params["ExternalUserState"] = $PSBoundParameters["UserState"] + } + if($null -ne $PSBoundParameters["ImmutableId"]) + { + $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] + } + if($null -ne $PSBoundParameters["City"]) + { + $params["City"] = $PSBoundParameters["City"] + } + if($null -ne $PSBoundParameters["AgeGroup"]) + { + $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] + } + if($null -ne $PSBoundParameters["ExtensionProperty"]) + { + $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] + } + if($null -ne $PSBoundParameters["UsageLocation"]) + { + $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] + } + if($null -ne $PSBoundParameters["UserStateChangedOn"]) + { + $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] + } + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if($null -ne $PSBoundParameters["Country"]) + { + $params["Country"] = $PSBoundParameters["Country"] + } + if($null -ne $PSBoundParameters["UserPrincipalName"]) + { + $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] + } + if($null -ne $PSBoundParameters["GivenName"]) + { + $params["GivenName"] = $PSBoundParameters["GivenName"] + } + if($null -ne $PSBoundParameters["PasswordProfile"]) + { + $TmpValue = $PSBoundParameters["PasswordProfile"] + $Value = @{ + forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin + forceChangePasswordNextSignInWithMfa = $TmpValue.EnforceChangePasswordPolicy + password = $TmpValue.Password + } + $params["passwordProfile"] = $Value + } + if($null -ne $PSBoundParameters["UserType"]) + { + $params["UserType"] = $PSBoundParameters["UserType"] + } + if($null -ne $PSBoundParameters["StreetAddress"]) + { + $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] + } + if($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if($null -ne $PSBoundParameters["Department"]) + { + $params["Department"] = $PSBoundParameters["Department"] + } + if($null -ne $PSBoundParameters["CompanyName"]) + { + $params["CompanyName"] = $PSBoundParameters["CompanyName"] + } + if($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) + { + $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] + } + if($null -ne $PSBoundParameters["Surname"]) + { + $params["Surname"] = $PSBoundParameters["Surname"] + } + if($null -ne $PSBoundParameters["TelephoneNumber"]) + { + $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] + } + if($null -ne $PSBoundParameters["CreationType"]) + { + $params["CreationType"] = $PSBoundParameters["CreationType"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $params = $params | ConvertTo-Json + $response = Invoke-GraphRequest -Headers $customHeaders -Uri 'https://graph.microsoft.com/v1.0/users?$select=*' -Method POST -Body $params + $response = $response | ConvertTo-Json | ConvertFrom-Json + $response | ForEach-Object { + if ($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserState -Value ExternalUserState + Add-Member -InputObject $_ -MemberType AliasProperty -Name UserStateChangedOn -Value ExternalUserStateChangeDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name Mobile -Value mobilePhone + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name ImmutableId -Value onPremisesImmutableId + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ProvisioningErrors -Value onPremisesProvisioningErrors + Add-Member -InputObject $_ -MemberType AliasProperty -Name TelephoneNumber -Value BusinessPhones + + $userData = [Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphUser]::new() + $_.PSObject.Properties | ForEach-Object { + $userData | Add-Member -MemberType NoteProperty -Name $_.Name -Value $_.Value -Force + } + } + } + $userData + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 new file mode 100644 index 0000000000..22be40db7c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaUserAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PrincipalId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["AppRoleId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["PrincipalId"]) + { + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = New-MgBetaUserAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 new file mode 100644 index 0000000000..245fba5620 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaUser { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaUser @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 new file mode 100644 index 0000000000..54d5ce9b81 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaUserAppRoleAssignment { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppRoleAssignmentId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + { + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaUserAppRoleAssignment @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 new file mode 100644 index 0000000000..77f52d5408 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 @@ -0,0 +1,99 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaUserExtension { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Generic.List`1[System.String]] $ExtensionNames, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionId, + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionName + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ExtensionNames"]) + { + $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ExtensionId"]) + { + $params["ExtensionId"] = $PSBoundParameters["ExtensionId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ExtensionName"]) + { + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaUserExtension @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 new file mode 100644 index 0000000000..5e9db09cde --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Remove-EntraBetaUserManager { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Remove-MgBetaUserManagerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 new file mode 100644 index 0000000000..c18fd9d6c4 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 @@ -0,0 +1,328 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaUser { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CompanyName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Surname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $JobTitle, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AgeGroup, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GivenName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $OtherMails, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ImmutableId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TelephoneNumber, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ConsentProvidedForMinor, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $City, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ShowInAddressList, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserPrincipalName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserStateChangedOn, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $FacsimileTelephoneNumber, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MailNickName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserType, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Country, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PostalCode, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UsageLocation, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Mobile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Department, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PreferredLanguage, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompromised, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PhysicalDeliveryOfficeName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $CreationType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $StreetAddress, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $State, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $PasswordPolicies + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["CompanyName"]) + { + $params["CompanyName"] = $PSBoundParameters["CompanyName"] + } + if ($null -ne $PSBoundParameters["Surname"]) + { + $params["Surname"] = $PSBoundParameters["Surname"] + } + if ($null -ne $PSBoundParameters["JobTitle"]) + { + $params["JobTitle"] = $PSBoundParameters["JobTitle"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["AgeGroup"]) + { + $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["GivenName"]) + { + $params["GivenName"] = $PSBoundParameters["GivenName"] + } + if ($null -ne $PSBoundParameters["OtherMails"]) + { + $params["OtherMails"] = $PSBoundParameters["OtherMails"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["ImmutableId"]) + { + $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] + } + if ($null -ne $PSBoundParameters["TelephoneNumber"]) + { + $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] + } + if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + { + $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] + } + if($null -ne $PSBoundParameters["PasswordProfile"]) + { + $TmpValue = $PSBoundParameters["PasswordProfile"] + $Value = @{ + forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin + forceChangePasswordNextSignInWithMfa = $TmpValue.EnforceChangePasswordPolicy + password = $TmpValue.Password + } + $params["PasswordProfile"] = $Value + } + if ($null -ne $PSBoundParameters["City"]) + { + $params["City"] = $PSBoundParameters["City"] + } + if ($null -ne $PSBoundParameters["ShowInAddressList"]) + { + $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] + } + if ($null -ne $PSBoundParameters["UserPrincipalName"]) + { + $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] + } + if ($null -ne $PSBoundParameters["UserStateChangedOn"]) + { + $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] + } + if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) + { + $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["MailNickName"]) + { + $params["MailNickName"] = $PSBoundParameters["MailNickName"] + } + if ($null -ne $PSBoundParameters["UserType"]) + { + $params["UserType"] = $PSBoundParameters["UserType"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ExtensionProperty"]) + { + $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["Country"]) + { + $params["Country"] = $PSBoundParameters["Country"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["PostalCode"]) + { + $params["PostalCode"] = $PSBoundParameters["PostalCode"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["UsageLocation"]) + { + $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] + } + if ($null -ne $PSBoundParameters["UserState"]) + { + $params["ExternalUserState"] = $PSBoundParameters["UserState"] + } + if ($null -ne $PSBoundParameters["Mobile"]) + { + $params["MobilePhone"] = $PSBoundParameters["Mobile"] + } + if ($null -ne $PSBoundParameters["Department"]) + { + $params["Department"] = $PSBoundParameters["Department"] + } + if ($null -ne $PSBoundParameters["PreferredLanguage"]) + { + $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] + } + if ($null -ne $PSBoundParameters["SignInNames"]) + { + $params["Identities"] = $PSBoundParameters["SignInNames"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["IsCompromised"]) + { + $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + } + if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) + { + $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] + } + if ($null -ne $PSBoundParameters["CreationType"]) + { + $params["CreationType"] = $PSBoundParameters["CreationType"] + } + if ($null -ne $PSBoundParameters["StreetAddress"]) + { + $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] + } + if ($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if ($null -ne $PSBoundParameters["PasswordPolicies"]) + { + $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaUser @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 new file mode 100644 index 0000000000..fd497c04a0 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaUserExtension { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionValue, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionNameValues, + + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionName + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ExtensionValue"]) + { + $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ExtensionNameValues"]) + { + $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ExtensionName"]) + { + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaUserExtension @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 new file mode 100644 index 0000000000..b0362bff2b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 @@ -0,0 +1,54 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaUserLicense { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Microsoft.Open.AzureAD.Model.AssignedLicenses] $AssignedLicenses, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + $UserId = $PSBoundParameters["ObjectId"] + } + $jsonBody = @{ + addLicenses = @(if ($PSBoundParameters.AssignedLicenses.AddLicenses) { + $PSBoundParameters.AssignedLicenses.AddLicenses | Select-Object @{Name='skuId'; Expression={$_.'skuId' -replace 's', 's'.ToLower()}} + } else { + @() + }) + removeLicenses = @(if ($PSBoundParameters.AssignedLicenses.RemoveLicenses) { + $PSBoundParameters.AssignedLicenses.RemoveLicenses + } else { + @() + }) + } | ConvertTo-Json + + $customHeaders['Content-Type'] = 'application/json' + + $graphApiEndpoint = "https://graph.microsoft.com/beta/users/$UserId/microsoft.graph.assignLicense" + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $graphApiEndpoint -Method Post -Body $jsonBody + + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 new file mode 100644 index 0000000000..21e7f5d1cf --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaUserManager { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["RefObjectId"]) + { + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} + $params["BodyParameter"] = $Value + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Set-MgBetaUserManagerByRef @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 new file mode 100644 index 0000000000..6bf3c064ce --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaUserPassword { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Security.SecureString] $Password, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $ForceChangePasswordNextLogin, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $EnforceChangePasswordPolicy + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($null -ne $PSBoundParameters["ObjectId"]) + { + $userId = $PSBoundParameters["ObjectId"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($null -ne $PSBoundParameters["Password"]) + { + $Temp = $PSBoundParameters["Password"] + $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Temp) + $PlainPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR) + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["ForceChangePasswordNextLogin"]) + { + $ForceChangePasswordNextSignIn = $PSBoundParameters["ForceChangePasswordNextLogin"] + } + if($null -ne $PSBoundParameters["EnforceChangePasswordPolicy"]) + { + $EnforceChangePasswordPolicy = $PSBoundParameters["EnforceChangePasswordPolicy"] + } + + $PasswordProfile = @{} + if($null -ne $PSBoundParameters["ForceChangePasswordNextLogin"]) { $PasswordProfile["ForceChangePasswordNextSignIn"] = $ForceChangePasswordNextSignIn } + if($null -ne $PSBoundParameters["EnforceChangePasswordPolicy"]) { $PasswordProfile["ForceChangePasswordNextSignInWithMfa"] = $ForceChangePasswordNextSignInWithMfa } + if($null -ne $PSBoundParameters["Password"]) { $PasswordProfile["password"] = $PlainPassword } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Update-MgBetaUser -Headers $customHeaders -UserId $userId -PasswordProfile $PasswordProfile @params + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 new file mode 100644 index 0000000000..ae03459a12 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Set-EntraBetaUserThumbnailPhoto { + [CmdletBinding(DefaultParameterSetName = 'File')] + param ( + + [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.IO.Stream] $FileStream, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "Stream")] + [Parameter(ParameterSetName = "File")] + [Parameter(ParameterSetName = "ByteArray")] + [System.String] $UserId, + + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, + + [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Byte[]] $ImageByteArray + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["FileStream"]) + { + $params["FileStream"] = $PSBoundParameters["FileStream"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["FilePath"]) + { + $params["InFile"] = $PSBoundParameters["FilePath"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["ImageByteArray"]) + { + $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Set-MgBetaUserPhotoContent @params -Headers $customHeaders + $response | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 new file mode 100644 index 0000000000..b2815c8141 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 @@ -0,0 +1,49 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Update-EntraBetaSignedInUserPassword { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Security.SecureString] $CurrentPassword, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Security.SecureString] $NewPassword + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["NewPassword"]) + { + $params["NewPassword"] = $PSBoundParameters["NewPassword"] + } + if($null -ne $PSBoundParameters["CurrentPassword"]) + { + $params["CurrentPassword"] = $PSBoundParameters["CurrentPassword"] + } + $currsecur = [System.Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUnicode($params.CurrentPassword) + $curr = [System.Runtime.InteropServices.Marshal]::PtrToStringUni($currsecur) + + $newsecur = [System.Runtime.InteropServices.Marshal]::SecureStringToGlobalAllocUnicode($params.NewPassword) + $new = [System.Runtime.InteropServices.Marshal]::PtrToStringUni($newsecur) + + $params["Url"] = "https://graph.microsoft.com/beta/me/changePassword" + $body = @{ + currentPassword = $curr + newPassword = $new + } + $body = $body | ConvertTo-Json + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("========================================================================= +") + + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $params.Url -Method POST -Body $body + $response + } +} + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 new file mode 100644 index 0000000000..38cf3dee80 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Update-EntraBetaUserFromFederated { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserPrincipalName, + [Parameter(Mandatory=$false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName=$true)][string] $NewPassword, + [Parameter(Mandatory=$false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName=$true)][guid] $TenantId + + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["UserPrincipalName"]) { + $UserPrincipalName = $PSBoundParameters.UserPrincipalName + $UserId = Get-MgBetaUser -Search "UserPrincipalName:$UserPrincipalName" -ConsistencyLevel eventual + if ($null -ne $UserId) + { + $AuthenticationMethodId = Get-MgBetaUserAuthenticationMethod -UserId $UserId.Id + $params["AuthenticationMethodId"] = $AuthenticationMethodId.Id + $params["UserId"] = $UserId.Id + } + } + if ($PSBoundParameters.ContainsKey("NewPassword")) { + $params["NewPassword"] = $PSBoundParameters["NewPassword"] + } + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + if($null -ne $AuthenticationMethodId) + { + $response = Reset-MgBetaUserAuthenticationMethodPassword @params -Headers $customHeaders + } + $response + } +} + diff --git a/moduleVNext/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 b/moduleVNext/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 new file mode 100644 index 0000000000..19f7649bcf --- /dev/null +++ b/moduleVNext/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 @@ -0,0 +1,308 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAlias { + Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicy -Value Remove-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADScopedRoleMembership -Value Add-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinition -Value Set-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraBetaApplication -Scope Global -Force + Set-Alias -Name New-AzureADMSFeatureRolloutPolicy -Value New-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADPolicy -Value Remove-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Set-AzureADMSPrivilegedRoleSetting -Value Set-EntraBetaPrivilegedRoleSetting -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationFromApplicationTemplate -Value New-EntraBetaApplicationFromApplicationTemplate -Scope Global -Force + Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraBetaUser -Scope Global -Force + Set-Alias -Name Get-AzureADGroup -Value Get-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADAdministrativeUnitMember -Value Remove-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraBetaLifeCycleGroup -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADAdministrativeUnit -Value Get-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnitMember -Value New-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPolicy -Value Get-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraBetaUserRegisteredDevice -Scope Global -Force + Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinition -Value Get-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADContract -Value Get-EntraBetaContract -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraBetaAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraBetaObjectByObjectId -Scope Global -Force + Set-Alias -Name Set-AzureADMSPrivilegedRoleAssignmentRequest -Value Set-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraBetaApplicationPassword -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraBetaApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraBetaUserMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraBetaDevice -Scope Global -Force + Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraBetaApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraBetaContactManager -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADMSTrustFrameworkPolicy -Value Remove-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADPolicy -Value Get-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraBetaContact -Scope Global -Force + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraBetaInvitation -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraBetaApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraBetaServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraBetaUser -Scope Global -Force + Set-Alias -Name New-AzureADPolicy -Value New-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraBetaApplicationKey -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraBetaContactMembership -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraBetaServicePrincipalOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADPolicyAppliedObject -Value Get-EntraBetaPolicyAppliedObject -Scope Global -Force + Set-Alias -Name Remove-AzureADObjectSetting -Value Remove-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraBetaGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADPrivilegedRoleAssignment -Value New-EntraBetaPrivilegedRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationPolicy -Value Add-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraBetaUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Set-AzureADDirectorySetting -Value Set-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraBetaServicePrincipalOwnedObject -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSPasswordSingleSignOnCredential -Value Get-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSApplicationTemplate -Value Get-EntraBetaApplicationTemplate -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraBetaUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraBetaTenantDetail -Scope Global -Force + Set-Alias -Name Set-AzureADMSAttributeSet -Value Set-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRole -Value Get-EntraBetaPrivilegedRole -Scope Global -Force + Set-Alias -Name New-AzureADMSPasswordSingleSignOnCredential -Value New-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraBetaGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Remove-EntraBetaApplicationProxyApplication -Scope Global -Force + Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraBetaUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADMSAttributeSet -Value New-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force + Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraBetaDomainNameReference -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraBetaGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraBetaSubscribedSku -Scope Global -Force + Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraBetaDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraBetaApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraBetaApplicationProxyApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraBetaApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraBetaUserPassword -Scope Global -Force + Set-Alias -Name New-AzureADMSTrustFrameworkPolicy -Value New-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraBetaUser -Scope Global -Force + Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraBetaDomainVerificationDnsRecord -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraBetaUserOwnedDevice -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleDefinition -Value Get-EntraBetaPrivilegedRoleDefinition -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADDirectorySetting -Value New-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraBetaDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraBetaApplication -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADAdministrativeUnit -Value Remove-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraBetaUserLicense -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraBetaServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalPolicy -Value Add-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADDirectorySetting -Value Get-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraBetaUserDirectReport -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraBetaDirectoryRoleTemplate -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Set-AzureADMSPasswordSingleSignOnCredential -Value Set-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraBetaUser -Scope Global -Force + Set-Alias -Name Set-AzureADObjectSetting -Value Set-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name New-AzureADMSCustomSecurityAttributeDefinition -Value New-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraBetaContact -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedResource -Value Get-EntraBetaPrivilegedResource -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraBetaApplicationKey -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSAttributeSet -Value Get-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name New-AzureADDevice -Value New-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADDirectorySettingTemplate -Value Get-EntraBetaDirectorySettingTemplate -Scope Global -Force + Set-Alias -Name Get-AzureADAdministrativeUnitMember -Value Get-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraBetaGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Add-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraBetaApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraBetaDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationSignInDetailedSummary -Value Get-EntraBetaApplicationSignInDetailedSummary -Scope Global -Force + Set-Alias -Name Set-AzureADMSTrustFrameworkPolicy -Value Set-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADObjectSetting -Value Get-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraBetaUserCreatedObject -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraBetaApplicationPassword -Scope Global -Force + Set-Alias -Name Get-AzureADScopedRoleMembership -Value Get-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleSetting -Value Get-EntraBetaPrivilegedRoleSetting -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraBetaUserOwnedObject -Scope Global -Force + Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name Remove-AzureADScopedRoleMembership -Value Remove-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraBetaContactDirectReport -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraBetaTenantDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectorySetting -Value Remove-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraBetaSignedInUserAllRefreshToken -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraBetaSignedInUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraBetaUserLicenseDetail -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraBetaGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADMScustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Set-AzureADDevice -Value Set-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPasswordSingleSignOnCredential -Value Remove-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraBetaServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADAdministrativeUnitMember -Value Add-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name New-AzureADObjectSetting -Value New-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADPolicy -Value Set-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADUserManager -Value Set-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraBetaDeletedGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraBetaAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraBetaUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADMSTrustFrameworkPolicy -Value Get-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPolicy -Value Remove-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSFeatureRolloutPolicy -Value Get-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADMSFeatureRolloutPolicy -Value Set-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Connect-AzureAD -Value Connect-EntraBeta -Scope Global -Force + Set-Alias -Name Disconnect-AzureAD -Value Disconnect-EntraBeta -Scope Global -Force + Set-Alias -Name Remove-EntraBetaRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraBetaRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name New-EntraBetaRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Set-EntraBetaRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-EntraBetaRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-EntraBetaRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name New-EntraBetaRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-EntraBetaServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Remove-EntraBetaServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraBetaServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-EntraBetaServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Get-EntraBetaAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force + Set-Alias -Name Get-EntraBetaAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force +} + diff --git a/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 b/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 new file mode 100644 index 0000000000..c56d6afba6 --- /dev/null +++ b/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaDirSyncfeature { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String]$Feature + ) + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey("Verbose")) { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["Feature"]) { + $Feature = $PSBoundParameters["Feature"] + } + if ($null -ne $PSBoundParameters["TenantId"]) { + $params["OnPremisesDirectorySynchronizationId"] = $PSBoundParameters["TenantId"] + } + if ($PSBoundParameters.ContainsKey("Debug")) { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $jsonData = Get-MgBetaDirectoryOnPremiseSynchronization @params -Headers $customHeaders | ConvertTo-Json + $object = ConvertFrom-Json $jsonData + $table =@() + foreach ($featureName in $object.Features.PSObject.Properties.Name) { + $row = New-Object PSObject -Property @{ + 'DirSyncFeature' = $featureName -replace "Enabled", "" + 'Enabled' = $object.Features.$featureName + } + $table += $row + } + if([string]::IsNullOrWhiteSpace($Feature)) { + $table | Format-Table -AutoSize + } + else { + $output = $table | Where-Object {$_.dirsyncFeature -eq $Feature} + if($null -eq $output) { + Write-Error "Get-EntraBetaDirSyncfeature : Invalid value for parameter. Parameter Name: Feature." + } + else { + $output + } + } + } + }# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 new file mode 100644 index 0000000000..24daf53824 --- /dev/null +++ b/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUnsupportedCommand { + Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." +} + diff --git a/moduleVNext/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..16c1e3b342 --- /dev/null +++ b/moduleVNext/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 b/moduleVNext/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 new file mode 100644 index 0000000000..b9bd962b8d --- /dev/null +++ b/moduleVNext/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 @@ -0,0 +1,139 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Test-EntraScript { + <# + .SYNOPSIS + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. + + .DESCRIPTION + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. + + .PARAMETER Path + Path to the script file(s) to scan. + Or name of the content, when also specifying -Content + + .PARAMETER Content + Code content to scan. + Used when scanning code that has no file representation (e.g. straight from a repository). + + .PARAMETER Quiet + Only return $true or $false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($false) + + .EXAMPLE + PS C:\> Test-EntraScript -Path .\usercreation.ps1 -Quiet + + Returns whether the script "usercreation.ps1" could run under Microsoft.Graph.Entra + + .EXAMPLE + PS C:\> Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript + + Returns a list of all scripts that would not run under the Microsoft.Graph.Entra module, listing each issue with line and code. + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias('FullName', 'Name')] + [string[]] + $Path, + + [Parameter(ValueFromPipelineByPropertyName = $true)] + [string] + $Content, + + [switch] + $Quiet + ) + + begin { + function Test-ScriptCommand { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [Alias('FullName')] + [string] + $Name, + + [Parameter(Mandatory = $true)] + [string] + $Content, + + [switch] + $Quiet, + + [AllowEmptyCollection()] + [string[]] + $RequiredCommands, + + [AllowEmptyCollection()] + [string[]] + $ForbiddenCommands + ) + + $ast = [System.Management.Automation.Language.Parser]::ParseInput($Content, [ref]$null, [ref]$null) + $allCommands = $ast.FindAll({ $args[0] -is [System.Management.Automation.Language.CommandAst] }, $true) + $allCommandNames = @($allCommands).ForEach{ $_.CommandElements[0].Value } + + $findings = @() + foreach ($command in $allCommands) { + if ($command.CommandElements[0].Value -notin $ForbiddenCommands) { continue } + $findings += [PSCustomObject]@{ + PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' + Name = $Name + Line = $command.Extent.StartLineNumber + Type = 'UnsupportedCommand' + Command = $command.CommandElements[0].Value + Code = $command.Extent.Text + } + } + foreach ($requiredCommand in $RequiredCommands) { + if ($requiredCommand -notin $allCommandNames) { continue } + $findings += [PSCustomObject]@{ + PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' + Name = $Name + Line = -1 + Type = 'RequiredCommandMissing' + Command = $requiredCommand + Code = '' + } + } + + if (-not $Quiet) { + $findings + return + } + + $findings -as [bool] + } + + $testParam = @{ + Quiet = $Quiet + ForbiddenCommands = $script:MISSING_CMDS + } + } + process { + if ($Path -and $Content) { + Test-ScriptCommand -Name @($Path)[0] -Content $Content + return + } + foreach ($entry in $Path) { + try { $resolvedPaths = Resolve-Path -Path $entry -ErrorAction Stop } + catch { + Write-Error $_ + continue + } + + foreach ($resolvedPath in $resolvedPaths) { + if (-not (Test-Path -Path $resolvedPath -PathType Leaf)) { + Write-Warning "Not a file: $resolvedPath" + continue + } + + $scriptContent = (Get-Content -LiteralPath $resolvedPath) -join "`n" + Test-ScriptCommand -Name $resolvedPath -Content $scriptContent @testParam + } + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/config/moduleMapping.json b/moduleVNext/EntraBeta/config/moduleMapping.json index 9ba9b07aac..08c26090d7 100644 --- a/moduleVNext/EntraBeta/config/moduleMapping.json +++ b/moduleVNext/EntraBeta/config/moduleMapping.json @@ -1,16 +1,291 @@ { - "Authentication":"", - "Directory":"", - "Application":"", - "ApplicationProxy":"", - "User":"", - "Group":"", - "ServicePrincipal":"", - "AdministrativeUnit":"", - "Contact":"", - "Domain":"", - "Permission":"", - "Device":"", - "Policy":"", - "CertificateAuthority":"" + "Get-EntraBetaUser": "Users", + "Set-EntraBetaUser": "Users", + "New-EntraBetaUser": "Users", + "Remove-EntraBetaUser": "Users", + "Get-EntraBetaUserAppRoleAssignment": "Users", + "Get-EntraBetaUserCreatedObject": "Users", + "Get-EntraBetaUserDirectReport": "Users", + "Get-EntraBetaUserExtension": "Users", + "Get-EntraBetaUserLicenseDetail": "Users", + "Get-EntraBetaUserManager": "Users", + "Get-EntraBetaUserMembership": "Users", + "Get-EntraBetaUserOAuth2PermissionGrant": "Users", + "Get-EntraBetaUserOwnedDevice": "Users", + "Get-EntraBetaUserOwnedObject": "Users", + "Get-EntraBetaUserRegisteredDevice": "Users", + "Get-EntraBetaUserThumbnailPhoto": "Users", + "New-EntraBetaUserAppRoleAssignment": "Users", + "Remove-EntraBetaUserAppRoleAssignment": "Users", + "Remove-EntraBetaUserExtension": "Users", + "Remove-EntraBetaUserManager": "Users", + "Reset-EntraBetaStrongAuthenticationMethodByUpn": "Authentication", + "Set-EntraBetaUserExtension": "Users", + "Set-EntraBetaUserLicense": "Users", + "Set-EntraBetaUserManager": "Users", + "Set-EntraBetaUserPassword": "Users", + "Set-EntraBetaUserThumbnailPhoto": "Users", + "Update-EntraBetaSignedInUserPassword": "Users", + "Get-EntraBetaGroup": "Groups", + "New-EntraBetaGroup": "Groups", + "Set-EntraBetaGroup": "Groups", + "Remove-EntraBetaGroup": "Groups", + "Get-EntraBetaGroupMember": "Groups", + "Get-EntraBetaGroupOwner": "Groups", + "Add-EntraBetaGroupMember": "Groups", + "Add-EntraBetaGroupOwner": "Groups", + "Add-EntraBetaLifecyclePolicyGroup": "Groups", + "Get-EntraBetaDeletedGroup": "Groups", + "Get-EntraBetaGroupAppRoleAssignment": "Groups", + "Get-EntraBetaGroupLifecyclePolicy": "Groups", + "Get-EntraBetaGroupPermissionGrant": "Groups", + "Get-EntraBetaLifecyclePolicyGroup": "Groups", + "New-EntraBetaGroupAppRoleAssignment": "Groups", + "New-EntraBetaGroupLifecyclePolicy": "Groups", + "Remove-EntraBetaGroupAppRoleAssignment": "Groups", + "Remove-EntraBetaGroupLifecyclePolicy": "Groups", + "Remove-EntraBetaGroupMember": "Groups", + "Remove-EntraBetaGroupOwner": "Groups", + "Remove-EntraBetaLifecyclePolicyGroup": "Groups", + "Reset-EntraBetaLifeCycleGroup": "Groups", + "Select-EntraBetaGroupIdsContactIsMemberOf": "Groups", + "Select-EntraBetaGroupIdsGroupIsMemberOf": "Groups", + "Select-EntraBetaGroupIdsUserIsMemberOf": "Groups", + "Set-EntraBetaGroupLifecyclePolicy": "Groups", + "Get-EntraBetaDevice": "DirectoryManagement", + "Remove-EntraBetaDevice": "DirectoryManagement", + "Add-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", + "Add-EntraBetaDeviceRegisteredUser": "DirectoryManagement", + "Get-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", + "Get-EntraBetaDeviceRegisteredUser": "DirectoryManagement", + "Set-EntraBetaDevice": "DirectoryManagement", + "New-EntraBetaDevice": "DirectoryManagement", + "Remove-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", + "Remove-EntraBetaDeviceRegisteredUser": "DirectoryManagement", + "Get-EntraBetaApplication": "Applications", + "Set-EntraBetaApplication": "Applications", + "New-EntraBetaApplication": "Applications", + "Remove-EntraBetaApplication": "Applications", + "Get-EntraBetaServicePrincipal": "Applications", + "Add-EntraBetaApplicationOwner": "Applications", + "Add-EntraBetaApplicationPolicy": "Applications", + "Add-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", + "Add-EntraBetaServicePrincipalOwner": "Applications", + "Add-EntraBetaServicePrincipalPolicy": "SignIns", + "Get-EntraBetaApplicationExtensionProperty": "Applications", + "Get-EntraBetaApplicationKeyCredential": "Applications", + "Get-EntraBetaApplicationLogo": "Applications", + "Get-EntraBetaApplicationOwner": "Applications", + "Get-EntraBetaApplicationPolicy": "Applications", + "Get-EntraBetaApplicationPasswordCredential": "Applications", + "Get-EntraBetaApplicationServiceEndpoint": "Applications", + "Get-EntraBetaDeletedApplication": "Applications", + "Get-EntraBetaApplicationTemplate": "Applications", + "Get-EntraBetaServicePrincipalCreatedObject": "Applications", + "Get-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", + "Get-EntraBetaServicePrincipalKeyCredential": "Applications", + "Get-EntraBetaServicePrincipalMembership": "Applications", + "Get-EntraBetaServicePrincipalOAuth2PermissionGrant": "Applications", + "Get-EntraBetaServicePrincipalOwnedObject": "Applications", + "Get-EntraBetaServicePrincipalOwner": "Applications", + "Get-EntraBetaServicePrincipalPasswordCredential": "Applications", + "New-EntraBetaApplicationFromApplicationTemplate": "Applications", + "New-EntraBetaApplicationExtensionProperty": "Applications", + "New-EntraBetaApplicationKey": "Applications", + "New-EntraBetaApplicationKeyCredential": "Applications", + "New-EntraBetaApplicationPassword": "Applications", + "New-EntraBetaApplicationPasswordCredential": "Applications", + "New-EntraBetaServicePrincipal": "Applications", + "New-EntraBetaServicePrincipalPasswordCredential": "Applications", + "Remove-EntraBetaApplicationExtensionProperty": "Applications", + "Remove-EntraBetaApplicationKey": "Applications", + "Remove-EntraBetaApplicationKeyCredential": "Applications", + "Remove-EntraBetaApplicationOwner": "Applications", + "Remove-EntraBetaApplicationPassword": "Applications", + "Remove-EntraBetaApplicationPasswordCredential": "Applications", + "Remove-EntraBetaApplicationPolicy": "Applications", + "Remove-EntraBetaApplicationVerifiedPublisher": "Applications", + "Remove-EntraBetaDeletedApplication": "Applications", + "Remove-EntraBetaDeletedDirectoryObject": "Applications", + "Remove-EntraBetaServicePrincipal": "Applications", + "Remove-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", + "Remove-EntraBetaServicePrincipalOwner": "Applications", + "Remove-EntraBetaServicePrincipalPolicy": "SignIns", + "Remove-EntraBetaServicePrincipalPasswordCredential": "Applications", + "Restore-EntraBetaDeletedApplication": "Applications", + "Select-EntraBetaGroupIdsServicePrincipalIsMemberOf": "Applications", + "Set-EntraBetaApplicationLogo": "Applications", + "Set-EntraBetaApplicationVerifiedPublisher": "Applications", + "Set-EntraBetaServicePrincipal": "Applications", + "Revoke-EntraBetaSignedInUserAllRefreshToken": "Authentication", + "Revoke-EntraBetaUserAllRefreshToken": "Authentication", + "Disconnect-Entra": "Authentication", + "Get-EntraContext": "Authentication", + "Connect-Entra": "Authentication", + "Get-EntraBetaTenantDetail": "DirectoryManagement", + "Set-EntraBetaTenantDetail": "DirectoryManagement", + "Add-EntraBetaDirectoryRoleMember": "DirectoryManagement", + "Enable-EntraBetaDirectoryRole": "DirectoryManagement", + "Get-EntraBetaDeletedDirectoryObject": "DirectoryManagement", + "Get-EntraBetaDirectoryRole": "DirectoryManagement", + "Get-EntraBetaDirectoryRoleMember": "DirectoryManagement", + "Get-EntraBetaDirectoryRoleTemplate": "DirectoryManagement", + "Get-EntraBetaDirSyncConfiguration": "DirectoryManagement", + "Get-EntraBetaDirSyncFeature": "DirectoryManagement", + "Set-EntraBetaDirSyncEnabled": "DirectoryManagement", + "Get-EntraBetaHasObjectsWithDirSyncProvisioningError": "DirectoryManagement", + "Get-EntraBetaDirectorySettingTemplate": "DirectoryManagement", + "Get-EntraBetaDirectorySetting": "DirectoryManagement", + "New-EntraBetaDirectorySetting": "DirectoryManagement", + "Remove-EntraBetaDirectoryRoleMember": "DirectoryManagement", + "Remove-EntraBetaDirectorySetting": "DirectoryManagement", + "Restore-EntraBetaDeletedDirectoryObject": "DirectoryManagement", + "Set-EntraBetaDirectorySetting": "DirectoryManagement", + "Set-EntraBetaDirSyncConfiguration": "DirectoryManagement", + "Set-EntraBetaDirSyncFeature": "DirectoryManagement", + "Get-EntraBetaDomain": "DirectoryManagement", + "Get-EntraBetaDomainFederationSettings": "DirectoryManagement", + "Get-EntraBetaDomainNameReference": "DirectoryManagement", + "Get-EntraBetaDomainServiceConfigurationRecord": "DirectoryManagement", + "Get-EntraBetaDomainVerificationDnsRecord": "DirectoryManagement", + "New-EntraBetaDomain": "DirectoryManagement", + "Remove-EntraBetaDomain": "DirectoryManagement", + "Set-EntraBetaDomain": "DirectoryManagement", + "Set-EntraBetaDomainFederationSettings": "DirectoryManagement", + "Get-EntraBetaNamedLocationPolicy": "SignIns", + "Get-EntraBetaFeatureRolloutPolicy": "SignIns", + "Get-EntraBetaPolicy": "SignIns", + "Get-EntraBetaPermissionGrantConditionSet": "SignIns", + "Get-EntraBetaPermissionGrantPolicy": "SignIns", + "Get-EntraBetaPolicyAppliedObject": "SignIns", + "Get-EntraBetaPasswordPolicy": "DirectoryManagement", + "New-EntraBetaNamedLocationPolicy": "SignIns", + "New-EntraBetaFeatureRolloutPolicy": "SignIns", + "New-EntraBetaPermissionGrantConditionSet": "SignIns", + "New-EntraBetaPermissionGrantPolicy": "SignIns", + "New-EntraBetaPolicy": "SignIns", + "Remove-EntraBetaNamedLocationPolicy": "SignIns", + "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject": "SignIns", + "Remove-EntraBetaPermissionGrantConditionSet": "SignIns", + "Remove-EntraBetaPermissionGrantPolicy": "SignIns", + "Remove-EntraBetaPolicy": "SignIns", + "Set-EntraBetaNamedLocationPolicy": "SignIns", + "Set-EntraBetaPermissionGrantConditionSet": "SignIns", + "Set-EntraBetaPermissionGrantPolicy": "SignIns", + "Set-EntraBetaFeatureRolloutPolicy": "SignIns", + "Set-EntraBetaPolicy": "SignIns", + "Set-EntraBetaAuthorizationPolicy": "SignIns", + "Get-EntraBetaAuthorizationPolicy": "SignIns", + "Get-EntraBetaOAuth2PermissionGrant": "SignIns", + "New-EntraBetaOauth2PermissionGrant": "SignIns", + "Remove-EntraBetaOAuth2PermissionGrant": "SignIns", + "Get-EntraBetaApplicationSignInSummary": "Reports", + "Get-EntraBetaApplicationSignInDetailedSummary": "Reports", + "Get-EntraBetaPrivilegedRoleSetting": "Governance", + "Get-EntraBetaPrivilegedRoleDefinition": "Governance", + "Get-EntraBetaPrivilegedRoleAssignmentRequest": "Governance", + "Get-EntraBetaPrivilegedRole": "Governance", + "Get-EntraBetaPrivilegedResource": "Governance", + "New-EntraBetaPrivilegedRoleAssignment": "Governance", + "Set-EntraBetaPrivilegedRoleAssignmentRequest": "Governance", + "Set-EntraBetaPrivilegedRoleSetting": "Governance", + "Get-EntraBetaAccountSku": "DirectoryManagement", + "Get-EntraBetaFederationProperty": "DirectoryManagement", + "Enable-EntraAzureADAlias": "Migration", + "Test-EntraScript": "Migration", + "Get-EntraBetaAttributeSet": "DirectoryManagement", + "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Get-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", + "New-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", + "Set-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", + "Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Get-EntraBetaContact": "DirectoryManagement", + "Get-EntraBetaContactDirectReport": "DirectoryManagement", + "Get-EntraBetaContactManager": "DirectoryManagement", + "Get-EntraBetaContactMembership": "DirectoryManagement", + "Get-EntraBetaContactThumbnailPhoto": "xxxxxxxxxxxxxxxx", + "Remove-EntraBetaContact": "DirectoryManagement", + "Get-EntraBetaContract": "DirectoryManagement", + "Get-EntraBetaTrustedCertificateAuthority": "SignIns", + "New-EntraBetaTrustedCertificateAuthority": "SignIns", + "Remove-EntraBetaTrustedCertificateAuthority": "SignIns", + "Set-EntraBetaTrustedCertificateAuthority": "SignIns", + "Get-EntraBetaTrustFrameworkPolicy": "SignIns", + "New-EntraBetaTrustFrameworkPolicy": "SignIns", + "Remove-EntraBetaTrustFrameworkPolicy": "SignIns", + "Set-EntraBetaTrustFrameworkPolicy": "SignIns", + "Get-EntraBetaIdentityProvider": "SignIns", + "New-EntraBetaIdentityProvider": "SignIns", + "Remove-EntraBetaIdentityProvider": "SignIns", + "Set-EntraBetaIdentityProvider": "SignIns", + "Get-EntraBetaPartnerInformation": "DirectoryManagement", + "Set-EntraBetaPartnerInformation": "DirectoryManagement", + "Add-EntraBetaAdministrativeUnitMember": "DirectoryManagement", + "Get-EntraBetaAdministrativeUnit": "DirectoryManagement", + "Get-EntraBetaAdministrativeUnitMember": "DirectoryManagement", + "New-EntraBetaAdministrativeUnitMember": "DirectoryManagement", + "New-EntraBetaAdministrativeUnit": "DirectoryManagement", + "Remove-EntraBetaAdministrativeUnit": "DirectoryManagement", + "Remove-EntraBetaAdministrativeUnitMember": "DirectoryManagement", + "Set-EntraBetaAdministrativeUnit": "DirectoryManagement", + "Get-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", + "New-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", + "Remove-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", + "Set-EntraBetaPasswordSingleSignOnCredential": "Applications", + "Get-EntraBetaPasswordSingleSignOnCredential": "Applications", + "New-EntraBetaPasswordSingleSignOnCredential": "Applications", + "Remove-EntraBetaPasswordSingleSignOnCredential": "Applications", + "Get-EntraBetaApplicationProxyApplication": "Applications", + "New-EntraBetaApplicationProxyApplication": "Applications", + "Remove-EntraBetaApplicationProxyApplication": "Applications", + "Set-EntraBetaApplicationProxyApplication": "Applications", + "Set-EntraBetaApplicationProxyApplicationSingleSignOn": "Applications", + "Set-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", + "Get-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", + "Get-EntraBetaApplicationProxyConnector": "Applications", + "Get-EntraBetaApplicationProxyConnectorGroup": "Applications", + "Get-EntraBetaApplicationProxyConnectorGroupMembers": "Applications", + "Get-EntraBetaApplicationProxyConnectorMemberOf": "Applications", + "New-EntraBetaApplicationProxyConnectorGroup": "Applications", + "Remove-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", + "Remove-EntraBetaApplicationProxyConnectorGroup": "Applications", + "Set-EntraBetaApplicationProxyConnector": "Applications", + "Set-EntraBetaApplicationProxyConnectorGroup": "Applications", + "Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Add-EntraBetaFeatureRolloutPolicyDirectoryObject": "SignIns", + "Add-EntraBetaScopedRoleMembership": "DirectoryManagement", + "Confirm-EntraBetaDomain": "DirectoryManagement", + "Get-EntraBetaConditionalAccessPolicy": "SignIns", + "Get-EntraBetaObjectByObjectId": "Groups", + "Get-EntraBetaObjectSetting": "Groups", + "Get-EntraBetaScopedRoleMembership": "DirectoryManagement", + "Get-EntraBetaServicePrincipalPolicy": "SignIns", + "Get-EntraBetaSubscribedSku": "DirectoryManagement", + "Get-EntraUnsupportedCommand": "Migration", + "New-EntraBetaAttributeSet": "DirectoryManagement", + "New-EntraBetaConditionalAccessPolicy": "SignIns", + "New-EntraBetaInvitation": "SignIns", + "New-EntraBetaObjectSetting": "Groups", + "Remove-EntraBetaConditionalAccessPolicy": "SignIns", + "Remove-EntraBetaFeatureRolloutPolicy": "SignIns", + "Remove-EntraBetaObjectSetting": "Groups", + "Remove-EntraBetaScopedRoleMembership": "DirectoryManagement", + "Set-EntraBetaAttributeSet": "DirectoryManagement", + "Set-EntraBetaConditionalAccessPolicy": "SignIns", + "Set-EntraBetaObjectSetting": "Groups", + "Get-EntraBetaAuditDirectoryLog": "Reports", + "Get-EntraBetaAuditSignInLog": "Reports", + "Get-EntraBetaDirectoryObjectOnPremisesProvisioningError": "DirectoryManagement", + "Get-EntraBetaDirectoryRoleAssignment": "Governance", + "Get-EntraBetaDirectoryRoleDefinition": "Governance", + "Get-EntraBetaServicePrincipalAppRoleAssignedTo": "Applications", + "Get-EntraBetaServicePrincipalAppRoleAssignment": "Applications", + "New-EntraBetaDirectoryRoleAssignment": "Governance", + "New-EntraBetaDirectoryRoleDefinition": "Governance", + "New-EntraBetaServicePrincipalAppRoleAssignment": "Applications", + "Remove-EntraBetaDirectoryRoleAssignment": "Governance", + "Remove-EntraBetaDirectoryRoleDefinition": "Governance", + "Remove-EntraBetaServicePrincipalAppRoleAssignment": "Applications", + "Set-EntraBetaDirectoryRoleDefinition": "Governance", + "Update-EntraBetaUserFromFederated": "Users" } \ No newline at end of file diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md b/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md new file mode 100644 index 0000000000..a5de700ae1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md @@ -0,0 +1,106 @@ +--- +title: Add-EntraBetaApplicationOwner +description: This article provides details on the Add-EntraBetaApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationOwner + +schema: 2.0.0 +--- + +# Add-EntraBetaApplicationOwner + +## Synopsis + +Adds an owner to an application. + +## Syntax + +```powershell +Add-EntraBetaApplicationOwner + -ApplicationId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaApplicationOwner` cmdlet adds an owner to a Microsoft Entra ID application. + +## Examples + +### Example 1: Add a user as an owner to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$ApplicationId = (Get-EntraBetaApplication -SearchString '').ObjectId +$UserObjectId = (Get-EntraBetaUser -SearchString '').ObjectId +$params = @{ + ApplicationId = $ApplicationId + RefObjectId = $UserObjectId +} +Add-EntraBetaApplicationOwner @params +``` + +This example demonstrates how to add an owner to an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the ID of an application. +- `-RefObjectId` parameter specifies the ID of a user. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplicationOwner](Get-EntraBetaApplicationOwner.md) + +[Remove-EntraBetaApplicationOwner](Remove-EntraBetaApplicationOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md b/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md new file mode 100644 index 0000000000..b1c2ceca46 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md @@ -0,0 +1,102 @@ +--- +title: Add-EntraBetaApplicationPolicy +description: This article provides details on the Add-EntraBetaApplicationPolicy command. + + +ms.topic: reference +ms.date: 07/06/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationPolicy + +schema: 2.0.0 +--- + +# Add-EntraBetaApplicationPolicy + +## Synopsis + +Adds an application policy. + +## Syntax + +```powershell +Add-EntraBetaApplicationPolicy + -Id + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaApplicationPolicy` cmdlet adds a Microsoft Entra ID application policy. Specify `Id` and `RefObjectId` parameters to add an application policy. + +## Examples + +### Example 1: Add an application policy + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All, Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Add-EntraBetaApplicationPolicy @params +``` + +This example demonstrates how to add an application policy. + +## Parameters + +### -RefObjectId + +Specifies the ID of the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The ID of the application for which you need to set the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplicationPolicy](Get-EntraBetaApplicationPolicy.md) + +[Remove-EntraBetaApplicationPolicy](Remove-EntraBetaApplicationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..eea6410d22 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,163 @@ +--- +title: Add-EntraBetaServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Add-EntraBetaServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 08/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Add-EntraBetaServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Add a classification for a delegated permission. + +## Syntax + +```powershell +Add-EntraBetaServicePrincipalDelegatedPermissionClassification + -PermissionId + -Classification + -PermissionName + -ServicePrincipalId + [] +``` + +## Description + +The `Add-EntraBetaServicePrincipalDelegatedPermissionClassification` cmdlet creates a delegated permission classification for the given permission on service principal. + +## Examples + +### Example 1: Create Delegated Permission Classification + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$PermissionId = $ServicePrincipal.PublishedPermissionScopes[0].Id +$PermissionName = $ServicePrincipal.PublishedPermissionScopes[0].Value + +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + PermissionId = $PermissionId + Classification = 'Low' + PermissionName = $PermissionName +} + +Add-EntraBetaServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +T2qU_E28O0GgkLLIYRPsTwE low fc946a4f-bc4d-413b-a090-b2c86113ec4f LicenseManager.AccessAsUser +``` + +This command creates a delegated permission classification for the given permission on the service principal. You can use the command `Get-EntraBetaServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. +- `-PermissionId` parameter specifies the ID for a delegated permission. +- `-Classification` parameter specifies the classification for a delegated permission. +- `-PermissionName` parameter specifies the name for a delegated permission. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionId + +The ID for a delegated permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionName + +The name for a delegated permission. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Classification + +The classification for a delegated permission. +This parameter can take one of the following values: + +- Low: Specifies a classification for a permission as low impact. + +- Medium: Specifies a classification for a permission as medium impact. + +- High: Specifies a classification for a permission as high impact. + +```yaml +Type: ClassificationEnum +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DelegatedPermissionClassification + +## Notes + +## Related Links + +[Remove-EntraBetaServicePrincipalDelegatedPermissionClassification](Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md) + +[Get-EntraBetaServicePrincipalDelegatedPermissionClassification](Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md b/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md new file mode 100644 index 0000000000..4a6b1f8156 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md @@ -0,0 +1,109 @@ +--- +title: Add-EntraBetaServicePrincipalOwner +description: This article provides details on the Add-EntraBetaServicePrincipalOwner command. + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalOwner + +schema: 2.0.0 +--- + +# Add-EntraBetaServicePrincipalOwner + +## Synopsis + +Adds an owner to a service principal. + +## Syntax + +```powershell +Add-EntraBetaServicePrincipalOwner + -ServicePrincipalId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaServicePrincipalOwner` cmdlet adds an owner to a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Add a user as an owner to a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipalId = (Get-EntraBetaServicePrincipal -Top 1).ObjectId +$OwnerId = (Get-EntraBetaUser -Top 1).ObjectId +$Params = @{ + ServicePrincipalId = $ServicePrincipalId + RefObjectId = $OwnerId +} +Add-EntraBetaServicePrincipalOwner @Params +``` + +This example demonstrates how to add an owner to a service principal. + +- `-ServicePrincipalId` parameter specifies the service principal Id. +- `-RefObjectId` parameter specifies the user object Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) + +[Get-EntraBetaServicePrincipalOwner](Get-EntraBetaServicePrincipalOwner.md) + +[Get-EntraBetaUser](Get-EntraBetaUser.md) + +[Remove-EntraBetaServicePrincipalOwner](Remove-EntraBetaServicePrincipalOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md new file mode 100644 index 0000000000..a3180d32b2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md @@ -0,0 +1,275 @@ +--- +title: Get-EntraBetaApplication +description: This article provides details on the Get-EntraBetaApplication command. + +ms.topic: reference +ms.date: 06/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplication + +schema: 2.0.0 +--- + +# Get-EntraBetaApplication + +## Synopsis + +Gets an application. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaApplication + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraBetaApplication + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaApplication + -ApplicationId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaApplication` cmdlet gets a Microsoft Entra ID application. + +## Examples + +### Example 1: Get an application by ApplicationId + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplication -ApplicationId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +ToGraph_443democc3c aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This example demonstrates how to retrieve specific application by providing ID. + +### Example 2: Get all applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplication -All +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +test app aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADandPersonalMicrosoftAccount contoso.com +ToGraph_443DEM cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +test adms eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADandPersonalMicrosoftAccount contoso.com +test adms app azure gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADandPersonalMicrosoftAccount contoso.com +test adms2 iiiiiiii-aaaa-bbbb-cccc-jjjjjjjjjjjj jjjjjjjj-bbbb-cccc-dddd-kkkkkkkkkkkk AzureADandPersonalMicrosoftAccount contoso.com +``` + +This example demonstrates how to get all applications from Microsoft Entra ID. + +### Example 3: Get applications with expiring secrets + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplication | + Where-Object { + $_.PasswordCredentials.keyId -ne $null -and + $_.PasswordCredentials.EndDateTime -lt (Get-Date).AddDays(30) + } | + ForEach-Object { + $_.DisplayName, + $_.Id, + $_.PasswordCredentials + } +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + AppOne 8/19/2024 9:00:00 PM 1jQ aaaaaaaa-0b0b-1c1c-2d2d-333333333333 8/6/2024 6:07:47 PM +``` + +This example retrieves applications with expiring secrets within 30 days. + +### Example 4: Get an application by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplication -Filter "DisplayName eq 'ToGraph_443DEMO'" +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +ToGraph_443DEMO cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +``` + +In this example, we retrieve application by its display name from Microsoft Entra ID. + +### Example 5: Search among retrieved applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplication -SearchString 'My new application 2' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application 2 kkkkkkkk-cccc-dddd-eeee-llllllllllll llllllll-dddd-eeee-ffff-mmmmmmmmmmmm AzureADandPersonalMicrosoftAccount contoso.com +``` + +This example demonstrates how to retrieve applications for specific string from Microsoft Entra ID. + +### Example 6: Retrieve an application by identifierUris + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplication -Filter "identifierUris/any(uri:uri eq 'https://wingtips.wingtiptoysonline.com')" +``` + +This example demonstrates how to retrieve applications by its identifierUris from Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplication](New-EntraBetaApplication.md) + +[Remove-EntraBetaApplication](Remove-EntraBetaApplication.md) + +[Set-EntraBetaApplication](Set-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md new file mode 100644 index 0000000000..f492b340fd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraBetaApplicationExtensionProperty +description: This article provides details on the Get-EntraBetaApplicationExtensionProperty command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationExtensionProperty + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationExtensionProperty + +## Synopsis + +Gets application extension properties. + +## Syntax + +```powershell +Get-EntraBetaApplicationExtensionProperty + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationExtensionProperty` cmdlet gets application extension properties in Microsoft Entra ID. + +## Examples + +### Example 1: Get extension properties + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$Application = Get-EntraBetaApplication -SearchString '' +Get-EntraBetaApplicationExtensionProperty -ApplicationId $Application.Id +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsMultiValued IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ------------- ---------------------- ---- ------------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Boolean False False extension_c371a443f6734a3e8982a26357fb7d59_NewAttribute {User} +``` + +This command gets the extension properties for the specified application in Microsoft Entra ID. You cane use the command `Get-EntraBetaApplication` to get application ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +## Parameters + +### -ApplicationId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplicationExtensionProperty](New-EntraBetaApplicationExtensionProperty.md) + +[Remove-EntraBetaApplicationExtensionProperty](Remove-EntraBetaApplicationExtensionProperty.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md new file mode 100644 index 0000000000..83970daafb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md @@ -0,0 +1,87 @@ +--- +title: Get-EntraBetaApplicationKeyCredential +description: This article provides details on the Get-EntraBetaApplicationKeyCredential command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationKeyCredential + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationKeyCredential + +## Synopsis + +Gets the key credentials for an application. + +## Syntax + +```powershell +Get-EntraBetaApplicationKeyCredential + -ObjectId + [] +``` + +## Description + +The `Get-EntraBetaApplicationKeyCredential` cmdlet retrieves the key credentials for an application. Specify `ObjectId` parameter to retrieve the key credentials for an application. + +## Examples + +### Example 1: Get key credentials + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraBetaApplicationKeyCredential -ObjectId $application.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage +------------------- ----------- ----------- --- ----- ------------- ---- ----- +{116, 101, 115, 116…} MyApp Cert 6/27/2024 11:49:17 AM bbbbbbbb-1c1c-2d2d-3e3e-444444444444 6/27/2023 11:29:17 AM AsymmetricX509Cert Verify +``` + +This command gets the key credentials for the specified application. +`-ObjectId` parameter specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -ObjectId + +Specifies a unique ID of an application in Microsoft Entra ID to retrieve key credentials. Use `Get-EntraBetaApplication` for more details. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplicationKeyCredential](New-EntraBetaApplicationKeyCredential.md) + +[Remove-EntraBetaApplicationKeyCredential](Remove-EntraBetaApplicationKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md new file mode 100644 index 0000000000..7ddcd2cfda --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md @@ -0,0 +1,136 @@ +--- +title: Get-EntraBetaApplicationLogo +description: This article provides details on the Get-EntraBetaApplicationLogo command. + + +ms.topic: reference +ms.date: 06/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationLogo + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationLogo + +## Synopsis + +Retrieve the logo of an application. + +## Syntax + +```powershell +Get-EntraBetaApplicationLogo + -ApplicationId + [-FileName ] + [-FilePath ] + [-View ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationLogo` cmdlet retrieves the logo that is set for an application. Specify the `ApplicationId` parameter to get a specific application logo for an application. + +## Examples + +### Example 1: Get an application logo for an application by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplicationLogo -ApplicationId 'bbbbbbbb-1111-1111-1111-cccccccccccc' -FilePath 'D:\outfile1.jpg' +``` + +This example shows how to retrieve the application logo for an application that is specified through the Object ID parameter. + +## Parameters + +### -FileName + +If provided, the application logo is saved to the file using the specified file name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FilePath + +If provided, the application logo is copied with a random filename to the file path that is specified in this parameter. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +The ApplicationId of the application for which the logo is to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -View + +If set to $true, the application's logo is displayed in a new window on the screen. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +### System.Boolean + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaApplicationLogo](Set-EntraBetaApplicationLogo.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md new file mode 100644 index 0000000000..b218c94245 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md @@ -0,0 +1,211 @@ +--- +title: Get-EntraBetaApplicationOwner +description: This article provides details on the Get-EntraBetaApplicationOwner command. + + +ms.topic: reference +ms.date: 08/06/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationOwner + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationOwner + +## Synopsis + +Gets the owner of an application. + +## Syntax + +```powershell +Get-EntraBetaApplicationOwner + -ApplicationId + [-Top ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationOwner` cmdlet get an owner of an Microsoft Entra ID application. + +## Examples + +### Example 1: Get the owner of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraBetaApplication -SearchString '' +Get-EntraBetaApplicationOwner -ApplicationId $Application.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to get the owners of an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +### Example 2: Get the details about the owner of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -SearchString '' +$applicationOwners = Get-EntraBetaApplicationOwner -ObjectId $application.ObjectId +$ownerDetails = $applicationOwners | ForEach-Object { + $ownerDetail = Get-EntraBetaObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + displayName = $ownerDetail.displayName + Id = $ownerDetail.Id + UserPrincipalName = $ownerDetail.UserPrincipalName + UserType = $ownerDetail.UserType + accountEnabled = $ownerDetail.accountEnabled + } +} +$ownerDetails | Format-Table -Property displayName, Id, UserPrincipalName, UserType, accountEnabled -AutoSize +``` + +```Output +displayName Id UserPrincipalName UserType accountEnabled +----------- -- ----------------- -------- -------------- +Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc SawyerM@contoso.com Member True +Adele Vance ec5813fb-346e-4a33-a014-b55ffee3662b AdeleV@contoso.com Member True +``` + +This example demonstrates how to get the owners of an application in Microsoft Entra ID with more owner lookup details. + +### Example 3: Get all owners of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraBetaApplication -SearchString '' +Get-EntraBetaApplicationOwner -ApplicationId $Application.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to get the all owners of a specified application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +### Example 4: Get top two owners of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraBetaApplication -SearchString '' +Get-EntraBetaApplicationOwner -ApplicationId $Application.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to get the two owners of a specified application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaApplicationOwner](Add-EntraBetaApplicationOwner.md) + +[Remove-EntraBetaApplicationOwner](Remove-EntraBetaApplicationOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md new file mode 100644 index 0000000000..7cf278e30e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraBetaApplicationPasswordCredential +description: This article provides details on the Get-EntraBetaApplicationPasswordCredential command. + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPasswordCredential +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationPasswordCredential + +## Synopsis + +Gets the password credential for an application. + +## Syntax + +```powershell +Get-EntraBetaApplicationPasswordCredential + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationPasswordCredential` cmdlet receives the password credentials for a Microsoft Entra ID application. Specify `ApplicationId` parameter to cmdlet receives the password credentials. + +## Examples + +### Example 1: Get password credential for specified application + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraBetaApplicationPasswordCredential -ApplicationId $application.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +{100, 101, 109, 111} demo 26/07/2025 10:34:40 Ap6 bbbbbbbb-1111-2222-3333-cccccccccccc 26/07/2024 10:34:40 +``` + +This example shows how to retrieve the password credential for specified application. + +- `-ApplicationId` specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -ApplicationId + +The objectID of the application for which to get the password credential. Use `Get-EntraBetaApplication` for more details. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplicationPasswordCredential](New-EntraBetaApplicationPasswordCredential.md) + +[Remove-EntraBetaApplicationPasswordCredential](Remove-EntraBetaApplicationPasswordCredential.md) + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md new file mode 100644 index 0000000000..3e62e3c910 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md @@ -0,0 +1,89 @@ +--- +title: Get-EntraBetaApplicationPolicy +description: This article provides details on the Get-EntraBetaApplicationPolicy command. + + +ms.topic: reference +ms.date: 07/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationPolicy + +## Synopsis + +Gets an application policy. + +## Syntax + +```powershell +Get-EntraBetaApplicationPolicy + -Id + [] +``` + +## Description + +The `Get-EntraBetaApplicationPolicy` cmdlet gets a Microsoft Entra ID application policy. + +## Examples + +### Example 1: Get an application policy + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +Get-EntraBetaApplicationPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} NewUpdated aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command gets the specified application policy. + +- `-Id` Parameter Specifies the ID of the application for which you need to retrieve the policy. + +## Parameters + +### -Id + +The ID of the application for which you need to retrieve the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaApplicationPolicy](Add-EntraBetaApplicationPolicy.md) + +[Remove-EntraBetaApplicationPolicy](Remove-EntraBetaApplicationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md new file mode 100644 index 0000000000..b7e918d850 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md @@ -0,0 +1,114 @@ +--- +title: Get-EntraBetaApplicationProxyApplication +description: This article provides details on the Get-EntraBetaApplicationProxyApplication. + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplication + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationProxyApplication + +## Synopsis + +Retrieves an application configured for Application Proxy in Microsoft Entra ID. + +## Syntax + +```powershell +Get-EntraBetaApplicationProxyApplication + -ApplicationId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationProxyApplication` cmdlet retrieves an application configured for Application Proxy in Microsoft Entra ID. Specify `ApplicationId` parameter to retrieve application configured for application proxy. + +## Examples + +### Example 1: Retrieves an application configured for Application Proxy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyApplication -ApplicationId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +AlternateUrl ApplicationServerTimeout ApplicationType ExternalAuthenticationType ExternalUrl +------------ ------------------------ --------------- -------------------------- ----------- + Long enterpriseapp aadPreAuthentication +https://testp-m365x99297270.msapppr... +``` + +This example retrieves an application configured for Application Proxy. + +- `ApplicationId` parameter specifies the application ID. + +## Parameters + +### -ApplicationId + +This ApplicationId is the unique application ID of the application. +This ApplicationId can be found using the `Get-EntraBetaApplication` command. +You can also find ApplicationId in the Microsoft Portal by navigating to Microsoft Entra ID, Enterprise Applications, All Applications, Select your application, go to the properties tab, and use the ObjectId on that page. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaApplicationProxyApplication](New-EntraBetaApplicationProxyApplication.md) + +[Set-EntraBetaApplicationProxyApplication](Set-EntraBetaApplicationProxyApplication.md) + +[Remove-EntraBetaApplicationProxyApplication](Remove-EntraBetaApplicationProxyApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md new file mode 100644 index 0000000000..4827069397 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -0,0 +1,95 @@ +--- +title: Get-EntraBetaApplicationProxyApplicationConnectorGroup +description: This article provides details on the Get-EntraBetaApplicationProxyApplicationConnectorGroup. + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplicationConnectorGroup + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationProxyApplicationConnectorGroup + +## Synopsis + +The `Get-EntraBetaApplicationProxyApplicationConnectorGroup` cmdlet retrieves the connector group assigned for a specific application. + +## Syntax + +```powershell +Get-EntraBetaApplicationProxyApplicationConnectorGroup + -ObjectId + [] +``` + +## Description + +The `Get-EntraBetaApplicationProxyApplicationConnectorGroup` cmdlet retrieves the connector group assigned for the specified application. +The application must be configured for Application Proxy in Microsoft Entra ID. + +## Examples + +### Example 1: retrieves the connector group assigned for the specified application + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyApplicationConnectorGroup -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id Name ConnectorGroupType IsDefault +-- ---- ------------------ --------- +bbbbbbbb-1111-2222-3333-cccccccccccc test-group applicationProxy False +``` + +This example retrieves the connector group assigned for the specified application. + +- `ObjectId` parameter specifies the application ID. + +## Parameters + +### -ObjectId + +ObjectId is the ID of the application. +This ObjectId can be found using the `Get-EntraBetaApplication` command. +You can also find this ObjectId in the Microsoft Portal by navigating to Microsoft Entra ID, Enterprise Applications, All Applications, Select your application, go to the properties tab, and use the ObjectId on that page. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaApplicationProxyApplicationConnectorGroup](Set-EntraBetaApplicationProxyApplicationConnectorGroup.md) + +[Remove-EntraBetaApplicationProxyApplicationConnectorGroup](Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md new file mode 100644 index 0000000000..1574737eaa --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md @@ -0,0 +1,243 @@ +--- +title: Get-EntraBetaApplicationProxyConnector +description: This article provides details on the Get-EntraBetaApplicationProxyConnector command. + + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnector + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationProxyConnector + +## Synopsis + +The `Get-EntraBetaApplicationProxyConnector` cmdlet a list of all connectors, or if specified, details of a specific connector. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaApplicationProxyConnector + [-All] + [-Top ] + [-Filter ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaApplicationProxyConnector + [-SearchString ] + [-All] + [] +``` + +### GetById + +```powershell +Get-EntraBetaApplicationProxyConnector + -OnPremisesPublishingProfileId + [-All] + [] +``` + +## Description + +The `Get-EntraBetaApplicationProxyConnector` cmdlet retrieves the details for a given connector. +If no connectorId is specified, it retrieves all the connectors assigned to the tenant. + +## Examples + +### Example 1: Retrieve all connectors + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnector +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command Retrieve all connectors. + +### Example 2: Retrieve information for a specific connector + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnector -OnPremisesPublishingProfileId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to Retrieve information for a specific connector. + +- `OnPremisesPublishingProfileId` parameter specifies the connector ID. + +### Example 3: Retrieve information for a top one connector + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnector -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to Retrieve information for a top one connector. + +### Example 4: Retrieve information with SearchString parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnector -SearchString 'Entra PowerShell AppProxy Connector' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to Retrieve information using SearchString. + +### Example 5: Retrieve information using machineName property + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnector -Filter "machineName eq 'AppProxy Machine'" +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to Retrieve information using machineName property. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. +Details on querying with oData can be found here: + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OnPremisesPublishingProfileId + +The ID of the specific connector. +You can find this ID by running the command without this parameter to get the desired ID, or by going into the portal and viewing connector details. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS + +[Set-EntraBetaApplicationProxyConnector](Set-EntraBetaApplicationProxyConnector.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md new file mode 100644 index 0000000000..e2b8198783 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md @@ -0,0 +1,248 @@ +--- +title: Get-EntraBetaApplicationProxyConnectorGroup +description: This article provides details on the Get-EntraBetaApplicationProxyConnectorGroup. + + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroup + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationProxyConnectorGroup + +## Synopsis + +The `Get-EntraBetaApplicationProxyConnectorGroup` cmdlet retrieves a list of all connector groups, or if specified, details of a specific connector group. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaApplicationProxyConnectorGroup + [-All] + [-Top ] + [-Filter ] + [] +``` + +### GetByValue + +```powershell +Get-EntraBetaApplicationProxyConnectorGroup + [-SearchString ] + [-All] + [] +``` + +### GetById + +```powershell +Get-EntraBetaApplicationProxyConnectorGroup + -Id + [-All] + [] +``` + +## Description + +The `Get-EntraBetaApplicationProxyConnectorGroup` cmdlet retrieves a list of all connector groups, or if specified, details of the specified connector group. + +## Examples + +### Example 1: Retrieve all connector groups + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnectorGroup +``` + +```Output +Id ConnectorGroupType IsDefault Name Region +-- ------------------ --------- ---- ------ +bbbbbbbb-1111-2222-3333-cccccccccccc applicationProxy False Test eur +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb applicationProxy True Default eur +``` + +This example retrieves all connector groups. + +### Example 2: Retrieve a specific connector group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnectorGroup -Id 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Name Value +---- ----- +Id ConnectorGroupType IsDefault Name Region +-- ------------------ --------- ---- ------ +bbbbbbbb-1111-2222-3333-cccccccccccc applicationProxy False Test eur +``` + +This example retrieves a specific connector group. + +- `Id` parameter specifies the connector group ID. + +### Example 3: Retrieve Top one connector groups + +```powershell +Get-EntraBetaApplicationProxyConnectorGroup -Top 1 +``` + +```Output +Id ConnectorGroupType IsDefault Name Region +-- ------------------ --------- ---- ------ +bbbbbbbb-1111-2222-3333-cccccccccccc applicationProxy False Test eur +``` + +This example retrieves top one connector groups. + +### Example 4: Retrieve a connector groups with filter parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnectorGroup -Filter "name eq 'Default'" +``` + +```Output +Id ConnectorGroupType IsDefault Name Region +-- ------------------ --------- ---- ------ +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb applicationProxy True Default eur +``` + +This example retrieves a connector groups with filter parameter. + +### Example 5: Retrieve a connector groups with String parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnectorGroup -SearchString 'Test' +``` + +```Output +Id ConnectorGroupType IsDefault Name Region +-- ------------------ --------- ---- ------ +bbbbbbbb-1111-2222-3333-cccccccccccc applicationProxy False Test eur +``` + +This example retrieves a connector groups with String parameter. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. +Details on querying with oData can be found here: + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The ID of the specific connector group. +You can find this ID by running the command without this parameter to get the desired ID, or by going into the portal and viewing connector group details. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies the search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaApplicationProxyConnectorGroup](New-EntraBetaApplicationProxyConnectorGroup.md) + +[Set-EntraBetaApplicationProxyConnectorGroup](Set-EntraBetaApplicationProxyConnectorGroup.md) + +[Remove-EntraBetaApplicationProxyConnectorGroup](Remove-EntraBetaApplicationProxyConnectorGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md new file mode 100644 index 0000000000..78f7b49454 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md @@ -0,0 +1,178 @@ +--- +title: Get-EntraBetaApplicationProxyConnectorGroupMembers +description: This article provides details on the Get-EntraBetaApplicationProxyConnectorGroupMembers. + + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroupMembers + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationProxyConnectorGroupMembers + +## Synopsis + +The `Get-EntraBetaApplicationProxyConnectorGroupMembers` get all the Application Proxy connectors associated with the given connector group. + +## Syntax + +```powershell +Get-EntraBetaApplicationProxyConnectorGroupMembers + -OnPremisesPublishingProfileId + [-All] + [-Top ] + [-Filter ] +``` + +## Description + +The `Get-EntraBetaApplicationProxyConnectorGroupMembers` get all the Application Proxy connectors associated with the given connector group. + +## Examples + +### Example 1: Gets all the connectors in the group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnectorGroupMembers -OnPremisesPublishingProfileId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id ExternalIP MachineName Status Version +-- ---------- ----------- ------ ------- +bbbbbbbb-1111-2222-3333-cccccccccccc 106.195.6.123 AppProxy Machine active 1.5.3437.0 + +``` + +This example retrieves all the connectors in the group. + +- `OnPremisesPublishingProfileId` parameter specifies the connector group ID. + +### Example 2: Gets top one connector in the group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnectorGroupMembers -OnPremisesPublishingProfileId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Top 1 +``` + +```Output +Id ExternalIP MachineName Status Version +-- ---------- ----------- ------ ------- +bbbbbbbb-1111-2222-3333-cccccccccccc 106.195.6.123 AppProxy Machine active 1.5.3437.0 +``` + +This example retrieves top one connector in the group. + +- `OnPremisesPublishingProfileId` parameter specifies the connector group ID. + +### Example 3: Gets the connectors in the group with filter parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + OnPremisesPublishingProfileId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Filter = "machineName eq 'AppProxy Machine'" +} +Get-EntraBetaApplicationProxyConnectorGroupMembers @params +``` + +```Output +Id ExternalIP MachineName Status Version +-- ---------- ----------- ------ ------- +bbbbbbbb-1111-2222-3333-cccccccccccc 106.195.6.123 AppProxy Machine active 1.5.3437.0 + +``` + +This example retrieves a connector in the group using machineName property. + +- `OnPremisesPublishingProfileId` parameter specifies the connector group ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. This parameter controls which objects are returned. Details on querying with oData can be found here: + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OnPremisesPublishingProfileId + +The ID of the Connector group. This ID can be found by running the `Get-EntraBetaApplicationProxyConnectorGroup` command. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +## Inputs + +### System.String + +System. Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] +System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md new file mode 100644 index 0000000000..43828f604a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md @@ -0,0 +1,92 @@ +--- +title: Get-EntraBetaApplicationProxyConnectorMemberOf +description: This article provides details on the Get-EntraBetaApplicationProxyConnectorMemberOf command. + + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorMemberOf + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationProxyConnectorMemberOf + +## Synopsis + +The `Get-EntraBetaApplicationProxyConnectorMemberOf` command gets the ConnectorGroup that the specified Connector is a member of. + +## Syntax + +```powershell +Get-EntraBetaApplicationProxyConnectorMemberOf + -OnPremisesPublishingProfileId + [] +``` + +## Description + +The `Get-EntraBetaApplicationProxyConnectorMemberOf` command gets the ConnectorGroup that the specified Connector is a member of. +If no group is assigned to the connector, by default it is in 'Default.' + +## Examples + +### Example 1: Gets ConnectorGroup With Specified Connector ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaApplicationProxyConnectorMemberOf -OnPremisesPublishingProfileId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id ConnectorGroupType IsDefault Name Region +-- ------------------ --------- ---- ------ +bbbbbbbb-1111-2222-3333-cccccccccccc applicationProxy False Backup Application Servers +``` + +This example retrieves the ConnectorGroup With Specified Connector ID. + +- `-OnPremisesPublishingProfileId` parameter specifies the connector ID. + +## Parameters + +### -OnPremisesPublishingProfileId + +The ID of the connector. You can find ID by running `Get-EntraBetaApplicationProxyConnector`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaApplicationProxyConnector](Get-EntraBetaApplicationProxyConnector.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md new file mode 100644 index 0000000000..cc092ed756 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md @@ -0,0 +1,165 @@ +--- +title: Get-EntraBetaApplicationServiceEndpoint +description: This article provides details on the Get-EntraBetaApplicationServiceEndpoint command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationServiceEndpoint + +## Synopsis + +Retrieve the service endpoint of an application. + +## Syntax + +```powershell +Get-EntraBetaApplicationServiceEndpoint + -ApplicationId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationServiceEndpoint` cmdlet retrieves the service endpoint(s) of an application. + +The service endpoint entity contains service discovery information. The serviceEndpoints property of the Application entity is of type ServiceEndpoint. + +Other services can use the information stored in the ServiceEndpoint entity to find this service and its addressable endpoints. + +## Examples + +### Example 1: Retrieve the application service endpoint by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraBetaApplicationServiceEndpoint -ApplicationId $application.ObjectId +``` + +This example demonstrates how to retrieve service endpoint of the application that is specified through the Object ID parameter. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +### Example 2: Get all service endpoints + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraBetaApplicationServiceEndpoint -ApplicationId $application.ObjectId -All +``` + +This example demonstrates how to retrieve all service endpoints of a specified application. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +### Example 3: Get top five service endpoints + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'" +Get-EntraBetaApplicationServiceEndpoint -ApplicationId $application.ObjectId -Top 5 +``` + +This example demonstrates how to retrieve five service endpoints of a specified application. + +`-ApplicationId` parameter specifies the ID of an application object in Microsoft Entra ID. + +## Parameters + +### -All + +Return all service endpoints. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the object ID of the application for which the service endpoint is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of results that are returned. +The default is 100. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md new file mode 100644 index 0000000000..7c2a5ab892 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md @@ -0,0 +1,123 @@ +--- +title: Get-EntraBetaApplicationTemplate +description: This article provides details on the Get-EntraBetaApplicationTemplate command. + + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationTemplate + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationTemplate + +## Synopsis + +Retrieve a list of applicationTemplate objects. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaApplicationTemplate + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaApplicationTemplate + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationTemplate` cmdlet allows users to get a list of all the application templates or a specific application template. + +## Examples + +### Example 1. Gets a list of application template objects + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplicationTemplate +``` + +This command gets all the application template objects + +### Example 2. Gets an application template object + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaApplicationTemplate -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id Categories Description +-- ---------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {businessMgmt, productivity, projectManagement} Cube is perfect for businesses +``` + +This command gets an application template object for the given id. + +- `-Id` Specifies the unique identifier of an application template. + +## Parameters + +### -Id + +The unique identifier of an application template. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.ApplicationTemplate + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md new file mode 100644 index 0000000000..845a5f156b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md @@ -0,0 +1,257 @@ +--- +title: Get-EntraBetaDeletedApplication +description: This article provides details on the Get-EntraBetaDeletedApplication command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedApplication + +schema: 2.0.0 +--- + +# Get-EntraBetaDeletedApplication + +## Synopsis + +Retrieves the list of previously deleted applications. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDeletedApplication + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaDeletedApplication + [-SearchString ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDeletedApplication` cmdlet Retrieves the list of previously deleted applications. + +Note: Deleted security groups are permanently removed and cannot be retrieved. + +## Examples + +### Example 1: Get list of deleted applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaDeletedApplication +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com +TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com +``` + +This cmdlet retrieves the list of deleted applications. + +### Example 2: Get list of deleted applications using All parameter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaDeletedApplication -All +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +TestApp3 eeeeeeee-6666-7777-8888-ffffffffffff ffffffff-7777-8888-9999-gggggggggggg AzureADMyOrg contoso.com +TestApp4 gggggggg-8888-9999-aaaa-hhhhhhhhhhhh hhhhhhhh-9999-aaaa-bbbb-iiiiiiiiiiii AzureADMyOrg contoso.com +``` + +This cmdlet retrieves the list of deleted applications using All parameter. + +### Example 3: Get top two deleted applications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaDeletedApplication -Top 2 +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +TestApp2 cccccccc-4444-5555-6666-dddddddddddd dddddddd-5555-6666-7777-eeeeeeeeeeee AzureADMyOrg contoso.com +``` + +This cmdlet retrieves top two deleted applications. + +### Example 4: Get deleted applications using SearchString parameter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaDeletedApplication -SearchString 'TestApp1' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This cmdlet retrieves deleted applications using SearchString parameter. + +### Example 5: Get deleted applications filter by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaDeletedApplication -Filter "DisplayName eq 'TestApp1'" +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +TestApp1 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com +``` + +This cmdlet retrieves deleted applications having specified display name. + +### Example 6: Get deleted applications with deletion age in days + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaDeletedApplication | + Select-Object DisplayName, Id, AppId, SignInAudience, PublisherDomain, DeletedDateTime, + @{Name='DeletionAgeInDays'; Expression={(Get-Date) - $_.DeletedDateTime | Select-Object -ExpandProperty Days}} | + Format-Table -AutoSize +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain DeletedDateTime DeletionAgeInDays +----------- -- ----- -------------- --------------- --------------- ----------------- +Entra PowerShell App aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb bbbbbbbb-1111-2222-3333-cccccccccccc AzureADMyOrg contoso.com 9/18/2024 7:41:44 AM 1 +``` + +This cmdlet retrieves deleted applications with deletion age in days. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Retrieve only those deleted applications that satisfy the filter. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Retrieve only those applications that satisfy the -SearchString value. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of applications returned by this cmdlet. +The default value is 100. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md new file mode 100644 index 0000000000..754c422b0c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md @@ -0,0 +1,117 @@ +--- +title: Get-EntraBetaPasswordSingleSignOnCredential +description: This article provides details on the Get-EntraBetaPasswordSingleSignOnCredential command. + +ms.topic: reference +ms.date: 07/09/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordSingleSignOnCredential + +schema: 2.0.0 +--- + +# Get-EntraBetaPasswordSingleSignOnCredential + +## Synopsis + +Gets the password Single-Sign-On (SSO) credentials. + +## Syntax + +```powershell +Get-EntraBetaPasswordSingleSignOnCredential + -ObjectId + -PasswordSSOObjectId + [] +``` + +## Description + +This cmdlet enables users to read their Password Single-Sign-On credentials for an application that they're part of. Specify `ObjectId` and `PasswordSSOCredential` parameters for retrieve SSO credentials. +Admin could read the group credentials as well. +Note that the password field is hidden for security purpose. + +## Examples + +### Example 1: Get password single-sign-on credentials + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$servicePrincipal = Get-EntraBetaservicePrincipal -SearchString '' +$params = @{ + ObjectId = $servicePrincipal.Id + PasswordSSOObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Get-EntraBetaPasswordSingleSignOnCredential @params +``` + +```Output +Id +-- +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example returns a password SSO credential for the given ObjectId and PasswordSSOObjectId. + +- `PasswordSSOObjectId` parameter specifies the ID of the user or group this credential set belongs to. +- `ObjectId` parameter specifies the ID of a service principal. You can use `Get-EntraBetaservicePrincipal` cmdlet to get service principal object ID. + +## Parameters + +### -ObjectId + +The unique identifier of the object specific Microsoft Entra ID object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordSSOObjectId + +The ID of the user or group this credential set belongs to. + +```yaml +Type: System.PasswordSSOObjectId +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.PasswordSSOCredentials + +## Notes + +## Related Links + +[New-EntraBetaPasswordSingleSignOnCredential](New-EntraBetaPasswordSingleSignOnCredential.md) + +[Set-EntraBetaPasswordSingleSignOnCredential](Set-EntraBetaPasswordSingleSignOnCredential.md) + +[Remove-EntraBetaPasswordSingleSignOnCredential](Remove-EntraBetaPasswordSingleSignOnCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md new file mode 100644 index 0000000000..305cfcf931 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md @@ -0,0 +1,369 @@ +--- +title: Get-EntraBetaServicePrincipal +description: This article provides details on the Get-EntraBetaServicePrincipal command. + + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipal + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipal + +## Synopsis + +Gets a service principal. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaServicePrincipal + [-Top ] + [-All] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaServicePrincipal + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaServicePrincipal + -ServicePrincipalId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipal` cmdlet gets a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve all service principal from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +ProvisioningPowerBi cccccccc-2222-3333-4444-dddddddddddd 22223333-cccc-4444-dddd-5555eeee6666 Application +``` + +This example retrieves all service principals from the directory. + +### Example 2: Retrieve a service principal by ServicePrincipalId + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -ServicePrincipalId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This command retrieves specific service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 3: Retrieve all service principals from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -All +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +ProvisioningPowerBi cccccccc-2222-3333-4444-dddddddddddd 22223333-cccc-4444-dddd-5555eeee6666 Application +``` + +This example retrieves all service principals from the directory. + +### Example 4: Retrieve top two service principal from the directory + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -Top 2 +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +Microsoft Device Management Checkin bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 AzureADMultipleOrgs Application +``` + +This command retrieves top two service principals from the directory. + +### Example 5: Get a service principal by display name + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'M365 License Manager'" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This example gets a service principal by its display name. + +### Example 6: Retrieve a list of all service principal, which has a display name that contains "M365 License Manager" + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -SearchString 'M365 License Manager' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +M365 License Manager aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMultipleOrgs Application +``` + +This example gets a list of service principal, which has the specified display name. + +### Example 7: Retrieve all Enterprise apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryIntegratedApp')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Enterprise App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +Enterprise App2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application +``` + +This example demonstrates how to retrieve all enterprise apps. + +### Example 8: Retrieve all App proxy apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -Filter "tags/Any(x: x eq 'WindowsAzureActiveDirectoryOnPremApp')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +App proxy 1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +App proxy 2 11112222-bbbb-3333-cccc-4444dddd5555 22223333-cccc-4444-dddd-5555eeee6666 AzureADMultipleOrgs Application +``` + +This example demonstrates how to retrieve all app proxy apps. + +### Example 9: Retrieve all disabled apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -Filter "accountEnabled eq false" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Disabled App1 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all disabled apps. + +### Example 10: Retrieve all Global Secure Access apps + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -Filter "tags/Any(x: x eq 'PrivateAccessNonWebApplication') or tags/Any(x: x eq 'NetworkAccessManagedApplication')" +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Global secure access app 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all Global secure access apps. + +### Example 11: List all applications without user assignment + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +Get-EntraBetaServicePrincipal -All | Where-Object {$_.appRoleAssignmentRequired -ne 'true'} +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +App without user assignment 00001111-aaaa-2222-bbbb-3333cccc4444 33334444-dddd-5555-eeee-6666ffff7777 Application +``` + +This example demonstrates how to retrieve all applications without user assignment. + +### Example 12: List all SAML application details + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraServicePrincipal -Filter "PreferredSingleSignOnMode eq 'saml'" +$servicePrincipal | Select-Object Id, DisplayName, AccountEnabled, AppId, PreferredSingleSignOnMode, AppRoleAssignmentRequired, SignInAudience, NotificationEmailAddresses, PreferredTokenSigningKeyEndDateTime, PreferredTokenSigningKeyValid, ReplyUrls,LoginUrl, LogoutUrl | Format-Table -AutoSize +``` + +```Output +Id DisplayName AccountEnabled AppId PreferredSingleSignOnMode AppRoleAssignmentRequired SignInAudience NotificationEmailAddresses +-- ----------- -------------- ----- ------------------------- ------------------------- -------------- -------------- +00001111-aaaa-2222-bbbb-3333cccc4444 SAML App True 33334444-dddd-5555-eeee-6666ffff7777 saml True AzureADMyOrg {admin@Contoso} +``` + +This example demonstrates how to retrieve all SAML application details. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) + +[Remove-EntraBetaServicePrincipal](Remove-EntraBetaServicePrincipal.md) + +[Set-EntraBetaServicePrincipal](Set-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md new file mode 100644 index 0000000000..e3dc5e694c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md @@ -0,0 +1,200 @@ +--- +title: Get-EntraBetaServicePrincipalAppRoleAssignedTo +description: This article provides details on the Get-EntraBetaServicePrincipalAppRoleAssignedTo command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignedTo + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalAppRoleAssignedTo + +## Synopsis + +Gets app role assignments for this app or service, granted to users, groups, and other service principals. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalAppRoleAssignedTo + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalAppRoleAssignedTo` cmdlet gets app role assignments for this app or service, granted to users, groups, and other service principals. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Get app role assignment by ID + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box +``` + +This example shows how to get app role assignments for an app or service, granted to users, groups, and other service principals. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Get all app role assignments + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" + Get-EntraBetaServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box aaaa0000-bb11-2222-33cc-444444dddddd +2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box bbbb1111-cc22-3333-44dd-555555eeeeee +3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box cccc2222-dd33-4444-55ee-666666ffffff +4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box dddd3333-ee44-5555-66ff-777777aaaaaa +5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box eeee4444-ff55-6666-77aa-888888bbbbbb +``` + +This command gets the all app role assignments for the service principal granted to users, groups, and other service principals. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Get five app role assignments + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalAppRoleAssignedTo -ServicePrincipalId $ServicePrincipal.ObjectId -Top 5 +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box aaaa0000-bb11-2222-33cc-444444dddddd +2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box bbbb1111-cc22-3333-44dd-555555eeeeee +3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box cccc2222-dd33-4444-55ee-666666ffffff +4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box dddd3333-ee44-5555-66ff-777777aaaaaa +5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box eeee4444-ff55-6666-77aa-888888bbbbbb +``` + +This command gets the five app role assignments for the service principal granted to users, groups, and other service principals. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +`Get-EntraBetaServiceAppRoleAssignedTo` is an alias for `Get-EntraBetaServicePrincipalAppRoleAssignedTo`. + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..9a5107689f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md @@ -0,0 +1,198 @@ +--- +title: Get-EntraBetaServicePrincipalAppRoleAssignment +description: This article provides details on the Get-EntraBetaServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalAppRoleAssignment + +## Synopsis + +Gets a service principal application role assignment. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalAppRoleAssignment + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalAppRoleAssignment` cmdlet gets a role assignment for a service principal application in Microsoft Entra ID. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Retrieve the application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + $ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" + Get-EntraBetaServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User ProvisioningPowerBi 021510b7-e753-40… +``` + +This command gets application role assignments for specified service principal. You can use the command `Get-EntraBetaServicePrincipal` to get service principal Id. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +### Example 2: Retrieve all application role assignments for a service principal + +```powershell + Connect-Entra -Scopes 'Application.Read.All' + $ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" + Get-EntraBetaServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User ProvisioningPowerBi 021510b7-e753-40… +2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User1 ProvisioningPowerBi 021510b7-e753-40… +3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User2 ProvisioningPowerBi 021510b7-e753-40… +4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User3 ProvisioningPowerBi 021510b7-e753-40… +5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User4 ProvisioningPowerBi 021510b7-e753-40… +``` + +This command gets all application role assignments for specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +### Example 3: Retrieve the top three application role assignments for a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipal.ObjectId -Top 3 +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User ProvisioningPowerBi 021510b7-e753-40… +2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User1 ProvisioningPowerBi 021510b7-e753-40… +3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 07-07-2023 17:03:59 MOD Administrator aaaaaaaa-bbbb-cccc-1111-222222222222 User2 ProvisioningPowerBi 021510b7-e753-40… +``` + +This command gets top three application role assignments for specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraBetaServiceAppRoleAssignment` is an alias for `Get-EntraBetaServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) + +[New-EntraBetaServicePrincipalAppRoleAssignment](New-EntraBetaServicePrincipalAppRoleAssignment.md) + +[Remove-EntraBetaServicePrincipalAppRoleAssignment](Remove-EntraBetaServicePrincipalAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md new file mode 100644 index 0000000000..3d0a7acbb1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md @@ -0,0 +1,157 @@ +--- +title: Get-EntraBetaServicePrincipalCreatedObject +description: This article provides details on the Get-EntraBetaServicePrincipalCreatedObject command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalCreatedObject + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalCreatedObject + +## Synopsis + +Get objects created by a service principal. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalCreatedObject + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalCreatedObject` cmdlet gets an object created by a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the objects that created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +This example gets objects created by the service principal identified by $ServicePrincipalId. You can use the command `Get-EntraBetaServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Retrieve the all objects created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +This example demonstrates how to get the all object created by a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Retrieve the top two objects created by a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalCreatedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +This example demonstrates how to get the top two object created by a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..b6f0396faa --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,205 @@ +--- +title: Get-EntraBetaServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Get-EntraBetaServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Retrieve the delegated permission classification objects on a service principal. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalDelegatedPermissionClassification` cmdlet retrieves the delegated permission classifications from a service principal. + +## Examples + +### Example 1: Get a list of delegated permission classifications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId +} +Get-EntraBetaServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +cccccccc-8888-9999-0000-dddddddddddd low dddd3333-ee44-5555-66ff-777777aaaaaa profile +``` + +This command retrieves all delegated permission classifications from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraBetaServicePrincipal` to get more details. + +### Example 2: Get a delegated permission classifications + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + Id = '5XBeIKarUkypdm0tRsSAQwE' +} +Get-EntraBetaServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +``` + +This command retrieves the delegated permission classification by Id from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraBetaServicePrincipal` to get more details. +- `-Id` parameter specifies the delegated permission classification object Id. + +### Example 3: Get a delegated permission classification with filter + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + Filter = "PermissionName eq 'Sites.Read.All'" +} +Get-EntraBetaServicePrincipalDelegatedPermissionClassification @params +``` + +```Output +Id Classification PermissionId PermissionName +-- -------------- ------------ -------------- +bbbbbbbb-7777-8888-9999-cccccccccccc low eeeeeeee-4444-5555-6666-ffffffffffff Sites.Read.All +``` + +This command retrieves the filtered delegated permission classifications from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. Use `Get-EntraBetaServicePrincipal` to get more details. +- `-Id` parameter specifies the delegated permission classification object Id. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a delegated permission classification object ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DelegatedPermissionClassification + +## Notes + +## Related Links + +[Add-EntraBetaServicePrincipalDelegatedPermissionClassification](Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md) + +[Remove-EntraBetaServicePrincipalDelegatedPermissionClassification](Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md new file mode 100644 index 0000000000..c7763e3459 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md @@ -0,0 +1,88 @@ +--- +title: Get-EntraBetaServicePrincipalKeyCredential +description: This article provides details on the Get-EntraBetaServicePrincipalKeyCredential command. + + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalKeyCredential + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalKeyCredential + +## Synopsis + +Get key credentials for a service principal. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalKeyCredential + -ServicePrincipalId + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalKeyCredential` cmdlet gets the key credentials for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the key credential of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalKeyCredential -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Key KeyId StartDateTime Type Usage +------------------- ----------- ----------- --- ----- ------------- ---- ----- + 08-02-2025 09:57:08 68b45e27-fef8-4f0d-bc7a-76bd949c16d1 08-02-2024 09:57:08 Symmetric Sign +``` + +This example retrieves the key credentials for specified service principal in Microsoft Entra ID. You can use the command `Get-EntraBetaServicePrincipal` to get a service principal object Id. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of the application for which to get the password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md new file mode 100644 index 0000000000..beaa7a0990 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md @@ -0,0 +1,179 @@ +--- +title: Get-EntraBetaServicePrincipalMembership +description: This article provides details on the Get-EntraBetaServicePrincipalMembership command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalMembership + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalMembership + +## Synopsis + +Get a service principal membership. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalMembership + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalMembership` cmdlet gets the memberships of a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +``` + +This cmdlet retrieves a specified service principal memberships in Microsoft Entra ID. You can use the command `Get-EntraBetaServicePrincipal` to get service principal ID. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 2: Retrieve all memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +22223333-cccc-4444-dddd-5555eeee6666 +33334444-dddd-5555-eeee-6666ffff7777 +``` + +This command gets all memberships of a specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +### Example 3: Retrieve top two memberships of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalMembership -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +11112222-aaaa-3333-bbbb-4444cccc5555 +22223333-cccc-4444-dddd-5555eeee6666 + +``` + +This command gets top two memberships of a specified service principal. + +- `-ServicePrincipalId` parameter specifies the service principal ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md new file mode 100644 index 0000000000..555ebda850 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md @@ -0,0 +1,178 @@ +--- +title: Get-EntraBetaServicePrincipalOAuth2PermissionGrant +description: This article provides details on the Get-EntraBetaServicePrincipalOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalOAuth2PermissionGrant + +## Synopsis + +Gets an OAuth2PermissionGrant object. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalOAuth2PermissionGrant + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalOAuth2PermissionGrant` cmdlet gets an OAuth2PermissionGrant object for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOAuth2PermissionGrant -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +``` + +This cmdlet retrieves a OAuth2PermissionGrant object for a service principal in Microsoft Entra ID. You can use the command `Get-EntraBetaServicePrincipal` to get service principal Id. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 2: Get all OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOAuth2PermissionGrant -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 996d39aa-fdac-4d97-aa3d-c81fb47362ac aaaaaaaa-bbbb-cccc-1111-222222222222 PrivilegedAccess... +``` + +This example demonstrates how to get all OAuth2PermissionGrant objects for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 3: Get two OAuth2 permission grants of a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOAuth2PermissionGrant -ServicePrincipalId $ServicePrincipal.ObjectId -Top 2 +``` + +```Output +Id ClientId ConsentType PrincipalId ResourceId Scope +-- -------- ----------- ----------- ---------- ----- +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 412be9d1-1460-4061-8eed-cca203fcb215 aaaaaaaa-bbbb-cccc-1111-222222222222 openid profile U... +A1bC2dE3f... 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 996d39aa-fdac-4d97-aa3d-c81fb47362ac aaaaaaaa-bbbb-cccc-1111-222222222222 PrivilegedAccess... +``` + +This example demonstrates how to get top two OAuth2PermissionGrant objects for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md new file mode 100644 index 0000000000..c8395664e2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md @@ -0,0 +1,194 @@ +--- +title: Get-EntraBetaServicePrincipalOwnedObject +description: This article provides details on the Get-EntraBetaServicePrincipalOwnedObject command. + +ms.topic: reference +ms.date: 08/13/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwnedObject + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalOwnedObject + +## Synopsis + +Gets an object owned by a service principal. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalOwnedObject + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalOwnedObject` cmdlet retrieves an object owned by a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +The command retrieves the owned objects of a service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 2: Retrieve the all owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipalId = (Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''").ObjectId +Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipalId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves an object owned by a service principal in Microsoft Entra ID. You can use the command `Get-EntraBetaServicePrincipal` to get service principal Id. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 2: Retrieve all owned objects of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +The command receives the all owned objects of a service principal. + +- `-ServicePrincipalId` Parameter specifies the ID of a service principal. + +### Example 3: Retrieve top one owned object of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId $ServicePrincipal.ObjectId -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves the top one owned object of a specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md new file mode 100644 index 0000000000..7f9b5b99c0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md @@ -0,0 +1,216 @@ +--- +title: Get-EntraBetaServicePrincipalOwner +description: This article provides details on the Get-EntraBetaServicePrincipalOwner command. + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwner + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalOwner + +## Synopsis + +Get the owner of a service principal. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalOwner + -ServicePrincipalId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalOwner` cmdlet gets the owners of a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the owner of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example gets the owners of a specified service principal. You can use the command `Get-EntraBetaServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 2: Retrieve all the owners of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This command gets all the owners of a service principal. You can use the command `Get-EntraBetaServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 3: Retrieve top two owners of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalOwner -ObjectId $servicePrincipal.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This command gets top two owners of a service principal. You can use the command `Get-EntraBetaServicePrincipal` to get service principal object ID. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. + +### Example 4: Retrieve service principal owner details + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +# Get the owners of the service principal +$owners = Get-EntraBetaServicePrincipalOwner -ServicePrincipalId $servicePrincipal.ObjectId -All +$result = @() + +# Loop through each owner and get their UserPrincipalName and DisplayName +foreach ($owner in $owners) { + $userId = $owner.Id + $user = Get-EntraBetaUser -ObjectId $userId + $userDetails = [PSCustomObject]@{ + Id = $owner.Id + UserPrincipalName = $user.UserPrincipalName + DisplayName = $user.DisplayName + } + $result += $userDetails +} + +# Output the result in a table format +$result | Format-Table -AutoSize +``` + +```Output +Id UserPrincipalName DisplayName +-- ----------------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AlexW@contoso.com Alex Wilber +bbbbbbbb-1111-2222-3333-cccccccccccc AdeleV@contoso.com Adele Vance +``` + +This example shows how to retrieve more details of a service principal owner such as displayName, userPrincipalName. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaServicePrincipalOwner](Add-EntraBetaServicePrincipalOwner.md) + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) + +[Remove-EntraBetaServicePrincipalOwner](Remove-EntraBetaServicePrincipalOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..91cba4da09 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md @@ -0,0 +1,92 @@ +--- +title: Get-EntraBetaServicePrincipalPasswordCredential +description: This article provides details on the Get-EntraBetaServicePrincipalPasswordCredential command. + + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalPasswordCredential + +## Synopsis + +Get credentials for a service principal. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalPasswordCredential + -ServicePrincipalId + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalPasswordCredential` cmdlet gets the password credentials for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the password credential of a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Get-EntraBetaServicePrincipalPasswordCredential -ServicePrincipalId $ServicePrincipal.ObjectId +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 17-04-2025 07:32:41 gjW bdf6a3df-cc9b-4612-b948-e32804ee88f7 17-04-2024 07:32:41 + 21-03-2025 08:12:08 4fl 7f4414ec-8f72-49a8-b949-70d635899656 21-03-2024 08:12:08 + 12-12-2024 08:39:07 mjl 0fff6b21-0a20-4f7c-93ba-26ed9b648344 12-12-2023 08:39:10 +``` + +This example retrieves the password credentials for specified service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the object ID of a service principal. You can use the command `Get-EntraBetaServicePrincipal` to get a service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of the service principal for which to get password credentials. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaServicePrincipalPasswordCredential](New-EntraBetaServicePrincipalPasswordCredential.md) + +[Remove-EntraBetaServicePrincipalPasswordCredential](Remove-EntraBetaServicePrincipalPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md new file mode 100644 index 0000000000..7e7f35be9b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md @@ -0,0 +1,565 @@ +--- +title: New-EntraBetaApplication +description: This article provides details on the New-EntraBetaApplication command. + + +ms.topic: reference +ms.date: 06/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplication + +schema: 2.0.0 +--- + +# New-EntraBetaApplication + +## Synopsis + +Creates (registers) a new application object. + +## Syntax + +```powershell +New-EntraBetaApplication + -DisplayName + [-Api ] + [-OptionalClaims ] + [-PreAuthorizedApplications ] + [-Web ] + [-IsFallbackPublicClient ] + [-RequiredResourceAccess ] + [-PublicClient ] + [-IsDeviceOnlyAuthSupported ] + [-OrgRestrictions ] + [-KeyCredentials ] + [-TokenEncryptionKeyId ] + [-IdentifierUris ] + [-ParentalControlSettings ] + [-GroupMembershipClaims ] + [-AddIns ] + [-Tags ] + [-AppRoles ] + [-PasswordCredentials ] + [-SignInAudience ] + [-InformationalUrl ] + [] +``` + +## Description + +Creates (registers) a new application object. Specify the `DisplayName` parameter to create a new application. + +## Examples + +### Example 1: Create an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +New-EntraBetaApplication -DisplayName 'My new application' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg domain.mail.contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 2: Create an application using IdentifierUris parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +New-EntraBetaApplication -DisplayName 'My new application' -IdentifierUris 'https://mynewapp.contoso.com' +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg domain.mail.contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 3: Create an application using Api parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$api = @{ RequestedAccessTokenVersion = 2 } +New-EntraBetaApplication -DisplayName 'My new application' -Api $api +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg domain.mail.contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 4: Create an application using AppRoles parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$types = @() +$types += 'User' +$approle = New-Object Microsoft.Open.MSGraph.Model.AppRole +$approle.AllowedMemberTypes = $types +$approle.Description = 'msiam_access' +$approle.DisplayName = 'msiam_access' +$approle.Id = '643985ce-3eaf-4a67-9550-ecca25cb6814' +$approle.Value = 'Application' +$approle.IsEnabled = $true +New-EntraBetaApplication -DisplayName 'My new application' -AppRoles $approle +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg domain.mail.contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +### Example 5: Create an application using OptionalClaims parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$optionalClaims = @{ IdToken = [PSCustomObject]@{ Name = "claimName"; Source = "claimSource" } } +New-EntraBetaApplication -DisplayName 'My new application' -OptionalClaims $optionalClaims +``` + +```Output +DisplayName Id AppId SignInAudience PublisherDomain +----------- -- ----- -------------- --------------- +My new application aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg domain.mail.contoso.com +``` + +This command creates an application in Microsoft Entra ID. + +## Parameters + +### -AddIns + +Defines custom behavior that a consuming service can use to call an app in specific contexts. + +For example, applications that can render file streams may set the addIns property for its "FileHandler" functionality. + +This will let services like Office 365 call the application in the context of a document the user is working on. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Api + +Specifies settings for an application that implements a web API. + +```yaml +Type: ApiApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoles + +The collection of application roles that an application might declare. +These roles can be assigned to users, groups, or service principals. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupMembershipClaims + +Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentifierUris + +User-defined URI(s) that uniquely identify a Web application within its Microsoft Entra ID tenant, or within a verified custom domain (see "Domains" tab in the Azure classic portal) if the application is multi-tenant. + +The first element is populated from the Web application's "APP ID URI" field if updated via the Azure classic portal (or respective Microsoft Entra ID PowerShell cmdlet parameter). + +Extra URIs can be added via the application manifest; see Understanding the Microsoft Entra ID Application Manifest for details. +This collection is also used to populate the Web application's servicePrincipalNames collection. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InformationalUrl + +Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. + +The terms of service and privacy statement are surfaced to users through the user consent experience. + +```yaml +Type: InformationalUrl +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsDeviceOnlyAuthSupported + +Specifies if the application supports authentication using a device token. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsFallbackPublicClient + +Specifies the fallback application type as public client, such as an installed application running on a mobile device. + +The default value is false that means the fallback application type is confidential client such as web app. + +There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). + +In those cases Microsoft Entra ID interprets the application type based on the value of this property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +The collection of key credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OptionalClaims + +Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. + +```yaml +Type: OptionalClaims +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgRestrictions + +Reserved for future use. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentalControlSettings + +Specifies parental control settings for an application. + +```yaml +Type: ParentalControlSettings +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +The collection of password credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreAuthorizedApplications + +Lists applications and requested permissions for implicit consent. +Requires an admin to have provided consent to the application. + +preAuthorizedApplications don't require the user to consent to the requested permissions. +Permissions listed in preAuthorizedApplications don't require user consent. + +However, any additional requested permissions not listed in preAuthorizedApplications require user consent. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicClient + +Specifies whether this application is a public client (such as an installed application running on a mobile device). +Default is false. + +```yaml +Type: PublicClientApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequiredResourceAccess + +Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. + +This pre-configuration of required resource access drives the consent experience. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInAudience + +Specifies what Microsoft accounts are supported for the current application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Custom strings that can be used to categorize and identify the application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TokenEncryptionKeyId + +Specifies the keyId of a public key from the keyCredentials collection. + +When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. + +The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Web + +Specifies settings for a web application. + +```yaml +Type: WebApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Boolean + +### Microsoft.Open.MSGraph.Model.ApiApplication + +### Microsoft.Open.MSGraph.Model.InformationalUrl + +### Microsoft.Open.MSGraph.Model.OptionalClaims + +### Microsoft.Open.MSGraph.Model.ParentalControlSettings + +### Microsoft.Open.MSGraph.Model.PublicClientApplication + +### Microsoft.Open.MSGraph.Model.WebApplication + +### String + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] + +### System.Collections.Generic.List`1[System.String] + +### System.Nullable`one[System.Boolean] + +## Outputs + +### Microsoft.Open.MSGraph.Model.MsApplication + +## Notes + +## Related Links + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) + +[Remove-EntraBetaApplication](Remove-EntraBetaApplication.md) + +[Set-EntraBetaApplication](Set-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md new file mode 100644 index 0000000000..a4ff214723 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md @@ -0,0 +1,215 @@ +--- +title: New-EntraBetaApplicationExtensionProperty +description: This article provides details on the New-EntraBetaApplicationExtensionProperty command. + + +ms.topic: reference +ms.date: 08/06/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationExtensionProperty + +schema: 2.0.0 +--- + +# New-EntraBetaApplicationExtensionProperty + +## Synopsis + +Creates an application extension property. + +## Syntax + +```powershell +New-EntraBetaApplicationExtensionProperty + -ApplicationId + [-DataType ] + -Name + [-TargetObjects ] + [] +``` + +## Description + +The `New-EntraBetaApplicationExtensionProperty` cmdlet creates an application extension property for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Create an extension property + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraBetaApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' +} + +New-EntraBetaApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} +``` + +This command creates an application extension property of the string type for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. + +### Example 2: Create an extension property with data type parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraBetaApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' + DataType = 'Boolean' +} + +New-EntraBetaApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app Boolean False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {} +``` + +This command creates an application extension property of the specified data type for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. +- `-DataType` parameter specifies the data type of the value the extension property can hold. + +### Example 3: Create an extension property with targets parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraBetaApplication -SearchString '' +$targets = New-Object System.Collections.Generic.List[System.String] +$targets.Add('User') +$params = @{ + ApplicationId = $Application.ObjectId + Name = 'NewAttribute' + TargetObjects = $targets +} + +New-EntraBetaApplicationExtensionProperty @params +``` + +```Output +DeletedDateTime Id AppDisplayName DataType IsSyncedFromOnPremises Name TargetObjects +--------------- -- -------------- -------- ---------------------- ---- ------------- + 11112222-bbbb-3333-cccc-4444dddd5555 My new test app String False extension_11112222-bbbb-3333-cccc-4444dddd5555_NewAttribute {User} +``` + +The example shows how to create an application extension property with the specified target objects for the specified object. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-Name` parameter specifies the name of the extension property. +- `-TargetObjects` parameter specifies the Microsoft Graph resources that use the extension property. All values must be in PascalCase. + +## Parameters + +### -DataType + +Specifies the data type of the value the extension property can hold. Following values are supported. + +- Binary - 256 bytes maximum +- Boolean +- DateTime - Must be specified in ISO 8601 format. Will be stored in UTC. +- Integer - 32-bit value. +- LargeInteger - 64-bit value. +- String - 256 characters maximum + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +Specifies the name of the extension property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjects + +Specifies the Microsoft Graph resources that can use the extension property. All values must be in PascalCase. The following values are supported. + +- User +- Group +- AdministrativeUnit +- Application +- Device +- Organization + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplicationExtensionProperty](Get-EntraBetaApplicationExtensionProperty.md) + +[Remove-EntraBetaApplicationExtensionProperty](Remove-EntraBetaApplicationExtensionProperty.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md new file mode 100644 index 0000000000..97e05ad89c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md @@ -0,0 +1,86 @@ +--- +title: New-EntraBetaApplicationFromApplicationTemplate +description: This article provides details on the New-EntraBetaApplicationFromApplicationTemplate command. + + +ms.service: entra +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationFromApplicationTemplate + +schema: 2.0.0 +--- + +# New-EntraBetaApplicationFromApplicationTemplate + +## Synopsis +Instantiates an application. + +## Syntax + +``` +New-EntraBetaApplicationFromApplicationTemplate -Id -DisplayName + [] +``` + +## Description +This cmdlet allows users to create application from application template + +## Examples + +### 1. Creates an application from application template +``` +PS C:\> $instantiated_app = New-EntraBetaApplicationTemplate -Id e8b7b394-057d-4203-a93a-1879c28ece38 -DisplayName bugzilla-copy1 +``` + +This command instantiates a new application based on application template referenced by the id. + +## Parameters + +### -Id +The unique identifier of an object in Azure Active Directory + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName +Application template display name + +```yaml +Type: ApplicationTemplateDisplayName +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.ApplicationTemplateCopy +## Notes +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md new file mode 100644 index 0000000000..567d4884fe --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md @@ -0,0 +1,153 @@ +--- +title: New-EntraBetaApplicationKey +description: This article provides details on the New-EntraBetaApplicationKey command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKey + +schema: 2.0.0 +--- + +# New-EntraBetaApplicationKey + +## Synopsis + +Adds a new key to an application. + +## Syntax + +```powershell +New-EntraBetaApplicationKey + -ObjectId + -KeyCredential + -Proof + [-PasswordCredential ] + [] +``` + +## Description + +Adds a new key to an application. + +## Examples + +### Example 1: Add a key credential to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$app = Get-EntraBetaApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $app.ObjectId + KeyCredential = @{ key=[System.Convert]::FromBase64String('{base64cert}') } + PasswordCredential = @{ DisplayName = 'mypassword' } + Proof = '{token}' +} + +New-EntraBetaApplicationKey @params +``` + +This command adds a key credential to an specified application. + +- `-ObjectId` parameter specifies the unique identifier of an application. +- `-KeyCredential` parameter specifies the application key credential to add. +- `-PasswordCredential` parameter specifies the application password credential to add. +- `-Proof` parameter specifies the signed JWT token used as a proof of possession of the existing keys. + +## Parameters + +### -KeyCredential + +The application key credential to add. + +NOTES: keyId value should be null. + +```yaml +Type: KeyCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +The unique identifier of the application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredential + +The application password credential to add. + +NOTES: keyId value should be null. + +```yaml +Type: PasswordCredential +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Proof + +A signed JWT token used as a proof of possession of the existing keys. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +### Microsoft.Open.MSGraph.Model.KeyCredential + +### Microsoft.Open.MSGraph.Model.PasswordCredential + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraBetaApplicationKey](Remove-EntraBetaApplicationKey.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md new file mode 100644 index 0000000000..37660446e4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md @@ -0,0 +1,257 @@ +--- +title: New-EntraBetaApplicationKeyCredential +description: This article provides details on the New-EntraBetaApplicationKeyCredential command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKeyCredential + +schema: 2.0.0 +--- + +# New-EntraBetaApplicationKeyCredential + +## Synopsis + +Creates a key credential for an application. + +## Syntax + +```powershell +New-EntraBetaApplicationKeyCredential + -ApplicationId + [-CustomKeyIdentifier ] + [-Type ] + [-Usage ] + [-Value ] + [-EndDate ] + [-StartDate ] + [] +``` + +## Description + +The `New-EntraBetaApplicationKeyCredential` cmdlet creates a key credential for an application. + +An application can use this command along with `Remove-EntraBetaApplicationKeyCredential` to automate the rolling of its expiring keys. + +As part of the request validation, proof of possession of an existing key is verified before the action can be performed. + +## Examples + +### Example 1: Create a new application key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' + +$AppId = (Get-EntraApplication -Top 1).Objectid +$params = @{ + ApplicationId = $AppId + CustomKeyIdentifier = 'EntraPowerShellKey' + StartDate = '2024-03-21T14:14:14Z' + Type = 'Symmetric' + Usage = 'Sign' + Value = '' +} + +New-EntraBetaApplicationKeyCredential @params +``` + +```Output +CustomKeyIdentifier : {84, 101, 115, 116} +EndDate : 2024-03-21T14:14:14Z +KeyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 +StartDate : 2025-03-21T14:14:14Z +Type : Symmetric +Usage : Sign +Value : {49, 50, 51} +``` + +This example shows how to create an application key credential. + +- `-ApplicationId` Specifies a unique ID of an application +- `-CustomKeyIdentifier` Specifies a custom key ID. +- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. +- `-Type` Specifies the type of the key. +- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. +- `-Value` Specifies the value for the key. + +You can use the `Get-EntraBetaApplication` cmdlet to retrieve the application Object ID. + +### Example 2: Use a certificate to add an application key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' + +$cer = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 #create a new certificate object +$cer.Import('C:\Users\ContosoUser\appcert.cer') +$bin = $cer.GetRawCertData() +$base64Value = [System.Convert]::ToBase64String($bin) +$bin = $cer.GetCertHash() +$base64Thumbprint = [System.Convert]::ToBase64String($bin) +$keyid = [System.Guid]::NewGuid().ToString() + +$params = @{ + ApplicationId = '22223333-cccc-4444-dddd-5555eeee6666' + CustomKeyIdentifier = $base64Thumbprint + Type = 'AsymmetricX509Cert' + Usage = 'Verify' + Value = $base64Value + StartDate = $cer.GetEffectiveDateString() + EndDate = $cer.GetExpirationDateString() +} + +New-EntraBetaApplicationKeyCredential @params +``` + +This example shows how to create an application key credential. + +- `-ApplicationId` Specifies a unique ID of an application +- `-CustomKeyIdentifier` Specifies a custom key ID. +- `-StartDate` Specifies the time when the key becomes valid as a DateTime object. +- `-EndDate` Specifies the time when the key becomes invalid as a DateTime object. +- `-Type` Specifies the type of the key. +- `-Usage` Specifies the key usage. for `AsymmetricX509Cert` the usage must be `Verify`and for `X509CertAndPassword` the usage must be `Sign`. +- `-Value` Specifies the value for the key. + +## Parameters + +### -CustomKeyIdentifier + +Specifies a custom key ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +Specifies the time when the key becomes invalid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +Specifies the time when the key becomes valid as a DateTime object. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of the key. + +```yaml +Type: KeyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Usage + +Specifies the key usage. + +- `AsymmetricX509Cert`: The usage must be `Verify`. +- `X509CertAndPassword`: The usage must be `Sign`. + +```yaml +Type: KeyUsage +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Value + +Specifies the value for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) + +[Get-EntraBetaApplicationKeyCredential](Get-EntraBetaApplicationKeyCredential.md) + +[Remove-EntraBetaApplicationKeyCredential](Remove-EntraBetaApplicationKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md new file mode 100644 index 0000000000..c7d794a7e8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md @@ -0,0 +1,120 @@ +--- +title: New-EntraBetaApplicationPassword +description: This article provides details on the New-EntraBetaApplicationPassword command. + +ms.topic: reference +ms.date: 08/02/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPassword + +schema: 2.0.0 +--- + +# New-EntraBetaApplicationPassword + +## Synopsis + +Adds a strong password to an application. + +## Syntax + +```powershell +New-EntraBetaApplicationPassword + -ObjectId + -PasswordCredential + [] +``` + +## Description + +Adds a strong password to an application. + +## Examples + +### Example 1: Add a password to an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$Application = Get-EntraBetaApplication -SearchString '' +$PasswordCredential= New-Object Microsoft.Open.MSGraph.Model.PasswordCredential +$PasswordCredential.StartDateTime = Get-Date -Year 2024 -Month 12 -Day 28 +$PasswordCredential.EndDateTime = Get-Date -Year 2025 -Month 2 -Day 28 +$PasswordCredential.KeyId = 'bbbbbbbb-1c1c-2d2d-3e3e-444444444444' +$PasswordCredential.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('a') +$PasswordCredential.Hint = 'b' +$params = @{ + ObjectId = $Application.ObjectId + PasswordCredential = $PasswordCredential +} + +New-EntraBetaApplicationPassword @params +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- +{97} 2/28/2025 7:05:39 AM nnW bbbbbbbb-1c1c-2d2d-3e3e-444444444444 12/28/2024 7:05:39 AM +``` + +This example adds a password to the specified application. + +- `-ObjectId` parameter specifies the unique identifier of the application. +- `-PasswordCredential` parameter specifies a password credential associated with an application or a service principal. + +## Parameters + +### -ObjectId + +The unique identifier of the application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredential + +Represents a password credential associated with an application or a service principal. + +```yaml +Type: PasswordCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +### Microsoft.Open.MSGraph.Model.PasswordCredential + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraBetaApplicationPassword](Remove-EntraBetaApplicationPassword.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md new file mode 100644 index 0000000000..7ab831b817 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md @@ -0,0 +1,212 @@ +--- +title: New-EntraBetaApplicationPasswordCredential +description: This article provides details on the New-EntraBetaApplicationPasswordCredential command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPasswordCredential + +schema: 2.0.0 +--- + +# New-EntraBetaApplicationPasswordCredential + +## Synopsis + +Creates a password credential for an application. + +## Syntax + +```powershell +New-EntraBetaApplicationPasswordCredential + -ApplicationId + [-CustomKeyIdentifier ] + [-StartDate ] + [-EndDate ] + [] +``` + +## Description + +The `New-EntraBetaApplicationPasswordCredential` cmdlet creates a password credential for an application in Microsoft Entra ID. + +## Examples + +### Example 1: Create a password credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "displayName eq ''" +New-EntraBetaApplicationPasswordCredential -ApplicationId $application.Id +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. + +### Example 2: Create a password credential using CustomKeyIdentifier parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "displayName eq ''" +$parameters = @{ + ApplicationId = $application.Id + CustomKeyIdentifier = '' +} +New-EntraBetaApplicationPasswordCredential @parameters +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDat + eTime +------------------- ----------- ----------- ---- ----- ---------- -------- +100 101 109 111 80 97 115 115 119 111 114 100 demoPassword 6/10/2026 7:43:45 AM 9tb tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_EaU6cqG 6/10/... +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-CustomKeyIdentifier` Speicifies unique binary identifier. + +### Example 3: Create a password credential using StartDate parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "displayName eq ''" +$parameters = @{ + ApplicationId = $application.Id + StartDate = (Get-Date).AddYears(0) + CustomKeyIdentifier = '' +} + +New-EntraBetaApplicationPasswordCredential @parameters +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-StartDate` Speicifies the date and time at which the password becomes valid. + +### Example 4: Create a password credential using EndDate parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "displayName eq ''" +$parameters = @{ + ApplicationId = $application.Id + EndDate = (Get-Date).AddYears(2) + CustomKeyIdentifier = '' +} + +New-EntraBetaApplicationPasswordCredential @parameters +``` + +```Output +CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime +------------------- ----------- ----------- ---- ----- ---------- ------------- + 3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM +``` + +This command creates new password credential for specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-EndDate` Speicifies The date and time at which the password expires. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -CustomKeyIdentifier + +A unique binary identifier. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +The date and time at which the password becomes valid. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -EndDate + +The date and time at which the password expires. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraBetaApplicationPasswordCredential](Remove-EntraBetaApplicationPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md new file mode 100644 index 0000000000..bf5e5e9ad2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md @@ -0,0 +1,388 @@ +--- +title: New-EntraBetaApplicationProxyApplication +description: This article provides details on the New-EntraBetaApplicationProxyApplication command. + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyApplication + +schema: 2.0.0 +--- + +# New-EntraBetaApplicationProxyApplication + +## Synopsis + +The `New-EntraBetaApplicationProxyApplication` cmdlet creates a new application configured for Application Proxy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraBetaApplicationProxyApplication + -DisplayName + -ExternalUrl + -InternalUrl + [-ExternalAuthenticationType ] + [-IsTranslateHostHeaderEnabled ] + [-IsHttpOnlyCookieEnabled ] + [-IsSecureCookieEnabled ] + [-IsPersistentCookieEnabled ] + [-IsTranslateLinksInBodyEnabled ] + [-ApplicationServerTimeout ] + [-ConnectorGroupId ] + [] +``` + +## Description + +The `New-EntraBetaApplicationProxyApplication` cmdlet creates a new application configured for Application Proxy in Microsoft Entra ID. +To ensure this application is usable, also make sure you assign users and configure SSO if needed. +Without specifying a ConnectorGroupId, this application by default uses the `Default` connector group in your tenant. + +## Examples + +### Example 1: Creating a new application with only the basic required settings, and the default domain for applications + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + DisplayName = 'Finance Tracker' + ExternalUrl = 'https://finance-awcycles.msappproxy.net/' + InternalUrl = 'http://finance/' +} +New-EntraBetaApplicationProxyApplication @params + +``` + +```Output +ObjectId : bbbbbbbb-1111-2222-3333-cccccccccccc +externalAuthenticationType : +applicationServerTimeout : +externalUrl : https://finance-awcycles.msappproxy.net/ +internalUrl : http://finance/ +isTranslateHostHeaderEnabled : False +isTranslateLinksInBodyEnabled : False +isOnPremPublishingEnabled : True +verifiedCustomDomainCertificatesMetadata : +verifiedCustomDomainKeyCredential : +verifiedCustomDomainPasswordCredential : +singleSignOnSettings : @{singleSignOnMode=none; kerberosSignOnSettings=} +isHttpOnlyCookieEnabled : False +isSecureCookieEnabled : False +isPersistentCookieEnabled : False +``` + +This example creating a new application with only the basic required settings, and the default domain for applications. + +- `-DisplayName` parameter specifies the display name of new application. +- `-ExternalUrl` parameter specifies the URL that use to access the application from outside user private network. +- `-InternalUrl` parameter specifies the URL that use to access the application from inside user private network. + +### Example 2: Creating a new application with ApplicationServerTimeout and ExternalAuthenticationType parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + DisplayName = 'Finance Tracker' + ExternalUrl = 'https://finance-awcycles.msappproxy.net/' + InternalUrl = 'http://finance/' + ApplicationServerTimeout = Long + ExternalAuthenticationType = 'aadPreAuthentication' +} +New-EntraBetaApplicationProxyApplication @params +``` + +```Output +ObjectId : bbbbbbbb-1111-2222-3333-cccccccccccc +externalAuthenticationType : aadPreAuthentication +applicationServerTimeout : Long +externalUrl : https://testp4-m365x99297270.msappproxy.net/ +internalUrl : https://testp4.com/ +isTranslateHostHeaderEnabled : False +isTranslateLinksInBodyEnabled : False +isOnPremPublishingEnabled : True +verifiedCustomDomainCertificatesMetadata : +verifiedCustomDomainKeyCredential : +verifiedCustomDomainPasswordCredential : +singleSignOnSettings : @{singleSignOnMode=none; kerberosSignOnSettings=} +isHttpOnlyCookieEnabled : False +isSecureCookieEnabled : False +isPersistentCookieEnabled : False +``` + +This example creating a new application with `ApplicationServerTimeout` and `ExternalAuthenticationType` parameter. + +- `-DisplayName` parameter specifies the display name of new application. +- `-ExternalUrl` parameter specifies the URL that use to access the application from outside user private network. +- `-InternalUrl` parameter specifies the URL that use to access the application from inside user private network. +- `-ApplicationServerTimeout` parameter specifies the application server timeout to set. +- `-ExternalAuthenticationType` parameter specifies the external authentication type. + +### Example 3: Creating a new application with IsHttpOnlyCookieEnabled, IsSecureCookieEnabled, IsTranslateLinksInBodyEnabled and ConnectorGroupId parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + DisplayName = 'Finance Tracker' + ExternalUrl = 'https://finance-awcycles.msappproxy.net/' + InternalUrl = 'http://finance/' + IsHttpOnlyCookieEnabled = $false + IsSecureCookieEnabled = $false + IsPersistentCookieEnabled = $false + IsTranslateLinksInBodyEnabled = $false + ConnectorGroupId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +New-EntraBetaApplicationProxyApplication @params +``` + +```Output +ObjectId : bbbbbbbb-1111-2222-3333-cccccccccccc +externalAuthenticationType : aadPreAuthentication +applicationServerTimeout : Long +externalUrl : https://testp4-m365x99297270.msappproxy.net/ +internalUrl : https://testp4.com/ +isTranslateHostHeaderEnabled : False +isTranslateLinksInBodyEnabled : False +isOnPremPublishingEnabled : True +verifiedCustomDomainCertificatesMetadata : +verifiedCustomDomainKeyCredential : +verifiedCustomDomainPasswordCredential : +singleSignOnSettings : @{singleSignOnMode=none; kerberosSignOnSettings=} +isHttpOnlyCookieEnabled : False +isSecureCookieEnabled : False +isPersistentCookieEnabled : False +``` + +This example creating a new application with `IsHttpOnlyCookieEnabled`, `IsSecureCookieEnabled`, `IsTranslateLinksInBodyEnabled`, and `ConnectorGroupId` parameter. + +- `-DisplayName` parameter specifies the display name of new application. +- `-ExternalUrl` parameter specifies the URL that use to access the application from outside user private network. +- `-InternalUrl` parameter specifies the URL that use to access the application from inside user private network. +- `-ConnectorGroupId` parameter specifies the Connector group ID that assigned to this application. +- `-IsHttpOnlyCookieEnabled` parameter specifies the application proxy to include the HTTPOnly flag in HTTP response headers. +- `-IsSecureCookieEnabled` parameter specifies the application proxy to include the Secure flag in HTTP response headers. +- `-IsPersistentCookieEnabled` parameter specifies application proxy to set its access cookies to not expire when the web browser is closed. +- `-IsTranslateLinksInBodyEnabled` parameter specifies the translates urls in body. + +## Parameters + +### -ApplicationServerTimeout + +Set this value to Long only if your application is slow to authenticate and connect. + +```yaml +Type: ApplicationServerTimeoutEnum +Parameter Sets: (All) +Aliases: +Accepted values: Default, Long + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConnectorGroupId + +Provide the ID of the Connector group you would like assigned to this application. +You can find this value by using the `Get-EntraBetaApplicationProxyConnectorGroup` command. +Connectors process the remote access to your application, and connector groups help you organize connectors and apps by region, network, or purpose. +If you don't have any connector groups created yet, your app is assigned to Default. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +The display name of the new application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExternalAuthenticationType + +How Application Proxy verifies users before giving them access to your application. +AadPreAuthentication: Application Proxy redirects users to sign in with Microsoft Entra ID, which authenticates their permissions for the directory and application. +We recommend keeping this option as the default, so that you can take advantage of Microsoft Entra ID security features like conditional access and multifactor authentication. +Pass through: Users don't have to authenticate against Microsoft Entra ID to access the application. +You can still set up authentication requirements on the backend. + +```yaml +Type: ExternalAuthenticationTypeEnum +Parameter Sets: (All) +Aliases: +Accepted values: AadPreAuthentication, Passthru + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExternalUrl + +The address your users go to in order to access the app from outside your network. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -InternalUrl + +The URL that you use to access the application from inside your private network. +You can provide a specific path on the backend server to publish, while the rest of the server is unpublished. +In this way, you can publish different sites on the same server as different apps, and give each one its own name and access rules. +If you publish a path, make sure that it includes all the necessary images, scripts, and style sheets for your application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsTranslateHostHeaderEnabled + +If set to true, translates urls in headers. +Keep this value true unless your application required the original host header in the authentication request. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsTranslateLinksInBodyEnabled + +If set to true, translates urls in body. +Keep this value as No unless you have to hardcoded HTML links to other on-premises applications, and don't use custom domains. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsHttpOnlyCookieEnabled + +Yes allows application proxy to include the HTTPOnly flag in HTTP response headers. This flag provides extra security benefits, for example, it prevents client-side scripting (CSS) from copying or modifying the cookies. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsPersistentCookieEnabled + +Yes allows application proxy to set its access cookies to not expire when the web browser is closed. The persistence lasts until the access token expires, or until the user manually deletes the persistent cookies. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsSecureCookieEnabled + +Yes allows application proxy to include the Secure flag in HTTP response headers. Secure Cookies enhances security by transmitting cookies over a TLS secured channel such as HTTPS. TLS prevents cookie transmission in clear text. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[Microsoft.Open.MSGraph.Model.ApplicationProxyApplicationObject+ExternalAuthenticationTypeEnum, Microsoft.Open.MS.GraphV10.Client, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null\]\] System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[Microsoft.Open.MSGraph.Model.ApplicationProxyApplicationObject+ApplicationServerTimeoutEnum, Microsoft.Open.MS.GraphV10.Client, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaApplicationProxyApplication](Set-EntraBetaApplicationProxyApplication.md) + +[Get-EntraBetaApplicationProxyApplication](Get-EntraBetaApplicationProxyApplication.md) + +[Remove-EntraBetaApplicationProxyApplication](Remove-EntraBetaApplicationProxyApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md new file mode 100644 index 0000000000..4af35dd3ed --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md @@ -0,0 +1,99 @@ +--- +title: New-EntraBetaApplicationProxyConnectorGroup +description: This article provides details on the New-EntraBetaApplicationProxyConnectorGroupcommand. + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyConnectorGroup + +schema: 2.0.0 +--- + +# New-EntraBetaApplicationProxyConnectorGroup + +## Synopsis + +The `New-EntraBetaApplicationProxyConnectorGroup` cmdlet creates a new Application Proxy Connector group. + +## Syntax + +```powershell +New-EntraBetaApplicationProxyConnectorGroup + -Name + [] +``` + +## Description + +The `New-EntraBetaApplicationProxyConnectorGroup` cmdlet creates a new Application Proxy connector group. + +## Examples + +### Example 1: Create a new Connector Group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +New-EntraBetaApplicationProxyConnectorGroup -Name 'Backup Application Servers' +``` + +```Output +Name Value +---- ----- +id aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +@odata.context https://graph.microsoft.com/beta/$metadata#onPremisesPublishingProfiles('applicationProxy')/connectorGroups/$entity +isDefault False +name Backup Application Servers +region eur +connectorGroupType applicationProxy +``` + +This example creates a new Connector Group using specified name. + +- `-Name` parameter specifies the new connector group name. + +## Parameters + +### -Name + +The name of the new Connector Group. + +```yaml +Type: System.Name +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Microsoft.Open.MSGraph.Model.Name + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaApplicationProxyConnectorGroup](Set-EntraBetaApplicationProxyConnectorGroup.md) + +[Get-EntraBetaApplicationProxyConnectorGroup](Get-EntraBetaApplicationProxyConnectorGroup.md) + +[Remove-EntraBetaApplicationProxyConnectorGroup](Remove-EntraBetaApplicationProxyConnectorGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md new file mode 100644 index 0000000000..3bb500e063 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md @@ -0,0 +1,121 @@ +--- +title: New-EntraBetaPasswordSingleSignOnCredential +description: This article provides details on the New-EntraBetaPasswordSingleSignOnCredential command. + +ms.topic: reference +ms.date: 07/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPasswordSingleSignOnCredential + +schema: 2.0.0 +--- + +# New-EntraBetaPasswordSingleSignOnCredential + +## Synopsis + +Creates the password Single-Sign-On (SSO) credentials. + +## Syntax + +```powershell +New-EntraBetaPasswordSingleSignOnCredential + -ObjectId + -PasswordSSOCredential + [] +``` + +## Description + +This cmdlet enables users to create their Password Single-Sign-On credentials for an application that they're part of. Specify `ObjectId` and `PasswordSSOCredential` parameters to create an SSO credentials. +Admin could create the group credentials as well. + +## Examples + +### Example 1: New password single-sign-on credentials + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$credentials = New-Object -TypeName Microsoft.Open.MSGraph.Model.PasswordSSOCredentials +$credentials.Id = '' +$servicePrincipal = Get-EntraBetaservicePrincipal -SearchString '' +$creds1 = [Microsoft.Open.MSGraph.Model.PasswordSSOCredential]@{FieldId="param_emailOrUserName"; Value="foobar@ms.com"; Type="text"} +$creds2 = [Microsoft.Open.MSGraph.Model.PasswordSSOCredential]@{FieldId="param_password"; Value="my-secret"; Type="password"} +$credentials.Credentials = @($creds1, $creds2) +$params = @{ + ObjectId = $servicePrincipal.Id + PasswordSSOCredential = $credentials +} +New-EntraBetaPasswordSingleSignOnCredential @params +``` + +```Output +Id +-- +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to create an password SSO credential for the given ObjectId and PasswordSSOObjectId. + +- `-PasswordSSOObjectId` parameter specifies the User or Group ID. +- `-ObjectId` parameter specifies the object ID of a service principal. + +## Parameters + +### -ObjectId + +The unique identifier of the object specific Microsoft Entra ID object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordSSOCredential + +User or group ID. + +```yaml +Type: System.PasswordSSOCredentials +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.PasswordSSOCredentials + +## Notes + +## Related Links + +[Set-EntraBetaPasswordSingleSignOnCredential](Set-EntraBetaPasswordSingleSignOnCredential.md) + +[Get-EntraBetaPasswordSingleSignOnCredential](Get-EntraBetaPasswordSingleSignOnCredential.md) + +[Remove-EntraBetaPasswordSingleSignOnCredential](Remove-EntraBetaPasswordSingleSignOnCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md new file mode 100644 index 0000000000..cf5b32fa6d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md @@ -0,0 +1,407 @@ +--- +title: New-EntraBetaServicePrincipal +description: This article provides details on the New-EntraBetaServicePrincipal command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipal + +schema: 2.0.0 +--- + +# New-EntraBetaServicePrincipal + +## Synopsis + +Creates a service principal. + +## Syntax + +```powershell +New-EntraBetaServicePrincipal + [-AccountEnabled ] + [-Tags ] + [-DisplayName ] + [-AlternativeNames ] + -AppId + [-KeyCredentials ] + [-ReplyUrls ] + [-LogoutUrl ] + [-ServicePrincipalType ] + [-Homepage ] + [-AppRoleAssignmentRequired ] + [-PasswordCredentials ] + [-ServicePrincipalNames ] + [] +``` + +## Description + +Create a new service Principal. + +For multitenant apps, the calling user must also be in at least one of the following Microsoft Entra roles: + +- Application Administrator +- Cloud Application Administrator + +For single-tenant apps where the calling user is a non-admin user but is the owner of the backing application, the user must have the Application Developer role. + +## Examples + +### Example 1: Create a new service principal using DisplayName, AccountEnabled, Tags, and AppRoleAssignmentRequired + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraBetaApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AccountEnabled = $true + AppId = $MyApp.AppId + AppRoleAssignmentRequired = $true + DisplayName = $MyApp.DisplayName + Tags = {WindowsAzureActiveDirectoryIntegratedApp} +} +New-EntraBetaServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraBetaApplication` to get application app Id. + +The tag `-Tags {WindowsAzureActiveDirectoryIntegratedApp}` is used to have this service principal show up in the list of Integrated Applications in the Admin Portal. + +- `-AccountEnabled` parameter specifies true if the service principal account is enabled, otherwise false. +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-DisplayName` parameter specifies the service principal display name. +- `-AppRoleAssignmentRequired` parameter indicates whether an application role assignment is required. + +### Example 2: Create a new service principal using Homepage, logoutUrl, and ReplyUrls + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraBetaApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + Homepage = 'https://localhost/home' + LogoutUrl = 'htpp://localhost/logout' + ReplyUrls = 'https://localhost/redirect' +} +New-EntraBetaServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraBetaApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-Homepage` parameter specifies the home page or landing page of the application. +- `-LogoutUrl` parameter specifies the logout URL. +- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. + +### Example 3: Create a new service principal by KeyCredentials + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential +$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') +$startdate = Get-Date -Year 2024 -Month 07 -Day 23 +$creds.StartDate = $startdate +$creds.Type = 'Symmetric' +$creds.Usage = 'Sign' +$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('strong-cred-value') +$creds.EndDate = Get-Date -Year 2024 -Month 10 -Day 23 +$MyApp=(Get-EntraBetaApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + KeyCredentials = $creds +} +New-EntraBetaServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraBetaApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-KeyCredentials` parameter specifies the collection of key credentials associated with the service principal. + +### Example 4: Create a new service principal by AlternativeNames, ServicePrincipalType, and ServicePrincipalName + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$MyApp=(Get-EntraBetaApplication -Filter "DisplayName eq 'Demo App'") +$params = @{ + AppId = $MyApp.AppId + AlternativeNames = 'sktest2' + ServicePrincipalType = 'Application' + ServicePrincipalNames = $MyApp.AppId +} +New-EntraBetaServicePrincipal @params +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +Demo App bbbbbbbb-1111-2222-3333-cccccccccccc 00001111-aaaa-2222-bbbb-3333cccc4444 AzureADMyOrg Application +``` + +This example demonstrates how to create a new service Principal in Microsoft Entra ID. You can use the command `Get-EntraBetaApplication` to get application app Id. + +- `-AppId` parameter specifies the unique identifier for the associated application (its appId property). +- `-AlternativeNames` parameter specifies the alternative names for this service principal. +- `-ServicePrincipalType` parameter specifies the type of the service principal. +- `-ServicePrincipalNames` parameter specifies an array of service principal names. + +## Parameters + +### -AccountEnabled + +True if the service principal account is enabled; otherwise, false. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeNames + +The alternative names for this service principal. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppId + +The unique identifier for the associated application (its appId property). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoleAssignmentRequired + +Indicates whether an application role assignment is required. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the service principal display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Homepage + +Home page or landing page of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +The collection of key credentials associated with the service principal. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoutUrl + +Specifies the logout URL. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +The collection of password credentials associated with the application. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplyUrls + +The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalNames + +Specifies an array of service principal names. +Based on the identifierURIs collection, plus the application's appId property, these URIs are used to reference an application's service principal. +A client uses ServicePrincipalNames to: + +- populate requiredResourceAccess, via "Permissions to other applications" in the Azure classic portal. +- Specify a resource URI to acquire an access token, which is the URI returned in the claim. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalType + +The type of the service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Tags linked to this service principal. + +Note that if you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) + +[Remove-EntraBetaServicePrincipal](Remove-EntraBetaServicePrincipal.md) + +[Set-EntraBetaServicePrincipal](Set-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..9b57187a95 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md @@ -0,0 +1,231 @@ +--- +title: New-EntraBetaServicePrincipalAppRoleAssignment +description: This article provides details on the New-EntraBetaServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraBetaServicePrincipalAppRoleAssignment + +## Synopsis + +Assigns a service principal to an application role. + +## Syntax + +```powershell +New-EntraBetaServicePrincipalAppRoleAssignment + -ResourceId + -Id + -ObjectId + -PrincipalId + [] +``` + +## Description + +The `New-EntraBetaServicePrincipalAppRoleAssignment` cmdlet assigns a service principal to an application role in Microsoft Entra ID. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Assign an app role to another service principal + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraBetaServicePrincipal -Filter "Displayname eq '$appname'" + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $spo.ObjectId +} + +New-EntraBetaServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box aaaa0000-bb11-2222-33cc-444444dddddd +``` + +This example demonstrates how to assign an app role to another service principal in Microsoft Entra ID. You can use the command `Get-EntraBetaServicePrincipal` to get a service principal Id. + +- `-ObjectId` parameter specifies the ObjectId of a client service principal to which you're assigning the app role. +- `-ResourceId`parameter specifies the ObjectId of the resource service principal. +- `-Id` parameter specifies the Id of the app role (defined on the resource service principal) to assign to the client service principal. If no app roles are defined on the resource app, you can use `00000000-0000-0000-0000-000000000000`. +- `-PrincipalId` parameter specifies the ObjectId of the client service principal to which you're assigning the app role. + +### Example 2: Assign an app role to a user + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraBetaServicePrincipal -Filter "Displayname eq '$appname'" + $user = Get-EntraBetaUser -SearchString 'Test Contoso' + + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $user.ObjectId +} + +New-EntraBetaServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box bbbb1111-cc22-3333-44dd-555555eeeeee +``` + +This example demonstrates how to assign an app role to a user in Microsoft Entra ID. +You can use the command `Get-EntraBetaServicePrincipal` to get a service principal Id. +You can use the command `Get-EntraBetaUser` to get a user Id. + +- `-ObjectId` parameter specifies the ObjectId of the app's service principal. +- `-ResourceId`parameter specifies the ObjectId of the app's service principal. +- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the user. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the user. +- `-PrincipalId` parameter specifies the ObjectId of a user to which you're assigning the app role. + +### Example 3: Assign an app role to a group + +```powershell + Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' + $appname = 'Box' + $spo = Get-EntraBetaServicePrincipal -Filter "Displayname eq '$appname'" + $group = Get-EntraBetaGroup -SearchString 'testGroup' + + $params = @{ + ObjectId = $spo.ObjectId + ResourceId = $spo.ObjectId + Id = $spo.Approles[1].Id + PrincipalId = $group.ObjectId + } + + New-EntraBetaServicePrincipalAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +3cccccc3-4dd4-5ee5-6ff6-7aaaaaaaaaa7 00000000-0000-0000-0000-000000000000 12-03-2024 11:05:29 Box aaaaaaaa-bbbb-cccc-1111-222222222222 ServicePrincipal Box cccc2222-dd33-4444-55ee-666666ffffff +``` + +This example demonstrates how to assign an app role to a group in Microsoft Entra ID. +You can use the command `Get-EntraBetaServicePrincipal` to get a service principal Id. +You can use the command `Get-EntraBetaGroup` to get a group Id. + +- `-ObjectId` parameter specifies the ObjectId of the app's service principal. +- `-ResourceId`parameter specifies the ObjectId of the app's service principal. +- `-Id` parameter specifies the Id of app role (defined on the app's service principal) to assign to the group. If no app roles are defined to the resource app, you can use `00000000-0000-0000-0000-000000000000` to indicate that the app is assigned to the group. +- `-PrincipalId` parameter specifies the ObjectId of a group to which you're assigning the app role. + +## Parameters + +### -Id + +Specifies the ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies a principal ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +Specifies a resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`New-EntraBetaServiceAppRoleAssignment` is an alias for `New-EntraBetaServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraBetaServicePrincipalAppRoleAssignment](Get-EntraBetaServicePrincipalAppRoleAssignment.md) + +[Remove-EntraBetaServicePrincipalAppRoleAssignment](Remove-EntraBetaServicePrincipalAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..bc369e0cf5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md @@ -0,0 +1,168 @@ +--- +title: New-EntraBetaServicePrincipalPasswordCredential +description: This article provides details on the New-EntraBetaServicePrincipalPasswordCredential command. + + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# New-EntraBetaServicePrincipalPasswordCredential + +## Synopsis + +Creates a password credential for a service principal. + +## Syntax + +```powershell +New-EntraBetaServicePrincipalPasswordCredential + -ServicePrincipalId + [-EndDate ] + [-StartDate ] + [] +``` + +## Description + +The `New-EntraBetaServicePrincipalPasswordCredential` cmdlet creates a password credential for a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Create a password credential with StartDate + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + StartDate = '2024-04-21T14:14:14Z' +} +New-EntraBetaServicePrincipalPasswordCredential @Params +``` + +```Output +secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u +@odata.type : #microsoft.graph.servicePrincipal +endDateTime : 08-08-2026 10:30:00 +hint : LY. +customKeyIdentifier : +startDateTime : 08-08-2024 14:14:14 +keyId : aaaaaaaa-0b0b-1c1c-2d2d-333333333333 +@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword +displayName : +StartDate : 08-08-2024 14:14:14 +EndDate : 08-08-2026 10:30:00 +``` + +This example demonstrates how to create a password credential with StartDate for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-StarteDate` parameter specifies the date and time at which the password becomes valid. + +### Example 2: Create a password credential with EndtDate + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + EndDate = '2030-03-21T14:14:14Z' +} +New-EntraBetaServicePrincipalPasswordCredential @Params +``` + +```Output +secretText : A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u +@odata.type : #microsoft.graph.servicePrincipal +endDateTime : 08-08-2026 10:30:00 +hint : LY. +customKeyIdentifier : +startDateTime : 08-08-2024 14:14:14 +keyId : bbbbbbbb-1c1c-2d2d-3e3e-444444444444 +@odata.context : https://graph.microsoft.com/beta/$metadata#servicePrincipals('00001111-aaaa-2222-bbbb-3333cccc4444')/addPassword +displayName : +StartDate : 08-08-2024 14:14:14 +EndDate : 08-08-2026 10:30:00 +``` + +This example demonstrates how to create a password credential with EndDate for a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-EndDate` parameter specifies the date and time at which the password expires represented using ISO 8601 format and is always in UTC time. + +## Parameters + +### -EndDate + +The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of the service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -StartDate + +The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipalPasswordCredential](Get-EntraBetaServicePrincipalPasswordCredential.md) + +[Remove-EntraBetaServicePrincipalPasswordCredential](Remove-EntraBetaServicePrincipalPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md new file mode 100644 index 0000000000..4607891056 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraBetaApplication +description: This article provides details on the Remove-EntraBetaApplication command. + +ms.topic: reference +ms.date: 06/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplication + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplication + +## Synopsis + +Deletes an application object. + +## Syntax + +```powershell +Remove-EntraBetaApplication + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraBetaApplication` cmdlet deletes an application object identified by ApplicationId. Specify the `ApplicationId` parameter to delete an application object. + +## Examples + +### Example 1: Remove an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$Application = Get-EntraBetaApplication -SearchString '' +Remove-EntraBetaApplication -ApplicationId $Application.ObjectId +``` + +This example demonstrates how to delete an application object. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) + +[New-EntraBetaApplication](New-EntraBetaApplication.md) + +[Set-EntraBetaApplication](Set-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md new file mode 100644 index 0000000000..81bd91ded6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraBetaApplicationExtensionProperty +description: This article provides details on the Remove-EntraBetaApplicationExtensionProperty command. + +ms.topic: reference +ms.date: 08/06/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationExtensionProperty + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationExtensionProperty + +## Synopsis + +Removes an application extension property. + +## Syntax + +```powershell +Remove-EntraBetaApplicationExtensionProperty + -ApplicationId + -ExtensionPropertyId + [] +``` + +## Description + +The `Remove-EntraBetaApplicationExtensionProperty` cmdlet removes an application extension property for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an application extension property + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$Application = Get-EntraBetaApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + ExtensionPropertyId = 'cccc2222-dd33-4444-55ee-666666ffffff' +} + +Remove-EntraBetaApplicationExtensionProperty @params +``` + +This example removes the extension property that has the specified ID from an application in Microsoft Entra ID. + +- `-ApplicationId` parameter specifies the unique identifier of an application. +- `-ExtensionPropertyId` parameter specifies the unique identifier of the extension property to remove. + +## Parameters + +### -ExtensionPropertyId + +Specifies the unique ID of the extension property to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplicationExtensionProperty](Get-EntraBetaApplicationExtensionProperty.md) + +[New-EntraBetaApplicationExtensionProperty](New-EntraBetaApplicationExtensionProperty.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md new file mode 100644 index 0000000000..5b73db6966 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md @@ -0,0 +1,133 @@ +--- +title: Remove-EntraBetaApplicationKey +description: This article provides details on the Remove-EntraBetaApplicationKey command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKey + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationKey + +## Synopsis + +Removes a key from an application. + +## Syntax + +```powershell +Remove-EntraBetaApplicationKey + -ObjectId + [-KeyId ] + [-Proof ] + [] +``` + +## Description + +Removes a key from an application. + +## Examples + +### Example 1: Removes a key credential from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$app = Get-EntraBetaApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $app.ObjectId + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' + Proof = '{token}' +} + +Remove-EntraBetaApplicationKey @params +``` + +This command removes the specified key credential from the specified application. + +- `-ObjectId` parameter specifies the unique identifier of an application. +- `-KeyId` parameter specifies the key Id corresponding to the key object to be removed. +- `-Proof` parameter specifies the JWT token provided as a proof of possession. + +## Parameters + +### -ObjectId + +Specifies the unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KeyId + +The key Id corresponding to the key object to be removed. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Proof + +The JWT token provided as a proof of possession. + +A self-signed JWT token used as a proof of possession of the existing keys. This JWT token must be signed with a private key that corresponds to one of the existing valid certificates associated with the application. The token should contain the following claims: + +- `aud`: Audience needs to be 00000002-0000-0000-c000-000000000000. +- `iss`: Issuer needs to be the ID of the application that initiates the request. +- `nbf`: Not before time. +- `exp`: Expiration time should be the value of nbf + 10 minutes. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplicationKey](New-EntraBetaApplicationKey.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md new file mode 100644 index 0000000000..29811b47cd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md @@ -0,0 +1,107 @@ +--- +title: Remove-EntraBetaApplicationKeyCredential +description: This article provides details on the Remove-EntraBetaApplicationKeyCredential command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKeyCredential + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationKeyCredential + +## Synopsis + +Removes a key credential from an application. + +## Syntax + +```powershell +Remove-EntraBetaApplicationKeyCredential + -ApplicationId + -KeyId + [] +``` + +## Description + +The `Remove-EntraBetaApplicationKeyCredential` cmdlet removes a key credential from an application. + +An application can use this command along with `New-EntraBetaApplicationKeyCredential` to automate the rolling of its expiring keys. + +## Examples + +### Example 1: Remove a key credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "displayName eq ''" +$params = @{ + ApplicationId = $application.Id + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +} + +Remove-EntraBetaApplicationKeyCredential @params +``` + +This command removes the specified key credential from the specified application. + +- `-ApplicationId` Specifies the ID of an application. +- `-KeyId` Specifies a custom key ID. Use `Get-EntraBetaApplicationKeyCredential` to get the keyId details. + +## Parameters + +### -KeyId + +Specifies a custom key ID. The unique identifier for the password. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies a unique ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplicationKeyCredential](Get-EntraBetaApplicationKeyCredential.md) + +[New-EntraBetaApplicationKeyCredential](New-EntraBetaApplicationKeyCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md new file mode 100644 index 0000000000..5fdd4e0996 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraBetaApplicationOwner +description: This article provides details on the Remove-EntraBetaApplicationOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationOwner + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationOwner + +## Synopsis + +Removes an owner from an application. + +## Syntax + +```powershell +Remove-EntraBetaApplicationOwner + -OwnerId + -ApplicationId + [] +``` + +## Description + +The `Remove-EntraBetaApplicationOwner` cmdlet removes an owner from an application in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an owner from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$Application = Get-EntraBetaApplication -SearchString '' +$params = @{ + ApplicationId = $Application.ObjectId + OwnerId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Remove-EntraBetaApplicationOwner @params +``` + +This example removes the specified owner from the specified application. You can use the command `Get-EntraBetaApplication` to get application Id. + +- `-ApplicationId` parameter specifies the the unique identifier of a application. +- `-OwnerId` parameter specifies the ID of the owner. + +## Parameters + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, -`InformationVariable`, `-OutVariable`, -`OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaApplicationOwner](Add-EntraBetaApplicationOwner.md) + +[Get-EntraBetaApplicationOwner](Get-EntraBetaApplicationOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md new file mode 100644 index 0000000000..1cb759499f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraBetaApplicationPassword +description: This article provides details on the Remove-EntraBetaApplicationPassword command. + +ms.topic: reference +ms.date: 08/02/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPassword + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationPassword + +## Synopsis + +Remove a password from an application. + +## Syntax + +```powershell +Remove-EntraBetaApplicationPassword + -ObjectId + [-KeyId ] + [] +``` + +## Description + +Remove a password from an application. + +## Examples + +### Example 1: Removes a password from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $application.Id + KeyId = 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +} +Remove-EntraBetaApplicationPassWord @params +``` + +This example removes the specified password from the specified application. + +- `-ObjectId` parameter specifies the unique identifier of the application. +- `-KeyId` parameter specifies the unique identifier of the PasswordCredential. + +## Parameters + +### -ObjectId + +The unique identifier of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KeyId + +The unique identifier for the key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplicationPassword](New-EntraBetaApplicationPassword.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md new file mode 100644 index 0000000000..80fd93e4da --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md @@ -0,0 +1,103 @@ +--- +title: Remove-EntraBetaApplicationPasswordCredential +description: This article provides details on the Remove-EntraBetaApplicationPasswordCredential command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPasswordCredential + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationPasswordCredential + +## Synopsis + +Removes a password credential from an application. + +## Syntax + +```powershell +Remove-EntraBetaApplicationPasswordCredential + -ApplicationId + -KeyId + [] +``` + +## Description + +The `Remove-EntraBetaApplicationPasswordCredential` cmdlet removes a password credential from an application in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an application password credential + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraBetaApplication -Filter "displayName eq 'Contoso Helpdesk App'" +$KeyIDs = Get-EntraBetaApplicationPasswordCredential -ApplicationId $application.Id +Remove-EntraBetaApplicationPasswordCredential -ApplicationId $application.Id -KeyId $KeyIds[0].KeyId +``` + +This example demonstrates how to remove the password credential for an application. + +- `ApplicationId` Specifies the ID of the application. Use `Get-EntraBetaApplication` to get application ApplicationId value. +- `KeyId` Specifies the ID of the password credential. Use `Get-EntraBetaApplicationPasswordCredential` to retrieve a specific credential details. + +## Parameters + +### -KeyId + +Specifies the ID of the password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of the application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) + +[Get-EntraBetaApplicationPasswordCredential](Get-EntraBetaApplicationPasswordCredential.md) + +[Remove-EntraBetaApplicationPasswordCredential](Remove-EntraBetaApplicationPasswordCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md new file mode 100644 index 0000000000..b7339ab656 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md @@ -0,0 +1,102 @@ +--- +title: Remove-EntraBetaApplicationPolicy +description: This article provides details on the Remove-EntraBetaApplicationPolicy command. + + +ms.topic: reference +ms.date: 07/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationPolicy + +## Synopsis + +Removes an application policy. + +## Syntax + +```powershell +Remove-EntraBetaApplicationPolicy + -Id + -PolicyId +[] +``` + +## Description + +The `Remove-EntraBetaApplicationPolicy` cmdlet removes an application policy from Microsoft Entra ID. Specify `Id`and `PolicyId` parameters to remove an specific application policy. + +## Examples + +### Example 1: Remove an application policy + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + PolicyId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Remove-EntraBetaApplicationPolicy @params +``` + +This command removes the specified application policy. + +## Parameters + +### -PolicyId + +Specifies the ID of the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The ID of the application for which you need to retrieve the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaApplicationPolicy](Add-EntraBetaApplicationPolicy.md) + +[Get-EntraBetaApplicationPolicy](Get-EntraBetaApplicationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md new file mode 100644 index 0000000000..eaf60210ad --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md @@ -0,0 +1,119 @@ +--- +title: Remove-EntraBetaApplicationProxyApplication +description: This article provides details on the Remove-EntraBetaApplicationProxyApplication command. + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplication + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationProxyApplication + +## Synopsis + +Deletes an Application Proxy application. + +## Syntax + +```powershell +Remove-EntraBetaApplicationProxyApplication + -ApplicationId + [-RemoveADApplication ] + [] +``` + +## Description + +The `Remove-EntraBetaApplicationProxyApplication` cmdlet removes Application Proxy configurations from a specific application in Microsoft Entra ID, and can delete the application completely if specified. + +## Examples + +### Example 1: Remove a Proxy Application + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Remove-EntraBetaApplicationProxyApplication -ApplicationId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This example removes a Proxy Application. + +- `ApplicationId` parameter specifies the application ID. + +### Example 2: Remove a Proxy Application, and remove it from Microsoft Entra ID completely + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Remove-EntraBetaApplicationProxyApplication -ApplicationId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RemoveADApplication $true +``` + +This example removes a Proxy Application, and removes it from Microsoft Entra ID completely. + +- `ApplicationId` parameter specifies the application ID. +- `RemoveADApplication` parameter specifies the user confirmation to delete application completely. + +## Parameters + +### -ApplicationId + +The unique application ID of the application. +This ApplicationId can be found using the `Get-EntraBetaApplication` command. +You can also find this ApplicationId in the Microsoft by navigating to Microsoft Entra ID > App registrations > All applications. Select your application. This will takes you to the application's overview page. Use the ObjectId on that page. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RemoveADApplication + +This RemoveADApplication parameter allows you to delete application completely. +When this RemoveADApplication is false (default), Application Proxy properties are removed from the application, but the application still exists. +If this RemoveADApplication is true, the application is removed from Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplicationProxyApplication](New-EntraBetaApplicationProxyApplication.md) + +[Set-EntraBetaApplicationProxyApplication](Set-EntraBetaApplicationProxyApplication.md) + +[Get-EntraBetaApplicationProxyApplication](Get-EntraBetaApplicationProxyApplication.md) + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md new file mode 100644 index 0000000000..7afb0887c5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -0,0 +1,89 @@ +--- +title: Remove-EntraBetaApplicationProxyApplicationConnectorGroup +description: This article provides details on the Remove-EntraBetaApplicationProxyApplicationConnectorGroup command. + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplicationConnectorGroup + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationProxyApplicationConnectorGroup + +## Synopsis + +The `Remove-EntraBetaApplicationProxyApplicationConnectorGroupcmdlet` sets the connector group assigned for the specified application to 'Default' and removes the current assignment. + +## Syntax + +```powershell +Remove-EntraBetaApplicationProxyApplicationConnectorGroup + -OnPremisesPublishingProfileId + [] +``` + +## Description + +If your application is already in the 'Default' group, you see an error because the application can't be removed from the 'Default' group unless it's being added to another group. +The application must be configured for Application Proxy in Microsoft Entra ID. + +## Examples + +### Example 1: Remove the Connector Group associated with an application, setting the group to 'Default' + +```POWERSHELL +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Remove-EntraBetaApplicationProxyApplicationConnectorGroup -OnPremisesPublishingProfileId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This example removes the Connector Group associated with an application, setting the group to 'Default.' + +- `OnPremisesPublishingProfileId` parameter specifies the application ID. + +## Parameters + +### -OnPremisesPublishingProfileId + +The unique application ID of the application. +The application ID can be found using the `Get-EntraBetaApplication` command. +You can also find objectId in the Microsoft Entra Admin Center by navigating to Microsoft Entra ID > App registrations > All applications. Select your application. From the application overview page, copy the ObjectId. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaApplicationProxyApplicationConnectorGroup](Set-EntraBetaApplicationProxyApplicationConnectorGroup.md) + +[Get-EntraBetaApplicationProxyApplicationConnectorGroup](Get-EntraBetaApplicationProxyApplicationConnectorGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md new file mode 100644 index 0000000000..dfb7d8ba78 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md @@ -0,0 +1,90 @@ +--- +title: Remove-EntraBetaApplicationProxyConnectorGroup +description: This article provides details on the Remove-EntraBetaApplicationProxyConnectorGroup command. + +ms.topic: reference +ms.date: 07/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyConnectorGroup + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationProxyConnectorGroup + +## Synopsis + +The `Remove-EntraBetaApplicationProxyConnectorGroup` cmdlet deletes an Application Proxy Connector group. + +## Syntax + +```powershell +Remove-EntraBetaApplicationProxyConnectorGroup + -Id + [] +``` + +## Description + +The `Remove-EntraBetaApplicationProxyConnectorGroup` cmdlet deletes an Application Proxy Connector Group. +It can only be used on an empty connector group, with no connectors assigned. + +## Examples + +### Example 1: Remove a specific Connector Group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Remove-EntraBetaApplicationProxyConnectorGroup -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This example removes a specific Connector Group. + +- `Id` parameter specifies the connector group ID. + +## Parameters + +### -Id + +The ID of the Connector group to delete. +You can find this value by running the `Get-EntraBetaApplicationProxyConnectorGroup` command. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaApplicationProxyConnectorGroup](New-EntraBetaApplicationProxyConnectorGroup.md) + +[Set-EntraBetaApplicationProxyConnectorGroup](Set-EntraBetaApplicationProxyConnectorGroup.md) + +[Get-EntraBetaApplicationProxyConnectorGroup](Get-EntraBetaApplicationProxyConnectorGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md new file mode 100644 index 0000000000..d7a058e929 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraBetaApplicationVerifiedPublisher +description: This article provides details on the Remove-EntraBetaApplicationVerifiedPublisher command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationVerifiedPublisher + +schema: 2.0.0 +--- + +# Remove-EntraBetaApplicationVerifiedPublisher + +## Synopsis + +Removes the verified publisher from an application. + +## Syntax + +```powershell +Remove-EntraBetaApplicationVerifiedPublisher + -AppObjectId + [] +``` + +## Description + +Removes the verified publisher from an application. + +## Examples + +### Example 1: Remove the verified publisher from an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$app = Get-EntraBetaApplication -Filter "DisplayName eq ''" +Remove-EntraBetaApplicationVerifiedPublisher -AppObjectId $app.ObjectId +``` + +This command demonstrates how to remove the verified publisher from an application. + +- `-AppObjectId` parameter specifies the unique identifier of an application. + +## Parameters + +### -AppObjectId + +The unique identifier of a Microsoft Entra ID Application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[Set-EntraBetaApplicationVerifiedPublisher](Set-EntraBetaApplicationVerifiedPublisher.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md new file mode 100644 index 0000000000..18cb3113cd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraBetaDeletedApplication +description: This article provides details on the Remove-EntraBetaDeletedApplication command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedApplication + +schema: 2.0.0 +--- + +# Remove-EntraBetaDeletedApplication + +## Synopsis + +Permanently delete a recently deleted application object from deleted items. + +## Syntax + +```powershell +Remove-EntraBetaDeletedApplication + [-ObjectId] + [] +``` + +## Description + +Permanently delete a recently deleted application object from deleted items. After an item is permanently deleted, it can't be restored. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- To permanently delete deleted applications or service principals: Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. + +## Examples + +### Example 1: Remove deleted application object + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$App = Get-EntraBetaDeletedApplication -SearchString 'My PowerShell Application' +Remove-EntraBetaDeletedApplication -ObjectId $App.ObjectId +``` + +This command removes recently deleted application. You can use the command `Get-EntraBetaDeletedApplication` to get deleted application Id. + +- `-ObjectId` parameter specifies the Id of a deleted application. + +## Parameters + +### -ObjectId + +The unique identifier of deleted application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Restore-EntraBetaDeletedApplication](Restore-EntraBetaDeletedApplication.md) + +[Get-EntraBetaDeletedApplication](Get-EntraBetaDeletedApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md new file mode 100644 index 0000000000..37f4d8dd3f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md @@ -0,0 +1,96 @@ +--- +title: Remove-EntraBetaDeletedDirectoryObject +description: This article provides details on the Remove-EntraBetaDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 08/07/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Remove-EntraBetaDeletedDirectoryObject + +## Synopsis + +Permanently delete a previously deleted directory object. + +## Syntax + +```powershell +Remove-EntraBetaDeletedDirectoryObject + -Id + [] +``` + +## Description + +The `Remove-EntraBetaDeletedDirectoryObject` cmdlet is used to permanently delete a previously deleted directory object. + +When a directory object is permanently deleted, it can no longer be restored. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- To permanently delete applications or service principals: `Application Administrator`, `Cloud Application Administrator`, or `Hybrid Identity Administrator`. +- To permanently delete users: `User Administrator`. +- To permanently delete groups: `Groups Administrator`. + +## Examples + +### Example 1: Delete a previously deleted directory object + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Group.ReadWrite.All','Application.ReadWrite.All','User.ReadWrite.All' + +Remove-EntraBetaDeletedDirectoryObject -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This example demonstrates how to permanently delete a previously deleted directory object by ID. + +- `-Id` parameter specifies the ID of the directory object that is permanently deleted. + +## Parameters + +### -Id + +The ID of the directory object that is permanently deleted. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaDeletedDirectoryObject](Get-EntraBetaDeletedDirectoryObject.md) + +[Restore-EntraBetaDeletedDirectoryObject](Restore-EntraBetaDeletedDirectoryObject.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md new file mode 100644 index 0000000000..05abdc0f98 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md @@ -0,0 +1,108 @@ +--- +title: Remove-EntraBetaPasswordSingleSignOnCredential +description: This article provides details on the Remove-EntraBetaPasswordSingleSignOnCredential command. + +ms.topic: reference +ms.date: 07/09/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPasswordSingleSignOnCredential + +schema: 2.0.0 +--- + +# Remove-EntraBetaPasswordSingleSignOnCredential + +## Synopsis + +Removes the password Single-Sign-On (SSO) credentials. + +## Syntax + +```powershell +Remove-EntraBetaPasswordSingleSignOnCredential + -ObjectId + -PasswordSSOObjectId + [] +``` + +## Description + +This cmdlet enables users to remove their Password Single-Sign-On credentials for an application that they're part of. Specify `ObjectId` and `PasswordSSOCredential` parameters to remove specific SSO credentials. +Admin could remove the group credentials as well. + +## Examples + +### Example 1: Remove password single-sign-on credentials + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All', 'Directory.ReadWrite.All' +$servicePrincipal = Get-EntraBetaservicePrincipal -SearchString '' +$params = @{ + ObjectId = $servicePrincipal.Id + PasswordSSOCredential = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Remove-EntraBetaPasswordSingleSignOnCredential @params +``` + +This example removes the password SSO credentials for the given ObjectId and PasswordSSOObjectId. + +- `-PasswordSSOObjectId` parameter specifies the User or Group ID. +- `-ObjectId` parameter specifies the object ID of a service principal. + +## Parameters + +### -ObjectId + +The unique identifier of the object specific Microsoft Entra ID object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordSSOObjectId + +User or group ID. + +```yaml +Type: System.PasswordSSOObjectId +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaPasswordSingleSignOnCredential](New-EntraBetaPasswordSingleSignOnCredential.md) + +[Set-EntraBetaPasswordSingleSignOnCredential](Set-EntraBetaPasswordSingleSignOnCredential.md) + +[Get-EntraBetaPasswordSingleSignOnCredential](Get-EntraBetaPasswordSingleSignOnCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md new file mode 100644 index 0000000000..7affde8767 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md @@ -0,0 +1,86 @@ +--- +title: Remove-EntraBetaServicePrincipal +description: This article provides details on the Remove-EntraBetaServicePrincipal command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipal + +schema: 2.0.0 +--- + +# Remove-EntraBetaServicePrincipal + +## Synopsis + +Removes a service principal. + +## Syntax + +```powershell +Remove-EntraBetaServicePrincipal + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraBetaServicePrincipal` cmdlet removes a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Removes a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +Remove-EntraBetaServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId +``` + +This example demonstrates how to remove a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) + +[New-EntraBetaServicePrincipal](New-EntraBetaServicePrincipal.md) + +[Set-EntraBetaServicePrincipal](Set-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md new file mode 100644 index 0000000000..271d710a4e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md @@ -0,0 +1,123 @@ +--- +title: Remove-EntraBetaServicePrincipalAppRoleAssignment +description: This article provides details on the Remove-EntraBetaServicePrincipalAppRoleAssignment command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraBetaServicePrincipalAppRoleAssignment + +## Synopsis + +Removes a service principal application role assignment. + +## Syntax + +```powershell +Remove-EntraBetaServicePrincipalAppRoleAssignment + -ServicePrincipalId + -AppRoleAssignmentId + [] +``` + +## Description + +The `Remove-EntraBetaServicePrincipalAppRoleAssignment` cmdlet removes a service principal application role assignment in Microsoft Entra ID. + +App roles which are assigned to service principals are also known as application permissions. Deleting an app role assignment for a service principal is equivalent to revoking the app-only permission grant. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Synchronization Accounts +- Directory Writer +- Hybrid Identity Administrator +- Identity Governance Administrator +- Privileged Role Administrator +- User Administrator +- Application Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Removes a service principal application role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + AppRoleAssignmentId = '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' +} + +Remove-EntraBetaServicePrincipalAppRoleAssignment @params +``` + +This example demonstrates how to remove a service principal application role assignment in Microsoft Entra ID. + +- `-ServicePrincipalId` - specifies the unique identifier (Object ID) of the service principal or user from which you want to remove an app role assignment. + +- `-AppRoleAssignmentId` - specifies the unique identifier (ID) of the app role assignment that you want to remove. The value `2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6` represents the ID of the specific app role assignment to be removed. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the ID of the application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Remove-EntraBetaServiceAppRoleAssignment` is an alias for `Remove-EntraBetaServicePrincipalAppRoleAssignment`. + +## Related Links + +[Get-EntraBetaServicePrincipalAppRoleAssignment](Get-EntraBetaServicePrincipalAppRoleAssignment.md) + +[New-EntraBetaServicePrincipalAppRoleAssignment](New-EntraBetaServicePrincipalAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md new file mode 100644 index 0000000000..05a4effcd2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraBetaServicePrincipalDelegatedPermissionClassification +description: This article provides details on the Remove-EntraBetaServicePrincipalDelegatedPermissionClassification command. + + +ms.topic: reference +ms.date: 08/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification + +schema: 2.0.0 +--- + +# Remove-EntraBetaServicePrincipalDelegatedPermissionClassification + +## Synopsis + +Remove delegated permission classification. + +## Syntax + +```powershell +Remove-EntraBetaServicePrincipalDelegatedPermissionClassification + -ServicePrincipalId + -Id + [] +``` + +## Description + +The `Remove-EntraBetaServicePrincipalDelegatedPermissionClassification` cmdlet deletes the given delegated permission classification by Id from service principal. + +## Examples + +### Example 1: Remove a delegated permission classification + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' +} +Remove-EntraBetaServicePrincipalDelegatedPermissionClassification @params +``` + +This command deletes the delegated permission classification by Id from the service principal. + +- `-ServicePrincipalId` parameter specifies the unique identifier of a service principal. +- `-Id` parameter specifies the unique identifier of a delegated permission classification object Id. + +## Parameters + +### -ServicePrincipalId + +The unique identifier of a service principal object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a delegated permission classification object Id. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaServicePrincipalDelegatedPermissionClassification](Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md) + +[Get-EntraBetaServicePrincipalDelegatedPermissionClassification](Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md new file mode 100644 index 0000000000..b1dbcc576d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraBetaServicePrincipalOwner +description: This article provides details on the Remove-EntraBetaServicePrincipalOwner command. + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalOwner + +schema: 2.0.0 +--- + +# Remove-EntraBetaServicePrincipalOwner + +## Synopsis + +Removes an owner from a service principal. + +## Syntax + +```powershell +Remove-EntraBetaServicePrincipalOwner + -OwnerId + -ServicePrincipalId + [] +``` + +## Description + +The `Remove-EntraBetaServicePrincipalOwner` cmdlet removes an owner from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Removes an owner from a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$owner = Get-EntraBetaUser -UserId 'SawyerM@contoso.com' + +$params= @{ + ServicePrincipalId = $servicePrincipal.Id + OwnerId = $owner.Id +} +Remove-EntraBetaServicePrincipalOwner @params +``` + +This example demonstrates how to remove an owner from a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the service principal Id. +- `-OwnerId` parameter specifies the service principal owner Id. + +## Parameters + +### -ServicePrincipalId + +Specifies the ID of a service principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaServicePrincipalOwner](Add-EntraBetaServicePrincipalOwner.md) + +[Get-EntraBetaServicePrincipalOwner](Get-EntraBetaServicePrincipalOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md new file mode 100644 index 0000000000..013e8b3730 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraBetaServicePrincipalPasswordCredential +description: This article provides details on the Remove-EntraBetaServicePrincipalPasswordCredential command. + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPasswordCredential + +schema: 2.0.0 +--- + +# Remove-EntraBetaServicePrincipalPasswordCredential + +## Synopsis + +Removes a password credential from a service principal. + +## Syntax + +```powershell +Remove-EntraBetaServicePrincipalPasswordCredential + -ServicePrincipalId + -KeyId + [] +``` + +## Description + +The `Remove-EntraBetaServicePrincipalPasswordCredential` cmdlet removes a password credential from a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a password credential from a service principal in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$Params = @{ + ServicePrincipalId = $ServicePrincipal.ObjectId + KeyId = 'bbbbbbbb-1c1c-2d2d-3e3e-444444444444' +} +Remove-EntraBetaServicePrincipalPasswordCredential @Params +``` + +This example demonstrates how to remove a password credential from a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ObjectId of a specified Service Principal Password Credential. +- `-KeyId` parameter specifies the unique identifier of a Password Credential. + +## Parameters + +### -KeyId + +Specifies the unique identifier of password credential. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) + +[Get-EntraBetaServicePrincipalPasswordCredential](Get-EntraBetaServicePrincipalPasswordCredential.md) + +[New-EntraBetaServicePrincipalPasswordCredential](New-EntraBetaServicePrincipalPasswordCredential.md) \ No newline at end of file diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md new file mode 100644 index 0000000000..c9487dfd1e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md @@ -0,0 +1,127 @@ +--- +title: Restore-EntraBetaDeletedApplication +description: This article provides details on the Restore-EntraBetaDeletedApplication Command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedApplication + +schema: 2.0.0 +--- + +# Restore-EntraBetaDeletedApplication + +## Synopsis + +Restores a previously deleted application. + +## Syntax + +```powershell +Restore-EntraBetaDeletedApplication + -ObjectId + [-IdentifierUris ] + [] +``` + +## Description + +This cmdlet restores a previously deleted application. + +Restoring an application doesn't restore the associated service principal automatically. You must explicitly restore the deleted service principal. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles. + +- Application Administrator +- Cloud Application Administrator +- Hybrid Identity Administrator + +## Examples + +### Example 1: Restores a previously deleted application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraBetaApplication -SearchString 'New Entra Application' + +# Delete a specific application +Remove-EntraBetaApplication -ObjectId $application.ObjectId + +# Confirm deleted application +Get-EntraBetaDeletedApplication -Filter "DisplayName eq 'New Entra Application'" + +# Restore a deleted application +Restore-EntraBetaDeletedApplication -ObjectId $application.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example shows how an application is deleted, then the deleted application is retrieved using the `Get-EntraBetaDeletedApplication` cmdlet, and subsequently the application is restored by specifying the application's Object ID in the `Restore-EntraBetaDeletedApplication` cmdlet. + +- `-ObjectId` parameter specifies the ObjectId of the deleted application that is to be restored. + +## Parameters + +### -IdentifierUris + +The IdentifierUris of the application that is to be restored. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +The ObjectId of the deleted application that is to be restored. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraBetaDeletedApplication](Remove-EntraBetaDeletedApplication.md) + +[Get-EntraBetaDeletedApplication](Get-EntraBetaDeletedApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md b/moduleVNext/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md new file mode 100644 index 0000000000..6e7b36b498 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md @@ -0,0 +1,110 @@ +--- +title: Select-EntraBetaGroupIdsServicePrincipalIsMemberOf +description: This article provides details on the Select-EntraBetaGroupIdsServicePrincipalIsMemberOf command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraBetaGroupIdsServicePrincipalIsMemberOf + +## Synopsis + +Selects the groups in which a service principal is a member. + +## Syntax + +```powershell +Select-EntraBetaGroupIdsServicePrincipalIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraBetaGroupIdsServicePrincipalIsMemberOf` cmdlet selects the groups in which a service principal is a member in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a service principal + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraBetaGroup -Top 10).ObjectId +$ServicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''" +$params = @{ + ObjectId = $ServicePrincipal.ObjectId + GroupIdsForMembershipCheck = $Groups +} +Select-EntraBetaGroupIdsServicePrincipalIsMemberOf @params +``` + +```Output +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command gets the group membership of a group for a specified service principal. +You can use the command `Get-EntraBetaGroup` to get group Id. +You can use the command `Get-EntraBetaServicePrincipal` to get service principal Id. + +- `-ObjectId` parameter specifies the service principal Id. +- `-GroupIdsForMembershipCheck` parameter specifies the array of group object IDs. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md new file mode 100644 index 0000000000..ad41388264 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md @@ -0,0 +1,560 @@ +--- +title: Set-EntraBetaApplication +description: This article provides details on the Set-EntraBetaApplication command. + + +ms.topic: reference +ms.date: 06/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplication + +schema: 2.0.0 +--- + +# Set-EntraBetaApplication + +## Synopsis + +Updates the properties of an application object. + +## Syntax + +```powershell +Set-EntraBetaApplication + -ApplicationId + [-Api ] + [-OptionalClaims ] + [-DisplayName ] + [-PreAuthorizedApplications ] + [-Web ] + [-IsFallbackPublicClient ] + [-RequiredResourceAccess ] + [-PublicClient ] + [-IsDeviceOnlyAuthSupported ] + [-OrgRestrictions ] + [-KeyCredentials ] + [-TokenEncryptionKeyId ] + [-IdentifierUris ] + [-ParentalControlSettings ] + [-GroupMembershipClaims ] + [-AddIns ] + [-Tags ] + [-AppRoles ] + [-PasswordCredentials ] + [-SignInAudience ] + [-InformationalUrl ] + [] +``` + +## Description + +Updates the properties of an application object. + +## Examples + +### Example 1: Update an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + DisplayName = 'New Demo Application' +} +Set-EntraBetaApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 2: Update an application using IdentifierUris parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + IdentifierUris = 'https://mynewapp.contoso.com' +} +Set-EntraBetaApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 3: Update an application using GroupMembershipClaims parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + GroupMembershipClaims = 'SecurityGroup' +} +Set-EntraBetaApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 4: Update an application using IsDeviceOnlyAuthSupported parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + IsDeviceOnlyAuthSupported = $false +} +Set-EntraBetaApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +### Example 5: Update an application using Tags parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Original Demo Application'" +$params = @{ + ApplicationId = $application.ObjectId + Tags = 'mytag' +} +Set-EntraBetaApplication @params +``` + +This command updates an application in Microsoft Entra ID. + +## Parameters + +### -AddIns + +Defines custom behavior that a consuming service can use to call an app in specific contexts. +For example, applications that can render file streams might set the addIns property for its "FileHandler" functionality. + +This lets services like Office 365 call the application in the context of a document the user is working on. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Api + +Specifies settings for an application that implements a web API. + +```yaml +Type: ApiApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoles + +The collection of application roles that an application might declare. + +These roles can be assigned to users, groups, or service principals. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupMembershipClaims + +Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentifierUris + +Specifies identifier Uniform Resource Identifiers (URIs). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InformationalUrl + +Basic profile information of the application such as app's marketing, support, terms of service and privacy statement URLs. + +The terms of service and privacy statement are surfaced to users through the user consent experience. + +```yaml +Type: InformationalUrl +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsDeviceOnlyAuthSupported + +Specifies if the application supports authentication using a device token. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsFallbackPublicClient + +Specifies the fallback application type as public client, such as an installed application running on a mobile device. + +The default value is `false` that means the fallback application type is confidential client such as web app. + +There are certain scenarios where Microsoft Entra ID can't determine the client application type (for example, ROPC flow where it's configured without specifying a redirect URI). + +In those cases Microsoft Entra ID interprets the application type based on the value of this property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +Specifies key credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationId + +Specifies the ID of an application in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OptionalClaims + +Application developers can configure optional claims in their Microsoft Entra ID apps to specify which claims they want in tokens sent to their application by the Microsoft security token service. + +```yaml +Type: OptionalClaims +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgRestrictions + +Reserved for future use. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentalControlSettings + +Specifies parental control settings for an application. + +```yaml +Type: ParentalControlSettings +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordCredentials + +Specifies password credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreAuthorizedApplications + +Lists applications and requested permissions for implicit consent. +Requires an admin to have provided consent to the application. + +preAuthorizedApplications don't require the user to consent to the requested permissions. +Permissions listed in preAuthorizedApplications don't require user consent. + +However, any additional requested permissions not listed in preAuthorizedApplications require user consent. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication] +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicClient + +Specifies whether this application is a public client (such as an installed application running on a mobile device). Default is `false`. + +```yaml +Type: PublicClientApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RequiredResourceAccess + +Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. + +This pre-configuration of required resource access drives the consent experience. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInAudience + +Specifies what Microsoft accounts are supported for the current application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Custom strings that can be used to categorize and identify the application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TokenEncryptionKeyId + +Specifies the keyId of a public key from the keyCredentials collection. + +When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. + +The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Web + +Specifies settings for a web application. + +```yaml +Type: WebApplication +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Boolean + +### Microsoft.Open.MSGraph.Model.ApiApplication + +### Microsoft.Open.MSGraph.Model.InformationalUrl + +### Microsoft.Open.MSGraph.Model.OptionalClaims + +### Microsoft.Open.MSGraph.Model.ParentalControlSettings + +### Microsoft.Open.MSGraph.Model.PublicClientApplication + +### Microsoft.Open.MSGraph.Model.WebApplication + +### String + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication] + +### System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess] + +### System.Collections.Generic.List`1[System.String] + +### System.Nullable`1[System.Boolean] + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) + +[New-EntraBetaApplication](New-EntraBetaApplication.md) + +[Remove-EntraBetaApplication](Remove-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md new file mode 100644 index 0000000000..26fe3c778b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md @@ -0,0 +1,126 @@ +--- +title: Set-EntraBetaApplicationLogo +description: This article provides details on the Set-EntraBetaApplicationLogo command. + +ms.topic: reference +ms.date: 06/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationLogo + +schema: 2.0.0 +--- + +# Set-EntraBetaApplicationLogo + +## Synopsis + +Sets the logo for an Application + +## Syntax + +### File (Default) + +```powershell +Set-EntraBetaApplicationLogo + -ApplicationId + -FilePath + [] +``` + +### Stream + +```powershell +Set-EntraBetaApplicationLogo + -ApplicationId + [] +``` + +### ByteArray + +```powershell +Set-EntraBetaApplicationLogo + -ApplicationId + [] +``` + +## Description + +The `Set-EntraBetaApplicationLogo` cmdlet is used to set the logo for an application. + +## Examples + +### Example 1: Sets the application logo for the application specified by the ApplicationId parameter + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$application = Get-EntraBetaApplication -Filter "DisplayName eq 'Demo Application'" +$params = @{ + ObjectId = $application.ObjectId + FilePath = 'D:\applogo.jpg' +} +Set-EntraBetaApplicationLogo @params +``` + +This cmdlet sets the application logo for the application specified by the `-ApplicationId` parameter to the image specified with the `-FilePath` parameter. + +## Parameters + +### -FilePath + +The file path of the file that is to be uploaded as the application logo. + +```yaml +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationId + +The ApplicationId of the Application for which the logo is set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.IO.Stream System.Byte\[\] + +## Outputs + +### System.Object + +## Notes + +File uploads must be smaller than 500KB. + +## Related Links + +[Get-EntraBetaApplicationLogo](Get-EntraBetaApplicationLogo.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md new file mode 100644 index 0000000000..868618781a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md @@ -0,0 +1,387 @@ +--- +title: Set-EntraBetaApplicationProxyApplication +description: This article provides details on the Set-EntraBetaApplicationProxyApplication command. + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplication + +schema: 2.0.0 +--- + +# Set-EntraBetaApplicationProxyApplication + +## Synopsis + +The `Set-EntraBetaApplicationProxyApplication` allows you to modify and set configurations for an application in Microsoft Entra ID configured to use ApplicationProxy. + +## Syntax + +```powershell +Set-EntraBetaApplicationProxyApplication + -ApplicationId + [-ExternalUrl ] + [-InternalUrl ] + [-ExternalAuthenticationType ] + [-IsTranslateHostHeaderEnabled ] + [-IsHttpOnlyCookieEnabled ] + [-IsSecureCookieEnabled ] + [-IsPersistentCookieEnabled ] + [-IsTranslateLinksInBodyEnabled ] + [-ApplicationServerTimeout ] + [-ConnectorGroupId ] + [] +``` + +## Description + +The `Set-EntraBetaApplicationProxyApplication` allows you to modify and set other settings for an application in Microsoft Entra ID configured to use ApplicationProxy. Specify `ApplicationId` parameter to update application configured for application proxy. + +## Examples + +### Example 1: Update ExternalUrl, InternalUrl, ExternalAuthenticationType, and IsTranslateHostHeaderEnabled parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + ApplicationId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + ExternalUrl = 'https://finance-awcycles.msappproxy.net/' + InternalUrl = 'http://finance/' + ExternalAuthenticationType = 'AadPreAuthentication' + IsTranslateHostHeaderEnabled = $false +} +Set-EntraBetaApplicationProxyApplication @params +``` + +```Output +ObjectId : aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +externalAuthenticationType : aadPreAuthentication +applicationServerTimeout : Long +externalUrl : https://testp-m365x99297270.msappproxy.net/ +internalUrl : https://testp.com/ +isTranslateHostHeaderEnabled : False +isTranslateLinksInBodyEnabled : False +isOnPremPublishingEnabled : True +verifiedCustomDomainCertificatesMetadata : +verifiedCustomDomainKeyCredential : +verifiedCustomDomainPasswordCredential : +singleSignOnSettings : @{singleSignOnMode=none; kerberosSignOnSettings=} +isHttpOnlyCookieEnabled : False +isSecureCookieEnabled : False +isPersistentCookieEnabled : False +``` + +This example update `ExternalUrl`, `InternalUrl`, `ExternalAuthenticationType`, and `IsTranslateHostHeaderEnabled` parameter. + +- `-ApplicationId` parameter specifies the application ID. +- `-ExternalUrl` parameter specifies the URL that use to access the application from outside user private network. +- `-InternalUrl` parameter specifies the URL that use to access the application from inside user private network. +- `-ExternalAuthenticationType` parameter specifies the external authentication type. +- `-IsTranslateHostHeaderEnabled` parameter specifies the translates urls in headers. + +### Example 2: Update IsHttpOnlyCookieEnabled, IsSecureCookieEnabled, and IsPersistentCookieEnabled parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + ApplicationId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + ExternalUrl = 'https://finance-awcycles.msappproxy.net/' + InternalUrl = 'http://finance/' + ExternalAuthenticationType = 'AadPreAuthentication' + IsTranslateHostHeaderEnabled = $false + IsHttpOnlyCookieEnabled = $false + IsSecureCookieEnabled = $false + IsPersistentCookieEnabled = $false +} +Set-EntraBetaApplicationProxyApplication @params +``` + +```Output +ObjectId : aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +externalAuthenticationType : aadPreAuthentication +applicationServerTimeout : Long +externalUrl : https://testp-contoso.msappproxy.net/ +internalUrl : https://testp.com/ +isTranslateHostHeaderEnabled : False +isTranslateLinksInBodyEnabled : False +isOnPremPublishingEnabled : True +verifiedCustomDomainCertificatesMetadata : +verifiedCustomDomainKeyCredential : +verifiedCustomDomainPasswordCredential : +singleSignOnSettings : @{singleSignOnMode=none; kerberosSignOnSettings=} +isHttpOnlyCookieEnabled : False +isSecureCookieEnabled : False +isPersistentCookieEnabled : False +``` + +This example update `IsHttpOnlyCookieEnabled`, `IsSecureCookieEnabled`, and `IsPersistentCookieEnabled` parameter. + +- `-ApplicationId` parameter specifies the application ID. +- `-ExternalUrl` parameter specifies the URL that use to access the application from outside user private network. +- `-InternalUrl` parameter specifies the URL that use to access the application from inside user private network. +- `-ExternalAuthenticationType` parameter specifies the external authentication type. +- `-IsHttpOnlyCookieEnabled` parameter specifies the application proxy to include the HTTPOnly flag in HTTP response headers. +- `-IsSecureCookieEnabled` parameter specifies the application proxy to include the Secure flag in HTTP response headers. +- `-IsTranslateHostHeaderEnabled` parameter specifies the translates urls in headers. +- `-IsPersistentCookieEnabled` parameter specifies application proxy to set its access cookies to not expire when the web browser is closed. + +### Example 3: Update IsTranslateLinksInBodyEnabled, ApplicationServerTimeout, and ConnectorGroupId parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + ApplicationId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + ExternalUrl = 'https://finance-awcycles.msappproxy.net/' + InternalUrl = 'http://finance/' + ExternalAuthenticationType = 'AadPreAuthentication' + IsTranslateHostHeaderEnabled = $false + ApplicationServerTimeout = Long + ConnectorGroupId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Set-EntraBetaApplicationProxyApplication @params +``` + +```Output +ObjectId : aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +externalAuthenticationType : aadPreAuthentication +applicationServerTimeout : Long +externalUrl : https://testp-contoso.msappproxy.net/ +internalUrl : https://testp.com/ +isTranslateHostHeaderEnabled : False +isTranslateLinksInBodyEnabled : False +isOnPremPublishingEnabled : True +verifiedCustomDomainCertificatesMetadata : +verifiedCustomDomainKeyCredential : +verifiedCustomDomainPasswordCredential : +singleSignOnSettings : @{singleSignOnMode=none; kerberosSignOnSettings=} +isHttpOnlyCookieEnabled : False +isSecureCookieEnabled : False +isPersistentCookieEnabled : False +``` + +This example update `IsTranslateLinksInBodyEnabled`, `ApplicationServerTimeout`, and `ConnectorGroupId` parameter. + +- `-ApplicationId` parameter specifies the application ID. +- `-ExternalUrl` parameter specifies the URL that use to access the application from outside user private network. +- `-InternalUrl` parameter specifies the URL that use to access the application from inside user private network. +- `-ConnectorGroupId` parameter specifies the Connector group ID that assigned to this application. +- `-ApplicationServerTimeout` parameter specifies the application server timeout to set. +- `-ExternalAuthenticationType` parameter specifies the external authentication type. +- `-IsTranslateHostHeaderEnabled` parameter specifies the translates urls in headers. + +## Parameters + +### -ApplicationId + +Specifies a unique application ID of an application in Microsoft Entra ID. +This objectid can be found using the `Get-EntraBetaApplication` command. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExternalUrl + +The address your users go to in order to access the app from outside your network. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -InternalUrl + +The URL that you use to access the application from inside your private network. +You can provide a specific path on the backend server to publish, while the rest of the server is unpublished. +In this way, you can publish different sites on the same server as different apps, and give each one its own name and access rules. +If you publish a path, make sure that it includes all the necessary images, scripts, and style sheets for your application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExternalAuthenticationType + +How Application Proxy verifies users before giving them access to your application. +AadPreAuth: Application Proxy redirects users to sign in with Microsoft Entra ID, which authenticates their permissions for the directory and application. +We recommend keeping this option as the default, so that you can take advantage of Microsoft Entra ID security features like conditional access and multifactor authentication. +Pass through: Users don't have to authenticate against Microsoft Entra ID to access the application. +You can still set up authentication requirements on the backend. + +```yaml +Type: ExternalAuthenticationTypeEnum +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsTranslateHostHeaderEnabled + +If set to true, translates urls in headers. +Keep this value true unless your application required the original host header in the authentication request. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsTranslateLinksInBodyEnabled + +If set to true, translates urls in body. +Keep this value as No unless you have to hardcoded HTML links to other on-premises applications, and don't use custom domains. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ApplicationServerTimeout + +Specifies the backend server timeout type. +Set this value to Long only if your application is slow to authenticate and connect. + +```yaml +Type: ApplicationServerTimeoutEnum +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConnectorGroupId + +Provide the ID of the Connector group you would like assigned to this application. +You can find this value by using the `Get-EntraBetaApplicationProxyConnectorGroup` command. +Connectors process the remote access to your application, and connector groups help you organize connectors and apps by region, network, or purpose. +If you don't have any connector groups created yet, your app is assigned to Default. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsHttpOnlyCookieEnabled + +Allows application proxy to include the HTTPOnly flag in HTTP response headers. This flag provides extra security benefits, for example, it prevents client-side scripting (CSS) from copying or modifying the cookies. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsPersistentCookieEnabled + +Allows application proxy to set its access cookies to not expire when the web browser is closed. The persistence lasts until the access token expires, or until the user manually deletes the persistent cookies. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsSecureCookieEnabled + +Allows application proxy to include the Secure flag in HTTP response headers. Secure Cookies enhances security by transmitting cookies over a "TLS" secured channel such as HTTPS. TLS prevents cookie transmission in clear text. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplicationProxyApplication](New-EntraBetaApplicationProxyApplication.md) + +[Get-EntraBetaApplicationProxyApplication](Get-EntraBetaApplicationProxyApplication.md) + +[Remove-EntraBetaApplicationProxyApplication](Remove-EntraBetaApplicationProxyApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md new file mode 100644 index 0000000000..eb9f64870e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -0,0 +1,112 @@ +--- +title: Set-EntraBetaApplicationProxyApplicationConnectorGroup +description: This article provides details on the Set-EntraBetaApplicationProxyApplicationConnectorGroup command. + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationConnectorGroup + +schema: 2.0.0 +--- + +# Set-EntraBetaApplicationProxyApplicationConnectorGroup + +## Synopsis + +The `Set-EntraBetaApplicationProxyApplicationConnectorGroup` cmdlet assigns the given connector group to a specified application. + +## Syntax + +```powershell +Set-EntraBetaApplicationProxyApplicationConnectorGroup + -OnPremisesPublishingProfileId + -ConnectorGroupId + [] +``` + +## Description + +The `Set-EntraBetaApplicationProxyApplicationConnectorGroup` cmdlet sets the connector group assigned for the specified application. Specify `OnPremisesPublishingProfileId` and `ConnectorGroupId` parameter to assign the given connector group to a specified application. + +The application must be configured for Application Proxy in Microsoft Entra ID. + +## Examples + +### Example 1: Set a new Connector Group for a specific application + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + OnPremisesPublishingProfileId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + ConnectorGroupId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Set-EntraBetaApplicationProxyApplicationConnectorGroup @params +``` + +This example set a new Connector Group for a specific application. + +- `OnPremisesPublishingProfileId` parameter specifies the application ID. +- `ConnectorGroupId` parameter specifies the connector group ID that assign to the application. + +## Parameters + +### -ConnectorGroupId + +The ID of the Connector group that should be assigned to the application. +Use the `Get-EntraBetaApplicationProxyConnectorGroup` command to find the Connector Group ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OnPremisesPublishingProfileId + +The unique application ID for the application the Connector group assigns to. +The application ID can be found using the `Get-EntraBetaApplication` command. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaApplicationProxyApplicationConnectorGroup](Get-EntraBetaApplicationProxyApplicationConnectorGroup.md) + +[Remove-EntraBetaApplicationProxyApplicationConnectorGroup](Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md new file mode 100644 index 0000000000..64d49c582d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md @@ -0,0 +1,168 @@ +--- +title: Set-EntraBetaApplicationProxyApplicationSingleSignOn +description: This article provides details on the Set-EntraBetaApplicationProxyApplicationSingleSignOn command. + + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationSingleSignOn + +schema: 2.0.0 +--- + +# Set-EntraBetaApplicationProxyApplicationSingleSignOn + +## Synopsis + +The `Set-EntraBetaApplicationProxyApplicationSingleSignOn` cmdlet allows you to set and modify single sign-on (SSO) settings for an application configured for Application Proxy in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraBetaApplicationProxyApplicationSingleSignOn + -ObjectId + -SingleSignOnMode + [-KerberosInternalApplicationServicePrincipalName ] + [-KerberosDelegatedLoginIdentity ] + [] +``` + +## Description + +The `Set-EntraBetaApplicationProxyApplicationSingleSignOn` cmdlet allows you to set and modify single sign-on (SSO) settings for an application configured for Application Proxy in Microsoft Entra ID. +This is limited to setting No SSO, Kerberos Constrained Delegation (for applications using Integrated Windows Authentication), and Header-based SSO. + +## Examples + +### Example 1: Assign an application to use Kerberos Constrained Delegation, and specify required parameters + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + ObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + SingleSignOnMode = 'OnPremisesKerberos' + KerberosInternalApplicationServicePrincipalName = 'https/www.adventure-works.com' + KerberosDelegatedLoginIdentity = 'OnPremisesUserPrincipalName' +} +Set-EntraBetaApplicationProxyApplicationSingleSignOn @params +``` + +This example assigns an application to use Kerberos Constrained Delegation, and specify required parameters. + +- `-ObjectId` parameter specifies the application ID. +- `-SingleSignOnMode` parameter specifies the type of SSO. +- `-KerberosInternalApplicationServicePrincipalName` parameter specifies the internal application ServicePrincipalName of the application server. +- `-KerberosDelegatedLoginIdentity` parameter specifies the Connector group ID that assigned to this application. + +### Example 2: Remove SSO from an application + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + ObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + SingleSignOnMode = 'None' +} +Set-EntraBetaApplicationProxyApplicationSingleSignOn @params +``` + +This example demonstrates how to remove SSO from an application. + +- `-ObjectId` parameter specifies the application ID. +- `-SingleSignOnMode` parameter specifies the type of SSO. + +## Parameters + +### -KerberosDelegatedLoginIdentity + +The identity that the Connector can use on behalf of your users to authenticate. + +```yaml +Type: KerberosSignOnMappingAttributeTypeEnum +Parameter Sets: (All) +Aliases: +Accepted values: UserPrincipalName, OnPremisesUserPrincipalName, UserPrincipalUsername, OnPremisesUserPrincipalUsername, OnPremisesSAMAccountName + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -KerberosInternalApplicationServicePrincipalName + +The internal application SPN of the application server. +This ServicePrincipalName (SPN) needs to be in the list of services to which the Connector can present delegated credentials. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +The unique application ID of the application that needs different SSO settings. +ObjectId can be found using the `Get-EntraBetaApplication` command. +You can also find this in the Microsoft Portal by navigating to Microsoft Entra ID, Enterprise Applications, All Applications, Select your application, go to the properties tab, and use the ObjectId on that page. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SingleSignOnMode + +Choose the type of SSO you would like the application to use. +Only three SSO settings are supported in PowerShell, for more options, please use the Microsoft Portal. + +```yaml +Type: SingleSignOnModeEnum +Parameter Sets: (All) +Aliases: +Accepted values: None, OnPremisesKerberos, HeaderBased + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[Microsoft.Open.MSGraph.Model.OnPremisesPublishingSingleSignOnObject+SingleSignOnModeEnum, Microsoft.Open.MS.GraphV10.Client, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null\]\] System.Nullable\`1\[\[Microsoft.Open.MSGraph.Model.OnPremisesPublishingKerberosSignOnSettingsObject+KerberosSignOnMappingAttributeTypeEnum, Microsoft.Open.MS.GraphV10.Client, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md new file mode 100644 index 0000000000..da217b338a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md @@ -0,0 +1,105 @@ +--- +title: Set-EntraBetaApplicationProxyConnector +description: This article provides details on the Set-EntraBetaApplicationProxyConnector command. + +ms.topic: reference +ms.date: 07/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnector + +schema: 2.0.0 +--- + +# Set-EntraBetaApplicationProxyConnector + +## Synopsis + +The `Set-EntraBetaApplicationProxyConnector` cmdlet allows reassignment of the connector to another connector group. + +## Syntax + +```powershell +Set-EntraBetaApplicationProxyConnector + -OnPremisesPublishingProfileId + -ConnectorGroupId + [] +``` + +## Description + +The `Set-EntraBetaApplicationProxyConnector` cmdlet allows reassignment of the connector to another connector group. + +## Examples + +### Example 1: Move a Connector to a different Connector Group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + OnPremisesPublishingProfileId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + ConnectorGroupId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Set-EntraBetaApplicationProxyConnector @params +``` + +This example demonstrates how to move a Connector to a different Connector Group. + +- `-OnPremisesPublishingProfileId` parameter specifies the connector ID. +- `-ConnectorGroupId` parameter specifies the application proxy connector group ID. + +## Parameters + +### -OnPremisesPublishingProfileId + +The ID of the Connector being moved. +Use the `Get-EntraBetaApplicationProxyConnectorGroup` command to find the Connector Group ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConnectorGroupId + +The unique identifer of the target application proxy connector group in Microsoft Entra ID. +Find this value using the `Get-EntraBetaApplicationProxyConnectorGroup` command. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaApplicationProxyConnectorGroup](Get-EntraBetaApplicationProxyConnectorGroup.md) +[Get-EntraBetaApplicationProxyConnector](Get-EntraBetaApplicationProxyConnector.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md new file mode 100644 index 0000000000..e9fb443977 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md @@ -0,0 +1,103 @@ +--- +title: Set-EntraBetaApplicationProxyConnectorGroup +description: This article provides details on the Set-EntraBetaApplicationProxyConnectorGroup command. + +ms.topic: reference +ms.date: 07/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnectorGroup + +schema: 2.0.0 +--- + +# Set-EntraBetaApplicationProxyConnectorGroup + +## Synopsis + +The `Set-EntraBetaApplicationProxyConnectorGroup` cmdlet allows you to change the name of a given Application Proxy connector group. + +## Syntax + +```powershell +Set-EntraBetaApplicationProxyConnectorGroup + -Id + -Name + [] +``` + +## Description + +The `Set-EntraBetaApplicationProxyConnectorGroup` cmdlet allows you to change the name of a given Application Proxy connector group. Specify `Id` and `Name` parameters to updates an connector group. + +## Examples + +### Example 1: Rename a Connector Group to "Offsite Application Servers" + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Set-EntraBetaApplicationProxyConnectorGroup -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Name 'Offsite Application Servers' +``` + +This example rename a Connector Group to "Offsite Application Servers" + +- `Id` parameter specifies the connector group ID. +- `Name` parameter specifies the name for connector group. + +## Parameters + +### -Id + +The unique identifier of the Connector group that should be renamed. +You can find the ID using the `Get-EntraBetaApplicationProxyConnectorGroup` command. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Name + +The new name for the Connector group. + +```yaml +Type: System.Name +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaApplicationProxyConnectorGroup](New-EntraBetaApplicationProxyConnectorGroup.md) + +[Get-EntraBetaApplicationProxyConnectorGroup](Get-EntraBetaApplicationProxyConnectorGroup.md) + +[Remove-EntraBetaApplicationProxyConnectorGroup](Remove-EntraBetaApplicationProxyConnectorGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md new file mode 100644 index 0000000000..c84509e00b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md @@ -0,0 +1,111 @@ +--- +title: Set-EntraBetaApplicationVerifiedPublisher +description: This article provides details on the Set-EntraBetaApplicationVerifiedPublisher command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationVerifiedPublisher + +schema: 2.0.0 +--- + +# Set-EntraBetaApplicationVerifiedPublisher + +## Synopsis + +Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. + +## Syntax + +```powershell +Set-EntraBetaApplicationVerifiedPublisher + -SetVerifiedPublisherRequest + -AppObjectId + [] +``` + +## Description + +Sets the verified publisher of an application to a verified Microsoft Partner Network (MPN) identifier. + +## Examples + +### Example 1: Set the verified publisher of an application + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All' +$app = Get-EntraBetaApplication -Filter "DisplayName eq ''" +$appObjId = $app.ObjectId +$mpnId = '0433167' +$req = @{verifiedPublisherId = $mpnId} +$params = @{ + AppObjectId = $appObjId + SetVerifiedPublisherRequest = $req +} +Set-EntraBetaApplicationVerifiedPublisher @params +``` + +This command sets the verified publisher of an application. + +The Microsoft Partner Network ID (MPNID) of the verified publisher can be obtained from the publisher's Partner Center account. + +- `-AppObjectId` parameter specifies the unique identifier of a Microsoft Entra ID Application. +- `-SetVerifiedPublisherRequest` parameter specifies the request body object containing the verifiedPublisherId property with it's the MPNID value. + +## Parameters + +### -AppObjectId + +The unique identifier of a Microsoft Entra ID Application object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SetVerifiedPublisherRequest + +A request body object containing the verifiedPublisherId property it's the MPNID value. + +```yaml +Type: SetVerifiedPublisherRequest +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraBetaApplicationVerifiedPublisher](Remove-EntraBetaApplicationVerifiedPublisher.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md new file mode 100644 index 0000000000..7f415034aa --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md @@ -0,0 +1,113 @@ +--- +title: Set-EntraBetaPasswordSingleSignOnCredential +description: This article provides details on the Set-EntraBetaPasswordSingleSignOnCredential command. + +ms.topic: reference +ms.date: 07/09/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPasswordSingleSignOnCredential + +schema: 2.0.0 +--- + +# Set-EntraBetaPasswordSingleSignOnCredential + +## Synopsis + +Sets the password Single-Sign-On (SSO) credentials. + +## Syntax + +```powershell +Set-EntraBetaPasswordSingleSignOnCredential + -ObjectId + -PasswordSSOCredential + [] +``` + +## Description + +This cmdlet enables users to set their Password Single-Sign-On credentials for an application that they're part of. Specify `ObjectId` and `PasswordSSOCredential` parameters to updates SSO credentials. +Admin could set the group credentials as well. + +## Examples + +### Example 1: Set password single-sign-on credentials + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All' +$servicePrincipal = Get-EntraBetaservicePrincipal -SearchString '' +$credentials = New-Object -TypeName Microsoft.Open.MSGraph.Model.PasswordSSOCredentials +$credentials.Id = '' +$creds1 = [Microsoft.Open.MSGraph.Model.PasswordSSOCredential]@{FieldId="param_emailOrUserName"; Value="foobar@ms.com"; Type="text"} +$creds2 = [Microsoft.Open.MSGraph.Model.PasswordSSOCredential]@{FieldId="param_password"; Value="my-secret"; Type="password"} +$credentials.Credentials = @($creds1, $creds2) +$params = @{ + ObjectId = $servicePrincipal.Id + PasswordSSOCredential = $credentials +} +Set-EntraBetaPasswordSingleSignOnCredential @params +``` + +This example demonstrates how to set the password SSO credentials for the given ObjectId and PasswordSSOObjectId. + +- `-PasswordSSOObjectId` parameter specifies the User or Group ID. +- `-ObjectId` parameter specifies the object ID of a service principal. + +## Parameters + +### -ObjectId + +The unique identifier of the object specific Microsoft Entra ID object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordSSOCredential + +User or group ID. + +```yaml +Type: System.PasswordSSOCredentials +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaPasswordSingleSignOnCredential](New-EntraBetaPasswordSingleSignOnCredential.md) + +[Get-EntraBetaPasswordSingleSignOnCredential](Get-EntraBetaPasswordSingleSignOnCredential.md) + +[Remove-EntraBetaPasswordSingleSignOnCredential](Remove-EntraBetaPasswordSingleSignOnCredential.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md new file mode 100644 index 0000000000..6e18835032 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md @@ -0,0 +1,440 @@ +--- +title: Set-EntraBetaServicePrincipal +description: This article provides details on the Set-EntraBetaServicePrincipal command. + +ms.topic: reference +ms.date: 06/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaServicePrincipal + +schema: 2.0.0 +--- + +# Set-EntraBetaServicePrincipal + +## Synopsis + +Updates a service principal. + +## Syntax + +```powershell +Set-EntraBetaServicePrincipal + -ServicePrincipalId + [-KeyCredentials ] + [-Homepage ] + [-AppId ] + [-LogoutUrl ] + [-ServicePrincipalType ] + [-AlternativeNames ] + [-PasswordCredentials ] + [-PreferredSingleSignOnMode ] + [-Tags ] + [-AccountEnabled ] + [-ServicePrincipalNames ] + [-AppRoleAssignmentRequired ] + [-DisplayName ] + [-ReplyUrls ] + [] +``` + +## Description + +The `Set-EntraBetaServicePrincipal` cmdlet updates a service principal in Microsoft Entra ID. + +## Examples + +### Example 1: Disable the account of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AccountEnabled = $False +} +Set-EntraBetaServicePrincipal @params +``` + +This example demonstrates how to update `AccountEnabled` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-AccountEnabled` parameter specifies indicates whether the account is enabled. + +### Example 2: Update AppId and Homepage of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AppId = '22223333-cccc-4444-dddd-5555eeee6666' + Homepage = 'https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z' +} +Set-EntraBetaServicePrincipal @params +``` + +This example demonstrates how to update `AppId` and Homepage of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-AppId` parameter specifies the application ID. +- `-Homepage` parameter specifies the home page or landing page of the application. + +### Example 3: Update AlternativeNames and DisplayName of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + AlternativeNames = 'Service Principal Demo' + DisplayName = 'NewName' +} +Set-EntraBetaServicePrincipal @params +``` + +This example demonstrates how to update AlternativeNames and DisplayName of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. + +### Example 4: Update LogoutUrl and ReplyUrls of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + LogoutUrl = 'https://securescore.office.com/SignOut' + ReplyUrls = 'https://admin.contoso.com' +} +Set-EntraBetaServicePrincipal @params +``` + +This example demonstrates how to update LogoutUrl and ReplyUrls of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-LogoutUrl` parameter specifies the sign out URL. +- `-ReplyUrls` parameter specifies the URLs that user tokens are sent to for sign in with the associated application. + +### Example 5: Update ServicePrincipalType and AppRoleAssignmentRequired of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + ServicePrincipalType = 'Application' + AppRoleAssignmentRequired = $True +} +Set-EntraBetaServicePrincipal @params +``` + +This example demonstrates how to update `ServicePrincipalType` and `AppRoleAssignmentRequired` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-ServicePrincipalType` parameter specifies the service principal type. +- `-AppRoleAssignmentRequired` parameter specifies indicates whether an application role assignment is required. + +### Example 6: Update KeyCredentials of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential +$creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Test') +$startdate = Get-Date -Year 2024 -Month 10 -Day 10 +$creds.StartDate = $startdate +$creds.Type = 'Symmetric' +$creds.Usage = 'Sign' +$creds.Value = [System.Text.Encoding]::UTF8.GetBytes('A') +$creds.EndDate = Get-Date -Year 2025 -Month 12 -Day 20 +Set-EntraBetaServicePrincipal -ServicePrincipalId $servicePrincipal.ObjectId -KeyCredentials $creds +``` + +This example demonstrates how to update KeyCredentials of a service principal in Microsoft Entra ID. + +Use the `New-EntraBetaServicePrincipalPasswordCredential` and `Remove-EntraBetaServicePrincipalPasswordCredential` cmdlets to update the password or secret for a servicePrincipal. + +### Example 7: Update PreferredSingleSignOnMode of a service principal + +```powershell +Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Entra PowerShell Service Principal'" +$params = @{ + ServicePrincipalId = $servicePrincipal.ObjectId + PreferredSingleSignOnMode = 'saml' +} +Set-EntraBetaServicePrincipal @params +``` + +This example demonstrates how to update `PreferredSingleSignOnMode` of a service principal in Microsoft Entra ID. + +- `-ServicePrincipalId` parameter specifies the ID of a service principal. +- `-PreferredSingleSignOnMode` parameter specifies the single sign-on mode configured for this application. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeNames + +The alternative names for this service principal. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppId + +Specifies the application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppRoleAssignmentRequired + +Indicates whether an application role assignment is required. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Homepage + +Specifies the home page or landing page of the application. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyCredentials + +Specifies key credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogoutUrl + +Specifies the sign out URL. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalId + +Species the ID of a service principal in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PasswordCredentials + +Specifies password credentials. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredSingleSignOnMode + +Specifies the single sign-on mode configured for this application. Microsoft Entra ID uses the preferred single sign-on mode to launch the application from Microsoft 365 or the My Apps portal. The supported values are password, saml, notSupported, and oidc. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReplyUrls + +The URLs that user tokens are sent to for sign in with the associated application, or the redirect Uniform Resource Identifiers that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalNames + +Specifies service principal names. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServicePrincipalType + +The service principal type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tags + +Specifies an array of tags. + +If you intend for this service principal to show up in the All Applications list in the admin portal, you need to set this value to {WindowsAzureActiveDirectoryIntegratedApp}. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) + +[New-EntraBetaServicePrincipal](New-EntraBetaServicePrincipal.md) + +[Remove-EntraBetaServicePrincipal](Remove-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Connect-Entra.md b/moduleVNext/docs/entra-powershell-beta/Authentication/Connect-Entra.md new file mode 100644 index 0000000000..458ca255e5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Authentication/Connect-Entra.md @@ -0,0 +1,583 @@ +--- +title: Connect-Entra +description: This article provides details on the Connect-Entra Command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi254 +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Connect-Entra + +schema: 2.0.0 +--- + +# Connect-Entra + +## Synopsis + +Connect to Microsoft Entra ID with an authenticated account. + +## Syntax + +### UserParameterSet (Default) + +```powershell +Connect-Entra + [[-Scopes] ] + [[-ClientId] ] + [-TenantId ] + [-ContextScope ] + [-Environment ] + [-UseDeviceCode] + [-ClientTimeout ] + [-NoWelcome] + [] +``` + +### AppCertificateParameterSet + +```powershell +Connect-Entra + [-ClientId] + [[-CertificateSubjectName] ] + [[-CertificateThumbprint] ] + [-Certificate ] + [-TenantId ] + [-ContextScope ] + [-Environment ] + [-ClientTimeout ] + [-NoWelcome] + [] +``` + +### IdentityParameterSet + +```powershell +Connect-Entra + [[-ClientId] ] + [-ContextScope ] + [-Environment ] + [-ClientTimeout ] + [-Identity] + [-NoWelcome] + [] +``` + +### AppSecretCredentialParameterSet + +```powershell +Connect-Entra + [-ClientSecretCredential ] + [-TenantId ] + [-ContextScope ] + [-Environment ] + [-ClientTimeout ] + [-NoWelcome] + [] +``` + +### AccessTokenParameterSet + +```powershell +Connect-Entra + [-AccessToken] + [-Environment ] + [-ClientTimeout ] + [-NoWelcome] + [] +``` + +### EnvironmentVariableParameterSet + +```powershell +Connect-Entra + [-ContextScope ] + [-Environment ] + [-ClientTimeout ] + [-EnvironmentVariable] + [-NoWelcome] + [] +``` + +## Description + +The `Connect-Entra` cmdlet connects to Microsoft Entra ID with an authenticated account. + +Several authentication scenarios are supported based on your use case, such as delegated (interactive) and app-only (non-interactive). + +`Connect-Entra` is an alias for `Connect-MgGraph`. + +## Examples + +### Example 1: Delegated access: Connect a PowerShell session to a tenant + +```powershell +Connect-Entra +``` + +This example shows how to connect your current PowerShell session to a Microsoft Entra ID tenant using credentials. + +### Example 2: Delegated access: Connect a PowerShell session to a tenant with required scopes + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Group.ReadWrite.All' +``` + +```Output +Welcome to Microsoft Graph! + +``` + +This example shows how to authenticate to Microsoft Entra ID with scopes. + +### Example 3: Delegated access: Using an access token + +```powershell +$secureString = ConvertTo-SecureString -String $AccessToken -AsPlainText -Force +Connect-Entra -AccessToken $secureString +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example shows how to interactively authenticate to Microsoft Entra ID using an access token. + +For more information on how to get or create access token, see [Request an access token](https://learn.microsoft.com/graph/auth-v2-user#3-request-an-access-token). + +### Example 4: Delegated access: Using device code flow + +```powershell +Connect-Entra -UseDeviceCode +``` + +```Output +To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code A1B2CDEFGH to authenticate. +``` + +This example shows how to interactively authenticate to Microsoft Entra ID using device code flow. + +For more information, see [Device Code flow](https://learn.microsoft.com/entra/identity-platform/v2-oauth2-device-code). + +### Example 5: App-only access: Using client credential with a Certificate thumbprint + +```powershell +$connectParams = @{ + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + ApplicationId = '00001111-aaaa-2222-bbbb-3333cccc4444' + CertificateThumbprint = 'AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00' +} + +Connect-Entra @connectParams +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example shows how to authenticate using an ApplicationId and CertificateThumbprint. + +For more information on how to get or create CertificateThumbprint, see [Authenticate with app-only access](https://learn.microsoft.com/powershell/entra-powershell/app-only-access-auth). + +### Example 6: App-only access: Using client credential with a certificate name + +```powershell +$params = @{ + ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + CertificateName = 'YOUR_CERT_SUBJECT' +} + +Connect-Entra @params +``` + +```powershell + $Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint + Connect-Entra -ClientId '' -TenantId '' -Certificate $Cert +``` + +You can find the certificate subject by running the above command. + +### Example 7: App-only access: Using client credential with a certificate + +```powershell +$Cert = Get-ChildItem Cert:\LocalMachine\My\$CertThumbprint +$params = @{ + ClientId = '00001111-aaaa-2222-bbbb-3333cccc4444' + TenantId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + Certificate = $Cert +} + +Connect-Entra @params +``` + +### Example 8: App-only access: Using client secret credentials + +```powershell +$ClientSecretCredential = Get-Credential -Credential '00001111-aaaa-2222-bbbb-3333cccc4444' +# Enter client_secret in the password prompt. +Connect-Entra -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' -ClientSecretCredential $ClientSecretCredential +``` + +This authentication method is ideal for background interactions. + +For more information on how to get credential, see [Get-Credential](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential) command. + +### Example 9: App-only access: Using managed identity: System-assigned managed identity + +```powershell +Connect-Entra -Identity +``` + +Uses an automatically managed identity on a service instance. The identity is tied to the lifecycle of a service instance. + +### Example 10: App-only access: Using managed identity: User-assigned managed identity + +```powershell +Connect-Entra -Identity -ClientId 'User_Assigned_Managed_identity_Client_Id' +``` + +Uses a user created managed identity as a standalone Azure resource. + +### Example 11: Connecting to an environment as a different identity + +```powershell +Connect-Entra -ContextScope 'Process' +``` + +```Output +Welcome to Microsoft Graph! +``` + +To connect as a different identity other than CurrentUser, specify the ContextScope parameter with the value Process. + +For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/microsoft.graph.entra/get-entracontext) command. + +### Example 12: Connecting to an environment or cloud + +```powershell +Get-EntraEnvironment +``` + +```Output +Name AzureADEndpoint GraphEndpoint Type +---- --------------- ------------- ---- +China https://login.chinacloudapi.cn https://microsoftgraph.chinacloudapi.cn Built-in +Global https://login.microsoftonline.com https://graph.microsoft.com Built-in +USGov https://login.microsoftonline.us https://graph.microsoft.us Built-in +USGovDoD https://login.microsoftonline.us https://dod-graph.microsoft.us Built-in +``` + +```powershell +Connect-Entra -Environment 'Global' +``` + +When you use Connect-Entra, you can choose to target other environments. By default, Connect-Entra targets the global public cloud. + +### Example 13: Sets the HTTP client timeout in seconds + +```powershell + Connect-Entra -ClientTimeout 60 +``` + +```Output +Welcome to Microsoft Graph! +``` + +This example Sets the HTTP client timeout in seconds. + +### Example 14: Hides the welcome message + +```powershell +Connect-Entra -NoWelcome +``` + +This example hides the welcome message. + +### Example 15: Allows for authentication using environment variables + +```powershell +Connect-Entra -EnvironmentVariable +``` + +This example allows for authentication using environment variables. + +## Parameters + +### -CertificateThumbprint + +Specifies the certificate thumbprint of a digital public key X.509 certificate of a user account that has permission to perform this action. + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientId + +Specifies the application ID of the service principal. + +```yaml +Type: System.String +Parameter Sets: UserParameterSet, IdentityParameterSet +Aliases: AppId, ApplicationId + +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: AppId, ApplicationId + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the ID of a tenant. + +If you don't specify this parameter, the account is authenticated with the home tenant. + +You must specify the TenantId parameter to authenticate as a service principal or when using Microsoft account. + +```yaml +Type: System.String +Parameter Sets: UserParameterSet, AppCertificateParameterSet, AppSecretCredentialParameterSet +Aliases: Audience, Tenant + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AccessToken + +Specifies a bearer token for Microsoft Entra service. Access tokens do time out and you have to handle their refresh. + +```yaml +Type: SecureString +Parameter Sets: AccessTokenParameterSet +Aliases: +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientTimeout + +Sets the HTTP client timeout in seconds. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContextScope + +Determines the scope of authentication context. This ContextScope accepts `Process` for the current process, or `CurrentUser` for all sessions started by user. + +```yaml +Type: ContextScope +Accepted values: Process, CurrentUser +Parameter Sets: UserParameterSet, AppCertificateParameterSet, IdentityParameterSet, AppSecretCredentialParameterSet, EnvironmentVariableParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Environment + +The name of the national cloud environment to connect to. By default global cloud is used. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: EnvironmentName, NationalCloud +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWelcome + +Hides the welcome message. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scopes + +An array of delegated permissions to consent to. + +```yaml +Type: System.String[] +Parameter Sets: UserParameterSet +Aliases: +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UseDeviceCode + +Use device code authentication instead of a browser control. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UserParameterSet +Aliases: UseDeviceAuthentication, DeviceCode, DeviceAuth, Device +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Certificate + +An X.509 certificate supplied during invocation. + +```yaml +Type: X509Certificate2 +Parameter Sets: AppCertificateParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CertificateSubjectName + +The subject distinguished name of a certificate. The certificate is retrieved from the current user's certificate store. + +```yaml +Type: System.String +Parameter Sets: AppCertificateParameterSet +Aliases: CertificateSubject, CertificateName +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecretCredential + +The PSCredential object provides the application ID and client secret for service principal credentials. For more information about the PSCredential object, type Get-Help Get-Credential. + +```yaml +Type: PSCredential +Parameter Sets: AppSecretCredentialParameterSet +Aliases: SecretCredential, Credential +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnvironmentVariable + +Allows for authentication using environment variables configured on the host machine. See + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: EnvironmentVariableParameterSet +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Identity + +Sign-in using a managed identity + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: IdentityParameterSet +Aliases: ManagedIdentity, ManagedServiceIdentity, MSI +Required: False +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction + +The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break. + +```yaml +Type: ActionPreference +Parameter Sets: (All) +Aliases: proga +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Disconnect-Entra](Disconnect-Entra.md) \ No newline at end of file diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md b/moduleVNext/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md new file mode 100644 index 0000000000..7a912e4703 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md @@ -0,0 +1,78 @@ +--- +title: Disconnect-Entra +description: This article provides details on the Disconnect-Entra Command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Disconnect-Entra + +schema: 2.0.0 +--- + +# Disconnect-Entra + +## Synopsis + +Disconnects the current session from a Microsoft Entra ID tenant. + +## Syntax + +```powershell +Disconnect-Entra + [] +``` + +## Description + +The Disconnect-Entra cmdlet disconnects the current session from a Microsoft Entra ID tenant. + +## Examples + +### Example 1: Disconnect your session from a tenant + +```powershell + Disconnect-Entra +``` + +```output +ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 +TenantId : bbbbcccc-1111-dddd-2222-eeee3333ffff +Scopes : {Agreement.ReadWrite.All, CustomSecAttributeDefinition.ReadWrite.All, TeamMember.Read.All...} +AuthType : AppOnly +TokenCredentialType : ClientCertificate +CertificateThumbprint : AA11BB22CC33DD44EE55FF66AA77BB88CC99DD00 +CertificateSubjectName : +Account : +AppName : MG_graph_auth +ContextScope : Process +Certificate : +PSHostVersion : 5.1.22621.2506 +ManagedIdentityId : +ClientSecret : +Environment : Global +``` + +This command disconnects your session from a tenant. + +## Parameters + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Connect-Entra](Connect-Entra.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Get-EntraContext.md b/moduleVNext/docs/entra-powershell-beta/Authentication/Get-EntraContext.md new file mode 100644 index 0000000000..bdbde6bc49 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Authentication/Get-EntraContext.md @@ -0,0 +1,130 @@ +--- +title: Get-EntraContext +description: This article provides details on the Get-EntraContext command. + + +ms.topic: reference +ms.date: 07/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutung +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraContext + +schema: 2.0.0 +--- + +# Get-EntraContext + +## Synopsis + +Retrieve information about your current session. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraContext + [-ProgressAction ] + [] +``` + +## Description + +`Get-EntraContext` is used to retrieve the details about your current session, which include: + +- ClientID +- TenantID +- Certificate Thumbprint +- Scopes consented to +- AuthType: Delegated or app-only +- AuthProviderType +- CertificateName +- Account +- AppName +- ContextScope +- Certificate +- PSHostVersion +- ClientTimeOut. + +`Get-EntraCurrentSessionInfo` is an alias for `Get-EntraContext`. + +## Examples + +### Example 1: Get the current session + +```powershell +Get-EntraContext +``` + +```Output +ClientId : 11112222-bbbb-3333-cccc-4444dddd5555 +TenantId : aaaabbbb-0000-cccc-1111-dddd2222eeee +CertificateThumbprint : +Scopes : {User.ReadWrite.All,...} +AuthType : Delegated +AuthProviderType : InteractiveAuthenticationProvider +CertificateName : +Account : SawyerM@Contoso.com +AppName : Microsoft Graph PowerShell +ContextScope : CurrentUser +Certificate : +PSHostVersion : 5.1.17763.1 +ClientTimeout : 00:05:00 +``` + +This example demonstrates how to retrieve the details of the current session. + +### Example 2: Get the current session scopes + +```powershell +Get-EntraContext | Select -ExpandProperty Scopes +``` + +```Output +AppRoleAssignment.ReadWrite.All +Directory.AccessAsUser.All +EntitlementManagement.ReadWrite.All +Group.ReadWrite.All +openid +Organization.Read.All +profile +RoleManagement.ReadWrite.Directory +User.Read +User.ReadWrite.All +``` + +Retrieves all scopes. + +## Parameters + +### -ProgressAction + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +Please note that `Get-EntraCurrentSessionInfo` is now an alias for `Get-EntraContext` and can be used interchangeably. + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md b/moduleVNext/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md new file mode 100644 index 0000000000..486c68592f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md @@ -0,0 +1,79 @@ +--- +title: Reset-EntraBetaStrongAuthenticationMethodByUpn +description: This article provides details on the Reset-EntraBetaStrongAuthenticationMethodByUpn command. + + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Reset-EntraBetaStrongAuthenticationMethodByUpn + +schema: 2.0.0 +--- + +# Reset-EntraBetaStrongAuthenticationMethodByUpn + +## Synopsis + +Resets the strong authentication method using the User Principal Name (UPN). + +## Syntax + +```powershell +Reset-EntraBetaStrongAuthenticationMethodByUpn + -UserPrincipalName + [] +``` + +## Description + +The `Reset-EntraBetaStrongAuthenticationMethodByUpn` cmdlet resets the strong authentication method by using the User Principal Name (UPN). + +## Examples + +### Example 1: Resets the strong authentication method by using the User Principal Name + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite', 'UserAuthenticationMethod.ReadWrite.All' +Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName 'SawyerM@contoso.com' +``` + +This example demonstrates how to reset the strong authentication method by using the User Principal Name (UPN). + +- `-UserPrincipalName` parameter specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. + +## Parameters + +### -UserPrincipalName + +Specifies the User Principal Name (UPN) of the user whose strong authentication method is being reset. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md b/moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md new file mode 100644 index 0000000000..5a488cd475 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md @@ -0,0 +1,72 @@ +--- +title: Revoke-EntraBetaSignedInUserAllRefreshToken +description: This article provides details on the Revoke-EntraBetaSignedInUserAllRefreshToken command. + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaSignedInUserAllRefreshToken +schema: 2.0.0 +--- + +# Revoke-EntraBetaSignedInUserAllRefreshToken + +## Synopsis + +Invalidates the refresh tokens issued to applications for the current user. + +## Syntax + +```powershell +Revoke-EntraBetaSignedInUserAllRefreshToken + [] +``` + +## Description + +The `Revoke-EntraBetaSignedInUserAllRefreshToken` cmdlet invalidates all the refresh tokens issued to applications for a user (as well as session cookies in a user's browser), by resetting the signInSessionsValidFromDateTime user property to the current date-time. + +Typically, this operation is performed (by the user or an administrator) if the user has a lost or stolen device. This operation prevents access to the organization's data through applications on the device by requiring the user to sign in again to all applications that they have previously consented to, independent of device. + +Note: If the application attempts to redeem a delegated access token for this user by using an invalidated refresh token, the application will get an error. If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint, which will force the user to sign in. + +After running this command, there might be a small delay of a few minutes before tokens are revoked. + +## Examples + +### Example 1: Revoke refresh tokens for the current user + +```powershell +Connect-Entra -Scopes 'User.RevokeSessions.All' +Revoke-EntraBetaSignedInUserAllRefreshToken +``` + +```Output +Value +----- +True +``` + +This command revokes the tokens for the current user. + +## Parameters + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Revoke-EntraBetaUserAllRefreshToken](Revoke-EntraBetaUserAllRefreshToken.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md b/moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md new file mode 100644 index 0000000000..de158edf7a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md @@ -0,0 +1,90 @@ +--- +title: Revoke-EntraBetaUserAllRefreshToken +description: This article provides details on the Revoke-EntraBetaUserAllRefreshToken command. + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaUserAllRefreshToken +schema: 2.0.0 +--- + +# Revoke-EntraBetaUserAllRefreshToken + +## Synopsis + +Invalidates the refresh tokens issued to applications for a user. + +## Syntax + +```powershell +Revoke-EntraBetaUserAllRefreshToken + -UserId + [] +``` + +## Description + +The `Revoke-EntraBetaUserAllRefreshToken` cmdlet invalidates the refresh tokens issued to applications for a user. + +The cmdlet also invalidates tokens issued to session cookies in a browser for the user. + +The cmdlet operates by resetting the refreshTokensValidFromDateTime user property to the current date and time. + +The user or an administrator usually performs this operation if the user's device is lost or stolen. It blocks access to the organization's data by requiring the user to sign in again to all previously authorized applications, regardless of the device + +## Examples + +### Example 1: Revoke refresh tokens for a user + +```powershell +Connect-Entra -Scopes 'User.RevokeSessions.All' +Revoke-EntraBetaUserAllRefreshToken -UserId 'SawyerM@contoso.com' +``` + +```Output +Value +----- +True +``` + +This example demonstrates how to revoke the tokens for the specified user. + +- `-UserId` parameter specifies the unique identifier of a user. + +## Parameters + +### -UserId + +Specifies the unique ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Revoke-EntraBetaSignedInUserAllRefreshToken](Revoke-EntraBetaSignedInUserAllRefreshToken.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md new file mode 100644 index 0000000000..abc9358e6e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md @@ -0,0 +1,113 @@ +--- +title: Add-EntraBetaAdministrativeUnitMember +description: This article provides details on the Add-EntraBetaAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 08/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Add-EntraBetaAdministrativeUnitMember + +## Synopsis + +Adds an administrative unit member. + +## Syntax + +```powershell +Add-EntraBetaAdministrativeUnitMember + -RefObjectId + -AdministrativeUnitId + [] +``` + +## Description + +The `Add-EntraBetaAdministrativeUnitMember` cmdlet adds a Microsoft Entra ID administrative unit member. + +Administrative units enable more granular management of permissions and access, particularly in large organizations or where administrative responsibilities are divided across departments or regions. + +To add a user, group, or device to an administrative unit, the calling principal must be assigned at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add an administrative unit member + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$User = Get-EntraBetaUser -SearchString '' +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraBetaAdministrativeUnitMember @params +``` + +This example shows how to add an administrative unit member. You can use the command `Get-EntraBetaAdministrativeUnit` to get administrative unit ID. You can use the command `Get-EntraBetaUser` to get user ID. + +- `AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `RefObjectId` parameter specifies the ID of the user or group you want to add as a member of the administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of a Microsoft Entra ID administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the unique ID of the specific Microsoft Entra ID object that is assigned as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaAdministrativeUnitMember](Get-EntraBetaAdministrativeUnitMember.md) + +[New-EntraBetaAdministrativeUnitMember](New-EntraBetaAdministrativeUnitMember.md) + +[Remove-EntraBetaAdministrativeUnitMember](Remove-EntraBetaAdministrativeUnitMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..d0b190699a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,138 @@ +--- +title: Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue command. + +ms.topic: reference +ms.date: 07/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + +schema: 2.0.0 +--- + +# Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Adds a predefined value for a custom security attribute definition. + +## Syntax + +```powershell +Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + -IsActive + -CustomSecurityAttributeDefinitionId + -Id + [] +``` + +## Description + +The `Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue` adds a predefined value for a Microsoft Entra ID custom security attribute definition. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a predefined value for a Microsoft Entra ID custom security attribute definition + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinitionId = (Get-EntraBetaCustomSecurityAttributeDefinition -Id '').Id +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinitionId + Id = 'Alpine' + IsActive = $true +} +Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +Id IsActive +-- -------- +Alpine True +``` + +This example adds a predefined value to a custom security attribute definition. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use the command `Get-EntraBetaCustomSecurityAttributeDefinition` to get the ID. +- `-Id` parameter specifies the identifier for the predefined value. +- `-IsActive` parameter specifies the predefined value is active or deactivated. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier for a custom security attribute definition in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters aren't. This identifier is case sensitive, can't be changed later, and is required. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsActive + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any another supported directory objects. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValues` is an alias for `Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue`. + +## Related Links + +[Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue](Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md) + +[Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue](Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md new file mode 100644 index 0000000000..2cf35cf043 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md @@ -0,0 +1,108 @@ +--- +title: Add-EntraBetaDeviceRegisteredOwner +description: This article provides details on the Add-EntraBetaDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 08/14/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Add-EntraBetaDeviceRegisteredOwner + +## Synopsis + +Adds a registered owner for a device. + +## Syntax + +```powershell +Add-EntraBetaDeviceRegisteredOwner + -DeviceId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaDeviceRegisteredOwner` cmdlet adds a registered owner for a Microsoft Entra ID device. + +## Examples + +### Example 1: Add a user as a registered owner + +```powershell +Connect-Entra -Scopes 'Device.ReadWrite.All' +$User = Get-EntraBetaUser -UserId 'SawyerM@contoso.com' +$Device = Get-EntraBetaDevice -SearchString '' +$params = @{ + DeviceId = $Device.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraBetaDeviceRegisteredOwner @params +``` + +This example shows how to add a registered owner to a device. + +`-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered owner. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraBetaDevice` to get device Id. + +`-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered owner of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraBetaUser` to get user Id. + +## Parameters + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to add. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDeviceRegisteredOwner](Get-EntraBetaDeviceRegisteredOwner.md) + +[Remove-EntraBetaDeviceRegisteredOwner](Remove-EntraBetaDeviceRegisteredOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md new file mode 100644 index 0000000000..d70008ee95 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md @@ -0,0 +1,108 @@ +--- +title: Add-EntraBetaDeviceRegisteredUser +description: This article provides details on the Add-EntraBetaDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 08/14/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Add-EntraBetaDeviceRegisteredUser + +## Synopsis + +Adds a registered user for a device. + +## Syntax + +```powershell +Add-EntraBetaDeviceRegisteredUser + -DeviceId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaDeviceRegisteredUser` cmdlet adds a registered user for a Microsoft Entra ID device. + +## Examples + +### Example 1: Add a user as a registered user + +```powershell +Connect-Entra -Scopes 'Device.ReadWrite.All' +$User = Get-EntraBetaUser -UserId 'SawyerM@contoso.com' +$Device = Get-EntraBetaDevice -SearchString '' +$params = @{ + DeviceId = $Device.ObjectId + RefObjectId = $User.ObjectId +} +Add-EntraBetaDeviceRegisteredUser @params +``` + +This example shows how to add a registered user to a device. + +- `-DeviceId` parameter specifies the unique identifier (Object ID) of the device to which you want to add a registered user. The $Device.ObjectId variable should contain the Object ID of the device. You can use the command `Get-EntraBetaDevice` to get device Id. + +- `-RefObjectId` parameter specifies the unique identifier (Object ID) of the user who will be added as a registered user of the device. The $User.ObjectId variable should contain the Object ID of the user. You can use the command `Get-EntraBetaUser` to get user Id. + +## Parameters + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDeviceRegisteredUser](Get-EntraBetaDeviceRegisteredUser.md) + +[Remove-EntraBetaDeviceRegisteredUser](Remove-EntraBetaDeviceRegisteredUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md new file mode 100644 index 0000000000..d986bf15ae --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md @@ -0,0 +1,104 @@ +--- +title: Add-EntraBetaDirectoryRoleMember +description: This article provides details on the Add-EntraBetaDirectoryRoleMember command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaDirectoryRoleMember + +schema: 2.0.0 +--- + +# Add-EntraBetaDirectoryRoleMember + +## Synopsis + +Adds a member to a directory role. + +## Syntax + +```powershell +Add-EntraBetaDirectoryRoleMember + -DirectoryRoleId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaDirectoryRoleMember` cmdlet adds a member to a Microsoft Entra ID role. + +## Examples + +### Example 1: Add a member to a Microsoft Entra ID role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$params = @{ + DirectoryRoleId = '019ea7a2-1613-47c9-81cb-20ba35b1ae48' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Add-EntraBetaDirectoryRoleMember @params +``` + +This example adds a member to a directory role. + +- `DirectoryRoleId` parameter specifies the ID of the directory role to which the member will be added. Use the `Get-EntraBetaDirectoryRole` command to retrieve the details of the directory role. +- `RefObjectId` parameter specifies the ID of Microsoft Entra ID object to assign as owner/manager/member. + +## Parameters + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDirectoryRoleMember](Get-EntraBetaDirectoryRoleMember.md) + +[Remove-EntraBetaDirectoryRoleMember](Remove-EntraBetaDirectoryRoleMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md new file mode 100644 index 0000000000..0abed3e38e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md @@ -0,0 +1,137 @@ +--- +title: Add-EntraBetaScopedRoleMembership +description: This article provides details on the Add-EntraBetaScopedRoleMembership command. + + +ms.topic: reference +ms.date: 08/06/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership + +schema: 2.0.0 +--- + +# Add-EntraBetaScopedRoleMembership + +## Synopsis + +Assign a Microsoft Entra role with an administrative unit scope. + +## Syntax + +```powershell +Add-EntraBetaScopedRoleMembership + -AdministrativeUnitId + [-RoleMemberInfo ] + [-RoleObjectId ] + [] +``` + +## Description + +The `Add-EntraBetaScopedRoleMembership` cmdlet adds a scoped role membership to an administrative unit. Specify `AdministrativeUnitId` parameter to add a scoped role membership. + +For delegated scenarios, the calling user needs at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add a scoped role membership to an administrative unit + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$User = Get-EntraBetaUser -SearchString 'MarkWood' +$Role = Get-EntraBetaDirectoryRole -Filter "DisplayName eq ''" +$Unit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo +$RoleMember.ObjectId = $User.ObjectId +$params = @{ + AdministrativeUnitId = $Unit.ObjectId + RoleObjectId = $Role.ObjectId + RoleMemberInfo = $RoleMember +} +Add-EntraBetaScopedRoleMembership @params +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +The example shows how to add a user to the specified role within the specified administrative unit. + +- `-AdministrativeUnitId` Parameter specifies the ID of an administrative unit. +- `-RoleObjectId` Parameter specifies the ID of a directory role. +- `-RoleMemberInfo` Parameter specifies a RoleMemberInfo object. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RoleMemberInfo + +Specifies a RoleMemberInfo object. + +```yaml +Type: System.RoleMemberInfo +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleObjectId + +Specifies DirectoryRole ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaScopedRoleMembership](Get-EntraBetaScopedRoleMembership.md) + +[Remove-EntraBetaScopedRoleMembership](Remove-EntraBetaScopedRoleMembership.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md new file mode 100644 index 0000000000..2fdea2ba2b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md @@ -0,0 +1,109 @@ +--- +title: Confirm-EntraBetaDomain +description: This article provides details on the Confirm-EntraBetaDomain command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Confirm-EntraBetaDomain + +schema: 2.0.0 +--- + +# Confirm-EntraBetaDomain + +## Synopsis + +Validate the ownership of a domain. + +## Syntax + +```powershell +Confirm-EntraBetaDomain + -DomainName + -ForceTakeover + [] +``` + +## Description + +The `Confirm-EntraBetaDomain` cmdlet validates the ownership of an Microsoft Entra ID domain. + +The work or school account needs to belong to at least the **Domain Name Administrator** Microsoft Entra role. + +## Examples + +### Example 1: Confirm the domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Confirm-EntraBetaDomain -DomainName Contoso.com +``` + +- `DomainName` Specifies the fully qualified domain name to retrieve. + +This example verifies a domain and updates its status to `verified`. + +### Example 2: External admin takeover of a domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Confirm-EntraBetaDomain -DomainName Contoso.com -ForceTakeover $True +``` + +This example illustrates how to confirm a domain when an external administrator needs to assume control of an unmanaged domain. + +- `DomainName` specifies the fully qualified domain name to retrieve. +- `ForceTakeover` specifies whether to forcibly take control of an unmanaged domain associated with a tenant. + +## Parameters + +### -DomainName + +Specifies the name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ForceTakeover + +Used for external admin takeover of an unmanaged domain. The default value for this parameter is `false`. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md new file mode 100644 index 0000000000..875a7fa397 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md @@ -0,0 +1,94 @@ +--- +title: Enable-EntraBetaDirectoryRole +description: This article provides details on the Enable-EntraBetaDirectoryRole command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Enable-EntraBetaDirectoryRole + +schema: 2.0.0 +--- + +# Enable-EntraBetaDirectoryRole + +## Synopsis + +Activates an existing directory role in Microsoft Entra ID. + +## Syntax + +```powershell +Enable-EntraBetaDirectoryRole + [-RoleTemplateId ] + [] +``` + +## Description + +The `Enable-EntraBetaDirectoryRole` cmdlet activates an existing directory role in Microsoft Entra ID. + +The Company Administrators and the default user directory roles (User, Guest User, and Restricted Guest User) are activated by default. To access and assign members to other directory roles, you must first activate them using their corresponding directory role template ID. + +## Examples + +### Example 1: Enable a directory role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$InviterRole = Get-EntraBetaDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Guest Inviter'} +Enable-EntraBetaDirectoryRole -RoleTemplateId $InviterRole.ObjectId +``` + +```Output +DeletedDateTime Id Description DisplayName RoleTemplateId +--------------- -- ----------- ----------- -------------- + b5baa59b-86ab-4053-ac3a-0396116d1924 Guest Inviter has access to invite guest users. Guest Inviter 92ed04bf-c94a-4b82-9729-b799a7a4c178 +``` + +The example shows how to enable the directory role. + +You can use `Get-EntraBetaDirectoryRoleTemplate` to fetch a specific directory role to activate. + +- `RoleTemplateId` parameter specifies the ID of the role template to enable. + +## Parameters + +### -RoleTemplateId + +The ID of the Role template to enable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDirectoryRole](Get-EntraBetaDirectoryRole.md) + +[Get-EntraBetaDirectoryRoleTemplate](Get-EntraBetaDirectoryRoleTemplate.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md new file mode 100644 index 0000000000..4df777d0c0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md @@ -0,0 +1,117 @@ +--- +title: Get-EntraBetaAccountSku +description: This article provides details on the Get-EntraBetaAccountSku command. + + +ms.topic: reference +ms.date: 08/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAccountSku + +schema: 2.0.0 +--- + +# Get-EntraBetaAccountSku + +## Synopsis + +Retrieves all the SKUs for a company. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaAccountSku + [] +``` + +### GetById + +```powershell +Get-EntraBetaAccountSku + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraBetaAccountSku` retrieves the list of commercial subscriptions acquired by an organization. + +For a list of license names in the Microsoft Entra or Microsoft 365 admin centers and their corresponding Microsoft Graph `skuId` and `skuPartNumber` properties, refer to the [mapping information](https://learn.microsoft.com/entra/identity/users/licensing-service-plan-reference). + +## Examples + +### Example 1: Gets a list of SKUs + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaAccountSku +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… +ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… +dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… +``` + +This command returns a list of SKUs. + +### Example 2: Gets a list of SKUs by TenantId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaAccountSku -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +eeeeeeee-4444-5555-6666-ffffffffffff aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSPRE… +ffffffff-5555-6666-7777-aaaaaaaaaaaa aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTERP… +dddddddd-3333-4444-5555-eeeeeeeeeeee aaaabbbb-0000-cccc-1111-dddd2222eeee Contoso-User User Suspended 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERP… +``` + +This command returns a list of SKUs for a specified tenant. + +- `-TenantId` parameter specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this isn't provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md new file mode 100644 index 0000000000..817e2eb72d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md @@ -0,0 +1,243 @@ +--- +title: Get-EntraBetaAdministrativeUnit +description: This article provides details on the Get-EntraBetaAdministrativeUnit command. + + +ms.topic: reference +ms.date: 07/02/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnit + +schema: 2.0.0 +--- + +# Get-EntraBetaAdministrativeUnit + +## Synopsis + +Gets an administrative unit. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaAdministrativeUnit + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaAdministrativeUnit + -AdministrativeUnitId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaAdministrativeUnit` cmdlet gets a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameter to get a specific administrative unit. + +## Examples + +### Example 1: Get all administrative units + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraBetaAdministrativeUnit +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName + bbbbbbbb-1111-2222-3333-cccccccccccc test111 test111 + cccccccc-2222-3333-4444-dddddddddddd TestAU + dddddddd-3333-4444-5555-eeeeeeeeeeee test_130624_09 + eeeeeeee-4444-5555-6666-ffffffffffff test111 test111 + ffffffff-5555-6666-7777-aaaaaaaaaaaa test66 + aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb test111 test111 True +``` + +This command gets all the administrative units. + +### Example 2: Get all administrative units using '-All' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraBetaAdministrativeUnit -All +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName + bbbbbbbb-1111-2222-3333-cccccccccccc test111 test111 + cccccccc-2222-3333-4444-dddddddddddd TestAU + dddddddd-3333-4444-5555-eeeeeeeeeeee test_130624_09 + eeeeeeee-4444-5555-6666-ffffffffffff test111 test111 + ffffffff-5555-6666-7777-aaaaaaaaaaaa test66 + aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb test111 test111 True +``` + +This command gets all the administrative units. + +### Example 3: Get a specific administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraBetaAdministrativeUnit -AdministrativeUnitId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName +``` + +This example returns the details of the specified administrative unit. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 4: Get administrative units filter by display name + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq 'Updated DisplayName'" +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName +``` + +This example list of administrative units containing display name with the specified name. + +### Example 5: Get top one administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +Get-EntraBetaAdministrativeUnit -Top 1 +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Updated Description Updated DisplayName +``` + +This example returns the specified top administrative units. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter filters which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaAdministrativeUnit](New-EntraBetaAdministrativeUnit.md) + +[Remove-EntraBetaAdministrativeUnit](Remove-EntraBetaAdministrativeUnit.md) + +[Set-EntraBetaAdministrativeUnit](Set-EntraBetaAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md new file mode 100644 index 0000000000..68bb562f1d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md @@ -0,0 +1,195 @@ +--- +title: Get-EntraBetaAdministrativeUnitMember +description: This article provides details on the Get-EntraBetaAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Get-EntraBetaAdministrativeUnitMember + +## Synopsis + +Gets a member of an administrative unit. + +## Syntax + +```powershell +Get-EntraBetaAdministrativeUnitMember + -AdministrativeUnitId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaAdministrativeUnitMember` cmdlet gets a member of a Microsoft Entra ID administrative unit. Specify `AdministrativeUnitId` parameters to retrieve an administrative unit member. + +In delegated scenarios with work or school accounts, the signed-in user must either be a member user or be assigned a supported Microsoft Entra role, or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: + +- Directory Readers: Read basic properties on administrative units +- Global Reader: Read all properties of administrative units, including members +- Privileged Role Administrator: Create and manage administrative units (including members) + +## Examples + +### Example 1: Get an administrative unit member by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example returns the list of administrative unit members from specified administrative unit ObjectId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 2: Get all administrative unit members by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +ffffffff-5555-6666-7777-aaaaaaaaaaaa +``` + +This example returns the list of all administrative unit members from specified administrative unit ObjectId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +### Example 3: Get top three administrative unit members by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId $AdministrativeUnit.Id -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example returns top three administrative unit members from specified administrative unit ObjectId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaAdministrativeUnitMember](Add-EntraBetaAdministrativeUnitMember.md) + +[New-EntraBetaAdministrativeUnitMember](New-EntraBetaAdministrativeUnitMember.md) + +[Remove-EntraBetaAdministrativeUnitMember](Remove-EntraBetaAdministrativeUnitMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md new file mode 100644 index 0000000000..412910296b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md @@ -0,0 +1,145 @@ +--- +title: Get-EntraBetaAttributeSet +description: This article provides details on the Get-EntraBetaAttributeSet command. + +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAttributeSet + +schema: 2.0.0 +--- + +# Get-EntraBetaAttributeSet + +## Synopsis + +Gets a list of attribute sets. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaAttributeSet + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaAttributeSet + -AttributeSetId + [] +``` + +## Description + +The `Get-EntraABetaAttributeSet` cmdlet gets a list of Microsoft Entra ID attribute sets. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The supported roles for this operation are: + +- Attribute Assignment Reader +- Attribute Definition Reader +- Attribute Assignment Administrator +- Attribute Definition Administrator + +By default, other administrator roles cannot read, define, or assign custom security attributes. + +## Examples + +### Example 1: Get an all attribute sets + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraBetaAttributeSet +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Engineering Attributes for cloud engineering team 25 +Contoso Attributes for Contoso 25 +``` + +This example returns all attribute sets. + +### Example 2: Get an attribute sets + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraBetaAttributeSet -AttributeSetId 'Testing' +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Testing Attributes for engineering team 10 +``` + +This example demonstrates how to retrieve an attribute set by Id. + +- `-AttributeSetId` parameter specifies the unique identifier for the attribute set within a tenant. + +## Parameters + +### -AttributeSetId + +Unique identifier for the attribute set within a tenant. + +This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaAttributeSet](New-EntraBetaAttributeSet.md) + +[Set-EntraBetaAttributeSet](Set-EntraBetaAttributeSet.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md new file mode 100644 index 0000000000..46b58633ae --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md @@ -0,0 +1,235 @@ +--- +title: Get-EntraBetaContact +description: This article provides details on the Get-EntraBetaContact command. + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContact + +schema: 2.0.0 +--- + +# Get-EntraBetaContact + +## Synopsis + +Gets a contact from Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaContact + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaContact + -OrgContactId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaContact` cmdlet gets a contact from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve all contact objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraBetaContact +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves all contact objects in the directory. + +### Example 2: Retrieve specific contact object in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraBetaContact -OrgContactId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +``` + +This example retrieves specified contact in the directory. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 3: Retrieve all contacts objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraBetaContact -All +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves all the contacts in the directory. + +### Example 4: Retrieve top two contacts objects in the directory + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraBetaContact -Top 2 +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +``` + +This example retrieves top two contacts in the directory. + +### Example 5: Retrieve all contacts objects in the directory filter by DisplayName + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +Get-EntraBetaContact -Filter "DisplayName eq 'Contoso Contact'" +``` + +```Output +DisplayName Id Mail MailNickname +----------- -- ---- ------------ +Contoso Contact aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb contact@contoso.com Contoso Contact +Contoso Contact1 bbbbbbbb-1111-2222-3333-cccccccccccc contact1@contoso.com Contoso Contact 1 +Contoso Contact2 cccccccc-2222-3333-4444-dddddddddddd contact2@contoso.com Contoso Contact 2 +Contoso Contact3 dddddddd-3333-4444-5555-eeeeeeeeeeee contact3@contoso.com Contoso Contact 3 +``` + +This example retrieves contacts having the specified display name. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraBetaContact](Remove-EntraBetaContact.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md new file mode 100644 index 0000000000..5e48603c8c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md @@ -0,0 +1,157 @@ +--- +title: Get-EntraBetaContactDirectReport +description: This article provides details on the Get-EntraBetaContactDirectReport command. + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactDirectReport + +schema: 2.0.0 +--- + +# Get-EntraBetaContactDirectReport + +## Synopsis + +Get the direct reports for a contact. + +## Syntax + +```powershell +Get-EntraBetaContactDirectReport + -OrgContactId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaContactDirectReport` cmdlet gets the direct reports for a contact. + +## Examples + +### Example 1: Get the direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraBetaContactDirectReport -OrgContactId $Contact.ObjectId +``` + +This example shows how to retrieve direct reports for an organizational contact. +You can use the command `Get-EntraBetaContact` to get organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 2: Get all direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraBetaContactDirectReport -OrgContactId $Contact.ObjectId -All +``` + +This example shows how to retrieve all direct reports for an organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +### Example 3: Get top two direct reports of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraBetaContactDirectReport -OrgContactId $Contact.ObjectId -Top 2 +``` + +This example shows how to retrieve top two direct reports for an organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaContact](Get-EntraBetaContact.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md new file mode 100644 index 0000000000..e9a8ad5c51 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md @@ -0,0 +1,97 @@ +--- +title: Get-EntraBetaContactManager +description: This article provides details on the Get-EntraBetaContactManager command. + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactManager + +schema: 2.0.0 +--- + +# Get-EntraBetaContactManager + +## Synopsis + +Gets the manager of a contact. + +## Syntax + +```powershell +Get-EntraBetaContactManager + -OrgContactId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaContactManager` cmdlet gets the manager of a contact in Microsoft Entra ID. + +## Examples + +### Example 1: Get the manager of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Top 1 +Get-EntraBetaContactManager -OrgContactId $Contact.ObjectId +``` + +The example demonstrates how to retrieve the manager of a contact. You can use the command `Get-EntraBetaContact` to get organizational contact. + +- `-OrgContactId` parameter specifies the contact Id. + +## Parameters + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaContact](Get-EntraBetaContact.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md new file mode 100644 index 0000000000..4172e7400d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md @@ -0,0 +1,175 @@ +--- +title: Get-EntraBetaContactMembership +description: This article provides details on the Get-EntraBetaContactMembership command. + + +ms.topic: reference +ms.date: 08/14/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactMembership + +schema: 2.0.0 +--- + +# Get-EntraBetaContactMembership + +## Synopsis + +Get a contact membership. + +## Syntax + +```powershell +Get-EntraBetaContactMembership + -OrgContactId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaContactMembership` cmdlet gets a contact membership in Microsoft Entra ID. + +This command is useful to administrators who need to understand which groups, roles, or administrative units a particular contact belongs to. This can be important for troubleshooting access issues, auditing memberships, and ensuring that contact memberships are correctly configured. + +## Examples + +### Example 1: Get the memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntrabetaContactMembership -OrgContactId $Contact.ObjectId +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This command gets all the memberships for specified contact. + +### Example 2: Get all memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraBetaContactMembership -OrgContactId $Contact.ObjectId -All +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This command gets all the memberships for specified contact. + +### Example 3: Get top two memberships of a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Filter "DisplayName eq 'Contoso Contact'" +Get-EntraBetaContactMembership -OrgContactId $Contact.ObjectId -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +``` + +This command gets top two memberships for specified contact. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OrgContactId + +Specifies the ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaContact](Get-EntraBetaContact.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md new file mode 100644 index 0000000000..075f0c3cb1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md @@ -0,0 +1,196 @@ +--- +title: Get-EntraBetaContract +description: This article provides details on the Get-EntraBetaContract command. + + +ms.topic: reference +ms.date: 08/14/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContract + +schema: 2.0.0 +--- + +# Get-EntraBetaContract + +## Synopsis + +Gets a contract. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaContract + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaContract + -ContractId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaContract` cmdlet gets a contract information associated to a partner tenant. + +The contract object contains the following attributes: + +- `contractType` - type of the contract. + +Possible values are: + +1. SyndicationPartner - indicates a partner that exclusively resells and manages O365 and Intune for this customer. +They resell and support their customers. +1. BreadthPartner - indicates that the partner has the ability to provide administrative support for this customer. +However the partner isn't allowed to resell to the customer. +1. ResellerPartner - indicates a partner that is similar to a syndication partner, except that it doesn't have exclusive access to a tenant. In the syndication case, the customer can't buy additional direct subscriptions from Microsoft or from other partners. + +- `customerContextId` - unique identifier for the customer tenant referenced by this partnership. + +Corresponds to the ObjectId property of the customer tenant's TenantDetail object. + +- `defaultDomainName` - a copy of the customer tenant's default domain name. +The copy is made when the partnership with the customer is established. +It isn't automatically updated if the customer tenant's default domain name changes. + +- `deletionTimestamp` - this property isn't valid for contracts and always returns null. + +- `displayName` - a copy of the customer tenant's display name. +The copy is made when the partnership with the customer is established. +It isn't automatically updated if the customer tenant's display name changes. + +- `objectType` - a string that identifies the object type. The value is always `Contract`. + +- `ContractId` - the unique identifier for the partnership. + +## Examples + +### Example 1: Get all contracts in the directory + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaContract +``` + +This command gets all contracts in the Microsoft Entra ID. + +### Example 2: Get top two contracts in the directory + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaContract -Top 2 +``` + +This command gets top two contracts in the Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ContractId + +Specifies the ID of a contract. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..2bd7b458b2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraBetaCustomSecurityAttributeDefinition +description: This article provides details on the Get-EntraBetaCustomSecurityAttributeDefinition command. + +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# Get-EntraBetaCustomSecurityAttributeDefinition + +## Synopsis + +Gets a list of custom security attribute definitions. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaCustomSecurityAttributeDefinition + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaCustomSecurityAttributeDefinition + -Id + [-Property ] + [] +``` + +## Description + +Gets a list of Microsoft Entra ID custom security attribute definitions. Specify `Id` parameter to get a list of custom security attribute definitions. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following privileged roles are supported for this operation: + +- Attribute Assignment Reader +- Attribute Definition Reader +- Attribute Assignment Administrator +- Attribute Definition Administrator + +## Examples + +### Example 1: Get a list of all custom security attribute definitions + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraBetaCustomSecurityAttributeDefinition +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Engineering_newvalue Engineering New Eng Value True True NewValue Available String False +Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False +``` + +This example returns all custom security attribute definitions. + +### Example 2: Get a specific custom security attribute definition + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All, CustomSecAttributeDefinition.ReadWrite.All' +Get-EntraBetaCustomSecurityAttributeDefinition -Id 'Engineering_ProjectDate' +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Engineering_ProjectDate Engineering Target completion date False True ProjectDate Available String False +``` + + This example returns a specific custom security attribute definition. + +- `Id` parameter specifies the custom security attribute definition object ID. + +## Parameters + +### -Id + +The unique identifier of a Microsoft Entra ID custom security attribute definition object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaCustomSecurityAttributeDefinition](New-EntraBetaCustomSecurityAttributeDefinition.md) + +[Set-EntraBetaCustomSecurityAttributeDefinition](Set-EntraBetaCustomSecurityAttributeDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..8ff736d7b5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,205 @@ +--- +title: Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue command. + +ms.topic: reference +ms.date: 07/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + +schema: 2.0.0 +--- + +# Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Gets the predefined value for a custom security attribute definition. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + -Id + [-Property ] + [] +``` + +## Description + +Gets the predefined value for a Microsoft Entra ID custom security attribute definition. Specify `CustomSecurityAttributeDefinitionId` parameter to retrieve the predefined value custom security attribute definition. + +The signed-in user must be assigned one of the following directory roles: + +- Attribute Definition Reader +- Attribute Definition Administrator + +## Examples + +### Example 1: Get all predefined values + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraBetaCustomSecurityAttributeDefinition -Id '' +Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId $CustomSecurityAttributeDefinition.Id +``` + +```Output +Id IsActive +-- -------- +Apline True +``` + +This example retrieves an all predefined values. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. + +### Example 2: Get predefined value with ID parameter + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraBetaCustomSecurityAttributeDefinition -Id '' +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id + Id = 'Alpine' +} +Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +Id IsActive +-- -------- +Apline True +``` + +This example retrieves a specific predefined value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. +- `-Id` parameter specifies the ID of Microsoft Entra ID Object. + +### Example 3: Get predefined value with Filter parameter + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$CustomSecurityAttributeDefinition = Get-EntraBetaCustomSecurityAttributeDefinition -Id '' +$params = @{ + CustomSecurityAttributeDefinitionId = $CustomSecurityAttributeDefinition.Id + Filter = "Id eq 'Apline'" +} +Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue @params +``` + +```Output +Id IsActive +-- -------- +Apline True +``` + +This example retrieves a predefined value containing Id with the specified value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. You can use `Get-EntraBetaCustomSecurityAttributeDefinition` to get this value. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier of customSecurityAttributeDefinition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Filter items by property values. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for the predefined value, which can be up to 64 characters long and include Unicode characters. Spaces are allowed, but some special characters are not. This identifier is case sensitive, cannot be changed later, and is required. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue](Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md) + +[Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue](Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md new file mode 100644 index 0000000000..faaa9d2a72 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md @@ -0,0 +1,125 @@ +--- +title: Get-EntraBetaDeletedDirectoryObject +description: This article provides details on the Get-EntraBetaDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 08/06/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Get-EntraBetaDeletedDirectoryObject + +## Synopsis + +Retrieves a soft deleted directory object from the directory. + +## Syntax + +```powershell +Get-EntraBetaDeletedDirectoryObject + -DirectoryObjectId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDeletedDirectoryObject` cmdlet retrieves a soft deleted directory object from the directory. + +Note that soft delete for groups is currently only implemented for Unified Groups (also known as +Office 365 Groups). + +## Examples + +### Example 1: Retrieve a deleted directory object + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' +Get-EntraBetaDeletedDirectoryObject -DirectoryObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 06-08-2024 04:23:34 +``` + +This example shows how to retrieve the deleted directory object from the directory. + +- `-DirectoryObjectId` parameter specifies the Id of the directory object to retrieve. + +### Example 2: Retrieve a deleted directory object with more details. + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All', 'Application.Read.All','Group.Read.All','User.Read.All' +Get-EntraBetaDeletedDirectoryObject -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' | Format-Table -Property Id, displayName, '@odata.type' -AutoSize +``` + +```Output +Id displayName @odata.type +-- ----------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Entra PowerShell App #microsoft.graph.application +``` + +This example shows how to retrieve the deleted directory object details from the directory. + +- `-Id` parameter specifies the Id of the directory object to retrieve. + +## Parameters + +### -DirectoryObjectId + +The Id of the directory object to retrieve. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md new file mode 100644 index 0000000000..9f42545918 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md @@ -0,0 +1,278 @@ +--- +title: Get-EntraBetaDevice +description: This article provides details on the Get-EntraBetaDevice command. + + +ms.topic: reference +ms.date: 06/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDevice + +schema: 2.0.0 +--- + +# Get-EntraBetaDevice + +## Synopsis + +Gets a device from Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDevice + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraBetaDevice + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaDevice + -DeviceId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDevice` cmdlet gets a device from Microsoft Entra ID. Specify the `DeviceId` parameter to get a specific device. + +## Examples + +### Example 1: Get a device by ID + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDevice -DeviceId 'bbbbbbbb-1111-1111-1111-cccccccccccc' +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetada + ta +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- ------------ + bbbbbbbb-1111-1111-1111-cccccccccccc True dddddddd-9999-0000-1111-eeeeeeeeeeee MetaData +``` + +This example shows how to retrieve a device using its ID. + +### Example 2: Get all devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDevice +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetada + ta +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- ------------ + aaaaaaaa-1111-1111-1111-bbbbbbbbbbbb True aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb MetaData + bbbbbbbb-1111-1111-1111-cccccccccccc True aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb MetaData +``` + +This example demonstrates how to retrieve all devices from Microsoft Entra ID. + +### Example 3: Get top two devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDevice -Top 2 +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetada + ta +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- ------------ + aaaaaaaa-1111-1111-1111-bbbbbbbbbbbb True aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb MetaData + bbbbbbbb-1111-1111-1111-cccccccccccc True aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb MetaData +``` + +This example demonstrates how to retrieve top two devices from Microsoft Entra ID. + +### Example 4: Get a device by display name + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDevice -Filter "DisplayName eq 'Woodgrove Desktop'" +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetada + ta +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- ------------ + bbbbbbbb-1111-1111-1111-cccccccccccc True dddddddd-9999-0000-1111-eeeeeeeeeeee MetaData +``` + +This example demonstrates how to retrieve device using the display name. + +### Example 5: Get a device using display name + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDevice -Filter "startsWith(DisplayName,'Woodgrove')" +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetada + ta +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- ------------ + bbbbbbbb-1111-1111-1111-cccccccccccc True dddddddd-9999-0000-1111-eeeeeeeeeeee MetaData +``` + +This example demonstrates how to retrieve all the devices whose display name starts with the word `Woodgrove`. + +### Example 6: Search among retrieved devices + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDevice -SearchString 'DESKTOP' +``` + +```Output +DeletedDateTime Id AccountEnabled ApproximateLastSignInDateTime ComplianceExpirationDateTime DeviceCategory DeviceId DeviceMetada + ta +--------------- -- -------------- ----------------------------- ---------------------------- -------------- -------- ------------ + bbbbbbbb-1111-1111-1111-cccccccccccc True dddddddd-9999-0000-1111-eeeeeeeeeeee MetaData +``` + +This example shows how to retrieve devices containing the word 'DESKTOP.' + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies the OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaDevice](New-EntraBetaDevice.md) + +[Remove-EntraBetaDevice](Remove-EntraBetaDevice.md) + +[Set-EntraBetaDevice](Set-EntraBetaDevice.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md new file mode 100644 index 0000000000..393ec542f5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md @@ -0,0 +1,196 @@ +--- +title: Get-EntraBetaDeviceRegisteredOwner +description: This article provides details on the Get-EntraBetaDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Get-EntraBetaDeviceRegisteredOwner + +## Synopsis + +Gets the registered owner of a device. + +## Syntax + +```powershell +Get-EntraBetaDeviceRegisteredOwner + -DeviceId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDeviceRegisteredOwner` cmdlet gets the registered owner of a device in Microsoft Entra ID. Specify `DeviceId` parameter gets the registered owner of a device. + +## Examples + +### Example 1: Retrieve the registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +$DevId = (Get-EntraDevice -Top 1).ObjectId +Get-EntraBetaDeviceRegisteredOwner -DeviceId $DevId +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Maria Sullivan maria@contoso.com Member +``` + +This example shows how to find the registered owner of a device.. + +- `-DeviceId` parameter specifies the device's ID + +### Example 2: Retrieve the registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDeviceRegisteredOwner -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Maria Sullivan maria@contoso.com Member +cccccccc-2222-3333-4444-dddddddddddd Parker McLean parker@contoso.com Member +``` + +This command gets the registered owner of a device. + +- `-DeviceId` parameter specifies the device's ID + +### Example 3: Retrieve all the registered owners of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDeviceRegisteredOwner -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc -All +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Maria Sullivan maria@contoso.com Member +cccccccc-2222-3333-4444-dddddddddddd Parker McLean parker@contoso.com Member +``` + +This command retrieves all the registered owners of a device. + +- `-DeviceId` parameter specifies the device's ID. + +### Example 4: Retrieve top one registered owner of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDeviceRegisteredOwner -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc -Top 1 +``` + +```Output +ObjectId DisplayName UserPrincipalName UserType +-------- ----------- ----------------- -------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Maria Sullivan maria@contoso.com Member +``` + +This command retrieves all the registered owners of a device. + +- `-DeviceId` parameter specifies the device's ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaDeviceRegisteredOwner](Add-EntraBetaDeviceRegisteredOwner.md) + +[Get-EntraBetaDevice](Get-EntraBetaDevice.md) + +[Remove-EntraBetaDeviceRegisteredOwner](Remove-EntraBetaDeviceRegisteredOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md new file mode 100644 index 0000000000..72c34dc82c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md @@ -0,0 +1,180 @@ +--- +title: Get-EntraBetaDeviceRegisteredUser +description: This article provides details on the Get-EntraBetaDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Get-EntraBetaDeviceRegisteredUser + +## Synopsis + +Retrieve a list of users that are registered users of the device. + +## Syntax + +```powershell +Get-EntraBetaDeviceRegisteredUser + -DeviceId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDeviceRegisteredUser` cmdlet gets a registered user for a Microsoft Entra ID device. Specify `DeviceId` parameter to get a registered user for a Microsoft Entra ID device. + +## Examples + +### Example 1: Retrieve the registered user of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +$DevId = (Get-EntraDevice -Top 1).ObjectId +Get-EntraBetaDeviceRegisteredUser -DeviceId $DevId +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +``` + +This example demonstrates how to retrieve registered user for a specific Microsoft Entra ID device. + +### Example 2: Get all registered users of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +``` + +This example demonstrates how to retrieve all registered users for a specified device. + +- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. + +### Example 3: Get top two registered users of a device + +```powershell +Connect-Entra -Scopes 'Device.Read.All' +Get-EntraBetaDeviceRegisteredUser -DeviceId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to retrieve top two registered users for the specified device. + +- `-DeviceId` parameter specifies an object ID of a device, which you want to retrieve. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies an object ID of a device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaDeviceRegisteredUser](Add-EntraBetaDeviceRegisteredUser.md) + +[Remove-EntraBetaDeviceRegisteredUser](Remove-EntraBetaDeviceRegisteredUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md new file mode 100644 index 0000000000..cf174aa3a8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraBetaDirSyncConfiguration +description: This article provides details on the Get-EntraBetaDirSyncConfiguration command. + + +ms.topic: reference +ms.date: 08/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncConfiguration + +schema: 2.0.0 +--- + +# Get-EntraBetaDirSyncConfiguration + +## Synopsis + +Gets the directory synchronization settings. + +## Syntax + +```powershell +Get-EntraBetaDirSyncConfiguration + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraBetaDirSyncConfiguration` cmdlet gets the directory synchronization settings. + +For delegated scenarios, the user needs to be assigned the Global Administrator role. + +## Examples + +### Example 1: Get directory synchronization settings + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Get-EntraBetaDirSyncConfiguration +``` + +```Output +AccidentalDeletionThreshold DeletionPreventionType +--------------------------- ---------------------- + 500 enabledForCount +``` + +This example gets directory synchronization settings. + +### Example 2: Get directory synchronization settings by TenantId + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Get-EntraBetaDirSyncConfiguration -TenantId 'aaaabbbb-0000-cccc-1111-dddd2222eeee' +``` + +```Output +AccidentalDeletionThreshold DeletionPreventionType +--------------------------- ---------------------- + 500 enabledForCount +``` + +This example gets directory synchronization settings by TenantId. + +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant for the operation. If TenantId isn't provided, it defaults to the current user's tenant. This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System. Nullable`1[[System. Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +## Notes + +## Related Links + +[Set-EntraBetaDirSyncConfiguration](Set-EntraBetaDirSyncConfiguration.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md new file mode 100644 index 0000000000..f763eed747 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md @@ -0,0 +1,153 @@ +--- +title: Get-EntraBetaDirSyncFeature +description: This article provides details on the Get-EntraBetaDirSyncFeature command. + + +ms.topic: reference +ms.date: 08/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncFeature + +schema: 2.0.0 +--- + +# Get-EntraBetaDirSyncFeature + +## Synopsis + +Checks the status of directory synchronization features for a tenant. + +## Syntax + +```powershell +Get-EntraBetaDirSyncFeature + [-TenantId ] + [-Feature ] + [] +``` + +## Description + +The `Get-EntraBetaDirSyncFeature` cmdlet checks the status of directory synchronization features for a tenant. + +Some of the features that can be used with this cmdlet include: + +- **DeviceWriteback** +- **DirectoryExtensions** +- **DuplicateProxyAddressResiliency** +- **DuplicateUPNResiliency** +- **EnableSoftMatchOnUpn** +- **PasswordSync** +- **SynchronizeUpnForManagedUsers** +- **UnifiedGroupWriteback** +- **UserWriteback** + +The cmdlet can be run without specifying any features, in which case it returns a list of all features and their enabled or disabled status. + +For delegated scenarios, the user needs to be assigned the Global Administrator role. + +## Examples + +### Example 1: Return a list of all directory synchronization features + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' +Get-EntraBetaDirSyncFeature +``` + +```Output +Enabled DirSyncFeature +------- -------------- + False BlockCloudObjectTakeoverThroughHardMatch + False BlockSoftMatch + False BypassDirSyncOverrides + False CloudPasswordPolicyForPasswordSyncedUsers + False ConcurrentCredentialUpdate + True ConcurrentOrgIdProvisioning + False DeviceWriteback + False DirectoryExtensions + False FopeConflictResolution + False GroupWriteBack + False PasswordSync + False PasswordWriteback + True QuarantineUponProxyAddressesConflict + True QuarantineUponUpnConflict + True SoftMatchOnUpn + True SynchronizeUpnForManagedUsers + False UnifiedGroupWriteback + False UserForcePasswordChangeOnLogon + False UserWriteback +``` + +This example gets a list of all directory synchronization features and shows if they are enabled (True) or disabled (False). + +### Example 2: Return the PasswordSync feature status + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.Read.All' +Get-EntraBetaDirSyncFeature -Feature 'PasswordSync' +``` + +```Output +Enabled DirSyncFeature +------- -------------- + False PasswordSync +``` + +This example shows if PasswordSync is enabled (True) or disabled (False) for the tenant. + +- `-Feature` specifies the directory synchronization feature to check the status of. + +## Parameters + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Feature + +The directory synchronization feature to check the status of. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraBetaDirSyncFeature](Set-EntraBetaDirSyncFeature.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md new file mode 100644 index 0000000000..6e6f6ce7a1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md @@ -0,0 +1,104 @@ +--- +title: Get-EntraBetaDirectoryObjectOnPremisesProvisioningError +description: This article provides details on the Get-EntraBetaDirectoryObjectOnPremisesProvisioningError command. + + +ms.topic: reference +ms.date: 08/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError + +schema: 2.0.0 +--- + +# Get-EntraBetaDirectoryObjectOnPremisesProvisioningError + +## Synopsis + +Returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +## Syntax + +```powershell +Get-EntraBetaDirectoryObjectOnPremisesProvisioningError + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraBetaDirectoryObjectOnPremisesProvisioningError` returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +## Examples + +### Example 1: Return whether Microsoft Entra ID has objects with DirSync provisioning error + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' + +Get-EntraBetaDirectoryObjectOnPremisesProvisioningError +``` + +```Output +False +``` + +This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +### Example 2: Return whether Microsoft Entra ID has objects with DirSync provisioning error + +```powershell +Connect-Entra -Scopes 'User.Read.All', 'Directory.Read.All', 'Group.Read.All', 'Contacts.Read' + +Get-EntraBetaDirectoryObjectOnPremisesProvisioningError -TenantId '0000aaaa-11bb-cccc-dd22-eeeeee333333' +``` + +```Output +False +``` + +This command returns whether Microsoft Entra ID has objects with DirSync provisioning error. + +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. + +If this isn't provided then the value defaults to the tenant of the current user. + +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md new file mode 100644 index 0000000000..5af437ed03 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md @@ -0,0 +1,182 @@ +--- +title: Get-EntraBetaDirectoryRole +description: This article provides details on the Get-EntraBetaDirectoryRole command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRole + +schema: 2.0.0 +--- + +# Get-EntraBetaDirectoryRole + +## Synopsis + +Gets a directory role. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDirectoryRole + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaDirectoryRole + -DirectoryRoleId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDirectoryRole` cmdlet gets a directory role from Microsoft Entra ID. Specify `DirectoryRoleId` parameter to get a directory role. + +## Examples + +### Example 1: Get a directory role by ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraBetaDirectoryRole -DirectoryRoleId '56644e28-bf8b-4dad-8595-24448ffa3cb8' +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 56644e28-bf8b-4dad-8595-24448ffa3cb8 Perform all migration functionality to migrate content to Microsoft 365 usin... +``` + +This command gets the specified directory role. + +- `-DirectoryRoleId` parameter specifies the ID of a directory role in Microsoft Entra ID. + +### Example 2: Get all directory roles + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraBetaDirectoryRole +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Perform all migration functionality to migrate content to Microsoft 365 usin... + aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb Can manage all aspects of users and groups, including resetting passwords fo... + bbbbbbbb-7777-8888-9999-cccccccccccc Can read basic directory information. Commonly used to grant directory read ... + cccccccc-8888-9999-0000-dddddddddddd Can read and write basic directory information. For granting access to appli... +``` + +This command gets all the directory roles. + +### Example 3: Get a directory role filter by ObjectId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraBetaDirectoryRole -Filter "ObjectId eq '56644e28-bf8b-4dad-8595-24448ffa3cb8'" +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 56644e28-bf8b-4dad-8595-24448ffa3cb8 Perform all migration functionality to migrate content to Microsoft 365 usin... +``` + +This command gets the directory role by ObjectId. + +- `-ObjectId` parameter specifies the ID of a directory role in Microsoft Entra ID. + +### Example 4: Get a directory role filter by displayName + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraBetaDirectoryRole -Filter "displayName eq 'Helpdesk Administrator'" +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 56644e28-bf8b-4dad-8595-24448ffa3cb8 Perform all migration functionality to migrate content to Microsoft 365 usin... +``` + +This command gets the directory role by display name. + +## Parameters + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Enable-EntraBetaDirectoryRole](Enable-EntraBetaDirectoryRole.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md new file mode 100644 index 0000000000..f496561acb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraBetaDirectoryRoleMember +description: This article provides details on the Get-EntraBetaDirectoryRoleMember command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleMember + +schema: 2.0.0 +--- + +# Get-EntraBetaDirectoryRoleMember + +## Synopsis + +Gets members of a directory role. + +## Syntax + +```powershell +Get-EntraBetaDirectoryRoleMember + -DirectoryRoleId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDirectoryRoleMember` cmdlet retrieves the members of a directory role in Microsoft Entra ID. To obtain the members of a specific directory role, specify the `DirectoryRoleId`. Use the `Get-EntraBetaDirectoryRole` cmdlet to get the `DirectoryRoleId` value. + +## Examples + +### Example 1: Get members by role ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraBetaDirectoryRoleMember -DirectoryRoleId '1708c380-4b8a-4977-a46e-6031676f6b41' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This example retrieves the members of the specified role. + +- `-DirectoryRoleId` parameter specifies directory role ID. + +## Parameters + +### -DirectoryRoleId + +Specifies the ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaDirectoryRoleMember](Add-EntraBetaDirectoryRoleMember.md) + +[Remove-EntraBetaDirectoryRoleMember](Remove-EntraBetaDirectoryRoleMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md new file mode 100644 index 0000000000..5b7642dae8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md @@ -0,0 +1,101 @@ +--- +title: Get-EntraBetaDirectoryRoleTemplate +description: This article provides details on the Get-EntraBetaDirectoryRoleTemplate command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleTemplate + +schema: 2.0.0 +--- + +# Get-EntraBetaDirectoryRoleTemplate + +## Synopsis + +Gets directory role templates. + +## Syntax + +```powershell +Get-EntraBetaDirectoryRoleTemplate + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDirectoryRoleTemplate` cmdlet gets directory role templates in Microsoft Entra ID. + +## Examples + +### Example 1: Get role templates + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraBetaDirectoryRoleTemplate +``` + +```Output +DeletedDateTime Id Description +--------------- -- ----------- + 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identities. + 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. + 2af84b1e-32c8-42b7-82bc-daa82404023b Default role for guest users with restricted access. Can read a limited set of directory information. + 95e79109-95c0-4d8e-aee3-d01accf2d47b Can invite guest users independent of the 'members can invite guests' setting. + fe930be7-5e62-47db-91af-98c3a49a38b1 Can manage all aspects of users and groups, including resetting passwords for limited admins. +``` + +This example retrieves the role templates in Microsoft Entra ID. + +### Example 2: Get a specific role template + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +Get-EntraBetaDirectoryRoleTemplate | Where-Object {$_.DisplayName -eq 'Helpdesk Administrator'} +``` + +```Output +DeletedDateTime Id Description DisplayName +--------------- -- ----------- ----------- + 729827e3-9c14-49f7-bb1b-9608f156bbb8 Can reset passwords for non-administrators and Helpdesk Administrators. Helpdesk Administrator +``` + +This example retrieves a Helpdesk role template. + +## Parameters + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md new file mode 100644 index 0000000000..e2990e320c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md @@ -0,0 +1,193 @@ +--- +title: Get-EntraBetaDirectorySetting +description: This article provides details on the Get-EntraBetaDirectorySetting command. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySetting + +schema: 2.0.0 +--- + +# Get-EntraBetaDirectorySetting + +## Synopsis + +Gets a directory setting. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDirectorySetting + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaDirectorySetting + -Id + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDirectorySetting` cmdlet gets a directory setting from Microsoft Entra ID. Specify `Id` parameter to get a directory setting. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported [Microsoft Entra role](https://learn.microsoft.com/entra/identity/role-based-access-control/permissions-reference) or a custom role with a supported role permission. The following least privileged roles are supported: + +- Microsoft Entra Joined Device Local Administrator (Read basic properties on setting templates and settings) +- Directory Readers (Read basic properties on setting templates and settings) +- Global Reader (Read basic properties on setting templates and settings) +- Groups Administrator (Manage all group settings) +- Directory Writers (Manage all group settings) +- Authentication Policy Administrator (Update Password Rule Settings) +- User Administrator (Read basic properties on setting templates and settings) + +## Examples + +### Example 1: Get a directory setting + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All' +Get-EntraBetaDirectorySetting -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Application 00001111-aaaa-2222-bbbb-3333cccc4444 +``` + +This example gets a directory setting. + +- `-Id` parameter specifies the ID of a directory. + +### Example 2: Get all directory setting + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All' +Get-EntraBetaDirectorySetting -All +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Application 00001111-aaaa-2222-bbbb-3333cccc4444 +bbbbbbbb-1111-2222-3333-cccccccccccc Password Rule Settings 11112222-bbbb-3333-cccc-4444dddd5555 +``` + +This example gets all directory setting. + +### Example 3: Get top n directory setting + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All, Group.Read.All, Group.ReadWrite.All' +Get-EntraBetaDirectorySetting -Top 2 +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Application 00001111-aaaa-2222-bbbb-3333cccc4444 +bbbbbbbb-1111-2222-3333-cccccccccccc Password Rule Settings 11112222-bbbb-3333-cccc-4444dddd5555 +``` + +This example gets top two directory setting. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a directory in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaDirectorySetting](New-EntraBetaDirectorySetting.md) + +[Remove-EntraBetaDirectorySetting](Remove-EntraBetaDirectorySetting.md) + +[Set-EntraBetaDirectorySetting](Set-EntraBetaDirectorySetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md new file mode 100644 index 0000000000..2540f6c868 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md @@ -0,0 +1,127 @@ +--- +title: Get-EntraBetaDirectorySettingTemplate +description: This article provides details on the Get-EntraBetaDirectorySettingTemplate command. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySettingTemplate + +schema: 2.0.0 +--- + +# Get-EntraBetaDirectorySettingTemplate + +## Synopsis + +Gets a directory setting template. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDirectorySettingTemplate + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaDirectorySettingTemplate + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDirectorySettingTemplate` cmdlet gets a directory setting template from A Microsoft Entra ID. Specify `Id` parameter to get a directory setting template. + +## Examples + +### Example 1: Get an all directory setting template + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaDirectorySettingTemplate +``` + +```Output +Id DisplayName Description +-- ----------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest Settings for a specific Unified Group +bbbbbbbb-1111-2222-3333-cccccccccccc Application ... +cccccccc-2222-3333-4444-dddddddddddd Password Rule Settings ... +``` + +This example gets an all directory setting template. + +### Example 2: Get a directory setting template + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaDirectorySettingTemplate -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id DisplayName Description +-- ----------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest Settings for a specific Unified Group +``` + +This example gets a directory setting template. + +- `-Id` parameter specifies the ID of the settings template. + +## Parameters + +### -Id + +The ID of the settings template you want to retrieve. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md new file mode 100644 index 0000000000..14b0cbf026 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md @@ -0,0 +1,147 @@ +--- +title: Get-EntraBetaDomain +description: This article provides details on the Get-EntraBetaDomain command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomain + +schema: 2.0.0 +--- + +# Get-EntraBetaDomain + +## Synopsis + +Gets a domain. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDomain + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaDomain + -Name + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDomain` cmdlet gets a domain in Microsoft Entra ID. + +The work or school account must be assigned to at least one of the following Microsoft Entra roles: + +- User Administrator +- Helpdesk Administrator +- Service Support Administrator +- Directory Readers +- AdHoc License Administrator +- Application Administrator +- Security Reader +- Security Administrator +- Privileged Role Administrator +- Cloud Application Administrator + +## Examples + +### Example 1: Get a list of Domains that are created + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraBetaDomain +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +test33.com Managed True False False False False 15 +test44.com Managed True False False False False 17 +``` + +This command retrieves a list of domains. + +### Example 2: Get a specific Domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraBetaDomain -Name TEST22.com +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +``` + +This command retrieves a domain with the specified name. + +## Parameters + +### -Name + +Specifies the name of a domain. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraBetaDomain](Confirm-EntraBetaDomain.md) + +[New-EntraBetaDomain](New-EntraBetaDomain.md) + +[Remove-EntraBetaDomain](Remove-EntraBetaDomain.md) + +[Set-EntraBetaDomain](Set-EntraBetaDomain.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md new file mode 100644 index 0000000000..21b5dafd20 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md @@ -0,0 +1,131 @@ +--- +title: Get-EntraBetaDomainFederationSettings +description: This article provides details on the Get-EntraBetaDomainFederationSettings command. + + +ms.topic: reference +ms.date: 08/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainFederationSettings + +schema: 2.0.0 +--- + +# Get-EntraBetaDomainFederationSettings + +## Synopsis + +Retrieves settings for a federated domain. + +## Syntax + +```powershell +Get-EntraBetaDomainFederationSettings + -DomainName + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraBetaDomainFederationSettings` cmdlet gets key settings from Microsoft Entra ID. + +Use the `Get-EntraBetaFederationProperty` cmdlet to get settings for both Microsoft Entra ID and the Entra ID Federation Services server. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Global Reader +- Security Reader +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Get federation settings for specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraBetaDomainFederationSettings -DomainName 'contoso.com' +``` + +This command gets federation settings for specified domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. + +## Parameters + +### -DomainName + +The fully qualified domain name to retrieve. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this isn't provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.DomainFederationSettings + +### This cmdlet returns the following settings + +### ActiveLogOnUri + +### FederationBrandName + +### IssuerUri + +### LogOffUri + +### MetadataExchangeUri + +### NextSigningCertificate + +### PassiveLogOnUri + +### SigningCertificate + +## Notes + +## Related Links + +[Set-EntraBetaDomainFederationSettings](Set-EntraBetaDomainFederationSettings.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md new file mode 100644 index 0000000000..42f2182448 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md @@ -0,0 +1,112 @@ +--- +title: Get-EntraBetaDomainNameReference +description: This article provides details on the Get-EntraBetaDomainNameReference command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainNameReference + +schema: 2.0.0 +--- + +# Get-EntraBetaDomainNameReference + +## Synopsis + +Retrieves the objects that are referenced by a given domain name. + +## Syntax + +```powershell +Get-EntraBetaDomainNameReference + -Name + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDomainNameReference` cmdlet retrieves the objects that are referenced with a given domain name. Specify `Name` parameter retrieve the objects. + +The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. + +## Examples + +### Example 1: Retrieve the domain name reference objects for a domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraBetaDomainNameReference -Name contoso.com +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +ffffffff-4444-5555-6666-gggggggggggg +hhhhhhhh-5555-6666-7777-iiiiiiiiiiii +``` + +This example shows how to retrieve the domain name reference objects for a domain that is specified through the -Name parameter. + +- `-Name` parameter specifies the name of the domain name for which the referenced objects are retrieved. + +## Parameters + +### -Name + +The name of the domain name for which the referenced objects are retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md new file mode 100644 index 0000000000..e72564c81f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md @@ -0,0 +1,113 @@ +--- +title: Get-EntraBetaDomainServiceConfigurationRecord +description: This article provides details on the Get-EntraBetaDomainServiceConfigurationRecord command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainServiceConfigurationRecord + +schema: 2.0.0 +--- + +# Get-EntraBetaDomainServiceConfigurationRecord + +## Synopsis + +Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. + +## Syntax + +```powershell +Get-EntraBetaDomainServiceConfigurationRecord + -Name + [-Property ] + [] +``` + +## Description + +Gets the domain's service configuration records from the `serviceConfigurationRecords` navigation property. + +After you have successfully verified the ownership of a domain and you have indicated what services you plan to use with the domain, you can request Microsoft Entra ID to return you a set of DNS records which you need to add to the zone file of the domain so that the services can work properly with your domain. + +## Examples + +### Example 1: Retrieve domain service configuration records by Name + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraBetaDomainServiceConfigurationRecord -Name 'test.mail.contoso.com' +``` + +```Output +Id IsOptional Label RecordType SupportedService Ttl +-- ---------- ----- ---------- ---------------- --- +aaaa0000-bb11-2222-33cc-444444dddddd False test.mail.contoso.com Mx Email 3600 +bbbb1111-cc22-3333-44dd-555555eeeeee False test.mail.contoso.com Txt Email 3600 +cccc2222-dd33-4444-55ee-666666ffffff False autodiscover.test.mail.contoso.com CName Email 3600 +dddd3333-ee44-5555-66ff-777777aaaaaa False msoid.test.mail.contoso.com CName OrgIdAuthentication 3600 +eeee4444-ff55-6666-77aa-888888bbbbbb False enterpriseregistration.test.mail.contoso.com CName Intune 3600 +ffff5555-aa66-7777-88bb-999999cccccc False enterpriseenrollment.test.mail.contoso.com CName Intune 3600 +``` + +This example shows how to retrieve the Domain service configuration records for a domain with the given name. + +- `-Name` parameter specifies domain name for which the domain service configuration records are to be retrieved. + +## Parameters + +### -Name + +The name of the domain for which the domain service configuration records are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md new file mode 100644 index 0000000000..2b6f7e6a83 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md @@ -0,0 +1,113 @@ +--- +title: Get-EntraBetaDomainVerificationDnsRecord +description: This article provides details on the Get-EntraBetaDomainVerificationDnsRecord command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainVerificationDnsRecord + +schema: 2.0.0 +--- + +# Get-EntraBetaDomainVerificationDnsRecord + +## Synopsis + +Retrieve the domain verification DNS record for a domain. + +## Syntax + +```powershell +Get-EntraBetaDomainVerificationDnsRecord + -Name + [-Property ] + [] +``` + +## Description + +Gets the domain's verification records from the `verificationDnsRecords` navigation property. + +You can't use the domain with your Microsoft Entra ID tenant until you have successfully verified that you own the domain. + +To verify the ownership of the domain, you need to first retrieve a set of domain verification records that you need to add to the zone file of the domain. This can be done through the domain registrar or DNS server configuration. + +Root domains require verification. For example, contoso.com requires verification. If a root domain is verified, subdomains of the root domain are automatically verified. For example, subdomain.contoso.com is automatically be verified if contoso.com has been verified. + +The work or school account needs to belong to at least the Domain Name Administrator or Global Reader Microsoft Entra role. + +## Examples + +### Example 1: Retrieve the domain verification DNS record + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraBetaDomainVerificationDnsRecord -Name mail.contoso.com +``` + +```Output +Id IsOptional Label RecordType SupportedService Ttl +-- ---------- ----- ---------- ---------------- ---- +aaaabbbb-0000-cccc-1111-dddd2222eeee False contoso.com Txt Email 3600 +aaaabbbb-1111-cccc-1111-dddd2222eeee False contoso.com Mx Email 3600 +``` + +This example shows how to retrieve the Domain verification DNS records for a domain with the given name. + +## Parameters + +### -Name + +The domain name for which the domain verification Domain Name System (DNS) records are to be retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md new file mode 100644 index 0000000000..5957d75842 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md @@ -0,0 +1,90 @@ +--- +title: Get-EntraBetaFederationProperty +description: This article provides details on the Get-EntraBetaFederationProperty command. + + +ms.topic: reference +ms.date: 08/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaFederationProperty + +schema: 2.0.0 +--- + +# Get-EntraBetaFederationProperty + +## Synopsis + +Displays the properties of the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +## Syntax + +```powershell +Get-EntraBetaFederationProperty + -DomainName + [] +``` + +## Description + +The `Get-EntraBetaFederationProperty` cmdlet gets key settings from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +You can use this information to troubleshoot authentication problems caused by mismatched settings between the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Global Reader +- Security Reader +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Display properties for specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraBetaFederationProperty -DomainName 'contoso.com' +``` + +This command displays properties for specified domain. + +- `-DomainName` Specifies the domain name. + +## Parameters + +### -DomainName + +The domain name for which the properties from both the Microsoft Entra ID Federation Services 2.0 server and Microsoft Online are displayed. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md new file mode 100644 index 0000000000..67383951eb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md @@ -0,0 +1,135 @@ +--- +title: Get-EntraBetaPartnerInformation +description: This article provides details on the Get-EntraBetaPartnerInformation command. + +ms.topic: reference +ms.date: 09/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPartnerInformation + +schema: 2.0.0 +--- + +# Get-EntraBetaPartnerInformation + +## Synopsis + +Retrieves company-level information for partners. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPartnerInformation + [] +``` + +### GetById + +```powershell +Get-EntraBetaPartnerInformation + [-TenantId ] + [] +``` + +## Description + +The `Get-EntraBetaPartnerInformation` cmdlet is used to retrieve partner-specific information. +This cmdlet should only be used for partner tenants. + +## Examples + +### Example 1: Retrieve partner information + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaPartnerInformation +``` + +```Output +PartnerCompanyName : Contoso +companyType : +PartnerSupportTelephones : {12123, +1911} +PartnerSupportEmails : {} +PartnerHelpUrl : http://www.help.contoso.com +PartnerCommerceUrl : +ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc +PartnerSupportUrl : +``` + +This command retrieves partner-specific information. + +### Example 2: Retrieve partner information with specific TenantId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +$tenantId = (Get-EntraContext).TenantId +Get-EntraBetaPartnerInformation -TenantId $tenantId +``` + +```Output +PartnerCompanyName : Contoso +companyType : +PartnerSupportTelephones : {12123, +1911} +PartnerSupportEmails : {} +PartnerHelpUrl : http://www.help.contoso.com +PartnerCommerceUrl : +ObjectID : bbbbbbbb-1111-2222-3333-cccccccccccc +PartnerSupportUrl : +``` + +This command retrieves partner-specific information. + +`-TenantId` Parameter specifies unique ID of the tenant to perform the operation on. + +## Parameters + +### -TenantId + +The unique ID of the tenant to perform the operation on. +If this is not provided, then the value will default to the tenant of the current user. +This parameter is only applicable to partner users. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Company level information outputs + +- CompanyType: The type of this company (can be partner or regular tenant) +- DapEnabled: Flag to determine if the partner has delegated admin privileges +- PartnerCompanyName: The name of the company +- PartnerSupportTelephones: Support Telephone numbers for the partner +- PartnerSupportEmails: Support E-Mail address for the partner +- PartnerCommerceUrl: URL for the partner's commerce web site +- PartnerSupportUrl: URL for the Partner's support website +- PartnerHelpUrl: URL for the partner's help web site + +## Notes + +## Related Links + +[Set-EntraBetaPartnerInformation](Set-EntraBetaPartnerInformation.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md new file mode 100644 index 0000000000..7a7e1206d5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md @@ -0,0 +1,101 @@ +--- +title: Get-EntraBetaPasswordPolicy +description: This article provides details on the Get-EntraBetaPasswordPolicy command. + + +ms.topic: reference +ms.date: 08/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaPasswordPolicy + +## Synopsis + +Retrieves the current password policy for the tenant or the specified domain. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPasswordPolicy + [] +``` + +### GetById + +```powershell +Get-EntraBetaPasswordPolicy + -DomainName + [] +``` + +## Description + +The `Get-EntraBetaPasswordPolicy` cmdlet can be used to retrieve the values associated with the Password Expiry +window or Password Expiry Notification window for a tenant or specified domain. + +When a domain name is specified, it must be a verified domain for the company. + +The work or school account needs to belong to one of the following Microsoft Entra roles: + +- Domain Name Administrator + +## Examples + +### Example 1: Get password policy for a specified domain + +```powershell +Connect-Entra -Scopes 'Domain.Read.All' +Get-EntraBetaPasswordPolicy -DomainName 'contoso.com' +``` + +```Output +NotificationDays ValidityPeriod +---------------- -------------- + 90 180 +``` + +Returns the password policy for the specified domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. + +## Parameters + +### -DomainName + +The fully qualified name of the domain to be retrieved. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md new file mode 100644 index 0000000000..c2b3f6896e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md @@ -0,0 +1,147 @@ +--- +title: Get-EntraBetaScopedRoleMembership +description: This article provides details on the Get-EntraBetaScopedRoleMembership command. + + +ms.topic: reference +ms.date: 07/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaScopedRoleMembership + +schema: 2.0.0 +--- + +# Get-EntraBetaScopedRoleMembership + +## Synopsis + +List Microsoft Entra role assignments with administrative unit scope. + +## Syntax + +```powershell +Get-EntraBetaScopedRoleMembership + -AdministrativeUnitId + [-ScopedRoleMembershipId ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaScopedRoleMembership` cmdlet lists Microsoft Entra role assignments with an administrative unit scope. Use the `AdministrativeUnitId` parameter to retrieve a specific scoped role membership. + +## Examples + +### Example 1: Get Scoped Role Administrator + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' +} +Get-EntraBetaScopedRoleMembership @params +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example gets scoped role administrator. You cane use the command `Get-EntraBetaAdministrativeUnit` to get administrative unit Id. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-ScopedRoleMembershipId` parameter specifies the scoped role membership Id. + +### Example 2: List scoped administrators for administrative unit by AdministrativeUnitId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +Get-EntraBetaScopedRoleMembership -AdministrativeUnitId $AdministrativeUnit.ObjectId +``` + +```Output +Id AdministrativeUnitId RoleId +-- -------------------- ------ +dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc aaaaaaaa-bbbb-aaaa-bbbb-cccccccccccc bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example list scoped administrators with AdministrativeUnitId. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ScopedRoleMembershipId + +Specifies the ID of a scoped role membership. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaScopedRoleMembership](Add-EntraBetaScopedRoleMembership.md) + +[Remove-EntraBetaScopedRoleMembership](Remove-EntraBetaScopedRoleMembership.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md new file mode 100644 index 0000000000..962647218f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md @@ -0,0 +1,229 @@ +--- +title: Get-EntraBetaSubscribedSku +description: This article provides details on the Get-EntraBetaSubscribedSku command. + + +ms.topic: reference +ms.date: 08/13/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaSubscribedSku + +schema: 2.0.0 +--- + +# Get-EntraBetaSubscribedSku + +## Synopsis + +Gets subscribed SKUs to Microsoft services. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaSubscribedSku + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaSubscribedSku + -SubscribedSkuId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaSubscribedSku` cmdlet gets subscribed SKUs to Microsoft services. + +## Examples + +### Example 1: Get subscribed SKUs + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaSubscribedSku +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... +bbbb1111-cc22-3333-44dd-555555eeeeee 1111bbbb-22cc-dddd-ee33-ffffff444444 M365x99297270 User Enabled 20 bbbbbbbb-1c1c-2d2d-3e3e-444444444444 ENTE... +cccc2222-dd33-4444-55ee-666666ffffff 2222cccc-33dd-eeee-ff44-aaaaaa555555 M365x99297270 User Enabled 2 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTE... +``` + +This example demonstrates how to retrieve subscribed SKUs to Microsoft services. + +### Example 2: Get subscribed SKUs by SubscribedSkuId + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaSubscribedSku -SubscribedSkuId 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' +``` + +```Output +Id AccountId AccountName AppliesTo CapabilityStatus ConsumedUnits SkuId SkuPartNumber +-- --------- ----------- --------- ---------------- ------------- ----- ------- +aaaa0000-bb11-2222-33cc-444444dddddd 0000aaaa-11bb-cccc-dd22-eeeeee333333 M365x99297270 User Enabled 20 aaaaaaaa-0b0b-1c1c-2d2d-333333333333 EMSP... +``` + +This example demonstrates how to retrieve specified subscribed SKUs to Microsoft services. + +- `-SubscribedSkuId` parameter specifies the ID of the SKU (Stock Keeping Unit). + +### Example 3: Get available license plans + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Organization.Read.All' +Get-EntraBetaSubscribedSku | Select-Object -Property Sku*, ConsumedUnits -ExpandProperty PrepaidUnits +``` + +```Output +Enabled : 5 +LockedOut : 0 +Suspended : 0 +Warning : 0 +AdditionalProperties : +SkuId : efccb6f7-5641-4e0e-bd10-b4976e1bf68e +SkuPartNumber : EMS +ConsumedUnits : 3 +``` + +This example demonstrates how to retrieve available license plans. + +### Example 4: Retrieve all users assigned a specific license + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +$sku = Get-EntraBetaSubscribedSku | Where-Object { $_.SkuPartNumber -eq 'DEVELOPERPACK_E5' } +$skuId = $sku.SkuId +$usersWithDeveloperPackE5 = Get-EntraBetaUser -All | Where-Object { + $_.AssignedLicenses -and ($_.AssignedLicenses.SkuId -contains $skuId) +} +$usersWithDeveloperPackE5 | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled, UserType | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AccountEnabled UserType +-- ----------- ----------------- -------------- -------- +cccccccc-2222-3333-4444-dddddddddddd Angel Brown AngelB@contoso.com True Member +dddddddd-3333-4444-5555-eeeeeeeeeeee Avery Smith AveryS@contoso.com True Member +eeeeeeee-4444-5555-6666-ffffffffffff Sawyer Miller SawyerM@contoso.com True Member +``` + +This example demonstrates how to retrieve all users assigned a specific license. + +### Example 5: Get a list of users, their assigned licenses, and licensing source + +```powershell +Connect-Entra -Scopes 'Organization.Read.All','User.Read.All','Group.Read.All' + +# Get all users with specified properties +$Users = Get-EntraBetaUser -All -Property AssignedLicenses, LicenseAssignmentStates, DisplayName, UserPrincipalName, ObjectId + +$SelectedUsers = $Users | Select-Object ObjectId, UserPrincipalName, DisplayName, AssignedLicenses -ExpandProperty LicenseAssignmentStates + +# Group Name lookup +$GroupDisplayNames = @{} + +# Sku Part Number lookup +$SkuPartNumbers = @{} + +# Populate the hashtable with group display names and SKU part numbers +foreach ($User in $SelectedUsers) { + $AssignedByGroup = $User.AssignedByGroup + $SkuId = $User.SkuId + + try { + # Check if the group display name is already in the hashtable + if (-not $GroupDisplayNames.ContainsKey($AssignedByGroup)) { + $Group = Get-EntraBetaGroup -GroupId $AssignedByGroup + $GroupDisplayNames[$AssignedByGroup] = $Group.DisplayName + } + + $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue $GroupDisplayNames[$AssignedByGroup] + } catch { + $User | Add-Member -NotePropertyName 'GroupDisplayName' -NotePropertyValue 'N/A (Direct Assignment)' + } + + try { + # Check if the SKU part number is already in the hashtable + if (-not $SkuPartNumbers.ContainsKey($SkuId)) { + $Sku = Get-EntraBetaSubscribedSku | Where-Object { $_.SkuId -eq $SkuId } | Select-Object -ExpandProperty SkuPartNumber + $SkuPartNumbers[$SkuId] = $Sku + } + + $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue $SkuPartNumbers[$SkuId] + } catch { + $User | Add-Member -NotePropertyName 'SkuPartNumber' -NotePropertyValue 'N/A' + } +} + +$SelectedUsers | Format-Table UserPrincipalName, DisplayName, AssignedByGroup, GroupDisplayName, SkuId, SkuPartNumber, State, Error -AutoSize +``` + +```Output +userPrincipalName displayName assignedByGroup GroupDisplayName skuId SkuPartNumber state error +----------------- ----------- --------------- ---------------- ----- ------------- ----- ----- +averyh@contoso.com Avery Howard cccccccc-2222-3333-4444-dddddddddddd Contoso Team abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None +devont@contoso.com Devon Torres ffffffff-5555-6666-7777-aaaaaaaaaaaa Retail abcdefgh-1111-2222-bbbb-cccc33333333 ENTERPRISEPACK Active None +``` + +This example shows a list of users, their licenses, and the source of the license such as directly assigned or group assigned. + +## Parameters + +### -SubscribedSkuId + +The object ID of the SKU (Stock Keeping Unit). + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md new file mode 100644 index 0000000000..c734cc69ec --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md @@ -0,0 +1,169 @@ +--- +title: Get-EntraBetaTenantDetail +description: This article provides details on the Get-EntraBetaTenantDetail command. + + +ms.topic: reference +ms.date: 08/13/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaTenantDetail + +schema: 2.0.0 +--- + +# Get-EntraBetaTenantDetail + +## Synopsis + +Gets the details of a tenant. + +## Syntax + +```powershell +Get-EntraBetaTenantDetail + [-Top ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaTenantDetail` cmdlet gets the details of a tenant in Microsoft Entra ID. + +In delegated scenarios involving work or school accounts, the signed-in user must be assigned either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation: + +- Application Administrator +- Authentication Administrator +- Cloud Application Administrator +- Directory Readers +- Directory Reviewer +- Global Reader +- Helpdesk Administrator +- Security Administrator +- Security Operator +- Security Reader +- Service Support Administrator +- User Administrator +- Privileged Role Administrator + +## Examples + +### Example 1: Get all tenant details + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaTenantDetail -All +``` + +```Output +DisplayName Id CountryLetterCode VerifiedDomains +----------- -- ----------------- --------------- +Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}} +Contoso1 bbbbbbbb-1111-2222-3333-cccccccccccc NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}} +``` + +This example shows how to retrieve all tenant details. + +### Example 2: Get top one tenant details + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaTenantDetail -Top 1 +``` + +```Output +DisplayName Id CountryLetterCode VerifiedDomains +----------- -- ----------------- --------------- +Contoso aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NL {@{Capabilities=Email, OfficeCommunicationsOnline; IsDefault=False; IsInitial=True; Name=contoso.onmicrosoft.com; Type=Managed; Addition…}} +``` + +This example shows how to retrieve details of a top one tenant in Microsoft Entra ID. + +### Example 3: Get directory tenant size quota + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +(Get-EntraBetaTenantDetail).AdditionalProperties.directorySizeQuota +``` + +```Output +Key Value +--- ----- +used 339 +total 50000 +``` + +This example shows how to retrieve the directory tenant size quota. + +A directory quota represents the maximum number of objects allowed in a tenant, including user accounts, app registrations, and groups. Once this limit is reached, attempts to create new objects will result in an error. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraBetaTenantDetail](Set-EntraBetaTenantDetail.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md new file mode 100644 index 0000000000..616d896b11 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md @@ -0,0 +1,171 @@ +--- +title: New-EntraBetaAdministrativeUnit +description: This article provides details on the New-EntraBetaAdministrativeUnit command. + + +ms.topic: reference +ms.date: 07/03/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnit + +schema: 2.0.0 +--- + +# New-EntraBetaAdministrativeUnit + +## Synopsis + +Creates an administrative unit. + +## Syntax + +```powershell +New-EntraBetaAdministrativeUnit + -DisplayName + [-Description ] + [-IsMemberManagementRestricted ] + [] +``` + +## Description + +The `New-EntraBetaAdministrativeUnit` cmdlet creates an administrative unit in Microsoft Entra ID. Specify `DisplayName` parameter to create an administrative unit. + +In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role that includes the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. The Privileged Role Administrator role is the least privileged role that meets this requirement. + +## Examples + +### Example 1: Create an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +New-EntraBetaAdministrativeUnit -DisplayName 'TestAU' +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb TestAU False +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. + +### Example 2: Create an administrative unit using '-Description' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$params = @{ + DisplayName = 'Pacific Administrative Unit' + Description = 'Administrative Unit for Pacific region' +} +New-EntraBetaAdministrativeUnit @params +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + bbbbbbbb-1111-2222-3333-cccccccccccc New AdminiatrativeUnit test1 False +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. +- `-Description` parameter specifies the description for the new administrative unit. + +### Example 3: Create an administrative unit using '-IsMemberManagementRestricted' parameter + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$params = @{ + DisplayName = 'NewUnit' + IsMemberManagementRestricted = $true +} +New-EntraBetaAdministrativeUnit @params +``` + +```Output +DeletedDateTime Id Description DisplayName IsMemberManagementRestricted Visibility +--------------- -- ----------- ----------- ---------------------------- ---------- + cccccccc-2222-3333-4444-dddddddddddd NewUnit True +``` + +This example demonstrates how to create an administrative unit. + +- `-DisplayName` parameter specifies the display name for the Administrative unit object. +- `-IsMemberManagementRestricted` parameter specifies the management rights on resources in the administrative units should be restricted to ONLY the administrators scoped on the administrative unit object. + +## Parameters + +### -Description + +Specifies a description for the new administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the new administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsMemberManagementRestricted + +Indicates whether the management rights on resources in the administrative units should be restricted to ONLY the administrators scoped on the administrative unit object. +If no value is specified, it defaults to false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaAdministrativeUnit](Get-EntraBetaAdministrativeUnit.md) + +[Remove-EntraBetaAdministrativeUnit](Remove-EntraBetaAdministrativeUnit.md) + +[Set-EntraBetaAdministrativeUnit](Set-EntraBetaAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md new file mode 100644 index 0000000000..d51300c90d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md @@ -0,0 +1,368 @@ +--- +title: New-EntraBetaAdministrativeUnitMember +description: This article provides details on the New-EntraBetaAdministrativeUnitMember command. + + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnitMember + +schema: 2.0.0 +--- + +# New-EntraBetaAdministrativeUnitMember + +## Synopsis + +Create a new object as a member of the administrative unit. +Currently only group objects are supported. + +## Syntax + +```powershell +New-EntraBetaAdministrativeUnitMember + -AdministrativeUnitId + [-GroupTypes ] + [-AssignedLabels ] + [-OdataType ] + [-Description ] + -SecurityEnabled + [-IsAssignableToRole ] + [-ProxyAddresses ] + -DisplayName + [-Visibility ] + -MailEnabled + -MailNickname + [-MembershipRule ] + [-MembershipRuleProcessingState ] + [] +``` + +## Description + +The `New-EntraBetaAdministrativeUnitMember` cmdlet creates a Microsoft Entra ID object as a member of an administrative unit. Specify `AdministrativeUnitId`, `DisplayName`, `MailNickname`, `SecurityEnabled` and `MailEnabled` parameters for create a new administrative unit member. + +Currently only Microsoft Entra ID groups are supported to create administrative unit members. + +For information about creating dynamic groups, see Using attributes to create advanced rules (). + +## Examples + +### Example 1: Create a dynamic group in an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$params = @{ + AdministrativeUnitId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + OdataType = 'Microsoft.Graph.Group' + DisplayName = 'NewAUMember' + Description = 'createdUnitMember' + MailEnabled = $True + MailNickname = 'new' + SecurityEnabled = $False + GroupTypes = @('Unified', 'DynamicMembership') + MembershipRule = "(user.department -contains 'Marketing')" + MembershipRuleProcessingState = 'On' + IsAssignableToRole = $false + Visibility = 'Public' + ProxyAddresses = @('SMTP:Ahiresh@M365x99297270.onmicrosoft.com') +} +New-EntraBetaAdministrativeUnitMember @params +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-2222-2222-3333-cccccccccccc +``` + +This command creates a new dynamic group in an administrative unit with the following rule: + +\`user.department -contains "Marketing"\` + +The double quotation marks are replaced with single quotation marks. + +The processing state is On. +It means that all users in the directory that qualify the rule are added as members to the group. +Any users that don't qualify are removed from the group. + +## Parameters + +### -AdministrativeUnitId + +Specifies the AdministrativeUnitId of a Microsoft Entra ID administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OdataType + +Specifies the odata type of the object to create in the administrative unit. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailEnabled + +Specifies whether this group is mail enabled. + +Currently, you can't create mail enabled groups in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. +If MailEnabled is $False, you must still specify a mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Specifies whether the group is security enabled. +For security groups, this value must be $True. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a dynamic group. +To create a dynamic group, specify a value of DynamicMembership. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MembershipRule + +Specifies the membership rule for a dynamic group. + +For more information about the rules that you can use for dynamic groups, see Using attributes to create advanced rules (https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MembershipRuleProcessingState + +Specifies the rule processing state. +The acceptable values for this parameter are: + +* "On". Process the group rule. +* "Paused". Stop processing the group rule. + +Changing the value of the processing state doesn't change the members list of the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +This parameter determines the visibility of the group's content and members list. +This parameter can take one of the following values: + +* "Public" - Anyone can view the contents of the group +* "Private" - Only members can view the content of the group +* "HiddenMembership" - Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value will be "Public". + +Notes: + +* This parameter is only valid for groups that have the groupType set to "Unified". +* If a group has this attribute set to "HiddenMembership", it can't be changed later. +* Anyone can join a group that has this attribute set to "Public". If the attribute is set to Private or HiddenMembership, only owner(s) can add new members to the group and requests to join the group need approval of the owner(s). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AssignedLabels + +This parameter allows the assignment of sensitivity labels to groups. For more information on how sensitivity labels can be assigned to groups, refer to [Assign sensitivity labels](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership) + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AssignedLabel] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +Flag indicates whether group can be assigned to a role. This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProxyAddresses + +Sets the proxyAddresses attribute. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Add-EntraBetaAdministrativeUnitMember](Add-EntraBetaAdministrativeUnitMember.md) + +[Get-EntraBetaAdministrativeUnitMember](Get-EntraBetaAdministrativeUnitMember.md) + +[Remove-EntraBetaAdministrativeUnitMember](Remove-EntraBetaAdministrativeUnitMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md new file mode 100644 index 0000000000..75d651c677 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md @@ -0,0 +1,136 @@ +--- +title: New-EntraBetaAttributeSet +description: This article provides details on the New-EntraBetaAttributeSet command. + +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaAttributeSet + +schema: 2.0.0 +--- + +# New-EntraBetaAttributeSet + +## Synopsis + +Adds a new attribute set. + +## Syntax + +```powershell +New-EntraBetaAttributeSet + [-Description ] + [-MaxAttributesPerSet ] + [-AttributeSetId ] + [] +``` + +## Description + +Adds a new Microsoft Entra ID attribute set object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a single attribute set + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Testing' + Description = 'Attributes for engineering team' + MaxAttributesPerSet = 10 +} + +New-EntraBetaAttributeSet @params +``` + +```Output +Id Description MaxAttributesPerSet +-- ----------- ------------------- +Testing Attributes for engineering team 10 +``` + +This example demonstrates hoe to add a single attribute set. + +- `-AttributeSetId` parameter specifies the name of the attribute set. +- `-Description` parameter specifies the description for the attribute set. +- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. + +## Parameters + +### -Description + +Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AttributeSetId + +Name of the attribute set. Unique identifier for the attribute set within a tenant, up to 32 Unicode characters. It can't contain spaces or special characters, is case sensitive, and can't be changed later. Required. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaxAttributesPerSet + +Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaAttributeSet](Set-EntraBetaAttributeSet.md) + +[Get-EntraBetaAttributeSet](Get-EntraBetaAttributeSet.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..58137e5762 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md @@ -0,0 +1,233 @@ +--- +title: New-EntraBetaCustomSecurityAttributeDefinition +description: This article provides details on the New-EntraBetaCustomSecurityAttributeDefinition command. + +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# New-EntraBetaCustomSecurityAttributeDefinition + +## Synopsis + +Create a new customSecurityAttributeDefinition object. + +## Syntax + +```powershell +New-EntraBetaCustomSecurityAttributeDefinition + -IsSearchable + -IsCollection + -AttributeSet + -Type + -Name + -Status + -UsePreDefinedValuesOnly + [-Description ] + [] +``` + +## Description + +The `New-EntraBetaCustomSecurityAttributeDefinition` cmdlet creates a new customSecurityAttributeDefinition object. Specify `IsSearchable`, `IsCollection`, `AttributeSet`, `Type`, `Name`, `Status` and `UsePreDefinedValuesOnly` parameters for create a new custom security attribute definition. + +You can define up to 500 active objects in a tenant. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Add a custom security attribute + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All' +$AttributeSet = Get-EntraBetaAttributeSet -Id '' +$params = @{ + Name = 'ProjectTest' + Description = 'Target completion' + Type = 'String' + Status = 'Available' + AttributeSet = $AttributeSet.Id + IsCollection = $False + IsSearchable = $True + UsePreDefinedValuesOnly = $True +} +New-EntraBetaCustomSecurityAttributeDefinition @params +``` + +```Output +Id AttributeSet Description IsCollection IsSearchable Name Status Type UsePreDefinedValuesOnly +-- ------------ ----------- ------------ ------------ ---- ------ ---- ----------------------- +Test_ProjectTest Test Target completion False True ProjectTest Available String False +``` + +This example demonstrates how to add a custom security attribute. + +- `-Name` parameter specifies the name of the custom security attribute. +- `-Description` parameter specifies the description of the custom security attribute. +- `-Type` parameter specifies the data type for the custom security attribute values. +- `-Status` parameter specifies the custom security attribute is active or deactivated. +- `-AttributeSet` parameter specifies the name of attribute set. +- `-IsCollection` parameter specifies the allows multiple values can be assigned to the custom security attribute. +- `-IsSearchable` parameter specifies the custom security attribute values are indexed for searching on objects. +- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. + +## Parameters + +### -AttributeSet + +Name of the attribute set. Case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCollection + +Indicates whether multiple values can be assigned to the custom security attribute. Can't be changed later. If type is set to Boolean, isCollection can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsSearchable + +Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Can't be changed later. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Can't contain spaces or special characters. Can't be changed later. Case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Status + +Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Can't be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsePreDefinedValuesOnly + +Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaCustomSecurityAttributeDefinition](Set-EntraBetaCustomSecurityAttributeDefinition.md) + +[Get-EntraBetaCustomSecurityAttributeDefinition](Get-EntraBetaCustomSecurityAttributeDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md new file mode 100644 index 0000000000..87385aaabd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md @@ -0,0 +1,339 @@ +--- +title: New-EntraBetaDevice +description: This article provides details on the New-EntraBetaDevice command. + + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDevice + +schema: 2.0.0 +--- + +# New-EntraBetaDevice + +## Synopsis + +Creates a device. + +## Syntax + +```powershell +New-EntraBetaDevice + -DisplayName + -DeviceOSType + -AccountEnabled + -DeviceId + -DeviceOSVersion + -AlternativeSecurityIds + [-DevicePhysicalIds ] + [-DeviceTrustType ] + [-DeviceMetadata ] + [-ApproximateLastLogonTimeStamp ] + [-IsManaged ] + [-DeviceObjectVersion ] + [-IsCompliant ] + [-ProfileType ] + [-SystemLabels ] + [] +``` + +## Description + +The `New-EntraBetaDevice` cmdlet creates a device in Microsoft Entra ID. + +The calling user must be in one of the following Microsoft Entra roles: Intune Administrator or Windows 365 Administrator. + +## Examples + +### Example 1: Create a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' + +$params = @{ + AccountEnabled = $true + DisplayName = 'My new device' + AlternativeSecurityIds = $altsecid + DeviceId = $guid + DeviceOSType = 'OS/2' + DeviceOSVersion = '9.3' +} + +New-EntraBetaDevice @params +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb dddddddd-3333-4444-5555-eeeeeeeeeeee My new device +``` + +This command creates a new device. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeSecurityIds + +Specifies alternative security IDs. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApproximateLastLogonTimeStamp + +Specifies last sign-in date time. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the ID of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceMetadata + +The metadata for this device + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectVersion + +Specifies the object version of the device. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSType + +Specifies the operating system type of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSVersion + +Specifies the operating system version of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DevicePhysicalIds + +Specifies the physical ID. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceTrustType + +The trust type for this device + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the new device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompliant + +True if the device complies with Mobile Device Management (MDM) policies; otherwise, false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsManaged + +True if the device is managed by a Mobile Device Management (MDM) app such as Intune; otherwise, false. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProfileType + +Specifies profile type of the device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemLabels + +Specifies labels for the device. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDevice](Get-EntraBetaDevice.md) + +[Remove-EntraBetaDevice](Remove-EntraBetaDevice.md) + +[Set-EntraBetaDevice](Set-EntraBetaDevice.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md new file mode 100644 index 0000000000..655d6cbb35 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md @@ -0,0 +1,96 @@ +--- +title: New-EntraBetaDirectorySetting +description: This article provides details on the New-EntraBetaDirectorySetting command. + + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectorySetting + +schema: 2.0.0 +--- + +# New-EntraBetaDirectorySetting + +## Synopsis + +Creates a directory settings object. + +## Syntax + +```powershell +New-EntraBetaDirectorySetting + -DirectorySetting + [] +``` + +## Description + +The `New-EntraBetaDirectorySetting` cmdlet creates a directory settings object in Microsoft Entra ID. + +## Examples + +### Example 1: Creates new settings object + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All', 'Group.Read.All' , 'Group.ReadWrite.All' +$TemplateId = (Get-EntraBetaDirectorySettingTemplate | where { $_.DisplayName -eq "Group.Unified" }).Id +$Template = Get-EntraBetaDirectorySettingTemplate | where -Property Id -Value $TemplateId -EQ +$Setting = $Template.CreateDirectorySetting() +$Setting["UsageGuidelinesUrl"] = "https://guideline.example.com" +$Setting["EnableMIPLabels"] = "True" +New-EntraBetaDirectorySetting -DirectorySetting $Setting +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 00aa00aa-bb11-cc22-dd33-44ee44ee44ee +``` + +This example Creates new settings object in Microsoft Entra ID. + +- `-DirectorySetting` Parameter Create a new setting using templates from `DirectorySettingTemplates` + +## Parameters + +### -DirectorySetting + +Specifies directory settings. + +```yaml +Type: DirectorySetting +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDirectorySetting](Get-EntraBetaDirectorySetting.md) + +[Remove-EntraBetaDirectorySetting](Remove-EntraBetaDirectorySetting.md) + +[Set-EntraBetaDirectorySetting](Set-EntraBetaDirectorySetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md new file mode 100644 index 0000000000..37c21d5621 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md @@ -0,0 +1,159 @@ +--- +title: New-EntraBetaDomain +description: This article provides details on the New-EntraBetaDomain command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDomain + +schema: 2.0.0 +--- + +# New-EntraBetaDomain + +## Synopsis + +Creates a domain. + +## Syntax + +```powershell +New-EntraBetaDomain + -Name + [-IsDefault ] + [-SupportedServices ] + [] +``` + +## Description + +The `New-EntraBetaDomain` cmdlet creates a domain in Microsoft Entra ID. + +The work or school account needs to belong to at least the Domain Name Administrator role. + +## Examples + +### Example 1: Create a new Domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraBetaDomain -Name test22.com +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +``` + +This example demonstrates how to create a new domain in Microsoft Entra ID. + +### Example 2: Create a new Domain with a list of domain capabilities + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraBetaDomain -Name test22.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +``` + +This example demonstrates how to create a new domain with the specified services in Microsoft Entra ID. + +### Example 3: Create a new Domain and make if the default new user creation + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +New-EntraBetaDomain -Name test22.com -IsDefault $true +``` + +```Output +Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays +-- ------------------ ------------------ -------------- --------- --------- ------ ---------- -------------------------------- +test22.com Managed True False False False False 13 +``` + +This example demonstrates how to create a new domain in Microsoft Entra ID and marks it as the default to be used for new user creation. + +## Parameters + +### -IsDefault + +Indicates whether or not this is the default domain that is used for user creation. + +There is only one default domain per company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The fully qualified name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SupportedServices + +The capabilities assigned to the domain. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraBetaDomain](Confirm-EntraBetaDomain.md) + +[Get-EntraBetaDomain](Get-EntraBetaDomain.md) + +[Remove-EntraBetaDomain](Remove-EntraBetaDomain.md) + +[Set-EntraBetaDomain](Set-EntraBetaDomain.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md new file mode 100644 index 0000000000..f7a8f98368 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md @@ -0,0 +1,86 @@ +--- +title: Remove-EntraBetaAdministrativeUnit +description: This article provides details on the Remove-EntraBetaAdministrativeUnit command. + +ms.topic: reference +ms.date: 07/03/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnit + +schema: 2.0.0 +--- + +# Remove-EntraBetaAdministrativeUnit + +## Synopsis + +Removes an administrative unit. + +## Syntax + +```powershell +Remove-EntraBetaAdministrativeUnit + -AdministrativeUnitId + [] +``` + +## Description + +The `Remove-EntraBetaAdministrativeUnit` cmdlet removes an administrative unit from Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to delete an administrative unit. + +To delete an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. + +## Examples + +### Example 1: Remove an administrative unit + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId $AdministrativeUnit.ObjectId +``` + +This command removes the specified administrative unit from Microsoft Entra ID. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaAdministrativeUnit](New-EntraBetaAdministrativeUnit.md) + +[Set-EntraBetaAdministrativeUnit](Set-EntraBetaAdministrativeUnit.md) + +[Get-EntraBetaAdministrativeUnit](Get-EntraBetaAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md new file mode 100644 index 0000000000..ca5a0fbca6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md @@ -0,0 +1,109 @@ +--- +title: Remove-EntraBetaAdministrativeUnitMember +description: This article provides details on the Remove-EntraBetaAdministrativeUnitMember command. + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnitMember + +schema: 2.0.0 +--- + +# Remove-EntraBetaAdministrativeUnitMember + +## Synopsis + +Removes an administrative unit member. + +## Syntax + +```powershell +Remove-EntraBetaAdministrativeUnitMember + -AdministrativeUnitId + -MemberId + [] +``` + +## Description + +The `Remove-EntraBetaAdministrativeUnitMember` cmdlet removes an administrative unit member in Microsoft Entra ID. Specify `AdministrativeUnitId` and `MemberId` to remove an administrative unit member. + +To remove a member from an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra. + +## Examples + +### Example 1: Remove an administrative unit member + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.Read.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + MemberId = 'eeeeeeee-4444-5555-6666-ffffffffffff' +} +Remove-EntraBetaAdministrativeUnitMember @params +``` + +This command removes a specified member (user or group) from a specified administrative unit. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-MemberId` parameter specifies the ID of the administrative unit member. + +## Parameters + +### -MemberId + +Specifies the ID of the administrative unit member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaAdministrativeUnitMember](Add-EntraBetaAdministrativeUnitMember.md) + +[Get-EntraBetaAdministrativeUnitMember](Get-EntraBetaAdministrativeUnitMember.md) + +[New-EntraBetaAdministrativeUnitMember](New-EntraBetaAdministrativeUnitMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md new file mode 100644 index 0000000000..c0d57d834b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md @@ -0,0 +1,80 @@ +--- +title: Remove-EntraBetaContact +description: This article provides details on the Remove-EntraBetaContact command. + + +ms.topic: reference +ms.date: 08/14/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaContact + +schema: 2.0.0 +--- + +# Remove-EntraBetaContact + +## Synopsis + +Removes a contact. + +## Syntax + +```powershell +Remove-EntraBetaContact + -OrgContactId + [] +``` + +## Description + +The `Remove-EntraBetaContact` removes a contact from Microsoft Entra ID. + +## Examples + +### Example 1: Remove a contact + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All' +$Contact = Get-EntraBetaContact -Filter "DisplayName eq 'Contoso Contact'" +Remove-EntraBetaContact -OrgContactId $Contact.ObjectId +``` + +The example shows how to remove a contact. + +## Parameters + +### -OrgContactId + +Specifies the object ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaContact](Get-EntraBetaContact.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md new file mode 100644 index 0000000000..c8ff0fee95 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md @@ -0,0 +1,86 @@ +--- +title: Remove-EntraBetaDevice +description: This article provides details on the Remove-EntraBetaDevice command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDevice + +schema: 2.0.0 +--- + +# Remove-EntraBetaDevice + +## Synopsis + +Deletes a device. + +## Syntax + +```powershell +Remove-EntraBetaDevice + -DeviceId + [] +``` + +## Description + +The `Remove-EntraBetaDevice` cmdlet removes a device from Microsoft Entra ID. + +The calling user must be in one of the following Microsoft Entra roles: Intune Administrator, Windows 365 Administrator, or Cloud Device Administrator. + +## Examples + +### Example 1: Remove a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +$Device = Get-EntraBetaDevice -Filter "DisplayName eq 'Woodgrove Desktop'" +Remove-EntraBetaDevice -DeviceId $Device.ObjectId +``` + +This command removes the specified device. + +## Parameters + +### -DeviceId + +Specifies the object ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDevice](Get-EntraBetaDevice.md) + +[New-EntraBetaDevice](New-EntraBetaDevice.md) + +[Set-EntraBetaDevice](Set-EntraBetaDevice.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md new file mode 100644 index 0000000000..36e98b9802 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md @@ -0,0 +1,102 @@ +--- +title: Remove-EntraBetaDeviceRegisteredOwner +description: This article provides details on the Remove-EntraBetaDeviceRegisteredOwner command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredOwner + +schema: 2.0.0 +--- + +# Remove-EntraBetaDeviceRegisteredOwner + +## Synopsis + +Removes the registered owner of a device. + +## Syntax + +```powershell +Remove-EntraBetaDeviceRegisteredOwner + -OwnerId + -DeviceId + [] +``` + +## Description + +The `Remove-EntraBetaDeviceRegisteredOwner` cmdlet removes the registered owner of a device in Microsoft Entra ID. + +## Examples + +### Example 1: Remove an owner from a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$Device = Get-EntraBetaDevice -Top 1 +$Owner = Get-EntraBetaDeviceRegisteredOwner -ObjectId $Device.ObjectId +Remove-EntraBetaDeviceRegisteredOwner -DeviceId $Device.ObjectId -OwnerId $Owner.ObjectId +``` + +This examples shows how to remove the owner of a device. + +## Parameters + +### -DeviceId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies an owner ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaDeviceRegisteredOwner](Add-EntraBetaDeviceRegisteredOwner.md) + +[Get-EntraBetaDevice](Get-EntraBetaDevice.md) + +[Get-EntraBetaDeviceRegisteredOwner](Get-EntraBetaDeviceRegisteredOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md new file mode 100644 index 0000000000..13e371247f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md @@ -0,0 +1,100 @@ +--- +title: Remove-EntraBetaDeviceRegisteredUser +description: This article provides details on the Remove-EntraBetaDeviceRegisteredUser command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredUser + +schema: 2.0.0 +--- + +# Remove-EntraBetaDeviceRegisteredUser + +## Synopsis + +Removes a registered user from a device. + +## Syntax + +```powershell +Remove-EntraBetaDeviceRegisteredUser + -DeviceId + -UserId + [] +``` + +## Description + +The `Remove-EntraBetaDeviceRegisteredUser` cmdlet removes a registered user from a Microsoft Entra ID device. + +## Examples + +### Example 1: Remove a registered user from a device + +```Powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$Device = Get-EntraBetaDevice -Top 1 +$User = Get-EntraBetaDeviceRegisteredUser -DeviceId $Device.ObjectId +Remove-EntraBetaDeviceRegisteredUser -DeviceId $Device.ObjectId -UserId $User.ObjectId +``` + +This example shows how to remove the registered user from device. + +## Parameters + +### -DeviceId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaDeviceRegisteredUser](Add-EntraBetaDeviceRegisteredUser.md) + +[Get-EntraBetaDeviceRegisteredUser](Get-EntraBetaDeviceRegisteredUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md new file mode 100644 index 0000000000..55b9f017f1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md @@ -0,0 +1,104 @@ +--- +title: Remove-EntraBetaDirectoryRoleMember +description: This article provides details on the Remove-EntraBetaDirectoryRoleMember command. + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleMember + +schema: 2.0.0 +--- + +# Remove-EntraBetaDirectoryRoleMember + +## Synopsis + +Removes a member of a directory role. + +## Syntax + +```powershell +Remove-EntraBetaDirectoryRoleMember + -DirectoryRoleId + -MemberId + [] +``` + +## Description + +The `Remove-EntraBetaDirectoryRoleMember` cmdlet removes a member from a directory role in Microsoft Entra ID. + +## Examples + +### Example 1: Remove a member from a directory role + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$params = @{ + DirectoryRoleId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + MemberId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Remove-EntraBetaDirectoryRoleMember @params +``` + +This example removes the specified member from the specified role. + +- `-DirectoryRoleId` parameter specifies the object ID of the directory role. +- `-MemberId` parameter specifies the object ID of the role member to removed. + +## Parameters + +### -MemberId + +Specifies the object ID of a role member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DirectoryRoleId + +Specifies the object ID of a directory role in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaDirectoryRoleMember](Add-EntraBetaDirectoryRoleMember.md) + +[Get-EntraBetaDirectoryRoleMember](Get-EntraBetaDirectoryRoleMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md new file mode 100644 index 0000000000..0f083c3d45 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md @@ -0,0 +1,95 @@ +--- +title: Remove-EntraBetaDirectorySetting +description: This article provides details on the Remove-EntraBetaDirectorySetting command. + + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectorySetting + +schema: 2.0.0 +--- + +# Remove-EntraBetaDirectorySetting + +## Synopsis + +Deletes a directory setting in Microsoft Entra ID. + +## Syntax + +```powershell +Remove-EntraBetaDirectorySetting + -Id + [] +``` + +## Description + +The `Remove-EntraBetaDirectorySetting` cmdlet removes a directory setting from Microsoft Entra ID. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles are supported: + +- Microsoft Entra Joined Device Local Administrator: Read basic properties on setting templates and settings. +- Directory Readers: Read basic properties on setting templates and settings. +- Global Reader: Read basic properties on setting templates and settings. +- Groups Administrator: Manage all group settings. +- Directory Writers: Manage all group settings. +- Authentication Policy Administrator: Update Password Rule Settings. +- User Administrator: Read basic properties on setting templates and settings. + +## Examples + +### Example 1: Removes a directory setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +Remove-EntraBetaDirectorySetting -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This command removes a directory setting from Microsoft Entra ID. + +- `-Id` Specifies the object ID of a settings object. + +## Parameters + +### -Id + +Specifies the object ID of a settings object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDirectorySetting](Get-EntraBetaDirectorySetting.md) + +[New-EntraBetaDirectorySetting](New-EntraBetaDirectorySetting.md) + +[Set-EntraBetaDirectorySetting](Set-EntraBetaDirectorySetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md new file mode 100644 index 0000000000..8dcd7c00af --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraBetaDomain +description: This article provides details on the Remove-EntraBetaDomain command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDomain + +schema: 2.0.0 +--- + +# Remove-EntraBetaDomain + +## Synopsis + +Removes a domain. + +## Syntax + +```powershell +Remove-EntraBetaDomain + -Name + [] +``` + +## Description + +The `Remove-EntraBetaDomain` cmdlet removes a domain from Microsoft Entra ID. + +Important: + +- Deleted domains are not recoverable. +- Attempts to delete will fail if there are any resources or objects still dependent on the domain. + +The work or school account needs to belong to at least the `Domain Name Administrator` Microsoft Entra role. + +## Examples + +### Example 1: Remove a domain + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Remove-EntraBetaDomain -Name Contoso.com +``` + +This command removes a domain from Microsoft Entra ID. + +## Parameters + +### -Name + +Specifies the name of the domain to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraBetaDomain](Confirm-EntraBetaDomain.md) + +[Get-EntraBetaDomain](Get-EntraBetaDomain.md) + +[New-EntraBetaDomain](New-EntraBetaDomain.md) + +[Set-EntraBetaDomain](Set-EntraBetaDomain.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md new file mode 100644 index 0000000000..68bc50c151 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md @@ -0,0 +1,106 @@ +--- +title: Remove-EntraBetaScopedRoleMembership +description: This article provides details on the Remove-EntraBetaScopedRoleMembership command. + + +ms.topic: reference +ms.date: 07/06/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaScopedRoleMembership + +schema: 2.0.0 +--- + +# Remove-EntraBetaScopedRoleMembership + +## Synopsis + +Removes a scoped role membership. + +## Syntax + +```powershell +Remove-EntraBetaScopedRoleMembership + -AdministrativeUnitId + -ScopedRoleMembershipId + [] +``` + +## Description + +The `Remove-EntraBetaScopedRoleMembership` cmdlet removes a scoped role membership from Microsoft Entra ID. Specify `AdministrativeUnitId` and `ScopedRoleMembershipId` parameter to remove a scoped role membership. + +## Examples + +### Example 1: Remove a scoped role membership + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + ScopedRoleMembershipId = 'dddddddddddd-bbbb-aaaa-bbbb-cccccccccccc' +} +Remove-EntraBetaScopedRoleMembership @params +``` + +This cmdlet removes a specific scoped role membership from Microsoft Entra ID. You can use the command `Get-EntraBetaAdministrativeUnit` to get administrative unit Id. + +- `-AdministrativeUnitId` parameter specifies the ID of an administrative unit. +- `-ScopedRoleMembershipId` parameter specifies the ID of the scoped role membership to remove. To obtain the details of a scoped role membership, you can use the `Get-EntraBetaScopedRoleMembership` command. + +## Parameters + +### -AdministrativeUnitId + +Specifies the ID of an administrative unit object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ScopedRoleMembershipId + +Specifies the ID of the scoped role membership to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaScopedRoleMembership](Add-EntraBetaScopedRoleMembership.md) + +[Get-EntraBetaScopedRoleMembership](Get-EntraBetaScopedRoleMembership.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md new file mode 100644 index 0000000000..1546af94e2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md @@ -0,0 +1,155 @@ +--- +title: Restore-EntraBetaDeletedDirectoryObject +description: This article provides details on the Restore-EntraBetaDeletedDirectoryObject command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedDirectoryObject + +schema: 2.0.0 +--- + +# Restore-EntraBetaDeletedDirectoryObject + +## Synopsis + +Restore a previously deleted object. + +## Syntax + +```powershell +Restore-EntraBetaDeletedDirectoryObject + -Id + [-AutoReconcileProxyConflict] + [] +``` + +## Description + +The `Restore-EntraBetaDeletedDirectoryObject` cmdlet is used to restore previously deleted objects, such as application, group, service principal, administrative unit, or user objects. + +When a group or application is deleted, it is initially soft deleted and can be recovered within the first 30 days. After 30 days, the deleted object is permanently deleted and cannot be recovered. + +**Notes:** + +- Only Unified Groups (also known as Office 365 Groups) can be restored; Security groups cannot be restored. +- Restoring an application does not automatically restore its associated service principal. You must explicitly use this cmdlet to restore the deleted service principal. + +For delegated scenarios, the calling user needs to have at least one of the following Microsoft Entra roles: + +- **To restore deleted applications or service principals:** Application Administrator, Cloud Application Administrator, or Hybrid Identity Administrator. +- **To restore deleted users:** User Administrator. + - However, to restore users with privileged administrator roles: + - In delegated scenarios, the app must be assigned the `Directory.AccessAsUser.All` delegated permission, and the calling user must also be assigned a higher privileged administrator role. + - In app-only scenarios, in addition to being granted the `User.ReadWrite.All` application permission, the app must be assigned a higher privileged administrator role. +- **To restore deleted groups:** Groups Administrator. + - However, to restore role-assignable groups, the calling user must be assigned the Privileged Role Administrator role. + +## Examples + +### Example 1: Restore a deleted object with ID + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' #administrativeUnit resource +Connect-Entra -Scopes 'Application.ReadWrite.All' #application resource +Connect-Entra -Scopes 'Group.ReadWrite.All' #group resource +Connect-Entra -Scopes 'Application.ReadWrite.All' #servicePrincipal resource +Connect-Entra -Scopes 'User.ReadWrite.All' #user resource +Restore-EntraBetaDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example shows how to restore a deleted object in Microsoft Entra ID. + +- `-Id` parameter specifies the Id of the directory object to restore. + +### Example 2: Restoring a Soft-Deleted User and Removing Conflicting Proxy Addresses + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +Restore-EntraBetaDeletedDirectoryObject -Id 'dddddddd-3333-4444-5555-eeeeeeeeeeee' -AutoReconcileProxyConflict +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +``` + +This example shows how to restore a deleted object in Microsoft Entra ID. + +- `-Id` parameter specifies the Id of the directory object to restore. +- `-AutoReconcileProxyConflict` parameter removes any conflicting proxy addresses while restoring a soft-deleted user whose one or more proxy addresses are currently used for an active user. + +## Parameters + +### -Id + +The Id of the directory object to restore. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -AutoReconcileProxyConflict + +Specifies whether Microsoft Entra ID should remove conflicting proxy addresses when restoring a soft-deleted user, if any of the user's proxy addresses are currently in use by an active user. This parameter applies only when restoring a soft-deleted user. The default value is `false`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Remove-EntraBetaDeletedApplication](Remove-EntraBetaDeletedApplication.md) + +[Restore-EntraBetaDeletedApplication](Restore-EntraBetaDeletedApplication.md) + +[Remove-EntraBetaDeletedDirectoryObject](Remove-EntraBetaDeletedDirectoryObject.md) + +[Get-EntraBetaDeletedApplication](Get-EntraBetaDeletedApplication.md) + +[Get-EntraBetaDeletedDirectoryObject](Get-EntraBetaDeletedDirectoryObject.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md new file mode 100644 index 0000000000..addaa0f747 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md @@ -0,0 +1,178 @@ +--- +title: Set-EntraBetaAdministrativeUnit +description: This article provides details on the Set-EntraBetaAdministrativeUnit command. + +ms.topic: reference +ms.date: 07/03/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaAdministrativeUnit + +schema: 2.0.0 +--- + +# Set-EntraBetaAdministrativeUnit + +## Synopsis + +Updates an administrative unit. + +## Syntax + +```powershell +Set-EntraBetaAdministrativeUnit + -AdministrativeUnitId + [-IsMemberManagementRestricted ] + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +The `Set-EntraBetaAdministrativeUnit` cmdlet updates an administrative unit in Microsoft Entra ID. Specify `AdministrativeUnitId` parameter to update a specific administrative unit. + +In delegated scenarios, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the `microsoft.directory/administrativeUnits/allProperties/allTasks` permission. + +The Privileged Role Administrator is the least privileged role required for this operation. + +## Examples + +### Example 1: Update DisplayName + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + DisplayName = 'UpdatedAU' +} +Set-EntraBetaAdministrativeUnit @params +``` + +This Command update DisplayName of specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-DisplayName` parameter specifies the display name for the administrative unit. + +### Example 2: Update Description + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + Description = 'Updated AU Description' +} +Set-EntraBetaAdministrativeUnit @params +``` + +This example shows how to update the description of a specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-Description` parameter specifies the description for the administrative unit. + +### Example 3: Update IsMemberManagementRestricted + +```powershell +Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All' +$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq ''" +$params = @{ + AdministrativeUnitId = $AdministrativeUnit.ObjectId + IsMemberManagementRestricted = $true +} +Set-EntraBetaAdministrativeUnit @params +``` + +This example shows how to update the `IsMemberManagementRestricted` setting for a specific administrative unit. + +- `-AdministrativeUnitId` parameter specifies the Id of an administrative unit. +- `-IsMemberManagementRestricted` parameter specifies the management rights on resources in the administrative units should be restricted to ONLY the administrators scoped on the administrative unit object. + +## Parameters + +### -Description + +Specifies a description. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsMemberManagementRestricted + +Indicates whether the management rights on resources in the administrative units should be restricted to ONLY the administrators scoped on the administrative unit object. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AdministrativeUnitId + +Specifies the Id of an administrative unit in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaAdministrativeUnit](Get-EntraBetaAdministrativeUnit.md) + +[New-EntraBetaAdministrativeUnit](New-EntraBetaAdministrativeUnit.md) + +[Remove-EntraBetaAdministrativeUnit](Remove-EntraBetaAdministrativeUnit.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md new file mode 100644 index 0000000000..132fada2b4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md @@ -0,0 +1,147 @@ +--- +title: Set-EntraBetaAttributeSet +description: This article provides details on the Set-EntraBetaAttributeSet command. + +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaAttributeSet + +schema: 2.0.0 +--- + +# Set-EntraBetaAttributeSet + +## Synopsis + +Updates an existing attribute set. + +## Syntax + +```powershell +Set-EntraBetaAttributeSet + -AttributeSetId + [-Description ] + [-MaxAttributesPerSet ] + [] +``` + +## Description + +The `Set-EntraBetaAttributeSet` cmdlet updates a Microsoft Entra ID attribute set object specified by its ID. Specify `AttributeSetId` parameter to Update a Microsoft Entra ID attribute set object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. + +Note: Only the Attribute Definition Administrator role is supported for this operation. Ensure the signed-in user is assigned this role. + +You can only update the `description` and `maxAttributesPerSet` properties. + +## Examples + +### Example 1: Update an attribute set + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Engineering' + Description = 'Attributes for engineering team' +} +Set-EntraBetaAttributeSet @params +``` + +This example update an attribute set. + +- `AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraBetaAttributeSet` to get more details. +- `Description` parameter specifies the description for the attribute set. + +### Example 2: Update an attribute set using MaxAttributesPerSet + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + AttributeSetId = 'Engineering' + MaxAttributesPerSet = 10 +} +Set-EntraBetaAttributeSet @params +``` + +This example update an attribute set using MaxAttributesPerSet. + +- `-AttributeSetId` parameter specifies the name of the attribute set. You can `Get-EntraBetaAttributeSet` to get more details. +- `-MaxAttributesPerSet` parameter specifies the maximum number of custom security attributes. + +## Parameters + +### -Description + +Description of the attribute set, up to 128 characters long, including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AttributeSetId + +Name of the attribute set. Unique identifier for the attribute set within a tenant. This identifier can be up to 32 characters long and may include Unicode characters. It cannot contain spaces or special characters, and it cannot be changed later. The identifier is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MaxAttributesPerSet + +Maximum number of custom security attributes that can be defined in this attribute set. The default value is null. If not specified, the administrator can add up to 500 active attributes per tenant. This setting can be changed later. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaAttributeSet](New-EntraBetaAttributeSet.md) + +[Get-EntraBetaAttributeSet](Get-EntraBetaAttributeSet.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md new file mode 100644 index 0000000000..6b94b8162a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md @@ -0,0 +1,147 @@ +--- +title: Set-EntraBetaCustomSecurityAttributeDefinition +description: This article provides details on the Set-EntraBetaCustomSecurityAttributeDefinition command. + +ms.topic: reference +ms.date: 07/10/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinition + +schema: 2.0.0 +--- + +# Set-EntraBetaCustomSecurityAttributeDefinition + +## Synopsis + +Update the properties of a customSecurityAttributeDefinition object. + +## Syntax + +```powershell +Set-EntraBetaCustomSecurityAttributeDefinition + -Id + [-Description ] + [-Status ] + [-UsePreDefinedValuesOnly ] + [] +``` + +## Description + +Update the properties of a customSecurityAttributeDefinition object. Specify `Id` parameter to update a custom security attribute definition. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The Attribute Definition Administrator is the only privileged role supported for this operation. + +## Examples + +### Example 1: Update a custom security attribute + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.Read.All', 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + Id = 'Test_ProjectTest' + Description = 'Target completion' + Status = 'Available' +} +Set-EntraBetaCustomSecurityAttributeDefinition @params +``` + +This example update a custom security attribute. + +- `-Id` parameter specifies the custom security attribute definition object ID. +- `-Description` parameter specifies the description of the custom security attribute. +- `-Status` parameter specifies the custom security attribute is active or deactivated. +- `-UsePreDefinedValuesOnly` parameter specifies the only predefined values can be assigned to the custom security attribute. + +## Parameters + +### -Description + +Description of the custom security attribute, up to 128 characters long and including Unicode characters. This description can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID custom security attribute definition object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Status + +Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsePreDefinedValuesOnly + +Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but can't be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly can't be set to true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaCustomSecurityAttributeDefinition](New-EntraBetaCustomSecurityAttributeDefinition.md) + +[Get-EntraBetaCustomSecurityAttributeDefinition](Get-EntraBetaCustomSecurityAttributeDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md new file mode 100644 index 0000000000..db66e41029 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -0,0 +1,127 @@ +--- +title: Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue +description: This article provides details on the Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue command. + +ms.topic: reference +ms.date: 07/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + +schema: 2.0.0 +--- + +# Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + +## Synopsis + +Updates an existing custom security attribute definition predefined value. + +## Syntax + +```powershell +Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue + -CustomSecurityAttributeDefinitionId + -Id + [-IsActive ] + [] +``` + +## Description + +The `Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue` cmdlet update a Microsoft Entra ID custom security attribute definition predefined value object identified by ID. Specify `CustomSecurityAttributeDefinitionId` and `Id` parameter to update a Microsoft Entra ID custom security attribute definition predefined value. + +## Examples + +### Example 1: Update a custom security attribute definition predefined value + +```powershell +Connect-Entra -Scopes 'CustomSecAttributeDefinition.ReadWrite.All' +$params = @{ + CustomSecurityAttributeDefinitionId = 'Engineering_Project' + Id = 'Alpine' + IsActive = $true +} +Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue @params +``` + +This example update a custom security attribute definition predefined value. + +- `-CustomSecurityAttributeDefinitionId` parameter specifies the custom security attribute definition ID. +- `-Id` parameter specifies the ID of Microsoft Entra ID Object. +- `-IsActive` parameter specifies the predefined value is active or deactivated. + +## Parameters + +### -CustomSecurityAttributeDefinitionId + +The unique identifier of customSecurityAttributeDefinition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. This field is optional. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsActive + +Indicates whether the predefined value is active or deactivated. If set to false, this predefined value can't be assigned to any other supported directory objects. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue](Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md) + +[Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue](Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md new file mode 100644 index 0000000000..7b3848a67a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md @@ -0,0 +1,387 @@ +--- +title: Set-EntraBetaDevice +description: This article provides details on the Set-EntraBetaDevice command. + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDevice + +schema: 2.0.0 +--- + +# Set-EntraBetaDevice + +## Synopsis + +Updates a device. + +## Syntax + +```powershell +Set-EntraBetaDevice + -DeviceObjectId + [-DevicePhysicalIds ] + [-DeviceOSType ] + [-DeviceTrustType ] + [-DisplayName ] + [-DeviceMetadata ] + [-ApproximateLastLogonTimeStamp ] + [-AccountEnabled ] + [-IsManaged ] + [-DeviceId ] + [-DeviceObjectVersion ] + [-IsCompliant ] + [-DeviceOSVersion ] + [-AlternativeSecurityIds ] + [-ProfileType ] + [-SystemLabels ] + [] +``` + +## Description + +The `Set-EntraBetaDevice` cmdlet updates a device in Microsoft Entra ID. + +The calling user must have at least the Intune Administrator role in Microsoft Entra. A user with the Cloud Device Administrator role can only enable or disable devices, while a user with the Windows 365 Administrator role can only update basic device properties. + +## Examples + +### Example 1: Update a device display name + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraBetaDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName 'My OS/2 computer' +``` + +This example shows how to update a display name of a specified. + +### Example 2: Update a device alternative security ID + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +$NewId= New-Object Microsoft.Open.AzureAD.Model.AlternativeSecurityId +$NewId.Key =[System.Text.Encoding]::UTF8.GetBytes('test') +$NewId.type = 2 +Set-EntraBetaDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AlternativeSecurityIds $NewId +``` + +This example shows how to update an alternative security ID of a specified device. + +### Example 3: Update a device account enabled + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraBetaDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -AccountEnabled $true +``` + +This example shows how to update an account enabled of a specified device. + +### Example 4: Update a device OS type + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' +Set-EntraBetaDevice -DeviceObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DeviceOSType Windows +``` + +This example shows how to update an OS type of a specified device. + +### Example 5: Update a device + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All','Device.ReadWrite.All' + +$params = @{ + DeviceObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DeviceMetadata = 'Testdevice' + DeviceObjectVersion = 4 + DevicePhysicalIds = '[GID]:g:1234567890123456' + IsCompliant = $false +} + +Set-EntraBetaDevice @params +``` + +This example shows how to update multiple properties of a specified device. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AlternativeSecurityIds + +Specifies alternative security IDs. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApproximateLastLogonTimeStamp + +The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderby. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId + +Specifies the device ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceMetadata + +The device metadata for this device. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectVersion + +Specifies the object version of the device. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSType + +Specifies the operating system. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceOSVersion + +Specifies the operating system version. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DevicePhysicalIds + +Specifies the physical ID. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceTrustType + +Specifies the device trust type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompliant + +Indicates whether the device is compliant. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsManaged + +Indicates whether the device is managed. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceObjectId + +Specifies the object ID of a device in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProfileType + +Specifies the profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemLabels + +Specifies list of labels applied to the device by the system. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDevice](Get-EntraBetaDevice.md) + +[New-EntraBetaDevice](New-EntraBetaDevice.md) + +[Remove-EntraBetaDevice](Remove-EntraBetaDevice.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md new file mode 100644 index 0000000000..4d4047ebbb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md @@ -0,0 +1,154 @@ +--- +title: Set-EntraBetaDirSyncConfiguration +description: This article provides details on the Set-EntraBetaDirSyncConfiguration command. + + +ms.topic: reference +ms.date: 08/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncConfiguration + +schema: 2.0.0 +--- + +# Set-EntraBetaDirSyncConfiguration + +## Synopsis + +Modifies the directory synchronization settings. + +## Syntax + +### SetAccidentalDeletionThreshold (Default) + +```powershell +Set-EntraBetaDirSyncConfiguration + -AccidentalDeletionThreshold + [-Force] + [] +``` + +### All + +```powershell +Set-EntraBetaDirSyncConfiguration + [-TenantId ] + [-Force] + [] +``` + +## Description + +The `Set-EntraBetaDirSyncConfiguration` cmdlet modifies the directory synchronization settings. + +## Examples + +### Example 1: Set directory synchronization settings + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold 600 -Force +``` + +This command sets directory synchronization settings. + +- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Set directory synchronization settings for a Tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$tenantID = (Get-EntraContext).TenantId +$params = @{ + AccidentalDeletionThreshold = 600 + TenantId = $tenantID + Force = $true +} + +Set-EntraBetaDirSyncConfiguration @params +``` + +This command sets directory synchronization settings. + +- `-AccidentalDeletionThreshold` Specifies the accidental deletion prevention configuration for a tenant. +- `-Force` Forces the command to run without asking for user confirmation. +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -AccidentalDeletionThreshold + +Specifies the accidental deletion prevention configuration for a tenant. + +```yaml +Type: System.UInt32 +Parameter Sets: SetAccidentalDeletionThreshold +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: SetAccidentalDeletionThreshold +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.UInt32 + +### System.Guid + +## Outputs + +### System.Object + +## Notes + +- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). + +## Related Links + +[Get-EntraBetaDirSyncConfiguration](Get-EntraBetaDirSyncConfiguration.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md new file mode 100644 index 0000000000..1265b09a65 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md @@ -0,0 +1,144 @@ +--- +title: Set-EntraBetaDirSyncEnabled +description: This article provides details on the Set-EntraBetaDirSyncEnabled command. + +ms.topic: reference +ms.date: 08/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncEnabled + +schema: 2.0.0 +--- + +# Set-EntraBetaDirSyncEnabled + +## Synopsis + +Turns directory synchronization on or off for a company. + +## Syntax + +```powershell +Set-EntraBetaDirSyncEnabled + -EnableDirSync + [-Force] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraBetaDirSyncEnabled` cmdlet turns directory synchronization on or off for a company. + +>[!IMPORTANT] +>It may take up to 72 hours to complete deactivation once you have disabled DirSync through this cmdlet. The time depends on the number of objects that are in your cloud service subscription account. **You cannot cancel the disable action**. It will need to complete before you can take any other action, including re-enabling of DirSync. If you choose to re-enable DirSync, a full synchronization of your synced objects will happen. This may take a considerable time depending on the number of objects in your Microsoft Entra ID. + +>[!NOTE] +>If you disable DirSync and you decide to re-enable it, and you have enabled the BlockCloudObjectTakeoverThroughHardMatch feature, OnPrem to cloud object takeover/update for all objects mastered in the Microsoft Entra ID will be blocked. If this is the case and you want to resume syncing Microsoft Entra ID mastered objects with Microsoft Entra ID, set **BlockCloudObjectTakeoverThroughHardMatch** feature to false. + +## Examples + +### Example 1: Turn on directory synchronization + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' +$params = @{ + EnableDirsync = $True + Force = $True +} +Set-EntraBetaDirSyncEnabled @params +``` + +This example turns on directory synchronization for a company. + +- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Turn off directory synchronization + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All', 'Organization.ReadWrite.All' +$params = @{ + EnableDirsync = $False + TenantId = 'aaaaaaaa-1111-1111-1111-000000000000' + Force = $True + +} +Set-EntraBetaDirSyncEnabled @params +``` + +This example turns off directory synchronization for a company. + +- `-EnableDirsync` Specifies whether to turn on directory synchronization on for your company. +- `-Force` Forces the command to run without asking for user confirmation. +- `-TenantId` Specifies the unique ID of the tenant on which to perform the operation. + +## Parameters + +### -EnableDirsync + +Specifies whether to turn on directory synchronization on for your company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the unique ID of the tenant on which to perform the operation. +The default value is the tenant of the current user. +This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md new file mode 100644 index 0000000000..b7356226de --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md @@ -0,0 +1,190 @@ +--- +title: Set-EntraBetaDirSyncFeature +description: This article provides details on the Set-EntraBetaDirSyncFeature command. + + +ms.topic: reference +ms.date: 08/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncFeature + +schema: 2.0.0 +--- + +# Set-EntraBetaDirSyncFeature + +## Synopsis + +Used to set identity synchronization features for a tenant. + +## Syntax + +```powershell +Set-EntraBetaDirSyncFeature + -Feature + -Enabled + [-TenantId ] + [-Force] + [] +``` + +## Description + +The `Set-EntraBetaDirSyncFeature` cmdlet sets identity synchronization features for a tenant. + +You can use the following synchronization features with this cmdlet: + +- **EnableSoftMatchOnUpn**: Soft match is the process used to link an object being synced from on-premises for the first time with one that already exists in the cloud. When this feature is enabled, soft match is attempted using the standard logic, based on the primary SMTP address. If a match isn't found based on primary SMTP, then a match is attempted based on UserPrincipalName. Once this feature is enabled, it can't be disabled. +- **PasswordSync**: Used to indicate on-premise password synchronization. +- **SynchronizeUpnForManagedUsers**: Allows for the synchronization of UserPrincipalName updates from on-premises for managed (nonfederated) users that are assigned a license. These updates are blocked if this feature isn't enabled. Once this feature is enabled, it can't be disabled. +- **BlockSoftMatch**: When this feature is enabled, it blocks the soft match feature. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching is completed and is no longer needed. +- **BlockCloudObjectTakeoverThroughHardMatch**: Used to block cloud object takeover via source anchor hard match. + +Enabling some of these features, such as EnableSoftMatchOnUpn and SynchronizationUpnForManagedUsers, is a permanent operation. +You can't disable these features once they're enabled. + +## Examples + +### Example 1: Enable a feature for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockCloudObjectTakeoverThroughHardMatch' + Enable = $True + Force = $true +} +Set-EntraBetaDirSyncFeature @params +``` + +This command enables the SoftMatchOnUpn feature for the tenant. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. +- `-Force` Forces the command to run without asking for user confirmation. + +### Example 2: Block Soft Matching for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$params = @{ + Feature = 'BlockSoftMatch' + Enable = $True +} + +Set-EntraBetaDirSyncFeature @params +``` + +This command enables the BlockSoftMatch feature for the tenant - effectively blocking the Soft Matching feature in the tenant. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. + +### Example 3: Block Cloud object takeover through Hard Matching for the tenant + +```powershell +Connect-Entra -Scopes 'OnPremDirectorySynchronization.ReadWrite.All' +$tenantID = (Get-EntraContext).TenantId +$params = @{ + Feature = 'BlockCloudObjectTakeoverThroughHardMatch' + Enable = $True + TenantId = $tenantID +} + +Set-EntraBetaDirSyncFeature @params +``` + +This command enables the BlockCloudObjectTakeoverThroughHardMatch feature for the tenant - effectively blocking the Hard Match object takeover. + +- `-Feature` specifies the directory synchronization feature to turn on or off. +- `-Enable` specifies whether the specified features are turned on for the company. +- `-TenantId` Specifies the unique ID of the tenant. + +## Parameters + +### -Feature + +The DirSync feature to turn on or off. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Enable + +Indicates whether the specified features are turned on for the company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: False +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +The unique ID of the tenant on which to perform the operation. If not provided, the operation defaults to the tenant of the current user. This parameter is applicable only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -Force + +Forces the command to run without asking for user confirmation. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For additional details see [Update onPremisesDirectorySynchronization](https://learn.microsoft.com/graph/api/onpremisesdirectorysynchronization-update). +- For the feature list see the [onPremisesDirectorySynchronizationFeature resource type](https://learn.microsoft.com/graph/api/resources/onpremisesdirectorysynchronizationfeature). + +## Related Links + +[Get-EntraBetaDirSyncFeature](Get-EntraBetaDirSyncFeature.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md new file mode 100644 index 0000000000..ab313299d3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md @@ -0,0 +1,111 @@ +--- +title: Set-EntraBetaDirectorySetting +description: This article provides details on the Set-EntraBetaDirectorySetting command. + + +ms.topic: reference +ms.date: 08/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectorySetting + +schema: 2.0.0 +--- + +# Set-EntraBetaDirectorySetting + +## Synopsis + +Updates a directory setting in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraBetaDirectorySetting + -DirectorySetting + -Id + [] +``` + +## Description + +The `Set-EntraBetaDirectorySetting` cmdlet updates a directory setting in Microsoft Entra ID. + +## Examples + +### Example 1: updates a directory setting + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All', 'Policy.ReadWrite.Authorization' +$TemplateId = (Get-EntraBetaDirectorySettingTemplate | where { $_.DisplayName -eq 'Group.Unified' }).Id +$Template = Get-EntraBetaDirectorySettingTemplate | where -Property Id -Value $TemplateId -EQ +$Setting = $Template.CreateDirectorySetting() +$Setting["EnableMIPLabels"] = 'False' +$params = @{ + Id = 'aaaaaaaa-1111-1111-1111-000000000000' + DirectorySetting = $Setting +} +Set-EntraBetaDirectorySetting @params +``` + +This example updates directory settings object in Microsoft Entra ID. + +- `-DirectorySetting` Parameter updates the property of directory settings. +- `-Id` Parameter specifies the ID of a setting object + +## Parameters + +### -DirectorySetting + +Specifies the directory settings. + +```yaml +Type: DirectorySetting +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a settings object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDirectorySetting](Get-EntraBetaDirectorySetting.md) + +[New-EntraBetaDirectorySetting](New-EntraBetaDirectorySetting.md) + +[Remove-EntraBetaDirectorySetting](Remove-EntraBetaDirectorySetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md new file mode 100644 index 0000000000..42ae00e12d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md @@ -0,0 +1,135 @@ +--- +title: Set-EntraBetaDomain +description: This article provides details on the Set-EntraBetaDomain command. + + +ms.topic: reference +ms.date: 08/09/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomain + +schema: 2.0.0 +--- + +# Set-EntraBetaDomain + +## Synopsis + +Updates a domain. + +## Syntax + +```powershell +Set-EntraBetaDomain + -Name + [-IsDefault ] + [-SupportedServices ] + [] +``` + +## Description + +The `Set-EntraBetaDomain` cmdlet updates a verified domain in Microsoft Entra ID. + +The work or school account needs to belong to at least one of the following Microsoft Entra roles: + +- Domain Name Administrator +- Security Administrator +- External Identity Provider Administrator + +## Examples + +### Example 1: Set the domain as the default domain for new user account creation + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Set-EntraBetaDomain -Name Contoso.com -IsDefault $true +``` + +This example demonstrates how to set default domain for new user account in Microsoft Entra ID. + +### Example 2: Set the list of domain capabilities + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' +Set-EntraBetaDomain -Name Contoso.com -SupportedServices @('Email', 'OfficeCommunicationsOnline') +``` + +This example demonstrates how to set domain capabilities for new user account in Microsoft Entra ID. + +## Parameters + +### -IsDefault + +Indicates whether or not this is the default domain that is used for user creation. +There's only one default domain per company. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The fully qualified name of the domain. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SupportedServices + +The capabilities assigned to the domain. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Confirm-EntraBetaDomain](Confirm-EntraBetaDomain.md) + +[Get-EntraBetaDomain](Get-EntraBetaDomain.md) + +[New-EntraBetaDomain](New-EntraBetaDomain.md) + +[Remove-EntraBetaDomain](Remove-EntraBetaDomain.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md new file mode 100644 index 0000000000..4a724198a9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md @@ -0,0 +1,315 @@ +--- +title: Set-EntraBetaDomainFederationSettings +description: This article provides details on the Set-EntraBetaDomainFederationSettings command. + +ms.topic: reference +ms.date: 08/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomainFederationSettings + +schema: 2.0.0 +--- + +# Set-EntraBetaDomainFederationSettings + +## Synopsis + +Updates settings for a federated domain. + +## Syntax + +```powershell +Set-EntraBetaDomainFederationSettings + -DomainName + [-SigningCertificate ] + [-NextSigningCertificate ] + [-LogOffUri ] + [-PassiveLogOnUri ] + [-ActiveLogOnUri ] + [-IssuerUri ] + [-FederationBrandName ] + [-MetadataExchangeUri ] + [-PreferredAuthenticationProtocol ] + [-SigningCertificateUpdateStatus ] + [-PromptLoginBehavior ] + [] +``` + +## Description + +The `Set-EntraBetaDomainFederationSettings` cmdlet is used to update the settings of a single sign-on domain. + +For delegated scenarios, the calling user must be assigned at least one of the following Microsoft Entra roles: + +- Domain Name Administrator +- External Identity Provider Administrator +- Hybrid Identity Administrator +- Security Administrator + +## Examples + +### Example 1: Set the PromptLoginBehavior + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' + +$params = @{ + DomainName = 'contoso.com' + PreferredAuthenticationProtocol = 'WsFed' + PromptLoginBehavior = 'TranslateToFreshPasswordAuth' # Or 'NativeSupport' or 'Disabled', depending on the requirement +} +Set-EntraBetaDomainFederationSettings @params +``` + +This command updates the `PromptLoginBehavior` to either `TranslateToFreshPasswordAuth`, `NativeSupport`, or `Disabled`. These possible values are described: + +- `TranslateToFreshPasswordAuth` - means the default Microsoft Entra ID behavior of translating `prompt=login` to `wauth=https://schemas.microsoft.com/ws/2008/06/identity/authenticationmethod/password` and `wfresh=0`. +- `NativeSupport` - means that the `prompt=login` parameter is sent as is to ADFS. +- `Disabled` - means that only wfresh=0 is sent to ADFS + +Use the `Get-EntraBetaDomainFederationSettings -DomainName | Format-List *` to get the values for `PreferredAuthenticationProtocol` and `PromptLoginBehavior` for the federated domain. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. +- `-PreferredAuthenticationProtocol` parameter specifies the preferred authentication protocol. +- `-PromptLoginBehavior` parameter specifies the prompt sign-in behavior. + +### Example 2: Set the domain federation uri's + +```powershell +Connect-Entra -Scopes 'Domain.ReadWrite.All' + +$params = @{ + DomainName = 'contoso.com' + LogOffUri = 'https://adfs1.entra.lab/adfs/' + PassiveLogOnUri = 'https://adfs1.entra.lab/adfs/' + ActiveLogOnUri = 'https://adfs1.entra.lab/adfs/services/trust/2005/' + IssuerUri = 'http://adfs1.entra.lab/adfs/services/' + MetadataExchangeUri = 'https://adfs1.entra.lab/adfs/services/trust/' +} +Set-EntraBetaDomainFederationSettings @params +``` + +This command updates the domain federation domain settings. + +- `-DomainName` parameter specifies the fully qualified domain name to retrieve. +- `-LogOffUri` parameter specifies the URL clients are redirected to when they sign out of Microsoft Entra ID services. +- `-PassiveLogOnUri` parameter specifies URL that web-based clients will be directed to when signing in to Microsoft Entra ID services. +- `-ActiveLogOnUri` parameter specifies the end point used by active clients when authenticating with domains set up for single sign-on. +- `-IssuerUri` parameter specifies the unique identifier of the domain in the Microsoft Entra ID Identity platform derived from the federation server. +- `-MetadataExchangeUri` parameter specifies the metadata exchange end point used for authentication from client applications. + +## Parameters + +### -DomainName + +The fully qualified domain name (FQDN) to update. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -SigningCertificate + +The current certificate used to sign tokens passed to the Microsoft Entra ID Identity platform. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NextSigningCertificate + +The next token signing certificate that will be used to sign tokens when the primary signing certificate expires. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -LogOffUri + +The URL clients are redirected to when they sign out of Microsoft Entra ID services. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PassiveLogOnUri + +The URL that web-based clients will be directed to when signing in to Microsoft Entra ID services. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ActiveLogOnUri + +A URL that specifies the end point used by active clients when authenticating with domains set up for single sign-on (also known as identity federation) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 6 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IssuerUri + +The unique identifier of the domain in the Microsoft Entra ID Identity platform derived from the federation server. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FederationBrandName + +The name of the string value shown to users when signing in to Microsoft Entra ID. +We recommend that customers use something that is familiar to +users such as "Contoso Inc." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -MetadataExchangeUri + +The URL that specifies the metadata exchange end point used for authentication from rich client applications such as Lync Online. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PreferredAuthenticationProtocol + +Specifies the preferred authentication protocol. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 10 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SigningCertificateUpdateStatus + +Specifies the update status of the signing certificate. + +```yaml +Type: System.Object +Parameter Sets: (All) +Aliases: + +Required: False +Position: 11 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PromptLoginBehavior + +Specifies the prompt login behavior. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 12 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaDomainFederationSettings](Get-EntraBetaDomainFederationSettings.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md new file mode 100644 index 0000000000..fa862a55f4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md @@ -0,0 +1,242 @@ +--- +title: Set-EntraBetaPartnerInformation +description: This article provides details on the Set-EntraBetaPartnerInformation command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPartnerInformation + +schema: 2.0.0 +--- + +# Set-EntraBetaPartnerInformation + +## Synopsis + +Sets company information for partners. + +## Syntax + +```powershell +Set-EntraBetaPartnerInformation + [-CompanyType ] + [-PartnerCompanyName ] + [-PartnerSupportTelephones ] + [-PartnerSupportEmails ] + [-PartnerCommerceUrl ] + [-PartnerSupportUrl ] + [-PartnerHelpUrl ] + [-TenantId ] + [] +``` + +## Description + +The `Set-EntraBetaPartnerInformation` cmdlet is used by partners to set partner-specific properties. + +These properties can view by all tenants that the partner has access to. + +## Examples + +### Example 1: Update the help URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraBetaPartnerInformation -PartnerHelpUrl 'http://www.help.contoso.com' +``` + +This example shows how to update the help URL. + +### Example 2: Update the Support URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraBetaPartnerInformation -PartnerSupportUrl 'http://www.test1.com' +``` + +This example shows how to update the support URL. + +### Example 3: Update the Commerce URL + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraBetaPartnerInformation -PartnerCommerceUrl 'http://www.test1.com' +``` + +This example shows how to update the commerce URL. + +### Example 4: Update the SupportEmails + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraBetaPartnerInformation -PartnerSupportEmails 'contoso@example.com' +``` + +This example shows how to update the support email addresses. + +### Example 5: Update the SupportTelephones + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$tenantId = (Get-EntraContext).TenantId +$params = @{ + PartnerSupportTelephones = '234234234' + TenantId = $tenantId +} +Set-EntraBetaPartnerInformation @params +``` + +This example shows how to update support telephone numbers. + +## Parameters + +### -PartnerCommerceUrl + +Specifies the URL for the partner's commerce website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerHelpUrl + +Specifies the URL for the partner's Help website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportEmails + +Specifies the support email address for the partner. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportTelephones + +Specifies the support telephone numbers for the partner. + +```yaml +Type: String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerSupportUrl + +Specifies the URL for the partner's support website. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -TenantId + +Specifies the unique ID of the tenant on which to perform the operation. +The default value is the tenant of the current user. +This parameter applies only to partner users. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -CompanyType + +Specifies the partner's company type. + +```yaml +Type: CompanyType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -PartnerCompanyName + +Specifies the partner's company name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaPartnerInformation](Get-EntraBetaPartnerInformation.md) diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md new file mode 100644 index 0000000000..f44ba0e4e0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md @@ -0,0 +1,216 @@ +--- +title: Set-EntraBetaTenantDetail +description: This article provides details on the Set-EntraBetaTenantDetail command. + +ms.topic: reference +ms.date: 08/13/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaTenantDetail + +schema: 2.0.0 +--- + +# Set-EntraBetaTenantDetail + +## Synopsis + +Set contact details for a tenant. + +## Syntax + +```powershell +Set-EntraBetaTenantDetail + [-MarketingNotificationEmails ] + [-TechnicalNotificationMails ] + [-PrivacyProfile ] + [-SecurityComplianceNotificationMails ] + [-SecurityComplianceNotificationPhones ] + [] +``` + +## Description + +This cmdlet is used to set various contact details for a tenant. + +For delegated scenarios, the signed-in user must have at least one of the following Microsoft Entra roles. + +- Application Administrator +- Cloud Application Administrator +- Privileged Role Administrator +- User Administrator +- Helpdesk Administrator + +## Examples + +### Example 1: Set contact details for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$params = @{ + MarketingNotificationEmails = @('amy@contoso.com', 'henry@contoso.com') + SecurityComplianceNotificationMails = @('john@contoso.com', 'mary@contoso.com') + SecurityComplianceNotificationPhones = @('1-555-625-9999', '1-555-233-5544') + TechnicalNotificationMails = 'peter@contoso.com' +} + +Set-EntraBetaTenantDetail @params +``` + +This example demonstrates how to set various contact details for a tenant. + +- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. +- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. +- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. +- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. + +### Example 2: Set MarketingNotificationEmails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraBetaTenantDetail -MarketingNotificationEmails @('amy@contoso.com','henry@contoso.com') +``` + +This example demonstrates how to set MarketingNotificationEmails detail for a tenant. + +- `-MarketingNotificationEmails` parameter indicates the email addresses that are used to send marketing notification emails. + +### Example 3: Set SecurityComplianceNotificationMails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraBetaTenantDetail -SecurityComplianceNotificationMails @('john@contoso.com','mary@contoso.com') +``` + +This example demonstrates how to set SecurityComplianceNotificationMails detail for a tenant. + +- `-SecurityComplianceNotificationMails` parameter indicates the email addresses that are used to send security compliance emails. + +### Example 4: Set -SecurityComplianceNotificationPhones for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraBetaTenantDetail -SecurityComplianceNotificationPhones @('1-555-625-9999', '1-555-233-5544') +``` + +This example demonstrates how to set MarketingNotificationEmails detail for a tenant. + +- `-SecurityComplianceNotificationPhones` parameter specifies the phone numbers that are used for security compliance. + +### Example 5: Set TechnicalNotificationMails for a tenant + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +Set-EntraBetaTenantDetail -TechnicalNotificationMails 'peter@contoso.com' +``` + +This example demonstrates how to set TechnicalNotificationMails detail for a tenant. + +- `-TechnicalNotificationMails` parameter indicates the email addresses that are used for technical notification emails. + +## Parameters + +### -MarketingNotificationEmails + +The email addresses that are used to send marketing notification emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityComplianceNotificationMails + +The email addresses that are used to send security compliance emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityComplianceNotificationPhones + +One or more phone numbers that are used for security compliance. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TechnicalNotificationMails + +The email addresses that are used for technical notification emails. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivacyProfile + +Represents a company's privacy profile, which includes a privacy statement URL and a contact person for questions regarding the privacy statement. + +```yaml +Type: PrivacyProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +- For more details see [Update organization](https://learn.microsoft.com/graph/api/organization-update). + +## Related Links + +[Get-EntraBetaTenantDetail](Get-EntraBetaTenantDetail.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md new file mode 100644 index 0000000000..9e7e5f3043 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md @@ -0,0 +1,282 @@ +--- +title: Get-EntraBetaDirectoryRoleAssignment +description: This article provides details on the Get-EntraBetaDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraBetaDirectoryRoleAssignment + +## Synopsis + +Get a Microsoft Entra ID roleAssignment. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDirectoryRoleAssignment + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaDirectoryRoleAssignment + -UnifiedRoleAssignmentId + [-All] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaDirectoryRoleAssignment + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDirectoryRoleAssignment` cmdlet gets information about role assignments in Microsoft Entra ID. To get a role assignment, specify the `UnifiedRoleAssignmentId` parameter. Specify the `SearchString` or `Filter` parameter to find a particular role assignment. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: + +- microsoft.directory/roleAssignments/standard/read (least privileged) +- microsoft.directory/roleAssignments/allProperties/read +- microsoft.directory/roleAssignments/allProperties/allTasks + +The least privileged roles for this operation, from least to most privileged, are: + +- Directory Readers +- Global Reader +- Privileged Role Administrator + +## Examples + +### Example 1: Get role assignments + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleAssignment +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments in Microsoft Entra ID. + +### Example 2: Get role assignments using 'All' parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleAssignment -All +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets all the role assignments in Microsoft Entra ID. + +### Example 3: Get role assignments by Id + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleAssignment -UnifiedRoleAssignmentId '00001111-aaaa-2222-bbbb-3333cccc4444' +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments using specified roleAssignment Id. + +- `UnifiedRoleAssignmentId` parameter specifies the roleAssignment object ID. + +### Example 4: Get role assignments filter by principalId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleAssignment -Filter "principalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments containing the specified principalId. + +### Example 5: Get role assignments filter by roleDefinitionId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleAssignment -Filter "roleDefinitionId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +22223333-cccc-4444-dddd-5555eeee6666 cccccccc-dddd-eeee-3333-444444444444 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +33334444-dddd-5555-eeee-6666ffff7777 dddddddd-eeee-ffff-4444-555555555555 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +44445555-eeee-6666-ffff-7777aaaa8888 eeeeeeee-ffff-aaaa-5555-666666666666 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets the role assignments containing the specified roleDefinitionId. + +### Example 6: Get top two role assignments + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleAssignment -Top 2 +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +00001111-aaaa-2222-bbbb-3333cccc4444 aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-cccc-dddd-2222-333333333333 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command gets top two role assignments. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UnifiedRoleAssignmentId + +The unique identifier of a Microsoft Entra ID roleAssignment object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment + +## Notes + +`Get-EntraBetaRoleAssignment` is an alias for `Get-EntraBetaDirectoryRoleAssignment`. + +## Related Links + +[New-EntraBetaDirectoryRoleAssignment](New-EntraBetaDirectoryRoleAssignment.md) + +[Remove-EntraBetaDirectoryRoleAssignment](Remove-EntraBetaDirectoryRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md new file mode 100644 index 0000000000..c7542f8ba8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md @@ -0,0 +1,276 @@ +--- +title: Get-EntraBetaDirectoryRoleDefinition +description: This article provides details on the Get-EntraBetaDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Get-EntraBetaDirectoryRoleDefinition + +## Synopsis + +Gets information about role definitions in Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDirectoryRoleDefinition + [-All] + [-Top ] + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaDirectoryRoleDefinition + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaDirectoryRoleDefinition` cmdlet gets information about role definitions in Microsoft Entra ID. To get a role definition, specify the `UnifiedRoleDefinitionId` parameter. Specify the SearchString or Filter parameter to find particular role definition. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: + +- microsoft.directory/roleAssignments/standard/read (least privileged) +- microsoft.directory/roleAssignments/allProperties/read +- microsoft.directory/roleAssignments/allProperties/allTasks + +The least privileged roles for this operation, from least to most privileged, are: + +- Directory Readers +- Global Reader +- Privileged Role Administrator + +## Examples + +### Example 1: Get all role definitions + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleDefinition +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Guest User 11bb11bb-cc22-dd33-ee44-55ff55ff55ff 10dae51f-b6af-4016-8d66-8c2a99b929b3 Default role for guest users. Can read a limited set of directory information. +Restricted Guest User 33dd33dd-ee44-ff55-aa66-77bb77bb77bb 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory informati… +Guest Inviter 44ee44ee-ff55-aa66-bb77-88cc88cc88cc 95e79109-95c0-4d8e-aee3-d01accf2d47b Can invite guest users independent of the 'members can invite guests' setting. +``` + +This command returns all the role definitions present. + +### Example 2: Get a role definition by UnifiedRoleDefinitionId + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleDefinition -UnifiedRoleDefinitionId '1a327991-10cb-4266-877a-998fb4df78ec' +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command returns a specified role definition. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. + +### Example 3: Filter role definitions by display name + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleDefinition -Filter "startsWith(displayName, 'Restricted')" +``` + +```Output +DisplayName Id TemplateId Description +----------- -- ---------- ----------- +Restricted Guest User 2af84b1e-32c8-42b7-82bc-daa82404023b 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. +``` + +This command return all the role definitions containing the specified display name. + +### Example 4: Get top two role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleDefinition -Top 2 +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +Restricted Guest User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 2af84b1e-32c8-42b7-82bc-daa82404023b Restricted role for guest users. Can read a limited set of directory information. True True +``` + +This command return top two the role definitions in Microsoft Entra ID. + +### Example 5: Filter role definitions by display name + +```powershell +Connect-Entra -Scopes 'RoleManagement.Read.Directory','EntitlementManagement.Read.All' +Get-EntraBetaDirectoryRoleDefinition -SearchString 'Global' + ``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +Global Administrator 00aa00aa-bb11-cc22-dd33-44ee44ee44ee 62e90394-69f5-4237-9190-012177145e10 Can manage all aspects of Microsoft Entra ID and Microsoft services that use Microsoft Entra identit… +Global Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff f2ef992c-3afb-46b9-b7cf-a126ee74c451 Can read everything that a Global Administrator can, but not update anything. +``` + +This command return all the role definitions containing the specified display name. + +## Parameters + +### -UnifiedRoleDefinitionId + +Specifies the ID of the role definition. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records that this cmdlet gets. The default value is 100. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter string to match a set of role definitions. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition + +## Notes + +`Get-EntraBetaRoleDefinition` is an alias for `Get-EntraBetaDirectoryRoleDefinition`. + +## Related Links + +[New-EntraBetaDirectoryRoleDefinition](New-EntraBetaDirectoryRoleDefinition.md) + +[Remove-EntraBetaDirectoryRoleDefinition](Remove-EntraBetaDirectoryRoleDefinition.md) + +[Set-EntraBetaDirectoryRoleDefinition](Set-EntraBetaDirectoryRoleDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md new file mode 100644 index 0000000000..3e2683d024 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md @@ -0,0 +1,232 @@ +--- +title: Get-EntraBetaPrivilegedResource +description: This article provides details on Get-EntraBetaPrivilegedResource command. + + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedResource + +schema: 2.0.0 +--- + +# Get-EntraBetaPrivilegedResource + +## Synopsis + +Get Microsoft Entra ID privileged resource. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPrivilegedResource + -ProviderId + [-Top ] + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaPrivilegedResource + -ProviderId + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaPrivilegedResource` cmdlet get Microsoft Entra ID privileged resource. + +## Examples + +### Example 1: Get all resources + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +Get-EntraBetaPrivilegedResource -ProviderId 'aadRoles' +``` + +```Output +Id DisplayName ExternalId RegisteredDateTime RegisteredRoot Status Type +-- ----------- ---------- ------------------ -------------- ------ ---- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AdminUnitName /administrativeUnits/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Active administrativeUnits +``` + +This example demonstrates how to retrieve all resources for aadRoles provider. + +- `-ProviderId` Parameter specifies the ID of the specific provider. + +### Example 2: Get a specific privileged resource + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Get-EntraBetaPrivilegedResource @params +``` + +```Output +Id DisplayName ExternalId RegisteredDateTime RegisteredRoot Status Type +-- ----------- ---------- ------------------ -------------- ------ ---- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AdminUnitName /administrativeUnits/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Active administrativeUnits +``` + +This example retrieves a resource for aadRoles provider with ID `aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb`. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-Id` Parameter specifies the unique identifier of the specific resource. + +### Example 3: Get a specific privileged resource by filter + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + Filter = "DisplayName eq 'AdminUnitName'" +} +Get-EntraBetaPrivilegedResource @params +``` + +```Output +Id DisplayName ExternalId RegisteredDateTime RegisteredRoot Status Type +-- ----------- ---------- ------------------ -------------- ------ ---- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb AdminUnitName /administrativeUnits/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Active administrativeUnits +``` + +This example retrieves a resource for aadRoles provider Filter. + +- `-ProviderId` Parameter specifies the ID of the specific provider. + +### Example 4: Get top privileged resources + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.ReadWrite.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' +} +Get-EntraBetaPrivilegedResource @params -Top 1 +``` + +```Output +Id DisplayName ExternalId RegisteredDateTime RegisteredRoot Status Type +-- ----------- ---------- ------------------ -------------- ------ ---- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Test /administrativeUnits/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Active administrativeUnits +``` + +This example retrieves top resources for aadRoles provider. + +- `-ProviderId` Parameter specifies the ID of the specific provider. + +## Parameters + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of the specific resource. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProviderId + +The unique identifier of the specific provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The top result count. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md new file mode 100644 index 0000000000..bc7ee1e4ab --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md @@ -0,0 +1,106 @@ +--- +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRole + +schema: 2.0.0 +--- + +# Get-EntraBetaPrivilegedRole + +## Synopsis +{{ Fill in the Synopsis }} + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPrivilegedRole + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaPrivilegedRole + -Id + [-Property ] + [] +``` + +## Description +{{ Fill in the Description }} + +## Examples + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## Parameters + +### -Filter +{{ Fill Filter Description }} + +```yaml +Type: String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id +{{ Fill Id Description }} + +```yaml +Type: String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md new file mode 100644 index 0000000000..09e4cfb524 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md @@ -0,0 +1,263 @@ +--- +title: Get-EntraBetaPrivilegedRoleDefinition +description: This article provides details on Get-EntraBetaPrivilegedRoleDefinition command. + + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleDefinition + +schema: 2.0.0 +--- + +# Get-EntraBetaPrivilegedRoleDefinition + +## Synopsis + +Get role definitions. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPrivilegedRoleDefinition + -ResourceId + -ProviderId + [-Filter ] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaPrivilegedRoleDefinition + -ResourceId + -Id + -ProviderId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaPrivilegedRoleDefinition` cmdlet gets role definitions from Microsoft Entra ID. + +## Examples + +### Example 1: Get role definitions for a specific provider and resource + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + ResourceId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Get-EntraBetaPrivilegedRoleDefinition @params +``` + +```Output +Id DisplayName ExternalId ResourceId TemplateId +-- ----------- ---------- ---------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb custom proxy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22223333-cccc-4444-dddd-5555eeee6666 aaaaaaaa-0000-1111-2222… +bbbbbbbb-1111-2222-3333-cccccccccccc Authentication Policy Administrator bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-1111-2222-3333… +cccccccc-2222-3333-4444-dddddddddddd Search Administrator cccccccc-2222-3333-4444-dddddddddddd 00001111-aaaa-2222-bbbb-3333cccc4444 cccccccc-2222-3333-4444… +``` + +This example retrieves role definitions for a specific provider and resource. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-ResourceId` Parameter specifies the ID of the specific resource. + +### Example 2: Get a role definition for a specific provider + +```Powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + ResourceId = '11112222-bbbb-3333-cccc-4444dddd5555' + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} +Get-EntraBetaPrivilegedRoleDefinition @params +``` + +```Output +Id DisplayName ExternalId ResourceId TemplateId +-- ----------- ---------- ---------- ---------- +bbbbbbbb-1111-2222-3333-cccccccccccc Authentication Policy Administrator bbbbbbbb-1111-2222-3333-cccccccccccc 11112222-bbbb-3333-cccc-4444dddd5555 bbbbbbbb-1111-2222-3333… +``` + +This example retrieves a role definition for a specific provider, resource, and ID. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-ResourceId` Parameter specifies the ID of the specific resource. +- `-Id` Parameter specifies the ID of a role definition. + +### Example 3: Get a specific role definition by filter + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + ResourceId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Filter = "DisplayName eq 'custom proxy'" +} +Get-EntraBetaPrivilegedRoleDefinition @params +``` + +```Output +Id DisplayName ExternalId ResourceId TemplateId +-- ----------- ---------- ---------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb custom proxy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22223333-cccc-4444-dddd-5555eeee6666 aaaaaaaa-0000-1111-2222… +``` + +This example retrieves a specific role definition by Filter. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-ResourceId` Parameter specifies the ID of the specific resource. + +### Example 4: Get top role definition + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + ResourceId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Get-EntraBetaPrivilegedRoleDefinition @params -Top 1 +``` + +```Output +Id DisplayName ExternalId ResourceId TemplateId +-- ----------- ---------- ---------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb custom proxy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22223333-cccc-4444-dddd-5555eeee6666 aaaaaaaa-0000-1111-2222… +``` + +This example retrieves a top one role definition. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-ResourceId` Parameter specifies the ID of the specific resource. + +## Parameters + +### -Id + +The ID of a role definition. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProviderId + +The unique identifier of the specific provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ResourceId + +The unique identifier of the specific resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The top result count. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md new file mode 100644 index 0000000000..4d2cf8a3ea --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md @@ -0,0 +1,243 @@ +--- +title: Get-EntraBetaPrivilegedRoleSetting +description: This article provides details on Get-EntraBetaPrivilegedRoleSetting command. + + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleSetting + +schema: 2.0.0 +--- + +# Get-EntraBetaPrivilegedRoleSetting + +## Synopsis + +Get role settings. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPrivilegedRoleSetting + -ProviderId + [-Top ] + [-Filter ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaPrivilegedRoleSetting + -Id + -ProviderId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaPrivilegedRoleSetting` cmdlet gets role settings from Microsoft Entra ID. + +## Examples + +### Example 1: Get role settings for a specific provider and resource + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + Filter = "ResourceId eq 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'" +} +Get-EntraBetaPrivilegedRoleSetting @params +``` + +```Output +Id IsDefault LastUpdatedBy LastUpdatedDateTime ResourceId RoleDefinitionId +-- --------- ------------- ------------------- ---------- ---------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False MG_graph_auth 06/08/2024 05:12:08 22223333-cccc-4444-dddd-5555eeee6666 44445555-eeee-6666-ffff-7777aaaa8888 +bbbbbbbb-1111-2222-3333-cccccccccccc False MG_graph_auth 26/07/2024 12:28:15 11112222-bbbb-3333-cccc-4444dddd5555 55556666-ffff-7777-aaaa-8888bbbb9999 +``` + +This example retrieves role settings for a specific provider and resource. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- In, `-Filter` parameter `ResourceId` specifies the ID of the specific resource. + +### Example 2: Get a role setting for a specific provider and Id + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Get-EntraBetaPrivilegedRoleSetting @params +``` + +```Output +Id IsDefault LastUpdatedBy LastUpdatedDateTime ResourceId RoleDefinitionId +-- --------- ------------- ------------------- ---------- ---------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False MG_graph_auth 06/08/2024 05:12:08 22223333-cccc-4444-dddd-5555eeee6666 44445555-eeee-6666-ffff-7777aaaa8888 +``` + +This example retrieves role settings for a specific provider and Id. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-Id` Parameter specifies the ID of the specific role setting. + +### Example 3: Get role settings for a specific provider and resource + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + Filter = "ResourceId eq 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'" +} +Get-EntraBetaPrivilegedRoleSetting @params -Top 1 +``` + +```Output +Id IsDefault LastUpdatedBy LastUpdatedDateTime ResourceId RoleDefinitionId +-- --------- ------------- ------------------- ---------- ---------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False MG_graph_auth 06/08/2024 05:12:08 22223333-cccc-4444-dddd-5555eeee6666 44445555-eeee-6666-ffff-7777aaaa8888 +``` + +This example retrieves a top one specific role setting. + +- `-ProviderId` Parameter specifies the ID of the specific provider. + +### Example 4: Get role settings with Filter query + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.Read.AzureAD', 'PrivilegedAccess.Read.AzureResources' 'PrivilegedAccess.Read.AzureADGroup' +$params = @{ + ProviderId = 'aadRoles' + Filter = "ResourceId eq 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' and LastUpdatedBy eq 'MOD Administrator'" +} +Get-EntraBetaPrivilegedRoleSetting @params +``` + +```Output +Id IsDefault LastUpdatedBy LastUpdatedDateTime ResourceId RoleDefinitionId +-- --------- ------------- ------------------- ---------- ---------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False MG_graph_auth 06/08/2024 05:12:08 22223333-cccc-4444-dddd-5555eeee6666 44445555-eeee-6666-ffff-7777aaaa8888 +``` + +This example retrieves role settings for a specific provider and resource. + +- `-ProviderId` Parameter specifies the ID of the specific provider. + +## Parameters + +### -Id + +The unique identifier of the specific role setting. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProviderId + +The unique identifier of the specific provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The top result count. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +### System. Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaPrivilegedRoleSetting](Set-EntraBetaPrivilegedRoleSetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md new file mode 100644 index 0000000000..c0285dab6c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md @@ -0,0 +1,136 @@ +--- +title: New-EntraBetaDirectoryRoleAssignment +description: This article provides details on the New-EntraBetaDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 07/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraBetaDirectoryRoleAssignment + +## Synopsis + +Create a new Microsoft Entra ID roleAssignment. + +## Syntax + +```powershell +New-EntraBetaDirectoryRoleAssignment + -RoleDefinitionId + -DirectoryScopeId + -PrincipalId + [] +``` + +## Description + +The `New-EntraBetaDirectoryRoleAssignment` cmdlet creates a new Microsoft Entra role assignment. + +## Examples + +### Example 1: Create a new Microsoft Entra ID role assignment + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' +$params = @{ + RoleDefinitionId = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + PrincipalId = 'aaaaaaaa-bbbb-cccc-1111-222222222222' + DirectoryScopeId = '/' + } + +New-EntraBetaDirectoryRoleAssignment @params +``` + +```Output +Id PrincipalId RoleDefinitionId DirectoryScopeId AppScopeId +-- ----------- ---------------- ---------------- ---------- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u aaaaaaaa-bbbb-cccc-1111-222222222222 a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 / +``` + +This command creates a new role assignment in Microsoft Entra ID. + +- `-RoleDefinitionId` parameter specifies the ID of the role definition that you want to assign. Role definitions describe the permissions that are granted to users or groups by the role. This is the Identifier of the `unifiedRoleDefinition` the assignment is for. + +- `-PrincipalId` parameter specifies the ID of the principal (user, group, or service principal) to whom the role is being assigned. + +- `-DirectoryScopeId` parameter specifies the scope of the directory over which the role assignment is effective. The '/' value typically represents the root scope, meaning the role assignment is applicable across the entire directory. + +## Parameters + +### -DirectoryScopeId + +Specifies the scope for the role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies the principal for role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleDefinitionId + +Specifies the role definition for role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleAssignment + +## Notes + +`New-EntraBetaRoleAssignment` is an alias for `New-EntraBetaDirectoryRoleAssignment`. + +## Related Links + +[Get-EntraBetaDirectoryRoleAssignment](Get-EntraBetaDirectoryRoleAssignment.md) + +[Remove-EntraBetaDirectoryRoleAssignment](Remove-EntraBetaDirectoryRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md b/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md new file mode 100644 index 0000000000..b344455318 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md @@ -0,0 +1,347 @@ +--- +title: New-EntraBetaDirectoryRoleDefinition +description: This article provides details on the New-EntraBetaDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# New-EntraBetaDirectoryRoleDefinition + +## Synopsis + +Create a new Microsoft Entra ID roleDefinition. + +## Syntax + +```powershell +New-EntraBetaDirectoryRoleDefinition + -IsEnabled + -DisplayName + -RolePermissions + [-Description ] + [-InheritsPermissionsFrom ] + [-Version ] + [-ResourceScopes ] + [-TemplateId ] + [] +``` + +## Description + +Create a new Microsoft Entra ID roleDefinition object. + +## Examples + +### Example 1: Creates a new role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' +} + +New-EntraBetaDirectoryRoleDefinition @params +``` + +```Output + +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 93ff7659-04bd-4d97-8add-b6c992cce98e False False + +``` + +This command creates a new role definition in Microsoft Entra ID. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. + +### Example 2: Creates a new role definition with Description parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + Description = 'Role Definition demo' +} + +New-EntraBetaDirectoryRoleDefinition @params +``` + +```Output + +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 e14cb8e2-d696-4756-bd7f-c7df25271f3d Role Definition demo False False + +``` + +This command creates a new role definition with Description parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Description` parameter specifies the description for the role definition. + +### Example 3: Creates a new role definition with ResourceScopes parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + ResourceScopes = '/' +} + +New-EntraBetaDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 2bc29892-ca2e-457e-b7c0-03257a0bcd0c False False + +``` + +This command creates a new role definition with ResourceScopes parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-ResourceScopes` parameter specifies the resource scopes for the role definition. + +### Example 4: Creates a new role definition with TemplateId parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + TemplateId = '4dd5aa9c-cf4d-4895-a993-740d342802b9' +} + +New-EntraBetaDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 4dd5aa9c-cf4d-4895-a993-740d342802b9 False False + +``` + +This command creates a new role definition with TemplateId parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-TemplateId` parameter specifies the template ID for the role definition. + +### Example 5: Creates a new role definition with Version parameter + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") +$params = @{ + RolePermissions = $RolePermissions + IsEnabled = $false + DisplayName = 'MyRoleDefinition' + Version = '2' +} + +New-EntraBetaDirectoryRoleDefinition @params +``` + +```Output +DisplayName Id TemplateId Description IsBuiltIn IsEnabled +----------- -- ---------- ----------- --------- --------- +MyRoleDefinition a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 b69d16e9-b3f9-4289-a87f-8f796bd9fa28 False False + +``` + +This command creates a new role definition with Version parameter. + +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Version` parameter specifies the version for the role definition. + +## Parameters + +### -Description + +Specifies a description for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InheritsPermissionsFrom + +Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles support this attribute. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role isn't available for assignment. Read-only when `isBuiltIn` is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceScopes + +Specifies the resource scopes for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolePermissions + +Specifies permissions for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateId + +Specifies the template ID for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version + +Specifies version for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition + +## Notes + +`New-EntraBetaRoleDefinition` is an alias for `New-EntraBetaDirectoryRoleDefinition`. + +## Related Links + +[Get-EntraBetaDirectoryRoleDefinition](Get-EntraBetaDirectoryRoleDefinition.md) + +[Remove-EntraBetaDirectoryRoleDefinition](Remove-EntraBetaDirectoryRoleDefinition.md) + +[Set-EntraBetaDirectoryRoleDefinition](Set-EntraBetaDirectoryRoleDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md new file mode 100644 index 0000000000..cff73b12f8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md @@ -0,0 +1,136 @@ +--- +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraBetaPrivilegedRoleAssignment + +## Synopsis +{{ Fill in the Synopsis }} + +## Syntax + +``` +New-EntraBetaPrivilegedRoleAssignment [-IsElevated ] [-Id ] [-ResultMessage ] + [-ExpirationDateTime ] -RoleId -UserId [] +``` + +## Description +{{ Fill in the Description }} + +## Examples + +### Example 1 +``` +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## Parameters + +### -ExpirationDateTime +{{ Fill ExpirationDateTime Description }} + +```yaml +Type: DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id +{{ Fill Id Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsElevated +{{ Fill IsElevated Description }} + +```yaml +Type: Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResultMessage +{{ Fill ResultMessage Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleId +{{ Fill RoleId Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId +{{ Fill UserId Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None +## Outputs + +### System.Object +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md new file mode 100644 index 0000000000..837399cee9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraBetaDirectoryRoleAssignment +description: This article provides details on the Remove-EntraBetaDirectoryRoleAssignment command. + + +ms.topic: reference +ms.date: 07/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraBetaDirectoryRoleAssignment + +## Synopsis + +Delete a Microsoft Entra ID roleAssignment. + +## Syntax + +```powershell +Remove-EntraBetaDirectoryRoleAssignment + -UnifiedRoleAssignmentId + [] +``` + +## Description + +The `Remove-EntraBetaDirectoryRoleAssignment` cmdlet removes a role assignment from Microsoft Entra ID. + +## Examples + +### Example 1: Remove a role assignment + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory','EntitlementManagement.ReadWrite.All' +Remove-EntraBetaDirectoryRoleAssignment -UnifiedRoleAssignmentId 'Y1vFBcN4i0e3ngdNDocmngJAWGnAbFVAnJQyBBLv1lM-1' +``` + +This example removes the specified role assignment from Microsoft Entra ID. + +- `-UnifiedRoleAssignmentId` parameter specifies the role assignment ID. + +## Parameters + +### -UnifiedRoleAssignmentId + +The unique identifier of an object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Remove-EntraBetaRoleAssignment` is an alias for `Remove-EntraBetaDirectoryRoleAssignment`. + +## Related Links + +[New-EntraBetaDirectoryRoleAssignment](New-EntraBetaDirectoryRoleAssignment.md) + +[Get-EntraBetaDirectoryRoleAssignment](Get-EntraBetaDirectoryRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md b/moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md new file mode 100644 index 0000000000..dd80d087e7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraBetaDirectoryRoleDefinition +description: This article provides details on the Remove-EntraBetaDirectoryRoleDefinition command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Remove-EntraBetaDirectoryRoleDefinition + +## Synopsis + +Delete a Microsoft Entra ID Directory roleDefinition object. + +## Syntax + +```powershell +Remove-EntraBetaDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [] +``` + +## Description + +Delete a Microsoft Entra ID Directory roleDefinition object by ID. + +You can't delete built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. + +## Examples + +### Example 1: Remove a specified role definition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +Remove-EntraBetaDirectoryRoleDefinition -UnifiedRoleDefinitionId 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +``` + +This example demonstrates how to remove the specified role definition from Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. + +## Parameters + +### -UnifiedRoleDefinitionId + +The unique identifier of an object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Remove-EntraBetaRoleDefinition` is an alias for `Remove-EntraBetaDirectoryRoleDefinition`. + +## Related Links + +[New-EntraBetaDirectoryRoleDefinition](New-EntraBetaDirectoryRoleDefinition.md) + +[Set-EntraBetaDirectoryRoleDefinition](Set-EntraBetaDirectoryRoleDefinition.md) + +[Get-EntraBetaDirectoryRoleDefinition](Get-EntraBetaDirectoryRoleDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md b/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md new file mode 100644 index 0000000000..46e1974f67 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md @@ -0,0 +1,298 @@ +--- +title: Set-EntraBetaDirectoryRoleDefinition +description: This article provides details on the Set-EntraBetaDirectoryRoleDefinition command. + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectoryRoleDefinition + +schema: 2.0.0 +--- + +# Set-EntraBetaDirectoryRoleDefinition + +## Synopsis + +Update an existing Microsoft Entra ID roleDefinition. + +## Syntax + +```powershell +Set-EntraBetaDirectoryRoleDefinition + -UnifiedRoleDefinitionId + [-IsEnabled ] + [-InheritsPermissionsFrom ] + [-Version ] + [-ResourceScopes ] + [-Description ] + [-RolePermissions ] + [-TemplateId ] + [-DisplayName ] + [] +``` + +## Description + +Updates a Microsoft Entra roleDefinition object identified by ID. You can't update built-in roles. This feature requires a Microsoft Entra ID P1 or P2 license. + +## Examples + +### Example 1: Update an roleDefinition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraBetaDirectoryRoleDefinition -Filter "DisplayName eq ''" +$params = @{ + UnifiedRoleDefinitionId = $roleDefinition.Id + DisplayName = 'UpdatedDisplayName' +} +Set-EntraBetaDirectoryRoleDefinition @params +``` + +This example updates the specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-DisplayName` parameter specifies the display name for the role definition. + +### Example 2: Update an roleDefinition with Description + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraBetaDirectoryRoleDefinition -Filter "DisplayName eq ''" +$params = @{ + UnifiedRoleDefinitionId = $roleDefinition.Id + Description = 'MYROLEUPDATE1S' +} +Set-EntraBetaDirectoryRoleDefinition @params +``` + +This example updates the Description of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-Description` parameter specifies the description for the role definition. + +### Example 3: Update an roleDefinition with IsEnabled + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraBetaDirectoryRoleDefinition -Filter "DisplayName eq ''" +$params = @{ + UnifiedRoleDefinitionId = $roleDefinition.Id + IsEnabled = $true +} +Set-EntraBetaDirectoryRoleDefinition @params +``` + +This example updates the IsEnabled of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-IsEnabled` parameter specifies whether the role definition is enabled. + +### Example 4: Update an roleDefinition + +```powershell +Connect-Entra -Scopes 'RoleManagement.ReadWrite.Directory' +$roleDefinition = Get-EntraBetaDirectoryRoleDefinition -Filter "DisplayName eq ''" +$RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission +$RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/standard/read") +$params = @{ + UnifiedRoleDefinitionId = $roleDefinition.Id + Description = 'Update' + DisplayName = 'Update' + ResourceScopes = '/' + IsEnabled = $false + RolePermissions = $RolePermissions + TemplateId = '54d418b2-4cc0-47ee-9b39-e8f84ed8e073' + Version = 2 +} + +Set-EntraBetaDirectoryRoleDefinition @params +``` + +This example updates the RolePermissions, TemplateId, TemplateId, ResourceScopes of specified role definition in Microsoft Entra ID. + +- `-UnifiedRoleDefinitionId` parameter specifies the roleDefinition object ID. +- `-RolePermissions` parameter specifies the permissions for the role definition. +- `-IsEnabled` parameter specifies whether the role definition is enabled. +- `-DisplayName` parameter specifies the display name for the role definition. +- `-Description` parameter specifies the description for the role definition. +- `-ResourceScopes` parameter specifies the resource scopes for the role definition. +- `-TemplateId` parameter specifies the template ID for the role definition. +- `-Version` parameter specifies the version for the role definition. + +## Parameters + +### -Description + +Specifies a description for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UnifiedRoleDefinitionId + +Specifies the roleDefinition object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -InheritsPermissionsFrom + +Read-only collection of role definitions that the given role definition inherits from. Only Microsoft Entra built-in roles support this attribute. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies whether the role definition is enabled. Flag indicating if the role is enabled for assignment. If false, the role is not available for assignment. Read-only when `isBuiltIn` is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceScopes + +Specifies the resource scopes for the role definition. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolePermissions + +Specifies permissions for the role definition. List of permissions included in the role. Read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateId + +Specifies the template ID for the role definition. A custom template ID can be set when `isBuiltIn` is `false`. This ID is typically used to keep the same identifier across different directories. It is read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Version + +Specifies version for the role definition. Indicates version of the role definition. Read-only when `isBuiltIn` is `true`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +`Set-EntraBetaRoleAssignment` is an alias for `Set-EntraBetaDirectoryRoleAssignment`. + +## Related Links + +[New-EntraBetaDirectoryRoleDefinition](New-EntraBetaDirectoryRoleDefinition.md) + +[Remove-EntraBetaDirectoryRoleDefinition](Remove-EntraBetaDirectoryRoleDefinition.md) + +[Get-EntraBetaDirectoryRoleDefinition](Get-EntraBetaDirectoryRoleDefinition.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md b/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md new file mode 100644 index 0000000000..c3935e9a12 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md @@ -0,0 +1,139 @@ +--- +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest + +schema: 2.0.0 +--- + +# Set-EntraBetaPrivilegedRoleAssignmentRequest + +## Synopsis +Update a role assignment request + +## Syntax + +``` +Set-EntraBetaPrivilegedRoleAssignmentRequest -Id [-Schedule ] + [-AssignmentState ] [-Decision ] [-Reason ] -ProviderId [] +``` + +## Description +Update a role assignment request + +## Examples + +### Example 1 +``` +PS C:\> Set-EntraBetaPrivilegedRoleAssignmentRequest -ProviderId AzureResources -Id 8d28fcb3-1373-4810-8e84-75adea9a18be -Reason "{'RequestorReason':'test','AdminReason':'gg'}" -Decision "AdminDenied" +``` + +Update a role assignment request by setting to denied + +## Parameters + +### -AssignmentState +The state of assignment, and the values can be Eligible or Active. +For decision of AdminApproved, it is required. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Decision +The administrator decision of the role assignment request. +The value should be updated as AdminApproved or AdminDenied. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id +The unique identifier of the specific role assignment request + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProviderId +The unique identifier of the specific provider + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Reason +The reason provided by the administrator for his decision. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Schedule +The schedule of the role assignment request. +For status of AdminApproved, it is required. + +```yaml +Type: AzureADMSPrivilegedSchedule +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String +## Outputs + +### System.Object +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md b/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md new file mode 100644 index 0000000000..016902c994 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md @@ -0,0 +1,314 @@ +--- +title: Set-EntraBetaPrivilegedRoleSetting +description: This article provides details on Set-EntraBetaPrivilegedRoleSetting command. + + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleSetting + +schema: 2.0.0 +--- + +# Set-EntraBetaPrivilegedRoleSetting + +## Synopsis + +Update role setting. + +## Syntax + +```powershell +Set-EntraBetaPrivilegedRoleSetting + [-ResourceId ] + [-UserEligibleSettings ] + -Id + [-AdminEligibleSettings ] + [-RoleDefinitionId ] + [-AdminMemberSettings ] + [-UserMemberSettings ] + -ProviderId [] +``` + +## Description + +The `Set-EntraBetaPrivilegedRoleSetting` cmdlet update role setting. + +## Examples + +### Example 1: Update a UserMember Settings by setting the justification to be false + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.ReadWrite.AzureAD', 'PrivilegedAccess.ReadWrite.AzureResources', 'PrivilegedAccess.ReadWrite.AzureADGroup' + +$setting1 = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting +$setting1.RuleIdentifier = "JustificationRule" +$setting1.Setting = "{`"required`":false}" +$params = @{ + ProviderId = 'aadRoles' + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + UserMemberSettings = $setting1 +} +Set-EntraBetaPrivilegedRoleSetting @params +``` + +This command update a role setting by setting the justification to be false. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-Id` Parameter specifies the ID of the specific role setting. +- `-UserMemberSettings` Parameter rule settings that are evaluated when a user tries to activate his role assignment. + +### Example 2: Update a AdminEligible Settings by setting the MfaRule to be true + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.ReadWrite.AzureAD', 'PrivilegedAccess.ReadWrite.AzureResources', 'PrivilegedAccess.ReadWrite.AzureADGroup' + +$setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting +$setting.RuleIdentifier = "MfaRule" +$setting.Setting = "{`"mfaRequired`": true}" +$params = @{ + ProviderId = 'aadRoles' + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + AdminEligibleSettings = $setting +} +Set-EntraBetaPrivilegedRoleSetting @params +``` + +This command update a AdminEligible Settings by setting the MfaRule to be true. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-Id` Parameter specifies the ID of the specific role setting. +- `-AdminEligibleSettings` Parameter rule settings that are evaluated when an administrator tries to add an eligible role assignment. + +### Example 3: Update a UserEligibleSettings Settings + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.ReadWrite.AzureAD', 'PrivilegedAccess.ReadWrite.AzureResources', 'PrivilegedAccess.ReadWrite.AzureADGroup' + +$setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting +$setting.RuleIdentifier = "AttributeConditionRule" +$setting.Setting = "{ + `"condition`": null, + `"conditionVersion`": null, + `"conditionDescription`": null, + `"enableEnforcement`": true + }" +$params = @{ + ProviderId = 'aadRoles' + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + UserEligibleSettings = $setting +} +Set-EntraBetaPrivilegedRoleSetting @params +``` + +This command update a UserEligible Settings. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-Id` Parameter specifies the ID of the specific role setting. +- `-UserEligibleSettings` Parameter rule settings that are evaluated when a user tries to add an eligible role assignment. + +### Example 4: Update a AdminMemberSettings Settings + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.ReadWrite.AzureAD', 'PrivilegedAccess.ReadWrite.AzureResources', 'PrivilegedAccess.ReadWrite.AzureADGroup' + +$setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting +$setting.RuleIdentifier = "JustificationRule" +$setting.Setting = "{`"required`":true}" +$temp = New-Object System.Collections.Generic.List[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting] +$temp.Add($setting) +$params = @{ + ProviderId = 'aadRoles' + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + AdminMemberSettings = $temp +} +Set-EntraBetaPrivilegedRoleSetting @params +``` + +This command update a AdminMember Settings. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-Id` Parameter specifies the ID of the specific role setting. +- `-AdminMemberSettings` Parameter rule settings that are evaluated when an administrator tries to add an activate role assignment. + +### Example 5: Update a AdminEligible Settings + +```powershell +Connect-Entra -Scopes 'PrivilegedAccess.ReadWrite.AzureAD', 'PrivilegedAccess.ReadWrite.AzureResources', 'PrivilegedAccess.ReadWrite.AzureADGroup' + +$setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting +$setting.RuleIdentifier = "MfaRule" +$setting.Setting = "{`"mfaRequired`": true}" +$params = @{ + ProviderId = 'aadRoles' + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + RoleDefinitionId = 'aaaabbbb-0000-cccc-1111-dddd2222eeee' + ResourceId = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + AdminEligibleSettings = $setting +} +Set-EntraBetaPrivilegedRoleSetting @params +``` + +This command update a AdminEligible Settings. + +- `-ProviderId` Parameter specifies the ID of the specific provider. +- `-Id` Parameter specifies the ID of the specific role setting. +- `-AdminEligibleSettings` Parameter rule settings that are evaluated when an administrator tries to add an eligible role assignment. +- `-ResourceId` Parameter specifies the ID of the specific resource. +- `-RoleDefinitionId` Parameter specifies the ID of the specific role definition + +## Parameters + +### -AdminEligibleSettings + +The rule settings that are evaluated when an administrator tries to add an eligible role assignment. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AdminMemberSettings + +The rule settings that are evaluated when an administrator tries to add an activate role assignment. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of the specific role setting. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ProviderId + +The unique identifier of the specific provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ResourceId + +The unique identifier of the specific resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleDefinitionId + +The unique identifier of the specific role definition. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserEligibleSettings + +The rule settings that are evaluated when a user tries to add an eligible role assignment. +This isn't supported for pimforazurerbac scenario for now, and may be available in the future scenarios. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserMemberSettings + +The rule settings that are evaluated when a user tries to activate their role assignment. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaPrivilegedRoleSetting](Get-EntraBetaPrivilegedRoleSetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md b/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md new file mode 100644 index 0000000000..8655442be0 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md @@ -0,0 +1,105 @@ +--- +title: Add-EntraBetaGroupMember +description: This article provides details on the Add-EntraBetaGroupMember command. + +ms.topic: reference +ms.date: 06/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupMember + +schema: 2.0.0 +--- + +# Add-EntraBetaGroupMember + +## Synopsis + +Add a member to a group. + +## Syntax + +```powershell +Add-EntraBetaGroupMember + -GroupId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaGroupMember` cmdlet adds a member to a group. Specify the `GroupId` and `RefObjectId` parameters to add a member to a group. + +`-GroupId` - specifies the unique identifier (Object ID) of the group to which you want to add a member. + +`-RefObjectId` - specifies the unique identifier (Object ID) of the member to be added to the group. + +## Examples + +### Example 1: Add a member to a group + +```powershell +Connect-Entra -Scopes 'GroupMember.ReadWrite.All' +$params = @{ + GroupId = 'dddddddd-2222-3333-5555-rrrrrrrrrrrr' + RefObjectId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' +} + +Add-EntraBetaGroupMember @params +``` + +This example demonstrates how to add a member to a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object that is assigned as an owner, manager, or member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaGroupMember](Get-EntraBetaGroupMember.md) + +[Remove-EntraBetaGroupMember](Remove-EntraBetaGroupMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md b/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md new file mode 100644 index 0000000000..ac5dd56bc5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md @@ -0,0 +1,108 @@ +--- +title: Add-EntraBetaGroupOwner +description: This article provides details on the Add-EntraBetaGroupOwner command. + + +ms.topic: reference +ms.date: 06/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupOwner + +schema: 2.0.0 +--- + +# Add-EntraBetaGroupOwner + +## Synopsis + +Adds an owner to a group. + +## Syntax + +```powershell +Add-EntraBetaGroupOwner + -GroupId + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaGroupOwner` cmdlet adds an owner to a Microsoft Entra ID group. Specify the `GroupId` and `RefObjectId` parameters to add an owner to a group. + +`-GroupId` - specifies the unique identifier (Object ID) of the group to which you want to add an owner. + +`-RefObjectId` - specifies the unique identifier (Object ID) of the owner to be added to the group (user or service principal). + +## Examples + +### Example 1: Add an owner to a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$user = Get-EntraBetaUser -UserId 'SawyerM@contoso.com' +$params = @{ + GroupId = $group.ObjectId + RefObjectId = $user.ObjectId +} + +Add-EntraBetaGroupOwner @params +``` + +This example demonstrates how to add an owner to a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object that will be assigned as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaGroupOwner](Get-EntraBetaGroupOwner.md) + +[Remove-EntraBetaGroupOwner](Remove-EntraBetaGroupOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md new file mode 100644 index 0000000000..9719953274 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md @@ -0,0 +1,111 @@ +--- +title: Add-EntraLifecyclePolicyGroup +description: This article provides details on the Add-EntraLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Add-EntraBetaLifecyclePolicyGroup + +## Synopsis + +Adds a group to a lifecycle policy. + +## Syntax + +```powershell +Add-EntraBetaLifecyclePolicyGroup + -GroupLifecyclePolicyId + -GroupId + [] +``` + +## Description + +The `Add-EntraBetaLifecyclePolicyGroup` cmdlet adds a group to a lifecycle policy in Microsoft Entra ID. + +## Examples + +### Example 1 + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'Office365 group'" +$policy = Get-EntraBetaGroupLifecyclePolicy | Select-Object -First 1 +$params = @{ + GroupLifecyclePolicyId = $policy.Id + groupId = $group.ObjectId +} +Add-EntraBetaLifecyclePolicyGroup @params +``` + +This example adds a group to the lifecycle policy. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy add to the group. +- `-GroupId` parameter specifies the ID of the group add to the Lifecycle Policy. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of the lifecycle policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaLifecyclePolicyGroup](Get-EntraBetaLifecyclePolicyGroup.md) + +[Remove-EntraBetaLifecyclePolicyGroup](Remove-EntraBetaLifecyclePolicyGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md new file mode 100644 index 0000000000..a3f211b9be --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md @@ -0,0 +1,283 @@ +--- +title: Get-EntraBetaDeletedGroup +description: This article provides details on the Get-EntraBetaDeletedGroup. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedGroup + +schema: 2.0.0 +--- + +# Get-EntraBetaDeletedGroup + +## Synopsis + +This cmdlet is used to retrieve the soft deleted groups in a Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaDeletedGroup + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaDeletedGroup + -GroupId + [-All] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaDeletedGroup + [-All] + [-SearchString ] + [-Property ] + [] +``` + +## Description + +This cmdlet retrieves soft-deleted groups from a directory. When a group is deleted, it is soft deleted and can be recovered within 30 days. After 30 days, the group is permanently deleted and cannot be recovered. + +Please note that soft delete currently applies only to Unified Groups (also known as Office 365 Groups). + +## Examples + +### Example 1: Get deleted groups in the directory + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraBetaDeletedGroup +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves all recoverable deleted groups in the Microsoft Entra ID. + +### Example 2: Get deleted groups in the directory using All parameter + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraBetaDeletedGroup -All +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves all recoverable deleted groups in the directory, using All parameter. + +### Example 3: Get top two deleted groups + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraBetaDeletedGroup -Top 2 +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +``` + +This cmdlet retrieves top two deleted groups in the directory. + +### Example 4: Get deleted groups containing string 'test2' + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraBetaDeletedGroup -SearchString 'test2' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +test22 bbbbbbbb-1111-2222-3333-cccccccccccc test22 desc2 {Unified, DynamicMembership} +test23 cccccccc-2222-3333-4444-dddddddddddd test23 desc3 {Unified, DynamicMembership} +test24 dddddddd-3333-4444-5555-eeeeeeeeeeee test24 desc4 {Unified, DynamicMembership} +``` + +This cmdlet retrieves deleted groups in the directory, containing the specified string. + +### Example 5: Get deleted groups filter by display name + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraBetaDeletedGroup -Filter "displayName eq 'test21'" +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +``` + +This cmdlet retrieves deleted groups in the directory, having the specified display name. + +### Example 6: Get deleted group by GroupId + +```powershell +Connect-Entra -Scopes 'Group.Read.All' +Get-EntraBetaDeletedGroup -GroupId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +test21 aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb test21 desc1 {Unified, DynamicMembership} +``` + +This cmdlet retrieves the deleted group specified by GroupId. + +- `-GroupId` parameter specifies the deleted group ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +The GroupId of the deleted group to be retrieved. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md new file mode 100644 index 0000000000..5e8b59d8b3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md @@ -0,0 +1,308 @@ +--- +title: Get-EntraBetaGroup +description: This article provides details on the Get-EntraBetaGroup command. + +ms.topic: reference +ms.date: 06/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroup + +schema: 2.0.0 +--- + +# Get-EntraBetaGroup + +## Synopsis + +Gets a group. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaGroup + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraBetaGroup + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaGroup + -GroupId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaGroup` cmdlet gets a group in Microsoft Entra ID. Specify the `GroupId` parameter to get a specific group. + +## Examples + +### Example 1: Get all groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroup +``` + +```Output +DisplayName Id MailNickname Description +----------- -- ------------ ----------- +SimpleTestGrp aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NickName +SimpleGroup bbbbbbbb-1111-2222-3333-cccccccccccc NickName +testGroupInAU10 cccccccc-2222-3333-4444-dddddddddddd testGroupInAU10 testGroupInAU10 +My new group dddddddd-3333-4444-5555-eeeeeeeeeeee NotSet New created group +SimpleGroup eeeeeeee-4444-5555-6666-ffffffffffff NickName +``` + +This example demonstrates how to get all groups from Microsoft Entra ID. + +### Example 2: Get a specific group by using an GroupId + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroup -GroupId 'eeeeeeee-4444-5555-6666-ffffffffffff' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +SimpleTestGrp eeeeeeee-4444-5555-6666-ffffffffffff NickName {} +``` + +This example demonstrates how to retrieve specific group by providing ID. + +### Example 3: Get top five groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroup -Top 5 +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +SimpleTestGrp aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb NickName {} +SimpleGroup bbbbbbbb-1111-2222-3333-cccccccccccc NickName {} +testGroupInAU10 cccccccc-2222-3333-4444-dddddddddddd testGroupInAU10 testGroupInAU10 {DynamicMembership, Unified} +My new group dddddddd-3333-4444-5555-eeeeeeeeeeee NotSet New created group {} +SimpleGroup eeeeeeee-4444-5555-6666-ffffffffffff NickName {} +``` + +This example demonstrates how to get top five groups. + +### Example 4: Get a group by DisplayName + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroup -Filter "DisplayName eq 'Parents of Contoso'" +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +Parents of Contoso aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb parentsofcontoso Parents of Contoso {Unified} +``` + +In this example, we retrieve group using the Display Name. + +### Example 5: Get groups that contain a search string + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroup -SearchString 'New' +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +New Employee Onboarding aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb newemployeeonboarding New Employee Onboarding {Unified} +new1 bbbbbbbb-7777-8888-9999-cccccccccccc new1 new1 {DynamicM... +``` + +This example demonstrates how to retrieve groups that include the text new in their display names from Microsoft Entra ID. + +### Example 6: Listing ownerless groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$allGroups = Get-EntraBetaGroup -All +$groupsWithoutOwners = foreach ($group in $allGroups) { + $owners = Get-EntraBetaGroupOwner -ObjectId $group.Id + if ($owners.Count -eq 0) { + $group + } +} +$groupsWithoutOwners | Format-Table DisplayName, Id, GroupTypes +``` + +```Output +DisplayName Id GroupTypes +----------- -- ---------- +My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} +HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} +``` + +This example demonstrates how to retrieve groups without owners. By identifying ownerless groups, IT admins can improve overall governance and operational efficiency. + +### Example 7: Listing empty groups + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$allGroups = Get-EntraBetaGroup -All +$groupsWithoutMembers = foreach ($group in $allGroups) { + $members = Get-EntraBetaGroupMember -ObjectId $group.Id + if ($members.Count -eq 0) { + $group + } +} +$groupsWithoutMembers | Format-Table DisplayName, Id, GroupTypes +``` + +```Output +DisplayName Id GroupTypes +----------- -- ---------- +My new group aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb {} +HelpDesk admin group eeeeeeee-4444-5555-6666-ffffffffffff {} +``` + +This example demonstrates how to retrieve groups without members. By identifying memberless groups, IT admins can identify and clean up unused or obsolete groups that no longer serve a purpose. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +The unique identifier of a group in Microsoft Entra ID. (GroupId) + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaGroup](New-EntraBetaGroup.md) + +[Remove-EntraBetaGroup](Remove-EntraBetaGroup.md) + +[Set-EntraBetaGroup](Set-EntraBetaGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md new file mode 100644 index 0000000000..f45016c3dc --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md @@ -0,0 +1,181 @@ +--- +title: Get-EntraBetaGroupAppRoleAssignment +description: This article provides details on the Get-EntraBetaGroupAppRoleAssignment command. + +ms.topic: reference +ms.date: 07/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraBetaGroupAppRoleAssignment + +## Synopsis + +Gets a group application role assignment. + +## Syntax + +```powershell +Get-EntraBetaGroupAppRoleAssignment + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaGroupAppRoleAssignment` cmdlet gets a group application role assignment in Microsoft Entra ID. Specify the `GroupId` parameter to get a group application role assignment. + +## Examples + +### Example 1: Retrieve application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$GroupId = (Get-EntraBetaGroup -Top 1).ObjectId +Get-EntraBetaGroupAppRoleAssignment -GroupId $GroupId +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR +``` + +This example retrieves the application role assignments of a group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +### Example 2: Retrieve all application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaGroupAppRoleAssignment -GroupId 'eeeeeeee-4444-5555-6666-ffffffffffff' -All +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +MSVrBV4APk--eAGnHqMKBDtEqPRvu8xLqWHDSXUhoTE M365 License Manager Ask HR +``` + +This example retrieves all application role assignments of the specified group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +### Example 3: Retrieve top two application role assignments of a group + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaGroupAppRoleAssignment -GroupId 'cccccccc-8888-9999-0000-dddddddddddd' -Top 2 +``` + +```Output +ObjectId ResourceDisplayName PrincipalDisplayName +-------- ------------------- -------------------- +MSVrBV4APk--eAGnHqMKBLflsQG3rU1EmDFKvgra41I Microsoft Device Management Checkin Ask HR +MSVrBV4APk--eAGnHqMKBExhQK4StEFHidLvUymzo4I ProvisioningPowerBi Ask HR +``` + +This example retrieves top two application role assignments of the specified group. + +- `-GroupId` parameter specifies the ID of a group in Microsoft Entra ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaGroup](Get-EntraBetaGroup.md) + +[New-EntraBetaGroupAppRoleAssignment](New-EntraBetaGroupAppRoleAssignment.md) + +[Remove-EntraBetaGroupAppRoleAssignment](Remove-EntraBetaGroupAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md new file mode 100644 index 0000000000..41cf726454 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md @@ -0,0 +1,140 @@ +--- +title: Get-EntraBetaGroupLifecyclePolicy +description: This article provides details on the Get-EntraBetaGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaGroupLifecyclePolicy + +## Synopsis + +Retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. +If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaGroupLifecyclePolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaGroupLifecyclePolicy + -GroupLifecyclePolicyId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaGroupLifecyclePolicy` command retrieves the properties and relationships of a groupLifecyclePolicies object in Microsoft Entra ID. Specify the `-GroupLifecyclePolicyId` parameter to get the group lifecycle policy. +If you specify no parameters, this cmdlet gets all groupLifecyclePolicies. + +## Examples + +### Example 1: Retrieve all groupLifecyclePolicies + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaGroupLifecyclePolicy +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +eeeeeeee-4444-5555-6666-ffffffffffff example@contoso.com 200 Selected +``` + +This example demonstrates how to retrieve the properties and relationships of all groupLifecyclePolicies in Microsoft Entra ID. + +### Example 2: Retrieve properties of an groupLifecyclePolicy + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId 'ffffffff-5555-6666-7777-aaaaaaaaaaaa' +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 Selected +``` + +This command is used to retrieve a specific Microsoft Group Lifecycle Policy. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +## Parameters + +### -GroupLifecyclePolicyId + +Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaGroupLifecyclePolicy](Set-EntraBetaGroupLifecyclePolicy.md) + +[New-EntraBetaGroupLifecyclePolicy](New-EntraBetaGroupLifecyclePolicy.md) + +[Remove-EntraBetaGroupLifecyclePolicy](Remove-EntraBetaGroupLifecyclePolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md new file mode 100644 index 0000000000..765718a58d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md @@ -0,0 +1,214 @@ +--- +title: Get-EntraBetaGroupMember +description: This article provides details on the Get-EntraBetaGroupMember command. + +ms.topic: reference +ms.date: 06/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupMember + +schema: 2.0.0 +--- + +# Get-EntraBetaGroupMember + +## Synopsis + +Gets a member of a group. + +## Syntax + +```powershell +Get-EntraBetaGroupMember + -GroupId + [-Top ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaGroupMember` cmdlet gets a member of a group in Microsoft Entra ID. Specify the `GroupId` parameter to get a member of a group. + +In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with one of the following permissions: `microsoft.directory/groups/members/read`, `microsoft.directory/groups/members/limitedRead`, or `microsoft.directory/groups/hiddenMembers/read` (for hidden members). The following least privileged roles support this operation: + +- Group owners +- "Member" users +- "Guest" users (with limited read permissions) +- Directory Readers +- Directory Writers +- Groups Administrator +- User Administrator (includes hidden members) +- Exchange Administrator (includes hidden members) +- SharePoint Administrator (includes hidden members) +- Intune Administrator (includes hidden members) +- Teams Administrator (includes hidden members) +- Yammer Administrator (includes hidden members) + +To list members of a hidden group, the `Member.Read.Hidden` permission is also required. + +## Examples + +### Example 1: Get a group member by ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroupMember -GroupId 'eeeeeeee-4444-5555-6666-ffffffffffff' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +``` + +This example demonstrates how to retrieve group member by ID. + +- `-GroupId` Specifies the ID of a group. + +### Example 2: Get two group member + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroupMember -GroupId 'bbbbbbbb-7777-8888-9999-cccccccccccc' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +cccccccc-8888-9999-0000-dddddddddddd +dddddddd-9999-0000-1111-eeeeeeeeeeee +``` + +This example demonstrates how to retrieve top two groups from Microsoft Entra ID. + +- `-GroupId` specifies the ID of a group. + +### Example 3: Get all members within a group by group ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroupMember -GroupId 'dddddddd-9999-0000-1111-eeeeeeeeeeee' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb +bbbbbbbb-7777-8888-9999-cccccccccccc +cccccccc-8888-9999-0000-dddddddddddd +``` + +This example retrieves all members within a group by group ID. + +- `-GroupId` specifies the ID of a group. + +### Example 4: Retrieve and Select Group Member Properties + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroupMember -GroupId 'tttttttt-0000-2222-0000-aaaaaaaaaaaa' | Select-Object DisplayName, '@odata.type' +``` + +```Output +displayName @odata.type +----------- ----------- +test1 #microsoft.graph.user +test2 #microsoft.graph.user +test2 #microsoft.graph.servicePrincipal +test3 #microsoft.graph.servicePrincipal +``` + +This example retrieves the members of a specified group by its `GroupId` and selects only the `DisplayName` and `@odata.type` properties for each member. + +- `-GroupId` specifies the ID of a group. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaGroupMember](Add-EntraBetaGroupMember.md) + +[Remove-EntraBetaGroupMember](Remove-EntraBetaGroupMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md new file mode 100644 index 0000000000..6ec3ae132b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md @@ -0,0 +1,183 @@ +--- +title: Get-EntraBetaGroupOwner +description: This article provides details on the Get-EntraBetaGroupOwner command. + +ms.topic: reference +ms.date: 06/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupOwner + +schema: 2.0.0 +--- + +# Get-EntraBetaGroupOwner + +## Synopsis + +Gets an owner of a group. + +## Syntax + +```powershell +Get-EntraBetaGroupOwner + -GroupId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaGroupOwner` cmdlet gets an owner of a group in Microsoft Entra ID. Specify `GroupId` parameter gets an owner of a group. + +In delegated scenarios, the signed-in user must have a supported Microsoft Entra role or a custom role with the `microsoft.directory/groups/owners/read` permission. The following least privileged roles support this operation: + +- Group owners +- Directory Readers +- Directory Writers +- Groups Administrator +- User Administrator + +## Examples + +### Example 1: Get a group owner by ID + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroupOwner -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to retrieve the owner of a specific group. + +- `-GroupId` parameter specifies the ID of a group. + +### Example 2: Gets all group owners + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroupOwner -GroupId 'ffffffff-5555-6666-7777-aaaaaaaaaaaa' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-7777-8888-9999-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve the all owner of a specific group. + +- `-GroupId` parameter specifies the ID of a group. + +### Example 3: Gets two group owners + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroupOwner -GroupId 'bbbbbbbb-7777-8888-9999-cccccccccccc' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +dddddddd-9999-0000-1111-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example demonstrates how to retrieve the top two owners of a specific group. + +- `-GroupId` parameter specifies the ID of a group. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaGroupOwner](Add-EntraBetaGroupOwner.md) + +[Remove-EntraBetaGroupOwner](Remove-EntraBetaGroupOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md new file mode 100644 index 0000000000..c2aad52242 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md @@ -0,0 +1,106 @@ +--- +title: Get-EntraBetaGroupPermissionGrant +description: This article provides details on the Get-EntraBetaGroupPermissionGrant command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupPermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraBetaGroupPermissionGrant + +## Synopsis + +Retrieve a list of permission grants consented for this group. + +## Syntax + +```powershell +Get-EntraBetaGroupPermissionGrant + -GroupId + [-Property ] + [] +``` + +## Description + +Retrieve a list of permission grants consented for this group. + +## Examples + +### Example 1: List existing permission grants for the group + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +Get-EntraBetaGroupPermissionGrant -GroupId 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' +``` + +```Output + Id : CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3 + ClientId : 00001111-aaaa-2222-bbbb-3333cccc4444 + ClientAppId : 44445555-eeee-6666-ffff-7777aaaa8888 + ResourceAppId : bbbb1111-cc22-3333-44dd-555555eeeeee + PermissionType : Application + Permission : Member.Read.Group +``` + +This cmdlet list existing permission grants for the specified group. + +## Parameters + +### -GroupId + +The unique identifier of group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.GetMSGroupPermissionGrantsResponse + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md new file mode 100644 index 0000000000..f74aea62f4 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md @@ -0,0 +1,110 @@ +--- +title: Get-EntraBetaLifecyclePolicyGroup +description: This article provides details on the Get-EntraBetaLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Get-EntraBetaLifecyclePolicyGroup + +## Synopsis + +Retrieves the lifecycle policy object to which a group belongs. + +## Syntax + +```powershell +Get-EntraBetaLifecyclePolicyGroup + -GroupId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaLifecyclePolicyGroup` retrieves the lifecycle policy object to which a group belongs. Specify the `-GroupId` parameter to get the lifecycle policy object to which a group belongs. + +## Examples + +### Example 1: Retrieve lifecycle policy object + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaLifecyclePolicyGroup -GroupId 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +bbbbbbbb-1111-2222-3333-cccccccccccc admingroup@contoso.com 200 All +``` + +This example demonstrates how to retrieve lifecycle policy object by Id in Microsoft Entra ID. + +- `-GroupId` - specifies the ID of a group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Add-EntraBetaLifecyclePolicyGroup](Add-EntraBetaLifecyclePolicyGroup.md) + +[Remove-EntraBetaLifecyclePolicyGroup](Remove-EntraBetaLifecyclePolicyGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md new file mode 100644 index 0000000000..02f4f6f8a1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md @@ -0,0 +1,140 @@ +--- +title: Get-EntraBetaObjectByObjectId +description: This article provides details on the Get-EntraBetaObjectByObjectId. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectByObjectId + +schema: 2.0.0 +--- + +# Get-EntraBetaObjectByObjectId + +## Synopsis + +Retrieves the objects specified by the ObjectIds parameter. + +## Syntax + +```powershell +Get-EntraBetaObjectByObjectId + [-Types ] + -ObjectIds + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaObjectByObjectId` cmdlet retrieves the objects specified by the ObjectIds parameter. + +## Examples + +### Example 1: Get an object One or more object IDs + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb', 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example demonstrates how to retrieve objects for a specified object Ids. + +- `ObjectIds` parameter specifies the One or more object IDs. + +### Example 2: Get an object by types + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaObjectByObjectId -ObjectIds 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -Types User +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve objects for a specified object type. + +- `-ObjectIds` parameter specifies the One or more object IDs. +- `-Types` parameter specifies the type of object ID. + +## Parameters + +### -ObjectIds + +One or more object IDs's, separated by commas, for which the objects are retrieved. The IDs are GUIDs, represented as strings. You can specify up to 1,000 IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Types + +Specifies the type of objects that the cmdlet returns. If not specified, the default is directoryObject, which includes all resource types defined in the directory. You can specify any object derived from directoryObject in the collection, such as user, group, and device objects. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md new file mode 100644 index 0000000000..dd9410048d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md @@ -0,0 +1,262 @@ +--- +title: Get-EntraBetaObjectSetting +description: This article provides details on the Get-EntraBetaObjectSetting command. + + +ms.topic: reference +ms.date: 08/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectSetting + +schema: 2.0.0 +--- + +# Get-EntraBetaObjectSetting + +## Synopsis + +Gets an object setting. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaObjectSetting + -TargetType + -TargetObjectId + [-Top ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaObjectSetting + -Id + -TargetType + -TargetObjectId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaObjectSetting` cmdlet retrieves an object setting from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraBetaObjectSetting @params +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +### Example 2: Retrieve a specific object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' + Id ='aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Get-EntraBetaObjectSetting @params +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves Specific object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. +- `-Id` Parameter specifies the ID of a settings object. + +### Example 3: Retrieve top one object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraBetaObjectSetting @params -Top 1 +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves top one object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +### Example 4: Retrieve all object setting from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' +} +Get-EntraBetaObjectSetting @params -All +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Group.Unified.Guest 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command retrieves all records of object setting from Microsoft Entra ID. + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a settings object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjectId + +Specifies the ID of the target object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetType + +Specifies the target type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaObjectSetting](New-EntraBetaObjectSetting.md) + +[Remove-EntraBetaObjectSetting](Remove-EntraBetaObjectSetting.md) + +[Set-EntraBetaObjectSetting](Set-EntraBetaObjectSetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md new file mode 100644 index 0000000000..ce14bcc3ca --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md @@ -0,0 +1,446 @@ +--- +title: New-EntraBetaGroup +description: This article provides details on the New-EntraBetaGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaGroup + +schema: 2.0.0 +--- + +# New-EntraBetaGroup + +## Synopsis + +Creates a Microsoft Entra ID group. + +## Syntax + +```powershell +New-EntraBetaGroup + -DisplayName + -MailNickname + -MailEnabled + -SecurityEnabled + [-MembershipRule ] + [-Description ] + [-GroupTypes ] + [-Visibility ] + [-MembershipRuleProcessingState ] + [-IsAssignableToRole ] + [] +``` + +## Description + +The `New-EntraBetaGroup` cmdlet creates a Microsoft Entra ID group. Specify the `DisplayName`, `MailNickname`, `MailEnabled` and `SecurityEnabled` parameters for creating a Microsoft Entra ID group. + +For information about creating dynamic groups, see: [Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership). + +**Notes on permissions:** + +- To create the group with users as owners or members, the app must have at least the `User.Read.All` permission. +- To create the group with other service principals as owners or members, the app must have at least the `Application.Read.All` permission. +- To create the group with either users or service principals as owners or members, the app must have at least the `Directory.Read.All` permission. + +## Examples + +### Example 1: Create a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True +} + +New-EntraBetaGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 bbbbbbbb-5555-5555-0000-qqqqqqqqqqqq helpDeskAdminGroup {} +``` + +This example demonstrates how to create the new group. + +### Example 2: Create a group with Description parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group' + MailEnabled = $false + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $true + Description = 'Group assignable to role' +} + +New-EntraBetaGroup @params +``` + +```Output + +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group zzzzzzzz-6666-8888-9999-pppppppppppp helpDeskAdminGroup Group assignable to role {} + +``` + +This example demonstrates how to create the new group with description parameter. + +### Example 3: Create a group with IsAssignableToRole parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + Description = 'Group assignable to role' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + IsAssignableToRole = $True +} + +New-EntraBetaGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 vvvvvvvv-8888-9999-0000-jjjjjjjjjjjj helpDeskAdminGroup Group assignable to role {} +``` + +This example demonstrates how to create the new group with IsAssignableToRole parameter. + +### Example 4: Create a group with Visibility parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group2' + Description = 'Group assignable to role' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + Visibility = 'Private' +} + +New-EntraBetaGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 gggggggg-0000-4444-3333-llllllllllll helpDeskAdminGroup Group assignable to role {} +``` + +This example demonstrates how to create the new group with Visibility parameter. + +### Example 5: Create a group with GroupTypes parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All','Group.Create' +$params = @{ + DisplayName = 'HelpDesk admin group3' + Description = 'group des' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup1' + SecurityEnabled = $True + GroupTypes = 'Unified' +} + +New-EntraBetaGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group3 xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb helpDeskAdminGroup1 group des {Unified} +``` + +This example demonstrates how to create the new group with GroupTypes parameter. + +### Example 6: Create a group membership rule processing state parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' #Delegated Permission +Connect-Entra -Scopes 'Group.Create' #Application permission +$params = @{ + DisplayName = 'HelpDesk admin group2' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + MembershipRuleProcessingState = 'On' +} + +New-EntraBetaGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb helpDeskAdminGroup {} +``` + +This example demonstrates how to create the new group with MembershipRuleProcessingState parameter + +### Example 7: Create a group membership rule parameter + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' #Delegated Permission +Connect-Entra -Scopes 'Group.Create' #Application permission +$params = @{ + DisplayName = 'HelpDesk admin group2' + MailEnabled = $False + MailNickname = 'helpDeskAdminGroup' + SecurityEnabled = $True + MembershipRule = '(user.department -contains "Marketing")' + MembershipRuleProcessingState = 'On' +} + +New-EntraBetaGroup @params +``` + +```Output +DisplayName Id MailNickname Description GroupTypes +----------- -- ------------ ----------- ---------- +HelpDesk admin group2 xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb helpDeskAdminGroup {} +``` + +This example demonstrates how to create a new group with the following rule: + +\`user.department -contains "Marketing"\` + +The double quotation marks are replaced with single quotation marks. + +The processing state is On. +Which means that all users in the directory that qualify the rule are added as members to the group. +Any users that don't qualify are removed from the group. + +## Parameters + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a unified or dynamic group. + +Notes: + +- This parameter currently can't be used to create dynamic groups. To create a dynamic group in PowerShell, you must use the Entra module. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +Indicates whether group can be assigned to a role. This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailEnabled + +Specifies whether this group is mail enabled. + +Currently, you can't create mail enabled groups in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. +If MailEnabled is $False, you must still specify a mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MembershipRule + +Specifies the membership rule for a dynamic group. + +For more information about the rules that you can use for dynamic groups, see Using attributes to create advanced rules (). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MembershipRuleProcessingState + +Specifies the rule processing state. +The acceptable values for this parameter are: + +- "On" - Process the group rule. +- "Paused" - Stop processing the group rule. + +Changing the value of the processing state doesn't change the members list of the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Specifies whether the group is security enabled. +For security groups, this value must be $True. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +This parameter determines the visibility of the group's content and members list. + +This parameter can take one of the following values: + +- "Public" - Anyone can view the contents of the group +- "Private" - Only members can view the content of the group +- "HiddenMembership" - Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value is "Public". + +Notes: + +- This parameter is only valid for groups that have the groupType set to "Unified". +- If a group has this attribute set to "HiddenMembership", it can't be changed later. +- Anyone can join a group that has this attribute set to "Public". If the attribute is set to Private or HiddenMembership, only owners can add new members to the group and requests to join the group need approval of the owners. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaGroup](Get-EntraBetaGroup.md) + +[Remove-EntraBetaGroup](Remove-EntraBetaGroup.md) + +[Set-EntraBetaGroup](Set-EntraBetaGroup.md) + +[Using attributes to create advanced rules](https://learn.microsoft.com/entra/identity/users/groups-dynamic-membership) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md new file mode 100644 index 0000000000..8b29ba07af --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md @@ -0,0 +1,148 @@ +--- +title: New-EntraBetaGroupAppRoleAssignment +description: This article provides details on the New-EntraBetaGroupAppRoleAssignment command. + + +ms.topic: reference +ms.date: 07/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraBetaGroupAppRoleAssignment + +## Synopsis + +Assign a group of users to an application role. + +## Syntax + +```powershell +New-EntraBetaGroupAppRoleAssignment + -ResourceId + -AppRoleId + -GroupId + -PrincipalId + [] +``` + +## Description + +The `New-EntraBetaGroupAppRoleAssignment` cmdlet assigns a group of users to an application role in Microsoft Entra ID. + +## Examples + +### Example 1: Assign a group of users to an application + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$appname = 'Box' +$spo = Get-EntraBetaServicePrincipal -Filter "Displayname eq '$appname'" +$group = Get-EntraBetaGroup -SearchString 'Contoso Team' +New-EntraBetaGroupAppRoleAssignment -GroupId $group.ObjectId -PrincipalId $group.ObjectId -ResourceId $spo.ObjectId -AppRoleId $spo.Approles[1].id +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId +--------------- -- --------- --------------- -------------------- ----------- + AaBbCcDdEeFfGgHhIiJjKkLlMmNnOo1 00000000-0000-0000-0000-000000000000 3/13/2024 4:41:43 AM Contoso Team aaaaaaaa-bbbb-cccc-1111-222222222222 +3/13/2024 4:45:00 AM BbCcDdEeFfGgHhIiJjKkLlMmNnOoPp2 00000000-0000-0000-0000-000000000000 3/13/2024 4:45:00 AM Finance Group bbbbbbbb-cccc-dddd-2222-333333333333 +``` + +This example demonstrates how to assign a group of users to an application role in Microsoft Entra ID. + +- `-GroupId` parameter specifies the ID of a group to which you're assigning the app role. +- `-PrincipalId` parameter specifies the ID of a group to which you're assigning the app role. +- `-ResourceId` parameter specifies the ID of a resource service Principal, which has defined the app role. +- `-AppRoleId` parameter specifies the ID of a appRole (defined on the resource service principal) to assign to the group. + +## Parameters + +### -AppRoleId + +Specifies the ID of the app role (defined on the resource service principal) to assign. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the ID of a user (as a UserPrincipalName or GroupId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +Specifies the principal ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The unique identifier (ID) for the resource service principal for which the assignment is made. +Required on create. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaGroupAppRoleAssignment](Get-EntraBetaGroupAppRoleAssignment.md) + +[Remove-EntraBetaGroupAppRoleAssignment](Remove-EntraBetaGroupAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md b/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md new file mode 100644 index 0000000000..c180d47dab --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md @@ -0,0 +1,138 @@ +--- +title: New-EntraBetaGroupLifecyclePolicy +description: This article provides details on the New-EntraBetaGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 07/22/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# New-EntraBetaGroupLifecyclePolicy + +## Synopsis + +Creates a new groupLifecyclePolicy. + +## Syntax + +```powershell +New-EntraBetaGroupLifecyclePolicy + -AlternateNotificationEmails + -ManagedGroupTypes + -GroupLifetimeInDays + [] +``` + +## Description + +Creates a new groupLifecyclePolicy in Microsoft Entra ID. + +## Examples + +### Example 1: Creates a new groupLifecyclePolicy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$Params = @{ + GroupLifetimeInDays = 99 + ManagedGroupTypes = 'Selected' + AlternateNotificationEmails = 'example@contoso.com' +} +New-EntraBetaGroupLifecyclePolicy @params +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb example@contoso.com 99 Selected +``` + +This example creates a new groupLifecyclePolicy with a group lifetime of 99 days for a selected set of Office 365 groups. Renewal notification emails are sent to for groups without owners. + +- `-GroupLifetimeInDays` parameter specifies the number of days a group can exist before it needs to be renewed. +- `-ManagedGroupTypes` parameter allows the admin to select which office 365 groups the policy applies to. +- `-AlternateNotificationEmails` parameter specifies notification emails for group. + +## Parameters + +### -AlternateNotificationEmails + +Notification emails for groups without owners are sent to these email addresses, separated by a ';'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifetimeInDays + +The number of days a group can exist before it needs to be renewed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedGroupTypes + +This parameter allows the admin to select which Office 365 groups the policy applies to. +'None' creates the policy in a disabled state. +'All' applies the policy to every Office 365 group in the tenant. +'Selected' allows the admin to choose specific Office 365 groups to which the policy applies. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaGroupLifecyclePolicy](Set-EntraBetaGroupLifecyclePolicy.md) + +[Get-EntraBetaGroupLifecyclePolicy](Get-EntraBetaGroupLifecyclePolicy.md) + +[Remove-EntraBetaGroupLifecyclePolicy](Remove-EntraBetaGroupLifecyclePolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md b/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md new file mode 100644 index 0000000000..38c17267a8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md @@ -0,0 +1,131 @@ +--- +title: New-EntraBetaObjectSetting +description: This article provides details on the New-EntraBetaObjectSetting command. + + +ms.topic: reference +ms.date: 08/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaObjectSetting + +schema: 2.0.0 +--- + +# New-EntraBetaObjectSetting + +## Synopsis + +Creates a settings object. + +## Syntax + +```powershell +New-EntraBetaObjectSetting + -DirectorySetting + -TargetType + -TargetObjectId + [] +``` + +## Description + +The `New-EntraBetaObjectSetting` cmdlet creates a settings object in Microsoft Entra ID. + +## Examples + +### Example 1: Creates a settings object + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$template = Get-EntraBetaDirectorySettingTemplate | ? {$_.displayname -eq 'group.unified.guest'} +$settingsCopy = $template.CreateDirectorySetting() +$settingsCopy['AllowToAddGuests']=$False +$groupID= (Get-EntraBetaGroup -SearchString 'Demo group123').ObjectId +New-EntraBetaObjectSetting -TargetType 'Groups' -TargetObjectId $groupID -DirectorySetting $settingsCopy +``` + +```Output +Id DisplayName TemplateId +-- ----------- ---------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This command creates a new settings object. + +- `-TargetType` Parameter specifies the type of the directory object. +- `-TargetObjectId` Parameter specifies the ID of directory object to which to assign settings. +- `-DirectorySetting` Parameter Create a new setting using templates from `DirectorySettingTemplates` + +## Parameters + +### -DirectorySetting + +Specifies the new settings. + +```yaml +Type: DirectorySetting +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjectId + +Specifies the ID of directory object to which to assign settings. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetType + +Specifies the type of the directory object to which to assign settings. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaObjectSetting](Get-EntraBetaObjectSetting.md) + +[Remove-EntraBetaObjectSetting](Remove-EntraBetaObjectSetting.md) + +[Set-EntraBetaObjectSetting](Set-EntraBetaObjectSetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md new file mode 100644 index 0000000000..7cdc734688 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md @@ -0,0 +1,94 @@ +--- +title: Remove-EntraBetaGroup +description: This article provides details on the Remove-EntraBetaGroup command. + + +ms.topic: reference +ms.date: 06/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroup + +schema: 2.0.0 +--- + +# Remove-EntraBetaGroup + +## Synopsis + +Removes a group. + +## Syntax + +```powershell +Remove-EntraBetaGroup + -GroupId + [] +``` + +## Description + +The `Remove-EntraBetaGroup` cmdlet removes a group from Microsoft Entra ID. Specify the `GroupId` parameter removes a group. + +Unified Group can be restored withing 30 days after deletion using the `Restore-EntraBetaDeletedDirectoryObject` cmdlet. Security groups can't be restored after deletion. + +**Notes on permissions:** + +The following conditions apply for apps to delete role-assignable groups: + +- For delegated scenarios, the app must be assigned the `RoleManagement.ReadWrite.Directory` delegated permission, and the calling user must be the creator of the group or be assigned at least the Privileged Role Administrator Microsoft Entra role. +- For app-only scenarios, the calling app must be the owner of the group or be assigned the `RoleManagement.ReadWrite.Directory` application permission or be assigned at least the Privileged Role Administrator Microsoft Entra role. + +## Examples + +### Example 1: Remove a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Remove-EntraBetaGroup -GroupId $group.Id +``` + +This example demonstrates how to remove a group in Microsoft Entra ID. + +- `GroupId` parameter specifies the group ID . + +## Parameters + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaGroup](Get-EntraBetaGroup.md) + +[New-EntraBetaGroup](New-EntraBetaGroup.md) + +[Set-EntraBetaGroup](Set-EntraBetaGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md new file mode 100644 index 0000000000..1c6da70c1e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md @@ -0,0 +1,103 @@ +--- +title: Remove-EntraBetaGroupAppRoleAssignment +description: This article provides details on the Remove-EntraBetaGroupAppRoleAssignment command. + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraBetaGroupAppRoleAssignment + +## Synopsis + +Delete a group application role assignment. + +## Syntax + +```powershell +Remove-EntraBetaGroupAppRoleAssignment + -GroupId + -AppRoleAssignmentId + [] +``` + +## Description + +The `Remove-EntraBetaGroupAppRoleAssignment` cmdlet removes a group application role assignment from Microsoft Entra ID. + +## Examples + +### Example 1: Remove group app role assignment + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.Id + AppRoleAssignmentId = 'CcDdEeFfGgHhIiJjKkLlMmNnOoPpQq3' +} +Remove-EntraBetaGroupAppRoleAssignment @params +``` + +This example demonstrates how to remove the specified group application role assignment. + +- `-GroupId` parameter specifies the object ID of a group. +- `-AppRoleAssignmentId` parameter specifies the object ID of a group application role assignment. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the object ID of the group application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaGroupAppRoleAssignment](Get-EntraBetaGroupAppRoleAssignment.md) + +[New-EntraBetaGroupAppRoleAssignment](New-EntraBetaGroupAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md new file mode 100644 index 0000000000..84e28c3023 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md @@ -0,0 +1,86 @@ +--- +title: Remove-EntraBetaGroupLifecyclePolicy +description: This article provides details on the Remove-EntraBetaGroupLifecyclePolicy command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaGroupLifecyclePolicy + +## Synopsis + +Deletes a groupLifecyclePolicies object + +## Syntax + +```powershell +Remove-EntraBetaGroupLifecyclePolicy + -GroupLifecyclePolicyId + [] +``` + +## Description + +The `Remove-EntraBetaGroupLifecyclePolicy` command deletes a groupLifecyclePolicies object in Microsoft Entra ID. Specify `GroupLifecyclePolicyId` parameter deletes the groupLifecyclePolicies object. + +## Examples + +### Example 1: Remove a groupLifecyclePolicies + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId '1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5' +``` + +This example demonstrates how to delete the groupLifecyclePolicies object that has the specified ID. You can use `Get-EntraBetaGroupLifecyclePolicy` to get Id details. + +## Parameters + +### -GroupLifecyclePolicyId + +Specifies the ID of the groupLifecyclePolicies object that this cmdlet removes. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related links + +[Get-EntraBetaGroupLifecyclePolicy](Get-EntraBetaGroupLifecyclePolicy.md) + +[New-EntraBetaGroupLifecyclePolicy](New-EntraBetaGroupLifecyclePolicy.md) + +[Set-EntraBetaGroupLifecyclePolicy](Set-EntraBetaGroupLifecyclePolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md new file mode 100644 index 0000000000..a35dad8769 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md @@ -0,0 +1,103 @@ +--- +title: Remove-EntraBetaGroupMember +description: This article provides details on the Remove-EntraBetaGroupMember command. + + +ms.topic: reference +ms.date: 06/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupMember + +schema: 2.0.0 +--- + +# Remove-EntraBetaGroupMember + +## Synopsis + +Removes a member from a group. + +## Syntax + +```powershell +Remove-EntraBetaGroupMember + -GroupId + -MemberId + [] +``` + +## Description + +The `Remove-EntraBetaGroupMember` cmdlet removes a member from a group in Microsoft Entra ID. Specify the `GroupId` and `MemberId` parameters to remove a member from a group. + +## Examples + +### Example 1: Remove a member + +```powershell +Connect-Entra -Scopes 'GroupMember.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MemberId = 'zzzzzzzz-6666-8888-9999-pppppppppppp' +} + +Remove-EntraBetaGroupMember @params +``` + +This example demonstrates how to remove a member from a group in Microsoft Entra ID. + +## Parameters + +### -MemberId + +Specifies the ID of the member to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaGroupMember](Add-EntraBetaGroupMember.md) + +[Get-EntraBetaGroupMember](Get-EntraBetaGroupMember.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md new file mode 100644 index 0000000000..9210f823ab --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md @@ -0,0 +1,107 @@ +--- +title: Remove-EntraBetaGroupOwner +description: This article provides details on the Remove-EntraBetaGroupOwner command. + + +ms.topic: reference +ms.date: 06/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupOwner + +schema: 2.0.0 +--- + +# Remove-EntraBetaGroupOwner + +## Synopsis + +Removes an owner from a group. + +## Syntax + +```powershell +Remove-EntraBetaGroupOwner + -OwnerId + -GroupId + [] +``` + +## Description + +The `Remove-EntraBetaGroupOwner` cmdlet removes an owner from a group in Microsoft Entra ID. Specify the `GroupId` and `OwnerId` parameters to remove an owner from a group. + +## Examples + +### Example 1: Remove an owner + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.Id + OwnerId = 'xxxxxxxx-8888-5555-9999-bbbbbbbbbbbb' +} + +Remove-EntraBetaGroupOwner @params +``` + +This example demonstrates how to remove an owner from a group in Microsoft Entra ID. + +- `GroupId` specifies the ID of a group in Microsoft Entra ID. + +- `OwnerId` specifies the ID of an owner. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OwnerId + +Specifies the ID of an owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Add-EntraBetaGroupOwner](Add-EntraBetaGroupOwner.md) + +[Get-EntraBetaGroupOwner](Get-EntraBetaGroupOwner.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md new file mode 100644 index 0000000000..b1228086b3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md @@ -0,0 +1,117 @@ +--- +title: Remove-EntraBetaLifecyclePolicyGroup +description: This article provides details on the Remove-EntraBetaLifecyclePolicyGroup command. + + +ms.topic: reference +ms.date: 07/23/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup + +schema: 2.0.0 +--- + +# Remove-EntraBetaLifecyclePolicyGroup + +## Synopsis + +Removes a group from a lifecycle policy. + +## Syntax + +```powershell +Remove-EntraBetaLifecyclePolicyGroup + -GroupLifecyclePolicyId + -GroupId + [] +``` + +## Description + +The `Remove-EntraBetaLifecyclePolicyGroup` cmdlet removes a group from a lifecycle policy in Microsoft Entra ID. + +## Examples + +### Example 1: Remove lifecycle policy group + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'Office365 group'" +$policy = Get-EntraBetaLifecyclePolicyGroup -Id $group.ObjectId +$params = @{ + GroupLifecyclePolicyId = $policy.Id + GroupId = $group.ObjectId +} +Remove-EntraBetaLifecyclePolicyGroup @params +``` + +```Output +Value +----- +True +``` + +This example demonstrates how to remove a group from a lifecycle policy in Microsoft Entra ID with specified Id and groupId. + +- `-GroupLifecyclePolicyId` parameter specifies the lifecycle policy object ID. +- `-GroupId` parameter specifies the ID of Office365 group. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of the lifecycle policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Add-EntraBetaLifecyclePolicyGroup](Add-EntraBetaLifecyclePolicyGroup.md) + +[Get-EntraBetaLifecyclePolicyGroup](Get-EntraBetaLifecyclePolicyGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md new file mode 100644 index 0000000000..4fd1e39bcc --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md @@ -0,0 +1,126 @@ +--- +title: Remove-EntraBetaObjectSetting +description: This article provides details on the Remove-EntraBetaObjectSetting command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaObjectSetting + +schema: 2.0.0 +--- + +# Remove-EntraBetaObjectSetting + +## Synopsis + +Deletes settings in Microsoft Entra ID. + +## Syntax + +```powershell +Remove-EntraBetaObjectSetting + -Id + -TargetType + -TargetObjectId + [] +``` + +## Description + +The `Remove-EntraBetaObjectSetting` cmdlet removes object settings in Microsoft Entra ID. + +## Examples + +### Example 1: Removes object settings + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$params = @{ + TargetType = 'Groups' + TargetObjectId = 'aaaaaaaa-1111-1111-1111-000000000000' + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Remove-EntraBetaObjectSetting @params +``` + +This example removes object settings from Microsoft Entra ID + +- `-TargetType` Parameter specifies the target type. +- `-TargetObjectId` Parameter specifies the ID of the target object. +- `-Id` Parameter specifies the ID of a settings object. + +## Parameters + +### -Id + +Specifies the ID of a settings object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjectId + +Specifies the object ID of the target. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetType + +Specifies the target type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaObjectSetting](Get-EntraBetaObjectSetting.md) + +[New-EntraBetaObjectSetting](New-EntraBetaObjectSetting.md) + +[Set-EntraBetaObjectSetting](Set-EntraBetaObjectSetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md new file mode 100644 index 0000000000..3acc20dfd8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md @@ -0,0 +1,84 @@ +--- +title: Reset-EntraBetaLifeCycleGroup +description: This article provides details on the Reset-EntraBetaLifeCycleGroup command. + + +ms.topic: reference +ms.date: 07/23/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Reset-EntraBetaLifeCycleGroup + +schema: 2.0.0 +--- + +# Reset-EntraBetaLifeCycleGroup + +## Synopsis + +Renews a group by updating the RenewedDateTime property on a group to the current DateTime. + +## Syntax + +```powershell +Reset-EntraBetaLifeCycleGroup + -GroupId + [] +``` + +## Description + +The `Reset-EntraBetaLifeCycleGroup` renews a group by updating the RenewedDateTime property on a group to the current DateTime. +When a group is renewed, the group expiration is extended by the number of days defined in the policy. + +## Examples + +### Example 1: Renew a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +Reset-EntraBetaLifeCycleGroup -GroupId 'hhhhhhhh-8888-9999-8888-cccccccccccc' +``` + +This example demonstrates how to renew a specified group. + +- `-GroupId` - Specifies the lifecycle policy object ID. + +## Parameters + +### -GroupId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md b/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md new file mode 100644 index 0000000000..2a4522dea7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md @@ -0,0 +1,99 @@ +--- +title: Select-EntraBetaGroupIdsContactIsMemberOf +description: This article provides details on the Select-EntraBetaGroupIdsContactIsMemberOf. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraBetaGroupIdsContactIsMemberOf + +## Synopsis + +Get groups in which a contact is a member. + +## Syntax + +```powershell +Select-EntraBetaGroupIdsContactIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraBetaGroupIdsContactIsMemberOf` cmdlet gets groups in Microsoft Entra ID in which a contact is a member. + +## Examples + +### Example 1: Get groups in which a contact is a member + +```powershell +Connect-Entra -Scopes 'OrgContact.Read.All,Group.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraBetaGroup -Filter "DisplayName eq 'Entra PowerShell Group'").ObjectId +$UserID = (Get-EntraBetaContact -ObjectId 'hhhhhhhh-8888-9999-8888-cccccccccccc').ObjectId +Select-EntraBetaGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups +``` + +This example demonstrates how to get groups in which a contact is a member. + +- `-ObjectId` parameter specifies the contact Object ID. +- `-GroupIdsForMembershipCheck` parameter specifies the group Object ID. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the object ID of a contact in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md b/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md new file mode 100644 index 0000000000..09b212d532 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md @@ -0,0 +1,101 @@ +--- +title: Select-EntraBetaGroupIdsGroupIsMemberOf +description: This article provides details on the Select-EntraBetaGroupIdsGroupIsMemberOf. + +ms.topic: reference +ms.date: 07/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraBetaGroupIdsGroupIsMemberOf + +## Synopsis + +Gets group IDs that a group is a member of. + +## Syntax + +```powershell +Select-EntraBetaGroupIdsGroupIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraBetaGroupIdsGroupIsMemberOf` cmdlet gets the groups that a specified group is a member of in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a group + +```powershell +Connect-Entra -Scopes 'GroupMember.Read.All' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = (Get-EntraBetaGroup -Top 1).ObjectId +$GroupId = (Get-EntraBetaGroup -Top 1).ObjectId +Select-EntraBetaGroupIdsGroupIsMemberOf -ObjectId $GroupId -GroupIdsForMembershipCheck $Groups +``` + +This example gets the group membership of a group identified by $GroupId. Use `Get-EntraBetaGroup` cmdlet to obtain group `ObjectId` value. + +- `-ObjectId` parameter specifies the group ID. +- `-GroupIdsForMembershipCheck` Specifies an array of group object IDs. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a group in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaGroup](Get-EntraBetaGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md b/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md new file mode 100644 index 0000000000..1528f1302c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md @@ -0,0 +1,109 @@ +--- +title: Select-EntraBetaGroupIdsUserIsMemberOf +description: This article provides details on the Select-EntraBetaGroupIdsUserIsMemberOf command. + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf + +schema: 2.0.0 +--- + +# Select-EntraBetaGroupIdsUserIsMemberOf + +## Synopsis + +Selects the groups that a user is a member of. + +## Syntax + +```powershell +Select-EntraBetaGroupIdsUserIsMemberOf + -ObjectId + -GroupIdsForMembershipCheck + [] +``` + +## Description + +The `Select-EntraBetaGroupIdsUserIsMemberOf` cmdlet selects the groups that a user is a member of in Microsoft Entra ID. + +## Examples + +### Example 1: Get the group membership of a group for a user + +```powershell +Connect-Entra -Scopes 'Application.Read.All' +$myGroup = Get-EntraBetaGroup -Filter "DisplayName eq ''" +$UserId = 'SawyerM@contoso.com' +$Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck +$Groups.GroupIds = $myGroup.ObjectId +$Params = @{ + ObjectId = $UserId + GroupIdsForMembershipCheck = $Groups +} +Select-EntraBetaGroupIdsUserIsMemberOf @Params +``` + +```Output +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example retrieves the group membership of a group for a user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-GroupIdsForMembershipCheck` parameter specifies the group Object Ids. + +## Parameters + +### -GroupIdsForMembershipCheck + +Specifies an array of group object IDs. + +```yaml +Type: GroupIdsForMembershipCheck +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaGroup](Get-EntraBetaGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md b/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md new file mode 100644 index 0000000000..d301fc4428 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md @@ -0,0 +1,373 @@ +--- +title: Set-EntraBetaGroup +description: This article provides details on the Set-EntraBetaGroup command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroup + +schema: 2.0.0 +--- + +# Set-EntraBetaGroup + +## Synopsis + +Sets the properties for an existing Microsoft Entra ID group. + +## Syntax + +```powershell +Set-EntraBetaGroup + -GroupId + [-GroupTypes ] + [-DisplayName ] + [-Description ] + [-IsAssignableToRole ] + [-SecurityEnabled ] + [-Visibility ] + [-MailEnabled ] + [-MailNickname ] + [-MembershipRule ] + [-MembershipRuleProcessingState ] + [] +``` + +## Description + +The `Set-EntraBetaGroup` cmdlet sets the properties for an existing Microsoft Entra ID group. Specify the `GroupId` parameter to set the properties for an existing Microsoft Entra ID group. + +## Examples + +### Example 1: Update a group display name + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + DisplayName = 'UPDATE HelpDesk Team Leaders' +} +Set-EntraBetaGroup @params +``` + +This command updates the display name of a specified group in Microsoft Entra ID. + +### Example 2: Update a group description + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + Description = 'This is my new group' +} +Set-EntraBetaGroup @params +``` + +This example demonstrates how to update a group description. + +### Example 3: Update a group mail nickname + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MailNickName = 'newnickname' +} +Set-EntraBetaGroup @params +``` + +This command updates the mail nickname of a specified group in Microsoft Entra ID. + +### Example 4: Update a group security enabled + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + SecurityEnabled = $true +} +Set-EntraBetaGroup @params +``` + +This command updates the security enabled of a specified group in Microsoft Entra ID. + +### Example 5: Update a group mail enabled + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MailEnabled = $false +} +Set-EntraBetaGroup @params +``` + +This example demonstrates how to update a group main enabled. + +### Example 6: Update a property for a group + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + Visibility = 'Private' + GroupTypes = 'DynamicMembership' + IsAssignableToRole = $true +} +Set-EntraBetaGroup @params +``` + +This example demonstrates how to update a property for an existing Microsoft Entra ID group. + +### Example 7: Update a group membership rule + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +$params = @{ + GroupId = $group.ObjectId + MembershipRule = '(user.UserType -contains "Member")' +} +Set-EntraBetaGroup @params +``` + +This example demonstrates how to update the membership rule of a specified group in Microsoft Entra ID. + +### Example 8: Update a group membership rule processing state + +```powershell +Connect-Entra -Scopes 'Group.ReadWrite.All' +$group = Get-EntraBetaGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'" +Set-EntraBetaGroup -GroupId $group.ObjectId -MembershipRuleProcessingState 'On' +``` + +This example demonstrates how to update the membership rule processing state of a specified group in Microsoft Entra ID. + +## Parameters + +### -Description + +Specifies a description for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies a display name for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupTypes + +Specifies that the group is a dynamic group. +To create a dynamic group, specify a value of DynamicMembership. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupId + +Specifies the object ID of a group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -IsAssignableToRole + +This property can only be set at the time of group creation and can't be modified on an existing group. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailEnabled + +Indicates whether this group is mail enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickname + +Specifies a mail nickname for the group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MembershipRule + +The rule that determines members for this group if the group is a dynamic group (groupTypes contains DynamicMembership) + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MembershipRuleProcessingState + +Indicates whether the dynamic membership processing is on or paused. Possible values are On or Paused. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SecurityEnabled + +Indicates whether the group is security enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Visibility + +Specifies the visibility of the group's content and members list. +This parameter can take one of the following values: + +* "Public": Anyone can view the contents of the group. +* "Private": Only members can view the content of the group. +* "HiddenMembership": Only members can view the content of the group and only members, owners, Global/Company Administrator, User Administrator, and Helpdesk Administrators can view the members list of the group. + +If no value is provided, the default value is "Public." + +Notes: + +* This parameter is only valid for groups that have the groupType set to "Unified." +* If a group has this attribute set to "HiddenMembership," it can't be changed later. +* Anyone can join a group that has this attribute set to "Public." If the attribute is set to Private or HiddenMembership, only owner can add new members to the group and requests to join the group need approval of the owner. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related links + +[Get-EntraBetaGroup](Get-EntraBetaGroup.md) + +[New-EntraBetaGroup](New-EntraBetaGroup.md) + +[Remove-EntraBetaGroup](Remove-EntraBetaGroup.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md b/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md new file mode 100644 index 0000000000..eb0bfeb0ee --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md @@ -0,0 +1,160 @@ +--- +title: Set-EntraBetaGroupLifecyclePolicy +description: This article provides details on the Set-EntraBetaGroupLifecyclePolicy command. + +ms.topic: reference +ms.date: 07/23/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy + +schema: 2.0.0 +--- + +# Set-EntraBetaGroupLifecyclePolicy + +## Synopsis + +Updates a specific group Lifecycle Policy in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraBetaGroupLifecyclePolicy + -GroupLifecyclePolicyId + [-AlternateNotificationEmails ] + [-ManagedGroupTypes ] + [-GroupLifetimeInDays ] + [] +``` + +## Description + +The `Set-EntraBetaGroupLifecyclePolicy` command updates a specific group Lifecycle Policy in Microsoft Entra ID. + +## Examples + +### Example 1: Updates group lifecycle policy + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$policy = Get-EntraBetaGroupLifecyclePolicy | Select-Object -First 1 +$params = @{ + GroupLifecyclePolicyId = $policy.Id + GroupLifetimeInDays = 200 + AlternateNotificationEmails = 'example@contoso.com' + ManagedGroupTypes = 'All' +} +Set-EntraBetaGroupLifecyclePolicy @params +``` + +```Output +Id AlternateNotificationEmails GroupLifetimeInDays ManagedGroupTypes +-- --------------------------- ------------------- ----------------- +ffffffff-5555-6666-7777-aaaaaaaaaaaa example@contoso.com 200 All +``` + +This example updates the specified groupLifecyclePolicy in Microsoft Entra ID. + +- `-GroupLifecyclePolicyId` parameter specifies the ID of the Lifecycle Policy to be modified. +- `-GroupLifetimeInDays` parameter specifies the lifetime of the groups in the policy to 200 days. The GroupLifetimeInDays represents the number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. +- `-AlternateNotificationEmails` parameter specifies the email address that receives notifications about the policy. Multiple email address can be defined by separating email address with a semicolon. +- `-ManagedGroupTypes` parameter specifies which office 365 groups the policy applies to. Possible values are `All`, `Selected`, or `None`. +In this case, 'All' suggests that the policy manages all types of groups. + +## Parameters + +### -AlternateNotificationEmails + +Notification emails for groups that have no owners are sent to these email addresses. +List of email addresses separated by a ";". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifetimeInDays + +The number of days a group can exist before it needs to be renewed. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GroupLifecyclePolicyId + +Specifies the ID of a groupLifecyclePolicies object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ManagedGroupTypes + +Allows the admin to select which office 365 groups the policy applies to. + +- "None" will create the policy in a disabled state. +- "All" will apply the policy to every Office 365 group in the tenant. +- "Selected" will allow the admin to choose specific Office 365 groups that the policy applies to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaGroupLifecyclePolicy](Get-EntraBetaGroupLifecyclePolicy.md) + +[New-EntraBetaGroupLifecyclePolicy](New-EntraBetaGroupLifecyclePolicy.md) + +[Remove-EntraBetaGroupLifecyclePolicy](Remove-EntraBetaGroupLifecyclePolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md b/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md new file mode 100644 index 0000000000..a9ab01b28c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md @@ -0,0 +1,148 @@ +--- +title: Set-EntraBetaObjectSetting +description: This article provides details on the Set-EntraBetaObjectSetting command. + + +ms.topic: reference +ms.date: 08/13/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaObjectSetting + +schema: 2.0.0 +--- + +# Set-EntraBetaObjectSetting + +## Synopsis + +Updates object settings. + +## Syntax + +```powershell +Set-EntraBetaObjectSetting + -Id + -DirectorySetting + -TargetType + -TargetObjectId + [] +``` + +## Description + +The `Set-EntraBetaObjectSetting` cmdlet updates the settings for an object in Microsoft Entra ID. + +## Examples + +### Example 1: Updates the settings + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$template= Get-EntraBetaDirectorySettingTemplate | ? {$_.displayname -eq "Group.Unified.Guest"} +$settingsCopy = $template.CreateDirectorySetting() +$settingsCopy["AllowToAddGuests"]=$True +$params = @{ + TargetType = 'groups' + TargetObjectId = '22cc22cc-dd33-ee44-ff55-66aa66aa66aa' + DirectorySetting = $settingsCopy + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Set-EntraBetaObjectSetting @params +``` + +This command updated the settings object. + +- `-TargetType` Parameter specifies the type of the directory object. +- `-TargetObjectId` Parameter specifies the ID of directory object to which to assign settings. +- `-DirectorySetting` Parameter Create a new setting using templates from `DirectorySettingTemplates` +- `-Id` Parameter specifies the ID of a settings object. + +## Parameters + +### -DirectorySetting + +Specifies a DirectorySetting object. + +```yaml +Type: DirectorySetting +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a settings object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetObjectId + +Specifies the object ID of directory object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TargetType + +Specifies the target type of a directory object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaObjectSetting](Get-EntraBetaObjectSetting.md) + +[New-EntraBetaObjectSetting](New-EntraBetaObjectSetting.md) + +[Remove-EntraBetaObjectSetting](Remove-EntraBetaObjectSetting.md) diff --git a/moduleVNext/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md b/moduleVNext/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md new file mode 100644 index 0000000000..bdb7fd2d8a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md @@ -0,0 +1,130 @@ +--- +title: Get-EntraBetaPrivateAccessApplicationSegment +description: This article provides details on the Get-EntraBetaPrivateAccessApplicationSegment command. + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: andres-canello +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: +schema: 2.0.0 +--- + +# Get-EntraBetaPrivateAccessApplicationSegment + +## Synopsis + +Retrieves a list of all application segments associated to a Private Access application, or if specified, details of a specific application segment. + +## Description + +The `Get-EntraBetaPrivateAccessApplicationSegment` cmdlet retrieves a list of all application segments associated to a Private Access application, or if specified, details of a specific application segment. + +## Examples + +### Example 1: Retrieve all application segments associated to an application + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId +Get-EntraBetaPrivateAccessApplicationSegment -ObjectId $ApplicationObjectId +``` + +```Output +destinationHost : 10.1.1.20 +destinationType : ip +port : 0 +ports : {22-22} +protocol : tcp +id : cccc2222-dd33-4444-55ee-666666ffffff +``` + +This command retrieves all application segments for an application. + +### Example 2: Retrieve a specific application segment associated to an application + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId + +$params = @{ + ObjectId = $ApplicationObjectId + ApplicationSegmentId = 'cccc2222-dd33-4444-55ee-666666ffffff' +} + +Get-EntraBetaPrivateAccessApplicationSegment @params +``` + +```Output +destinationHost : 10.1.1.20 +destinationType : ip +port : 0 +ports : {22-22} +protocol : tcp +id : cccc2222-dd33-4444-55ee-666666ffffff +``` + +This example demonstrates how to retrieve information for a specific application segment. + +## Parameters + +### -ObjectId + +The Object ID of a Private Access application object. + +```yaml +Type: System.String +Parameter Sets: AllApplicationSegments, SingleApplicationSegment +Aliases: id + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -ApplicationSegmentId + +Specifies a specific application segment to retrieve. + +```yaml +Type: System.String +Parameter Sets: SingleApplicationSegment +Aliases: + +Required: False +Position: 2, Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) + +[Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) + +[New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md) + diff --git a/moduleVNext/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md b/moduleVNext/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md new file mode 100644 index 0000000000..96cb1b52d7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md @@ -0,0 +1,223 @@ +--- +title: New-EntraBetaPrivateAccessApplicationSegment +description: This article provides details on the New-EntraBetaPrivateAccessApplicationSegment command. + +ms.topic: reference +ms.date: 07/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: andres-canello +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: +schema: 2.0.0 +--- + +# New-EntraBetaPrivateAccessApplicationSegment + +## Synopsis + +Creates an application segment associated to a Private Access application. + +## Description + +The `New-EntraBetaPrivateAccessApplicationSegment` cmdlet creates an application segment associated to a Private Access application. + +## Examples + +### Example 1: Create a simple application segment + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId + +$params = @{ + ObjectId = $ApplicationObjectId + DestinationHost = 'ssh.contoso.local' + Ports = 22 + Protocol = 'TCP' + DestinationType = 'FQDN' +} + +New-EntraBetaPrivateAccessApplicationSegment @params +``` + +```Output +destinationHost : ssh.contoso.local +destinationType : FQDN +port : 0 +ports : {22-22} +protocol : tcp +id : cccc2222-dd33-4444-55ee-666666ffffff +``` + +### Example 2: Create an application segment using ranges of IPs and multiple ports + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId + +$params = @{ + ObjectId = $ApplicationObjectId + DestinationHost = '192.168.1.100..192.168.1.110' + Ports = '22,3389' + Protocol = 'TCP,UDP' + DestinationType = 'ipRange' +} + +New-EntraBetaPrivateAccessApplicationSegment @params +``` + +```Output +destinationHost : 192.168.1.100..192.168.1.110 +destinationType : ipRange +port : 0 +ports : {22-22, 3389-3389} +protocol : tcp,udp +id : cccc2222-dd33-4444-55ee-666666ffffff +``` + +### Example 3: Create application segment using an input file + +AppSegments.csv + +AppObjectId,DestHost,ports,protocol,type\ +00001111-aaaa-2222-bbbb-3333cccc4444,10.106.97.0/24,"1-21,23-442,444-65535","TCP,udp",ipRangeCidr\ +00001111-aaaa-2222-bbbb-3333cccc4444,10.106.96.0/24,"1-21,23-442,444-65535","udp",ipRangeCidr\ +00001111-aaaa-2222-bbbb-3333cccc4444,10.106.95.0/24,"1-21","udp",ipRangeCidr + +CreateAppSegments.ps1 + +```powershell +$csvFile = "C:\temp\AppSegments.csv" + +# Assuming the CSV file has columns named 'AppObjectId', 'DestHost', 'ports', 'protocol', 'type' +$variables = Import-Csv $csvFile + +# Loop through each row of the CSV and execute the command for each set of variables +foreach ($variable in $variables) { + $AppObjectId = $variable.AppObjectId + $DestHost = $variable.DestHost + $ports = $variable.ports -split "," + $protocol = $variable.protocol -split "," + $type = $variable.type + + # Execute the command + $params = @{ + ObjectId = $AppObjectId + DestinationHost = $DestHost + Ports = $ports + Protocol = $protocol + DestinationType = $type + } + + New-EntraBetaPrivateAccessApplicationSegment @params +} +``` + +## Parameters + +### -ObjectId + +The object ID of a Private Access application object. + +```yaml +Type: System.String +Parameter Sets: +Aliases: id + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -DestinationHost + +Destination host for the application segment. It can be an IP address, a range of IPs (10.10.10.1..10.10.10.200), a CIDR range (10.1.1.0/24) or an FQDN (ssh.contoso.local). Additionally, DNS suffixes for Quick Access can be created with dnsSuffix. + +```yaml +Type: System.String +Parameter Sets: +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Ports + +Ports for the application segment. It can be a single port, a range (1..100) or a list (22,3389). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Protocol + +Protocol for the application segment. It can be a single protocol (TCP) or a list (TCP,UDP). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationType + +Destination type for the application segment. It can be "ipAddress", "dnsSuffix", "ipRangeCidr", "ipRange", or "FQDN". + +```yaml +Type: System.String +Parameter Sets: +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS + +[Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md) + +[Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md b/moduleVNext/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md new file mode 100644 index 0000000000..47683fd025 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraBetaPrivateAccessApplicationSegment +description: This article provides details on the Remove-EntraBetaPrivateAccessApplicationSegment command. + +ms.topic: reference +ms.date: 07/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: andres-canello +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: +schema: 2.0.0 +--- + +# Remove-EntraBetaPrivateAccessApplicationSegment + +## Synopsis + +Removes an application segment associated to a Private Access application. + +## Description + +The `Remove-EntraBetaPrivateAccessApplicationSegment` cmdlet removes application segments associated to a Private Access application. + +## Examples + +### Example 1: Delete an application segment + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId +$ApplicationSegmentId = (Get-EntraBetaPrivateAccessApplicationSegment -ObjectId $ApplicationObjectId -Top 1).Id + +$params = @{ + ObjectId = $ApplicationObjectId + ApplicationSegmentId = $ApplicationSegmentId +} + +Remove-EntraBetaPrivateAccessApplicationSegment @params +``` + +This example shows how to remove an application segment associated to a Private Access application. + +- `ObjectId` is the application Object ID of the Private Access Application. +- `ApplicationSegmentId` is the application segment identifier to be deleted. + +## Parameters + +### -ObjectId + +The object ID of a Private Access application object. + +```yaml +Type: System.String +Parameter Sets: +Aliases: id + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -ApplicationSegmentId + +The application segment ID of the application segment to be deleted. + +```yaml +Type: System.String +Parameter Sets: +Aliases: + +Required: True +Position: 2, Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS + +[Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md) + +[New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md) + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md b/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md new file mode 100644 index 0000000000..d95e8f07b1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md @@ -0,0 +1,153 @@ +--- +title: Get-EntraBetaApplicationSignInDetailedSummary +description: This article provides details on the Get-EntraBetaApplicationSignInDetailedSummary command. + +ms.topic: reference +ms.date: 07/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInDetailedSummary + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationSignInDetailedSummary + +## Synopsis + +Get detailed sign in summaries. + +## Syntax + +```powershell +Get-EntraBetaApplicationSignInDetailedSummary + [-Top ] + [-Filter ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationSignInDetailedSummary` cmdlet gets Microsoft Entra ID sign ins, grouped by application, date, and sign in status. + +## Examples + +### Example 1: Get sign in detailed summary + +```powershell +Connect-Entra -Scopes 'Reports.Read.All' +Get-EntraBetaApplicationSignInDetailedSummary +``` + +```Output +Id AggregatedEventDateTime AppDisplayName AppId SignInCount +-- ----------------------- -------------- ----- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 08-07-2024 00:00:00 Graph Explorer 00001111-aaaa-2222-bbbb-3333cccc4444 3 +bbbbbbbb-1111-2222-3333-cccccccccccc 04-07-2024 00:00:00 Graph Explorer 11112222-bbbb-3333-cccc-4444dddd55551 +cccccccc-2222-3333-4444-dddddddddddd 05-07-2024 00:00:00 Graph Explorer 22223333-cccc-4444-dddd-5555eeee6666 4 +dddddddd-3333-4444-5555-eeeeeeeeeeee 19-06-2024 00:00:00 Azure Portal 33334444-dddd-5555-eeee-6666ffff77773 +eeeeeeee-4444-5555-6666-ffffffffffff 27-06-2024 00:00:00 Azure Portal 44445555-eeee-6666-ffff-7777aaaa8888 2 +ffffffff-5555-6666-7777-aaaaaaaaaaaa 03-07-2024 00:00:00 Azure Portal 55556666-ffff-7777-aaaa-8888bbbb9999 1 +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 01-07-2024 00:00:00 Azure Portal 66667777-aaaa-8888-bbbb-9999cccc0000 13 +bbbbbbbb-7777-8888-9999-cccccccccccc 28-06-2024 00:00:00 Azure Portal 77776666-aaaa-9999-bbbb-0000cccc1111 9 +``` + +This example returns all sign ins to Microsoft Entra ID Portal. + +### Example 2: Get sign in detailed summary by application and date + +```powershell +Connect-Entra -Scopes 'Reports.Read.All' +$params = @{ + Filter = "appDisplayName eq 'Azure Portal' AND aggregatedEventDateTime gt 2024-06-01 AND aggregatedEventDateTime lt 2024-07-01" +} +Get-EntraBetaApplicationSignInDetailedSummary @params +``` + +```Output +Id AggregatedEventDateTime AppDisplayName AppId SignInCount +-- ----------------------- -------------- ----- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 27-06-2024 00:00:00 Azure Portal 00001111-aaaa-2222-bbbb-3333cccc4444 2 +bbbbbbbb-1111-2222-3333-cccccccccccc 28-06-2024 00:00:00 Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 9 +cccccccc-2222-3333-4444-dddddddddddd 21-06-2024 00:00:00 Azure Portal 22223333-cccc-4444-dddd-5555eeee6666 2 +dddddddd-3333-4444-5555-eeeeeeeeeeee 20-06-2024 00:00:00 Azure Portal 33334444-dddd-5555-eeee-6666ffff7777 3 +eeeeeeee-4444-5555-6666-ffffffffffff 20-06-2024 00:00:00 Azure Portal 44445555-eeee-6666-ffff-7777aaaa8888 1 +ffffffff-5555-6666-7777-aaaaaaaaaaaa 19-06-2024 00:00:00 Azure Portal 55556666-ffff-7777-aaaa-8888bbbb9999 3 +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 17-06-2024 00:00:00 Azure Portal 66667777-aaaa-8888-bbbb-9999cccc0000 3 +bbbbbbbb-7777-8888-9999-cccccccccccc 18-06-2024 00:00:00 Azure Portal 77776666-aaaa-9999-bbbb-0000cccc1111 6 +``` + +This example returns all sign ins to Microsoft Entra ID Portal for the month of June. + +### Example 3: Get top five sign ins + +```powershell +Connect-Entra -Scopes 'Reports.Read.All' +Get-EntraBetaApplicationSignInDetailedSummary -Top 5 +``` + +```Output +Id AggregatedEventDateTime AppDisplayName AppId SignInCount +-- ----------------------- -------------- ----- ----------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 27-06-2024 00:00:00 Azure Portal 00001111-aaaa-2222-bbbb-3333cccc4444 2 +bbbbbbbb-1111-2222-3333-cccccccccccc 28-06-2024 00:00:00 Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 9 +cccccccc-2222-3333-4444-dddddddddddd 21-06-2024 00:00:00 Azure Portal 22223333-cccc-4444-dddd-5555eeee6666 2 +dddddddd-3333-4444-5555-eeeeeeeeeeee 20-06-2024 00:00:00 Azure Portal 33334444-dddd-5555-eeee-6666ffff7777 3 +eeeeeeee-4444-5555-6666-ffffffffffff 20-06-2024 00:00:00 Azure Portal 44445555-eeee-6666-ffff-7777aaaa8888 1 +``` + +This example returns top five sign ins to Microsoft Entra ID portal. + +## Parameters + +### -Top + +The maximum number of records to return. + +```yaml +Type: Sysetm.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.GetApplicationSignInDetailedSummaryObjectsResponse + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md b/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md new file mode 100644 index 0000000000..a1c3cfc27f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md @@ -0,0 +1,166 @@ +--- +title: Get-EntraBetaApplicationSignInSummary +description: This article provides details on the Get-EntraBetaApplicationSignInSummary command. + +ms.topic: reference +ms.date: 07/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInSummary + +schema: 2.0.0 +--- + +# Get-EntraBetaApplicationSignInSummary + +## Synopsis + +Get sign in summary by last number of days. + +## Syntax + +```powershell +Get-EntraBetaApplicationSignInSummary + -Days + [-Top ] + [-Filter ] + [] +``` + +## Description + +The `Get-EntraBetaApplicationSignInSummary` cmdlet gets sign-in summaries for the last 7 or 30 days. + +Returns the properties below: + +- appDisplayName - the name of the application that the user signed into. +- failedSignInCount - count of failed sign-ins made by the application. +- successPercentage - the percentage of successful sign-ins made by the application. +- successfulSignInCount - count of successful sign-ins made by the application. + +## Examples + +### Example 1: Get sign in summary by application for the last week + +```powershell +Connect-Entra -Scopes 'Reports.Read.All' +Get-EntraBetaApplicationSignInSummary -Days 7 -Filter "appDisplayName eq 'Graph Explorer'" +``` + +```Output +Id AppDisplayName FailedSignInCount SuccessPercentage SuccessfulSignInCount +-- -------------- ----------------- ----------------- --------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer 0 100 14 +``` + +This example returns a summary of all sign ins to Graph Explorer for the last seven days. + +- `-Days` parameter specifies the number of past days summary contains. Valid values are only 7 and 30. + +### Example 2: Get sign in summaries for the last month + +```powershell +Connect-Entra -Scopes 'Reports.Read.All' +Get-EntraBetaApplicationSignInSummary -Days 30 +``` + +```Output +Id AppDisplayName FailedSignInCount SuccessPercentage SuccessfulSignInCount +-- -------------- ----------------- ----------------- --------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer 3 96.74 89 +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 3 99.15 350 +cccccccc-2222-3333-4444-dddddddddddd Microsoft Community v2 0 100 4 +``` + +This example returns summaries for all sign ins from the past 30 days. + +- `-Days` parameter specifies the number of past days summary contains. Valid values are only 7 and 30. + +### Example 3: Get top two sign in summaries for the last month + +```powershell +Connect-Entra -Scopes 'Reports.Read.All' +Get-EntraBetaApplicationSignInSummary -Days 30 -Top 2 +``` + +```Output +Id AppDisplayName FailedSignInCount SuccessPercentage SuccessfulSignInCount +-- -------------- ----------------- ----------------- --------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer 3 96.74 89 +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 3 99.15 350 +``` + +This example returns top two summaries sign ins from the past 30 days. + +- `-Days` parameter specifies the number of past days summary contains. Valid values are only 7 and 30. + +## Parameters + +### -Days + +Number of past days summary contains. +Valid values are 7 and 30 + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.GetApplicationSignInSummaryObjectsResponse + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md b/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md new file mode 100644 index 0000000000..2443efe016 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md @@ -0,0 +1,183 @@ +--- +title: Get-EntraBetaAuditDirectoryLog +description: This article provides details on the Get-EntraBetaAuditDirectoryLog command. + + +ms.topic: reference +ms.date: 06/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditDirectoryLog + +schema: 2.0.0 +--- + +# Get-EntraBetaAuditDirectoryLog + +## Synopsis + +Get directory audit logs. + +## Syntax + +```powershell +Get-EntraBetaAuditDirectoryLog + [-All] + [-Top ] + [-Filter ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaAuditDirectoryLog` cmdlet gets a Microsoft Entra ID audit log. +Retrieve audit logs from Microsoft Entra ID, covering logs from various services such as user, app, device, and group management, privileged identity management (PIM), access reviews, terms of use, identity protection, password management (SSPR and admin resets), and self-service group management. + +## Examples + +### Example 1: Get all logs + +```powershell + Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' + Get-EntraBetaAuditDirectoryLog -All +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId +-- ---------------- ------------------- -------- ------------- +Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd +Directory_bbbbbbbb-1111-2222-3333-cccccccccccc 17/07/2024 07:31:54 Update user UserManagement bbbb1111-cc22-3333-44dd-555555eeeeee +SSGM_cccccccc-2222-3333-4444-dddddddddddd 17/07/2024 07:13:08 GroupsODataV4_GetgroupLifecyclePolicies GroupManagement cccc2222-dd33-4444-55ee-666666ffffff + +``` + +This command gets all audit logs. + +### Example 2: Get first n logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraBetaAuditDirectoryLog -Top 1 +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId LoggedB + yServic + e +-- ---------------- ------------------- -------- ------------- ------- +Directory_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb_8IAPT_617717139 17/07/2024 08:55:34 Add service principal ApplicationManagement aaaa0000-bb11-2222-33cc-444444dddddd Core... + +``` + +This example returns the first N logs. + +### Example 3: Get audit logs containing a given ActivityDisplayName + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraBetaAuditDirectoryLog -Filter "ActivityDisplayName eq 'Update rollout policy of feature'" -Top 1 +``` + +```Output +Id ActivityDateTime ActivityDisplayName Category CorrelationId +-- ---------------- ------------------- -------- ------------- +Application Proxy_aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb 16/07/2024 05:13:49 Update rollout policy of feature Authentication aaaa0000-bb11-2222-33cc-444444dddddd +``` + +This command shows how to get audit logs by ActivityDisplayName. + +### Example 4: Get all audit logs with a given result + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All, Directory.Read.All' +Get-EntraBetaAuditDirectoryLog -Filter "result eq 'failure'" -All +``` + +This command shows how to get audit logs by the result. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraBetaAuditDirectoryLogs` is an alias for `Get-EntraBetaAuditDirectoryLog`. + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md b/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md new file mode 100644 index 0000000000..1730056572 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md @@ -0,0 +1,198 @@ +--- +title: Get-EntraBetaAuditSignInLog +description: This article provides details on the Get-EntraBetaAuditSignInLog command. + +ms.topic: reference +ms.date: 07/15/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditSignInLog + +schema: 2.0.0 +--- + +# Get-EntraBetaAuditSignInLog + +## Synopsis + +Get audit logs of sign-ins. + +## Syntax + +```powershell +Get-EntraBetaAuditSignInLog + [-All] + [-Top ] + [-Filter ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaAuditSignInLog` cmdlet gets the Microsoft Entra ID sign-in log. + +In addition to delegated permissions, the signed-in user must belong to at least one of the following Microsoft Entra roles to read sign-in reports: + +- Global Reader +- Reports Reader +- Security Administrator +- Security Operator +- Security Reader + +## Examples + +### Example 1: Get all logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraBetaAuditSignInLog -All +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none +cccccccc-2222-3333-4444-dddddddddddd Azure Active Directory PowerShell 22223333-cccc-4444-dddd-5555eeee6666 {} none +dddddddd-3333-4444-5555-eeeeeeeeeeee Azure Active Directory PowerShell 33334444-dddd-5555-eeee-6666ffff7777 {} none +``` + +This example returns all audit logs of sign-ins. + +### Example 2: Get the first two logs + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraBetaAuditSignInLog -Top 2 +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Azure Active Directory PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 {} none +bbbbbbbb-1111-2222-3333-cccccccccccc Azure Portal 11112222-bbbb-3333-cccc-4444dddd5555 {} none +``` + +This example returns the first two audit logs of sign-ins. + +### Example 3: Get audit logs containing a given AppDisplayName + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraBetaAuditSignInLog -Filter "AppDisplayName eq 'Graph Explorer'" -Top 1 +``` + +```Output +Id AppDisplayName AppId AppTokenProtectionStatus AuthenticationMethodsUsed AuthenticationProtocol +-- -------------- ----- ------------------------ ------------------------- ---------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb Graph Explorer PowerShell 00001111-aaaa-2222-bbbb-3333cccc4444 +``` + +This example demonstrates how to retrieve sign-in logs by AppDisplayName. + +### Example 4: Get all sign-in logs between dates + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +Get-EntraBetaAuditSignInLog -Filter "createdDateTime ge 2024-07-01T00:00:00Z and createdDateTime le 2024-07-14T23:59:59Z" +``` + +This example shows how to retrieve sign-in logs between dates. + +### Example 5: List failed sign-ins for a user + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +$failedSignIns = Get-EntraBetaAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" +$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize +``` + +This example demonstrates how to retrieve failed sign-ins for a user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +The OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +`Get-EntraBetaAuditSignInLogs` is an alias for `Get-EntraBetaAuditSignInLog`. + + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md new file mode 100644 index 0000000000..e5b502700a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md @@ -0,0 +1,106 @@ +--- +title: Add-EntraBetaFeatureRolloutPolicyDirectoryObject +description: This article provides details on the Add-EntraBetaFeatureRolloutPolicyDirectoryObject command. + + +ms.topic: reference +ms.date: 07/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject + +schema: 2.0.0 +--- + +# Add-EntraBetaFeatureRolloutPolicyDirectoryObject + +## Synopsis + +Allows an admin to add a group to the cloud authentication roll-out policy in Microsoft Entra ID. +Users in this group start authenticating to the cloud per policy. + +## Syntax + +```powershell +Add-EntraBetaFeatureRolloutPolicyDirectoryObject + -Id + -RefObjectId + [] +``` + +## Description + +An admin uses `Add-EntraBetaFeatureRolloutPolicyDirectoryObject` cmdlet to add a group to the cloud authentication roll-out policy. +Users in these groups start authenticating against the cloud per policy (for example, +with Seamless single sign-on or not, or whether Passthrough auth or not). Specify `Id` and `RefObjectId` parameter to add a group to the cloud authentication roll-out policy. + +## Examples + +### Example 1: Adds a group to the cloud authentication roll-out policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + RefObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Add-EntraBetaFeatureRolloutPolicyDirectoryObject @params +``` + +This command adds a group to the cloud authentication roll-out policy in Microsoft Entra ID. + +- `-Id` Parameter specifies the ID of the cloud authentication roll-out policy. +- `-RefObjectId` Parameter specifies the ID of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +The unique identifier of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraBetaFeatureRolloutPolicyDirectoryObject](Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md new file mode 100644 index 0000000000..7d3654ef17 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md @@ -0,0 +1,102 @@ +--- +title: Add-EntraBetaServicePrincipalPolicy +description: This article provides details on the Add-EntraBetaServicePrincipalPolicy command. + + +ms.topic: reference +ms.date: 07/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalPolicy + +schema: 2.0.0 +--- + +# Add-EntraBetaServicePrincipalPolicy + +## Synopsis + +Adds a servicePrincipal policy. + +## Syntax + +```powershell +Add-EntraBetaServicePrincipalPolicy + -Id + -RefObjectId + [] +``` + +## Description + +The `Add-EntraBetaServicePrincipalPolicy` cmdlet adds a service principal policy. Specify the `Id` and `PolicyId` parameter to add a specific servicePrincipal policy. + +## Examples + +### Example 1: Add a service principal policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.All, Application.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-1111-1111-cccccccccccc' + RefObjectId = 'ffffffff-5555-6666-7777-aaaaaaaaaaaa' +} +Add-EntraBetaServicePrincipalPolicy @params +``` + +This example demonstrates how to add a policy to a service principal in Microsoft Entra ID. + +## Parameters + +### -RefObjectId + +Specifies the object Id of the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The ID of the Service Principal for which you need to set the policy + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaServicePrincipalPolicy](Get-EntraBetaServicePrincipalPolicy.md) + +[Remove-EntraBetaServicePrincipalPolicy](Remove-EntraBetaServicePrincipalPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md new file mode 100644 index 0000000000..e4e637feae --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md @@ -0,0 +1,148 @@ +--- +title: Get-EntraBetaAuthorizationPolicy +description: This article provides details on the Get-EntraBetaAuthorizationPolicy command. + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuthorizationPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaAuthorizationPolicy + +## Synopsis + +Gets an authorization policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaAuthorizationPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaAuthorizationPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaAuthorizationPolicy` cmdlet gets a Microsoft Entra ID authorization policy. + +## Examples + +### Example 1: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaAuthorizationPolicy +``` + +### Example 2: Get an authorization policy by ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaAuthorizationPolicy -Id 'authorizationPolicy' | Format-List +``` + +```Output +DefaultUserRolePermissions : @{AllowedToCreateApps=True; AllowedToCreateSecurityGroups=True; AllowedToCreateTenants=True; AllowedToReadBitlockerKeysForOwnedDevice=True; AllowedToReadOtherUsers=True; AdditionalProperties=} +AllowEmailVerifiedUsersToJoinOrganization : False +AllowInvitesFrom : everyone +AllowUserConsentForRiskyApps : +AllowedToSignUpEmailBasedSubscriptions : True +AllowedToUseSspr : True +BlockMsolPowerShell : False +DefaultUserRoleOverrides : +DeletedDateTime : +Description : Used to manage authorization related settings across the company. +DisplayName : Authorization Policy +EnabledPreviewFeatures : {} +GuestUserRoleId : 10dae51f-b6af-4016-8d66-8c2a99b929b3 +Id : authorizationPolicy +PermissionGrantPolicyIdsAssignedToDefaultUserRole : {ManagePermissionGrantsForSelf.microsoft-user-default-legacy, ManagePermissionGrantsForOwnedResource.microsoft-dynamically-managed-permissions-for-team, + ManagePermissionGrantsForOwnedResource.microsoft-dynamically-managed-permissions-for-chat} +AdditionalProperties : {} +``` + +This example gets the Microsoft Entra ID authorization policy. + +- `-Id` parameter specifies the unique identifier of the authorization policy. + +The response properties are: + +- `allowedToSignUpEmailBasedSubscriptions` - indicates whether users can sign up for email based subscriptions. +- `allowedToUseSSPR` - indicates whether administrators of the tenant can use the Self-Service Password Reset (SSPR). +- `allowEmailVerifiedUsersToJoinOrganization` - indicates whether a user can join the tenant by email validation. +- `allowInvitesFrom` - indicates who can invite guests to the organization. Possible values are: `none`, `adminsAndGuestInviters`, `adminsGuestInvitersAndAllMembers`, `everyone`. `everyone` is the default setting for all cloud environments except US Government. +- `allowUserConsentForRiskyApps` - indicates whether user consent for risky apps is allowed. Default value is `false`. We recommend that you keep the value set to `false`. +- `blockMsolPowerShell` - to disable the use of the MSOnline PowerShell module set this property to `true`. This also disables user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This doesn't affect Microsoft Entra Connect or Microsoft Graph. +- `defaultUserRolePermissions` - specifies certain customizable permissions for default user role. +- `description` - description of this policy. +- `displayName` - display name for this policy. +- `enabledPreviewFeatures` - list of features enabled for private preview on the tenant. +- `guestUserRoleId` -represents role templateId for the role that should be granted to guests. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). +- `permissionGrantPolicyIdsAssignedToDefaultUserRole` - indicates if user consent to apps is allowed, and if it is, the app consent policy that governs the permission for users to grant consent. Values should be in the format `managePermissionGrantsForSelf.{id}` for user consent policies or `managePermissionGrantsForOwnedResource.{id}` for resource-specific consent policies, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. + +## Parameters + +### -Id + +Specifies the unique identifier of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Set-EntraBetaAuthorizationPolicy](Set-EntraBetaAuthorizationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md new file mode 100644 index 0000000000..f67b82e7a8 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md @@ -0,0 +1,136 @@ +--- +title: Get-EntraBetaConditionalAccessPolicy +description: This article provides details on the Get-EntraBetaConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaConditionalAccessPolicy + +## Synopsis + +Gets a Microsoft Entra ID conditional access policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaConditionalAccessPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaConditionalAccessPolicy + -PolicyId + [-Property ] + [] +``` + +## Description + +This cmdlet allows an admin to get the Microsoft Entra ID conditional access policy. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Retrieves a list of all conditional access policies in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaConditionalAccessPolicy +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State +-- --------------- ----------- ----------- ---------------- ----- +eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled +ffffffff-5555-6666-7777-aaaaaaaaaaaa 2/27/2024 6:26:00 AM ConditionalAccessPolicy 2/29/2024 2:41:34 PM disabled +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 2/27/2024 6:30:48 AM ConditionalAccessPolicy 2/29/2024 2:43:53 PM disabled +``` + +This example retrieves a list of all conditional access policies in Microsoft Entra ID. + +### Example 2: Retrieves a conditional access policy in Microsoft Entra ID with given ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaConditionalAccessPolicy -PolicyId 'eeeeeeee-4444-5555-6666-ffffffffffff' +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State +-- --------------- ----------- ----------- ---------------- ----- +eeeeeeee-4444-5555-6666-ffffffffffff 2/27/2024 6:23:21 AM ConditionalAccessPolicy 2/29/2024 2:41:17 PM disabled +``` + +This example retrieves a specified conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of a conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaConditionalAccessPolicy](New-EntraBetaConditionalAccessPolicy.md) + +[Set-EntraBetaConditionalAccessPolicy](Set-EntraBetaConditionalAccessPolicy.md) + +[Remove-EntraBetaConditionalAccessPolicy](Remove-EntraBetaConditionalAccessPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md new file mode 100644 index 0000000000..7ed0fce4e7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md @@ -0,0 +1,209 @@ +--- +title: Get-EntraBetaFeatureRolloutPolicy +description: This article provides details on the Get-EntraBetaFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaFeatureRolloutPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaFeatureRolloutPolicy + +## Synopsis + +Gets the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaFeatureRolloutPolicy + [-Filter ] + [-Property ] + [] +``` + +### GetVague + +```powershell +Get-EntraBetaFeatureRolloutPolicy + [-SearchString ] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaFeatureRolloutPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaFeatureRolloutPolicy` cmdlet allows an admin to get the policy for cloud authentication rollout (users moving from federation to cloud auth) in Microsoft Entra ID. +This policy consists of one or two FeatureRolloutPolicy objects. These objects hold the groups assigned for cloud authentication (Pass-through authentication or Password Hash Sync) and groups assigned for Seamless single sign-on. + +## Examples + +### Example 1: Retrieves a list of all cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaFeatureRolloutPolicy +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False True +11bb11bb-cc22-dd33-ee44-55ff55ff55ff Feature-Rollout-Policy change emailAsAlternateId False False +``` + +This command retrieves a list of all cloud authentication roll-out policies in Microsoft Entra ID. + +### Example 2: Retrieves cloud authentication roll-out in Microsoft Entra ID with given ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaFeatureRolloutPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +11bb11bb-cc22-dd33-ee44-55ff55ff55ff Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False True +``` + +This example retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +- `-Id` - Specify The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +### Example 3: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Search String + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaFeatureRolloutPolicy -SearchString 'Feature-Rollout-Policytest' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +11bb11bb-cc22-dd33-ee44-55ff55ff55ff Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False +``` + +This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +### Example 4: Retrieves cloud authentication roll-out in Microsoft Entra ID with given Filter parameter + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +Get-EntraBetaFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policytest'" +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +11bb11bb-cc22-dd33-ee44-55ff55ff55ff Feature-Rollout-test Feature-Rollout-Policytest passwordHashSync False +``` + +This command retrieves the policy for cloud authentication roll-out policy in Microsoft Entra ID. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetVague +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +Controls which objects are returned. + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.MsFeatureRolloutPolicy + +## Notes + +## Related Links + +[New-EntraBetaFeatureRolloutPolicy](New-EntraBetaFeatureRolloutPolicy.md) + +[Set-EntraBetaFeatureRolloutPolicy](Set-EntraBetaFeatureRolloutPolicy.md) + +[Remove-EntraBetaFeatureRolloutPolicy](Remove-EntraBetaFeatureRolloutPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md new file mode 100644 index 0000000000..291932b8fb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md @@ -0,0 +1,140 @@ +--- +title: Get-EntraBetaIdentityProvider +description: This article provides details on the Get-EntraBetaIdentityProvider command. + + +ms.topic: reference +ms.date: 08/06/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaIdentityProvider + +schema: 2.0.0 +--- + +# Get-EntraBetaIdentityProvider + +## Synopsis + +This cmdlet is used to retrieve the configured identity providers in the directory. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaIdentityProvider + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaIdentityProvider + -IdentityProviderBaseId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaIdentityProvider` cmdlet is used to retrieve the identity providers that have been configured in the directory. +These identity providers can be used to allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C. + +Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. +For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. +The Gmail user will use their Google account credentials to authenticate and access the documents. + +The current set of identity providers can be Microsoft, Google, Facebook, Amazon, or LinkedIn. + +## Examples + +### Example 1: Retrieve all identity providers + +```powershell +Connect-Entra -Scopes 'IdentityProvider.Read.All' +Get-EntraBetaIdentityProvider +``` + +```Output +Id DisplayName +-- ----------- +AADSignup-OAUTH Directory Sign up +Google-OAUTH Test +EmailOtpSignup-OAUTH Email One Time Passcode +MSASignup-OAUTH Microsoft Account +``` + +This example retrieves the list of all configured identity providers and their properties. + +### Example 2: Retrieve identity provider by Id + +```powershell +Connect-Entra -Scopes 'IdentityProvider.Read.All' +Get-EntraBetaIdentityProvider -IdentityProviderBaseId 'Google-OAUTH' +``` + +```Output +Id DisplayName +-- ----------- +Google-OAUTH GoogleName +``` + +This example retrieves the properties for the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. + +## Parameters + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md new file mode 100644 index 0000000000..f8f37121cf --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md @@ -0,0 +1,138 @@ +--- +title: Get-EntraBetaNamedLocationPolicy +description: This article provides details on the Get-EntraBetaNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 08/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaNamedLocationPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaNamedLocationPolicy + +## Synopsis + +Gets an Microsoft Entra ID named location policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaNamedLocationPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaNamedLocationPolicy + -PolicyId + [-Property ] + [] +``` + +## Description + +This cmdlet allows an admin to get the Microsoft Entra ID named location policies. + +Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. + +## Examples + +### Example 1: Retrieves a list of all named location policies in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaNamedLocationPolicy +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee 31/07/2024 9:53:10 NamedLocation 31/07/2024 9:53:10 +eeeeeeee-4444-5555-6666-ffffffffffff 31/07/2024 4:38:42 NamedLocation1 31/07/2024 4:38:42 +ffffffff-5555-6666-7777-aaaaaaaaaaaa 01/08/2024 4:39:42 NamedLocation2 01/08/2024 4:39:42 +aaaaaaaa-6666-7777-8888-bbbbbbbbbbbb 01/08/2024 4:57:03 NamedLocation3 01/08/2024 4:57:03 +``` + +This command retrieves a list of all named location policies in Microsoft Entra ID. + +### Example 2: Retrieves a named location policy by Id + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaNamedLocationPolicy -PolicyId 'dddddddd-3333-4444-5555-eeeeeeeeeeee' +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee 31/07/2024 9:53:10 NamedLocation 31/07/2024 9:53:10 +``` + +This example retrieves a specified named location policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the policy Id of a named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaNamedLocationPolicy](New-EntraBetaNamedLocationPolicy.md) + +[Set-EntraBetaNamedLocationPolicy](Set-EntraBetaNamedLocationPolicy.md) + +[Remove-EntraBetaNamedLocationPolicy](Remove-EntraBetaNamedLocationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md new file mode 100644 index 0000000000..4212c9ca29 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md @@ -0,0 +1,190 @@ +--- +title: Get-EntraBetaOAuth2PermissionGrant +description: This article provides details on the Get-EntraBetaOAuth2PermissionGrant Command. + + +ms.topic: reference +ms.date: 10/16/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraBetaOAuth2PermissionGrant + +## Synopsis + +Gets OAuth2PermissionGrant entities. + +## Syntax + +```powershell +Get-EntraBetaOAuth2PermissionGrant + [-Top ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaOAuth2PermissionGrant` cmdlet gets OAuth2PermissionGrant entities in Microsoft Entra ID. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles are supported for this operation: + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator +- Directory Readers +- Global Reader + +## Examples + +### Example 1: Get the OAuth2 permission grants + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaOAuth2PermissionGrant +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals 1/3/2024 1:28:59 PM a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals 1/3/2024 1:28:59 PM b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal 1/3/2024 1:28:59 PM aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read +H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal 1/3/2024 1:28:59 PM aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read +``` + +This command gets the OAuth2 permission grants. + +### Example 2: Get all the OAuth2 permission grants + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaOAuth2PermissionGrant -All +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals 1/3/2024 1:28:59 PM a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals 1/3/2024 1:28:59 PM b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2y 22223333-cccc-4444-dddd-5555eeee6666 Principal 1/3/2024 1:28:59 PM aaaaaaaa-bbbb-cccc-1111-222222222222 c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 User.Read +H4iJ5kL6mN7oP8qR9sT0uV1wX2yZ3a 22223333-cccc-4444-dddd-5555eeee6666 Principal 1/3/2024 1:28:59 PM aaaaaaaa-bbbb-cccc-1111-222222222222 d3d3d3d3-eeee-ffff-aaaa-b4b4b4b4b4b4 ActivityFeed.Read ServiceHealth.Read +``` + +This command gets all the OAuth2 permission grants. + +### Example 3: Get OAuth2 permission grants for a user in a service principal + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +$user = Get-EntraBetaUser -UserId 'SawyerM@contoso.com' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Helpdesk Application'" +Get-EntraBetaOAuth2PermissionGrant | Where-Object {$_.ClientId -eq $servicePrincipal.Id -and $_.PrincipalId -eq $user.Id} | Format-List +``` + +```Output +ObjectId : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 +ClientId : 22223333-cccc-4444-dddd-5555eeee6666 +ConsentType : Principal +Id : E3fH4iJ5kL6mN7oP8qR9sT0uV1wX2 +PrincipalId : aaaaaaaa-bbbb-cccc-1111-222222222222 +ResourceId : c2c2c2c2-dddd-eeee-ffff-a3a3a3a3a3a3 +Scope : User.Read.All openid profile offline_access Organization.Read.All User.ReadWrite.All Device.Read.All Device.ReadWrite.All Directory.Read.All User.Read RoleManagement.ReadWrite.Directory Group.ReadWrite.All +AdditionalProperties : {} +``` + +This example gets the OAuth2 permission grants for a user in a service principal. + +### Example 4: Get top 2 OAuth2 permission grants record + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaOAuth2PermissionGrant -Top 2 +``` + +```output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ------------ ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals 1/3/2024 1:28:59 PM a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 User.ReadBasic.All +C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w 00001111-aaaa-2222-bbbb-3333cccc4444 AllPrincipals 1/3/2024 1:28:59 PM b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2 User.Read +``` + +This command gets top 2 OAuth2 permission grants records. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraBetaOAuth2PermissionGrant](Remove-EntraBetaOAuth2PermissionGrant.md) +[New-EntraBetaOAuth2PermissionGrant](New-EntraBetaOauth2PermissionGrant.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md new file mode 100644 index 0000000000..9329218395 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md @@ -0,0 +1,216 @@ +--- +title: Get-EntraBetaPermissionGrantConditionSet +description: This article provides details on the Get-EntraBetaPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 08/07/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Get-EntraBetaPermissionGrantConditionSet + +## Synopsis + +Get a Microsoft Entra ID permission grant condition set by ID. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPermissionGrantConditionSet + -ConditionSetType + -PolicyId + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaPermissionGrantConditionSet + -Id + -ConditionSetType + -PolicyId + [-Property ] + [] +``` + +## Description + +Get a Microsoft Entra ID permission grant condition set object by ID. + +## Examples + +### Example 1: Get all permission grant condition sets that are included in the permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' +} + +Get-EntraBetaPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets all permission grant condition sets that are included in the policy. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. + +### Example 2: Get all permission grant condition sets that are excluded in the permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'excludes' +} + +Get-EntraBetaPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +bbbbbbbb-1111-2222-3333-cccccccccccc False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +cccccccc-2222-3333-4444-dddddddddddd False {44445555-eeee-6666-ffff-7777gggg8888} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets all permission grant condition sets that are excluded in the policy. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. + +### Example 3: Get a permission grant condition set + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} + +Get-EntraBetaPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +dddddddd-3333-4444-5555-eeeeeeeeeeee False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command gets a permission grant condition set specified by Id. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of the permission grant condition set object. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet + +## Notes + +## Related Links + +[New-EntraBetaPermissionGrantConditionSet](New-EntraBetaPermissionGrantConditionSet.md) + +[Set-EntraBetaPermissionGrantConditionSet](Set-EntraBetaPermissionGrantConditionSet.md) + +[Remove-EntraBetaPermissionGrantConditionSet](Remove-EntraBetaPermissionGrantConditionSet.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md new file mode 100644 index 0000000000..8de32974f7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md @@ -0,0 +1,135 @@ +--- +title: Get-EntraBetaPermissionGrantPolicy +description: This article provides details on the Get-EntraBetaPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 06/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaPermissionGrantPolicy + +## Synopsis + +Gets a permission grant policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPermissionGrantPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaPermissionGrantPolicy + -Id + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaPermissionGrantPolicy` cmdlet gets a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Get all permission grant policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +Get-EntraBetaPermissionGrantPolicy +``` + +```Output +DeletedDateTime Description +--------------- ----------- + Includes all application permissions (app roles), for all APIs, for any client application. + Includes all chat resoruce-specific application permissions, for all APIs, for any client application. + (Deprecated) Includes all team resource-specific application permissions, for all APIs, for any client application. +``` + +This command gets all the permission grant policies. + +### Example 2: Get a permission grant policy by ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.PermissionGrant' +Get-EntraBetaPermissionGrantPolicy -Id 'testtenant-sampleapp-permissions' +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + Permissions for sample app in test tenant Sample app permissions testtenant-sampleapp-permissions +``` + +This command gets the specified permission grant policy. + +- `Id` parameter specifies the permission grant policy ID. + +## Parameters + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaPermissionGrantPolicy](New-EntraBetaPermissionGrantPolicy.md) + +[Set-EntraBetaPermissionGrantPolicy](Set-EntraBetaPermissionGrantPolicy.md) + +[Remove-EntraBetaPermissionGrantPolicy](Remove-EntraBetaPermissionGrantPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md new file mode 100644 index 0000000000..0b31518df9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md @@ -0,0 +1,197 @@ +--- +title: Get-EntraBetaPolicy +description: This article provides details on the Get-EntraBetaPolicy command. + + +ms.topic: reference +ms.date: 07/02/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaPolicy + +## Synopsis + +Gets a policy. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaPolicy + [-Top ] + [-All] + [] +``` + +### GetById + +```powershell +Get-EntraBetaPolicy + -Id + [-All] + [] +``` + +## Description + +The `Get-EntraBetaPolicy` cmdlet gets a policy in Microsoft Entra ID. Specify `Id` parameter to get a specific policy. + +## Examples + +### Example 1: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaPolicy +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc +{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example shows how to return all policies. + +### Example 2: Get policy using Display Name + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + Permissions consentable based on Microsoft's current recommendations. Microsoft User Default Recommended Policy microsoft-user-default-recommended +``` + +This example shows how to get a specific policy using Display Name. + +### Example 3: Get a policy with specific ID + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaPolicy -Id 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True +``` + +This example demonstrated how to receive policy with specific ID. + +- `Id` parameter specifies the unique policy ID, which you want to receive. In this example, `bbbbbbbb-1111-2222-3333-cccccccccccc` represents the ID of the policy. + +### Example 4: Get all policies + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaPolicy -All +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} Activepolicy bbbbbbbb-1111-2222-3333-cccccccccccc +{{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} PolicyDemo aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example demonstrates how to retrieve all policies in Microsoft Entra ID. + +### Example 5: Get the top one policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaPolicy -Top 1 +``` + +```Output +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +bbbbbbbb-1111-2222-3333-cccccccccccc passwordHashSync rollout policy passwordHashSync rollout policy passwordHashSync False True +``` + +This example demonstrates how to retrieve top one policies in Microsoft Entra ID. + +## Parameters + +### -Id + +The Id of the policy you want to retrieve. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -All + +List all policies. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaPolicy](New-EntraBetaPolicy.md) + +[Remove-EntraBetaPolicy](Remove-EntraBetaPolicy.md) + +[Set-EntraBetaPolicy](Set-EntraBetaPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md new file mode 100644 index 0000000000..dead6eaaf3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md @@ -0,0 +1,86 @@ +--- +title: Get-EntraBetaPolicyAppliedObject +description: This article provides details on the Get-EntraBetaPolicyAppliedObject command. + + +ms.topic: reference +ms.date: 08/13/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicyAppliedObject + +schema: 2.0.0 +--- + +# Get-EntraBetaPolicyAppliedObject + +## Synopsis + +Gets a policy-applied object from Microsoft Entra ID. + +## Syntax + +```powershell +Get-EntraBetaPolicyAppliedObject + -Id + [] +``` + +## Description + +The `Get-EntraBetaPolicyAppliedObject` cmdlet gets a policy-applied object from Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve a policy-applied object + +```powershell +Connect-Entra -Scopes 'Application.Read.All', 'Policy.ReadWrite.ApplicationConfiguration' +Get-EntraBetaPolicyAppliedObject -Id 'bbbbbbbb-1111-2222-3333-cccccccccccc' +``` + +```Output +Id DeletedDateTime +-- --------------- +aaaaaaaa-1111-1111-1111-000000000000 +bbbbcccc-1111-dddd-2222-eeee3333ffff +``` + +This command retrieves policy-applied object from Microsoft Entra ID. + +- `-Id` Parameter specifies ID of the policy for which you want to find the objects. + +## Parameters + +### -Id + +The ID of the policy for which you want to find the objects. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md new file mode 100644 index 0000000000..6fdd9cb6b9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md @@ -0,0 +1,89 @@ +--- +title: Get-EntraBetaServicePrincipalPolicy +description: This article provides details on the Get-EntraBetaServicePrincipalPolicy command. + + +ms.topic: reference +ms.date: 07/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaServicePrincipalPolicy + +## Synopsis + +Gets a servicePrincipal policy. + +## Syntax + +```powershell +Get-EntraBetaServicePrincipalPolicy + -Id + [] +``` + +## Description + +The `Get-EntraBetaServicePrincipalPolicy` cmdlet gets the policy of a service principal in Microsoft Entra ID. Specify the `Id` parameter to get a specific servicePrincipal policy. + +## Examples + +### Example 1: Get a policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.All', 'Application.ReadWrite.All' +Get-EntraBetaServicePrincipalPolicy -Id 'bbbbbbbb-1111-1111-1111-cccccccccccc' +``` + +```Output +DisplayName Id AppId SignInAudience ServicePrincipalType +----------- -- ----- -------------- -------------------- +demotest2 bbbbbbbb-1111-1111-1111-cccccccccccc ActivityBasedTimeoutPolicy +``` + +This command retrieves the policy for a specified service principal in Microsoft Entra ID. + +- `-Id` Parameter specifies the ID of the Service Principal. + +## Parameters + +### -Id + +The ID of the Service Principal for which you want to retrieve the policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaServicePrincipalPolicy](Add-EntraBetaServicePrincipalPolicy.md) + +[Remove-EntraBetaServicePrincipalPolicy](Remove-EntraBetaServicePrincipalPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md new file mode 100644 index 0000000000..a7ccc572a7 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md @@ -0,0 +1,167 @@ +--- +title: Get-EntraBetaTrustFrameworkPolicy +description: This article provides details on the Get-EntraBetaTrustFrameworkPolicy command. + + +ms.topic: reference +ms.date: 08/14/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy + +schema: 2.0.0 +--- + +# Get-EntraBetaTrustFrameworkPolicy + +## Synopsis + +Retrieves the created trust framework policies (custom policies) in the directory. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaTrustFrameworkPolicy + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaTrustFrameworkPolicy + -Id + [-OutputFilePath ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaTrustFrameworkPolicy` cmdlet retrieves the trust framework policies that have been created in the directory. + +## Examples + +### Example 1: Retrieves the list of all trust framework policies in the directory + +```powershell +Connect-Entra -Scopes 'Policy.Read.All', 'Policy.ReadWrite.TrustFramework' +Get-EntraBetaTrustFrameworkPolicy +``` + +```Output Id --- B2C_1A_SIGNUP_SIGNIN B2C_1A_TRUSTFRAMEWORKBASE +B2C_1A_TRUSTFRAMEWORKEXTENSIONS +``` + +This example retrieves the list of all trust framework policies in the directory. + +### Example 2: Retrieves the contents of the specified trust framework policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.All', 'Policy.ReadWrite.TrustFramework' +$params = @{ + Id = 'B2C_1A_SIGNUP_SIGNIN' +} +Get-EntraBetaTrustFrameworkPolicy @params +``` + +This example retrieves the contents of the specified trust framework policy. + +The contents of received trust framework policy are displayed on screen. + +- `-Id` Parameter specifies ID for a trust framework policy. + +### Example 3: Retrieves the contents of the specified trust framework policy on specific output file path + +```powershell +Connect-Entra -Scopes 'Policy.Read.All', 'Policy.ReadWrite.TrustFramework' +$params = @{ + Id = 'B2C_1A_SIGNUP_SIGNIN' + OutputFilePath = 'C:\RetrivedPolicy.xml' +} +Get-EntraBetaTrustFrameworkPolicy @params +``` + +This example retrieves the contents of the specified trust framework policy on specific output file path. + +- `-Id` Parameter specifies ID for a trust framework policy. +- `-OutputFilePath` Parameter specifies the path to the file used for retrieve the contents of trust framework policy. + +## Parameters + +### -Id + +The unique identifier for a trust framework policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OutputFilePath + +Path to the file used for retrieve the contents of trust framework policy. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaTrustFrameworkPolicy](New-EntraBetaTrustFrameworkPolicy.md) + +[Set-EntraBetaTrustFrameworkPolicy](Set-EntraBetaTrustFrameworkPolicy.md) + +[Remove-EntraBetaTrustFrameworkPolicy](Remove-EntraBetaTrustFrameworkPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md new file mode 100644 index 0000000000..4400167c9e --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md @@ -0,0 +1,165 @@ +--- +title: Get-EntraBetaTrustedCertificateAuthority +description: This article provides details on the Get-EntraBetaTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 08/13/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Get-EntraBetaTrustedCertificateAuthority + +## Synopsis + +Gets the trusted certificate authority. + +## Syntax + +```powershell +Get-EntraBetaTrustedCertificateAuthority + [-TrustedIssuer ] + [-TrustedIssuerSki ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaTrustedCertificateAuthority` cmdlet gets the trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaTrustedCertificateAuthority +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example3.crl +DeltaCrlDistributionPoint : https://example3.crl +TrustedCertificate : {48, 130, 3, 0…} +TrustedIssuer : CN=mscmdlet +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory. + +### Example 2: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuer + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaTrustedCertificateAuthority -TrustedIssuer 'CN=mscmdlet' +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example3.crl +DeltaCrlDistributionPoint : https://example3.crl +TrustedCertificate : {48, 130, 3, 0…} +TrustedIssuer : CN=mscmdlet +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuer. + +- `-TrustedIssuer` parameter specifies the trusted issuer. + +### Example 3: Retrieve the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki + +```powershell +Connect-Entra -Scopes 'Organization.Read.All' +Get-EntraBetaTrustedCertificateAuthority -TrustedIssuerSki '4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD' +``` + +```Output +AuthorityType : RootAuthority +CrlDistributionPoint : https://example3.crl +DeltaCrlDistributionPoint : https://example3.crl +TrustedCertificate : {48, 130, 3, 0…} +TrustedIssuer : CN=mscmdlet +TrustedIssuerSki : 4BA2D7AC2A5DF47C70E19E61EDFB4E62B3BF67FD +``` + +This command retrieves the trusted certificate authorities that are defined in your directory based on TrustedIssuerSki. + +- `-TrustedIssuerSki` parameter specifies the trusted issuer ski. + +## Parameters + +### -TrustedIssuer + +Specifies a trusted issuer. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -TrustedIssuerSki + +Specifies a trusted issuer ski. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaTrustedCertificateAuthority](New-EntraBetaTrustedCertificateAuthority.md) + +[Set-EntraBetaTrustedCertificateAuthority](Set-EntraBetaTrustedCertificateAuthority.md) + +[Remove-EntraBetaTrustedCertificateAuthority](Remove-EntraBetaTrustedCertificateAuthority.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md new file mode 100644 index 0000000000..5be6dba1e2 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md @@ -0,0 +1,311 @@ +--- +title: New-EntraBetaConditionalAccessPolicy +description: This article provides details on the New-EntraBetaConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaConditionalAccessPolicy + +schema: 2.0.0 +--- + +# New-EntraBetaConditionalAccessPolicy + +## Synopsis + +Creates a new conditional access policy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraBetaConditionalAccessPolicy + [-Id ] + [-SessionControls ] + [-ModifiedDateTime ] + [-CreatedDateTime ] + [-State ] + [-GrantControls ] + [-Conditions ] + [-DisplayName ] + [] +``` + +## Description + +This cmdlet allows an admin to create new conditional access policy in Microsoft Entra ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Creates a new conditional access policy in Microsoft Entra ID that require MFA to access Exchange Online + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = 'all' +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = 'OR' +$controls.BuiltInControls = 'mfa' +$params = @{ + DisplayName = 'MFA policy' + State = 'Enabled' + Conditions = $conditions + GrantControls = $controls + } + +New-EntraBetaConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State +-- --------------- ----------- ----------- ---------------- ----- +5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 31-07-2024 07:22:21 MFA policy enabled +``` + +This command creates a new conditional access policy in Microsoft Entra ID that requires MFA to access Exchange Online. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +### Example 2: Creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$conditions.Applications.IncludeApplications = '00000002-0000-0ff1-ce00-000000000000' +$conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$conditions.Users.IncludeUsers = 'all' +$conditions.Locations = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition +$conditions.Locations.IncludeLocations = '5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9' +$controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$controls._Operator = 'OR' +$controls.BuiltInControls = 'block' + +$params = @{ + DisplayName = 'MFA policy' + State = 'Enabled' + Conditions = $conditions + GrantControls = $controls +} + +New-EntraBetaConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State +-- --------------- ----------- ----------- ---------------- ----- +5eeeeee5-6ff6-7aa7-8bb8-9cccccccccc9 31-07-2024 07:22:21 MFA policy enabled +``` + +This command creates a new conditional access policy in Microsoft Entra ID that blocks access to Exchange Online from nontrusted regions. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. + +### Example 3: Use all conditions and controls + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' + +$Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") +$Condition.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition +$Condition.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" +$Condition.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition +$Condition.Users.IncludeUsers = "all" + +$Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$Controls._Operator = "AND" +$Controls.BuiltInControls = @("mfa") + +$SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls +$ApplicationEnforcedRestrictions = New-Object Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions +$ApplicationEnforcedRestrictions.IsEnabled = $true +$SessionControls.applicationEnforcedRestrictions = $ApplicationEnforcedRestrictions +$params = @{ + DisplayName = "ConditionalAccessPolicy" + Conditions = $conditions + GrantControls = $controls + SessionControls = $SessionControls + } +New-EntraBetaConditionalAccessPolicy @params +``` + +```Output +Id CreatedDateTime Description DisplayName ModifiedDateTime State +-- --------------- ----------- ----------- ---------------- ----- +aaaaaaaa-1111-1111-1111-000000000000 16/08/2024 08:09:34 ConditionalAccessPolicy enabled +``` + +This example creates new conditional access policy in Microsoft Entra ID with all the conditions and controls. + +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +## Parameters + +### -DisplayName + +Specifies the display name of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Conditions + +Specifies the conditions for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessConditionSet +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GrantControls + +Specifies the controls for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessGrantControls +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreatedDateTime + +The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. Readonly. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ModifiedDateTime + +The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2024 is 2024-01-01T00:00:00Z. Readonly. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionControls + +Enables limited experiences within specific cloud applications. + +```yaml +Type: ConditionalAccessSessionControls +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaConditionalAccessPolicy](Get-EntraBetaConditionalAccessPolicy.md) + +[Set-EntraBetaConditionalAccessPolicy](Set-EntraBetaConditionalAccessPolicy.md) + +[Remove-EntraBetaConditionalAccessPolicy](Remove-EntraBetaConditionalAccessPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md new file mode 100644 index 0000000000..8ffa2667de --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md @@ -0,0 +1,224 @@ +--- +title: New-EntraBetaFeatureRolloutPolicy +description: This article provides details on the New-EntraBetaFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/05/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaFeatureRolloutPolicy + +schema: 2.0.0 +--- + +# New-EntraBetaFeatureRolloutPolicy + +## Synopsis + +Allows an admin to create the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraBetaFeatureRolloutPolicy + -Feature + -IsEnabled + [-Description ] + [-IsAppliedToOrganization ] + [-AppliesTo ] + -DisplayName + [] +``` + +## Description + +The `New-EntraBetaFeatureRolloutPolicy` cmdlet allows an admin to create the policy for cloud authentication roll-out (users moving from federation to cloud auth) in Microsoft Entra ID. + +The policy admin can identify whether the users authenticate using password hashes in Microsoft Entra ID (Password hash-sync) or Microsoft Entra ID on-premises directly (Pass-through authentication). + +## Examples + +### Example 1: Creates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Feature = 'PassthroughAuthentication' + DisplayName = 'Passthrough Authentication Rollout Policy' + IsEnabled = $false +} +New-EntraBetaFeatureRolloutPolicy @params +``` + +```Output + +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee Passthrough Authentication Rollout Policy passthroughAuthentication False False +``` + +This example creates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. + +- `-IsEnabled` specifies the status of cloud authentication roll-out policy. + +### Example 2: Creates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Feature = 'PassthroughAuthentication' + DisplayName = 'FeatureRolloutPolicy' + IsEnabled = $false + IsAppliedToOrganization = $false +} +New-EntraBetaFeatureRolloutPolicy @params +``` + +```Output + +Id Description DisplayName Feature IsAppliedToOrganization IsEnabled +-- ----------- ----------- ------- ----------------------- --------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee FeatureRolloutPolicy passthroughAuthentication False False +``` + +This command creates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Feature` specifies a feature assigned to the cloud authentication roll-out policy. +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +- `-DisplayName` specifies the display name of the cloud authentication roll-out policy. + +- `-IsEnabled` specifies the status of cloud authentication roll-out policy. + +- `-IsAppliedToOrganization` specifies if the cloud authentication roll-out policy applied to the entire organization. + +## Parameters + +### -DisplayName + +Specifies the display name of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Feature + +Specifies a feature assigned to the cloud authentication roll-out policy. + +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +```yaml +Type: FeatureEnum +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies the status of cloud authentication roll-out policy. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliesTo + +Specifies a list of Microsoft Entra ID objects that is assigned to the feature. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAppliedToOrganization + +Specifies if the cloud authentication roll-out policy applied to the entire organization. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +### Microsoft.Online.Administration.MsFeatureRolloutPolicy + +## Notes + +## Related Links + +[Get-EntraBetaFeatureRolloutPolicy](Get-EntraBetaFeatureRolloutPolicy.md) + +[Set-EntraBetaFeatureRolloutPolicy](Set-EntraBetaFeatureRolloutPolicy.md) + +[Remove-EntraBetaFeatureRolloutPolicy](Remove-EntraBetaFeatureRolloutPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md new file mode 100644 index 0000000000..5499db614c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md @@ -0,0 +1,172 @@ +--- +title: New-EntraBetaIdentityProvider +description: This article provides details on the New-EntraBetaIdentityProvider command. + + +ms.topic: reference +ms.date: 08/07/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaIdentityProvider + +schema: 2.0.0 +--- + +# New-EntraBetaIdentityProvider + +## Synopsis + +Configure a new identity provider in the directory. + +## Syntax + +```powershell +New-EntraBetaIdentityProvider + -ClientId + -Type + -ClientSecret + [-Name ] + [] +``` + +## Description + +The `New-EntraBetaIdentityProvider` cmdlet is used to configure an identity provider in the directory. + +Adding an identity provider will allow users to sign up for or sign into applications secured by Microsoft Entra ID B2C using the identity provider. + +Configuring an identity provider in your Microsoft Entra ID tenant also enables future B2B guest scenarios. + +For example, an organization has resources in Office 365 that needs to be shared with a Gmail user. The Gmail user will use their Google account credentials to authenticate and access the documents. + +The current set of identity providers can be: + +- Microsoft +- Google +- Facebook +- Amazon +- LinkedIn + +The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. + +## Examples + +### Example 1: Add Google identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + Type = 'Google' + Name = 'GoogleName' + ClientId = 'Google123' + ClientSecret = 'GoogleClientSecret' +} + +New-EntraBetaIdentityProvider @params +``` + +```Output +Id DisplayName +-- ----------- +Google-OAUTH GoogleName +``` + +This example adds a Google identity provider. + +- `-Type` parameter specifies the identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. +- `-Name` parameter specifies the display name of the identity provider. +- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. +- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. + +## Parameters + +### -ClientId + +The client identifier for the application, obtained during the application's registration with the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecret + +The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name + +The display name of the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. + +For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaIdentityProvider](Set-EntraBetaIdentityProvider.md) + +[Remove-EntraBetaIdentityProvider](Remove-EntraBetaIdentityProvider.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md new file mode 100644 index 0000000000..2697f37099 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md @@ -0,0 +1,335 @@ +--- +title: New-EntraBetaInvitation +description: This article provides details on the New-EntraBetaInvitation command. + + +ms.topic: reference +ms.date: 08/07/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaInvitation + +schema: 2.0.0 +--- + +# New-EntraBetaInvitation + +## Synopsis + +This cmdlet is used to invite a new external user to your directory + +## Syntax + +```powershell +New-EntraBetaInvitation + [-InvitedUser ] + [-InvitedUserMessageInfo ] + [-InvitedUserType ] + [-SendInvitationMessage ] + -InvitedUserEmailAddress + [-ResetRedemption ] + [-InvitedUserDisplayName ] + -InviteRedirectUrl + [] +``` + +## Description + +This cmdlet is used to invite a new external user to your directory. + +Invitation adds an external user to the organization. When creating a new invitation, you have several options available: + +- On invitation creation, Microsoft Graph can automatically send an invitation email directly to the invited user, or your app can use the inviteRedeemUrl returned in the response to craft your own invitation (through your communication mechanism of choice) to the invited user. If you decide to have Microsoft Graph send an invitation email automatically, you can specify the content and language of the email by using invitedUserMessageInfo. + +- When the user is invited, a user entity (of userType Guest) is created and can be used to control access to resources. The invited user has to go through the redemption process to access any resources they have been invited to. + +To reset the redemption status for a guest user, the User.ReadWrite.All permission is the minimum required. + +For delegated scenarios, the signed-in user must have at least one of the following roles: Guest Inviter, Directory Writers, or User Administrator. Additionally, to reset the redemption status, the signed-in user must have the Helpdesk Administrator or User Administrator role. + +## Examples + +### Example 1: Invite a new external user to your directory + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' +} + +New-EntraBetaInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example sent an email to the user who's email address is in the `-InvitedUserEmailAddress` parameter. + +When the user accepts the invitation, they're forwarded to the url as specified in the `-InviteRedirectUrl` parameter. + +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. + +### Example 2: Invite a new external user to your directory with InvitedUserDisplayName parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' + InvitedUserDisplayName = 'microsoftuser' +} + +New-EntraBetaInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with `-InvitedUserDisplayName` parameter. + +- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user +- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. +- `-InvitedUserDisplayName`Parameter specifies the display name of the user. + +### Example 3: Invite a new external user to your directory with InvitedUserMessageInfo parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$a= New-Object Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo +$a.CustomizedMessageBody = 'Hi there, how are you' +$a.MessageLanguage = 'EN' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.microsoft.com' + InvitedUserMessageInfo = $a +} + +New-EntraBetaInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with InvitedUserMessageInfo parameter. + +- `-InvitedUserEmailAddress`Parameter specifies the Email address to which the invitation is sent. +- `-SendInvitationMessage` Parameter indicates whether or not an invitation message will be sent to the invited user. +- `-InviteRedirectUrl` Parameter specifies The URL to which the invited user is forwarded after accepting the invitation. +- `-InvitedUserMessageInfo`Parameter specifies addition information to specify how the invitation message is sent. + +### Example 4: Invite a new external user to your directory with InvitedUserType parameter + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.microsoft.com' + InvitedUserType = 'Guest' +} + +New-EntraBetaInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +9e2b9f02-c2cb-4832-920d-81959f44e397 https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +This example demonstrates how to invite a new external user to your directory with InvitedUserType parameter. + +### Example 5: Reset a Redemption for an external user + +```powershell +Connect-Entra -Scopes 'User.Invite.All' +$params = @{ + InvitedUserEmailAddress = 'someexternaluser@externaldomain.com' + SendInvitationMessage = $True + InviteRedirectUrl = 'https://myapps.onmicrosoft.com' + InvitedUserDisplayName = 'microsoftuser' + ResetRedemption = $true +} +New-EntraBetaInvitation @params +``` + +```Output +Id InviteRedeemUrl +-- --------------- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-cc… +``` + +In this example, we show how an admin can reset the redemption for an external user in the `-InvitedUser` parameter. +They need to pass the switch `-ResetRedemption` as true. +Once reset, External user has to re-redeem the invitation to continue to access the resources. + +## Parameters + +### -InvitedUserDisplayName + +The display name of the user as it appears in your directory. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserEmailAddress + +The Email address to which the invitation is sent. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserMessageInfo + +Addition information to specify how the invitation message is sent. + +```yaml +Type: InvitedUserMessageInfo +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUser + +An existing user object in the directory that you want to add or update the B2B credentials for. + +```yaml +Type: User +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvitedUserType + +The userType of the user being invited. By default, this is Guest. + +You can invite as Member if you are company administrator. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InviteRedirectUrl + +The URL to which the invited user is forwarded after accepting the invitation. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SendInvitationMessage + +A Boolean parameter that indicates whether or not an invitation message will be sent to the invited user. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResetRedemption + +Indicates whether the invite redemption on an existing external user should be removed so the user can re-redeem the account. + +By default, this is false and should only be set to true when passing in a valid external user to the InvitedUser property. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### None + +## Outputs + +### System.Object + +## Notes + +- See more information - . + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md new file mode 100644 index 0000000000..b398e88e04 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md @@ -0,0 +1,236 @@ +--- +title: New-EntraBetaNamedLocationPolicy +description: This article provides details on the New-EntraBetaNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaNamedLocationPolicy + +schema: 2.0.0 +--- + +# New-EntraBetaNamedLocationPolicy + +## Synopsis + +Creates a new named location policy in Microsoft Entra ID. + +## Syntax + +```powershell +New-EntraBetaNamedLocationPolicy + [-IncludeUnknownCountriesAndRegions ] + [-Id ] + [-IsTrusted ] + [-OdataType ] + [-CountriesAndRegions ] + [-IpRanges ] + [-DisplayName ] + [] +``` + +## Description + +This cmdlet allows an admin to create new named location policy in Microsoft Entra ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Creates a new Ip named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange +$ipRanges.cidrAddress = '6.5.4.3/32' +$params = @{ + OdataType = '#microsoft.graph.ipNamedLocation' + DisplayName = 'IP named location policy' + IsTrusted = $false + IpRanges = $ipRanges +} + +New-EntraBetaNamedLocationPolicy @params +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +bbbbbbbb-1111-2222-3333-cccccccccccc 31-07-2024 10:45:27 IP named location policy 31-07-2024 10:45:27 +``` + +This command creates a new country named location policy in Microsoft Entra ID. + +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. +- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. + +### Example 2: Creates a new country named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + OdataType = '#microsoft.graph.countryNamedLocation' + DisplayName = 'Country named location policy' + CountriesAndRegions = 'IN' + IncludeUnknownCountriesAndRegions = $false +} + +New-EntraBetaNamedLocationPolicy @params +``` + +```Output +Id CreatedDateTime DisplayName ModifiedDateTime +-- --------------- ----------- ---------------- +cccccccc-2222-3333-4444-dddddddddddd 31-07-2024 10:46:16 Country named location policy 31-07-2024 10:46:16 +``` + +This command creates a new country named location policy in Microsoft Entra ID. + +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-CountriesAndRegions` parameter specifies the countries and regions for the named location policy. +- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. + +## Parameters + +### -OdataType + +Specifies the OData type of a named location policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpRanges + +List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsTrusted + +Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CountriesAndRegions + +Specifies the countries and regions for the named location policy in Microsoft Entra ID. List of countries and/or regions in the two-letter format specified by ISO 3166-2. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeUnknownCountriesAndRegions + +Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [Create namedLocation](/graph/api/conditionalaccessroot-post-namedlocations). + +## Related Links + +[Get-EntraBetaNamedLocationPolicy](Get-EntraBetaNamedLocationPolicy.md) + +[Set-EntraBetaNamedLocationPolicy](Set-EntraBetaNamedLocationPolicy.md) + +[Remove-EntraBetaNamedLocationPolicy](Remove-EntraBetaNamedLocationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md new file mode 100644 index 0000000000..067d0ed656 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md @@ -0,0 +1,220 @@ +--- +title: New-EntraBetaOauth2PermissionGrant +description: This article provides details on the New-EntraBetaOauth2PermissionGrant command. + + +ms.topic: reference +ms.date: 06/28/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaOauth2PermissionGrant + +schema: 2.0.0 +--- + +# New-EntraBetaOauth2PermissionGrant + +## Synopsis + +Create a delegated permission grant using an oAuth2PermissionGrant object. This grant allows a client service principal to access a resource service principal on behalf of a signed-in user, with access restricted to the specified delegated permissions. + +## Syntax + +```powershell +New-EntraBetaOauth2PermissionGrant + -ClientId + -ConsentType + -ResourceId + -StartTime + -ExpiryTime + [-PrincipalId ] + [-Scope ] + [] +``` + +## Description + +The `New-EntraBetaOauth2PermissionGrant` cmdlet creates a delegated permission grant using an oAuth2PermissionGrant object. This grant authorizes a client service principal to access a resource service principal on behalf of a signed-in user, with access limited to the specified delegated permissions. + +## Examples + +### Example 1: To grant authorization to impersonate all users + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" +$graphApp = Get-EntraBetaServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" +$params = @{ + ClientId = $servicePrincipal.Id + ConsentType = 'AllPrincipals' + ResourceId = $graphApp.Id + Scope = 'Directory.Read.All' + StartTime = Get-Date + ExpiryTime = (Get-Date).AddYears(1) +} +New-EntraBetaOauth2PermissionGrant @params +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... + +``` + +This command Grant authorization to impersonate all users. + +### Example 2: To grant authorization to impersonate a specific user + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'Hakeem Helpdesk'" +$graphApp = Get-EntraBetaServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" +$user = Get-EntraBetaUser -UserId 'SawyerM@contoso.com' +$params = @{ + ClientId = $servicePrincipal.Id + ConsentType = 'Principal' + PrincipalId = $user.Id + ResourceId = $graphApp.Id + Scope = 'Directory.Read.All' + StartTime = Get-Date + ExpiryTime = (Get-Date).AddYears(1) +} +New-EntraBetaOauth2PermissionGrant @params +``` + +```Output +Id ClientId ConsentType ExpiryTime PrincipalId ResourceId Scope +-- -------- ----------- ---------- ----------- ---------- ----- +A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1 AllPrincipals 28/06/2025 07:44:25 aaaaaaaa-bbbb-cccc-1111-222222222222 Dele... +``` + +This command Grant authorization to impersonate a specific user. + +## Parameters + +### -ClientId + +The object ID (not appId) of the client service principal for the application, which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentType + +Indicates whether the client application is authorized to impersonate all users or only a specific user. + +- `AllPrincipals`: Authorizes the application to impersonate all users. +- `Principal`: Authorizes the application to impersonate a specific user. +An administrator can grant consent on behalf of all users. In some cases, non-admin users are authorized to consent on behalf of themselves for certain delegated permissions. This parameter is required and supports the $filter query (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The ID of the resource service principal to which access is authorized. This identifies the API, which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrincipalId + +The ID of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal, If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope + +A space-separated list of the claim values for delegated permissions, which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3,850 characters in length. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartTime + +Currently, the start time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required. + +```yaml +Type: DateTime +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExpiryTime + +Currently, the end time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required. + +```yaml +Type: DateTime +Parameter Sets: CreateExpanded +Aliases: +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## RELATED LINKS + +[Remove-EntraBetaOAuth2PermissionGrant](Remove-EntraBetaOAuth2PermissionGrant.md) +[Get-EntraBetaOAuth2PermissionGrant](Get-EntraBetaOAuth2PermissionGrant.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md new file mode 100644 index 0000000000..4481a92c1a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md @@ -0,0 +1,372 @@ +--- +title: New-EntraBetaPermissionGrantConditionSet +description: This article provides details on the New-EntraBetaPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 08/07/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# New-EntraBetaPermissionGrantConditionSet + +## Synopsis + +Create a new Microsoft Entra ID permission grant condition set in a given policy. + +## Syntax + +```powershell +New-EntraBetaPermissionGrantConditionSet + -PolicyId + -ConditionSetType + [-Permissions ] + [-ClientApplicationTenantIds ] + [-ClientApplicationsFromVerifiedPublisherOnly ] + [-ClientApplicationIds ] + [-ResourceApplication ] + [-ClientApplicationPublisherIds ] + [-PermissionClassification ] + [-PermissionType ] + [] +``` + +## Description + +Create a new Microsoft Entra ID permission grant condition set object in an existing policy. + +## Examples + +### Example 1: Create a basic permission grant condition set in an existing policy with all build in values + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'includes' +PermissionType = 'delegated' +} + +New-EntraBetaPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification +-- ------------------------------- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------- +aaaa0000-bb11-2222-33cc-444444dddddd False {all} {all} {all} False all all delegated {all} +``` + +This command creates a basic permission grant condition set in an existing policy with all build in values. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. + +### Example 2: Create a permission grant condition set in an existing policy that includes specific permissions for a resource application + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$permission = (Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'includes' +PermissionType = 'delegated' +Permissions = @($permission) +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +} + +New-EntraBetaPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification +-- ------------------------------- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------- +bbbb1111-cc22-3333-44dd-555555eeeeee False {all} {all} {all} False all all delegated {all} +``` + +This command creates a permission grant condition set in an existing policy that includes specific permissions for a resource application. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. + +### Example 3: Create a permission grant condition set in an existing policy that is excluded + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'excludes' +PermissionType = 'delegated' +Permissions = @('All') +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +PermissionClassification = 'low' +ClientApplicationsFromVerifiedPublisherOnly = $true +ClientApplicationIds = @('All') +ClientApplicationTenantIds = @('All') +ClientApplicationPublisherIds = @('All') +} +New-EntraBetaPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds ClientApplicationsFromVerifiedPublisherOnly PermissionClassification +-- ------------------------------- -------------------- ----------------------------- -------------------------- ------------------------------------------- ------------------- +dddd3333-ee44-5555-66ff-777777aaaaaa False {all} {all} {all} True low +``` + +This command creates a permission grant condition set in an existing policy that is excluded. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. + +### Example 4: Create a permission grant condition set in an existing policy that is excluded + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$permission = (Get-EntraBetaServicePrincipal -Filter "DisplayName eq ''").AppRoles.Id +$params = @{ +PolicyId = $permissionGrantPolicyId +ConditionSetType = 'excludes' +PermissionType = 'delegated' +Permissions = @($permission) +ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' +PermissionClassification = 'low' +ClientApplicationsFromVerifiedPublisherOnly = $true +ClientApplicationIds = @('00001111-aaaa-2222-bbbb-3333cccc4444', '11112222-bbbb-3333-cccc-4444dddd5555') +ClientApplicationTenantIds = @('aaaabbbb-0000-cccc-1111-dddd2222eeee', 'bbbbcccc-1111-dddd-2222-eeee3333ffff', 'ccccdddd-2222-eeee-3333-ffff4444aaaa') +ClientApplicationPublisherIds = @('33334444-dddd-5555-eeee-6666ffff7777') +} +New-EntraBetaPermissionGrantConditionSet @params +``` + +```Output +Id CertifiedClientApplicationsOnly ClientApplicationIds ClientApplicationPublisherIds ClientApplicationTenantIds +-- ------------------------------- -------------------- ----------------------------- -------------------- +cccccccc-2222-3333-4444-dddddddddddd False {33334444-dddd-5555-eeee-6666ffff7777} {d5aec55f-2d12-4442-8d2f-ccca95d4390e} {aaaabbbb-0000-cccc-1111-dddd2222eeee} +``` + +This command creates a permission grant condition set in an existing policy that is excluded. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionType + +Specific type of permissions (application, delegated) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionClassification + +Specific classification (all, low, medium, high) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions + +The identifier of the resource application to scope consent operation down to. +It could be @("All") or a list of permission IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationIds + +The set of client application IDs to scope consent operation down to. +It could be @("All") or a list of client application IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationTenantIds + +The set of client application tenant IDs to scope consent operation down to. +It could be @("All") or a list of client application tenant IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationPublisherIds + +The set of client applications publisher IDs to scope consent operation down to. +It could be @("All") or a list of client application publisher IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationsFromVerifiedPublisherOnly + +A value indicates whether to only includes client applications from verified publishers. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceApplication + +The identifier of the resource application to scope consent operation down to. +It could be "Any" or a specific resource application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +### Microsoft.Open.MSGraph.Model.PermissionGrantConditionSet + +## Notes + +## Related Links + +[Set-EntraBetaPermissionGrantConditionSet](Set-EntraBetaPermissionGrantConditionSet.md) + +[Get-EntraBetaPermissionGrantConditionSet](Get-EntraBetaPermissionGrantConditionSet.md) + +[Remove-EntraBetaPermissionGrantConditionSet](Remove-EntraBetaPermissionGrantConditionSet.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md new file mode 100644 index 0000000000..a1a8cfb28c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md @@ -0,0 +1,133 @@ +--- +title: New-EntraBetaPermissionGrantPolicy +description: This article provides details on the New-EntraBetaPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 08/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantPolicy + +schema: 2.0.0 +--- + +# New-EntraBetaPermissionGrantPolicy + +## Synopsis + +Creates a permission grant policy. + +## Syntax + +```powershell +New-EntraBetaPermissionGrantPolicy + [-Description ] + [-DisplayName ] + [-Id ] + [] +``` + +## Description + +The `New-EntraBetaPermissionGrantPolicy` cmdlet creates a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Create a permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$params = @{ + Id = 'my_new_permission_grant_policy_id' + DisplayName = 'MyNewPermissionGrantPolicy' + Description = 'My new permission grant policy' +} + +New-EntraBetaPermissionGrantPolicy @params +``` + +```Output +DeletedDateTime Description DisplayName Id +--------------- ----------- ----------- -- + My new permission grant policy MyNewPermissionGrantPolicy my_new_permission_grant_policy_id +``` + +This example creates new permission grant policy in Microsoft Entra ID. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-DisplayName` parameter specifies the display name for the permission grant policy. +- `-Description` parameter specifies the description for the permission grant policy. + +## Parameters + +### -Description + +Specifies the description for the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name for the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaPermissionGrantPolicy](Get-EntraBetaPermissionGrantPolicy.md) + +[Set-EntraBetaPermissionGrantPolicy](Set-EntraBetaPermissionGrantPolicy.md) + +[Remove-EntraBetaPermissionGrantPolicy](Remove-EntraBetaPermissionGrantPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md new file mode 100644 index 0000000000..0095d0a20d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md @@ -0,0 +1,254 @@ +--- +title: New-EntraBetaPolicy +description: This article provides details on the New-EntraBetaPolicy command. + + +ms.topic: reference +ms.date: 07/03/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPolicy + +schema: 2.0.0 +--- + +# New-EntraBetaPolicy + +## Synopsis + +Creates a policy. + +## Syntax + +```powershell +New-EntraBetaPolicy + -Definition + -DisplayName + -Type + [-IsOrganizationDefault ] + [] +``` + +## Description + +The `New-EntraBetaPolicy` cmdlet creates a policy in Microsoft Entra ID. Specify `DisplayName`, `Definition` and `Type` parameters for create a new policy. + +## Examples + +### Example 1: Create a new policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"HomeRealmDiscoveryPolicy":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') + DisplayName = 'NewPolicy' + Type = 'HomeRealmDiscoveryPolicy' +} +New-EntraBetaPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id IsOrganizationD + efault +---------- --------------- ----------- ----------- -- --------------- +{{"HomeReayPolicy":{"AlternateLoginIDLookup":true, "IncluderIds":["UserID"]}}} NewPolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False +``` + +This command creates a new policy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 2: Create a ClaimsMappingPolicy policy by 'IsOrganizationDefault' parameter + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name\",\"JwtClaimType\":\"upn\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://schemas.microsoft.com/identity/claims/displayname\",\"JwtClaimType\":\"name\"}]}}" ], "displayName": "Custom Claims Issuance Policy", "isOrganizationDefault": false }') + DisplayName ='ClaimstestPolicy' + Type = 'claimsMappingPolicies' + IsOrganizationDefault = $false +} +New-EntraBetaPolicy @params +``` + +```Output +Definition +---------- +{{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLCl… +``` + +This command creates a ClaimsMappingPolicy using 'IsOrganizationDefault' parameter in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` - Parameter specifies the type of policy. In this example, `ClaimsMappingPolicy` + represents the type of policy. + +- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. + +### Example 3: Create a TokenLifetimePolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}') + DisplayName = 'TokenLifetimePolicy' + Type = 'TokenLifetimePolicy' + IsOrganizationDefault = $false +} +New-EntraBetaPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id IsOrganizatio + nDefault +---------- --------------- ----------- ----------- -- ------------- +{{"TokenLifetimePolicy":{"Version":1,"AccessTokenLifetime":"8:00:00"}}} TokenLifetimePolicy aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb False +``` + +This command creates a TokenLifetimePolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 4: Create a TokenIssuancePolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly","EmitSAMLNameFormat":"true"}}') + DisplayName = 'tokenIssuance' + Type = 'TokenIssuancePolicy' +} +New-EntraBetaPolicy @params +``` + +```Output +Definition +---------- +{{"TokenIssuancePolicy":{"Version":1,"SigningAlgorithm":"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","SamlTokenVersion":1.1,"TokenResponseSigningPolicy":"TokenOnly… +``` + +This command creates a TokenIssuancePolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +### Example 5: Create a ActivityBasedTimeoutPolicy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') + DisplayName = 'ActivityBasedTimeoutPolicyname' + Type = 'ActivityBasedTimeoutPolicy' +} +New-EntraBetaPolicy @params +``` + +```Output +Definition DeletedDateTime Description DisplayName Id +---------- --------------- ----------- ----------- -- +{{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}} ActivityBasedTimeoutPolicyname aaaaaaaa-0000-1111-2222... + +``` + +This command creates a ActivityBasedTimeoutPolicy in Microsoft Entra ID. + +- `-Definition` Parameter specifies an array of JSON that contains all the rules of the policy. + +- `-Type` Parameter specifies the type of policy. + +## Parameters + +### -Definition + +Specifies an array of JSON that contains all the rules of the policy, for example: -Definition @("{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}"). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +String of the policy name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsOrganizationDefault + +True if this policy is the organizational default. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of policy. +For token lifetimes, specify "TokenLifetimePolicy." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaPolicy](Get-EntraBetaPolicy.md) + +[Remove-EntraBetaPolicy](Remove-EntraBetaPolicy.md) + +[Set-EntraBetaPolicy](Set-EntraBetaPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md new file mode 100644 index 0000000000..4847d156ad --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md @@ -0,0 +1,193 @@ +--- +title: New-EntraBetaTrustFrameworkPolicy +description: This article provides details on the New-EntraBetaTrustFrameworkPolicy command. + + +ms.topic: reference +ms.date: 08/14/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustFrameworkPolicy + +schema: 2.0.0 +--- + +# New-EntraBetaTrustFrameworkPolicy + +## Synopsis + +This cmdlet is used to create a trust framework policy (custom policy) in the directory. + +## Syntax + +### Content (Default) + +```powershell +New-EntraBetaTrustFrameworkPolicy + -Content + [-OutputFilePath ] + [] +``` + +### File + +```powershell +New-EntraBetaTrustFrameworkPolicy + -InputFilePath + [-OutputFilePath ] + [] +``` + +## Description + +The `New-EntraBetaTrustFrameworkPolicy` cmdlet is used to create a trust framework policy in the directory. + +The contents of the trust framework policy to be created can be provided using a file or a command line variable. + +The contents of the created trust framework policy can be written to an output file or to the screen. + +## Examples + +### Example 1: Creates a trust framework policy from the content specified + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +$policyContent = Get-Content 'C:\temp\CreatedPolicy.xml' | out-string +New-EntraBetaTrustFrameworkPolicy -Content $policyContent +``` + +The example creates a trust framework policy from the content specified. + +The contents of newly created trust framework policy are displayed on screen. + +- `-Content` Parameter specifies the content of the trust framework policy to be created. + +### Example 2: creates a trust framework policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +$policyContent = Get-Content 'C:\temp\CreatedPolicy.xml' | out-string +$params = @{ + Content = $policyContent + OutputFilePath = 'C:\CreatedPolicy.xml' +} +New-EntraBetaTrustFrameworkPolicy @params +``` + +The example creates a trust framework policy from the content specified. + +The contents of newly created trust framework policy are written to file mentioned in output file path. + +- `-Content` Parameter specifies the content of the trust framework policy to be created. +- `-OutputFilePath` Parameter specifies the path to the file used for writing the contents of trust framework policy. + +### Example 3: Creates a trust framework policy from the file mentioned in InputFilePath + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +$params = @{ + InputFilePath = 'C:\InputPolicy.xml' + OutputFilePath = 'C:\CreatedPolicy.xml' +} +New-EntraBetaTrustFrameworkPolicy @params +``` + +The example creates a trust framework policy from the file mentioned in InputFilePath. + +The contents of newly created trust framework policy are written to file mentioned in output file path. + +- `-InputFilePath` Parameter specifies Path to the file used for reading the contents of trust framework policy to be created. +- `-OutputFilePath` Parameter specifies the path to the file used for writing the contents of trust framework policy. + +### Example 4: Creates a trust framework policy from the file mentioned in InputFilePath + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +$params = @{ + InputFilePath = 'C:\InputPolicy.xml' +} +New-EntraBetaTrustFrameworkPolicy @params +``` + +The example creates a trust framework policy from the file mentioned in InputFilePath. + +The contents of newly created trust framework policy are displayed on screen. + +- `-InputFilePath` Parameter specifies Path to the file used for reading the contents of trust framework policy to be created. + +## Parameters + +### -Content + +The content of the trust framework policy to be created. + +```yaml +Type: System.String +Parameter Sets: Content +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -InputFilePath + +Path to the file used for reading the contents of trust framework policy to be created. + +```yaml +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OutputFilePath + +Path to the file used for writing the contents of newly created trust framework policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaTrustFrameworkPolicy](Get-EntraBetaTrustFrameworkPolicy.md) + +[Set-EntraBetaTrustFrameworkPolicy](Set-EntraBetaTrustFrameworkPolicy.md) + +[Remove-EntraBetaTrustFrameworkPolicy](Remove-EntraBetaTrustFrameworkPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md new file mode 100644 index 0000000000..4575760277 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md @@ -0,0 +1,98 @@ +--- +title: New-EntraBetaTrustedCertificateAuthority +description: This article provides details on the New-EntraBetaTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# New-EntraBetaTrustedCertificateAuthority + +## Synopsis + +Creates a trusted certificate authority. + +## Syntax + +```powershell +New-EntraBetaTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `New-EntraBetaTrustedCertificateAuthority` cmdlet creates a trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Creates the trusted certificate authorities in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' + +$new_ca = New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation #Create CertificateAuthorityInformation object +$new_ca.AuthorityType = "RootAuthority" +$new_ca.CrlDistributionPoint = "https://example.crl" +$new_ca.DeltaCrlDistributionPoint = "https://deltaexample.crl" +$new_ca.TrustedCertificate = "Path to .cer file(including cer file name)" +New-EntraBetaTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command creates the trusted certificate authorities in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. +It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaTrustedCertificateAuthority](Get-EntraBetaTrustedCertificateAuthority.md) + +[Remove-EntraBetaTrustedCertificateAuthority](Remove-EntraBetaTrustedCertificateAuthority.md) + +[Set-EntraBetaTrustedCertificateAuthority](Set-EntraBetaTrustedCertificateAuthority.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md new file mode 100644 index 0000000000..0b9512215f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md @@ -0,0 +1,87 @@ +--- +title: Remove-EntraBetaConditionalAccessPolicy +description: This article provides details on the Remove-EntraBetaConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaConditionalAccessPolicy + +## Synopsis + +Deletes a conditional access policy in Microsoft Entra ID by Id. + +## Syntax + +```powershell +Remove-EntraBetaConditionalAccessPolicy + -PolicyId + [] +``` + +## Description + +This cmdlet allows an admin to delete a conditional access policy in Microsoft Entra ID by Id. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Deletes a conditional access policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +$policy = Get-EntraBetaConditionalAccessPolicy | Where-Object {$_.DisplayName -eq 'MFA policy'} +Remove-EntraBetaConditionalAccessPolicy -PolicyId $policy.ObjectId +``` + +This command deletes a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of a conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the policy Id of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaConditionalAccessPolicy](Get-EntraBetaConditionalAccessPolicy.md) + +[New-EntraBetaConditionalAccessPolicy](New-EntraBetaConditionalAccessPolicy.md) + +[Set-EntraBetaConditionalAccessPolicy](Set-EntraBetaConditionalAccessPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md new file mode 100644 index 0000000000..88216cf75c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraBetaFeatureRolloutPolicy +description: This article provides details on the Remove-EntraBetaFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaFeatureRolloutPolicy + +## Synopsis + +Allows an admin to remove the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +Remove-EntraBetaFeatureRolloutPolicy + -Id + [] +``` + +## Description + +An admin uses `Remove-EntraBetaFeatureRolloutPolicy` cmdlet to remove the cloud authentication roll-out policy and have all users where policy applied to be free of the policy. + +Users in groups that were assigned to the policy falls back to the global authentication method (most common case will be federation). Specify `Id` parameter to remove the cloud authentication roll-out policy. + +## Examples + +### Example 1: Removes the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$Policy = Get-EntraBetaFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policy'" +Remove-EntraBetaFeatureRolloutPolicy -Id $Policy.Id +``` + +This example removes the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` - specifies the unique identifier of the cloud authentication roll-out policy. You can use `Get-EntraBetaFeatureRolloutPolicy` to retrieve policy details. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaFeatureRolloutPolicy](New-EntraBetaFeatureRolloutPolicy.md) + +[Get-EntraBetaFeatureRolloutPolicy](Get-EntraBetaFeatureRolloutPolicy.md) + +[Set-EntraBetaFeatureRolloutPolicy](Set-EntraBetaFeatureRolloutPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md new file mode 100644 index 0000000000..5544e51e31 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md @@ -0,0 +1,107 @@ +--- +title: Remove-EntraBetaFeatureRolloutPolicyDirectoryObject +description: This article provides details on the Remove-EntraBetaFeatureRolloutPolicyDirectoryObject command. + + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject + +schema: 2.0.0 +--- + +# Remove-EntraBetaFeatureRolloutPolicyDirectoryObject + +## Synopsis + +Allows an admin to remove a group from the cloud authentication rollout policy in Microsoft Entra ID. +Users in this group revert back to the authenticating using the global policy (in most cases this will be federation). + +## Syntax + +```powershell +Remove-EntraBetaFeatureRolloutPolicyDirectoryObject + -ObjectId + -Id + [] +``` + +## Description + +An admin uses the `Remove-EntraBetaFeatureRolloutPolicyDirectoryObject` cmdlet to remove groups from the cloud authentication roll-out policy. + +Users in these groups start authenticating against the global authentication policy (for example, +federation). Specify `ObjectId` and `Id` parameter to remove groups from the cloud authentication roll-out policy. + +## Examples + +### Example 1: Removes a group from the cloud authentication roll-out policy from Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + ObjectId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +} +Remove-EntraBetaFeatureRolloutPolicyDirectoryObject @params +``` + +This command removes a group from the cloud authentication roll-out policy from Microsoft Entra ID. + +- `-Id` Parameter specifies the ID of the cloud authentication roll-out policy. +- `-ObjectId` parameter specifies the ID of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy. + +## Parameters + +### -ID + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +The unique identifier of the specific Microsoft Entra ID object that assigned to the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaFeatureRolloutPolicyDirectoryObject](Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md new file mode 100644 index 0000000000..421d42d510 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md @@ -0,0 +1,91 @@ +--- +title: Remove-EntraBetaIdentityProvider +description: This article provides details on the Remove-EntraBetaIdentityProvider command. + + +ms.topic: reference +ms.date: 08/07/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaIdentityProvider + +schema: 2.0.0 +--- + +# Remove-EntraBetaIdentityProvider + +## Synopsis + +This cmdlet is used to delete an identity provider in the directory. + +## Syntax + +```powershell +Remove-EntraBetaIdentityProvider + -IdentityProviderBaseId + [] +``` + +## Description + +This cmdlet is used to delete an identity provider that has been configured in the directory. + +The identity provider is permanently deleted. + +The work or school account needs to belong to at least the External Identity Provider Administrator Microsoft Entra role. + +## Examples + +### Example 1: Remove the identity provider in the directory + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +Remove-EntraBetaIdentityProvider -IdentityProviderBaseId 'LinkedIn-OAUTH' +``` + +This command demonstrates how to remove the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. + +## Parameters + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaIdentityProvider](New-EntraBetaIdentityProvider.md) + +[Set-EntraBetaIdentityProvider](Set-EntraBetaIdentityProvider.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md new file mode 100644 index 0000000000..1c157bb52c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md @@ -0,0 +1,88 @@ +--- +title: Remove-EntraBetaNamedLocationPolicy +description: This article provides details on the Remove-EntraBetaNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 08/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaNamedLocationPolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaNamedLocationPolicy + +## Synopsis + +Deletes a Microsoft Entra ID named location policy by PolicyId. + +## Syntax + +```powershell +Remove-EntraBetaNamedLocationPolicy + -PolicyId + [] +``` + +## Description + +This cmdlet allows an admin to delete the Microsoft Entra ID named location policy. + +Named locations are custom rules that define network locations, which can then be used in a Conditional Access policy. + +## Examples + +### Example 1: Deletes a named location policy in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraBetaNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +Remove-EntraBetaNamedLocationPolicy -PolicyId $policy.Id +``` + +This command demonstrates how to delete the named location policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the Id of named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaNamedLocationPolicy](New-EntraBetaNamedLocationPolicy.md) + +[Set-EntraBetaNamedLocationPolicy](Set-EntraBetaNamedLocationPolicy.md) + +[Get-EntraBetaNamedLocationPolicy](Get-EntraBetaNamedLocationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md new file mode 100644 index 0000000000..c0bf03235f --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraBetaOAuth2PermissionGrant +description: This article provides details on the Remove-EntraBetaOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 08/09/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Remove-EntraBetaOAuth2PermissionGrant + +## Synopsis + +Removes an OAuth2PermissionGrant. + +## Syntax + +```powershell +Remove-EntraBetaOAuth2PermissionGrant + -ObjectId + [] +``` + +## Description + +The `Remove-EntraBetaOAuth2PermissionGrant` cmdlet removes an OAuth2PermissionGrant object in Microsoft Entra ID. + +When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted OAuth2PermissionGrant. + +## Examples + +### Example 1: Remove an OAuth2 permission grant + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$SharePointSP = Get-EntraBetaServicePrincipal | Where-Object {$_.DisplayName -eq 'Microsoft.SharePoint'} +$SharePointOA2AllSitesRead = Get-EntraBetaOAuth2PermissionGrant | Where-Object {$_.ResourceId -eq $SharePointSP.ObjectId} | Where-Object {$_.Scope -eq 'AllSites.Read'} +Remove-EntraBetaOAuth2PermissionGrant -ObjectId $SharePointOA2AllSitesRead.ObjectId +``` + +This example shows how to remove an OAuth2PermissionGrant object in Microsoft Entra ID. + +## Parameters + +### -ObjectId + +Specifies the ID of an OAuth2PermissionGrant object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaOAuth2PermissionGrant](Get-EntraBetaOAuth2PermissionGrant.md) + +[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md new file mode 100644 index 0000000000..67231c7231 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md @@ -0,0 +1,130 @@ +--- +title: Remove-EntraBetaPermissionGrantConditionSet +description: This article provides details on the Remove-EntraBetaPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Remove-EntraBetaPermissionGrantConditionSet + +## Synopsis + +Delete a Microsoft Entra ID permission grant condition set by ID. + +## Syntax + +```powershell +Remove-EntraBetaPermissionGrantConditionSet + -Id + -ConditionSetType + -PolicyId + [] +``` + +## Description + +Delete a Microsoft Entra ID permission grant condition set object by ID. + +## Examples + +### Example 1: Delete a permission grant condition set from a policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$PermissionGrantConditionSetId = '2bbbbbb2-3cc3-4dd4-5ee5-6ffffffffff6' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'excludes' + Id = $PermissionGrantConditionSetId +} +Remove-EntraBetaPermissionGrantConditionSet @params +``` + +This example demonstrates how to remove the Microsoft Entra ID permission grant condition set by ID. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaPermissionGrantConditionSet](New-EntraBetaPermissionGrantConditionSet.md) + +[Get-EntraBetaPermissionGrantConditionSet](Get-EntraBetaPermissionGrantConditionSet.md) + +[Set-EntraBetaPermissionGrantConditionSet](Set-EntraBetaPermissionGrantConditionSet.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md new file mode 100644 index 0000000000..a8e9c82223 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md @@ -0,0 +1,85 @@ +--- +title: Remove-EntraBetaPermissionGrantPolicy +description: This article provides details on the Remove-EntraBetaPermissionGrantPolicy command. + + +ms.topic: reference +ms.date: 08/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaPermissionGrantPolicy + +## Synopsis + +Removes a permission grant policy. + +## Syntax + +```powershell +Remove-EntraBetaPermissionGrantPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraBetaPermissionGrantPolicy` cmdlet removes a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Remove a permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +Remove-EntraBetaPermissionGrantPolicy -Id 'my_permission_grant_policy_id' +``` + +This command removes the specified permission grant policy in Microsoft Entra ID. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. + +## Parameters + +### -Id + +The unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaPermissionGrantPolicy](New-EntraBetaPermissionGrantPolicy.md) + +[Set-EntraBetaPermissionGrantPolicy](Set-EntraBetaPermissionGrantPolicy.md) + +[Get-EntraBetaPermissionGrantPolicy](Get-EntraBetaPermissionGrantPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md new file mode 100644 index 0000000000..db67274db6 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md @@ -0,0 +1,84 @@ +--- +title: Remove-EntraBetaPolicy +description: This article provides details on the Remove-EntraBetaPolicy command. + +ms.topic: reference +ms.date: 07/02/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaPolicy + +## Synopsis + +Removes a policy. + +## Syntax + +```powershell +Remove-EntraBetaPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraBetaPolicy` cmdlet removes a policy from Microsoft Entra ID. Specify `Id` parameter to remove a specific policy. + +## Examples + +### Example 1: Remove a policy + +```powershell +Connect-Entra -Scopes 'Policy.Read.ApplicationConfiguration' +Remove-EntraBetaPolicy -Id 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' +``` + +This command removes the specified policy from Microsoft Entra ID. + +- `-Id` - specifies the ID of the policy you want to remove. + +## Parameters + +### -Id + +The Id of the policy you want to remove. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaPolicy](Get-EntraBetaPolicy.md) + +[New-EntraBetaPolicy](New-EntraBetaPolicy.md) + +[Set-EntraBetaPolicy](Set-EntraBetaPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md new file mode 100644 index 0000000000..8e42340663 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md @@ -0,0 +1,102 @@ +--- +title: Remove-EntraBetaServicePrincipalPolicy +description: This article provides details on the Remove-EntraBetaServicePrincipalPolicy command. + + +ms.topic: reference +ms.date: 07/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaServicePrincipalPolicy + +## Synopsis + +Delete a servicePrincipal policy. + +## Syntax + +```powershell +Remove-EntraBetaServicePrincipalPolicy + -Id + -PolicyId + [] +``` + +## Description + +Delete a servicePrincipal policy. Specify the `Id` and `PolicyId` parameter to remove a specific servicePrincipal policy. + +## Examples + +### Example 1: Remove a service principal policy + +```powershell +Connect-Entra -Scopes Policy.Read.All, Application.ReadWrite.All +$params = @{ + Id = 'bbbbbbbb-1111-1111-1111-cccccccccccc' + PolicyId = 'ffffffff-5555-6666-7777-aaaaaaaaaaaa' +} +Remove-EntraBetaServicePrincipalPolicy @params +``` + +This command removes a specific servicePrincipal policy in Microsoft Entra ID. + +## Parameters + +### -PolicyId + +Specifies the object ID of a policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +Specifies the object Id of the Service Principal. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Add-EntraBetaServicePrincipalPolicy](Add-EntraBetaServicePrincipalPolicy.md) + +[Get-EntraBetaServicePrincipalPolicy](Get-EntraBetaServicePrincipalPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md new file mode 100644 index 0000000000..3ceb528206 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md @@ -0,0 +1,91 @@ +--- +title: Remove-EntraBetaTrustFrameworkPolicy +description: This article provides details on the Remove-EntraBetaTrustFrameworkPolicy command. + + +ms.topic: reference +ms.date: 08/08/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustFrameworkPolicy + +schema: 2.0.0 +--- + +# Remove-EntraBetaTrustFrameworkPolicy + +## Synopsis + +Deletes a trust framework policy (custom policy) in the Microsoft Entra ID. + +## Syntax + +```powershell +Remove-EntraBetaTrustFrameworkPolicy + -Id + [] +``` + +## Description + +The `Remove-EntraBetaTrustFrameworkPolicy` cmdlet deletes a trust framework policy in the Microsoft Entra ID. The trust framework policy is permanently deleted. + +The work or school account must have the `B2C IEF Keyset Administrator` role in Microsoft Entra. + +## Examples + +### Example 1: Removes the specified trust framework policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +Remove-EntraBetaTrustFrameworkPolicy -Id 'B2C_1A_signup_signin' +``` + +This example removes the specified trust framework policy. + +- `-Id` parameter specifies unique identifier for a trust framework policy. + +## Parameters + +### -Id + +The unique identifier for a trust framework policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaTrustFrameworkPolicy](Get-EntraBetaTrustFrameworkPolicy.md) + +[New-EntraBetaTrustFrameworkPolicy](New-EntraBetaTrustFrameworkPolicy.md) + +[Set-EntraBetaTrustFrameworkPolicy](Set-EntraBetaTrustFrameworkPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md new file mode 100644 index 0000000000..cb5304e4f3 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md @@ -0,0 +1,92 @@ +--- +title: Remove-EntraBetaTrustedCertificateAuthority +description: This article provides details on the Remove-EntraBetaTrustedCertificateAuthority command. + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Remove-EntraBetaTrustedCertificateAuthority + +## Synopsis + +Removes a trusted certificate authority. + +## Syntax + +```powershell +Remove-EntraBetaTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `Remove-EntraBetaTrustedCertificateAuthority` cmdlet removes a trusted certificate authority from Microsoft Entra ID. + +## Examples + +### Example 1: Remove the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$cer = Get-EntraBetaTrustedCertificateAuthority #Get the CertificateAuthorityInformation object +Remove-EntraBetaTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command deletes the trusted certificate authorities that are defined in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. +It includes properties like `AuthorityType`, `CrlDistributionPoint`, `DeltaCrlDistributionPoint`, and `TrustedCertificate`. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaTrustedCertificateAuthority](Get-EntraBetaTrustedCertificateAuthority.md) + +[New-EntraBetaTrustedCertificateAuthority](New-EntraBetaTrustedCertificateAuthority.md) + +[Set-EntraBetaTrustedCertificateAuthority](Set-EntraBetaTrustedCertificateAuthority.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md new file mode 100644 index 0000000000..548a045da1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md @@ -0,0 +1,288 @@ +--- +title: Set-EntraBetaAuthorizationPolicy +description: This article provides details on the Set-EntraBetaAuthorizationPolicy command. + +ms.topic: reference +ms.date: 07/30/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaAuthorizationPolicy + +schema: 2.0.0 +--- + +# Set-EntraBetaAuthorizationPolicy + +## Synopsis + +Updates an authorization policy. + +## Syntax + +```powershell +Set-EntraBetaAuthorizationPolicy + -Id + [-DisplayName ] + [-EnabledPreviewFeatures ] + [-DefaultUserRolePermissions ] + [-AllowedToSignUpEmailBasedSubscriptions ] + [-AllowedToUseSSPR ] + [-PermissionGrantPolicyIdsAssignedToDefaultUserRole ] + [-AllowEmailVerifiedUsersToJoinOrganization ] + [-Description ] + [-BlockMsolPowerShell ] + [-GuestUserRoleId ] + [] +``` + +## Description + +The `Set-EntraBetaAuthorizationPolicy` cmdlet updates a Microsoft Entra ID authorization policy. + +For delegated scenarios, the user needs to have the `Privileged Role Administrator` Microsoft Entra role. + +## Examples + +### Example 1: Update an authorization policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' +$Params = @{ + Id = 'authorizationPolicy' + DisplayName = 'updated displayname' + Description = 'updated description' + GuestUserRoleId = '10dae51f-b6af-4016-8d66-8c2a99b929b3' + EnabledPreviewFeatures = @('EnableGranularConsent') +} +Set-EntraBetaAuthorizationPolicy @Params +``` + +This example demonstrates how to update a Microsoft Entra ID authorization policy. + +- `-Id` parameter specifies the authorization policy ID. +- `-DisplayName` parameter specifies display name of the authorization policy. +- `-Description` parameter specifies the description of a authorization policy. +- `-GuestUserRoleId` parameter specifies the roletemplateId for the role that should be granted to guest user. +- `-EnabledPreviewFeatures` parameter specifies the preview features enabled for private preview on the tenant. + +### Example 2: Update DefaultUserRolePermissions of authorization policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.Authorization' +$DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions +$DefaultUserRolePermissions.AllowedToCreateApps = $false +$DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $false +$DefaultUserRolePermissions.AllowedToReadOtherUsers = $false +$Params = @{ + Id = 'authorizationPolicy' + DefaultUserRolePermissions = $DefaultUserRolePermissions +} +Set-EntraBetaAuthorizationPolicy @Params +``` + +This example demonstrates how to update a DefaultUserRolePermissions of authorization policy in Microsoft Entra ID. + +- `-Id` parameter specifies the authorization policy ID. +- `-DefaultUserRolePermissions` parameter specifies the customizable default user role permissions. + +## Parameters + +### -AllowedToSignUpEmailBasedSubscriptions + +Specifies whether users can sign up for email based subscriptions. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowedToUseSSPR + +Specifies whether the Self-Serve Password Reset feature can be used by users on the tenant. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AllowEmailVerifiedUsersToJoinOrganization + +Specifies whether a user can join the tenant by email validation. +The initial default value is true. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BlockMsolPowerShell + +Specifies whether the user-based access to the legacy service endpoint used by MSOL PowerShell is blocked or not. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultUserRolePermissions + +Contains various customizable default user role permissions. + +```yaml +Type: DefaultUserRolePermissions +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnabledPreviewFeatures + +Specifies the preview features enabled for private preview on the tenant. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GuestUserRoleId + +Specifies the roletemplateId for the role that should be granted to guest user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the authorization policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionGrantPolicyIdsAssignedToDefaultUserRole + +Specifies the policy Ids of permission grant policies assgined to the default user role. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaAuthorizationPolicy](Get-EntraBetaAuthorizationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md new file mode 100644 index 0000000000..e9b4dd49ce --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md @@ -0,0 +1,274 @@ +--- +title: Set-EntraBetaConditionalAccessPolicy +description: This article provides details on the Set-EntraBetaConditionalAccessPolicy command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaConditionalAccessPolicy + +schema: 2.0.0 +--- + +# Set-EntraBetaConditionalAccessPolicy + +## Synopsis + +Updates a conditional access policy in Microsoft Entra ID by ID. + +## Syntax + +```powershell +Set-EntraBetaConditionalAccessPolicy + -PolicyId + [-Id ] + [-SessionControls ] + [-ModifiedDateTime ] + [-CreatedDateTime ] + [-State ] + [-GrantControls ] + [-Conditions ] + [-DisplayName ] + [] +``` + +## Description + +This cmdlet allows an admin to update a conditional access policy in Microsoft Entra ID by ID. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Update a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$cond = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet +$control = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls +$session = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + DisplayName = 'MFA policy updated' + State = 'Enabled' + Conditions = $cond + GrantControls = $control + SessionControls = $session +} + +Set-EntraBetaConditionalAccessPolicy @params +``` + +The example shows how to update a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the ID of conditional access policy. +- `-DisplayName` parameter specifies the display name of a conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. +- `-Conditions` parameter specifies the conditions for the conditional access policy. +- `-GrantControls` parameter specifies the controls for the conditional access policy. +- `-SessionControls` parameter Enables limited experiences within specific cloud applications. + +### Example 2: Update display name for a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + DisplayName = 'MFA policy updated' +} + +Set-EntraBetaConditionalAccessPolicy @params +``` + +This command updates a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the ID of conditional access policy. +- `-DisplayName` parameter specifies the display name of a conditional access policy. + +### Example 3: Update the state for a conditional access policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$params = @{ + PolicyId = '4dddddd4-5ee5-6ff6-7aa7-8bbbbbbbbbb8' + State = 'Enabled' +} + +Set-EntraBetaConditionalAccessPolicy @params +``` + +This command updates a conditional access policy in Microsoft Entra ID. + +- `-PolicyId` parameter specifies the ID of conditional access policy. +- `-State` parameter specifies the enabled or disabled state of the conditional access policy. + +## Parameters + +### -PolicyId + +Specifies the policy ID of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the enabled or disabled state of the conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Conditions + +Specifies the conditions for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessConditionSet +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GrantControls + +Specifies the controls for the conditional access policy in Microsoft Entra ID. + +```yaml +Type: ConditionalAccessGrantControls +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreatedDateTime + +The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on January 1, 2024 is 2024-01-01T00:00:00Z. Readonly. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the policy ID of a conditional access policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ModifiedDateTime + +The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on January 1, 2024 is 2024-01-01T00:00:00Z. Readonly. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SessionControls + +Enables limited experiences within specific cloud applications. + +```yaml +Type: ConditionalAccessSessionControls +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaConditionalAccessPolicy](Get-EntraBetaConditionalAccessPolicy.md) + +[New-EntraBetaConditionalAccessPolicy](New-EntraBetaConditionalAccessPolicy.md) + +[Remove-EntraBetaConditionalAccessPolicy](Remove-EntraBetaConditionalAccessPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md new file mode 100644 index 0000000000..add4c87988 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md @@ -0,0 +1,231 @@ +--- +title: Set-EntraBetaFeatureRolloutPolicy +description: This article provides details on the Set-EntraBetaFeatureRolloutPolicy command. + + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaFeatureRolloutPolicy +schema: 2.0.0 +--- + +# Set-EntraBetaFeatureRolloutPolicy + +## Synopsis + +Allows an admin to modify the policy for cloud authentication roll-out in Microsoft Entra ID. + +## Syntax + +```powershell +Set-EntraBetaFeatureRolloutPolicy + [-Feature ] + [-IsEnabled ] + -Id + [-IsAppliedToOrganization ] + [-AppliesTo ] + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +An admin uses the `Set-EntraBetaFeatureRolloutPolicy` cmdlet to modify the cloud authentication rollout policy. + +This includes specifying whether the method for cloud authentication is Pass-through Authentication or Password Hash Synchronization, and whether Seamless Single Sign-On (SSO) is enabled. + +Users in groups assigned to the policy will start authenticating using the new method and Seamless SSO, if it is specified. + +## Examples + +### Example 1: Updates the policy for cloud authentication roll-out in Microsoft Entra ID + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + DisplayName = 'Feature-Rollout-Policytest' + IsEnabled = $false +} +Set-EntraBetaFeatureRolloutPolicy @params +``` + +This command updates the policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` - specifies the ID of cloud authentication roll-out policy. +- `-DisplayName` - specifies the display name of the cloud authentication roll-out policy. +- `-IsEnabled` - specifies the status of cloud authentication roll-out policy. + +### Example 2: Updates the Description + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Description = 'Feature-Rollout-test' +} +Set-EntraBetaFeatureRolloutPolicy @params +``` + +This command updates the `-Description` of policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` Specify the ID of cloud authentication roll-out policy. +- `-Description` Specifies the description of the cloud authentication roll-out policy. + +### Example 3: Updates the IsAppliedToOrganization + +```powershell +Connect-Entra -Scopes 'Directory.ReadWrite.All' +$params = @{ + Id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + IsAppliedToOrganization = $false +} +Set-EntraBetaFeatureRolloutPolicy @params +``` + +This command updates the `-IsAppliedToOrganization` parameter of policy for cloud authentication roll-out in Microsoft Entra ID. + +- `-Id` Specify the ID of cloud authentication roll-out policy. +- `-IsAppliedToOrganization` Parameter determines whether a particular feature rollout policy should be applied to the entire organization or not. + +## Parameters + +### -Id + +The unique identifier of the cloud authentication roll-out policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Feature + +Specifies a feature assigned to the cloud authentication roll-out policy. + +Currently, you can assign PassthroughAuthentication | SeamlessSso | PasswordHashSync | EmailAsAlternateId. + +```yaml +Type: FeatureEnum +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsEnabled + +Specifies the status of cloud authentication roll-out policy. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description + +Specifies the description of the cloud authentication roll-out policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliesTo + +Specifies a list of Microsoft Entra ID objects that is assigned to the feature. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAppliedToOrganization + +Specifies if the cloud authentication roll-out policy applied to the entire organization. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaFeatureRolloutPolicy](New-EntraBetaFeatureRolloutPolicy.md) + +[Get-EntraBetaFeatureRolloutPolicy](Get-EntraBetaFeatureRolloutPolicy.md) + +[Remove-EntraBetaFeatureRolloutPolicy](Remove-EntraBetaFeatureRolloutPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md new file mode 100644 index 0000000000..40ed98cacc --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md @@ -0,0 +1,196 @@ +--- +title: Set-EntraBetaIdentityProvider +description: This article provides details on the Set-EntraBetaIdentityProvider command. + + +ms.topic: reference +ms.date: 08/13/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaIdentityProvider + +schema: 2.0.0 +--- + +# Set-EntraBetaIdentityProvider + +## Synopsis + +Update the properties of an existing identity provider configured in the directory. + +## Syntax + +```powershell +Set-EntraBetaIdentityProvider + -IdentityProviderBaseId + [-Type ] + [-Name ] + [-ClientId ] + [-ClientSecret ] + [] +``` + +## Description + +The `Set-EntraBetaIdentityProvider` cmdlet is used to update the properties of an existing identity provider. + +The type of the identity provider can't be modified. + +## Examples + +### Example 1: Update client id of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + ClientId = 'NewClientID' +} +Set-EntraBetaIdentityProvider @params +``` + +This example updates the client ID for the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. +- `-ClientId` parameter specifies the client identifier for the application, obtained during the application's registration with the identity provider. + +### Example 2: Update client secret of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + ClientSecret = 'NewClientSecret' +} +Set-EntraBetaIdentityProvider @params +``` + +This example updates the client secret for the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. +- `-ClientSecret` parameter specifies the client secret for the application, obtained during registration with the identity provider. + +### Example 3: Update display name of an identity provider + +```powershell +Connect-Entra -Scopes 'IdentityProvider.ReadWrite.All' +$params = @{ + IdentityProviderBaseId = 'Google-OAuth' + Name = 'NewGoogleName' +} +Set-EntraBetaIdentityProvider @params +``` + +This example updates the display name for the specified identity provider. + +- `-IdentityProviderBaseId` parameter specifies the unique identifier of the identity provider. +- `-Name` parameter specifies the display name of the identity provider. + +## Parameters + +### -ClientId + +The client identifier for the application, obtained during the application's registration with the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientSecret + +The client secret for the application, obtained during registration with the identity provider, is write-only. A read operation returns `****`. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentityProviderBaseId + +The unique identifier for an identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Name + +The display name of the identity provider. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +The identity provider type. It must be one of the following values: Microsoft, Google, Facebook, Amazon, or LinkedIn. + +For a B2B scenario, possible values: Google, Facebook. For a B2C scenario, possible values: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo, QQ, WeChat. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[New-EntraBetaIdentityProvider](New-EntraBetaIdentityProvider.md) + +[Remove-EntraBetaIdentityProvider](Remove-EntraBetaIdentityProvider.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md new file mode 100644 index 0000000000..5809a25048 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md @@ -0,0 +1,258 @@ +--- +title: Set-EntraBetaNamedLocationPolicy +description: This article provides details on the Set-EntraBetaNamedLocationPolicy command. + + +ms.topic: reference +ms.date: 07/31/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaNamedLocationPolicy + +schema: 2.0.0 +--- + +# Set-EntraBetaNamedLocationPolicy + +## Synopsis + +Updates a named location policy in Microsoft Entra ID by PolicyId. + +## Syntax + +```powershell +Set-EntraBetaNamedLocationPolicy + -PolicyId + [-IncludeUnknownCountriesAndRegions ] + [-Id ] + [-IsTrusted ] + [-OdataType ] + [-CountriesAndRegions ] + [-IpRanges ] + [-DisplayName ] + [] +``` + +## Description + +This cmdlet allows an admin to update a named location policy in Microsoft Entra ID by PolicyId. + +Conditional access policies are custom rules that define an access scenario. + +## Examples + +### Example 1: Update an IP named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraBetaNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange +$ipRanges.cidrAddress = '6.5.4.3/32' +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.ipNamedLocation' + IsTrusted = $false + IncludeUnknownCountriesAndRegions = $false + IpRanges = $ipRanges +} +Set-EntraBetaNamedLocationPolicy @params +``` + +This example shows how to update an IP named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. +- `-IsTrusted` parameter specifies the IsTrusted value for the named location policy. +- `-IpRanges` parameter specifies List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. + +### Example 2: Update a country named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraBetaNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.countryNamedLocation' + IncludeUnknownCountriesAndRegions = $true +} +Set-EntraBetaNamedLocationPolicy @params +``` + +This command updates a country named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-IncludeUnknownCountriesAndRegions` parameter specifies the includeUnknownCountriesAndRegions value for the named location policy. + +### Example 3: Update display name of a named location policy in Microsoft Entra ID by PolicyId + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ConditionalAccess' +$policy = Get-EntraBetaNamedLocationPolicy | Where-Object {"$_.DisplayName -eq 'IP named location policy'"} +$params = @{ + PolicyId = $policy.Id + OdataType = '#microsoft.graph.ipNamedLocation' + DisplayName = 'NewName' +} +Set-EntraBetaNamedLocationPolicy @params +``` + +This command updates display name of named location policy in Microsoft Entra ID by PolicyId. + +- `-PolicyId` parameter specifies the Id of a named location policy. +- `-OdataType` parameter specifies the odata type of a named location policy. +- `-DisplayName` parameter specifies the display name of a named location policy. + +## Parameters + +### -PolicyId + +Specifies the ID of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OdataType + +Specifies the OData type of a named location policy object in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IpRanges + +List of IP address ranges in IPv4 CIDR format (e.g., 1.2.3.4/32) or any valid IPv6 format as specified in IETF RFC596. The @odata.type of the ipRange is also required. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsTrusted + +Specifies the `IsTrusted` value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CountriesAndRegions + +Specifies the countries and regions for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncludeUnknownCountriesAndRegions + +Specifies the includeUnknownCountriesAndRegions value for the named location policy in Microsoft Entra ID. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the Id of a named location policy in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaNamedLocationPolicy](New-EntraBetaNamedLocationPolicy.md) + +[Get-EntraBetaNamedLocationPolicy](Get-EntraBetaNamedLocationPolicy.md) + +[Remove-EntraBetaNamedLocationPolicy](Remove-EntraBetaNamedLocationPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md new file mode 100644 index 0000000000..bdb370fbe5 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md @@ -0,0 +1,309 @@ +--- +title: Set-EntraBetaPermissionGrantConditionSet +description: This article provides details on the Set-EntraBetaPermissionGrantConditionSet command. + + +ms.topic: reference +ms.date: 08/12/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantConditionSet + +schema: 2.0.0 +--- + +# Set-EntraBetaPermissionGrantConditionSet + +## Synopsis + +Update an existing Microsoft Entra ID permission grant condition set. + +## Syntax + +```powershell +Set-EntraBetaPermissionGrantConditionSet + -Id + -PolicyId + -ConditionSetType + [-Permissions ] + [-ClientApplicationTenantIds ] + [-ClientApplicationsFromVerifiedPublisherOnly ] + [-ClientApplicationIds ] + [-ResourceApplication ] + [-ClientApplicationPublisherIds ] + [-PermissionClassification ] + [-PermissionType ] + [] +``` + +## Description + +Updates a Microsoft Entra ID permission grant condition set object identified by Id. + +## Examples + +### Example 1: Update a permission grant condition set to includes permissions that is classified as low + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' + PermissionClassification = 'low' +} + +Set-EntraBetaPermissionGrantConditionSet @params +``` + +This command updates sets the specified permission grant set to classify as low. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. + +### Example 2: Update a permission grant condition set + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$permissionGrantPolicyId = 'policy1' +$params = @{ + PolicyId = $permissionGrantPolicyId + ConditionSetType = 'includes' + Id = 'aaaa0000-bb11-2222-33cc-444444dddddd' + PermissionType = 'delegated' + PermissionClassification = 'low' + ResourceApplication = 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + Permissions = @('All') + ClientApplicationIds = @('All') + ClientApplicationTenantIds = @('All') + ClientApplicationPublisherIds = @('All') + ClientApplicationsFromVerifiedPublisherOnly = $true +} + +Set-EntraBetaPermissionGrantConditionSet @params +``` + +This command updates sets the specified permission grant set. + +- `-PolicyId` parameter specifies the unique identifier of a permission grant policy. +- `-ConditionSetType` parameter indicates whether the condition sets are included in the policy or excluded. +- `-Id` parameter specifies the unique identifier of a permission grant condition set object. +- `-PermissionType` parameter specifies the type of permissions (application, delegated) to scope consent operation down to. +- `-PermissionClassification` parameter specifies the specific classification (all, low, medium, high) to scope consent operation down to. +- `-ResourceApplication` parameter specifies identifier of the resource application to scope consent operation down to. It could be "Any" or a specific resource application ID. +- `-Permissions` parameter specifies the identifier of the resource application to scope consent operation down to. It could be @("All") or a list of permission IDs. +- `-ClientApplicationIds` parameter specifies the set of client application IDs to scope consent operation down to. It could be @("All") or a list of client application IDs. +- `-ClientApplicationTenantIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationPublisherIds` parameter specifies the set of client applications publisher IDs to scope consent operation down to. It could be @("All") or a list of client application publisher IDs. +- `-ClientApplicationsFromVerifiedPublisherOnly` parameter indicates whether to only includes client applications from verified publishers. + +## Parameters + +### -PolicyId + +The unique identifier of a Microsoft Entra ID permission grant policy object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ConditionSetType + +The value indicates whether the condition sets are included in the policy or excluded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier of a Microsoft Entra ID permission grant condition set object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PermissionType + +Specific type of permissions (application, delegated) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionClassification + +Specific classification (all, low, medium, high) to scope consent operation down to. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Permissions + +The identifier of the resource application to scope consent operation down to. +It could be @("All") or a list of permission IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationIds + +The set of client application IDs to scope consent operation down to. +It could be @("All") or a list of client application IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationTenantIds + +The set of client application tenant IDs to scope consent operation down to. +It could be @("All") or a list of client application tenant IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationPublisherIds + +The set of client applications publisher IDs to scope consent operation down to. +It could be @("All") or a list of client application publisher IDs. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClientApplicationsFromVerifiedPublisherOnly + +A value indicates whether to only includes client applications from verified publishers. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceApplication + +The identifier of the resource application to scope consent operation down to. +It could be "Any" or a specific resource application ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### String + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaPermissionGrantConditionSet](New-EntraBetaPermissionGrantConditionSet.md) + +[Get-EntraBetaPermissionGrantConditionSet](Get-EntraBetaPermissionGrantConditionSet.md) + +[Remove-EntraBetaPermissionGrantConditionSet](Remove-EntraBetaPermissionGrantConditionSet.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md new file mode 100644 index 0000000000..815918a017 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md @@ -0,0 +1,143 @@ +--- +title: Set-EntraBetaPermissionGrantPolicy +description: This article provides details on the Set-EntraBetaPermissionGrantPolicy command. + +ms.topic: reference +ms.date: 08/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantPolicy + +schema: 2.0.0 +--- + +# Set-EntraBetaPermissionGrantPolicy + +## Synopsis + +Updates a permission grant policy. + +## Syntax + +```powershell +Set-EntraBetaPermissionGrantPolicy + -Id + [-Description ] + [-DisplayName ] + [] +``` + +## Description + +The `Set-EntraBetaPermissionGrantPolicy` command updates a Microsoft Entra ID permission grant policy. + +## Examples + +### Example 1: Update description of permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$policy = Get-EntraBetaPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +$params = @{ + Id = $policy.Id + Description = 'Updated description' +} + +Set-EntraBetaPermissionGrantPolicy @params +``` + +This command updates the description of the specified permission grant policy. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-Description` parameter specifies the description for the permission grant policy. + +### Example 2: Update display name of permission grant policy + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.PermissionGrant' +$policy = Get-EntraBetaPermissionGrantPolicy | Where-Object {$_.DisplayName -eq 'Microsoft User Default Recommended Policy'} +$params = @{ + Id = $policy.Id + DisplayName = 'Updated DisplayName' +} + +Set-EntraBetaPermissionGrantPolicy @params +``` + +This command updates the display name of the specified permission grant policy. + +- `-Id` parameter specifies the unique identifier of the permission grant policy. +- `-DisplayName` parameter specifies the display name for the permission grant policy. + +## Parameters + +### -Description + +Specifies the description of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +Specifies the unique identifier of the permission grant policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaPermissionGrantPolicy](New-EntraBetaPermissionGrantPolicy.md) + +[Get-EntraBetaPermissionGrantPolicy](Get-EntraBetaPermissionGrantPolicy.md) + +[Remove-EntraBetaPermissionGrantPolicy](Remove-EntraBetaPermissionGrantPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md new file mode 100644 index 0000000000..6fbf91e046 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md @@ -0,0 +1,212 @@ +--- +title: Set-EntraBetaPolicy +description: This article provides details on the Set-EntraBetaPolicy command. + +ms.topic: reference +ms.date: 08/07/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPolicy + +schema: 2.0.0 +--- + +# Set-EntraBetaPolicy + +## Synopsis + +Updates a policy. + +## Syntax + +```powershell +Set-EntraBetaPolicy + -Id + [-Definition ] + [-DisplayName ] + [-Type ] + [-IsOrganizationDefault ] + [] +``` + +## Description + +The `Set-EntraBetaPolicy` cmdlet sets a policy in Microsoft Entra ID. Specify `Id` parameter to updates specific policy. + +## Examples + +### Example 1: Update a policy display name + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + DisplayName = 'NewUpdated' +} +Set-EntraBetaPolicy @params +``` + +This command updates display name of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `DisplayName` specifies the display name. + +### Example 2: Update a policy definition + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Definition = @('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') +} +Set-EntraBetaPolicy @params +``` + +This command updates definition of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `Definition` specifies the array of stringified JSON that contains all the rules of the policy. +In this example, `@('{"activityBasedTimeoutPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}')` represents definition of the activityBasedTimeoutPolicy. + +### Example 3: Update a policy organization default + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + IsOrganizationDefault = $false +} +Set-EntraBetaPolicy @params +``` + +This command updates organization default of the specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `-IsOrganizationDefault` If true, activates this policy. Only one policy of the same type can be the organization default. Optional, default is false. + +### Example 4: Update policy type + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.ApplicationConfiguration' +$params = @{ + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + Type = 'ActivityBasedTimeoutPolicy' +} +Set-EntraBetaPolicy @params +``` + +This example demonstrates how to update the `type` property of a specified policy in Microsoft Entra ID. + +- `-Id` specifies the ID of the policy for which you want to set values. + +- `-Type` specifies the type of policy. In this example, `ActivityBasedTimeoutPolicy` represents the type of policy. + +## Parameters + +### -Definition + +Specifies the array of stringified JSON that contains all the rules of the policy. +For example -Definition @('{"TokenLifetimePolicy":{"Version":1,"MaxInactiveTime":"20:00:00"}}'). + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsOrganizationDefault + +True if this policy is the organizational default. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type + +Specifies the type of policy. +For token lifetimes, use "TokenLifetimePolicy." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id + +The ID of the policy for which you want to set values. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaPolicy](Get-EntraBetaPolicy.md) + +[New-EntraBetaPolicy](New-EntraBetaPolicy.md) + +[Remove-EntraBetaPolicy](Remove-EntraBetaPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md new file mode 100644 index 0000000000..bfa558b6ec --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md @@ -0,0 +1,222 @@ +--- +title: Set-EntraBetaTrustFrameworkPolicy +description: This article provides details on the Set-EntraBetaTrustFrameworkPolicy command. + + +ms.topic: reference +ms.date: 08/14/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustFrameworkPolicy + +schema: 2.0.0 +--- + +# Set-EntraBetaTrustFrameworkPolicy + +## Synopsis + +This cmdlet is used to update a trust framework policy (custom policy) in the directory. + +## Syntax + +### Content (Default) + +```powershell +Set-EntraBetaTrustFrameworkPolicy + [-Id ] + -Content + [-OutputFilePath ] + [] +``` + +### File + +```powershell +Set-EntraBetaTrustFrameworkPolicy + [-Id ] + -InputFilePath + [-OutputFilePath ] + [] +``` + +## Description + +The `Set-EntraBetaTrustFrameworkPolicy` cmdlet is used to update a trust framework policy in the directory. + +The contents of the trust framework policy to be updated can be provided using a file or a command line variable. + +The contents of the updated trust framework policy can be written to an output file or to the screen. + +## Examples + +### Example 1: Updates a trust framework policy from the content specified + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +$policyContent = Get-Content 'C:\temp\CreatedPolicy.xml' | out-string +$params = @{ + Id = 'B2C_1A_signup_signin' + Content = $policyContent +} +Set-EntraBetaTrustFrameworkPolicy @params +``` + +The example updates a trust framework policy from the content specified. + +The contents of updated trust framework policy are displayed on screen. + +- `-Id` Parameter specifies ID for a trust framework policy. +- `-Content` Parameter specifies the content of the trust framework policy to be updated. + +### Example 2: Updates a trust framework policy from the content specified + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +$policyContent = Get-Content 'C:\temp\CreatedPolicy.xml' | out-string +$params = @{ + Id = 'B2C_1A_signup_signin' + Content = $policyContent + OutputFilePath = 'C:\UpdatedPolicy.xml' +} +Set-EntraBetaTrustFrameworkPolicy @params +``` + +The example updates a trust framework policy from the content specified. + +The contents of updated trust framework policy are written to file mentioned in output file path. + +- `-Id` Parameter specifies ID for a trust framework policy. +- `-Content` Parameter specifies the content of the trust framework policy to be updated. +- `-OutputFilePath` Parameter specifies the path to the file used for updating the contents of trust framework policy. + +### Example 3: Updates a trust framework policy from the file mentioned in InputFilePath + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +$params = @{ + Id = 'B2C_1A_signup_signin' + InputFilePath = 'C:\InputPolicy.xml' + OutputFilePath = 'C:\UpdatedPolicy.xml' +} +Set-EntraBetaTrustFrameworkPolicy @params +``` + +The example updates a trust framework policy from the file mentioned in InputFilePath. + +The contents of updated trust framework policy are written to file mentioned in output file path. + +- `-Id` Parameter specifies ID for a trust framework policy. +- `-InputFilePath` Parameter specifies path to the file used for reading the contents of trust framework policy to be updated. +- `-OutputFilePath` Parameter specifies the path to the file used for updating the contents of trust framework policy. + +### Example 4: Updates a trust framework policy from the file mentioned in InputFilePath + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.TrustFramework' +$params = @{ + Id = 'B2C_1A_signup_signin' + InputFilePath = 'C:\InputPolicy.xml' +} +Set-EntraBetaTrustFrameworkPolicy @params +``` + +The example updates a trust framework policy from the file mentioned in InputFilePath. + +The contents of updated created trust framework policy are displayed on screen. + +- `-Id` Parameter specifies ID for a trust framework policy. +- `-InputFilePath` Parameter specifies path to the file used for reading the contents of trust framework policy to be updated. + +## Parameters + +### -Content + +The content of the trust framework policy to be updated. + +```yaml +Type: System.String +Parameter Sets: Content +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Id + +The unique identifier for a trust framework policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputFilePath + +Path to the file used for reading the contents of trust framework policy to be updated. + +```yaml +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OutputFilePath + +Path to the file used for writing the contents of updated trust framework policy. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaTrustFrameworkPolicy](Get-EntraBetaTrustFrameworkPolicy.md) + +[New-EntraBetaTrustFrameworkPolicy](New-EntraBetaTrustFrameworkPolicy.md) + +[Remove-EntraBetaTrustFrameworkPolicy](Remove-EntraBetaTrustFrameworkPolicy.md) diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md new file mode 100644 index 0000000000..a9e4e16df1 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md @@ -0,0 +1,93 @@ +--- +title: Set-EntraBetaTrustedCertificateAuthority +description: This article provides details on the Set-EntraBetaTrustedCertificateAuthority command. + + +ms.topic: reference +ms.date: 07/04/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustedCertificateAuthority + +schema: 2.0.0 +--- + +# Set-EntraBetaTrustedCertificateAuthority + +## Synopsis + +Updates a trusted certificate authority. + +## Syntax + +```powershell +Set-EntraBetaTrustedCertificateAuthority + -CertificateAuthorityInformation + [] +``` + +## Description + +The `Set-EntraBetaTrustedCertificateAuthority` cmdlet updates a trusted certificate authority in Microsoft Entra ID. + +## Examples + +### Example 1: Updates the trusted certificate authorities that are defined in your directory + +```powershell +Connect-Entra -Scopes 'Organization.ReadWrite.All' +$cer = Get-EntraBetaTrustedCertificateAuthority #Get the CertificateAuthorityInformation object +$cer[0].CrlDistributionPoint = "https://example.crl" +Set-EntraBetaTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] +``` + +```Output +Id +-- +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This command updates the trusted certificate authorities that are defined in your directory. + +- `-CertificateAuthorityInformation` Parameter specifies a CertificateAuthorityInformation object. + +## Parameters + +### -CertificateAuthorityInformation + +Specifies a CertificateAuthorityInformation object. + +```yaml +Type: CertificateAuthorityInformation +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaTrustedCertificateAuthority](Get-EntraBetaTrustedCertificateAuthority.md) + +[New-EntraBetaTrustedCertificateAuthority](New-EntraBetaTrustedCertificateAuthority.md) + +[Remove-EntraBetaTrustedCertificateAuthority](Remove-EntraBetaTrustedCertificateAuthority.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md new file mode 100644 index 0000000000..898d47ed32 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md @@ -0,0 +1,427 @@ +--- +title: Get-EntraBetaUser +description: This article provides details on the Get-EntraBetaUser command. + + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser + +schema: 2.0.0 +--- + +# Get-EntraBetaUser + +## Synopsis + +Gets a user. + +## Syntax + +### GetQuery (Default) + +```powershell +Get-EntraBetaUser + [-Filter ] + [-All] + [-Top ] + [-Property ] + [] +``` + +### GetByValue + +```powershell +Get-EntraBetaUser + [-SearchString ] + [-All] + [-Property ] + [] +``` + +### GetById + +```powershell +Get-EntraBetaUser + -UserId + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUser` cmdlet gets a user from Microsoft Entra ID. + +## Examples + +### Example 1: Get top three users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUser -Top 3 +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Angel Brown cccccccc-2222-3333-4444-dddddddddddd AngelB@contoso.com AngelB@contoso.com +Avery Smith dddddddd-3333-4444-5555-eeeeeeeeeeee AveryS@contoso.com AveryS@contoso.com +Sawyer Miller eeeeeeee-4444-5555-6666-ffffffffffff SawyerM@contoso.com SawyerM@contoso.com +``` + +This example demonstrates how to get top three users from Microsoft Entra ID. + +### Example 2: Get a user by ID + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUser -UserId 'SawyerM@contoso.com' +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Sawyer Miller bbbbbbbb-1111-2222-3333-cccccccccccc sawyerm@tenant.com sawyerm@tenant.com +``` + +This command gets the specified user. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. + +### Example 3: Search among retrieved users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUser -SearchString 'New' +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User88 bbbbbbbb-1111-2222-3333-cccccccccccc demo99@tenant.com +New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com +``` + +This cmdlet gets all users that match the value of SearchString against the first characters in DisplayName or UserPrincipalName. + +### Example 4: Get a user by userPrincipalName + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUser -Filter "userPrincipalName eq 'SawyerM@contoso.com'" +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Sawyer Miller cccccccc-2222-3333-4444-dddddddddddd SawyerM@contoso.com +``` + +This command gets the specified user. + +### Example 5: Get a user by MailNickname + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUser -Filter "startswith(MailNickname,'Ada')" +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +Mark Adams bbbbbbbb-1111-2222-3333-cccccccccccc Adams@contoso.com Adams@contoso.com +``` + +In this example, we retrieve all users whose MailNickname starts with Ada. + +### Example 6: Get SignInActivity of a User + +```powershell +Connect-Entra -Scopes 'User.Read.All','AuditLog.Read.All' +Get-EntraBetaUser -UserId 'SawyerM@contoso.com' -Property 'SignInActivity' | Select-Object -ExpandProperty 'SignInActivity' +``` + +```Output +lastNonInteractiveSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa +lastSignInRequestId : cccccccc-2222-3333-4444-dddddddddddd +lastSuccessfulSignInDateTime : 9/9/2024 1:12:13 PM +lastNonInteractiveSignInDateTime : 9/9/2024 1:12:13 PM +lastSuccessfulSignInRequestId : bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa +lastSignInDateTime : 9/7/2024 9:15:41 AM +``` + +This example demonstrates how to retrieve the SignInActivity of a specific user by selecting a property. + +### Example 7: List users with disabled accounts + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUser -Filter "accountEnabled eq false" | Select-Object DisplayName, Id, Mail, UserPrincipalName +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User cccccccc-2222-3333-4444-dddddddddddd NewUser@tenant.com +``` + +This example demonstrates how to retrieve all users with disabled accounts. + +### Example 8: List users based in a specific country + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$usersInCanada = Get-EntraBetaUser -Filter "Country eq 'Canada'" +$usersInCanada | Select-Object Id, DisplayName, UserPrincipalName, OfficeLocation, Country | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName OfficeLocation Country +-- ----------- ----------------- -------------- ------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com 23/2102 Canada +``` + +This example demonstrates how to retrieve all users based in Canada. + +### Example 9: List user count per department + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$departmentCounts = Get-EntraBetaUser -All | Group-Object -Property Department | Select-Object Name, @{Name="MemberCount"; Expression={$_.Count}} +$departmentCounts | Format-Table Name, MemberCount -AutoSize +``` + +```Output +Name MemberCount +---- ----------- + 7 +Engineering 2 +Executive Management 1 +Finance 1 +HR 1 +``` + +This example demonstrates how to retrieve user count in each department. + +### Example 10: List disabled users with active licenses + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$disabledUsersWithLicenses = Get-EntraBetaUser -Filter "accountEnabled eq false" -All | Where-Object { + $_.AssignedLicenses -ne $null -and $_.AssignedLicenses.Count -gt 0 +} +$disabledUsersWithLicenses | Select-Object Id, DisplayName, UserPrincipalName, AccountEnabled | Format-Table -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AccountEnabled +-- ----------- ----------------- -------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com False +``` + +This example demonstrates how to retrieve disabled users with active licenses. + +### Example 11: Retrieve guest users with active licenses + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$guestUsers = Get-EntraBetaUser -Filter "userType eq 'Guest'" -All +$guestUsersWithLicenses = foreach ($guest in $guestUsers) { + if ($guest.AssignedLicenses.Count -gt 0) { + [pscustomobject]@{ + Id = $guest.Id + DisplayName = $guest.DisplayName + UserPrincipalName = $guest.UserPrincipalName + AssignedLicenses = ($guest.AssignedLicenses | ForEach-Object { $_.SkuId }) -join ", " + } + } +} +$guestUsersWithLicenses | Format-Table Id, DisplayName, UserPrincipalName, AssignedLicenses -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName AssignedLicenses +-- ----------- ----------------- ---------------- +cccccccc-2222-3333-4444-dddddddddddd Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com c42b9cae-ea4f-4ab7-9717-81576235ccac +``` + +This example demonstrates how to retrieve guest users with active licenses. + +### Example 12: Retrieve users without managers + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$allUsers = Get-EntraBetaUser -All +$usersWithoutManagers = foreach ($user in $allUsers) { + $manager = Get-EntraBetaUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue + if (-not $manager) { + [pscustomobject]@{ + Id = $user.Id + DisplayName = $user.DisplayName + UserPrincipalName = $user.UserPrincipalName + } + } +} +$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName +-- ----------- ----------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com +bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com +``` + +This example demonstrates how to retrieve users without managers. + +### Example 13: List failed sign-ins for a user + +```powershell +Connect-Entra -Scopes 'AuditLog.Read.All','Directory.Read.All' +$failedSignIns = Get-EntraBetaAuditSignInLog -Filter "userPrincipalName eq 'SawyerM@contoso.com' and status/errorCode ne 0" +$failedSignIns | Select-Object UserPrincipalName, CreatedDateTime, Status, IpAddress, ClientAppUsed | Format-Table -AutoSize +``` + +This example demonstrates how to retrieve failed sign-ins for a user. + +### Example 14: List all guest users + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$guestUsers = Get-EntraBetaUser -Filter "userType eq 'Guest'" -All +$guestUsers | Select-Object DisplayName, UserPrincipalName, Id, createdDateTime, creationType, accountEnabled, UserState | Format-Table -AutoSize +``` + +```Output +DisplayName UserPrincipalName Id CreatedDateTime CreationType AccountEnabled UserState +----------- ----------------- -- --------------- ------------ -------------- --------- +Sawyer Miller sawyerm_gmail.com#EXT#@contoso.com bbbbbbbb-1111-2222-3333-cccccccccccc 9/13/2024 6:37:33 PM Invitation True Accepted +``` + +This example demonstrates how to retrieve list all guest users. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter + +Specifies an OData v4.0 filter statement. +This parameter controls which objects are returned. +Details on querying with OData can be [found here](https://learn.microsoft.com/graph/aad-advanced-queries?tabs=powershell). + +```yaml +Type: System.String +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a User Principal Name (UPN) or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: GetById +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -SearchString + +Specifies a search string. + +```yaml +Type: System.String +Parameter Sets: GetValue +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: GetQuery +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[New-EntraBetaUser](New-EntraBetaUser.md) + +[Remove-EntraBetaUser](Remove-EntraBetaUser.md) + +[Set-EntraBetaUser](Set-EntraBetaUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md new file mode 100644 index 0000000000..d6f4832d48 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md @@ -0,0 +1,184 @@ +--- +title: Get-EntraBetaUserAppRoleAssignment +description: This article provides details on the Get-EntraBetaUserAppRoleAssignment command. + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAppRoleAssignment + +schema: 2.0.0 +--- + +# Get-EntraBetaUserAppRoleAssignment + +## Synopsis + +Get a user application role assignment. + +## Syntax + +```powershell +Get-EntraBetaUserAppRoleAssignment + -ObjectId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserAppRoleAssignment` cmdlet gets a user application role assignment. + +## Examples + +### Example 1: Get a user application role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +$UserId = (Get-EntraBetaUser -Top 1).ObjectId +Get-EntraBetaUserAppRoleAssignment -ObjectId $UserId +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 + 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 + 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 + +``` + +This example retrieves a user application role assignment for the user in $UserId. You can use the comand `Get-EntraBetaUser` to get Service principal Object ID. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). + +### Example 2: Get all application role assignments + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +Get-EntraBetaUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -All +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 + 0ekrQWAUYUCO7cyiA_H4iJ5kL6mN7o 22223333-cccc-4444-dddd-5555eeee6666 13-09-2023 16:41:53 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-5 + 0ekrQWAUYUCO7cyiA_J5kL6mN7oP8q 33334444-dddd-5555-eeee-6666ffff7777 13-09-2023 17:28:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-7 +``` + +This example demonstrates how to retrieve all application role assignment for the specified user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). + +### Example 3: Get top two application role assignments + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All','Directory.Read.All' +Get-EntraBetaUserAppRoleAssignment -ObjectId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -Top 2 +``` + +```Output +DeletedDateTime Id AppRoleId CreatedDateTime PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName +--------------- -- --------- --------------- -------------------- ----------- ------------- ------------------- + 0ekrQWAUYUCO7cyiA_A1bC2dE3fH4i 00001111-aaaa-2222-bbbb-3333cccc4444 31-07-2023 04:29:57 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-1 + 0ekrQWAUYUCO7cyiA_C2dE3fH4iJ5k 11112222-bbbb-3333-cccc-4444dddd5555 12-07-2023 10:09:17 Avery Smith aaaaaaaa-bbbb-cccc-1111-222222222222 User Test-App-2 +``` + +This example demonstrates how to retrieve top two application role assignment for the specified user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUser](Get-EntraBetaUser.md) + +[New-EntraBetaUserAppRoleAssignment](New-EntraBetaUserAppRoleAssignment.md) + +[Remove-EntraBetaUserAppRoleAssignment](Remove-EntraBetaUserAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md new file mode 100644 index 0000000000..3e35c7cb2b --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md @@ -0,0 +1,174 @@ +--- +title: Get-EntraBetaUserCreatedObject +description: This article provides details on the Get-EntraBetaUserCreatedObject Command. + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserCreatedObject + +schema: 2.0.0 +--- + +# Get-EntraBetaUserCreatedObject + +## Synopsis + +Get objects created by the user. + +## Syntax + +```powershell +Get-EntraBetaUserCreatedObject + -UserId + [-All] + [-Top ] + [] +``` + +## Description + +The `Get-EntraBetaUserCreatedObject` cmdlet gets objects created by a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get a user-created object + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraBetaUserCreatedObject -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example retrieves an object created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +### Example 2: Get all user-created objects + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraBetaUserCreatedObject -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +cccccccc-2222-3333-4444-dddddddddddd +dddddddd-3333-4444-5555-eeeeeeeeeeee +eeeeeeee-4444-5555-6666-ffffffffffff +``` + +This example retrieves all objects created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +### Example 3: Get a top one user-created object + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraBetaUserCreatedObject -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves top one object created by the specified user. + +- `-UserId` parameter specifies the object Id of a user(as a UserPrincipalName or UserId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md new file mode 100644 index 0000000000..c392a9b9af --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md @@ -0,0 +1,171 @@ +--- +title: Get-EntraBetaUserDirectReport +description: This article provides details on the Get-EntraBetaUserDirectReport command. + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserDirectReport + +schema: 2.0.0 +--- + +# Get-EntraBetaUserDirectReport + +## Synopsis + +Get the user's direct reports. + +## Syntax + +```powershell +Get-EntraBetaUserDirectReport + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserDirectReport` cmdlet gets the direct reports for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get a user's direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraBetaUserDirectReport -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example demonstrates how to retrieve direct reports for a user in Microsoft Entra ID. + +- `-UserId` Parameter specifies the ID of a user (UserPrincipalName or UserId). + +### Example 2: Get all direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraBetaUserDirectReport -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve all direct reports for a user in Microsoft Entra ID. + +- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). + +### Example 3: Get a top two direct reports + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraBetaUserDirectReport -UserId 'SawyerM@contoso.com' -Top 2 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +``` + +This example demonstrates how to retrieve top five direct reports for a user in Microsoft Entra ID. + +- `-UserId` parameter specifies the ID of a user (UserPrincipalName or UserId). + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user's UserPrincipalName or UserId in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md new file mode 100644 index 0000000000..2774efafdd --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md @@ -0,0 +1,112 @@ +--- +title: Get-EntraBetaUserExtension +description: This article provides details on the Get-EntraBetaUserExtension command. + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserExtension + +schema: 2.0.0 +--- + +# Get-EntraBetaUserExtension + +## Synopsis + +Gets a user extension. + +## Syntax + +```powershell +Get-EntraBetaUserExtension + -UserId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserExtension` cmdlet gets a user extension in Microsoft Entra ID. + +## Examples + +### Example 1: Retrieve extension attributes for a user + +```powershell +Connect-Entra -Scopes 'User.Read' +$UserId = (Get-EntraBetaUser -ObjectId 'SawyerM@contoso.com').ObjectId +Get-EntraBetaUserExtension -UserId $UserId +``` + +```Output +onPremisesDistinguishedName : +@odata.context : https://graph.microsoft.com/beta/$metadata#users(identities,onPremisesDistinguishedName,employeeId,createdDateTime)/$entity +identities : {@{issuer=SawyerM@contoso.com; signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com}} +employeeId : +id : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee +createdDateTime : 18/07/2024 05:13:40 +userIdentities : {@{issuer=SawyerM@contoso.com; signInType=userPrincipalName; issuerAssignedId=SawyerM@contoso.com}} +``` + +This example shows how to retrieve the extension attributes for a specified user. You can use the command `Get-EntraBetaUser` to get user object Id. + +- `-UserId` parameter specifies the user object Id. + +## Parameters + +### -UserId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUser](Get-EntraBetaUser.md) + +[Remove-EntraBetaUserExtension](Remove-EntraBetaUserExtension.md) + +[Set-EntraBetaUserExtension](Set-EntraBetaUserExtension.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md new file mode 100644 index 0000000000..41e037b00d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md @@ -0,0 +1,105 @@ +--- +title: Get-EntraBetaUserLicenseDetail +description: This article provides details on the Get-EntraBetaUserLicenseDetail command. + +ms.topic: reference +ms.date: 06/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserLicenseDetail + +schema: 2.0.0 +--- + +# Get-EntraBetaUserLicenseDetail + +## Synopsis + +Retrieves license details for a user. + +## Syntax + +```powershell +Get-EntraBetaUserLicenseDetail + -UserId + [-Property ] + [] +``` + +## Description + +This cmdlet retrieves license details for a user. + +## Examples + +### Example 1: Retrieve user license details + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUserLicenseDetail -UserId 'SawyerM@contoso.com' +``` + +```Output +Id SkuId SkuPartNumber +-- ----- ------------- +X8Wu1RItQkSNL8zKldQ5DiH6ThjDmF1OlavQcFOpbmc aaaaaaaa-0b0b-1c1c-2d2d-333333333333 INFORMATION_PROTECTION_COMPLIANCE +X8Wu1RItQkSNL8zKldQ5Dk8SXrDMx6BFpqqM94yUaWg bbbbbbbb-1c1c-2d2d-3e3e-444444444444 EMSPREMIUM +X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8 cccccccc-2d2d-3e3e-4f4f-555555555555 ENTERPRISEPREMIUM +``` + +This example demonstrates how to retrieve license details for a user from Microsoft Entra ID. + +## Parameters + +### -UserId + +The object ID of the user for which the license details are retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +## Outputs + +### System.Object + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md new file mode 100644 index 0000000000..1bfd165f6c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md @@ -0,0 +1,142 @@ +--- +title: Get-EntraBetaUserManager +description: This article provides details on the Get-EntraBetaUserManager command. + + +ms.topic: reference +ms.date: 06/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserManager + +schema: 2.0.0 +--- + +# Get-EntraBetaUserManager + +## Synopsis + +Gets the manager of a user. + +## Syntax + +```powershell +Get-EntraBetaUserManager + -UserId + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserManager` cmdlet gets the manager of a user in Microsoft Entra ID. Specify +`UserId` parameter to get the specific manager of user. + +## Examples + +### Example 1: Get the manager of a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUserManager -UserId 'SawyerM@contoso.com' +``` + +```Output +DeletedDateTime : +Id : 00aa00aa-bb11-cc22-dd33-44ee44ee44ee +@odata.context : https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity +@odata.type : #microsoft.graph.user +accountEnabled : True +businessPhones : {+1 858 555 0109} +city : San Diego +createdDateTime : 2023-07-07T14:18:05Z +country : United States +department : Sales & Marketing +displayName : Sawyer Miller +``` + +This example demonstrates how to retrieve the manager of a specific user. + +- `-UserId` Parameter specifies UserId or User Principal Name of User. + +### Example 2: Retrieve users without managers + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$allUsers = Get-EntraBetaUser -All +$usersWithoutManagers = foreach ($user in $allUsers) { + $manager = Get-EntraBetaUserManager -ObjectId $user.Id -ErrorAction SilentlyContinue + if (-not $manager) { + [pscustomobject]@{ + Id = $user.Id + DisplayName = $user.DisplayName + UserPrincipalName = $user.UserPrincipalName + } + } +} +$usersWithoutManagers | Format-Table Id, DisplayName, UserPrincipalName -AutoSize +``` + +```Output +Id DisplayName UserPrincipalName +-- ----------- ----------------- +cccccccc-2222-3333-4444-dddddddddddd New User NewUser@tenant.com +bbbbbbbb-1111-2222-3333-cccccccccccc Sawyer Miller SawyerM@contoso.com +``` + +This example demonstrates how to retrieve users without managers. + +## Parameters + +### -UserId + +The unique identifier of a user in Microsoft Entra ID (User Principal Name or UserId). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Remove-EntraBetaUserManager](Remove-EntraBetaUserManager.md) + +[Set-EntraBetaUserManager](Set-EntraBetaUserManager.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md new file mode 100644 index 0000000000..3cc00741bb --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md @@ -0,0 +1,218 @@ +--- +title: Get-EntraBetaUserMembership +description: This article provides details on the Get-EntraBetaUserMembership command. + +ms.topic: reference +ms.date: 06/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserMembership + +schema: 2.0.0 +--- + +# Get-EntraBetaUserMembership + +## Synopsis + +Get user memberships. + +## Syntax + +```powershell +Get-EntraBetaUserMembership + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserMembership` cmdlet gets user memberships in Microsoft Entra ID. + +## Examples + +### Example 1: Get user memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraBetaUserMembership -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +33dd33dd-ee44-ff55-aa66-77bb77bb77bb +44ee44ee-ff55-aa66-bb77-88cc88cc88cc +55ff55ff-aa66-bb77-cc88-99dd99dd99dd +``` + +This example demonstrates how to retrieve user memberships in Microsoft Entra ID. + +### Example 2: Get user memberships with additional details + +```powershell +Connect-Entra -Scopes 'User.Read' +$userMemberships = Get-EntraBetaUserMembership -ObjectId 'SawyerM@contoso.com' +$membershipDetails = $userMemberships | ForEach-Object { + $membershipDetail = Get-EntraBetaObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + odataType = $membershipDetail.'@odata.type' + displayName = $membershipDetail.displayName + Id = $membershipDetail.Id + } +} +$membershipDetails | Select-Object odataType, displayName, Id +``` + +```Output +odataType displayName Id +--------- ----------- -- +#microsoft.graph.group Contoso Group 33dd33dd-ee44-ff55-aa66-77bb77bb77bb +#microsoft.graph.group Helpdesk Group 55ff55ff-aa66-bb77-cc88-99dd99dd99dd +#microsoft.graph.directoryRole Attribute Assignment Reader 22cc22cc-dd33-ee44-ff55-66aa66aa66aa +#microsoft.graph.directoryRole Attribute Definition Reader 11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This example demonstrates how to retrieve user memberships in Microsoft Entra ID with more lookup details. + +### Example 3: Get All memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraBetaUserMembership -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +33dd33dd-ee44-ff55-aa66-77bb77bb77bb +44ee44ee-ff55-aa66-bb77-88cc88cc88cc +55ff55ff-aa66-bb77-cc88-99dd99dd99dd +``` + +This example demonstrates how to retrieve users all memberships in Microsoft Entra ID. + +### Example 4: Get top three memberships + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraBetaUserMembership -UserId 'SawyerM@contoso.com' -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +22cc22cc-dd33-ee44-ff55-66aa66aa66aa +``` + +This example demonstrates how to retrieve users top three memberships in Microsoft Entra ID. + +### Example 5: List groups that Sawyer Miller is a member of + +```powershell +Connect-Entra -Scopes 'User.Read.All' +$groups = Get-EntraBetaUserMembership -ObjectId 'SawyerM@contoso.com' +$groups | Select-Object DisplayName, Id, GroupTypes, Visibility | Format-Table -AutoSize +``` + +```Output +DisplayName Id GroupTypes Visibility +----------- -- ---------- ---------- +Contoso Group bbbbbbbb-1111-2222-3333-cccccccccccc {Unified} Public +``` + +This example demonstrates how to retrieve the groups that a user is a member of. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md new file mode 100644 index 0000000000..71433e5361 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md @@ -0,0 +1,202 @@ +--- +title: Get-EntraBetaUserOAuth2PermissionGrant +description: This article provides details on the Get-EntraBetaUserOAuth2PermissionGrant command. + + +ms.topic: reference +ms.date: 07/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant + +schema: 2.0.0 +--- + +# Get-EntraBetaUserOAuth2PermissionGrant + +## Synopsis + +Gets an oAuth2PermissionGrant object. + +## Syntax + +```powershell +Get-EntraBetaUserOAuth2PermissionGrant + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserOAuth2PermissionGrant` cmdlet gets an oAuth2PermissionGrant object for the specified user in Microsoft Entra ID. Specify `UserId` parameter to retrieve an oAuth2PermissionGrant object. + +In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation. + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator +- Directory Readers +- Global Reader +- Guest Inviter + +## Examples + +### Example 1: Retrieve the OAuth2 permission grants for a user + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using the ObjectId parameter. Use the `Get-EntraBetaUser` cmdlet to obtain the `UserId` value. + +### Example 2: Retrieve the OAuth2 permission grants for a user using object ID parameter + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using object ID parameter. + +- `-UserId` parameter specifies the user ID. + +### Example 3: Retrieve the OAuth2 permission grants for a user using All parameter + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +9uBzRwC0s0CFCDQN6O4Ik_fW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 11112222-bbbb-3333-cccc-4444dddd5555 Principal 13-01-2024 08:0... +``` + +This example retrieves the OAuth2 permission grants for a user using All parameter. + +- `-UserId` parameter specifies the user ID. + +### Example 4: Retrieve top one OAuth2 permission grant + +```powershell +Connect-Entra -Scopes 'Directory.Read.All' +Get-EntraBetaUserOAuth2PermissionGrant -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id ClientId ConsentType ExpiryTime +-- -------- ----------- ---------- +HXFXwKLgoUC4rwbZbCDIdffW8XpadQNIoHik9aQxrVHR6StBYBRhQI7tzKID_LIV 00001111-aaaa-2222-bbbb-3333cccc4444 Principal 08-01-2024 10:0... +``` + +This Example Retrieve top one the OAuth2 permission grant in Microsoft Entra ID. + +- `-UserId` parameter specifies the user ID. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID (as a User Principal Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUser](Get-EntraBetaUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md new file mode 100644 index 0000000000..5ec1dd0fca --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md @@ -0,0 +1,165 @@ +--- +title: Get-EntraBetaUserOwnedDevice +description: This article provides details on the Get-EntraBetaUserOwnedDevice command. + +ms.topic: reference +ms.date: 06/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedDevice + +schema: 2.0.0 +--- + +# Get-EntraBetaUserOwnedDevice + +## Synopsis + +Get registered devices owned by a user. + +## Syntax + +```powershell +Get-EntraBetaUserOwnedDevice + -UserId + [-All] + [-Top ] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserOwnedDevice` cmdlet gets registered devices owned by the specified user in Microsoft Entra ID. + +## Examples + +### Example 1: Get devices owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUserOwnedDevice -UserId 'SawyerM@contoso.com' +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 +``` + +This command gets the registered devices owned by the specified user. + +### Example 2: Get all devices owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUserOwnedDevice -UserId 'SawyerM@contoso.com' -All +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +cccccccc-2222-3333-4444-dddddddddddd bbbb1111-cc22-3333-44dd-555555eeeeee Device2 +``` + +This command gets all the registered devices owned by the specified user. + +### Example 3: Get top one device owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUserOwnedDevice -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +ObjectId DeviceId DisplayName +-------- -------- ----------- +bbbbbbbb-1111-2222-3333-cccccccccccc aaaa0000-bb11-2222-33cc-444444dddddd Device1 +``` + +This command gets top one registered device owned by the specified user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md new file mode 100644 index 0000000000..4fbb8e0495 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md @@ -0,0 +1,200 @@ +--- +title: Get-EntraBetaUserOwnedObject +description: This article provides details on the Get-EntraBetaUserOwnedObject command. + + +ms.topic: reference +ms.date: 07/18/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedObject + +schema: 2.0.0 +--- + +# Get-EntraBetaUserOwnedObject + +## Synopsis + +Get objects owned by a user. + +## Syntax + +```powershell +Get-EntraBetaUserOwnedObject + -UserId + [-Top ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserOwnedObject` cmdlet gets objects owned by a user in Microsoft Entra ID. Specify `UserId` parameter to get objects owned by user. + +## Examples + +### Example 1: Get objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraBetaUserOwnedObject -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +``` + +This example retrieves objects owned by the specified user. + +- `-UserId` Parameter specifies the ID of a user as a UserPrincipalName or UserId. + +### Example 2: Get objects owned by a user with additional details + +```powershell +Connect-Entra -Scopes 'User.Read' +$ownedObjects = Get-EntraBetaUserOwnedObject -ObjectId 'SawyerM@contoso.com' + +$objectDetails = $ownedObjects | ForEach-Object { + $objectDetail = Get-EntraBetaObjectByObjectId -ObjectIds $_.Id + [PSCustomObject]@{ + odataType = $objectDetail.'@odata.type' + displayName = $objectDetail.displayName + Id = $objectDetail.Id + } +} +$objectDetails | Format-Table -Property odataType, displayName, Id -AutoSize +``` + +```Output +odataType displayName Id +--------- ----------- -- +#microsoft.graph.group Contoso FTE Group bbbbbbbb-1111-2222-3333-cccccccccccc +#microsoft.graph.group Digital Engineering Group aaaaaaaa-1111-1111-1111-000000000000 +``` + +This example retrieves objects owned by the specified user with more lookup details. + +### Example 3: Get all objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraBetaUserOwnedObject -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-1111-1111-1111-000000000000 +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves all the objects owned by the specified user. + +- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. + +### Example 4: Get top three objects owned by a user + +```powershell +Connect-Entra -Scopes 'User.Read' +Get-EntraBetaUserOwnedObject -UserId 'SawyerM@contoso.com' -Top 3 +``` + +```Output +Id DeletedDateTime +-- --------------- +bbbbbbbb-1111-2222-3333-cccccccccccc +aaaaaaaa-1111-1111-1111-000000000000 +cccccccc-2222-3333-4444-dddddddddddd +``` + +This example retrieves the top three objects owned by the specified user. + +- `-UserId` parameter specifies the ID of a user as a UserPrincipalName or UserId. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies the maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md new file mode 100644 index 0000000000..220fc07996 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md @@ -0,0 +1,166 @@ +--- +title: Get-EntraBetaUserRegisteredDevice +description: This article provides details on the Get-EntraBetaUserRegisteredDevice command. + + +ms.topic: reference +ms.date: 06/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserRegisteredDevice + +schema: 2.0.0 +--- + +# Get-EntraBetaUserRegisteredDevice + +## Synopsis + +Get devices registered by a user. + +## Syntax + +```powershell +Get-EntraBetaUserRegisteredDevice + -UserId + [-Top ] + [-All] + [-Property ] + [] +``` + +## Description + +The `Get-EntraBetaUserRegisteredDevice` cmdlet gets devices registered by a user in Microsoft Entra ID. + +## Examples + +### Example 1: Get registered devices + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUserRegisteredDevice -UserId 'SawyerM@contoso.com' +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This command gets the devices that are registered to the specified user. + +### Example 2: Get all registered devices + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUserRegisteredDevice -UserId 'SawyerM@contoso.com' -All +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +11bb11bb-cc22-dd33-ee44-55ff55ff55ff +``` + +This command gets all the devices that are registered to the specified user. + +### Example 3: Get one registered device + +```Powershell +Connect-Entra -Scopes 'User.Read.All' +Get-EntraBetaUserRegisteredDevice -UserId 'SawyerM@contoso.com' -Top 1 +``` + +```Output +Id DeletedDateTime +-- --------------- +00aa00aa-bb11-cc22-dd33-44ee44ee44ee +``` + +This command gets the top one device that are registered to the specified user. + +## Parameters + +### -All + +List all pages. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principal Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Top + +Specifies The maximum number of records to return. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md new file mode 100644 index 0000000000..c5754b6c62 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md @@ -0,0 +1,109 @@ +--- +title: Get-EntraBetaUserThumbnailPhoto +description: This article provides details on the Get-EntraBetaUserThumbnailPhoto command. + + +ms.topic: reference +ms.date: 07/23/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserThumbnailPhoto + +schema: 2.0.0 +--- + +# Get-EntraBetaUserThumbnailPhoto + +## Synopsis + +Retrieve the thumbnail photo of a user. + +## Syntax + +```powershell +Get-EntraBetaUserThumbnailPhoto + -UserId + [-Property ] + [] +``` + +## Description + +Retrieve the thumbnail photo of a user. + +## Examples + +### Example 1: Retrieve thumbnail photo by Id + +```powershell +Connect-Entra -Scopes 'User.Read','User.Read.All' +Get-EntraBetaUserThumbnailPhoto -UserId 'SawyerM@contoso.com' +``` + +```Output +Id Height Width +-- ------ ----- +default 292 278 +``` + +This example shows how to retrieve the thumbnail photo of a user that is specified through the value of the UserId parameter. + +- `-UserId` parameter specifies the user for which the thumbnail photo is retrieved. + +## Parameters + +### -UserId + +The object ID of the user for which the thumbnail photo is retrieved. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Property + +Specifies properties to be returned + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Boolean + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Set-EntraBetaUserThumbnailPhoto](Set-EntraBetaUserThumbnailPhoto.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUser.md b/moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUser.md new file mode 100644 index 0000000000..f696db96b9 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUser.md @@ -0,0 +1,812 @@ +--- +title: New-EntraBetaUser +description: This article provides details on the New-EntraBetaUser command. + +ms.topic: reference +ms.date: 06/21/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaUser + +schema: 2.0.0 +--- + +# New-EntraBetaUser + +## Synopsis + +Creates a Microsoft Entra ID user. + +## Syntax + +```powershell +New-EntraBetaUser + -DisplayName + -AccountEnabled + -PasswordProfile + [-PostalCode ] + [-MailNickName ] + [-ShowInAddressList ] + [-Department ] + [-TelephoneNumber ] + [-PreferredLanguage ] + [-Mobile ] + [-JobTitle ] + [-ConsentProvidedForMinor ] + [-PhysicalDeliveryOfficeName ] + [-PasswordPolicies ] + [-IsCompromised ] + [-SignInNames ] + [-OtherMails ] + [-UserState ] + [-ImmutableId ] + [-City ] + [-AgeGroup ] + [-ExtensionProperty ] + [-UsageLocation ] + [-UserStateChangedOn ] + [-Country ] + [-UserPrincipalName ] + [-GivenName ] + [-UserType ] + [-StreetAddress ] + [-State ] + [-CompanyName ] + [-FacsimileTelephoneNumber ] + [-Surname ] + [-CreationType ] + [] +``` + +## Description + +The `New-EntraBetaUser` cmdlet creates a user in Microsoft Entra ID. Specify the `DisplayName`,`AccountEnabled`, and `PasswordProfile` parameter to create a user. + +## Examples + +### Example 1: Create a user using MailNickName parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$params = @{ + DisplayName = 'New User' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'NewUser@contoso.com' + AccountEnabled = $true + MailNickName = 'Newuser' +} + +New-EntraBetaUser @params +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee NewUser@contoso.com +``` + +This command creates a new user. + +### Example 2: Create a user using AgeGroup parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$params = @{ + DisplayName = 'New User' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'NewUser@contoso.com' + AccountEnabled = $true + MailNickName = 'Newuser' + AgeGroup = 'adult' +} + +New-EntraBetaUser @params +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee NewUser@contoso.com +``` + +This command creates a new user. + +### Example 3: Create a user using City parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$params = @{ + DisplayName = 'New User' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'NewUser@contoso.com' + AccountEnabled = $true + MailNickName = 'Newuser' + City = 'New York' +} + +New-EntraBetaUser @params +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee NewUser@contoso.com +``` + +This command creates a new user. + +### Example 4: Create a user using Department parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$params = @{ + DisplayName = 'New User' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'NewUser@contoso.com' + AccountEnabled = $true + MailNickName = 'Newuser' + Department = 'IT' +} + +New-EntraBetaUser @params +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee NewUser@contoso.com +``` + +This command creates a new user. + +### Example 5: Create a user using Mobile parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile +$PasswordProfile.Password = '' +$params = @{ + DisplayName = 'New User' + PasswordProfile = $PasswordProfile + UserPrincipalName = 'NewUser@contoso.com' + AccountEnabled = $true + MailNickName = 'Newuser' + Mobile = '02883655253' +} + +New-EntraBetaUser @params +``` + +```Output +DisplayName Id Mail UserPrincipalName +----------- -- ---- ----------------- +New User 00aa00aa-bb11-cc22-dd33-44ee44ee44ee NewUser@contoso.com +``` + +This command creates a new user. + +## Parameters + +### -AccountEnabled + +Indicates whether the user's account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -City + +Specifies the user's city. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country + +Specifies the user's country. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreationType + +Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. +Possible values are "LocalAccount" and null. + +- When user creating a local account, the property is required and you must set it to "LocalAccount". +- When user creating a work or school account, don't specify the property or set it to null. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Department + +Specifies the user's department. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the user's display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProperty + +Add data to custom user properties as the basic **open extensions** or the more versatile **schema extensions**. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GivenName + +Specifies the user's given name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmutableId + +This property is used to associate an on-premises user account to their Microsoft Entra ID user object. +This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. + +Important: The $ and _ characters can't be used when specifying this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsCompromised + +Indicates whether this user is compromised. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JobTitle + +Specifies the user's job title. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickName + +Specifies the user's mail nickname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Mobile + +Specifies the user's mobile phone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OtherMails + +A list of other email addresses for the user; for example: "", "". + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordPolicies + +Specifies password policies for the user. +This value is an enumeration with one possible value being "DisableStrongPassword", which allows weaker passwords than the default policy to be specified. +"DisablePasswordExpiration" can also be specified. +The two might be specified together; for example: "DisablePasswordExpiration, DisableStrongPassword". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordProfile + +Specifies the user's password profile. + +The parameter type for this parameter is "PasswordProfile". + +In order to pass a parameter of this type, you first need to create a variable in PowerShell with that type: + +$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + +Then you can proceed to set the value of the password in this variable: + +$PasswordProfile.Password = "\" + +And finally you can pass this variable to the cmdlet: + +New-EntraBetaUser -PasswordProfile $PasswordProfile ... + +Other attributes that can be set in the PasswordProfile are + +- $PasswordProfile.EnforceChangePasswordPolicy - a boolean indicating that the change password policy is enababled or disabled for this user $PasswordProfile. + +- ForceChangePasswordNextLogin - a boolean indicating that the user must change the password at the next sign in. + +```yaml +Type: PasswordProfile +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PhysicalDeliveryOfficeName + +Specifies the user's physical delivery office name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostalCode + +Specifies the user's postal code. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredLanguage + +Specifies the user's preferred language. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShowInAddressList + +If True, show this user in the address list. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInNames + +Specifies the collection of sign-in names for a local account in a Microsoft Entra ID B2C tenant. + +Each sign-in name must be unique across the company/tenant. + +The property must be specified when you create a local account user; don't specify it when you create a work or school account. + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the user's state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreetAddress + +Specifies the user's street address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Surname + +Specifies the user's surname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TelephoneNumber + +Specifies a telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsageLocation + +A two letter country code (ISO standard 3166). + +Required for users that are assigned licenses due to legal requirement to check for availability of services in countries. + +Examples include: "US", "JP", and "GB". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPrincipalName + +The user principal name (UPN) of the user. + +The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. + +By convention, this UPN should map to the user's email name. + +The general format is "alias@domain". + +For work or school accounts, the domain must be present in the tenant's collection of verified domains. + +This property is required when a work or school account is created; it's optional for local accounts. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserType + +A string value that can be used to classify user types in your directory, such as "Member" and "Guest". + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FacsimileTelephoneNumber + +Specifies the user's telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AgeGroup + +Specifies the user's age group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompanyName + +Specifies the user's company name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentProvidedForMinor + +Sets whether consent was obtained for minors. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserState + +For an external user invited to the tenant using the invitation API, this property represents the invited user's +invitation status. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserStateChangedOn + +Shows the timestamp for the latest change to the userState property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUser](Get-EntraBetaUser.md) + +[Remove-EntraBetaUser](Remove-EntraBetaUser.md) + +[Set-EntraBetaUser](Set-EntraBetaUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md new file mode 100644 index 0000000000..380480df0a --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md @@ -0,0 +1,207 @@ +--- +title: New-EntraBetaUserAppRoleAssignment +description: This article provides details on the New-EntraBetaUserAppRoleAssignment command. + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaUserAppRoleAssignment + +schema: 2.0.0 +--- + +# New-EntraBetaUserAppRoleAssignment + +## Synopsis + +Assigns a user to an application role. + +## Syntax + +```powershell +New-EntraBetaUserAppRoleAssignment + -ResourceId + -Id + -ObjectId + -PrincipalId + [] +``` + +## Description + +The `New-EntraBetaUserAppRoleAssignment` cmdlet assigns a user to an application role in Microsoft Entra ID. + +To grant an app role assignment to a user, you need three identifiers: + +- PrincipalId: The ID of the user to whom you are assigning the app role. + +- ResourceId: The ID of the resource servicePrincipal that defines the app role. + +- Id: The ID of the appRole (defined on the resource service principal) to assign to the user. + +## Examples + +### Example 1: Assign a user to an application without roles + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$appId = (Get-EntraApplication -SearchString '').AppId +$user = Get-EntraBetaUser -searchstring 'NewUser' +$servicePrincipal = Get-EntraBetaServicePrincipal -Filter "appId eq '$appId'" +$params = @{ + ObjectId = $user.ObjectId + PrincipalId = $user.ObjectId + ResourceId = $servicePrincipal.ObjectId + Id = ([Guid]::Empty) +} +New-EntraBetaUserAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +ZwFW_R__GkeNdDsAcKvOoerWWY8NKDJGlIgS4FjeyXQ 00000000-0000-0000-0000-000000000000 08-08-2024 05:40:06 Conf Room Adams aaaaaaaa-bbbb-cccc-1111-222222222222 User ResourceDisplayName 07188127-baa9-4f… +``` + +This command assigns a user to an application that doesn't have any roles. +You can use the command `Get-EntraBetaUser` to get user object ID. +You can use the command `Get-EntraBetaApplication` to get application ID. +You can use the command `Get-EntraBetaServicePrincipal` to get service principal object ID. + +- `-ObjectId` parameter specifies the ID of a user to whom you are assigning the app role. +- `-PrincipalId` parameter specifies the ID of a user to whom you are assigning the app role. +- `-ResourceId` parameter specifies the ID of a resource servicePrincipal that defines the app role. +- `-Id` parameter specifies the ID of a appRole (defined on the resource service principal) to assign to the user. + +### Example 2: Assign a user to a specific role within an application + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$userName = 'SawyerM@contoso.com' +$appName = 'Box' +$appId = Get-EntraBetaApplication -Filter "DisplayName eq '$appName'" +$spo = Get-EntraBetaServicePrincipal -All | Where-Object {$_.AppId -eq $appId.AppId } +$user = Get-EntraBetaUser -Filter "userPrincipalName eq '$userName'" +$params = @{ + ObjectId = $user.ObjectId + PrincipalId = $user.ObjectId + ResourceId = $spo.ObjectId + Id = $appId.AppRoles.Id +} +New-EntraBetaUserAppRoleAssignment @params +``` + +```Output +Id AppRoleId CreationTimestamp PrincipalDisplayName PrincipalId PrincipalType ResourceDisplayName ResourceId +-- --------- ----------------- -------------------- ----------- ------------- ------------------- ---------- +Idn1u1K7S0OWoJWIjkT69Stnjqd1iblKlg-GoqVkNlM cbbf6a32-6dcd-4f22-9be7-ffb128119fae 08-08-2024 08:13:26 Test One Updated bbbbbbbb-cccc-dddd-2222-333333333333 User M365 License Manager 0008861a-d455-4… +``` + +This example demonstrates how to assign a user to an application role in Microsoft Entra ID. +You can use the command `Get-EntraBetaUser` to get user object ID. +You can use the command `Get-EntraBetaServicePrincipal` to get service principal object ID. + +- `-ObjectId` parameter specifies the ID of a user to whom you are assigning the app role. +- `-PrincipalId` parameter specifies the ID of a user to whom you are assigning the app role. +- `-ResourceId` specifies the ID of a resource servicePrincipal that defines the app role. +- `-Id` parameter specifies the ID of a appRole (defined on the resource service principal) to assign to the user. + +## Parameters + +### -Id + +The ID of the app role to assign. + +If application doesn't have any roles while creating new app role assignment then provide an empty guid, or the Id of the role to assign to the user. + +You can retrieve the application's roles by examining the application object's AppRoles property: + +`Get-EntraBetaApplication -SearchString 'Your-Application-DisplayName' | select Approles | Format-List` + +This cmdlet returns the list of roles that are defined in an application: + +AppRoles: {GUID1, GUID2} + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of the user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID to which the new app role is to be assigned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PrincipalId + +The object ID of the principal to which the new app role is assigned. + +When assigning a new role to a user, provide the object ID of the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId + +The object ID of the Service Principal for the application to which the user role is assigned. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUserAppRoleAssignment](Get-EntraBetaUserAppRoleAssignment.md) + +[Remove-EntraBetaUserAppRoleAssignment](Remove-EntraBetaUserAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md b/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md new file mode 100644 index 0000000000..360fc1395c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md @@ -0,0 +1,86 @@ +--- +title: Remove-EntraBetaUser +description: This article provides details on the Remove-EntraBetaUser command. + +ms.topic: reference +ms.date: 06/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUser + +schema: 2.0.0 +--- + +# Remove-EntraBetaUser + +## Synopsis + +Removes a user. + +## Syntax + +```powershell +Remove-EntraBetaUser + -UserId + [] +``` + +## Description + +The `Remove-EntraBetaUser` cmdlet removes a user in Microsoft Entra ID. Specify the `UserId` parameter to remove the specified user in Microsoft Entra ID. + +The calling user must be assigned at least one of the following Microsoft Entra roles: + +- User Administrator +- Privileged Authentication Administrator + +## Examples + +### Example 1: Remove a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +Remove-EntraBetaUser -UserId 'SawyerM@Contoso.com' +``` + +This command removes the specified user in Microsoft Entra ID. + +## Parameters + +### -UserId + +Specifies the ID of a user (as a UPN or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUser](Get-EntraBetaUser.md) + +[New-EntraBetaUser](New-EntraBetaUser.md) + +[Set-EntraBetaUser](Set-EntraBetaUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md b/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md new file mode 100644 index 0000000000..8aeebe6f36 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md @@ -0,0 +1,105 @@ +--- +title: Remove-EntraBetaUserAppRoleAssignment +description: This article provides details on the Remove-EntraBetaUserAppRoleAssignment command. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserAppRoleAssignment + +schema: 2.0.0 +--- + +# Remove-EntraBetaUserAppRoleAssignment + +## Synopsis + +Removes a user application role assignment. + +## Syntax + +```powershell +Remove-EntraBetaUserAppRoleAssignment + -ObjectId + -AppRoleAssignmentId + [] +``` + +## Description + +The `Remove-EntraBetaUserAppRoleAssignment` cmdlet removes a user application role assignment in Microsoft Entra ID. + +## Examples + +### Example 1: Remove user app role assignment + +```powershell +Connect-Entra -Scopes 'AppRoleAssignment.ReadWrite.All' +$RemoveAppRoleParams = @{ + ObjectId = 'SawyerM@Contoso.com' + AppRoleAssignmentId = 'C2dE3fH4iJ5kL6mN7oP8qR9sT0uV1w' +} +Remove-EntraBetaUserAppRoleAssignment @RemoveAppRoleParams +``` + +This example demonstrates how to Remove the user app role assignment in Microsoft Entra ID. + +- `-ObjectId` parameter specifies the user ID. +- `-AppRoleAssignmentId` parameter specifies the application role assignment ID. + +Use the `Get-EntraBetaUserAppRoleAssignment` cmdlet to get `AppRoleAssignmentId` details. + +## Parameters + +### -AppRoleAssignmentId + +Specifies the ID of an application role assignment. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID (as a UserPrincipleName or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUserAppRoleAssignment](Get-EntraBetaUserAppRoleAssignment.md) + +[New-EntraBetaUserAppRoleAssignment](New-EntraBetaUserAppRoleAssignment.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md b/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md new file mode 100644 index 0000000000..aeec817a8d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md @@ -0,0 +1,130 @@ +--- +title: Remove-EntraBetaUserExtension +description: This article provides details on the Remove-EntraBetaUserExtension command. + +ms.topic: reference +ms.date: 07/17/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserExtension + +schema: 2.0.0 +--- + +# Remove-EntraBetaUserExtension + +## Synopsis + +Removes a user extension. + +## Syntax + +### SetMultiple + +```powershell +Remove-EntraBetaUserExtension + -ObjectId + -ExtensionNames + [] +``` + +### SetSingle + +```powershell +Remove-EntraBetaUserExtension + -ObjectId + -ExtensionName + [] +``` + +## Description + +The `Remove-EntraBetaUserExtension` cmdlet removes a user extension from Microsoft Entra ID. Specify `ObjectId` and `ExtensionNames` parameters to remove a user extension. + +## Examples + +### Example 1: Remove the user extension + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$Params = @{ + ObjectId = 'SawyerM@Contoso.com' + ExtensionName = 'Test Extension' +} +Remove-EntraBetaUserExtension @Params +``` + +This example demonstrates how to remove a user extension from Microsoft Entra ID. + +- `ObjectId` parameter specifies the user Object ID. +- `ExtensionName` parameter specifies the user ExtentionName. + +## Parameters + +### -ExtensionName + +Specifies the name of an extension. + +```yaml +Type: System.String +Parameter Sets: SetSingle +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExtensionNames + +Specifies an array of extension names. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: SetMultiple +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies an object ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUserExtension](Get-EntraBetaUserExtension.md) + +[Set-EntraBetaUserExtension](Set-EntraBetaUserExtension.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md b/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md new file mode 100644 index 0000000000..728d68067c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md @@ -0,0 +1,83 @@ +--- +title: Remove-EntraBetaUserManager +description: This article provides details on the Remove-EntraBetaUserManager command. + + +ms.topic: reference +ms.date: 06/20/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserManager + +schema: 2.0.0 +--- + +# Remove-EntraBetaUserManager + +## Synopsis + +Removes a user's manager. + +## Syntax + +```powershell +Remove-EntraBetaUserManager + -UserId + [] +``` + +## Description + +The `Remove-EntraBetaUserManager` cmdlet removes a user's manager in Microsoft Entra ID. Specify the `UserId` parameter to remove the manager for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Remove the manager of a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$User = Get-EntraBetaUser -UserId 'SawyerM@Contoso.com' +Remove-EntraBetaUserManager -UserId $User.ObjectId +``` + +This example shows how to remove a user's manager. + +You can use `Get-EntraBetaUser` command to get the user's details. + +## Parameters + +### -UserId + +Specifies the ID of a user (as a User Principle Name or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraBetaUserManager](Get-EntraBetaUserManager.md) + +[Set-EntraBetaUserManager](Set-EntraBetaUserManager.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md new file mode 100644 index 0000000000..467d9f405c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md @@ -0,0 +1,678 @@ +--- +title: Set-EntraBetaUser +description: This article provides details on the Set-EntraBetaUser command. + +ms.topic: reference +ms.date: 07/29/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUser + +schema: 2.0.0 +--- + +# Set-EntraBetaUser + +## Synopsis + +Updates a user. + +## Syntax + +```powershell +Set-EntraBetaUser + -UserId + [-PostalCode ] + [-MailNickName ] + [-ShowInAddressList ] + [-Department ] + [-DisplayName ] + [-Mobile ] + [-JobTitle ] + [-ConsentProvidedForMinor ] + [-OtherMails ] + [-PasswordPolicies ] + [-SignInNames ] + [-PreferredLanguage ] + [-ImmutableId ] + [-City ] + [-AgeGroup ] + [-ExtensionProperty ] + [-UsageLocation ] + [-State ] + [-AccountEnabled ] + [-Country ] + [-UserPrincipalName ] + [-GivenName ] + [-PasswordProfile ] + [-UserType ] + [-StreetAddress ] + [-CompanyName ] + [-Surname ] + [-TelephoneNumber ] + [-CreationType ] + [] +``` + +## Description + +The `Set-EntraBetaUser` cmdlet updates a user in Microsoft Entra ID. Specify the `UserId` parameter to update a user in Microsoft Entra ID. + +## Examples + +### Example 1: Update a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$user = Get-EntraBetaUser -UserId 'SawyerM@contoso.com' +$params = @{ + UserId = $user.ObjectId + DisplayName = 'Updated user Name' +} +Set-EntraBetaUser @params +``` + +This example updates the specified user's Display name parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. + +### Example 2: Set the specified user's AccountEnabled parameter + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + AccountEnabled = $true +} +Set-EntraBetaUser @params +``` + +This example updates the specified user's AccountEnabled parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-AccountEnabled` Specifies whether the account is enabled. + +### Example 3: Set all but specified users as minors with parental consent + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +Get-EntraBetaUser -All | Where-Object -FilterScript { $_.DisplayName -notmatch '(George|James|Education)' } | +ForEach-Object { Set-EntraBetaUser -UserId $($_.ObjectId) -AgeGroup 'minor' -ConsentProvidedForMinor 'granted' } +``` + +This example updates the specified user's as minors with parental consent. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-ConsentProvidedForMinor` Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. + +### Example 4: Set the specified user's property + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All','Directory.AccessAsUser.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + City = 'Add city name' + CompanyName = 'Microsoft' + Country = 'Add country name' + Department = 'Add department name' + GivenName = 'Mircosoft' + ImmutableId = '#1' + JobTitle = 'Manager' + MailNickName = 'Add mailnickname' + Mobile = '9984534564' + OtherMails = 'test12@M365x99297270.OnMicrosoft.com' + PasswordPolicies = 'DisableStrongPassword' + State = 'UP' + StreetAddress = 'Add address' + UserType = 'Member' +} +Set-EntraBetaUser @params +``` + +This example updates the specified user's property. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-UserType` classify user types in your directory, such as "Member" and "Guest." +- `-PasswordPolicies` Specifies password policies for the user. +- `-OtherMails` Specifies other email addresses for the user + +### Example 5: Set the specified user's PasswordProfile parameter + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$params= @{ +UserId = 'SawyerM@contoso.com' +PasswordProfile = @{ + Password= '*****' + ForceChangePasswordNextLogin = $true + EnforceChangePasswordPolicy = $false + } +} +Set-EntraBetaUser @params +``` + +This example updates the specified user's PasswordProfile parameter. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-PasswordProfile` specifies the user's password profile. + +### Example 6: Set user's usage location for license assignment + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +Set-EntraBetaUser -UserId 'SawyerM@contoso.com' -UsageLocation 'US' +``` + +This example updates the specified user's Usage Location for license management. + +- `-UserId` Specifies the ID as a user principal name (UPN) or UserId. +- `-UsageLocation` specifies the user's usage location. Two-letter ISO 3166 country code. Required for licensed users to check service availability. Examples: US, JP, GB. Not nullable. + +## Parameters + +### -AccountEnabled + +Indicates whether the account is enabled. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -City + +Specifies the user's city. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Country + +Specifies the user's country. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CreationType + +Indicates whether the user account is a local account for a Microsoft Entra ID B2C tenant. +Possible values are "LocalAccount" and null. +When creating a local account, the property is required and you must set it to "LocalAccount". +When creating a work or school account, don't specify the property or set it to null. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Department + +Specifies the user's department. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName + +Specifies the user's display name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProperty + +Add data to custom user properties as the basic open extensions or the more versatile schema extensions. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GivenName + +Specifies the user's given name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImmutableId + +This property links an on-premises Active Directory user account to its Microsoft Entra ID user object. You must specify this property when creating a new user account in Graph if the user's userPrincipalName uses a federated domain. + +Important: Do not use the $ and _ characters when specifying this property. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JobTitle + +Specifies the user's job title. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MailNickName + +Specifies a nickname for the user's mail address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Mobile + +Specifies the user's mobile phone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserId + +Specifies the ID of a user (as a User Principle Name or UserId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -OtherMails + +Specifies other email addresses for the user. + +```yaml +Type: System.Collections.Generic.List`1[System.String] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordPolicies + +Specifies password policies for the user. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PasswordProfile + +Specifies the user's password profile. + +```yaml +Type: PasswordProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PostalCode + +Specifies the user's postal code. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreferredLanguage + +Specifies the user's preferred language. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShowInAddressList + +Set to True to show this user in the address list. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SignInNames + +The list of sign in names for this user + +```yaml +Type: System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -State + +Specifies the user's state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StreetAddress + +Specifies the user's street address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Surname + +Specifies the user's surname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TelephoneNumber + +Specifies the user's telephone number. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UsageLocation + +A two letter country or region code (ISO standard 3166). Required for users that assigned licenses due to legal requirement to check for availability of services in country and regions. Examples include: "US," "JP," and "GB." Not nullable. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserPrincipalName + +Specifies the user's user principal name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserType + +A string value that can be used to classify user types in your directory, such as "Member" and "Guest." + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AgeGroup + +Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, minor, notAdult, and adult. See, [legal-age-group](https://learn.microsoft.com/graph/api/resources/user#legal-age-group-property-definitions). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CompanyName + +The company name, which the user is associated. This property can be useful for describing the company that an external user comes from. The maximum length of the company name is 64 characters. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConsentProvidedForMinor + +Sets whether consent has to obtained for minors. Allowed values: null, granted, denied, and notRequired. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraBetaUser](Get-EntraBetaUser.md) + +[New-EntraBetaUser](New-EntraBetaUser.md) + +[Remove-EntraBetaUser](Remove-EntraBetaUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md new file mode 100644 index 0000000000..c232117708 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md @@ -0,0 +1,152 @@ +--- +title: Set-EntraBetaUserExtension +description: This article provides details on the Set-EntraBetaUserExtension command. + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserExtension + +schema: 2.0.0 +--- + +# Set-EntraBetaUserExtension + +## Synopsis + +Sets a user extension. + +## Syntax + +### SetSingle + +```powershell +Set-EntraBetaUserExtension + -ExtensionName + -ObjectId + -ExtensionValue + [] +``` + +### SetMultiple + +```powershell +Set-EntraBetaUserExtension + -ObjectId + -ExtensionNameValues + [] +``` + +## Description + +The `Set-EntraBetaUserExtension` cmdlet updates a user extension in Microsoft Entra ID. + +## Examples + +### Example 1: Set the value of an extension attribute for a user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$params = @{ + ObjectId = 'SawyerM@contoso.com' + ExtensionName = 'extension_e5e29b8a85d941eab8d12162bd004528_extensionAttribute8' + ExtensionValue = 'New Value' +} +Set-EntraBetaUserExtension @params +``` + +This example shows how to update the value of the extension attribute for a specified user. + +- `-ObjectId` parameter specifies the user Id. +- `-ExtensionName` parameter specifies the name of an extension. +- `-ExtensionValue` parameter specifies the extension name values. + +## Parameters + +### -ExtensionName + +Specifies the name of an extension. + +```yaml +Type: System.String +Parameter Sets: SetSingle +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExtensionNameValues + +Specifies extension name values. + +```yaml +Type: System.Collections.Generic.Dictionary`2[System.String,System.String] +Parameter Sets: SetMultiple +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ExtensionValue + +Specifies an extension value. + +```yaml +Type: System.String +Parameter Sets: SetSingle +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUser](Get-EntraBetaUser.md) + +[Get-EntraBetaUserExtension](Get-EntraBetaUserExtension.md) + +[Remove-EntraBetaUserExtension](Remove-EntraBetaUserExtension.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md new file mode 100644 index 0000000000..3b653a5d4d --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md @@ -0,0 +1,213 @@ +--- +title: Set-EntraBetaUserLicense +description: This article provides details on the Set-EntraBetaUserLicense command. + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserLicense + +schema: 2.0.0 +--- + +# Set-EntraBetaUserLicense + +## Synopsis + +Adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. + +## Syntax + +```powershell +Set-EntraBetaUserLicense + -ObjectId + -AssignedLicenses + [] +``` + +## Description + +The `Set-EntraBetaUserLicense` adds or removes licenses for a Microsoft online service to the list of assigned licenses for a user. + +For delegated scenarios, the calling user needs at least one of the following Microsoft Entra roles. + +- Directory Writers +- License Administrator +- User Administrator + +**Note**: Before assigning a license, assign a usage location to the user using: +`Set-EntraUser -ObjectId user@contoso.com -UsageLocation ''`. + +## Examples + +### Example 1: Add a license to a user based on a template user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$LicensedUser = Get-EntraBetaUser -ObjectId 'TemplateUser@contoso.com' +$License = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License.SkuId = $LicensedUser.AssignedLicenses.SkuId +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.AddLicenses = $License +$Params = @{ + ObjectId = 'SawyerM@contoso.com' + AssignedLicenses = $Licenses +} +Set-EntraBetaUserLicense @Params +``` + +```Output +Name Value +---- ----- +externalUserStateChangeDateTi… +businessPhones {8976546787} +postalCode 444601 +createdDateTime 06-11-2023 04:48:19 +surname KTETSs +jobTitle Manager +employeeType +otherMails {SawyerM@contoso.com} +isResourceAccount +usageLocation DE +legalAgeGroupClassification Adult +id cccccccc-2222-3333-4444-dddddddddddd +isLicenseReconciliationNeeded False +``` + +This example demonstrates how to assign a license to a user based on a template user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +### Example 2: Add a license to a user by copying license from another user + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$LicensedUser = Get-EntraBetaUser -ObjectId 'AdeleV@contoso.com' +$User = Get-EntraBetaUser -ObjectId 'SawyerM@contoso.com' +$License1 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License1.SkuId = $LicensedUser.AssignedLicenses.SkuId[0] +$License2 = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicense +$License2.SkuId = $LicensedUser.AssignedLicenses.SkuId[1] +$addLicensesArray = @() +$addLicensesArray += $License1 +$addLicensesArray += $License2 +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.AddLicenses = $addLicensesArray +$Params = @{ + ObjectId = $User.ObjectId + AssignedLicenses = $Licenses +} +Set-EntraBetaUserLicense @Params +``` + +```Output +Name Value +---- ----- +externalUserStateChangeDateTi… +businessPhones {8976546787} +postalCode 444601 +createdDateTime 06-11-2023 04:48:19 +surname KTETSs +jobTitle Manager +employeeType +otherMails {SawyerM@contoso.com} +isResourceAccount +usageLocation DE +legalAgeGroupClassification Adult +id cccccccc-2222-3333-4444-dddddddddddd +isLicenseReconciliationNeeded False +``` + +This example demonstrates how to assign a license to a user by copying license from another user. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +### Example 3: Remove an assigned User's License + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$UserPrincipalName = 'SawyerM@contoso.com' +$User = Get-EntraBetaUser -ObjectId $UserPrincipalName +$SkuId = (Get-EntraBetaUserLicenseDetail -ObjectId $UserPrincipalName).SkuId +$Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses +$Licenses.RemoveLicenses = $SkuId +Set-EntraBetaUserLicense -ObjectId $User.ObjectId -AssignedLicenses $Licenses +``` + +```Output +Name Value +---- ----- +displayName SawyerM +id cccccccc-2222-3333-4444-dddddddddddd +jobTitle +surname M +mail +userPrincipalName SawyerM@contoso.com +mobilePhone +preferredLanguage +@odata.context https://graph.microsoft.com/v1.0/$metadata#users/$entity +businessPhones {} +officeLocation +givenName Sawyer +``` + +This example demonstrates how to remove a user's license by retrieving the user details. + +- `-ObjectId` parameter specifies the object Id of a user(as a UserPrincipalName or ObjectId). +- `-AssignedLicenses` parameter specifies a list of licenses to assign or remove. + +## Parameters + +### -AssignedLicenses + +Specifies a list of licenses to assign or remove. + +```yaml +Type: AssignedLicenses +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaUser](Get-EntraBetaUser.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md new file mode 100644 index 0000000000..b7e37a4c68 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md @@ -0,0 +1,101 @@ +--- +title: Set-EntraBetaUserManager +description: This article provides details on the Set-EntraBetaUserManager command. + +ms.topic: reference +ms.date: 06/21/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserManager + +schema: 2.0.0 +--- + +# Set-EntraBetaUserManager + +## Synopsis + +Updates a user's manager. + +## Syntax + +```powershell +Set-EntraBetaUserManager + -UserId + -RefObjectId + [] +``` + +## Description + +The `Set-EntraBetaUserManager` cmdlet update the manager for a user in Microsoft Entra ID. Specify the `UserId` and `RefObjectId` parameters to update the manager for a user in Microsoft Entra ID. + +## Examples + +### Example 1: Update a user's manager + +```powershell +Connect-Entra -Scopes 'User.ReadWrite.All' +$manager = Get-EntraBetaUser -UserId 'Manager@contoso.com' +$params = @{ + UserId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + RefObjectId = '55ff55ff-aa66-bb77-cc88-99dd99dd99dd' +} +Set-EntraBetaUserManager @params +``` + +This example demonstrates how to update the manager for the specified user. + +## Parameters + +### -UserId + +Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -RefObjectId + +Specifies the ID of the Microsoft Entra ID object to assign as owner/manager/member. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related links + +[Get-EntraBetaUserManager](Get-EntraBetaUserManager.md) + +[Remove-EntraBetaUserManager](Remove-EntraBetaUserManager.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md new file mode 100644 index 0000000000..6f56024d9c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md @@ -0,0 +1,164 @@ +--- +title: Set-EntraBetaUserPassword +description: This article provides details on the Set-EntraBetaUserPassword command. + +ms.topic: reference +ms.date: 07/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserPassword + +schema: 2.0.0 +--- + +# Set-EntraBetaUserPassword + +## Synopsis + +Sets the password of a user. + +## Syntax + +```powershell +Set-EntraBetaUserPassword + -ObjectId + -Password + [-ForceChangePasswordNextLogin ] + [-EnforceChangePasswordPolicy ] + [] +``` + +## Description + +The `Set-EntraBetaUserPassword` cmdlet sets the password for a user in Microsoft Entra ID. + +Any user can update their password without belonging to any administrator role. + +## Examples + +### Example 1: Set a user's password + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword = '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraBetaUserPassword -ObjectId 'SawyerM@contoso.com' -Password $securePassword +``` + +This command sets the specified user's password. + +- `-ObjectId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. + +### Example 2: Set a user's password with EnforceChangePasswordPolicy parameter + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword= '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraBetaUserPassword -ObjectId 'SawyerM@contoso.com' -Password $securePassword -EnforceChangePasswordPolicy $True +``` + +This command sets the specified user's password with EnforceChangePasswordPolicy parameter. + +- `-ObjectId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. +- `-EnforceChangePasswordPolicy` parameter force the user to change their password, if set to true. + +### Example 3: Set a user's password with ForceChangePasswordNextLogin parameter + +```powershell +connect-Entra -Scopes 'Directory.AccessAsUser.All' +$newPassword= '' +$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force +Set-EntraBetaUserPassword -ObjectId 'SawyerM@contoso.com' -Password $securePassword -ForceChangePasswordNextLogin $True +``` + +This command sets the specified user's password with ForceChangePasswordNextLogin parameter. + +- `-ObjectId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-Password` parameter specifies the password to set. +- `-ForceChangePasswordNextLogin` parameter forces a user to change their password during their next log in. + +## Parameters + +### -EnforceChangePasswordPolicy + +If set to true, force the user to change their password. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ForceChangePasswordNextLogin + +Forces a user to change their password during their next sign in. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ObjectId + +Specifies the ID of an object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Password + +Specifies the password. + +```yaml +Type: System.SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md new file mode 100644 index 0000000000..41b1886639 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md @@ -0,0 +1,162 @@ +--- +title: Set-EntraBetaUserThumbnailPhoto +description: This article provides details on the Set-EntraBetaUserThumbnailPhoto command. + +ms.topic: reference +ms.date: 07/24/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserThumbnailPhoto + +schema: 2.0.0 +--- + +# Set-EntraBetaUserThumbnailPhoto + +## Synopsis + +Set the thumbnail photo for a user. + +## Syntax + +### File (Default) + +```powershell +Set-EntraBetaUserThumbnailPhoto + -FilePath + [-UserId ] + [] +``` + +### ByteArray + +```powershell +Set-EntraBetaUserThumbnailPhoto + -ImageByteArray + [-UserId ] + [] +``` + +### Stream + +```powershell +Set-EntraBetaUserThumbnailPhoto + -FileStream + [-UserId ] + [] +``` + +## Description + +The `Set-EntraBetaUserThumbnailPhoto` cmdlet is used to set the thumbnail photo for a user. + +Updating any user's photo in the organization requires the User.ReadWrite.All permission. Updating only the signed-in user's photo requires the User.ReadWrite permission. + +## Examples + +### Example 1: Sets the thumbnail photo + +```powershell +Connect-Entra -Scopes 'User.ReadWrite','User.ReadWrite.All' +$params = @{ + UserId = 'SawyerM@contoso.com' + FilePath = 'D:\UserThumbnailPhoto.jpg' +} +Set-EntraBetaUserThumbnailPhoto @params +``` + +This example sets the thumbnail photo of the user specified with the UserId parameter to the image specified with the FilePath parameter. + +- `-UserId` parameter specifies the ID of a user in Microsoft Entra ID. +- `-FilePath` parameter specifies the file path of the image to be uploaded as the user thumbnail photo. + +## Parameters + +### -FilePath + +The file path of the image to be uploaded as the user thumbnail photo. + +```yaml +Type: System.String +Parameter Sets: File +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -FileStream + +A filestream that contains the user thumbnail photo. + +```yaml +Type: System.Stream +Parameter Sets: Stream +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -ImageByteArray + +An Image Byte Array that contains the user thumbnail photo. + +```yaml +Type: System.Byte[] +Parameter Sets: ByteArray +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -UserId + +The Object ID of the user for which the user thumbnail photo is set. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.IO.Stream System.Byte\[\] + +## Outputs + +### System.Object + +## Notes + +## Related Links + +[Get-EntraBetaUserThumbnailPhoto](Get-EntraBetaUserThumbnailPhoto.md) diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md b/moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md new file mode 100644 index 0000000000..c444c40a75 --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md @@ -0,0 +1,105 @@ +--- +title: Update-EntraBetaSignedInUserPassword +description: This article provides details on the Update-EntraBetaSignedInUserPassword command. + +ms.topic: reference +ms.date: 07/26/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Update-EntraBetaSignedInUserPassword + +schema: 2.0.0 +--- + +# Update-EntraBetaSignedInUserPassword + +## Synopsis + +Updates the password for the signed-in user. + +## Syntax + +```powershell +Update-EntraBetaSignedInUserPassword + -CurrentPassword + -NewPassword + [] +``` + +## Description + +The `Update-EntraBetaSignedInUserPassword` cmdlet updates the password for the signed-in user in Microsoft Entra ID. + +Enable users to update their own passwords. Any user can change their password without requiring administrator privileges. + +## Examples + +### Example 1: Update a password + +```powershell +Connect-Entra -Scopes 'Directory.AccessAsUser.All' +$CurrentPassword = ConvertTo-SecureString '' -AsPlainText -Force +$NewPassword = ConvertTo-SecureString '' -AsPlainText -Force +$params = @{ + CurrentPassword = $CurrentPassword + NewPassword = $NewPassword +} +Update-EntraBetaSignedInUserPassword @params +``` + +This example shows how to update the password for the signed-in user. + +- `-CurrentPassword` parameter specifies the current password of the signed-in user. +- `-NewPassword` parameter specifies the new password for the signed-in user. + +## Parameters + +### -CurrentPassword + +Specifies the current password of the signed-in user. + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NewPassword + +Specifies the new password for the signed-in user. + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [changePassword](https://learn.microsoft.com/graph/api/user-changepassword). + +## Related links diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md b/moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md new file mode 100644 index 0000000000..ae4737fd5c --- /dev/null +++ b/moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md @@ -0,0 +1,105 @@ +--- +title: Update-EntraBetaUserFromFederated +description: This article provides details on the Update-EntraBetaUserFromFederated command. + +ms.topic: reference +ms.date: 08/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserFromFederated + +schema: 2.0.0 +--- + +# Update-EntraBetaUserFromFederated + +## Synopsis + +Updates a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. + +## Syntax + +```powershell +Update-EntraBetaUserFromFederated + -UserPrincipalName + [-NewPassword ] + [] +``` + +## Description + +The `Update-EntraBetaUserFromFederated` cmdlet is used to update a user in a domain that was recently converted from single sign-on (also known as identity federation) to standard authentication type. A new password must be provided for the user. + +This process writes the new password to Microsoft Entra ID and, if configured with password writeback, pushes it to on-premises Active Directory. The admin can provide a new password or let the system generate one. The user will be prompted to change their password at their next sign-in. + +For delegated scenarios, the administrator needs at least the Authentication Administrator or Privileged Authentication Administrator Microsoft Entra role. + +Admins with User Administrator, Helpdesk Administrator, or Password Administrator roles can also reset passwords for non-admin users and a limited set of admin roles. + +## Examples + +### Example 1: Update a user in a domain + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.ReadWrite.All' +Update-EntraBetaUserFromFederated -UserPrincipalName 'pattifuller@contoso.com' +``` + +This command updates a user in a domain. + +- `-UserPrincipalName` parameter specifies the Microsoft Entra ID UserID for the user to convert. + +## Parameters + +### -UserPrincipalName + +The Microsoft Entra ID UserID for the user to convert. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -NewPassword + +The new password of the user. + +For tenants using hybrid password scenarios, specifying a new password is required. If you omit the password for a cloud-only account, the system generates one automatically. This generated password is a Unicode string without additional encoding. Before acceptance, the password is validated against the tenant's banned password list and must meet the tenant's cloud and/or on-premises password requirements. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +- For more information, see [resetPassword](https://learn.microsoft.com/graph/api/authenticationmethod-resetpassword). + +## Related Links diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index a6f0532981..9bbca4a300 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -111,7 +111,7 @@ Set-StrictMode -Version 5 $functionsToExport = ($otherFiles + $enableEntraFiles | ForEach-Object { $_.BaseName }) -join "', '" $psm1Content += "`nExport-ModuleMember -Function @('$functionsToExport')`n" - Write-Host "[EntraModuleBuilder] Appending content from Typedefs.txt" -ForegroundColor Cyan + Log-Message "[EntraModuleBuilder] ProcessSubDirectory: Appending content from Typedefs.txt" -ForegroundColor Cyan $typedefsContent = Get-Content -Path $typedefsFilePath -Raw $psm1Content += "`n# Typedefs`n" + $typedefsContent @@ -134,7 +134,7 @@ Set-StrictMode -Version 5 $resolvedStartDirectory = $this.ResolveStartDirectory($startDirectory) if (-not ($this.CheckTypedefsFile($typedefsFilePath))) { - Log-Message "Typedefs.txt not found" -Level 'ERROR' + Log-Message "[EntraModuleBuilder] $typedefsFilePath not found" -Level 'ERROR' return } @@ -156,7 +156,7 @@ Set-StrictMode -Version 5 foreach ($subDir in $subDirectories) { # Skip the 'Migration' sub-directory if ($subDir.Name -eq 'Migration' -or $subDir.Name -eq 'Invitations') { - Log-Message "Skipping 'Migration' directory." -Level 'INFO' + Log-Message "[EntraModuleBuilder]: Skipping 'Migration' directory." -Level 'INFO' continue } $this.ProcessSubDirectory($subDir.FullName, $subDir.Name, $parentDirName, $destDirectory, $typedefsFilePath) @@ -177,7 +177,7 @@ Set-StrictMode -Version 5 } if (-Not (Test-Path -Path $DirectoryPath)) { - Write-Host "Directory does not exist: $directoryPath" -ForegroundColor Red + Log-Message "[EntraModuleBuilder]: Directory does not exist: $directoryPath" -ForegroundColor Red return $null # Return null if directory does not exist } @@ -186,7 +186,7 @@ Set-StrictMode -Version 5 # Check if any .psm1 files were found if ($subModules.Count -eq 0) { - Log-Message "No .psm1 files found in the directory: $directoryPath" -Level 'INFO' + Log-Message "[EntraModuleBuilder]: No .psm1 files found in the directory: $directoryPath" -Level 'INFO' return @() # Return an empty array if no files are found } else { # Return the names of the .psm1 files @@ -248,7 +248,7 @@ foreach (`$subModule in `$subModules) { $rootModuleContent | Out-File -FilePath $rootPsm1FilePath -Encoding utf8 - Log-Message "[EntraModuleBuilder] Root Module successfully created" -Level 'SUCCESS' + Log-Message "[EntraModuleBuilder]: Root Module successfully created" -Level 'SUCCESS' } [void] CreateRootModuleManifest([string] $Module) { @@ -263,7 +263,7 @@ foreach (`$subModule in `$subModules) { $moduleName=if($Module -eq 'Entra'){ 'Microsoft.Graph.Entra' }else{ - 'Microsoft.Grap.Entra.Beta' + 'Microsoft.Graph.Entra.Beta' } $settingPath = Join-Path $rootPath -ChildPath "/config/ModuleMetadata.json" @@ -285,7 +285,7 @@ foreach (`$subModule in `$subModules) { $nestedModules=@() foreach($module in $subModules){ if($module -ne "$($moduleName).psm1"){ - Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' + Log-Message "[EntraModuleBuilder]: Adding $module to Root Module Nested Modules" -Level 'INFO' $nestedModules += $module } } @@ -312,12 +312,12 @@ foreach (`$subModule in `$subModules) { $PSData.Prerelease = $content.Prerelease } - Log-Message "Starting Root Module Manifest generation" -Level 'INFO' + Log-Message "[EntraModuleBuilder]: Starting Root Module Manifest generation" -Level 'INFO' New-ModuleManifest @moduleSettings Update-ModuleManifest -Path $manifestPath -PrivateData $PSData - Log-Message "Root Module Manifest successfully created" -Level 'INFO' + Log-Message "[EntraModuleBuilder]: Root Module Manifest successfully created" -Level 'INFO' } [void] CreateModuleManifest($module) { @@ -368,7 +368,7 @@ foreach (`$subModule in `$subModules) { } # Log the start of processing for this module - Log-Message "[EntraModuleBuilder] Processing module: $moduleFileName" + Log-Message "[EntraModuleBuilder]: Processing module: $moduleFileName" # Define PSData block based on the contents of the ModuleMetadata.json file $PSData = @{ @@ -385,7 +385,7 @@ foreach (`$subModule in `$subModules) { # Check if the specified directory exists if (-Not (Test-Path -Path $subDir)) { - Log-Message "The specified directory does not exist: $subDir" -Level 'ERROR' + Log-Message "[EntraModuleBuilder]: The specified directory does not exist: $subDir" -Level 'ERROR' exit } @@ -440,13 +440,13 @@ foreach (`$subModule in `$subModules) { } # Create and update the module manifest - Log-Message "[EntraModuleBuilder] Creating manifest for $moduleName at $manifestPath" + Log-Message "[EntraModuleBuilder]: Creating manifest for $moduleName at $manifestPath" try{ New-ModuleManifest @moduleSettings Update-ModuleManifest -Path $manifestPath -PrivateData $PSData # Log completion for this module - Log-Message "[EntraModuleBuilder] Manifest for $moduleName created successfully" -Level 'SUCCESS' + Log-Message "[EntraModuleBuilder]: Manifest for $moduleName created successfully" -Level 'SUCCESS' }catch{ Log-Message $_.Exception.Message -Level 'ERROR' @@ -461,11 +461,14 @@ foreach (`$subModule in `$subModules) { [void] CreateModuleHelp([string] $Module) { + + Log-Message "[EntraModuleBuilder] CreateModuleHelp: Starting the creation of Module help.." if (!(Test-Path $this.OutputDirectory)) { New-Item -ItemType Directory -Path $this.OutputDirectory | Out-Null } + Log-Message "[EntraModuleBuilder] CreateModuleHelp: Output Directory $this.OutputDirectory verified..." # Determine the base docs path based on the specified module $docsPath = $this.BaseDocsPath if ($Module -eq "Entra") { @@ -473,31 +476,35 @@ foreach (`$subModule in `$subModules) { } elseif ($Module -eq "EntraBeta") { $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-beta" } else { - Log-Message "Invalid module specified: $Module" -Level 'ERROR' + Log-Message "[EntraModuleBuilder] CreateModuleHelp:Invalid module specified: $Module" -Level 'ERROR' return } # Check if the base docs path exists if (!(Test-Path $docsPath)) { - Log-Message "The specified base documentation path does not exist: $docsPath" -Level 'ERROR' + Log-Message "[EntraModuleBuilder] CreateModuleHelp: The specified base documentation path does not exist: $docsPath" -Level 'ERROR' return } + Log-Message "[EntraModuleBuilder] CreateModuleHelp: Docs files directory &docsPath verified..." + # Get all subdirectories within the base docs path $subDirectories = Get-ChildItem -Path $docsPath -Directory foreach ($subDirectory in $subDirectories) { # Skip the 'Migration' sub-directory if ($subDirectory.Name -eq 'Migration' -or $subDirectory.Name -eq 'Invitations') { - Log-Message "Skipping 'Migration' directory." -Level 'INFO' + Log-Message "[EntraModuleBuilder] CreateModuleHelp:Skipping 'Migration' directory." -Level 'INFO' continue } + Log-Message "[EntraModuleBuilder] CreateModuleHelp:Creating help file for $subDirectory.." + # Get all markdown files in the current subdirectory $markDownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" # Check if markdown files are found if (-not($markDownFiles)) { - Log-Message "No markdown files found in $($subDirectory.FullName)." -Level 'ERROR' + Log-Message "[EntraModuleBuilder] CreateModuleHelp:No markdown files found in $($subDirectory.FullName)." -Level 'ERROR' continue } @@ -518,7 +525,7 @@ foreach (`$subModule in `$subModules) { # Create the help file using PlatyPS New-ExternalHelp -Path $moduleDocsPath -OutputPath $helpOutputFilePath -Force - Log-Message "[EntraModuleBuilder] Help file generated: $helpOutputFilePath" -Level 'SUCCESS' + Log-Message "[EntraModuleBuilder] CreateModuleHelp help file generated: $helpOutputFilePath" -Level 'SUCCESS' } catch { Log-Message "[EntraModuleBuilder] CreateModuleHelp: $_.Exception.Message" -Level 'ERROR' diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 1f857e8ca4..197cfe5b46 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -196,7 +196,11 @@ class EntraModuleSplitter { # Get total alias lines from the alias file (ignoring comments and empty lines) $aliasFileContent = $this.GetFilteredAliasFileContent($aliasFilePath) - $totalAliases = $aliasFileContent.Count + $totalAliases = if($aliasFileContent){ + $aliasFileContent.Count + }else{ + 0 + } foreach ($directory in $directories) { # Skip the 'Migration' sub-directory @@ -318,7 +322,7 @@ class EntraModuleSplitter { $unMappedAliases = $aliasFileContent | Where-Object { $allMappedAliases -notcontains $_ } # Remove the first and last lines if applicable - if ($unMappedAliases.Count -gt 2) { + if ($unMappedAliases -and $unMappedAliases.Count -gt 2) { $unMappedAliases = $unMappedAliases[1..($unMappedAliases.Count - 2)] } else { $unMappedAliases = @() # Ensure it returns an empty array if fewer than 2 lines diff --git a/testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 b/testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 new file mode 100644 index 0000000000..b3016636ee --- /dev/null +++ b/testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 @@ -0,0 +1,55 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Add-EntraApplicationOwner" { + Context "Test for Add-EntraApplicationOwner" { + It "Should return empty object"{ + $result = Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when parameters are empty" { + { Add-EntraApplicationOwner -ApplicationId "" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter*" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + Mock -CommandName New-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "aaaaaaaa-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraApplicationOwner" + Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraApplicationOwner" + Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 new file mode 100644 index 0000000000..39925b7cf7 --- /dev/null +++ b/testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking New-MgServicePrincipalDelegatedPermissionClassification with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "Classification" = "low" + "Id" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "PermissionId" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "PermissionName" = "access_microsoftstream_embed" + "ServicePrincipalId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Add-EntraServicePrincipalDelegatedPermissionClassification"{ + Context "Test for Add-EntraServicePrincipalDelegatedPermissionClassification" { + It "Should Add a classification for a delegated permission."{ + $result = Add-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PermissionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Classification "low" -PermissionName "access_microsoftstream_embed" + $result | Should -Not -BeNullOrEmpty + $result.ServicePrincipalId | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.PermissionId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.Classification | should -Be "low" + $result.PermissionName | should -Be "access_microsoftstream_embed" + + Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ObjectId" { + $result = Add-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PermissionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Classification "low" -PermissionName "access_microsoftstream_embed" + $result.ObjectId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraServicePrincipalDelegatedPermissionClassification" + + $result = Add-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PermissionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Classification "low" -PermissionName "access_microsoftstream_embed" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraServicePrincipalDelegatedPermissionClassification" + + Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PermissionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Classification "low" -PermissionName "access_microsoftstream_embed" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 b/testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 new file mode 100644 index 0000000000..3a2dd0ed64 --- /dev/null +++ b/testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Add-EntraServicePrincipalOwner" { + Context "Test for Add-EntraServicePrincipalOwner" { + It "Should return empty object" { + $result = Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result = Add-EntraServicePrincipalOwner -ObjectId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Add-EntraServicePrincipalOwner -ServicePrincipalId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is invalid" { + { Add-EntraServicePrincipalOwner -ServicePrincipalId "" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + } + It "Should contain BodyParameter in parameters when passed RefObjectId to it" { + Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $value = @{"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' + Write-Host $BodyParameter.AdditionalProperties.'@odata.id' + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraServicePrincipalOwner" + + Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraServicePrincipalOwner" + + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraServicePrincipalOwner -ServicePrincipalId "0008861a-d455-4671-bd24-ce9b3bfce288" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } + +} + diff --git a/testVNext/Entra/Applications/Entra.Tests.ps1 b/testVNext/Entra/Applications/Entra.Tests.ps1 new file mode 100644 index 0000000000..e6b0c31795 --- /dev/null +++ b/testVNext/Entra/Applications/Entra.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 new file mode 100644 index 0000000000..bebd63819d --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 @@ -0,0 +1,154 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AppId" = "aaaaaaaa-1111-2222-3333-cccccccccccc" + "DeletedDateTime" = $null + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "DisplayName" = "Mock-App" + "Info" = @{LogoUrl = ""; MarketingUrl = ""; PrivacyStatementUrl = ""; SupportUrl = ""; TermsOfServiceUrl = "" } + "IsDeviceOnlyAuthSupported" = $True + "IsFallbackPublicClient" = $true + "KeyCredentials" = @{CustomKeyIdentifier = @(211, 174, 247); DisplayName = ""; Key = ""; KeyId = "pppppppp-1111-2222-3333-cccccccccccc"; Type = "Symmetric"; Usage = "Sign" } + "OptionalClaims" = @{AccessToken = ""; IdToken = ""; Saml2Token = "" } + "ParentalControlSettings" = @{CountriesBlockedForMinors = $null; LegalAgeGroupRule = "Allow" } + "PasswordCredentials" = @{} + "PublicClient" = @{RedirectUris = $null } + "PublisherDomain" = "aaaabbbbbcccc.onmicrosoft.com" + "SignInAudience" = "AzureADandPersonalMicrosoftAccount" + "Web" = @{HomePageUrl = "https://localhost/demoapp"; ImplicitGrantSettings = ""; LogoutUrl = ""; } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraApplication" { + Context "Test for Get-EntraApplication" { + It "Should return specific application" { + $result = Get-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is invalid" { + { Get-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should fail when ApplicationId is empty" { + { Get-EntraApplication -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should return all applications" { + $result = Get-EntraApplication -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraApplication -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should fail when searchstring is empty" { + { Get-EntraApplication -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Should fail when filter is empty" { + { Get-EntraApplication -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should fail when Top is empty" { + { Get-EntraApplication -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraApplication -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return specific application by searchstring" { + $result = Get-EntraApplication -SearchString 'Mock-App' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific application by filter" { + $result = Get-EntraApplication -Filter "DisplayName -eq 'Mock-App'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return top application" { + $result = @(Get-EntraApplication -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ApplicationId" { + $result = Get-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + $result = Get-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.ApplicationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraApplication -SearchString 'Mock-App' + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "Mock-App" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplication" + + $result = Get-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplication" + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Property parameter should work" { + $result = Get-EntraApplication -Top 1 -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraApplication -Top 1 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + It "Should execute successfully with Alias" { + $result = Get-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + Write-Verbose "Result : {$result}" -Verbose + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 new file mode 100644 index 0000000000..7627d7bafd --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraApplicationExtensionProperty with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-1111-2222-3333-ccccccccccc" + "Name" = "extension_222_324_NewAttribute" + "TargetObjects" = {} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + } + + Describe "Get-EntraApplicationExtensionProperty" { + Context "Test for Get-EntraApplicationExtensionProperty" { + It "Should not return empty" { + $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Get-EntraApplicationExtensionProperty -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Result should Contain ApplicationId" { + $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result.ObjectId | should -Be "aaaaaaaa-1111-2222-3333-ccccccccccc" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.ApplicationId | Should -Be "aaaaaaaa-1111-2222-3333-ccccccccccc" + } + It "Property parameter should work" { + $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -Property Name + $result | Should -Not -BeNullOrEmpty + $result.Name | Should -Be 'extension_222_324_NewAttribute' + + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should fail when Property is empty" { + { Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationExtensionProperty" + $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationExtensionProperty" + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 new file mode 100644 index 0000000000..7bc3c922f4 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + @{ + "KeyCredentials" = @( + @{ + "CustomKeyIdentifier" = "" + "EndDate" = "10/23/2024 11:36:56 AM" + "KeyId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "StartDate" = "11/22/2023 11:35:16 AM" + "Type" = "Symmetric" + "Usage" = "Sign" + "Value" = "" + "Parameters" = $args + } + ) + } + } + + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + } + + Describe "Get-EntraApplicationKeyCredential" { + Context "Test for Get-EntraApplicationKeyCredential" { + It "Should not return empty" { + $result = Get-EntraApplicationKeyCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ObjectId is empty" { + { Get-EntraApplicationKeyCredential -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationKeyCredential" + $result = Get-EntraApplicationKeyCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationKeyCredential" + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraApplicationKeyCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } + } + diff --git a/testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 new file mode 100644 index 0000000000..509f3a0164 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + @{ + "Info" = @( + @{ + "logoUrl" = "" + "Parameters" = $args + }) + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraApplicationLogo" { + It "Should return empty" { + $result = Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty" { + $result = Get-EntraApplicationLogo -ObjectId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty when passed ileName parameter" { + $result = Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FileName "image" + $result | Should -BeNullOrEmpty + } + It "Should fail when FileName is empty" { + { Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FileName } | Should -Throw "Missing an argument for parameter 'FileName'*" + } + It "Should return empty when passed ileName parameter" { + $result = Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -View $true + $result | Should -BeNullOrEmpty + } + It "Should fail when View is invalid" { + { Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -View "cc" } | Should -Throw "Cannot process argument transformation on parameter 'View'*" + } + It "Should fail when View is empty" { + { Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -View } | Should -Throw "Missing an argument for parameter 'View'*" + } + It "Should fail when ApplicationId is empty" { + { Get-EntraApplicationLogo -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is null" { + { Get-EntraApplicationLogo -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationLogo" + Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationLogo" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 new file mode 100644 index 0000000000..e2e9a23ede --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Get-EntraApplication" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications + } + } + + It "Should support minimum set of parameter sets" { + $GetAzureADApplication = Get-Command Get-EntraApplication + $GetAzureADApplication.ParameterSets.Name | Should -BeIn @("GetQuery", "GetVague", "GetById") + $GetAzureADApplication.Visibility | Should -Be "Public" + $GetAzureADApplication.CommandType | Should -Be "Function" + } + + It "Should return a list of applications by default" { + $GetAzureADApplication = Get-Command Get-EntraApplication + $GetAzureADApplication.ModuleName | Should -Be "Microsoft.Graph.Entra.Applications" + $GetAzureADApplication.DefaultParameterSet | Should -Be "GetQuery" + } + + It 'Should have List parameterSet' { + $GetAzureADApplication = Get-Command Get-EntraApplication + $ListParameterSet = $GetAzureADApplication.ParameterSets | Where-Object Name -eq "GetQuery" + $ListParameterSet.Parameters.Name | Should -Contain All + $ListParameterSet.Parameters.Name | Should -Contain Filter + $ListParameterSet.Parameters.Name | Should -Contain Top + } + + It 'Should have Get parameterSet' { + $GetAzureADApplication = Get-Command Get-EntraApplication + $GetParameterSet = $GetAzureADApplication.ParameterSets | Where-Object Name -eq "GetById" + $GetParameterSet.Parameters.Name | Should -Contain ApplicationId + } + + It 'Should have GetViaIdentity parameterSet' { + $GetAzureADApplication = Get-Command Get-EntraApplication + $GetViaIdentityParameterSet = $GetAzureADApplication.ParameterSets | Where-Object Name -eq "GetVague" + $GetViaIdentityParameterSet.Parameters.Name | Should -Contain SearchString + $GetViaIdentityParameterSet.Parameters.Name | Should -Contain All + } +} \ No newline at end of file diff --git a/testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 new file mode 100644 index 0000000000..d1a82d07b7 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 @@ -0,0 +1,87 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $mockResponse = { + return @{ + value = @( + @{ + Id = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + ageGroup = $null + onPremisesLastSyncDateTime = $null + creationType = $null + preferredLanguage = $null + mail = "admin@contonso.com" + securityIdentifier = "S-1-12-1-1093396945-1080104032-2731339150-364051459" + consentProvidedForMinor = $null + onPremisesUserPrincipalName = $null + Parameters = $args + } + ) + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraApplicationOwner"{ + Context "Test for Get-EntraApplicationOwner"{ + It "Should return application owner" { + $result = Get-EntraApplicationOwner -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + Write-Host $result + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb') + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Get-EntraApplicationOwner -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should fail when ApplicationId is null" { + { Get-EntraApplicationOwner -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when All has an argument" { + { Get-EntraApplicationOwner -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should fail when Top is empty" { + { Get-EntraApplicationOwner -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraApplicationOwner -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Property parameter should work" { + $result = Get-EntraApplicationOwner -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationOwner" + $result = Get-EntraApplicationOwner -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationOwner" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraApplicationOwner -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 new file mode 100644 index 0000000000..77aac893c5 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 @@ -0,0 +1,80 @@ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + @{ + "PasswordCredentials" = @( + @{ + "CustomKeyIdentifier" = {116, 101, 115, 116} + "DisplayName" = "Test" + "EndDateTime" = "10/23/2024 11:36:56 AM" + "KeyId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "StartDateTime" = "11/22/2023 11:35:16 AM" + "Hint" = "123" + "SecretText" = "" + "Parameters" = $args + } + ) + } + } + + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + } + + Describe "Get-EntraApplicationPasswordCredential" { + Context "Test for Get-EntraApplicationPasswordCredential" { + It "Should not return empty" { + $result = Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Get-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is null" { + { Get-EntraApplicationPasswordCredential -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when invalid parameter is passed" { + { Get-EntraApplicationPasswordCredential -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'*" + } + It "Property parameter should work" { + $result = Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Test" + + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationPasswordCredential" + $result = Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationPasswordCredential" + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } + } + diff --git a/testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 new file mode 100644 index 0000000000..0322de771d --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $response = @{ + "id" = "aaaaaaaa-1111-2222-3333-cccccccccccc" + "supportedSingleSignOnModes" = @{} + "publisher" = "test publisher" + "displayName" = "test name" + "homePageUrl" = "samplehomePageUrl" + "logoUrl" = "samplelogourl" + "categories" = @{} + "description" = "" + "supportedProvisioningTypes" = @{} + } + + Mock -CommandName Invoke-GraphRequest -MockWith { $response } -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraApplicationTemplate tests"{ + It "Should return specific application" { + $result = Get-EntraApplicationTemplate -Id "aaaaaaaa-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('aaaaaaaa-1111-2222-3333-cccccccccccc') + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraApplicationTemplate -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when Id is null" { + { Get-EntraApplicationTemplate -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when invalid parameter is passed" { + { Get-EntraApplicationTemplate -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should return all application templates" { + $result = Get-EntraApplicationTemplate + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraApplicationTemplate -Id "aaaaaaaa-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + It "Should return top ApplicationTemplate" { + $result = Get-EntraApplicationTemplate -Top 1 + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Top is invalid" { + { Get-EntraApplicationTemplate -Id "aaaaaaaa-1111-2222-3333-cccccccccccc" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return all templates" { + $result = Get-EntraApplicationTemplate -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraApplicationTemplate -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should contain property when passed property to it" { + $result = Get-EntraApplicationTemplate -Property DisplayName + $result.displayName | Should -Not -BeNullOrEmpty + } + It "Should fail when Property is empty" { + { Get-EntraApplicationTemplate -Property } | Should -Throw "Missing an argument for parameter 'Property'.*" + } + It "Should return specific template by filter" { + $result = Get-EntraApplicationTemplate -Filter "DisplayName eq 'test name'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'test name' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 new file mode 100644 index 0000000000..673bd64db7 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 @@ -0,0 +1,132 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AddIns" = {} + "AppRoles" = {} + "GroupMembershipClaims" = {} + "IdentifierUris" = {} + "Info" = @{ + LogoUrl=""; + } + "IsDeviceOnlyAuthSupported" = $null + "KeyCredentials" = {} + "OptionalClaims" = {} + "ParentalControlSettings" = @{ + CountriesBlockedForMinors=@{}; + LegalAgeGroupRule="Allow"; + } + "PasswordCredentials" = {} + "Api" = @{ + KnownClientApplications=@{}; + PreAuthorizedApplications=@{}; + } + "PublicClient" = @{ + RedirectUris=@{}; + } + "PublisherDomain" = "contoso.com" + "Web" = @{ + HomePageUrl=""; + LogoutUrl=""; + RedirectUris=@{}; + Oauth2AllowImplicitFlow="" + } + "RequiredResourceAccess" = $null + "DisplayName" = "Mock-test-App" + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "Logo" = $null + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgDirectoryDeletedItemAsApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraDeletedApplication" { + Context "Test for Get-EntraDeletedApplication" { + It "Should return all applications" { + $result = Get-EntraDeletedApplication | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is empty" { + { Get-EntraDeletedApplication -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should fail when invalid parameter is passed" { + { Get-EntraDeletedApplication -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'*" + } + It "Should return specific application by searchstring" { + $result = Get-EntraDeletedApplication -SearchString 'Mock-test-App' | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-test-App' + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific application by filter" { + $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-test-App' + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return top application" { + $result = Get-EntraDeletedApplication -Top 1 | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ObjectId" { + $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $result.ObjectId | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraDeletedApplication -SearchString 'Mock-test-App' | ConvertTo-Json -Depth 5| ConvertFrom-Json + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "Mock-test-App" + } + It "Property parameter should work" { + $result = Get-EntraDeletedApplication -Property "DisplayName" | ConvertTo-Json | ConvertFrom-Json + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-test-App" + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraDeletedApplication -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedApplication" + $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedApplication" + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDeletedApplication -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 new file mode 100644 index 0000000000..cdd98a2c7f --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 @@ -0,0 +1,215 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "DisplayName" = "Windows Update for Business Deployment Service" + "AccountEnabled" = $true + "AddIns" = @{} + "AlternativeNames" = @{} + "AppDescription" = "" + "AppDisplayName" = "Windows Update for Business Deployment Service" + "AppId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AppManagementPolicies" = "" + "AppOwnerOrganizationId" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "AppRoleAssignedTo" = "" + "AppRoleAssignmentRequired" = $false + "AppRoleAssignments" = @() + "AppRoles" = @("22223333-cccc-4444-dddd-5555eeee6666", "33334444-dddd-5555-eeee-6666ffff7777", "44445555-eeee-6666-ffff-7777aaaa8888", "55556666-ffff-7777-aaaa-8888bbbb9999") + "ApplicationTemplateId" = "" + "ClaimsMappingPolicies" = "" + "CreatedObjects" = "" + "CustomSecurityAttributes" = "" + "DelegatedPermissionClassifications"= "" + "Description" = "" + "DisabledByMicrosoftStatus" = "" + "Endpoints" = "" + "FederatedIdentityCredentials" = "" + "HomeRealmDiscoveryPolicies" = "" + "Homepage" = "" + "Info" = "" + "KeyCredentials" = @{} + "LoginUrl" = "" + "LogoutUrl" = "https://deploymentscheduler.microsoft.com" + "MemberOf" = "" + "Notes" = "" + "NotificationEmailAddresses" = @{} + "Oauth2PermissionGrants" = "" + "Oauth2PermissionScopes" = @("22223333-cccc-4444-dddd-5555eeee6666", "33334444-dddd-5555-eeee-6666ffff7777", "44445555-eeee-6666-ffff-7777aaaa8888", "55556666-ffff-7777-aaaa-8888bbbb9999") + "OwnedObjects" = "" + "Owners" = "" + "PasswordCredentials" = @{} + "PreferredSingleSignOnMode" = "" + "PreferredTokenSigningKeyThumbprint"= "" + "RemoteDesktopSecurityConfiguration"= "" + "ReplyUrls" = @{} + "ResourceSpecificApplicationPermissions"= @{} + "SamlSingleSignOnSettings" = "" + "ServicePrincipalNames" = @("61ae9cd9-7bca-458c-affc-861e2f24ba3b") + "ServicePrincipalType" = "Application" + "SignInAudience" = "AzureADMultipleOrgs" + "Synchronization" = "" + "Tags" = @{} + "TokenEncryptionKeyId" = "" + "TokenIssuancePolicies" = "" + "TokenLifetimePolicies" = "" + "TransitiveMemberOf" = "" + "VerifiedPublisher" = "" + "AdditionalProperties" = @{ + "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#servicePrincipals/$entity" + "createdDateTime" = "2023-07-07T14:07:33Z" + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraServicePrincipal" { + Context "Test for Get-EntraServicePrincipal" { + It "Should return specific service" { + $result = Get-EntraServicePrincipal -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Get-EntraServicePrincipal -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraServicePrincipal -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'*" + } + + It "Should fail when ServicePrincipalId is invalid" { + { Get-EntraServicePrincipal -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + + It "Should return all service" { + $result = Get-EntraServicePrincipal -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraServicePrincipal -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should return top service" { + $result = Get-EntraServicePrincipal -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraServicePrincipal -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraServicePrincipal -Top XY} | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should Contain ServicePrincipalId" { + $result = Get-EntraServicePrincipal -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should return specific service by searchstring" { + $result = Get-EntraServicePrincipal -SearchString 'Windows Update for Business Deployment Service' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Windows Update for Business Deployment Service' + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when searchstring is empty" { + { Get-EntraServicePrincipal -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + + It "Should return specific service by filter" { + $result = Get-EntraServicePrincipal -Filter "DisplayName -eq 'Windows Update for Business Deployment Service'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Windows Update for Business Deployment Service' + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when filter is empty" { + { Get-EntraServicePrincipal -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Result should Contain ServicePrincipalId" { + $result = Get-EntraServicePrincipal -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + $result = Get-EntraServicePrincipal -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraServicePrincipal -SearchString 'Windows Update for Business Deployment Service' + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "Windows Update for Business Deployment Service" + } + + It "Property parameter should work" { + $result = Get-EntraServicePrincipal -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Windows Update for Business Deployment Service" + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraServicePrincipal -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipal" + + $result = Get-EntraServicePrincipal -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipal" + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipal -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 new file mode 100644 index 0000000000..8d52263bfd --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraServicePrincipalAppRoleAssignedTo with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "AppRoleId" = "bdd80a03-d9bc-451d-b7c4-ce7c63fe3c8f" + "Id" = "I8uPTcetR02TKCQg6xB170ZWgaqJluBEqPHHxTxJ9Hs" + "PrincipalDisplayName" = "Entra-App-Testing" + "PrincipalType" = "ServicePrincipal" + "ResourceDisplayName" = "Microsoft Graph" + "PrincipalId" = "4d8fcb23-adc7-4d47-9328-2420eb1075ef" + "ResourceId" = "7af1d6f7-755a-4803-a078-a4f5a431ad51" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications +} + +Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { + Context "Test for Get-EntraServicePrincipalAppRoleAssignedTo" { + It "Should return app role assignments" { + $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" + $result | Should -Not -BeNullOrEmpty + $result.PrincipalId | should -Be '4d8fcb23-adc7-4d47-9328-2420eb1075ef' + + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraServicePrincipalAppRoleAssignedTo -ObjectId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" + $result | Should -Not -BeNullOrEmpty + $result.PrincipalId | should -Be '4d8fcb23-adc7-4d47-9328-2420eb1075ef' + + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is invalid" { + {Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" + } + It "Should return all app role assignments" { + $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should return top app role assignments " { + $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Result should Contain ServicePrincipalId" { + $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" + $result.ObjectID | should -Be "I8uPTcetR02TKCQg6xB170ZWgaqJluBEqPHHxTxJ9Hs" + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + + $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "4d8fcb23-adc7-4d47-9328-2420eb1075ef" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalAppRoleAssignedTo" + $result= Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalAppRoleAssignedTo" + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..4c282ea158 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraServicePrincipalAppRoleAssignment with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "AppRoleId" = "00000000-0000-0000-0000-000000000000" + "Id" = "qjltmaz9l02qPcgftHNirITXiOnmHR5GmW_oEXl_ZL8" + "PrincipalDisplayName" = "MOD Administrator" + "PrincipalType" = "User" + "ResourceDisplayName" = "ProvisioningPowerBi" + "PrincipalId" = "996d39aa-fdac-4d97-aa3d-c81fb47362ac" + "ResourceId" = "021510b7-e753-40aa-b668-29753295ca34" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications +} + +Describe "Get-EntraServiceAppRoleAssigned" { + Context "Test for Get-EntraServiceAppRoleAssigned" { + It "Should return service principal application role assignment." { + $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" + $result | Should -Not -BeNullOrEmpty + $result.ResourceId | should -Be '021510b7-e753-40aa-b668-29753295ca34' + + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraServicePrincipalAppRoleAssignment -ObjectId "021510b7-e753-40aa-b668-29753295ca34" + $result | Should -Not -BeNullOrEmpty + $result.ResourceId | should -Be '021510b7-e753-40aa-b668-29753295ca34' + + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is invalid" { + { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" + } + It "Should return all service principal application role assignment." { + $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + + It "Should return top service principal application role assignment." { + $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Result should Contain ServicePrincipalId" { + $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" + $result.ObjectId | should -Be "qjltmaz9l02qPcgftHNirITXiOnmHR5GmW_oEXl_ZL8" + } + It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { + Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + + $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "021510b7-e753-40aa-b668-29753295ca34" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalAppRoleAssignment" + $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalAppRoleAssignment" + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 new file mode 100644 index 0000000000..3812741e27 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "T2qU_E28O0GgkLLIYRPsTwE" + "Classification" = "low" + "PermissionId" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + "PermissionName" = "LicenseManager.AccessAsUser" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { + Context "Test for Get-EntraServicePrincipalDelegatedPermissionClassification" { + It "Should return specific ServicePrincipalDelegatedPermissionClassification" { + $result = Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "T2qU_E28O0GgkLLIYRPsTwE" + + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is invalid" { + { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" + } + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should return specific ServicePrincipalDelegatedPermissionClassification when Id passed to it" { + $result = Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id 'T2qU_E28O0GgkLLIYRPsTwE' + $params = Get-Parameters -data $result.Parameters + $params.DelegatedPermissionClassificationId | should -Be "T2qU_E28O0GgkLLIYRPsTwE" + } + It "Should fail when Id is invalid" { + { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string.*" + } + It "Should fail when Id is empty" { + { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + It "Should return specific ServicePrincipalDelegatedPermissionClassification when applied filter to it" { + $result = Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Filter "PermissionName eq 'LicenseManager.AccessAsUser'" + $result.PermissionName | should -Be "LicenseManager.AccessAsUser" + $result.ObjectId | should -Be "T2qU_E28O0GgkLLIYRPsTwE" + } + It "Should fail when Filter is empty" { + { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Filter } | Should -Throw "Missing an argument for parameter 'Filter'.*" + } + It "Property parameter should work" { + $result = Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Property PermissionName + $result | Should -Not -BeNullOrEmpty + $result.PermissionName | Should -Be 'LicenseManager.AccessAsUser' + + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalDelegatedPermissionClassification" + + $result = Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalDelegatedPermissionClassification" + + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 new file mode 100644 index 0000000000..43596da516 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 @@ -0,0 +1,95 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "KeyCredentials" = @{ + "CustomKeyIdentifier" = "" + "DisplayName" = "" + "EndDateTime" = "08-Feb-25 9:57:08 AM" + "Key" = "" + "KeyId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "StartDateTime" = "08-Feb-24 9:57:08 AM" + "Type" = "Symmetric" + "Usage" = "Sign" + "AdditionalProperties" = @{} + "Parameters" = $args + } + } + ) + } + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraServicePrincipalKeyCredential" { + Context "Test for Get-EntraServicePrincipalKeyCredential" { + It "Should return specific principal key credential" { + $objectId = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result = Get-EntraServicePrincipalKeyCredential -ServicePrincipalId $objectId + $result | Should -Not -BeNullOrEmpty + $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should update the parameter with Alias" { + $objectId = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result = Get-EntraServicePrincipalKeyCredential -ObjectId $objectId + $result | Should -Not -BeNullOrEmpty + $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + $errorActionPreference = "Stop" + { Get-EntraServicePrincipalKeyCredential -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'*" + } + + It "Should fail when ServicePrincipalId is invalid" { + $errorActionPreference = "Stop" + { Get-EntraServicePrincipalKeyCredential -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + $result = Get-EntraServicePrincipalKeyCredential -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $servicePrincipalKeyCredential = $result | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $params = Get-Parameters -data $servicePrincipalKeyCredential.Parameters + $params.ServicePrincipalId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalKeyCredential" + + $result = Get-EntraServicePrincipalKeyCredential -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalKeyCredential" + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipalKeyCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 new file mode 100644 index 0000000000..0fd4ef5494 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "AdditionalProperties" = @{DeletedDateTime = $null} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgServicePrincipalTransitiveMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraServicePrincipalMembership"{ + It "Result should not be empty" { + $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result = Get-EntraServicePrincipalMembership -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraServicePrincipalMembership -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + It "Should return all applications" { + $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + It "Should return top application" { + $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ServicePrincipalId" { + $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Property parameter should work" { + $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalMembership" + $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalMembership" + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 new file mode 100644 index 0000000000..e322ea7a81 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 @@ -0,0 +1,96 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "ClientId" = "4773e0f6-b400-40b3-8508-340de8ee0893" + "ConsentType" = "AllPrincipals" + "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "ResourceId" = "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + "Scope" = "openid" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgServicePrincipalOauth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ + It "Result should not be empty" { + $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + It "Should return all applications" { + $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + It "Should return top application" { + $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ServicePrincipalId" { + $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Property parameter should work" { + $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' + + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOAuth2PermissionGrant" + $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOAuth2PermissionGrant" + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 new file mode 100644 index 0000000000..4ef2ec18dc --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "111cc9b5-fce9-485e-9566-c68debafac5f" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + accountEnabled = $true; + appDisplayName = "ToGraph_443democc3c" + servicePrincipalType = "Application" + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgServicePrincipalOwnedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraServicePrincipalOwnedObject" { + Context "Test for Get-EntraServicePrincipalOwnedObject" { + It "Should return specific Owned Object" { + $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('111cc9b5-fce9-485e-9566-c68debafac5f') + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific ServicePrincipalOwnedObject with Alias" { + $result = Get-EntraServicePrincipalOwnedObject -ObjectId "2d028fff-7e65-4340-80ca-89be16dae0b3" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('111cc9b5-fce9-485e-9566-c68debafac5f') + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId'*" + } + It "Should fail when ServicePrincipalId is null" { + { Get-EntraServicePrincipalOwnedObject -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'*" + } + It "Should return all Owned Objects" { + $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should return top Owned Object" { + $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -Top 1 + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ServicePrincipalId" { + $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" + $result.ObjectId | should -Be "111cc9b5-fce9-485e-9566-c68debafac5f" + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "2d028fff-7e65-4340-80ca-89be16dae0b3" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOwnedObject" + $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOwnedObject" + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 new file mode 100644 index 0000000000..63fa525132 --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "DisplayName" = "Adams Smith" + "UserPrincipalName" = "Adams@contoso.com" + "UserType" = "Member" + "appRoles" = @{ + allowedMemberTypes=$null; + description="msiam_access"; + displayName="msiam_access"; + id="d0d7e4e4-96be-41c9-805a-08e0526868ad"; + isEnabled=$True; + origin="Application" + } + "oauth2PermissionScopes" = @{ + adminConsentDescription="Allow the application to access from tmplate test 3 on behalf of the signed-in user."; + adminConsentDisplayName="Access from tmplate test 3"; + id="64c2cef3-e118-4795-a580-a32bdbd7ba88"; + isEnabled=$True; + type="User"; + userConsentDescription="Allow the application to access from tmplate test 3 on your behalf."; + userConsentDisplayName="Access from tmplate test 3"; + value="user_impersonation" + } + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.servicePrincipal"; + accountEnabled = $true + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgServicePrincipalOwner -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraServicePrincipalOwner"{ + It "Result should not be empty" { + $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result = Get-EntraServicePrincipalOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraServicePrincipalOwner -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + It "Should return all applications" { + $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + It "Should return top application" { + $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ServicePrincipalId" { + $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Property parameter should work" { + $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Adams Smith' + + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOwner" + $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOwner" + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + {Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 new file mode 100644 index 0000000000..d4fea0294b --- /dev/null +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "PasswordCredentials" = @{ + "StartDate" = "17-Apr-24 7:32:41 AM" + "EndDate" = "17-Apr-25 7:32:41 AM" + "CustomKeyIdentifier" = "" + "DisplayName" = "" + "EndDateTime" = "17-Apr-25 7:32:41 AM" + "Key" = "" + "KeyId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "StartDateTime" = "17-Apr-24 7:32:41 AM" + "Hint" = "gjW" + "SecretText" = "" + "AdditionalProperties" = @{} + "Parameters" = $args + } + } + ) + } + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraServicePrincipalPasswordCredential" { + Context "Test for Get-EntraServicePrincipalPasswordCredential" { + It "Should return specific principal password credential" { + $ServicePrincipalId = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result = Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId $ServicePrincipalId + $result | Should -Not -BeNullOrEmpty + $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should update the parameter with Alias" { + $ServicePrincipalId = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result = Get-EntraServicePrincipalPasswordCredential -ObjectId $ServicePrincipalId + $result | Should -Not -BeNullOrEmpty + $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when ServicePrincipalId is empty" { + $errorActionPreference = "Stop" + { Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'*" + } + + It "Should fail when ServicePrincipalId is invalid" { + $errorActionPreference = "Stop" + { Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + $result = Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $servicePrincipalPasswordCredential = $result | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $params = Get-Parameters -data $servicePrincipalPasswordCredential.Parameters + $params.ServicePrincipalId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalPasswordCredential" + + $result = Get-EntraServicePrincipalPasswordCredential -ServicePrincipalId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalPasswordCredential" + + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraServicePrincipalPasswordCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Invalid.Tests.ps1 b/testVNext/Entra/Applications/Invalid.Tests.ps1 new file mode 100644 index 0000000000..6d5381a100 --- /dev/null +++ b/testVNext/Entra/Applications/Invalid.Tests.ps1 @@ -0,0 +1,105 @@ +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra +} + +Describe "Invalid Tests"{ + It "Should fail when parameters are invalid"{ + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object{ + $command = Get-Command $_ + { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." + } + } + It "Should fail with 'TenantId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ + $commandScriptBlock = [scriptblock]::Create("$command -TenantId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'TenantId'.*" + } + } + } + It "Should fail with 'Id' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Id'){ + $commandScriptBlock = [scriptblock]::Create("$command -Id $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + } + } + It "Should fail with 'ObjectId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ + $commandScriptBlock = [scriptblock]::Create("$command -ObjectId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'ObjectId'.*" + } + } + } + It "Should fail with 'All' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'All'){ + $commandScriptBlock = [scriptblock]::Create("$command -All `$True") + if('Find-EntraPermission' -eq $command){ + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'*" + } + else { + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + } + } + } + It "Should fail with 'Top' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Top'){ + $commandScriptBlock = [scriptblock]::Create("$command -Top ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Top'*" + } + } + } + It "Should fail with 'Filter' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ + $commandScriptBlock = [scriptblock]::Create("$command -Filter ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + } + } + It "Should fail with 'SearchString' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ + $commandScriptBlock = [scriptblock]::Create("$command -SearchString ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + } + } + It "Should fail with exception when no parameter is passed" { + $cmdlets = @( + @{ CmdletName = 'Enable-EntraDirectoryRole'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + @{ CmdletName = 'New-EntraConditionalAccessPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraNamedLocationPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraPermissionGrantPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + ) + $cmdlets | ForEach-Object { + $commandName = $_.CmdletName + $Exception = $_.Exception + $commandScriptBlock = [scriptblock]::Create("$commandName -ErrorAction Stop") + try { + Invoke-Command -ScriptBlock $commandScriptBlock + } + catch { $_ -match $Exception | Should -BeTrue } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Applications/Module.Tests.ps1 b/testVNext/Entra/Applications/Module.Tests.ps1 new file mode 100644 index 0000000000..cc40ad720b --- /dev/null +++ b/testVNext/Entra/Applications/Module.Tests.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Entra Module" { + Context "On module import" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + } + + It "Should have exported commands" { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo | Should -Not -BeNullOrEmpty + $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 + + } + + It 'Should be compatible with PS core and desktop' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } + + It 'Should point to script module' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + } + + It 'Should lock GUID' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" + } + + It "Module import should not write to error and information streams" { + $ps = [powershell]::Create() + $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + "Checking Information stream" | Out-Host + $ps.Streams.Information.Count | Should -Be 0 + "Checking Error stream" | Out-Host + $ps.Streams.Error.Count | Should -Be 0 + "Checking Verbose stream" | Out-Host + $ps.Streams.Verbose.Count | Should -Be 0 + "Checking Debug stream" | Out-Host + $ps.Streams.Warning.Count | Should -Be 0 + "Checking Progress stream" | Out-Host + $ps.Streams.Progress.Count | Should -Be 0 + + $ps.Dispose() + } + } +} diff --git a/testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 new file mode 100644 index 0000000000..cc3aa0337f --- /dev/null +++ b/testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AppId" = "aaaaaaaa-1111-2222-3333-cccccccccccc" + "DeletedDateTime" = $null + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "DisplayName" = "Mock-App" + "Info" = @{LogoUrl = ""; MarketingUrl = ""; PrivacyStatementUrl = ""; SupportUrl = ""; TermsOfServiceUrl = "" } + "IsDeviceOnlyAuthSupported" = $True + "IsFallbackPublicClient" = $true + "KeyCredentials" = @{CustomKeyIdentifier = @(211, 174, 247); DisplayName = ""; Key = ""; KeyId = "d903c7a3-75ea-4772-8935-5c0cf82068a7"; Type = "Symmetric"; Usage = "Sign" } + "OptionalClaims" = @{AccessToken = ""; IdToken = ""; Saml2Token = "" } + "ParentalControlSettings" = @{CountriesBlockedForMinors = $null; LegalAgeGroupRule = "Allow" } + "PasswordCredentials" = @{} + "PublicClient" = @{RedirectUris = $null } + "PublisherDomain" = "aaaabbbbbccccc.contoso.com" + "SignInAudience" = "AzureADandPersonalMicrosoftAccount" + "Web" = @{HomePageUrl = "https://localhost/demoapp"; ImplicitGrantSettings = ""; LogoutUrl = ""; } + "AdditionalProperties" = @{CountriesBlockedForMinors = $null; LegalAgeGroupRule = "Allow" } + } + ) + } + + Mock -CommandName New-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraApplication"{ + Context "Test for New-EntraApplication" { + It "Should return created Application"{ + $result = New-EntraApplication -DisplayName "Mock-App" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "Mock-App" + $result.IsDeviceOnlyAuthSupported | should -Be "True" + $result.IsFallbackPublicClient | should -Be "True" + $result.SignInAudience | should -Be "AzureADandPersonalMicrosoftAccount" + + Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DisplayName is empty" { + { New-EntraApplication -DisplayName "" } | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplication" + $result = New-EntraApplication -DisplayName "Mock-App" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplication" + Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraApplication -DisplayName "Mock-App" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 new file mode 100644 index 0000000000..882e1ecdaa --- /dev/null +++ b/testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "AppDisplayName" = "Mock-App" + "DataType" = "MockType" + "DeletedDateTime" = $null + "IsMultiValued" = $False + "IsSyncedFromOnPremises" = $False + "Name" = "Mock-App" + "TargetObjects" = "Application" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/`$metadata#applications('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb')/extensionProperties/`$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraApplicationExtensionProperty" { +Context "Test for New-EntraApplicationExtensionProperty" { + It "Should return created MS application extension property" { + $result = New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.Name | Should -Be "Mock-App" + $result.TargetObjects | Should -Be "Application" + $result.DataType | Should -Be "MockType" + + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return created MS application extension property with alias" { + $result = New-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.Name | Should -Be "Mock-App" + $result.TargetObjects | Should -Be "Application" + $result.DataType | Should -Be "MockType" + + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { New-EntraApplicationExtensionProperty -ApplicationId -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is invalid" { + { New-EntraApplicationExtensionProperty -ApplicationId "" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should fail when DataType is empty" { + { New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType -Name "Mock-App" -TargetObjects "Application" } | Should -Throw "Missing an argument for parameter 'DataType'*" + } + It "Should fail when Name is empty" { + { New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name -TargetObjects "Application" } | Should -Throw "Missing an argument for parameter 'Name'*" + } + It "Should fail when TargetObjects is empty" { + { New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects } | Should -Throw "Missing an argument for parameter 'TargetObjects'*" + } + It "Result should Contain ObjectId" { + $result = New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" + $result.ObjectId | should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + $result = New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" + $params = Get-Parameters -data $result.Parameters + $params.ApplicationId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationExtensionProperty" + $result = New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationExtensionProperty" + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 new file mode 100644 index 0000000000..8f4f77d4c6 --- /dev/null +++ b/testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 @@ -0,0 +1,147 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { + Import-Module Microsoft.Graph.Entra.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $response = @{ + "@odata.context" = 'https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.applicationServicePrincipal' + "servicePrincipal" = @{ + "oauth2PermissionScopes" = $null + "servicePrincipalType" = "Application" + "displayName" = "test app" + "passwordCredentials" = $null + "deletedDateTime" = $null + "alternativeNames" = $null + "homepage" = "https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z" + "applicationTemplateId" = "aaaaaaaa-1111-1111-1111-cccccccccccc" + "appRoleAssignmentRequired" = $true + "servicePrincipalNames" = $null + "keyCredentials" = $null + "appOwnerOrganizationId" = "aaaaaaaa-1111-2222-1111-cccccccccccc" + "loginUrl" = $null + "verifiedPublisher" = @{ + "verifiedPublisherId" = $null + "displayName" = $null + "addedDateTime" = $null + } + "logoutUrl" = $null + "preferredSingleSignOnMode" = $null + "appRoles" = $null + "tokenEncryptionKeyId" = $null + "samlSingleSignOnSettings" = $null + "appDisplayName" = "test app" + "id" = "aaaaaaaa-1111-3333-1111-cccccccccccc" + "tags" = $null + "addIns" = $null + "accountEnabled" = $true + "notificationEmailAddresses" = $null + "replyUrls" = $null + "info" = @{ + "marketingUrl" = $null + "privacyStatementUrl" = $null + "termsOfServiceUrl" = $null + "logoUrl" = $null + "supportUrl" = $null + } + "appId" = "aaaaaaaa-1111-4444-1111-cccccccccccc" + "preferredTokenSigningKeyThumbprint" = $null + } + "application" = @{ + "passwordCredentials" = $null + "defaultRedirectUri" = $null + "parentalControlSettings" = @{ + "legalAgeGroupRule" = "Allow" + "countriesBlockedForMinors" = "" + } + "verifiedPublisher" = @{ + "verifiedPublisherId" = $null + "displayName" = $null + "addedDateTime" = $null + } + "info" = @{ + "marketingUrl" = $null + "privacyStatementUrl" = $null + "termsOfServiceUrl" = $null + "logoUrl" = $null + "supportUrl" = $null + } + "createdDateTime" = $null + "keyCredentials" = $null + "identifierUris" = $null + "displayName" = "test app" + "applicationTemplateId" = "aaaaaaaa-1111-1111-1111-cccccccccccc" + "samlMetadataUrl" = $null + "addIns" = $null + "publicClient" = @{ + "redirectUris" = "" + } + "groupMembershipClaims" = $null + "requiredResourceAccess" = $null + "deletedDateTime" = $null + "tokenEncryptionKeyId" = $null + "optionalClaims" = $null + "web" = @{ + "homePageUrl" = "https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z" + "redirectUris" = "https://*.signin.e-days.co.uk/* https://*.signin.e-days.com/* https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx" + "logoutUrl" = $null + } + "id" = "aaaaaaaa-2222-1111-1111-cccccccccccc" + "tags" = $null + "isFallbackPublicClient" = $false + "api" = @{ + "knownClientApplications" = "" + "requestedAccessTokenVersion" = $null + "preAuthorizedApplications" = "" + "oauth2PermissionScopes" = $null + "acceptMappedClaims" = $null + } + "appRoles" = $null + "description" = $null + "signInAudience" = "AzureADMyOrg" + "appId" = "aaaaaaaa-3333-1111-1111-cccccccccccc" + } + } + + Mock -CommandName Invoke-MgGraphRequest -MockWith { $response } -ModuleName Microsoft.Graph.Entra.Applications +} +Describe "New-EntraApplicationFromApplicationTemplateFromApplicationTemplate tests"{ + It "Should return created Application with service principal"{ + $result = New-EntraApplicationFromApplicationTemplate -Id "aaaaaaaa-1111-1111-1111-cccccccccccc" -DisplayName "test app" + $result | Should -Not -BeNullOrEmpty + $result.application.applicationTemplateId | Should -Be "aaaaaaaa-1111-1111-1111-cccccccccccc" + $result.servicePrincipal.applicationTemplateId | Should -Be "aaaaaaaa-1111-1111-1111-cccccccccccc" + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should fail when Id is empty" { + { New-EntraApplicationFromApplicationTemplate -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when Id is null" { + { New-EntraApplicationFromApplicationTemplate -Id } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + It "Should fail when DisplayName is empty" { + { New-EntraApplicationFromApplicationTemplate -DisplayName "" } | Should -Throw "Cannot bind argument to parameter 'DisplayName'*" + } + It "Should fail when DisplayName is null" { + { New-EntraApplicationFromApplicationTemplate -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'.*" + } + It "Should fail when invalid parameter is passed" { + { New-EntraApplicationFromApplicationTemplate -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraApplicationFromApplicationTemplate -Id "aaaaaaaa-1111-1111-1111-cccccccccccc" -DisplayName "test app" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} diff --git a/testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 new file mode 100644 index 0000000000..7315d6480f --- /dev/null +++ b/testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "CustomKeyIdentifier" = $null + "DisplayName" = "mypassword" + "EndDateTime" = "10/23/2024 11:36:56 AM" + "KeyId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "StartDateTime" = "11/22/2023 11:35:16 AM" + "Hint" = "123" + "SecretText" = "wbBNW8kCuiPjNRg9NX98W_EaU6cqG" + "Parameters" = $args + } + ) + } + + Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "New-EntraApplicationPassword"{ + It "Should return created password credential"{ + $result = New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ displayname = "mypassword" } | ConvertTo-Json | ConvertFrom-Json + $result | Should -Not -BeNullOrEmpty + $result.KeyId | should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result.SecretText | Should -Be "wbBNW8kCuiPjNRg9NX98W_EaU6cqG" + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { New-EntraApplicationPassword -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is null" { + { New-EntraApplicationPassword -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when PasswordCredential is null" { + { New-EntraApplicationPassword -PasswordCredential } | Should -Throw "Missing an argument for parameter 'PasswordCredential'*" + } + It "Should fail when StartDate is empty" { + { New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ StartDateTime = "" } } | Should -Throw "Cannot process argument transformation on parameter 'PasswordCredential'*" + } + It "Should fail when EndDate is empty" { + { New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ EndDateTime = "" } } | Should -Throw "Cannot process argument transformation on parameter 'PasswordCredential'*" + } + It "Should fail when invalid parameter is passed" { + { New-EntraApplicationPassword -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + $result = New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ displayname = "mypassword" } + $params = Get-Parameters -data $result.Parameters + $params.ApplicationId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "should contain password credential parameters in body parameter when passed PasswordCredential to it"{ + $result = New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ DisplayName = "mypassword"; Hint = "123"; StartDateTime=(get-date).AddYears(0); EndDateTime=(get-date).AddYears(2) } + $params = Get-Parameters -data $result.Parameters + $a = $params.PasswordCredential | ConvertTo-json | ConvertFrom-Json + $a.DisplayName | Should -Be "mypassword" + $a.Hint | Should -Be "123" + $a.StartDateTime | Should -Not -BeNullOrEmpty + $a.EndDateTime | Should -Not -BeNullOrEmpty + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationPassword" + $result = New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ displayname = "mypassword" } | ConvertTo-Json | ConvertFrom-Json + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationPassword" + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ displayname = "mypassword" } | ConvertTo-Json | ConvertFrom-Json -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 new file mode 100644 index 0000000000..ab3f1fd9b4 --- /dev/null +++ b/testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "CustomKeyIdentifier" = $null + "DisplayName" = "" + "EndDateTime" = "10/23/2024 11:36:56 AM" + "KeyId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "StartDateTime" = "11/22/2023 11:35:16 AM" + "Hint" = "123" + "SecretText" = "wbBNW8kCuiPjNRg9NX98W_EaU6cqG" + "Parameters" = $args + } + ) + } + + Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "New-EntraApplicationPasswordCredential"{ + It "Should return created password credential"{ + $result = New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.KeyId | should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result.SecretText | Should -Be "wbBNW8kCuiPjNRg9NX98W_EaU6cqG" + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { New-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is null" { + { New-EntraApplicationPasswordCredential -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when StartDate is empty" { + { New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -StartDate "" } | Should -Throw "Cannot process argument transformation on parameter 'StartDate'*" + } + It "Should fail when StartDate is null" { + { New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -StartDate } | Should -Throw "Missing an argument for parameter 'StartDate'*" + } + It "Should fail when EndDate is empty" { + { New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -EndDate "" } | Should -Throw "Cannot process argument transformation on parameter 'EndDate'*" + } + It "Should fail when EndDate is null" { + { New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -EndDate } | Should -Throw "Missing an argument for parameter 'EndDate'*" + } + It "Should fail when invalid parameter is passed" { + { New-EntraApplicationPasswordCredential -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + $result = New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.ApplicationId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "should contain startDateTime in body parameter when passed StartDate to it"{ + $result = New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -StartDate (get-date).AddYears(0) + $params = Get-Parameters -data $result.Parameters + $a = $params.PasswordCredential | ConvertTo-json | ConvertFrom-Json + $a.startDateTime | Should -Not -BeNullOrEmpty + } + It "should contain endDateTime in body parameter when passed EndDate to it"{ + $result = New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -EndDate (get-date).AddYears(0) + $params = Get-Parameters -data $result.Parameters + $a = $params.PasswordCredential | ConvertTo-json | ConvertFrom-Json + $a.endDateTime | Should -Not -BeNullOrEmpty + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationPasswordCredential" + $result = New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationPasswordCredential" + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 b/testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 new file mode 100644 index 0000000000..cca44e22a4 --- /dev/null +++ b/testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 @@ -0,0 +1,122 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking New-MgServicePrincipal with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "AppId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AccountEnabled" = $True + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "AppDisplayName" = "ToGraph_443DEM" + "ServicePrincipalType" = "Application" + "SignInAudience" = "AzureADMyOrg" + "AppRoleAssignmentRequired" = $true + "AlternativeNames" = "unitalternative" + "Homepage" = "http://localhost/home" + "DisplayName" = "ToGraph_443DEM" + "LogoutUrl" = "htpp://localhost/logout" + "ReplyUrls" = "http://localhost/redirect" + "Tags" = "{WindowsAzureActiveDirectoryIntegratedApp}" + "ServicePrincipalNames" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + "AppOwnerOrganizationId" = "44445555-eeee-6666-ffff-7777aaaa8888" + "KeyCredentials" = @{CustomKeyIdentifier = @(84, 101, 115, 116);DisplayName =""; Key="";KeyId="bf620d66-bd18-4348-94e4-7431d7ad20a6";Type="Symmetric";Usage="Sign"} + "PasswordCredentials" = @{} + } + ) + } + + Mock -CommandName New-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraServicePrincipal"{ + Context "Test for New-EntraServicePrincipal" { + It "Should return created service principal"{ + $result = New-EntraServicePrincipal -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -Homepage 'http://localhost/home' -LogoutUrl 'htpp://localhost/logout' -ReplyUrls 'http://localhost/redirect' -AccountEnabled $true -DisplayName "ToGraph_443DEM" -AlternativeNames "unitalternative" -Tags {WindowsAzureActiveDirectoryIntegratedApp} -AppRoleAssignmentRequired $true -ServicePrincipalType "Application" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result | Should -Not -Be NullOrEmpty + $result.DisplayName | should -Be "ToGraph_443DEM" + $result.AccountEnabled | should -Be "True" + $result.AppId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.Homepage | should -Be "http://localhost/home" + $result.LogoutUrl | should -Be "htpp://localhost/logout" + $result.AlternativeNames | should -Be "unitalternative" + $result.Tags | should -Be "{WindowsAzureActiveDirectoryIntegratedApp}" + $result.AppRoleAssignmentRequired | should -Be "True" + $result.ReplyUrls | should -Be "http://localhost/redirect" + $result.ServicePrincipalType | should -Be "Application" + $result.ServicePrincipalNames | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + + Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AppID is empty" { + { New-EntraServicePrincipal -AppId } | Should -Throw "Missing an argument for parameter 'AppId'.*" + } + It "Should fail when AppID is Invalid" { + { New-EntraServicePrincipal -AppId "" } | Should -Throw "Cannot bind argument to parameter 'AppId' because it is an empty string.*" + } + It "Should fail when non-mandatory is empty" { + { New-EntraServicePrincipal -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -Tags -ReplyUrls -AccountEnabled -AlternativeNames } | Should -Throw "Missing an argument for parameter*" + } + It "Should create service principal with KeyCredentials parameter"{ + $creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential + $creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes("Test") + $startdate = Get-Date -Year 2023 -Month 10 -Day 23 + $creds.StartDate = $startdate + $creds.Type = "Symmetric" + $creds.Usage = 'Sign' + $creds.Value = [System.Text.Encoding]::UTF8.GetBytes("123") + $creds.EndDate = Get-Date -Year 2024 -Month 10 -Day 23 + $result= New-EntraServicePrincipal -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -KeyCredentials $creds + $result | Should -Not -Be NullOrEmpty + $result.AppId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $keycredentials = @{CustomKeyIdentifier = @(84, 101, 115, 116);DisplayName =""; Key="";KeyId="bf620d66-bd18-4348-94e4-7431d7ad20a6";Type="Symmetric";Usage="Sign"} | ConvertTo-json + ($result.KeyCredentials | ConvertTo-json ) | should -Be $keycredentials + } + It "Should fail when KeyCredentials is empty" { + { New-EntraServicePrincipal -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -KeyCredentials } | Should -Throw "Missing an argument for parameter 'KeyCredentials'.*" + } + It "Should fail when KeyCredentials is Invalid" { + { New-EntraServicePrincipal -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -KeyCredentials "xyz" } | Should -Throw "Cannot process argument transformation on parameter 'KeyCredentials'.*" + } + It "Result should Contain ObjectId and AppOwnerTenantId" { + $result = New-EntraServicePrincipal -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.AppOwnerTenantId | should -Be "44445555-eeee-6666-ffff-7777aaaa8888" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipal" + + $result = New-EntraServicePrincipal -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipal" + + Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraServicePrincipal -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -Homepage 'http://localhost/home' -LogoutUrl 'htpp://localhost/logout' -AccountEnabled $true -DisplayName "ToGraph_443DEM" -AlternativeNames "unitalternative" -Tags {WindowsAzureActiveDirectoryIntegratedApp} -AppRoleAssignmentRequired $true -ReplyUrls 'http://localhost/redirect' -ServicePrincipalType "Application" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..ee7b9c10e2 --- /dev/null +++ b/testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -0,0 +1,99 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking New-MgServicePrincipalAppRoleAssignment with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "DeletedDateTime" = $null + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "PrincipalDisplayName" = "Mock-App" + "AppRoleId" = "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f" + "CreatedDateTime" = "3/12/2024 11:05:29 AM" + "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgServicePrincipalAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications +} + +Describe "New-EntraServicePrincipalAppRoleAssignment"{ + Context "Test for New-EntraServicePrincipalAppRoleAssignment" { + It "Should return New-EntraServicePrincipalAppRoleAssignment"{ + $result = New-EntraServicePrincipalAppRoleAssignment -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Id "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f" -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result | Should -Not -BeNullOrEmpty + $result.PrincipalDisplayName | should -Be "Mock-App" + $result.PrincipalId | should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + + Should -Invoke -CommandName New-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should fail when ObjectId is empty" { + { New-EntraServicePrincipalAppRoleAssignment -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId'*" + } + It "Should fail when ObjectId is null" { + { New-EntraServicePrincipalAppRoleAssignment -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + It "Should fail when ResourceId is empty" { + { New-EntraServicePrincipalAppRoleAssignment -ResourceId "" } | Should -Throw "Cannot bind argument to parameter 'ResourceId'*" + } + It "Should fail when ResourceId is null" { + { New-EntraServicePrincipalAppRoleAssignment -ResourceId } | Should -Throw "Missing an argument for parameter 'ResourceId'*" + } + It "Should fail when Id is empty" { + { New-EntraServicePrincipalAppRoleAssignment -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when Id is null" { + { New-EntraServicePrincipalAppRoleAssignment -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when PrincipalId is empty" { + { New-EntraServicePrincipalAppRoleAssignment -PrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'PrincipalId'*" + } + It "Should fail when PrincipalId is null" { + { New-EntraServicePrincipalAppRoleAssignment -PrincipalId } | Should -Throw "Missing an argument for parameter 'PrincipalId'*" + } + It "Should fail when invalid parameter is passed" { + { New-EntraServicePrincipalAppRoleAssignment -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." + } + It "Should contain AppRoleId in parameters when passed Id to it" { + $result = New-EntraServicePrincipalAppRoleAssignment -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Id "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f" -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $params = Get-Parameters -data $result.Parameters + $params.AppRoleId | Should -Be "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f" + } + It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { + $result = New-EntraServicePrincipalAppRoleAssignment -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Id "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f" -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipalAppRoleAssignment" + $result = New-EntraServicePrincipalAppRoleAssignment -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Id "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f" -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipalAppRoleAssignment" + Should -Invoke -CommandName New-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraServicePrincipalAppRoleAssignment -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Id "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f" -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 new file mode 100644 index 0000000000..00eb234c6a --- /dev/null +++ b/testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -0,0 +1,96 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Add-MgServicePrincipalPassword with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "CustomKeyIdentifier" = $null + "DisplayName" = $null + "EndDateTime" = "16/12/2024 13:14:14" + "Hint" = "YWE" + "KeyId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "SecretText" = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + "StartDateTime" = "16/09/2024 14:14:14" + + } + ) + } + + Mock -CommandName Add-MgServicePrincipalPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraServicePrincipalPasswordCredential"{ + Context "Test for New-EntraServicePrincipalPasswordCredential" { + It "Should return created password credential for a service principal."{ + $result = New-EntraServicePrincipalPasswordCredential -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate "2024-09-16T14:14:14Z" -EndDate "2024-12-16T13:14:14Z" + $result | Should -Not -Be NullOrEmpty + $result.StartDate | should -Be "16/09/2024 14:14:14" + $result.EndDate | should -Be "16/12/2024 13:14:14" + + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result = New-EntraServicePrincipalPasswordCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate "2024-09-16T14:14:14Z" -EndDate "2024-12-16T13:14:14Z" + $result | Should -Not -Be NullOrEmpty + + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + {New-EntraServicePrincipalPasswordCredential -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is Invalid" { + { New-EntraServicePrincipalPasswordCredential -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" + } + It "Should fail when StartDate is empty" { + { New-EntraServicePrincipalPasswordCredential -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate } | Should -Throw "Missing an argument for parameter 'StartDate'.*" + } + It "Should fail when StartDate is invalid" { + { New-EntraServicePrincipalPasswordCredential -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate "xyz" } | Should -Throw "Cannot process argument transformation on parameter 'StartDate'. Cannot convert value*" + } + It "Should fail when EndDate is empty" { + { New-EntraServicePrincipalPasswordCredential -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -EndDate } | Should -Throw "Missing an argument for parameter 'EndDate'.*" + } + It "Should fail when EndDate is invalid" { + { New-EntraServicePrincipalPasswordCredential -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -EndDate "xyz" } | Should -Throw "Cannot process argument transformation on parameter 'EndDate'. Cannot convert value*" + } + It "Result should Contain StartDate and EndDate" { + $result = New-EntraServicePrincipalPasswordCredential -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate "2024-09-16T14:14:14Z" -EndDate "2024-12-16T13:14:14Z" + $result.StartDate | should -Be "16/09/2024 14:14:14" + $result.EndDate | should -Be "16/12/2024 13:14:14" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipalPasswordCredential" + + $result = New-EntraServicePrincipalPasswordCredential -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate "2024-09-16T14:14:14Z" -EndDate "2024-12-16T13:14:14Z" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipalPasswordCredential" + + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraServicePrincipalPasswordCredential -ObjectID "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate "2024-09-16T14:14:14Z" -EndDate "2024-12-16T13:14:14Z" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 new file mode 100644 index 0000000000..2d0e78a184 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgApplication -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraApplication" { + Context "Test for Remove-EntraApplication" { + It "Should return empty object" { + $result = Remove-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is invalid" { + { Remove-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should fail when ApplicationId is empty" { + { Remove-EntraApplication -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + Mock -CommandName Remove-MgApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplication" + + Remove-EntraApplication -ApplicationId bbbbbbbb-1111-2222-3333-cccccccccccc + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 new file mode 100644 index 0000000000..6e6e9e2169 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraApplicationExtensionProperty" { + Context "Test for Remove-EntraApplicationExtensionProperty" { + It "Should return empty object" { + $result = Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Remove-EntraApplicationExtensionProperty -ApplicationId -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444"} | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is invalid" { + { Remove-EntraApplicationExtensionProperty -ApplicationId "" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should fail when ExtensionPropertyId is empty" { + { Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId } | Should -Throw "Missing an argument for parameter 'ExtensionPropertyId'*" + } + It "Should fail when ExtensionPropertyId is invalid" { + { Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "" } | Should -Throw "Cannot bind argument to parameter 'ExtensionPropertyId' because it is an empty string." + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationExtensionProperty" + + Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationExtensionProperty" + + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 new file mode 100644 index 0000000000..51461cbd96 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraApplicationOwner"{ + It "Should return empty object" { + $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object" { + $result = Remove-EntraApplicationOwner -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Remove-EntraApplicationOwner -ApplicationId "" } + } + It "Should fail when OwnerId is empty" { + { Remove-EntraApplicationOwner -OwnerId "" } + } + It "Should contain ApplicationId in parameters" { + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + } + It "Should contain DirectoryObjectId in parameters" { + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbbbbb-cccc-dddd-2222-333333333333" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationOwner" + $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationOwner" + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 new file mode 100644 index 0000000000..de5a5a136a --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraApplicationPassword"{ + It "Should return empty object" { + $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ObjectId is empty" { + { Remove-EntraApplicationPassword -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId'*" + } + It "Should fail when ObjectId is null" { + { Remove-EntraApplicationPassword -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + It "Should fail when KeyId is null" { + { Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId } | Should -Throw "Missing an argument for parameter 'KeyId'*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraApplicationPassword -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." + } + It "Should contain ApplicationId in parameters when passed ObjectId to it" { + Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra + $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationPassword" + $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationPassword" + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 new file mode 100644 index 0000000000..dbe56b4e3f --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraApplicationPasswordCredential"{ + It "Should return empty object" { + $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with alias" { + $result = Remove-EntraApplicationPasswordCredential -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Remove-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is null" { + { Remove-EntraApplicationPasswordCredential -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when KeyId is empty" { + { Remove-EntraApplicationPasswordCredential -KeyId "" } | Should -Throw "Cannot bind argument to parameter 'KeyId'*" + } + It "Should fail when KeyId is null" { + { Remove-EntraApplicationPasswordCredential -KeyId } | Should -Throw "Missing an argument for parameter 'KeyId'*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraApplicationPasswordCredential -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra + $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationPasswordCredential" + $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationPasswordCredential" + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 new file mode 100644 index 0000000000..37aaef9405 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 @@ -0,0 +1,62 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraDeletedApplication" { + Context "Test for Remove-EntraDeletedApplication" { + It "Should remove deleted application object" { + $result = Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when ObjectId is empty" { + { Remove-EntraDeletedApplication -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + + It "Should fail when ObjectId is invalid" { + { Remove-EntraDeletedApplication -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should contain DirectoryObjectId in parameters when passed ObjectId to it" { + Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedApplication" + Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedApplication" + Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..ee39953e51 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 @@ -0,0 +1,64 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraDeletedDirectoryObject" { + Context "Test for Remove-EntraDeletedDirectoryObject" { + It "Should delete a previously deleted directory object" { + $result = Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Remove-EntraDeletedDirectoryObject -Id "11112222-bbbb-3333-cccc-4444dddd5555" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when DirectoryObjectId is empty" { + { Remove-EntraDeletedDirectoryObject -DirectoryObjectId } | Should -Throw "Missing an argument for parameter 'DirectoryObjectId'*" + } + + It "Should fail when DirectoryObjectId is invalid" { + { Remove-EntraDeletedDirectoryObject -DirectoryObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DirectoryObjectId' because it is an empty string." + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedDirectoryObject" + + Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedDirectoryObject" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 new file mode 100644 index 0000000000..2c8611deb4 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgServicePrincipal -MockWith {} -ModuleName Microsoft.Graph.Entra +} +Describe "Remove-EntraServicePrincipal" { + Context "Test for Remove-EntraServicePrincipal" { + It "Should return empty object" { + $result = Remove-EntraServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result = Remove-EntraServicePrincipal -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Remove-EntraServicePrincipal -ServicePrincipalId }| Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is invalid" { + { Remove-EntraServicePrincipal -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + Mock -CommandName Remove-MgServicePrincipal -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipal" + + Remove-EntraServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipal" + + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..edc7a3fe47 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgServicePrincipalAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications +} +Describe "Remove-EntraServicePrincipalAppRoleAssignment" { + Context "Test for Remove-EntraServicePrincipalAppRoleAssignment" { + It "Should return empty ServicePrincipalId" { + $result = Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraServicePrincipalAppRoleAssignment -ObjectId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + } + + It "Should fail when ServicePrincipalId is empty" { + { Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww"}| Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is invalid" { + { Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" + } + It "Should fail when AppRoleAssignmentId is empty" { + { Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId }| Should -Throw "Missing an argument for parameter 'AppRoleAssignmentId'.*" + } + It "Should fail when AppRoleAssignmentId is invalid" { + { Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleAssignmentId' because it is an empty string.*" + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + Mock -CommandName Remove-MgServicePrincipalAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + + $result = Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "cc7fcc82-ac1b-4785-af47-2ca3b7052886" + + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalAppRoleAssignment" + Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" + Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 new file mode 100644 index 0000000000..0983ac2780 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { + Context "Test for Remove-EntraServicePrincipalDelegatedPermissionClassification" { + It "Should return empty object" { + $result = Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId -Id "00001111-aaaa-2222-bbbb-3333cccc4444" } | should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is invalid" { + { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" } | should -Throw "Cannot bind argument to parameter 'ServicePrincipalId'*" + } + It "Should fail when Id is empty" { + { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id } | should -Throw "Missing an argument for parameter 'Id'.*" + } + It "Should fail when Id is invalid" { + { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "" } | should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should contain DelegatedPermissionClassificationId in parameters when passed Id to it" { + Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" + $params = Get-Parameters -data $result + $params.DelegatedPermissionClassificationId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalDelegatedPermissionClassification" + + Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalDelegatedPermissionClassification" + + Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 new file mode 100644 index 0000000000..a322efcd9e --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 @@ -0,0 +1,80 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraServicePrincipalOwner" { + Context "Test for Remove-EntraServicePrincipalOwner" { + It "Should return empty object" { + $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result = Remove-EntraServicePrincipalOwner -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Remove-EntraServicePrincipalOwner -ServicePrincipalId -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" }| Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is invalid" { + { Remove-EntraServicePrincipalOwner -ServicePrincipalId "" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333"} | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" + } + It "Should fail when OwnerId is empty" { + { Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId } | Should -Throw "Missing an argument for parameter 'OwnerId'.*" + } + It "Should fail when OwnerId is invalid" { + { Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId ""} | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string." + } + It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalOwner" + + Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalOwner" + + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 new file mode 100644 index 0000000000..b7b4074b94 --- /dev/null +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraServicePrincipalPasswordCredential" { + Context "Test for Remove-EntraServicePrincipalPasswordCredential" { + It "Should return empty object" { + $result = Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result = Remove-EntraServicePrincipalPasswordCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" } | should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is invalid" { + {Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" } | should -Throw "Cannot bind argument to parameter 'ServicePrincipalId'*" + } + It "Should fail when KeyId is empty" { + {Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId } | should -Throw "Missing an argument for parameter 'KeyId'.*" + } + It "Should fail when KeyId is invalid" { + { Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId ""} | should -Throw "Cannot bind argument to parameter 'KeyId'*" + } + It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { + Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalPasswordCredential" + + Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalPasswordCredential" + + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraServicePrincipalPasswordCredential -ObjectID "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 b/testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 new file mode 100644 index 0000000000..c8808157e0 --- /dev/null +++ b/testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 @@ -0,0 +1,110 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.device" + "@odata.Context" = "https://graph.microsoft.com/v1.0/$metadata#directoryObjects/$entity" + "appId" = "ffffffff-5555-6666-7777-aaaaaaaaaaaa" + "displayName" = "Mock-App" + "identifierUris" = @{} + "publisherDomain" = "M365x99297270.onmicrosoft.com" + "signInAudience" = "AzureADandPersonalMicrosoftAccount" + "addIns" = @{} + "appRoles" = @{} + "keyCredentials" = @{} + "requiredResourceAccess" = @{} + "verifiedPublisher" = @{} + "passwordCredentials" = @{} + "publicClient" = @{"redirectUris"=""} + "api" = @{"knownClientApplications" = ""; "oauth2PermissionScopes" = "" ; "preAuthorizedApplications" = ""} + "info" = @{"logoUrl"= "https://aadcdn.msftauthimages.net/1033/bannerlogo?ts=638490971995424035"} + "parentalControlSettings"= @{"legalAgeGroupRule" = "Allow"} + "web" = @{"homePageUrl" = "https://localhost/demoapp" ;"redirectUris" = ""; "implicitGrantSettings" = ""; "redirectUriSettings" = ""} + + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Restore-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Restore-EntraDeletedApplication" { +Context "Restore-EntraDeletedApplication" { + It "Should return specific deleted application" { + $result = Restore-EntraDeletedApplication -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ObjectId is empty" { + { Restore-EntraDeletedApplication -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + It "Should fail when ObjectId is invalid" { + { Restore-EntraDeletedApplication -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + It "Result Should contain Alias properties" { + $result = Restore-EntraDeletedApplication -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.Homepage | Should -Be "https://localhost/demoapp" + $result.DisplayName | Should -Be "Mock-App" + $result.PublisherDomain | Should -Be "M365x99297270.onmicrosoft.com" + $result.ObjectType | Should -Be "#microsoft.graph.device" + $result.SignInAudience | Should -Be "AzureADandPersonalMicrosoftAccount" + $result.ReplyUrls | Should -BeNullOrEmpty + $result.ParentalControlSettings | Should -Not -BeNullOrEmpty + $result.PasswordCredentials | Should -BeNullOrEmpty + $result.KeyCredentials | Should -BeNullOrEmpty + $result.AddIns | Should -BeNullOrEmpty + $result.AppRoles | Should -BeNullOrEmpty + $result.IdentifierUris | Should -BeNullOrEmpty + $result.KnownClientApplications | Should -BeNullOrEmpty + $result.Oauth2Permissions | Should -BeNullOrEmpty + $result.PreAuthorizedApplications | Should -BeNullOrEmpty + $result.PublicClient | Should -Not -BeNullOrEmpty + $result.RequiredResourceAccess | Should -BeNullOrEmpty + $result.DeletionTimestamp | Should -BeNullOrEmpty + } + It "Should contain DirectoryObjectId in parameters when passed ObjectId to it" { + $result = Restore-EntraDeletedApplication -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.DirectoryObjectId| Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedApplication" + $result = Restore-EntraDeletedApplication -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedApplication" + Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Restore-EntraDeletedApplication -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 b/testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 new file mode 100644 index 0000000000..301fb92bb9 --- /dev/null +++ b/testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgServicePrincipalMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Select-EntraGroupIdsServicePrincipalIsMemberOf" { + Context "Test for Select-EntraGroupIdsServicePrincipalIsMemberOf" { + It "Should Selects the groups in which a service principal is a member." { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = @("22cc22cc-dd33-ee44-ff55-66aa66aa66aa","33dd33dd-ee44-ff55-aa66-77bb77bb77bb","44ee44ee-ff55-aa66-bb77-88cc88cc88cc") + $SPId = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + $result = Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId $SPId -GroupIdsForMembershipCheck $Groups + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ObjectID parameter is empty" { + { Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId -GroupIdsForMembershipCheck "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" } | Should -Throw "Missing an argument for parameter*" + } + It "Should fail when ObjectID parameter is invalid" { + { Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId "" -GroupIdsForMembershipCheck "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" } | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when GroupIdsForMembershipCheck parameter is empty" { + {Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId $SPId -GroupIdsForMembershipCheck } | Should -Throw "Missing an argument for parameter 'GroupIdsForMembershipCheck'.*" + } + It "Should fail when GroupIdsForMembershipCheck parameter is invalid" { + {Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -GroupIdsForMembershipCheck "" } | Should -Throw "Cannot process argument transformation on parameter 'GroupIdsForMembershipCheck'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsServicePrincipalIsMemberOf" + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = @("22cc22cc-dd33-ee44-ff55-66aa66aa66aa","33dd33dd-ee44-ff55-aa66-77bb77bb77bb","44ee44ee-ff55-aa66-bb77-88cc88cc88cc") + $SPId = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + $result = Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId $SPId -GroupIdsForMembershipCheck $Groups + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsServicePrincipalIsMemberOf" + + Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = @("22cc22cc-dd33-ee44-ff55-66aa66aa66aa","33dd33dd-ee44-ff55-aa66-77bb77bb77bb","44ee44ee-ff55-aa66-bb77-88cc88cc88cc") + $SPId = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId $SPId -GroupIdsForMembershipCheck $Groups -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 b/testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 new file mode 100644 index 0000000000..dd6a34b0bc --- /dev/null +++ b/testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgApplication -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraApplication"{ + Context "Test for Set-EntraApplication" { + It "Should return empty object"{ + $result = Set-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -DisplayName "Mock-App" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Set-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -DisplayName "Mock-App" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ApplicationId is invalid" { + { Set-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should fail when ApplicationId is empty" { + { Set-EntraApplication -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + Mock -CommandName Update-MgApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraApplication -ApplicationId bbbbbbbb-1111-2222-3333-cccccccccccc + $result = Set-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraApplication" + + Set-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraApplication" + + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 b/testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 new file mode 100644 index 0000000000..965a515af9 --- /dev/null +++ b/testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 @@ -0,0 +1,62 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraApplicationLogo"{ + Context "Test for Set-EntraApplicationLogo" { + It "Should return empty object"{ + $result = Set-EntraApplicationLogo -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -FilePath "https://th.bing.com/th?q=Application+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with alias"{ + $result = Set-EntraApplicationLogo -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -FilePath "https://th.bing.com/th?q=Application+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when ApplicationId is empty" { + { Set-EntraApplicationLogo -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is null" { + { Set-EntraApplicationLogo -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when filepath invalid"{ + { Set-EntraApplicationLogo -ApplicationId f82a3f32-6bb6-404b-843c-5512fb3b35b8 -FilePath "sdd" } | Should -Throw "FilePath is invalid" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraApplicationLogo" + + Set-EntraApplicationLogo -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -FilePath "https://th.bing.com/th?q=Application+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraApplicationLogo" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraApplicationLogo -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -FilePath "https://th.bing.com/th?q=Application+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 b/testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 new file mode 100644 index 0000000000..f80453f6c0 --- /dev/null +++ b/testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 @@ -0,0 +1,90 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraServicePrincipal"{ + Context "Test for Set-EntraServicePrincipal" { + It "Should update the parameter" { + $tags = @("Environment=Production", "Department=Finance", "Project=MNO") + $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -AccountEnabled $false -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -AppRoleAssignmentRequired $true -DisplayName "test11" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Tags $tags + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the parameter with Alias" { + $result= Set-EntraServicePrincipal -ObjectId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -AccountEnabled $false -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -AppRoleAssignmentRequired $true -DisplayName "test11" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the LogoutUrl and ServicePrincipalType parameter" { + $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -LogoutUrl 'https://securescore.office.com/SignOut' -ServicePrincipalType "Application" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the Homepage, ReplyUrls and AlternativeNames parameter" { + $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Homepage 'https://HomePageurlss.com' -ReplyUrls 'https://admin.microsoft1.com' -AlternativeNames "updatetest" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should update the KeyCredentials parameter" { + $creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential + $creds.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes("Test") + $startdate = Get-Date -Year 2024 -Month 10 -Day 10 + $creds.StartDate = $startdate + $creds.Type = "Symmetric" + $creds.Usage = 'Sign' + $creds.Value = [System.Text.Encoding]::UTF8.GetBytes("A") + $creds.EndDate = Get-Date -Year 2025 -Month 12 -Day 20 + $result= Set-EntraServicePrincipal -ServicePrincipalId 6aa187e3-bbbb-4748-a708-fc380aa9eb17 -KeyCredentials $creds + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ServicePrincipalId is empty" { + { Set-EntraServicePrincipal -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" + } + It "Should fail when ServicePrincipalId is Invalid" { + { Set-EntraServicePrincipal -ServicePrincipalId ""} | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" + } + It "Should fail when non-mandatory is empty" { + { Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -AppId -Tags -ReplyUrls -AccountEnabled -AlternativeNames -KeyCredentials -Homepage} | Should -Throw "Missing an argument for parameter*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraServicePrincipal" + + Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -LogoutUrl 'https://securescore.office.com/SignOut' -ServicePrincipalType "Application" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraServicePrincipal" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $tags = @("Environment=Production", "Department=Finance", "Project=MNO") + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -AccountEnabled $false -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -AppRoleAssignmentRequired $true -DisplayName "test11" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Tags $tags -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Applications/Valid.Tests.ps1 b/testVNext/Entra/Applications/Valid.Tests.ps1 new file mode 100644 index 0000000000..5013e83278 --- /dev/null +++ b/testVNext/Entra/Applications/Valid.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + + $module = Get-Module -Name Microsoft.Graph.Entra +} + +Describe "Valid parameter Tests"{ + Context "Test for valid parameters"{ + It "Should return empty object with Id parameter"{ + Write-Host "--------Start mock remove cmdlets with Id parameter only--------" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) + if($params.count -eq 1 -and $params -eq 'Id'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "---------End mock remove cmdlets with Id parameter only---------" + } + It "Should return empty object with ObjectId param"{ + Write-Host "-----Start mock remove cmdlets with ObjectId parameter only-----" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + if($params.count -eq 1 -and $params -eq 'ObjectId'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "------End mock remove cmdlets with ObjectId parameter only------" + } + # It "Should pass with 'Id' or 'ObjectId' parameter" { + # $count=0 + # $module.ExportedCommands.Keys | ForEach-Object { + + # $command = Get-Command $_ + # if ($command.Name.StartsWith('Remove')) + # { + # $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + # if($params.count -eq 1 -and ($params -eq 'ObjectId' -or $params-eq 'Id')){ + # $stringParams = $params -join ',' + # Write-Host "$command | $stringParams" + # $count++ + # } + # } + # } + # Write-Host $count + # } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Authentication/Connect-Entra.Tests.ps1 b/testVNext/Entra/Authentication/Connect-Entra.Tests.ps1 new file mode 100644 index 0000000000..cdab7faf95 --- /dev/null +++ b/testVNext/Entra/Authentication/Connect-Entra.Tests.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ + Import-Module Microsoft.Graph.Entra.Authentication + } + + Mock -CommandName Connect-MgGraph -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + + $ConnectEntraCommand = Get-Command Connect-Entra +} + +Describe "Connect-Entra Mock"{ + It "should return empty object"{ + $result = Connect-Entra -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -ApplicationId "00001111-aaaa-2222-bbbb-3333cccc4444" -CertificateThumbprint "0a0a0a0a-1111-bbbb-2222-3c3c3c3c3c3c" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + } + It "Should connect to specified environment"{ + $result = Connect-Entra -Environment Global + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + } + It "Should connect to an environment as a different identity"{ + $result = Connect-Entra -ContextScope "Process" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + } + It "Should allow for authentication using environment variables"{ + $result = Connect-Entra -EnvironmentVariable + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + } + It "Should return error when TenantId is null"{ + { Connect-Entra -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should return error when Environment is null"{ + { Connect-Entra -Environment } | Should -Throw "Missing an argument for parameter 'Environment'*" + } + It "Should return error when invalid parameter is provided"{ + { Connect-Entra -DisplayName } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'*" + } +} + +Describe "Connect-Entra ParameterSets"{ + It 'Should have six ParameterSets' { + $ConnectEntraCommand | Should -Not -BeNullOrEmpty + $ConnectEntraCommand.ParameterSets | Should -HaveCount 6 + } + It 'Should have UserParameterSet' { + $UserParameterSet = $ConnectEntraCommand.ParameterSets | Where-Object Name -eq 'UserParameterSet' + $UserParameterSet | Should -Not -BeNull + $UserParameterSet.IsDefault | Should -BeTrue + $UserParameterSet.Parameters | Where-Object IsMandatory | Should -HaveCount 0 + @('ClientId', 'TenantId', 'ContextScope', 'Environment', 'ClientTimeout') | Should -BeIn $UserParameterSet.Parameters.Name + } + It 'Should have AppCertificateParameterSet' { + $AppCertificateParameterSet = $ConnectEntraCommand.ParameterSets | Where-Object Name -eq 'AppCertificateParameterSet' + $AppCertificateParameterSet | Should -Not -BeNull + @('ClientId', 'TenantId', 'CertificateSubjectName', 'CertificateThumbprint', 'ContextScope', 'Environment', 'ClientTimeout') | Should -BeIn $AppCertificateParameterSet.Parameters.Name + } + + It 'Should have AppSecretCredentialParameterSet' { + $AppSecretCredentialParameterSet = $ConnectEntraCommand.ParameterSets | Where-Object Name -eq 'AppSecretCredentialParameterSet' + $AppSecretCredentialParameterSet | Should -Not -BeNull + @('ClientSecretCredential', 'TenantId', 'ContextScope', 'Environment', 'ClientTimeout') | Should -BeIn $AppSecretCredentialParameterSet.Parameters.Name + $MandatoryParameters = $AppSecretCredentialParameterSet.Parameters | Where-Object IsMandatory + $MandatoryParameters | Should -HaveCount 0 + } + + It 'Should have EnvironmentVariableParameterSet' { + $EnvironmentVariableParameterSet = $ConnectEntraCommand.ParameterSets | Where-Object Name -eq 'EnvironmentVariableParameterSet' + $EnvironmentVariableParameterSet | Should -Not -BeNull + @('EnvironmentVariable', 'ContextScope', 'Environment', 'ClientTimeout') | Should -BeIn $EnvironmentVariableParameterSet.Parameters.Name + $MandatoryParameters = $EnvironmentVariableParameterSet.Parameters | Where-Object IsMandatory + $MandatoryParameters | Should -HaveCount 0 + } + + It 'Should Have AccessTokenParameterSet' { + $AccessTokenParameterSet = $ConnectEntraCommand.ParameterSets | Where-Object Name -eq 'AccessTokenParameterSet' + $AccessTokenParameterSet | Should -Not -BeNull + @('AccessToken', 'Environment', 'ClientTimeout') | Should -BeIn $AccessTokenParameterSet.Parameters.Name + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Connect-Entra -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -ApplicationId "00001111-aaaa-2222-bbbb-3333cccc4444" -CertificateThumbprint "0a0a0a0a-1111-bbbb-2222-3c3c3c3c3c3c" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} diff --git a/testVNext/Entra/Authentication/Disconnect-Entra.Tests.ps1 b/testVNext/Entra/Authentication/Disconnect-Entra.Tests.ps1 new file mode 100644 index 0000000000..6fb54e374d --- /dev/null +++ b/testVNext/Entra/Authentication/Disconnect-Entra.Tests.ps1 @@ -0,0 +1,36 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ + Import-Module Microsoft.Graph.Entra.Authentication + } + + Mock -CommandName Disconnect-MgGraph -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + + $command = Get-Command Disconnect-Entra +} + +Describe "Disconnect-Entra Mock"{ + It "should return empty object"{ + $result = Disconnect-Entra + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Disconnect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + } + It "Should return error when invalid parameter is provided"{ + { Disconnect-MgGraph -DisplayName } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'*" + } +} + +Describe "Disconnect-Entra ParameterSets"{ + It 'Should have one ParameterSets' { + $command | Should -Not -BeNullOrEmpty + $command.ParameterSets | Should -HaveCount 1 + } + It 'Should have GetQuery' { + $UserParameterSet = $command.ParameterSets | Where-Object Name -eq 'GetQuery' + $UserParameterSet | Should -Not -BeNull + $UserParameterSet.IsDefault | Should -BeTrue + } +} diff --git a/testVNext/Entra/Authentication/Entra.Tests.ps1 b/testVNext/Entra/Authentication/Entra.Tests.ps1 new file mode 100644 index 0000000000..e6b0c31795 --- /dev/null +++ b/testVNext/Entra/Authentication/Entra.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/Authentication/Invalid.Tests.ps1 b/testVNext/Entra/Authentication/Invalid.Tests.ps1 new file mode 100644 index 0000000000..6d5381a100 --- /dev/null +++ b/testVNext/Entra/Authentication/Invalid.Tests.ps1 @@ -0,0 +1,105 @@ +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra +} + +Describe "Invalid Tests"{ + It "Should fail when parameters are invalid"{ + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object{ + $command = Get-Command $_ + { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." + } + } + It "Should fail with 'TenantId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ + $commandScriptBlock = [scriptblock]::Create("$command -TenantId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'TenantId'.*" + } + } + } + It "Should fail with 'Id' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Id'){ + $commandScriptBlock = [scriptblock]::Create("$command -Id $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + } + } + It "Should fail with 'ObjectId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ + $commandScriptBlock = [scriptblock]::Create("$command -ObjectId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'ObjectId'.*" + } + } + } + It "Should fail with 'All' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'All'){ + $commandScriptBlock = [scriptblock]::Create("$command -All `$True") + if('Find-EntraPermission' -eq $command){ + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'*" + } + else { + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + } + } + } + It "Should fail with 'Top' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Top'){ + $commandScriptBlock = [scriptblock]::Create("$command -Top ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Top'*" + } + } + } + It "Should fail with 'Filter' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ + $commandScriptBlock = [scriptblock]::Create("$command -Filter ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + } + } + It "Should fail with 'SearchString' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ + $commandScriptBlock = [scriptblock]::Create("$command -SearchString ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + } + } + It "Should fail with exception when no parameter is passed" { + $cmdlets = @( + @{ CmdletName = 'Enable-EntraDirectoryRole'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + @{ CmdletName = 'New-EntraConditionalAccessPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraNamedLocationPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraPermissionGrantPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + ) + $cmdlets | ForEach-Object { + $commandName = $_.CmdletName + $Exception = $_.Exception + $commandScriptBlock = [scriptblock]::Create("$commandName -ErrorAction Stop") + try { + Invoke-Command -ScriptBlock $commandScriptBlock + } + catch { $_ -match $Exception | Should -BeTrue } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Authentication/Module.Tests.ps1 b/testVNext/Entra/Authentication/Module.Tests.ps1 new file mode 100644 index 0000000000..cc40ad720b --- /dev/null +++ b/testVNext/Entra/Authentication/Module.Tests.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Entra Module" { + Context "On module import" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + } + + It "Should have exported commands" { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo | Should -Not -BeNullOrEmpty + $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 + + } + + It 'Should be compatible with PS core and desktop' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } + + It 'Should point to script module' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + } + + It 'Should lock GUID' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" + } + + It "Module import should not write to error and information streams" { + $ps = [powershell]::Create() + $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + "Checking Information stream" | Out-Host + $ps.Streams.Information.Count | Should -Be 0 + "Checking Error stream" | Out-Host + $ps.Streams.Error.Count | Should -Be 0 + "Checking Verbose stream" | Out-Host + $ps.Streams.Verbose.Count | Should -Be 0 + "Checking Debug stream" | Out-Host + $ps.Streams.Warning.Count | Should -Be 0 + "Checking Progress stream" | Out-Host + $ps.Streams.Progress.Count | Should -Be 0 + + $ps.Dispose() + } + } +} diff --git a/testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 b/testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 new file mode 100644 index 0000000000..721913c1c5 --- /dev/null +++ b/testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null){ + Import-Module Microsoft.Graph.Entra.Authentication + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.passwordAuthenticationMethod"; + createdDateTime= "2023-11-21T12:43:51Z"; + } + } + ) + } + Mock -CommandName Get-MgUserAuthenticationMethod -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication +} + +Describe "Reset-EntraStrongAuthenticationMethodByUpn" { + Context "Test for Reset-EntraStrongAuthenticationMethodByUpn" { + It "Should Resets the strong authentication method" { + $result = Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + } + It "Should fail when UserPrincipalName is empty" { + { Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName } | Should -Throw "Missing an argument for parameter 'UserPrincipalName'*" + } + + It "Should fail when Id is invalid" { + { Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName "" } | Should -Throw "Cannot bind argument to parameter 'UserPrincipalName' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Reset-EntraStrongAuthenticationMethodByUpn" + + Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' | Out-Null + Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should contain 'User-Agent' header" { + Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' | Out-Null + Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 -ParameterFilter { + $userId | Should -Be 'Test_contoso@M365x99297270.onmicrosoft.com' + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} +} diff --git a/testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 b/testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 new file mode 100644 index 0000000000..a4fd3f06b5 --- /dev/null +++ b/testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 @@ -0,0 +1,58 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $mockResponse = { + return @{ + "value" = @{ + "Value" = $true + "Parameters" = $args + } + } + } + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra +} + +Describe "Revoke-EntraSignedInUserAllRefreshToken" { + Context "Test for Revoke-EntraSignedInUserAllRefreshToken" { + It "Should revoke refresh tokens for the current user" { + $result = Revoke-EntraSignedInUserAllRefreshToken + $result | Should -Not -BeNullOrEmpty + $result | Should -Be $true + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Revoke-EntraSignedInUserAllRefreshToken" + + Revoke-EntraSignedInUserAllRefreshToken + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Revoke-EntraSignedInUserAllRefreshToken" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Revoke-EntraSignedInUserAllRefreshToken -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 b/testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 new file mode 100644 index 0000000000..717168fd2a --- /dev/null +++ b/testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Revoke-MgUserSignInSession -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Revoke-EntraUserAllRefreshToken" { + Context "Test for Revoke-EntraUserAllRefreshToken" { + It "Should return empty object" { + $result = Revoke-EntraUserAllRefreshToken -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with alias" { + $result = Revoke-EntraUserAllRefreshToken -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when UserId is empty string" { + { Revoke-EntraUserAllRefreshToken -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should fail when UserId is empty" { + { Revoke-EntraUserAllRefreshToken -UserId } | Should -Throw "Missing an argument for parameter*" + } + It "Should contain Id in parameters when passed UserId to it" { + Mock -CommandName Revoke-MgUserSignInSession -MockWith { $args } -ModuleName Microsoft.Graph.Entra + + $result = Revoke-EntraUserAllRefreshToken -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result + $params.userId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Revoke-EntraUserAllRefreshToken" + + + Revoke-EntraUserAllRefreshToken -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Revoke-EntraUserAllRefreshToken" + + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Revoke-EntraUserAllRefreshToken -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Authentication/Valid.Tests.ps1 b/testVNext/Entra/Authentication/Valid.Tests.ps1 new file mode 100644 index 0000000000..5013e83278 --- /dev/null +++ b/testVNext/Entra/Authentication/Valid.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + + $module = Get-Module -Name Microsoft.Graph.Entra +} + +Describe "Valid parameter Tests"{ + Context "Test for valid parameters"{ + It "Should return empty object with Id parameter"{ + Write-Host "--------Start mock remove cmdlets with Id parameter only--------" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) + if($params.count -eq 1 -and $params -eq 'Id'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "---------End mock remove cmdlets with Id parameter only---------" + } + It "Should return empty object with ObjectId param"{ + Write-Host "-----Start mock remove cmdlets with ObjectId parameter only-----" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + if($params.count -eq 1 -and $params -eq 'ObjectId'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "------End mock remove cmdlets with ObjectId parameter only------" + } + # It "Should pass with 'Id' or 'ObjectId' parameter" { + # $count=0 + # $module.ExportedCommands.Keys | ForEach-Object { + + # $command = Get-Command $_ + # if ($command.Name.StartsWith('Remove')) + # { + # $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + # if($params.count -eq 1 -and ($params -eq 'ObjectId' -or $params-eq 'Id')){ + # $stringParams = $params -join ',' + # Write-Host "$command | $stringParams" + # $count++ + # } + # } + # } + # Write-Host $count + # } + } +} \ No newline at end of file diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 new file mode 100644 index 0000000000..a18309a0ca --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 @@ -0,0 +1,62 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} +Describe "Add-EntraAdministrativeUnitMember tests"{ + It "Should return empty object"{ + $result = Add-EntraAdministrativeUnitMember -AdministrativeUnitId "f306a126-cf2e-439d-b20f-95ce4bcb7ffa" -RefObjectId "d6873b36-81d6-4c5e-bec0-9e3ca2c86846" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with ObjectId"{ + $result = Add-EntraAdministrativeUnitMember -ObjectId "f306a126-cf2e-439d-b20f-95ce4bcb7ffa" -RefObjectId "d6873b36-81d6-4c5e-bec0-9e3ca2c86846" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is empty"{ + { Add-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is null"{ + { Add-EntraAdministrativeUnitMember -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when RefObjectId is empty"{ + { Add-EntraAdministrativeUnitMember -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId'*" + } + It "Should fail when RefObjectId is null"{ + { Add-EntraAdministrativeUnitMember -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'*" + } + It "Should fail when invalid paramter is passed"{ + { Add-EntraAdministrativeUnitMember -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraAdministrativeUnitMember" + Add-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraAdministrativeUnitMember" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraAdministrativeUnitMember -AdministrativeUnitId "f306a126-cf2e-439d-b20f-95ce4bcb7ffa" -RefObjectId "d6873b36-81d6-4c5e-bec0-9e3ca2c86846" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 new file mode 100644 index 0000000000..ecbf81bddb --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { return @( + [PSCustomObject]@{ + Id = "Apline" + IsActive = $true + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Add-EntraCustomSecurityAttributeDefinitionAllowedValue" { + Context "Test for Add-EntraCustomSecurityAttributeDefinitionAllowedValue" { + It "Should add specific Allowed Values" { + $result = Add-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' -IsActive $true + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "Apline" + $result.IsActive | should -Be $true + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when CustomSecurityAttributeDefinitionId is empty" { + { Add-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId } | Should -Throw "Missing an argument for parameter 'CustomSecurityAttributeDefinitionId'.*" + } + It "Should fail when CustomSecurityAttributeDefinitionId is invalid" { + { Add-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'CustomSecurityAttributeDefinitionId'*" + } + It "Should fail when Id is empty" { + { Add-EntraCustomSecurityAttributeDefinitionAllowedValue -Id } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + It "Should fail when Id is invalid" { + { Add-EntraCustomSecurityAttributeDefinitionAllowedValue -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when IsActive is empty" { + { Add-EntraCustomSecurityAttributeDefinitionAllowedValue -IsActive } | Should -Throw "Missing an argument for parameter 'IsActive'.*" + } + It "Should fail when IsActive is invalid" { + { Add-EntraCustomSecurityAttributeDefinitionAllowedValue -IsActive a } | Should -Throw "Cannot process argument transformation on parameter 'IsActive'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraCustomSecurityAttributeDefinitionAllowedValue" + Add-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' -IsActive $true + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraCustomSecurityAttributeDefinitionAllowedValue" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' -IsActive $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 new file mode 100644 index 0000000000..bb5cc1f438 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 @@ -0,0 +1,86 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Add-EntraDeviceRegisteredOwner" { + Context "Test for Add-EntraDeviceRegisteredOwner" { + It "Should return empty object" { + $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceId is empty" { + { Add-EntraDeviceRegisteredOwner -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" + } + It "Should fail when DeviceId is invalid" { + { Add-EntraDeviceRegisteredOwner -DeviceId "" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should contain DeviceId in parameters when passed ObjectId to it" { + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "412be9d1-1460-4061-8eed-cca203fcb215" + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain BodyParameter in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $value = @{ + "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' + Write-Host $BodyParameter.AdditionalProperties.'@odata.id' + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDeviceRegisteredOwner" + + Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDeviceRegisteredOwner" + + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + {Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 new file mode 100644 index 0000000000..7b1cf1d272 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Add-EntraDeviceRegisteredUser" { + Context "Test for Add-EntraDeviceRegisteredUser" { + It "Should return empty object" { + $result = Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceId is empty" { + { Add-EntraDeviceRegisteredUser -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" + } + It "Should fail when DeviceId is invalid" { + { Add-EntraDeviceRegisteredUser -DeviceId "" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should execute successfully with Alias" { + $result = Add-EntraDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should contain DeviceId in parameters when passed DeviceId to it" { + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain BodyParameter in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $value = @{ + "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' + Write-Host $BodyParameter.AdditionalProperties.'@odata.id' + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDeviceRegisteredUser" + + Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDeviceRegisteredUser" + + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } + +} + diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 new file mode 100644 index 0000000000..2d05182ad9 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Add-EntraDirectoryRoleMember" { + Context "Test for Add-EntraDirectoryRoleMember" { + It "Should return empty object" { + $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with alias" { + $result = Add-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DirectoryRoleId is empty" { + { Add-EntraDirectoryRoleMember -DirectoryRoleId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'.*" + } + It "Should fail when DirectoryRoleId is invalid" { + { Add-EntraDirectoryRoleMember -DirectoryRoleId "" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'DirectoryRoleId' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should contain DirectoryRoleId in parameters when passed ObjectId to it" { + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryRoleId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain OdataId in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $value="https://graph.microsoft.com/v1.0/directoryObjects/" + $params.OdataId | Should -Be $value"bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDirectoryRoleMember" + + Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDirectoryRoleMember" + + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 new file mode 100644 index 0000000000..e924260546 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $userObjId = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $roleObjId = "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + $unitObjId = "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" + $RoleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo + $RoleMember.Id = $userObjId + + $scriptblock = { + @{ + "administrativeUnitId" = $unitObjId + "roleId" = $roleObjId + "roleMemberInfo" = @( + @{ + "id" = $userObjId + "userPrincipalName" = "Dummy" + "displayName" = "Dummy" + } + ) + "id" = "NewDummyId" + "Parameters" = $args + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Tests for Add-EntraScopedRoleMembership"{ + It "Result should not be empty"{ + $result = Add-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -RoleObjectId $roleObjId -RoleMemberInfo $RoleMember + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('NewDummyId') + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should not be empty with ObjectId"{ + $result = Add-EntraScopedRoleMembership -ObjectId $unitObjId -RoleObjectId $roleObjId -RoleMemberInfo $RoleMember + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('NewDummyId') + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is invalid" { + { Add-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is empty" { + { Add-EntraScopedRoleMembership -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when RoleMemberInfo is invalid" { + { Add-EntraScopedRoleMembership -RoleMemberInfo "" } | Should -Throw "Cannot process argument transformation on parameter 'RoleMemberInfo'*" + } + It "Should fail when RoleMemberInfo is empty" { + { Add-EntraScopedRoleMembership -RoleMemberInfo } | Should -Throw "Missing an argument for parameter 'RoleMemberInfo'*" + } + It "Should fail when invalid parameter is passed" { + { Add-EntraScopedRoleMembership -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraScopedRoleMembership" + $result = Add-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -RoleObjectId $roleObjId -RoleMemberInfo $RoleMember + $params = Get-Parameters -data $result.Parameters + $a= $params | ConvertTo-json | ConvertFrom-Json + $a.headers.'User-Agent' | Should -Be $userAgentHeaderValue + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -RoleObjectId $roleObjId -RoleMemberInfo $RoleMember -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 new file mode 100644 index 0000000000..749cf3daca --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 @@ -0,0 +1,49 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgDirectoryRole -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Enable-EntraDirectoryRole" { + Context "Test for Enable-EntraDirectoryRole" { + It "Should return empty object" { + $result = Enable-EntraDirectoryRole -RoleTemplateId 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when RoleTemplateId is empty" { + { Enable-EntraDirectoryRole -RoleTemplateId } | Should -Throw "Missing an argument for parameter 'RoleTemplateId'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Enable-EntraDirectoryRole" + Enable-EntraDirectoryRole -RoleTemplateId 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Enable-EntraDirectoryRole" + Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Enable-EntraDirectoryRole -RoleTemplateId 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Entra.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Entra.Tests.ps1 new file mode 100644 index 0000000000..e6b0c31795 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Entra.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 new file mode 100644 index 0000000000..718b833131 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "PrepaidUnits" = @{Enabled=20;LockedOut= 0; Suspended= 0;Warning =0} + "Id" = "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + "ConsumedUnits" = "20" + "AccountName" = "M365x99297270" + "CapabilityStatus" = "Enabled" + "AccountId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AppliesTo" = "User" + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraAccountSku" { + Context "Test for Get-EntraAccountSku" { + It "Returns all the SKUs for a company." { + $result = Get-EntraAccountSku -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + $result.ConsumedUnits | should -Be "20" + $result.AccountName | should -Be "M365x99297270" + $result.CapabilityStatus | should -Be "Enabled" + $result.AccountId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.AppliesTo | should -Be "User" + + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when TenantId is empty" { + { Get-EntraAccountSku -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is invalid" { + { Get-EntraAccountSku -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'.*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAccountSku" + + $result = Get-EntraAccountSku -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAccountSku" + + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraAccountSku -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 new file mode 100644 index 0000000000..877c4b3d50 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 @@ -0,0 +1,94 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + @{ + "description" = "test111" + "membershipRule" = $null + "membershipRuleProcessingState" = $null + "id" = "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + "deletedDateTime" = $null + "visibility" = $null + "displayName" = "test111" + "membershipType" = $null + "Parameters" = $args + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Tests for Get-EntraAdministrativeUnit"{ + It "Result should not be empty"{ + $result = Get-EntraAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should not be empty objectid"{ + $result = Get-EntraAdministrativeUnit -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Get-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is null" { + { Get-EntraAdministrativeUnit -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when All has an argument" { + { Get-EntraAdministrativeUnit -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should fail when filter is empty" { + { Get-EntraAdministrativeUnit -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should fail when Top is empty" { + { Get-EntraAdministrativeUnit -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraAdministrativeUnit -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should fail when invalid parameter is passed" { + { Get-EntraAdministrativeUnit -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should return specific AdministrativeUnit by filter" { + $result = Get-EntraAdministrativeUnit -Filter "displayName -eq 'test111'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'test111' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return top AdministrativeUnit" { + $result = @(Get-EntraAdministrativeUnit -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnit" + $result = Get-EntraAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnit" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraAdministrativeUnit -Top 1 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 new file mode 100644 index 0000000000..371152add0 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + @{ + "description" = "test111" + "membershipRule" = $null + "membershipRuleProcessingState" = $null + "id" = "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + "deletedDateTime" = $null + "visibility" = $null + "displayName" = "test111" + "membershipType" = $null + "Parameters" = $args + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Tests for Get-EntraAdministrativeUnitMember"{ + It "Result should not be empty"{ + $result = Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should not be empty objectId"{ + $result = Get-EntraAdministrativeUnitMember -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Get-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is null" { + { Get-EntraAdministrativeUnitMember -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when All has an argument" { + { Get-EntraAdministrativeUnitMember -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should fail when Top is empty" { + { Get-EntraAdministrativeUnitMember -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraAdministrativeUnitMember -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should fail when invalid parameter is passed" { + { Get-EntraAdministrativeUnitMember -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should return top AdministrativeUnit" { + $result = @(Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnitMember" + $result = Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnitMember" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top 1 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 new file mode 100644 index 0000000000..7b357e2da8 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [Microsoft.Graph.PowerShell.Models.MicrosoftGraphAttributeSet]@{ + "Description" = "NewCustomAttributeSet" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "MaxAttributesPerSet" = "125" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraAttributeSet" { + Context "Test for Get-EntraAttributeSet" { + It "Should return AttributeSets with any parameter" { + $result = Get-EntraAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should return specific AttributeSet" { + $result = Get-EntraAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should return specific AttributeSet with alias" { + $result = Get-EntraAttributeSet -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when AttributeSetId is invalid" { + { Get-EntraAttributeSet -AttributeSetId "" } | Should -Throw "Cannot bind argument to parameter 'AttributeSetId' because it is an empty string." + } + It "Should fail when AttributeSetId is empty" { + { Get-EntraAttributeSet -AttributeSetId } | Should -Throw "Missing an argument for parameter 'AttributeSetId'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAttributeSet" + + Get-EntraAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Out-Null + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { + Get-EntraAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug + } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAuditDirectoryLog.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAuditDirectoryLog.Tests.ps1 new file mode 100644 index 0000000000..35d07002f5 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAuditDirectoryLog.Tests.ps1 @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraAuditDirectoryLog with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + category = 'DirectoryManagement' + resultReason = 'Successfully deleted [0] records for [[LicenseKey:][TenantId:bbbbbbbb-1111-2222-3333-ccccccccccc2][UserName:][UserObjectId:bbbbbbbb-1111-2222-3333-ccccccccccc1][HomeTenantId:bbbbbbbb-1111-2222-3333-cccccccccccc][AzureSovereign:WorldWide]]' + id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + operationType = 'Delete' + loggedByService = 'Azure MFA12' + additionalDetails = @{ key = 'RequestId'; value = '00000000-0000-0000-0000-000000000000' } + activityDisplayName = 'DeleteDataFromBackend' + targetResources = @( + @{ + userPrincipalName = '' + groupType = '' + id = 'bbbbbbbb-1111-2222-3333-cccccccccaaa' + type = 'User' + displayName = '' + modifiedProperties = @() + } + ) + correlationId = 'bbbbbbbb-1111-2222-3333-cccccccccrrr' + result = 'success' + initiatedBy = @{ app = ''; user = '' } + activityDateTime = '06/19/2024 9:52:22 am' + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraAuditDirectoryLog" { + Context "Test for Get-EntraAuditDirectoryLog" { + It "Should return specific Audit Directory Logs" { + $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraAuditDirectoryLog -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when filter is empty" { + { Get-EntraAuditDirectoryLog -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should fail when Top is empty" { + { Get-EntraAuditDirectoryLog -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraAuditDirectoryLog -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return all Audit Directory Logs" { + $result = Get-EntraAuditDirectoryLog -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should return specific Audit Directory Logs by filter" { + $result = Get-EntraAuditDirectoryLog -Filter "correlationId eq 'bbbbbbbb-1111-2222-3333-cccccccccrrr'" + $result | Should -Not -BeNullOrEmpty + $result.id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should return top Audit Directory Logs" { + $result = @(Get-EntraAuditDirectoryLog -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should contain ID in parameters when passed Id to it" { + $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuditDirectoryLog" + $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 new file mode 100644 index 0000000000..38a042bba0 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 @@ -0,0 +1,174 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DeletedDateTime" = $null + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "Department" = $null + "GivenName" = $null + "DisplayName" = "Bob Kelly (TAILSPIN)" + "JobTitle" = $null + "OnPremisesLastSyncDateTime" = $null + "MailNickname" = "BobKTAILSPIN" + "Mail" = "bobk@tailspintoys.com" + "Phones" = $null + "ServiceProvisioningErrors" = @{} + "ProxyAddresses" = @{"SMTP"="bobk@tailspintoys.com"} + "Surname" = $null + "Addresses" = @{ "City"= "" + "CountryOrRegion" = "" + "OfficeLocation"= "" + "PostalCode"= "" + "State"= "" + "Street"= "" + } + "AdditionalProperties" = @{ + imAddresses = "" + "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#contacts/$entity" + } + "Manager" = $null + "OnPremisesSyncEnabled" = @{} + "Parameters" = $args + } + ) + + } + + Mock -CommandName Get-MgContact -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraContact" { + Context "Test for Get-EntraContact" { + It "Should return specific Contact" { + $result = Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.OnPremisesSyncEnabled | Should -BeNullOrEmpty + $result.OnPremisesLastSyncDateTime | Should -BeNullOrEmpty + $result.Phones | Should -BeNullOrEmpty + $result.ServiceProvisioningErrors | Should -BeNullOrEmpty + $result.Mobile | Should -BeNullOrEmpty + $result.TelephoneNumber | Should -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific Contact alias" { + $result = Get-EntraContact -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.OnPremisesSyncEnabled | Should -BeNullOrEmpty + $result.OnPremisesLastSyncDateTime | Should -BeNullOrEmpty + $result.Phones | Should -BeNullOrEmpty + $result.ServiceProvisioningErrors | Should -BeNullOrEmpty + $result.Mobile | Should -BeNullOrEmpty + $result.TelephoneNumber | Should -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + } + + + It "Should fail when OrgContactId is empty" { + { Get-EntraContact -OrgContactId } | Should -Throw "Missing an argument for parameter 'OrgContactId'*" + } + + It "Should fail when OrgContactId is invalid" { + { Get-EntraContact -OrgContactId "" } | Should -Throw "Cannot bind argument to parameter 'OrgContactId' because it is an empty string." + } + + It "Should return all contact" { + $result = Get-EntraContact -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraContact -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + + It "Should return specific group by filter" { + $result = Get-EntraContact -Filter "DisplayName -eq 'Bob Kelly (TAILSPIN)'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Bob Kelly (TAILSPIN)' + + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when filter is empty" { + { Get-EntraContact -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should return top contact" { + $result = Get-EntraContact -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraContact -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraContact -Top xy } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should Contain OrgContactId" { + $result = Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain OrgContactId in parameters when passed OrgContactId to it" { + $result = Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result.Parameters + $params.OrgContactId | Should -Match "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Property parameter should work" { + $result = Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Bob Kelly (TAILSPIN)' + + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraContact" + + $result = Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraContact" + + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 new file mode 100644 index 0000000000..7cc591d9ba --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 @@ -0,0 +1,134 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "DeletedDateTime" = $null + "AdditionalProperties" = @{"@odata.type" ="#microsoft.graph.group" + "DisplayName" = "All Employees" + "MailNickname" = "Employees" + "Mail" = "Employees@M365x99297270.OnMicrosoft.com" + "onPremisesProvisioningErrors" = @{} + "ProxyAddresses" = @{SMTP="Employees@M365x99297270.OnMicrosoft.com"} + "SecurityEnabled" = "False" + } + "Parameters" = $args + } + ) + + } + + Mock -CommandName Get-MgContactMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraContactMembership" { + Context "Test for Get-EntraContactMembership" { + It "Should return specific Contact Membership" { + $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.DeletedDateTime | Should -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific Contact Membership with alias" { + $result = Get-EntraContactMembership -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.DeletedDateTime | Should -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when OrgContactId is invalid" { + { Get-EntraContactMembership -OrgContactId "" } | Should -Throw "Cannot bind argument to parameter 'OrgContactId' because it is an empty string." + } + + It "Should return all Contact Membership" { + $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + + It "Should return top Contact Membership" { + $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Top DF } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should Contain ObjectId" { + $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain OrgContactId in parameters when passed OrgContactId to it" { + $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result.Parameters + $params.OrgContactId | Should -Match "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Property parameter should work" { + $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraContactMembership" + + $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraContactMembership" + + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 new file mode 100644 index 0000000000..5e3546a328 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "attributeSet" = "Engineering" + "usePreDefinedValuesOnly" = $True + "isCollection" = $False + "status" = "Available" + "isSearchable" = $True + "@odata.context" = 'https://graph.microsoft.com/v1.0/$metadata#directory/customSecurityAttributeDefinitions/$entity' + "name" = "Project" + "id" = "Engineering_Project" + "description" = "Target completion date (YYYY/MM/DD)" + "type" = "String" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraCustomSecurityAttributeDefinition" { + Context "Test for Get-EntraCustomSecurityAttributeDefinition" { + It "Should return specific group" { + $result = Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_Project' + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'Engineering_Project' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when ObjectId is empty" { + { Get-EntraCustomSecurityAttributeDefinition -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when ObjectId is invalid" { + { Get-EntraCustomSecurityAttributeDefinition -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + Get-EntraCustomSecurityAttributeDefinition -Id Engineering_Project | Out-Null + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Uri | Should -Match 'Engineering_Project' + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraCustomSecurityAttributeDefinition" + $result = Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_Project' + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraCustomSecurityAttributeDefinition" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_Project' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 new file mode 100644 index 0000000000..1ece0a2c29 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -0,0 +1,86 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { return @( + [PSCustomObject]@{ + Id = "Apline" + IsActive = $true + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraCustomSecurityAttributeDefinitionAllowedValue" { + Context "Test for Get-EntraCustomSecurityAttributeDefinitionAllowedValue" { + It "Should return specific Allowed Value" { + $result = Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'Apline' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when CustomSecurityAttributeDefinitionId is invalid" { + { Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'CustomSecurityAttributeDefinitionId' because it is an empty string." + } + It "Should fail when CustomSecurityAttributeDefinitionId is empty" { + { Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId } | Should -Throw "Missing an argument for parameter 'CustomSecurityAttributeDefinitionId'*" + } + It "Should fail when Id is invalid" { + { Get-EntraCustomSecurityAttributeDefinitionAllowedValue -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Get-EntraCustomSecurityAttributeDefinitionAllowedValue -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Filter is empty" { + { Get-EntraCustomSecurityAttributeDefinitionAllowedValue -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return specific Allowed Value by filter" { + $result = Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Filter "id eq 'Alpine'" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'Apline' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should contain params" { + Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' | Out-Null + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Uri | Should -Match 'Engineering_Project' + $Uri | Should -Match 'Apline' + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraCustomSecurityAttributeDefinitionAllowedValue" + $result = Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraCustomSecurityAttributeDefinitionAllowedValue" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..50c70c3e0d --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "AdditionalProperties" = @{DisplayName="Test-App";} + "DeletedDateTime" = "2/2/2024 5:33:56 AM" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraDeletedDirectoryObject"{ + It "Result should return DeletedDirectoryObject using alias" { + $result = Get-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should fail when DirectoryObjectId is empty" { + { Get-EntraDeletedDirectoryObject -DirectoryObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DirectoryObjectId'*" + } + It "Should fail when DirectoryObjectId is null" { + { Get-EntraDeletedDirectoryObject -DirectoryObjectId } | Should -Throw "Missing an argument for parameter 'DirectoryObjectId'*" + } + It "Should fail when invalid parameter is passed" { + { Get-EntraDeletedDirectoryObject -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'*" + } + It "Result should Contain ObjectId" { + $result = Get-EntraDeletedDirectoryObject -DirectoryObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain DirectoryObjectId in parameters when passed Id to it" { + $result = Get-EntraDeletedDirectoryObject -DirectoryObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.DirectoryObjectId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Property parameter should work" { + $result = Get-EntraDeletedDirectoryObject -DirectoryObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + {Get-EntraDeletedDirectoryObject -DirectoryObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedDirectoryObject" + $result = Get-EntraDeletedDirectoryObject -DirectoryObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedDirectoryObject" + Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDeletedDirectoryObject -DirectoryObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 new file mode 100644 index 0000000000..eb5b549810 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 @@ -0,0 +1,158 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-MgDevice with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "ComplianceExpirationDateTime" = $null + "AccountEnabled" = $true + "ApproximateLastSignInDateTime" = $null + "DeletedDateTime" = $null + "DeviceCategory" = $null + "DeviceId" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "DeviceMetadata" = "MetaData" + "DeviceOwnership" = $null + "DeviceVersion" = 2 + "DisplayName" = "Mock-Device" + "EnrollmentProfileName" = $null + "Extensions" = $null + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "IsCompliant" = $False + "IsManaged" = $True + "MdmAppId" = $null + "MemberOf" = $null + "OnPremisesLastSyncDateTime" = $null + "OnPremisesSecurityIdentifier" = $null + "OnPremisesSyncEnabled" = $false + "OperatingSystem" = "WINDOWS" + "OperatingSystemVersion" = "10.0.22621.1700" + "ProfileType" = $null + "RegisteredOwners" = $null + "RegisteredUsers" = $null + "RegistrationDateTime" = $null + "TransitiveMemberOf" = $null + "TrustType" = $null + "PhysicalIds" = @{} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraDevice" { + Context "Test for Get-EntraDevice" { + It "Should return specific device" { + $result = Get-EntraDevice -DeviceId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb') + + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific device with Alias" { + $result = Get-EntraDevice -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceId is invalid" { + { Get-EntraDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." + } + It "Should fail when DeviceId is empty" { + { Get-EntraDevice -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" + } + It "Should fail when searchstring is empty" { + { Get-EntraDevice -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Should fail when filter is empty" { + { Get-EntraDevice -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should fail when Top is empty" { + { Get-EntraDevice -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraDevice -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return all devices" { + $result = Get-EntraDevice -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraDevice -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + It "Should return specific device by searchstring" { + $result = Get-EntraDevice -SearchString 'Mock-Device' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-Device' + + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific device by filter" { + $result = Get-EntraDevice -Filter "DisplayName -eq 'Mock-Device'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-Device' + + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return top device" { + $result = Get-EntraDevice -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Property parameter should work" { + $result = Get-EntraDevice -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-Device' + + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDevice -Property DisplayName -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Result should Contain ObjectId" { + $result = Get-EntraDevice -DeviceId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain DeviceId in parameters when passed ObjectId to it" { + $result = Get-EntraDevice -DeviceId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.DeviceId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDevice" + $result = Get-EntraDevice -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDevice" + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDevice -SearchString 'Mock-Device' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 new file mode 100644 index 0000000000..cc1a882fd9 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 @@ -0,0 +1,146 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + value = @( + @{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "onPremisesImmutableId" = $null + "deletedDateTime" = $null + "onPremisesSyncEnabled" = $null + "OnPremisesLastSyncDateTime" = $null + "onPremisesProvisioningErrors" = @{} + "mobilePhone" = "425-555-0100" + "BusinessPhones" = @("425-555-0100") + "ExternalUserState" = $null + "ExternalUserStateChangeDateTime" = $null + "Parameters" = $args + } + ) + } + } + + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + + + +Describe "Get-EntraDeviceRegisteredOwner" { + Context "Test for Get-EntraDeviceRegisteredOwner" { + It "Should return specific device registered owner" { + $result = Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific device registered owner with alias" { + $result = Get-EntraDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceId is empty" { + { Get-EntraDeviceRegisteredOwner -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" + } + It "Should fail when DeviceId is invalid" { + { Get-EntraDeviceRegisteredOwner -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string.*" + } + It "Should return all device registered owner" { + $result = Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All is invalid" { + { Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top device registered owner" { + $result = Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when top is empty" { + { Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when top is invalid" { + { Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should contain Alias property" { + $result = Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.DeletionTimestamp | should -Be $null + $result.DirSyncEnabled | should -Be $null + $result.ImmutableId | should -Be $null + $result.LastDirSyncTime | should -Be $null + $result.Mobile | should -Be "425-555-0100" + $result.ProvisioningErrors | Should -BeNullOrEmpty + $result.TelephoneNumber | should -Be "425-555-0100" + $result.UserState | should -Be $null + $result.UserStateChangedOn | should -Be $null + + } + It "Should contain DeviceId in parameters when passed Name to it" { + + $result = Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $para= $params | ConvertTo-json | ConvertFrom-Json + $para.URI | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredOwner" + + $result = Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredOwner" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Property parameter should work" { + $result = Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property mobilePhone + $result | Should -Not -BeNullOrEmpty + $result.mobilePhone | Should -Be '425-555-0100' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } + +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 new file mode 100644 index 0000000000..e1841fd41e --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 @@ -0,0 +1,146 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + value = @( + @{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "onPremisesImmutableId" = $null + "deletedDateTime" = $null + "onPremisesSyncEnabled" = $null + "OnPremisesLastSyncDateTime" = $null + "onPremisesProvisioningErrors" = @{} + "mobilePhone" = "425-555-0100" + "BusinessPhones" = @("425-555-0100") + "ExternalUserState" = $null + "ExternalUserStateChangeDateTime" = $null + "Parameters" = $args + } + ) + } + } + + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + + + +Describe "Get-EntraDeviceRegisteredUser" { + Context "Test for Get-EntraDeviceRegisteredUser" { + It "Should return specific device registered User" { + $result = Get-EntraDeviceRegisteredUser -DeviceId "8542ebd1-3d49-4073-9dce-30f197c67755" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific device registered User with alias" { + $result = Get-EntraDeviceRegisteredUser -ObjectId "8542ebd1-3d49-4073-9dce-30f197c67755" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceId is empty" { + { Get-EntraDeviceRegisteredUser -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" + } + It "Should fail when DeviceId is invalid" { + { Get-EntraDeviceRegisteredUser -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string.*" + } + It "Should return all device registered owner" { + $result = Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return top device registered owner" { + $result = Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when top is empty" { + { Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when top is invalid" { + { Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should contain Alias property" { + $result = Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.DeletionTimestamp | should -Be $null + $result.DirSyncEnabled | should -Be $null + $result.ImmutableId | should -Be $null + $result.LastDirSyncTime | should -Be $null + $result.Mobile | should -Be "425-555-0100" + $result.ProvisioningErrors | Should -BeNullOrEmpty + $result.TelephoneNumber | should -Be "425-555-0100" + $result.UserState | should -Be $null + $result.UserStateChangedOn | should -Be $null + + } + It "Should contain DeviceId in parameters when passed Name to it" { + + $result = Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $Para= $params | ConvertTo-json | ConvertFrom-Json + $para.URI | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredUser" + + $result = Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $a= $params | ConvertTo-json | ConvertFrom-Json + $a.headers.'User-Agent' | Should -Be $userAgentHeaderValue + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredUser" + + $result = Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredUser" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should fail when Property is empty" { + { Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + + } + +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 new file mode 100644 index 0000000000..5546ee23a1 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @{ + configuration = [PSCustomObject]@{ + AccidentalDeletionPrevention = [PSCustomObject]@{ + AlertThreshold = 50 + SynchronizationPreventionType = @{SynchronizationPreventionType="Threshold";"Parameters" = $args} + } + } + } + } + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraDirSyncConfiguration" { + Context "Test for Get-EntraDirSyncConfiguration" { + It "Get irectory synchronization settings" { + $result = Get-EntraDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when TenantId is empty" { + { Get-EntraDirSyncConfiguration -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + + It "Should fail when TenantId is invalid" { + { Get-EntraDirSyncConfiguration -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'.*" + } + It "Should contain in OnPremisesDirectorySynchronizationId parameters when passed TenantId to it" { + $result = Get-EntraDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result.DeletionPreventionType.parameters + $params.OnPremisesDirectorySynchronizationId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncConfiguration" + + $result = Get-EntraDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncConfiguration" + + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeatures.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeatures.Tests.ps1 new file mode 100644 index 0000000000..0636ae1291 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeatures.Tests.ps1 @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Features" = @{ + "BlockCloudObjectTakeoverThroughHardMatchEnabled" = $false; + "BlockSoftMatchEnabled" = $false; + "BypassDirSyncOverridesEnabled" = $false; + "CloudPasswordPolicyForPasswordSyncedUsersEnabled" = $false; + "ConcurrentCredentialUpdateEnabled" = $false; + "ConcurrentOrgIdProvisioningEnabled" = $true; + "DeviceWritebackEnabled" = $false; + "DirectoryExtensionsEnabled" = $false; + "FopeConflictResolutionEnabled" = $false; + "GroupWriteBackEnabled" = $true; + "PasswordSyncEnabled" = $false; + "PasswordWritebackEnabled" = $false; + "QuarantineUponProxyAddressesConflictEnabled" = $true; + "QuarantineUponUpnConflictEnabled" = $true; + "SoftMatchOnUpnEnabled" = $true; + "SynchronizeUpnForManagedUsersEnabled" = $true; + "UnifiedGroupWritebackEnabled" = $true; + "UserForcePasswordChangeOnLogonEnabled" = $false; + "UserWritebackEnabled" = $false; + } + } + ) + } + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraDirSyncFeature" { + Context "Test for Get-EntraDirSyncFeature" { + It "Returns all the sync features" { + $result = Get-EntraDirSyncFeature + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Returns specific sync feature" { + $result = Get-EntraDirSyncFeature -Feature PasswordSync + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when TenantId is null" { + { Get-EntraDirSyncFeature -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is empty" { + { Get-EntraDirSyncFeature -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'*" + } + It "Should fail when invalid paramter is passed"{ + { Get-EntraDirSyncFeature -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncFeature" + $result = Get-EntraDirSyncFeature -Feature PasswordSync + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncFeature" + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirSyncFeature -Feature PasswordSync -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 new file mode 100644 index 0000000000..e1e229f724 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 @@ -0,0 +1,57 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraDirectoryObjectOnPremisesProvisioningError" { + Context "Test for Get-EntraDirectoryObjectOnPremisesProvisioningError" { + It "Should return empty object" { + $result = Get-EntraDirectoryObjectOnPremisesProvisioningError + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should return empty object when TenantId is passed" { + $result = Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId "0000aaaa-11bb-cccc-dd22-eeeeee333333" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when TenantId is null" { + { Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is empty" { + { Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'.*" + } + It "Should fail when invalid paramter is passed"{ + { Get-EntraDirectoryObjectOnPremisesProvisioningError -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryObjectOnPremisesProvisioningError" + Get-EntraDirectoryObjectOnPremisesProvisioningError + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryObjectOnPremisesProvisioningError" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirectoryObjectOnPremisesProvisioningError -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 new file mode 100644 index 0000000000..c9a2e8dfae --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraDirectoryRole with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "DeletedDateTime" = $null + "Description" = "Read custom security attribute keys and values for supported Microsoft Entra objects." + "DisplayName" = "Attribute Assignment Reader" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "RoleTemplateId" = "aaaaaaaa-1111-2222-3333-cccccccccccc" + "Members" = $null + "ScopedMembers" = $null + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgDirectoryRole -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + } + + Describe "Get-EntraDirectoryRole" { + Context "Test for Get-EntraDirectoryRole" { + It "Should return specific role" { + $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraDirectoryRole -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DirectoryRoleId is empty" { + { Get-EntraDirectoryRole -DirectoryRoleId "" } | Should -Throw "Cannot bind argument to parameter 'DirectoryRoleId' because it is an empty string." + } + It "Should return specific role by filter" { + $result = Get-EntraDirectoryRole -Filter "DisplayName -eq 'Attribute Assignment Reader'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Attribute Assignment Reader' + + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain DirectoryRoleId" { + $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain DirectoryRoleId in parameters when passed DirectoryRoleId to it" { + $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.DirectoryRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Property parameter should work" { + $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Attribute Assignment Reader' + + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRole" + $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRole" + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } + } + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..1fd5f92252 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleAssignment.Tests.ps1 @@ -0,0 +1,129 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AppScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope" + "AppScopeId" = $null + "Id" = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + "DirectoryScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" + "DirectoryScopeId" = "/0000aaaa-11bb-cccc-dd22-eeeeee333333" + "Condition" = $null + "Principal" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" + "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "RoleDefinition" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition" + "RoleDefinitionId" = "1b1b1b1b-2222-cccc-3333-4d4d4d4d4d4d" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleAssignments/$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraDirectoryRoleAssignment" { + Context "Test for Get-EntraDirectoryRoleAssignment" { + It "Should return specific role assignment" { + $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when Get-EntraDirectoryRoleAssignment is empty" { + { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" + } + It "Should fail when Get-EntraDirectoryRoleAssignment is invalid" { + { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleAssignmentId' because it is an empty string." + } + It "Should return all role assignments" { + $result = Get-EntraDirectoryRoleAssignment -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraDirectoryRoleAssignment -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top role assignment" { + $result = Get-EntraDirectoryRoleAssignment -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraDirectoryRoleAssignment -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraDirectoryRoleAssignment -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return specific application by filter" { + $result = Get-EntraDirectoryRoleAssignment -Filter "PrincipalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraDirectoryRoleAssignment -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Result should Contain ObjectId" { + $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result.ObjectId | should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + } + It "Should contain UnifiedRoleAssignmentId in parameters when passed Id to it" { + $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $params = Get-Parameters -data $result.Parameters + $params.UnifiedRoleAssignmentId | Should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + } + It "Property parameter should work" { + $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Property PrincipalId + $result | Should -Not -BeNullOrEmpty + $result.PrincipalId | Should -Be 'aaaaaaaa-bbbb-cccc-1111-222222222222' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleAssignment" + + Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleAssignment" + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..11ee775625 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleDefinition.Tests.ps1 @@ -0,0 +1,145 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "RolePermissions" = @{AllowedResourceActions="System.Object[]"; Condition=""; ExcludedResourceActions=""; AdditionalProperties=""} + "Description" = "Mock-App" + "DisplayName" = "Mock-App" + "Id" = "0000aaaa-11bb-cccc-dd22-eeeeee333333" + "InheritsPermissionsFrom" = {} + "IsBuiltIn" = $False + "IsEnabled" = $False + "ResourceScopes" = {/} + "TemplateId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "Version" = "2" + "RoleDefinitionId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions/$entity" + "inheritsPermissionsFrom@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions('54d418b2-4cc0-47ee-9b39-e8f84ed8e073')/inheritsPermissionsFrom" + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraDirectoryRoleDefinition" { + Context "Test for Get-EntraDirectoryRoleDefinition" { + It "Should return specificrole Defination" { + $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-App" + $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should return specificrole Defination With Alias" { + $result = Get-EntraDirectoryRoleDefinition -Id "0000aaaa-11bb-cccc-dd22-eeeeee333333" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-App" + $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when UnifiedRoleDefinitionId is empty" { + { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" + } + It "Should fail when UnifiedRoleDefinitionId is invalid" { + { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string." + } + It "Should return all role assignments" { + $result = Get-EntraDirectoryRoleDefinition -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraDirectoryRoleDefinition -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top role assignment" { + $result = Get-EntraDirectoryRoleDefinition -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraDirectoryRoleDefinition -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraDirectoryRoleDefinition -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return specific application by SearchString" { + $result = Get-EntraDirectoryRoleDefinition -SearchString 'Mock-App' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when String is empty" { + { Get-EntraDirectoryRoleDefinition -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Should return specific application by filter" { + $result = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq 'Mock-App'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraDirectoryRoleDefinition -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Result should Contain ObjectId" { + $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" + $result.ObjectId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraDirectoryRoleDefinition -SearchString 'Mock-App' + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "Mock-App" + } + It "Property parameter should work" { + $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleDefinition" + + Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleDefinition" + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 new file mode 100644 index 0000000000..9e7c6dd4b8 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @{ + value = @( + @{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "OnPremisesSyncEnabled" = $null + "OnPremisesLastSyncDateTime" = $null + "mobilePhone" = "425-555-0101" + "onPremisesProvisioningErrors" = @{} + "businessPhones" = @("425-555-0100") + "Parameters" = $args + } + ) + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + +} + +Describe "EntraDirectoryRoleMember" { + Context "Test for EntraDirectoryRoleMember" { + It "Should return specific directory rolemember" { + $result = (Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb") | ConvertTo-json | ConvertFrom-json + $result | Should -Not -BeNullOrEmpty + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific directory rolemember with alias" { + $result = (Get-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb") | ConvertTo-json | ConvertFrom-json + $result | Should -Not -BeNullOrEmpty + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DirectoryRoleId is empty" { + { Get-EntraDirectoryRoleMember -DirectoryRoleId } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'*" + } + It "Should fail when DirectoryRoleId is invalid" { + { Get-EntraDirectoryRoleMember -DirectoryRoleId "" } | Should -Throw "Cannot bind argument to parameter 'DirectoryRoleId' because it is an empty string.*" + } + It "Result should Contain Alias property" { + $result = Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.DirSyncEnabled | should -Be $null + $result.LastDirSyncTime | should -Be $null + $result.Mobile | should -Be "425-555-0101" + $result.ProvisioningErrors | Should -BeNullOrEmpty + $result.TelephoneNumber | should -Be "425-555-0100" + } + It "Should contain DirectoryRoleId in URI" { + $result = Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $Para= $params | ConvertTo-json | ConvertFrom-Json + $Para.URI | Should -match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Property parameter should work" { + $result = Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleMember" + + Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleMember" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 new file mode 100644 index 0000000000..f2653aceb4 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "DisplayName" = "Mock-App" + "DeletedDateTime" = $null + "Description" = "Can read mock-app service health information" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgDirectoryRoleTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraDirectoryRoleTemplate" { + Context "Test for Get-EntraDirectoryRoleTemplate" { + It "Should return all directory role template" { + $result = Get-EntraDirectoryRoleTemplate + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.DisplayName | should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should be fail when provide non supported parameter" { + { Get-EntraDirectoryRoleTemplate -Top 1} | should -Throw "A parameter cannot be found that matches parameter name 'Top'." + } + It "Property parameter should work" { + $result = Get-EntraDirectoryRoleTemplate -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDirectoryRoleTemplate -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleTemplate" + + Get-EntraDirectoryRoleTemplate + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleTemplate" + + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirectoryRoleTemplate -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 new file mode 100644 index 0000000000..4467d2ffde --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + +$scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "test.mail.onmicrosoft.com" + "State" = @{LastActionDateTime=""; Operation=""; Status=""; AdditionalProperties=""} + "AuthenticationType" = "Managed" + "IsAdminManaged" = $True + "IsDefault" = $False + "IsInitial" = $False + "IsRoot" = $False + "IsVerified" = $False + "Manufacturer" = $null + "Model" = $null + "PasswordNotificationWindowInDays" = $null + "PasswordValidityPeriodInDays" = $null + "ServiceConfigurationRecords" = $null + "SupportedServices" = {} + "VerificationDnsRecords" = $null + "AdditionalProperties" = {} + "Parameters" = $args + + } + ) + +} + + Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraDomain" { + Context "Test for Get-EntraDomain" { + It "Should return specific domain" { + $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'test.mail.onmicrosoft.com' + + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Name is empty" { + { Get-EntraDomain -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string." + } + It "Result should Contain ObjectId" { + $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" + $result.ObjectId | should -Be "test.mail.onmicrosoft.com" + + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain Name" { + $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" + $result.Name | should -Be "test.mail.onmicrosoft.com" + + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should contain DomainId in parameters when passed Name to it" { + $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" + $params = Get-Parameters -data $result.Parameters + $params.DomainId | Should -Be "test.mail.onmicrosoft.com" + } + It "Property parameter should work" { + $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" -Property AuthenticationType + $result | Should -Not -BeNullOrEmpty + $result.AuthenticationType | Should -Be 'Managed' + + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + {Get-EntraDomain -Name "test.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomain" + + Get-EntraDomain -Name "test.mail.onmicrosoft.com" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomain" + + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + {Get-EntraDomain -Name "test.mail.onmicrosoft.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 new file mode 100644 index 0000000000..b96973a169 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "ActiveSignInUri" = "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" + "DisplayName" = "Contoso" + "FederatedIdpMfaBehavior" = "rejectMfaByFederatedIdp" + "Id" = "2a8ce608-bb34-473f-9e0f-f373ee4cbc5a" + "IsSignedAuthenticationRequestRequired" = "" + "IssuerUri" = "http://contoso.com/adfs/services/trust/" + "MetadataExchangeUri" = "https://sts.contoso.com/adfs/services/trust/mex" + "NextSigningCertificate" = "MIIC3jCCAcagAwIBAgIQEt0T0G5GPZ9" + "PassiveSignInUri" = "https://sts.contoso.com/adfs/ls/" + "PreferredAuthenticationProtocol" = "wsFed" + "PromptLoginBehavior" = "" + "SignOutUri" = "https://sts.deverett.info/adfs/ls/" + "SigningCertificate" = "MIIC3jCCAcagAwIBAgIQFsO0R8deG4h" + "SigningCertificateUpdateStatus" = @{ + "CertificateUpdateResult" = "success"; + } + } + ) + } + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraDomainFederationSettings" { + Context "Test for Get-EntraDomainFederationSettings" { + It "Should return federation settings" { + $result = Get-EntraDomainFederationSettings -DomainName "test.com" + $result | Should -Not -BeNullOrEmpty + $result.FederationBrandName | Should -Be "Contoso" + $result.ActiveLogOnUri | Should -Be "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when TenantId is null" { + { Get-EntraDomainFederationSettings -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is empty" { + { Get-EntraDomainFederationSettings -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'.*" + } + It "Should fail when DomainName is null" { + { Get-EntraDomainFederationSettings -DomainName } | Should -Throw "Missing an argument for parameter 'DomainName'*" + } + It "Should fail when DomainName is empty" { + { Get-EntraDomainFederationSettings -DomainName "" } | Should -Throw "Cannot bind argument to parameter 'DomainName'*" + } + It "Should fail when invalid paramter is passed"{ + { Get-EntraDomainFederationSettings -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainFederationSettings" + $result = Get-EntraDomainFederationSettings -DomainName "test.com" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainFederationSettings" + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDomainFederationSettings -DomainName "test.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 new file mode 100644 index 0000000000..f503703a02 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 @@ -0,0 +1,111 @@ + +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + value = @( + @{ + "Id" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + "onPremisesImmutableId" = $null + "deletedDateTime" = $null + "onPremisesSyncEnabled" = $null + "mobilePhone" = "425-555-0101" + "onPremisesProvisioningErrors" = @{} + "businessPhones" = @("425-555-0100") + "externalUserState" = $null + "externalUserStateChangeDate" = $null + "Parameters" = $args + } + ) + } + } + + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + + + +Describe "Get-EntraDomainNameReference" { + Context "Test for Get-EntraDomainNameReference" { + It "Should return specific domain Name Reference" { + $result = Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '22cc22cc-dd33-ee44-ff55-66aa66aa66aa' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Name is empty" { + { Get-EntraDomainNameReference -Name } | Should -Throw "Missing an argument for parameter 'Name'*" + } + It "Should fail when Name is invalid" { + { Get-EntraDomainNameReference -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string.*" + } + It "Result should Contain Alias property" { + $result = Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" + $result.ObjectId | should -Be "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + $result.DeletionTimestamp | should -Be $null + $result.DirSyncEnabled | should -Be $null + $result.ImmutableId | should -Be $null + $result.Mobile | should -Be "425-555-0101" + $result.ProvisioningErrors | Should -BeNullOrEmpty + $result.TelephoneNumber | should -Be "425-555-0100" + $result.UserState | should -Be $null + $result.UserStateChangedOn | should -Be $null + + } + It "Should contain DomainId in parameters when passed Name to it" { + + $result = Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" + $params = Get-Parameters -data $result.Parameters + $para= $params | ConvertTo-json | ConvertFrom-Json + $para.Uri -match "M365x99297270.mail.onmicrosoft.com" | Should -BeTrue + } + It "Property parameter should work" { + $result = Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be '22cc22cc-dd33-ee44-ff55-66aa66aa66aa' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainNameReference" + + Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainNameReference" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + + } + +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 new file mode 100644 index 0000000000..d0aa101fff --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + +$scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "0000aaaa-11bb-cccc-dd22-eeeeee333333" + "Label" = "test.mail.onmicrosoft.com" + "IsOptional" = $False + "RecordType" = "Mx" + "SupportedService" = "Email" + "Ttl" = "3600" + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.domainDnsMxRecord" + "mailExchange" = "test-mail-onmicrosoft-com.mail.protection.outlook.com" + } + "Parameters" = $args + + } + ) + +} + + Mock -CommandName Get-MgDomainServiceConfigurationRecord -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Get-EntraDomainServiceConfigurationRecord" { + Context "Test for Get-EntraDomainServiceConfigurationRecord" { + It "Should return specific domain confuguration record" { + $result = Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '0000aaaa-11bb-cccc-dd22-eeeeee333333' + + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + + } + It "Should fail when Name is empty" { + { Get-EntraDomainServiceConfigurationRecord -Name } | Should -Throw "Missing an argument for parameter 'Name'*" + } + It "Should fail when Name is invalid" { + { Get-EntraDomainServiceConfigurationRecord -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string." + } + It "Result should Contain DnsRecordId" { + $result = Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" + $result.DnsRecordId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Result should Contain ObjectId" { + $result = Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" + $result.ObjectId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should contain DomainId in parameters when passed Name to it" { + $result = Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" + $params = Get-Parameters -data $result.Parameters + $params.DomainId | Should -Be "test.mail.onmicrosoft.com" + } + It "Property parameter should work" { + $result = Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" -Property RecordType + $result | Should -Not -BeNullOrEmpty + $result.RecordType | Should -Be 'Mx' + + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + {Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainServiceConfigurationRecord" + + Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainServiceConfigurationRecord" + + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + {Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 new file mode 100644 index 0000000000..f009b71538 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 @@ -0,0 +1,104 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + +$scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "0000aaaa-11bb-cccc-dd22-eeeeee333333" + "Label" = "test.mail.onmicrosoft.com" + "IsOptional" = $False + "RecordType" = "Txt" + "SupportedService" = "Email" + "Ttl" = "3600" + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.domainDnsTxtRecord" + "text" = "MS=ms75528557" + } + "Parameters" = $args + + } + ) + +} + + Mock -CommandName Get-MgDomainVerificationDnsRecord -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraDomainVerificationDnsRecord" { + Context "Test for Get-EntraDomainVerificationDnsRecord" { + It "Should return specific domain verification Dns record" { + $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '0000aaaa-11bb-cccc-dd22-eeeeee333333' + + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 + + } + It "Should fail when Name is empty" { + { Get-EntraDomainVerificationDnsRecord -Name } | Should -Throw "Missing an argument for parameter 'Name'*" + } + It "Should fail when Name is invalid" { + { Get-EntraDomainVerificationDnsRecord -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string." + } + It "Result should Contain DnsRecordId" { + $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" + $result.DnsRecordId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ObjectId" { + $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" + $result.ObjectId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should contain DomainId in parameters when passed Name to it" { + $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" + $params = Get-Parameters -data $result.Parameters + $params.DomainId | Should -Be "test.mail.onmicrosoft.com" + } + It "Property parameter should work" { + $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" -Property RecordType + $result | Should -Not -BeNullOrEmpty + $result.RecordType | Should -Be 'Txt' + + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainVerificationDnsRecord" + + Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainVerificationDnsRecord" + + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 new file mode 100644 index 0000000000..624c27135b --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "ActiveSignInUri" = "https://sts.anmaji.myworkspace.microsoft.com/adfs/services/trust/2005/usernamemixed" + "DisplayName" = "ADFS HYPER-V LAB" + "IssuerUri" = "http://anmaji.myworkspace.microsoft.com/adfs/services/trust/" + "MetadataExchangeUri" = "https://sts.anmaji.myworkspace.microsoft.com/adfs/services/trust/mex" + "PassiveSignInUri" = "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" + "SignOutUri" = "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraFederationProperty" { + Context "Test for Get-EntraFederationProperty" { + It "Should return the empty object" { + $result = Get-EntraFederationProperty -DomainName "anmaji.myworkspace.contoso.com" + $result | Should -Not -BeNullOrEmpty + $result.ActiveSignInUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/services/trust/2005/usernamemixed" + $result.DisplayName | Should -Be "ADFS HYPER-V LAB" + $result.IssuerUri | Should -Be "http://anmaji.myworkspace.microsoft.com/adfs/services/trust/" + $result.MetadataExchangeUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/services/trust/mex" + $result.PassiveSignInUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" + $result.SignOutUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" + + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DomainName is empty" { + {Get-EntraFederationProperty -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" + } + + It "Should fail when DomainName is invalid" { + {Get-EntraFederationProperty -DomainName ""} | Should -Throw "Cannot bind argument to parameter 'DomainName' because it is an empty string.*" + } + + It "Should contain DomainId in parameters when DomainName to it" { + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra + $result = Get-EntraFederationProperty -DomainName "anmaji.myworkspace.contoso.com" + $params = Get-Parameters -data $result + $params.DomainId | Should -Be "anmaji.myworkspace.contoso.com" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraFederationProperty" + + $result = Get-EntraFederationProperty -DomainName "anmaji.myworkspace.contoso.com" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraFederationProperty" + + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraFederationProperty -DomainName "anmaji.myworkspace.microsoft.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 new file mode 100644 index 0000000000..6ad007cbd9 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @{ + value = @( + @{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "OnPremisesSyncEnabled" = $null + "userPrincipalName" = "Adams@M365x99297270.OnMicrosoft.com" + "accountEnabled" = $true + "usageLocation" = "DE" + "displayName" = "Mock-App" + "userType" = "User" + "OnPremisesLastSyncDateTime" = $null + "onPremisesProvisioningErrors" = @{} + "Parameters" = $args + } + ) + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + +} + + +Describe "Get-EntraObjectByObjectId" { + Context "Test for Get-EntraObjectByObjectId" { + It "Should return specific object by objectId" { + $result = Get-EntraObjectByObjectId -ObjectId '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.displayName | should -Be 'Mock-App' + $result.userType | should -Be 'User' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when ObjectId is empty" { + { Get-EntraObjectByObjectId -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectIds'*" + } + It "Should fail when ObjectId is invalid" { + { Get-EntraObjectByObjectId -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectIds' because it is an empty string*" + } + It "Should return specific object by objectId and Types" { + $result = Get-EntraObjectByObjectId -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Types "User" + $result | Should -Not -BeNullOrEmpty + $result.userType | should -Be 'User' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when ObjectId is empty" { + { Get-EntraObjectByObjectId -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Types } | Should -Throw "Missing an argument for parameter 'Types'*" + } + It "Should contain Ids in parameters when passed Id to it" { + $result = Get-EntraObjectByObjectId -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result.Parameters + $para= $params | ConvertTo-json | ConvertFrom-Json + $para.Body.Ids | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Property parameter should work" { + $result = Get-EntraObjectByObjectId -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property displayName + $result | Should -Not -BeNullOrEmpty + $result.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraObjectByObjectId -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraObjectByObjectId" + + $result = Get-EntraObjectByObjectId -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraObjectByObjectId" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraObjectByObjectId -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } + +} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 new file mode 100644 index 0000000000..04f9ce610b --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "contoso.com" + "IsAdminManaged" ="True" + "PasswordNotificationWindowInDays" = @{PasswordNotificationWindowInDays="14"; "Parameters" = $args} + "PasswordValidityPeriodInDays" = "2147483647" + } + ) + } + Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraPasswordPolicy" { + Context "Test for Get-EntraPasswordPolicy" { + It "Should gets the current password policy for a tenant or a domain." { + $result = Get-EntraPasswordPolicy -DomainName "contoso.com" + $result | Should -Not -BeNullOrEmpty + $result.NotificationDays.PasswordNotificationWindowInDays | Should -Be "14" + $result.ValidityPeriod | Should -Be "2147483647" + + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when DomainName is empty" { + {Get-EntraPasswordPolicy -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" + } + + It "Should fail when DomainName is invalid" { + {Get-EntraPasswordPolicy -DomainName ""} | Should -Throw "Cannot bind argument to parameter 'DomainName' because it is an empty string.*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPasswordPolicy" + + $result = Get-EntraPasswordPolicy -DomainName "contoso.com" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPasswordPolicy" + + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraPasswordPolicy -DomainName "contoso.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 new file mode 100644 index 0000000000..20066df554 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 @@ -0,0 +1,86 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $userObjId = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $roleObjId = "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + $unitObjId = "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" + $scopedRoleMembershipId = "scopedRoleMemId" + + $scriptblock = { + @{ + "id" = $scopedRoleMembershipId + "roleId"= $roleObjId + "administrativeUnitId"= $unitObjId + "roleMemberInfo"= @( + @{ + "id"= $userObjId + "displayName"= "displayName-value" + "userPrincipalName"= "userPrincipalName-value" + } + ) + "Parameters" = $args + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Tests for Get-EntraScopedRoleMembership"{ + It "Result should not be empty"{ + $result = Get-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -ScopedRoleMembershipId $scopedRoleMembershipId + $result | Should -Not -BeNullOrEmpty + $result.ObjectId | should -Be $scopedRoleMembershipId + $result.AdministrativeUnitObjectId | should -Be $unitObjId + $result.RoleObjectId | should -Be $roleObjId + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should not be empty with ObjectId"{ + $result = Get-EntraScopedRoleMembership -ObjectId $unitObjId -ScopedRoleMembershipId $scopedRoleMembershipId + $result | Should -Not -BeNullOrEmpty + $result.ObjectId | should -Be $scopedRoleMembershipId + $result.AdministrativeUnitObjectId | should -Be $unitObjId + $result.RoleObjectId | should -Be $roleObjId + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is invalid" { + { Get-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is empty" { + { Get-EntraScopedRoleMembership -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when ScopedRoleMembershipId is empty" { + { Get-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -ScopedRoleMembershipId } | Should -Throw "Missing an argument for parameter 'ScopedRoleMembershipId'*" + } + It "Should fail when invalid parameter is passed" { + { Get-EntraScopedRoleMembership -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraScopedRoleMembership" + $result = Get-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -ScopedRoleMembershipId $scopedRoleMembershipId + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraScopedRoleMembership" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -ScopedRoleMembershipId $scopedRoleMembershipId -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 new file mode 100644 index 0000000000..b0d7bb95b7 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + +$scriptblock = { + return @( + [PSCustomObject]@{ + "PrepaidUnits" = @{Enabled="20"; LockedOut=""; Suspended=0; Warning=""; AdditionalProperties=""} + "AccountId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AccountName" = "M365x99297270" + "AppliesTo" = "User" + "CapabilityStatus" = "Enabled" + "ConsumedUnits" = "20" + "Id" = "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + "ServicePlans" = {"M365_AUDIT_PLATFORM", "EXCHANGE_S_FOUNDATION", "ATA", "ADALLOM_S_STANDALONE"} + "SkuId" = "11112222-bbbb-3333-cccc-4444dddd5555" + "SkuPartNumber" = "EMSPREMIUM" + "SubscriptionIds" = {"aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"} + "Parameters" = $args + + } + ) + +} + + Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + + +Describe "Get-EntraSubscribedSku" { + Context "Test for Get-EntraSubscribedSku" { + It "Should return specific SubscribedSku" { + $result = Get-EntraSubscribedSku -SubscribedSkuId "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific SubscribedSku with alias" { + $result = Get-EntraSubscribedSku -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when SubscribedSkuId empty" { + { Get-EntraSubscribedSku -SubscribedSkuId } | Should -Throw "Missing an argument for parameter 'SubscribedSkuId'*" + } + It "Should fail when SubscribedSkuId invalid" { + { Get-EntraSubscribedSku -SubscribedSkuId "" } | Should -Throw "Cannot bind argument to parameter 'SubscribedSkuId' because it is an empty string." + } + It "Should return all SubscribedSku" { + $result = Get-EntraSubscribedSku + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Property parameter should work" { + $result = Get-EntraSubscribedSku -Property AppliesTo + $result | Should -Not -BeNullOrEmpty + $result.AppliesTo | Should -Be 'User' + + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraSubscribedSku -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraSubscribedSku" + + Get-EntraSubscribedSku + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraSubscribedSku" + + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraSubscribedSku -SubscribedSkuId "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 new file mode 100644 index 0000000000..6dfe7a8768 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + +$scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "OnPremisesLastSyncDateTime" = $null + "OnPremisesSyncEnabled" = $null + "BusinessPhones" = {"425-555-0100"} + "City" = "Luchthaven Schiphol" + "DisplayName" = "Mock App" + "MarketingNotificationEmails" = {"mary@contoso.com", "john@contoso.com"} + "State" = "Noord-Holland" + "Street" = "Evert van de Beekstraat 354" + "TechnicalNotificationMails" = {"peter@contoso.com"} + "TenantType" = "AAD" + "AssignedPlans" = @{AssignedDateTime="04-12-2023 16:50:27"; CapabilityStatus="Enabled"; Service="MixedRealityCollaborationServices"; ServicePlanId="dcf9d2f4-772e-4434-b757-77a453cfbc02"; + AdditionalProperties=""} + "ProvisionedPlans" = @{CapabilityStatus="Enabled"; ProvisioningStatus="Success"; Service="exchange"; AdditionalProperties=""} + "VerifiedDomains" = @{Capabilities="Email"; IsDefault="False"; IsInitial="True"; Name="M365x99297270.onmicrosoft.com"; Type="Managed"; AdditionalProperties=""} + "PrivacyProfile" = @{ContactEmail="alice@contoso.com"; StatementUrl="https://contoso.com/privacyStatement"; AdditionalProperties=""} + "Parameters" = $args + + } + ) + +} + + Mock -CommandName Get-MgOrganization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + + +Describe "Get-EntraTenantDetail" { + Context "Test for Get-EntraTenantDetail" { + It "Should return all Tenant Detail" { + $result = Get-EntraTenantDetail -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraTenantDetail -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top Tenant Detail" { + $result = Get-EntraTenantDetail -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraTenantDetail -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraTenantDetail -Top "xyz" } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Property parameter should work" { + $result = Get-EntraTenantDetail -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock App' + + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraTenantDetail -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTenantDetail" + + Get-EntraTenantDetail + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTenantDetail" + + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraTenantDetail -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraUserDirectReport.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraUserDirectReport.Tests.ps1 new file mode 100644 index 0000000000..0643919d87 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Get-EntraUserDirectReport.Tests.ps1 @@ -0,0 +1,140 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + value = @( + @{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "DisplayName" = "Mock-User" + "OnPremisesImmutableId" = $null + "DeletedDateTime" = $null + "OnPremisesSyncEnabled" = $null + "OnPremisesLastSyncDateTime" = $null + "OnPremisesProvisioningErrors" = @{} + "MobilePhone" = "425-555-0100" + "BusinessPhones" = @("425-555-0100") + "ExternalUserState" = $null + "ExternalUserStateChangeDateTime" = $null + "Parameters" = $args + } + ) + } + } + + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + + + +Describe "Get-EntraUserDirectReport" { + Context "Test for Get-EntraUserDirectReport" { + It "Should return specific user direct report" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific user direct report with alias" { + $result = Get-EntraUserDirectReport -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when UserId is empty" { + { Get-EntraUserDirectReport -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + It "Should fail when UserId is invalid" { + { Get-EntraUserDirectReport -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string.*" + } + It "Should return all user direct reports" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 user direct report" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when top is empty" { + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when top is invalid" { + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Property parameter should work" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-User" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Result should contain Properties" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DeletionTimestamp | Should -Be $null + $result.DirSyncEnabled | Should -Be $null + $result.ImmutableId | Should -Be $null + $result.LastDirSyncTime | Should -Be $null + $result.Mobile | Should -Be "425-555-0100" + $result.ProvisioningErrors | Should -BeNullOrEmpty + $result.TelephoneNumber | Should -Be "425-555-0100" + $result.UserState | Should -Be $null + $result.UserStateChangedOn | Should -Be $null + + } + It "Should contain UserId in parameters when passed UserId to it" { + + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $para= $params | ConvertTo-json | ConvertFrom-Json + $para.URI | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserDirectReport" + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserDirectReport" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } + +} + diff --git a/testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 new file mode 100644 index 0000000000..6d5381a100 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 @@ -0,0 +1,105 @@ +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra +} + +Describe "Invalid Tests"{ + It "Should fail when parameters are invalid"{ + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object{ + $command = Get-Command $_ + { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." + } + } + It "Should fail with 'TenantId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ + $commandScriptBlock = [scriptblock]::Create("$command -TenantId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'TenantId'.*" + } + } + } + It "Should fail with 'Id' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Id'){ + $commandScriptBlock = [scriptblock]::Create("$command -Id $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + } + } + It "Should fail with 'ObjectId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ + $commandScriptBlock = [scriptblock]::Create("$command -ObjectId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'ObjectId'.*" + } + } + } + It "Should fail with 'All' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'All'){ + $commandScriptBlock = [scriptblock]::Create("$command -All `$True") + if('Find-EntraPermission' -eq $command){ + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'*" + } + else { + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + } + } + } + It "Should fail with 'Top' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Top'){ + $commandScriptBlock = [scriptblock]::Create("$command -Top ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Top'*" + } + } + } + It "Should fail with 'Filter' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ + $commandScriptBlock = [scriptblock]::Create("$command -Filter ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + } + } + It "Should fail with 'SearchString' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ + $commandScriptBlock = [scriptblock]::Create("$command -SearchString ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + } + } + It "Should fail with exception when no parameter is passed" { + $cmdlets = @( + @{ CmdletName = 'Enable-EntraDirectoryRole'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + @{ CmdletName = 'New-EntraConditionalAccessPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraNamedLocationPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraPermissionGrantPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + ) + $cmdlets | ForEach-Object { + $commandName = $_.CmdletName + $Exception = $_.Exception + $commandScriptBlock = [scriptblock]::Create("$commandName -ErrorAction Stop") + try { + Invoke-Command -ScriptBlock $commandScriptBlock + } + catch { $_ -match $Exception | Should -BeTrue } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/DirectoryManagement/Module.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Module.Tests.ps1 new file mode 100644 index 0000000000..cc40ad720b --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Module.Tests.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Entra Module" { + Context "On module import" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + } + + It "Should have exported commands" { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo | Should -Not -BeNullOrEmpty + $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 + + } + + It 'Should be compatible with PS core and desktop' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } + + It 'Should point to script module' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + } + + It 'Should lock GUID' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" + } + + It "Module import should not write to error and information streams" { + $ps = [powershell]::Create() + $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + "Checking Information stream" | Out-Host + $ps.Streams.Information.Count | Should -Be 0 + "Checking Error stream" | Out-Host + $ps.Streams.Error.Count | Should -Be 0 + "Checking Verbose stream" | Out-Host + $ps.Streams.Verbose.Count | Should -Be 0 + "Checking Debug stream" | Out-Host + $ps.Streams.Warning.Count | Should -Be 0 + "Checking Progress stream" | Out-Host + $ps.Streams.Progress.Count | Should -Be 0 + + $ps.Dispose() + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 new file mode 100644 index 0000000000..decb8e2315 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + @{ + "deletedDateTime" = $null + "visibility" = $null + "displayName" = "DummyName" + "id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "@odata.context" = " https://graph.microsoft.com/v1.0/`$metadata#directory/administrativeUnits/`$entity" + "membershipType" = $null + "description" = $null + "membershipRuleProcessingState" = $null + "Parameters" = $args + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Tests for New-EntraAdministrativeUnit"{ + It "Result should not be empty"{ + $result = New-EntraAdministrativeUnit -DisplayName "DummyName" + $result | Should -Not -BeNullOrEmpty + $result.id | should -Be @('aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb') + $result.displayName | Should -Be "DummyName" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DisplayName is empty" { + { New-EntraAdministrativeUnit -DisplayName "" } | Should -Throw "Cannot bind argument to parameter 'DisplayName'*" + } + It "Should fail when DisplayName is null" { + { New-EntraAdministrativeUnit -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when invalid parameter is passed" { + { New-EntraAdministrativeUnit -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraAdministrativeUnit" + $result = New-EntraAdministrativeUnit -DisplayName "DummyName" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraAdministrativeUnit" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraAdministrativeUnit -DisplayName "DummyName" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 new file mode 100644 index 0000000000..6b08b9c40f --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [Microsoft.Graph.PowerShell.Models.MicrosoftGraphAttributeSet]@{ + "Description" = "CustomAttributeSet" + "Id" = "NewCustomAttributeSet" + "MaxAttributesPerSet" = 125 + "@odata.context" = 'https://graph.microsoft.com/v1.0/$metadata#directory/attributeSets/$entity' + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "New-EntraAttributeSet" { + Context "Test for New-EntraAttributeSet" { + It "Should return created AttributeSet" { + $result = New-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "NewCustomAttributeSet" + $result.MaxAttributesPerSet | should -Be 125 + $result.Description | should -Be "CustomAttributeSet" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should return created AttributeSet with alias" { + $result = New-EntraAttributeSet -Id "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "NewCustomAttributeSet" + $result.MaxAttributesPerSet | should -Be 125 + $result.Description | should -Be "CustomAttributeSet" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when AttributeSetId parameter is invalid" { + { New-EntraAttributeSet -AttributeSetId } | Should -Throw "Missing an argument for parameter 'AttributeSetId*" + } + It "Should fail when Description parameter is empty" { + { New-EntraAttributeSet -Description } | Should -Throw "Missing an argument for parameter 'Description*" + } + It "Should fail when MaxAttributesPerSet parameter is empty" { + { New-EntraAttributeSet -MaxAttributesPerSet } | Should -Throw "Missing an argument for parameter 'MaxAttributesPerSet*" + } + It "Should fail when MaxAttributesPerSet parameter is invalid" { + { New-EntraAttributeSet -MaxAttributesPerSet "a"} | Should -Throw "Cannot process argument transformation on parameter 'MaxAttributesPerSet'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraAttributeSet" + + New-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 | Out-Null + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { + New-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 -Debug + } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 new file mode 100644 index 0000000000..aef4120477 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { return @( + [PSCustomObject]@{ + "@odata.context" = '"https://graph.microsoft.com/v1.0/$metadata#directory/customSecurityAttributeDefinitions/$entity"' + "attributeSet" = "Engineering" + "description" = "Active projects for user" + "id" = "Engineering_Project1234" + "isCollection" = $true + "isSearchable"= $true + "name" = "Project1234" + "status" = "Available" + "type" = "String" + "usePreDefinedValuesOnly" = $true + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "New-EntraCustomSecurityAttributeDefinition" { + Context "Test for New-EntraCustomSecurityAttributeDefinition" { + It "Should add new custom Security Attribute Definitions" { + $result = New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "Engineering_Project1234" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when attributeSet is empty" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'attributeSet'.*" + } + It "Should fail when attributeSet is invalid" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status = "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'attributeSet'*" + } + It "Should fail when isCollection is empty" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection -isSearchable = $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'isCollection'.*" + } + It "Should fail when isCollection is invalid" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection "" -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Cannot process argument transformation on parameter 'isCollection'*" + } + It "Should fail when isSearchable is empty" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'isSearchable'.*" + } + It "Should fail when isSearchable is invalid" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable = "" -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Cannot process argument transformation on parameter 'isSearchable'*" + } + + It "Should fail when name is empty" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name -status "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'name'.*" + } + It "Should fail when name is invalid" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "" -status "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'name'*" + } + It "Should fail when status is empty" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'status'.*" + } + It "Should fail when status is invalid" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'status'*" + } + It "Should fail when type is empty" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type -usePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'type'.*" + } + It "Should fail when type is invalid" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "" -usePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'type'*" + } + It "Should fail when usePreDefinedValuesOnly is empty" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly } | Should -Throw "Missing an argument for parameter 'usePreDefinedValuesOnly'.*" + } + It "Should fail when usePreDefinedValuesOnly is invalid" { + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly "" } | Should -Throw "Cannot process argument transformation on parameter 'usePreDefinedValuesOnly'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraCustomSecurityAttributeDefinition" + $result = New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraCustomSecurityAttributeDefinition" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..541948b95e --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleAssignment.Tests.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AppScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope" + "AppScopeId" = $null + "Id" = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + "DirectoryScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" + "DirectoryScopeId" = "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "Condition" = $null + "Principal" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" + "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "RoleDefinition" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition" + "RoleDefinitionId" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleAssignments/$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "New-EntraDirectoryRoleAssignment" { +Context "Test for New-EntraDirectoryRoleAssignment" { + It "Should return created Ms role assignment" { + $result = New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "54d418b2-4cc0-47ee-9b39-e8f84ed8e073" -DirectoryScopeId "/54d418b2-4cc0-47ee-9b39-e8f84ed8e073" + $result | Should -Not -BeNullOrEmpty + $result.PrincipalId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.RoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.DirectoryScopeId | Should -Be "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when PrincipalId is empty" { + { New-EntraDirectoryRoleAssignment -PrincipalId -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Missing an argument for parameter 'PrincipalId'*" + } + It "Should fail when PrincipalId is invalid" { + { New-EntraDirectoryRoleAssignment -PrincipalId "" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Cannot bind argument to parameter 'PrincipalId' because it is an empty string." + } + It "Should fail when RoleDefinitionId is empty" { + { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Missing an argument for parameter 'RoleDefinitionId'*" + } + It "Should fail when RoleDefinitionId is invalid" { + { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Cannot bind argument to parameter 'RoleDefinitionId' because it is an empty string." + } + It "Should fail when DirectoryScopeId is empty" { + { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId } | Should -Throw "Missing an argument for parameter 'DirectoryScopeId'*" + } + It "Result should Contain ObjectId" { + $result = New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ObjectId | should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleAssignment" + + New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleAssignment" + + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..dccea60aca --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleDefinition.Tests.ps1 @@ -0,0 +1,130 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "RolePermissions" = {"Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRolePermission"} + "Description" = "Mock-App" + "DisplayName" = "Mock-App" + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "InheritsPermissionsFrom" = {} + "IsBuiltIn" = $False + "IsEnabled" = $False + "ResourceScopes" = {/} + "TemplateId" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + "Version" = "2" + "RoleDefinitionId" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions/$entity" + } + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "New-EntraDirectoryRoleDefinition" { + Context "Test for New-EntraDirectoryRoleDefinition" { + It "Should return specific Ms role Defination" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "4dd5aa9c-cf4d-4895-a993-740d342802b1" -Version 2 + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-App" + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.IsEnabled | Should -Be $False + $result.TemplateId | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result.Version | Should -Be 2 + + + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when RolePermissions is empty" { + {New-EntraDirectoryRoleDefinition -RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'RolePermissions'*" + } + It "Should fail when IsEnabled is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'IsEnabled'*" + } + It "Should fail when IsEnabled is invalid" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled xy -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Cannot process argument transformation on parameter 'IsEnabled'*" + } + It "Should fail when DisplayName is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when DisplayName is invalid" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName "" -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." + } + It "Should fail when ResourceScopes is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'ResourceScopes'*" + } + It "Should fail when Description is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when TemplateId is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId -Version 2} | Should -Throw "Missing an argument for parameter 'TemplateId'*" + } + It "Should fail when Version is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff"-Version } | Should -Throw "Missing an argument for parameter 'Version'*" + } + It "Result should Contain ObjectId" { + $result = $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleDefinition" + + $result = $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleDefinition" + + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 new file mode 100644 index 0000000000..526f492be0 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AvailabilityStatus" = $null + "IsAdminManaged" = "True" + "IsDefault" = "False" + "IsInitial" = "False" + "IsRoot" = "False" + "IsVerified" = "False" + "Id" = "lala.uk" + "Manufacturer" = $null + "Model" = $null + "PasswordNotificationWindowInDays" = $null + "PasswordValidityPeriodInDays" = $null + "ServiceConfigurationRecords" = $null + "SupportedServices" = @("Email", "OfficeCommunicationsOnline") + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#domains/$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgDomain -MockWith $scriptBlock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraDomain" { + Context "Test for New-EntraDomain" { + It "Create a new Domain" { + $result = New-EntraDomain -Name "lala.uk" + $result.ObjectId | should -Be "lala.uk" + $result.Name | should -Be "lala.uk" + + Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Create a new Domain with a list of domain capabilities" { + $result = New-EntraDomain -Name "lala.uk" -SupportedServices @("Email", "OfficeCommunicationsOnline") + $result.ObjectId | should -Be "lala.uk" + $result.Name | should -Be "lala.uk" + $result.SupportedServices | should -Not -BeNullOrEmpty + } + + It "Create a new Domain and make if the default new user creation" { + $result = New-EntraDomain -Name "lala.uk" -IsDefault $false + $result.IsDefault | should -Be "False" + } + + It "Should fail when parameters are empty" { + { New-EntraDomain -Name -IsDefault -IsDefaultForCloudRedirections -SupportedServices} | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when Name parameters are invalid" { + { New-EntraDomain -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string." + } + + It "Should fail when IsDefault parameters are invalid" { + { New-EntraDomain -Name "lala.uk" -IsDefault FD } | Should -Throw "Cannot process argument transformation on parameter 'IsDefault'*" + } + + It "Should fail when IsDefaultForCloudRedirections parameters are invalid" { + { New-EntraDomain -Name "lala.uk" -IsDefaultForCloudRedirections GH } | Should -Throw "Cannot process argument transformation on parameter 'IsDefaultForCloudRedirections'*" + } + + It "Should fail when SupportedServices parameters are invalid" { + { New-EntraDomain -Name "lala.uk" -SupportedServices $true } | Should -Throw "Cannot process argument transformation on parameter 'SupportedServices'*" + } + + It "Should contain Id in parameters when passed Name to it" { + $result = New-EntraDomain -Name "lala.uk" + $params = Get-Parameters -data $result.Parameters + $params.Id | Should -Match "lala.uk" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDomain" + + $result = New-EntraDomain -Name "lala.uk" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDomain" + + Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraDomain -Name "lala.uk" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 new file mode 100644 index 0000000000..eaec460fe5 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 @@ -0,0 +1,54 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Test for Remove-EntraAdministrativeUnit" { + It "Should return empty object" { + $result = Remove-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Remove-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is null" { + { Remove-EntraAdministrativeUnit -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraAdministrativeUnit -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraAdministrativeUnit" + + Remove-EntraAdministrativeUnit -AdministrativeUnitId "bbbbbbbb-1111-1111-1111-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraAdministrativeUnit" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraAdministrativeUnit -AdministrativeUnitId "bbbbbbbb-1111-1111-1111-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 new file mode 100644 index 0000000000..9aa44a82f5 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + + $auId = "bbbbbbbb-1111-1111-1111-cccccccccccc" + $memId = "bbbbbbbb-2222-2222-2222-cccccccccccc" +} + +Describe "Test for Remove-EntraAdministrativeUnitMember" { + It "Should return empty object" { + $result = Remove-EntraAdministrativeUnitMember -AdministrativeUnitId $auId -MemberId $memId + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with ObjectId" { + $result = Remove-EntraAdministrativeUnitMember -ObjectId $auId -MemberId $memId + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Remove-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is null" { + { Remove-EntraAdministrativeUnitMember -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when MemberId is empty" { + { Remove-EntraAdministrativeUnitMember -MemberId "" } | Should -Throw "Cannot bind argument to parameter 'MemberId'*" + } + It "Should fail when MemberId is null" { + { Remove-EntraAdministrativeUnitMember -MemberId } | Should -Throw "Missing an argument for parameter 'MemberId'*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraAdministrativeUnitMember -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraAdministrativeUnitMember" + + Remove-EntraAdministrativeUnitMember -AdministrativeUnitId $auId -MemberId $memId + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraAdministrativeUnitMember" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraAdministrativeUnitMember -AdministrativeUnitId $auId -MemberId $memId -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDeletedDirectoryObject.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDeletedDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..ee39953e51 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDeletedDirectoryObject.Tests.ps1 @@ -0,0 +1,64 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraDeletedDirectoryObject" { + Context "Test for Remove-EntraDeletedDirectoryObject" { + It "Should delete a previously deleted directory object" { + $result = Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Remove-EntraDeletedDirectoryObject -Id "11112222-bbbb-3333-cccc-4444dddd5555" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when DirectoryObjectId is empty" { + { Remove-EntraDeletedDirectoryObject -DirectoryObjectId } | Should -Throw "Missing an argument for parameter 'DirectoryObjectId'*" + } + + It "Should fail when DirectoryObjectId is invalid" { + { Remove-EntraDeletedDirectoryObject -DirectoryObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DirectoryObjectId' because it is an empty string." + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedDirectoryObject" + + Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedDirectoryObject" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 new file mode 100644 index 0000000000..1cc1570053 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgDevice -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraDevice" { + Context "Test for Remove-EntraDevice" { + It "Should return empty object" { + $result = Remove-EntraDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceId is invalid" { + { Remove-EntraDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." + } + It "Should fail when DeviceId is empty" { + { Remove-EntraDevice -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" + } + It "Should contain DeviceId in parameters when passed DeviceId to it" { + Mock -CommandName Remove-MgDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDevice" + + Remove-EntraDevice -DeviceId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDevice" + + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDevice -DeviceId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 new file mode 100644 index 0000000000..3e7a531075 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + #Import-Module .\bin\Microsoft.Graph.Entra.psm1 -Force + Import-Module Microsoft.Graph.Entra + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraDeviceRegisteredOwner" { + Context "Test for Remove-EntraDeviceRegisteredOwner" { + It "Should return empty object" { + $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceId is empty" { + { Remove-EntraDeviceRegisteredOwner -DeviceId -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } + } + It "Should fail when DeviceId is invalid" { + { Remove-EntraDeviceRegisteredOwner -DeviceId "" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string.*" } + } + It "Should fail when OwnerId is empty" { + { Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId | Should -Throw "Missing an argument for parameter 'OwnerId'*" } + } + It "Should fail when OwnerId is invalid" { + { Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "" | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string.*" } + } + It "Should contain DeviceId in parameters when passed OwnerId to it" { + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeviceRegisteredOwner" + + $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeviceRegisteredOwner" + + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 new file mode 100644 index 0000000000..b2f4e8fa4c --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + #Import-Module .\bin\Microsoft.Graph.Entra.psm1 -Force + Import-Module Microsoft.Graph.Entra + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraDeviceRegisteredUser" { + Context "Test for Remove-EntraDeviceRegisteredUser" { + It "Should return empty object" { + $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceId is empty" { + { Remove-EntraDeviceRegisteredUser -DeviceId -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } + } + It "Should fail when DeviceId is invalid" { + { Remove-EntraDeviceRegisteredUser -DeviceId "" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string.*" } + } + It "Should fail when UserId is empty" { + { Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId | Should -Throw "Missing an argument for parameter 'UserId'*" } + } + It "Should fail when UserId is invalid" { + { Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "" | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string.*" } + } + It "Should contain DeviceId in parameters when passed UserId to it" { + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain DirectoryObjectId in parameters when passed UserId to it" { + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeviceRegisteredUser" + + Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeviceRegisteredUser" + + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..085fd324e8 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleAssignment.Tests.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Remove-EntraDirectoryRoleAssignment" { + Context "Test for Remove-EntraDirectoryRoleAssignment" { + It "Should return empty object" { + $result = Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when UnifiedRoleAssignmentId is empty" { + { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" + } + It "Should fail when UnifiedRoleAssignmentId is invalid" { + { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleAssignmentId' because it is an empty string." + } + It "Should contain UnifiedRoleAssignmentId in parameters when passed Id to it" { + Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + + $result = Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $params = Get-Parameters -data $result + $params.UnifiedRoleAssignmentId | Should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleAssignment" + + Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleAssignment" + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..696a70a0cc --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleDefinition.Tests.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Remove-EntraDirectoryRoleDefinition" { + Context "Test for Remove-EntraDirectoryRoleDefinition" { + It "Should return empty object" { + $result = Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraDirectoryRoleDefinition -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when UnifiedRoleDefinitionId is empty" { + { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" + } + It "Should fail when UnifiedRoleDefinitionId is invalid" { + { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string*" + } + It "Should contain UnifiedRoleDefinitionId in parameters when passed Id to it" { + Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + + $result = Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result + $params.UnifiedRoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleDefinition" + + Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleDefinition" + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 new file mode 100644 index 0000000000..a7f52b489d --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 @@ -0,0 +1,80 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraDirectoryRoleMember" { + Context "Test for Remove-EntraDirectoryRoleMember" { + It "Should return empty object" { + $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with alias" { + $result = Remove-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DirectoryRoleId is empty" { + { Remove-EntraDirectoryRoleMember -DirectoryRoleId -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'*" + } + It "Should fail when DirectoryRoleId is invalid" { + { Remove-EntraDirectoryRoleMember -DirectoryRoleId "" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'DirectoryRoleId' because it is an empty string." + } + It "Should fail when MemberId is empty" { + { Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId } | Should -Throw "Missing an argument for parameter 'MemberId'*" + } + It "Should fail when MemberId is invalid" { + { Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "" } | Should -Throw "Cannot bind argument to parameter 'MemberId' because it is an empty string." + } + It "Should contain DirectoryRoleId in parameters when passed ObjectId to it" { + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryRoleId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain DirectoryObjectId in parameters when passed RefObjectId to it" { + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleMember" + + Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleMember" + + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 new file mode 100644 index 0000000000..eefa38c963 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgDomain -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraDomain" { + Context "Test for Remove-EntraDomain" { + It "Should return empty domain name" { + $result = Remove-EntraDomain -Name "Contoso.com" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Name is empty" { + { Remove-EntraDomain -Name } | Should -Throw "Missing an argument for parameter 'Name'*" + } + + It "Should fail when Name is invalid" { + { Remove-EntraDomain -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string." + } + + It "Should contain DomainId in parameters when passed Name to it" { + Mock -CommandName Remove-MgDomain -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraDomain -Name "Contoso.com" + $params = Get-Parameters -data $result + $params.DomainId | Should -Be "Contoso.com" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDomain" + + Remove-EntraDomain -Name "Contoso.com" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDomain" + + Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDomain -Name "Contoso.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..abdd91c9db --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -0,0 +1,59 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Remove-EntraFeatureRolloutPolicyDirectoryObject" { + Context "Test for Remove-EntraFeatureRolloutPolicyDirectoryObject" { + It "Should return empty object" { + $result = Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when Id is invalid" { + { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when ObjectId is invalid" { + { Remove-EntraFeatureRolloutPolicyDirectoryObject -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + It "Should fail when ObjectId is empty" { + { Remove-EntraFeatureRolloutPolicyDirectoryObject -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicyDirectoryObject" + $result = Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicyDirectoryObject" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 new file mode 100644 index 0000000000..31a0e682a2 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Test for Remove-EntraScopedRoleMembership" { + It "Should return empty object" { + $result = Remove-EntraScopedRoleMembership -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -ScopedRoleMembershipId bbbbbbbb-2222-2222-2222-cccccccccccc + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with ObjectId" { + $result = Remove-EntraScopedRoleMembership -ObjectId bbbbbbbb-1111-1111-1111-cccccccccccc -ScopedRoleMembershipId bbbbbbbb-2222-2222-2222-cccccccccccc + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Remove-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is null" { + { Remove-EntraScopedRoleMembership -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when ScopedRoleMembershipId is empty" { + { Remove-EntraScopedRoleMembership -ScopedRoleMembershipId "" } | Should -Throw "Cannot bind argument to parameter 'ScopedRoleMembershipId'*" + } + It "Should fail when ScopedRoleMembershipId is null" { + { Remove-EntraScopedRoleMembership -ScopedRoleMembershipId } | Should -Throw "Missing an argument for parameter 'ScopedRoleMembershipId'*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraScopedRoleMembership -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraScopedRoleMembership" + + Remove-EntraScopedRoleMembership -AdministrativeUnitId "bbbbbbbb-1111-1111-1111-cccccccccccc" -ScopedRoleMembershipId "bbbbbbbb-2222-2222-2222-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraScopedRoleMembership" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraScopedRoleMembership -AdministrativeUnitId "bbbbbbbb-1111-1111-1111-cccccccccccc" -ScopedRoleMembershipId "bbbbbbbb-2222-2222-2222-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..b8b20e12f9 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "@odata.type" = "#microsoft.graph.user" + "@odata.Context" = 'https://graph.microsoft.com/v1.0/$metadata#directoryObjects/$entity' + "displayName" = "Mock-App" + "jobTitle" = "TestMock" + "mail" = "M365x99297270.onmicrosoft.com" + "mobilePhone" = "9984534564" + "userPrincipalName" = "M365x99297270.onmicrosoft.com" + "preferredLanguage" = "EN" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Restore-EntraDeletedDirectoryObject" { + Context "Restore-EntraDeletedDirectoryObject" { + It "Should return specific MS deleted directory object" { + $result = Restore-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific MS deleted directory object with AutoReconcileProxyConflict" { + $result = Restore-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AutoReconcileProxyConflict + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is empty" { + { Restore-EntraDeletedDirectoryObject -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Restore-EntraDeletedDirectoryObject -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Result should contain Alias properties" { + $result = Restore-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result."@odata.type" | should -Be "#microsoft.graph.user" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedDirectoryObject" + Restore-EntraDeletedDirectoryObject -Id "11112222-bbbb-3333-cccc-4444dddd5555" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedDirectoryObject" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Restore-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 new file mode 100644 index 0000000000..93b6de6e81 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 @@ -0,0 +1,55 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Test for Set-EntraAdministrativeUnit" { + It "Should return empty object" { + $result = Set-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object withObjectID" { + $result = Set-EntraAdministrativeUnit -ObjectId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Set-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is null" { + { Set-EntraAdministrativeUnit -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when invalid parameter is passed" { + { Set-EntraAdministrativeUnit -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAdministrativeUnit" + Set-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraAdministrativeUnit -AdministrativeUnitId "bbbbbbbb-1111-1111-1111-cccccccccccc" -DisplayName "test" -Description "test" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 new file mode 100644 index 0000000000..c3ea97c21d --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Set-EntraAttributeSet" { + Context "Test for Set-EntraAttributeSet" { + It "Should return created AttributeSet" { + $result = Set-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should return created AttributeSet with alias" { + $result = Set-EntraAttributeSet -Id "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when AttributeSetId parameter is empty" { + { Set-EntraAttributeSet -AttributeSetId } | Should -Throw "Missing an argument for parameter 'AttributeSetId*" + } + It "Should fail when Description parameter is empty" { + { Set-EntraAttributeSet -Description } | Should -Throw "Missing an argument for parameter 'Description*" + } + It "Should fail when MaxAttributesPerSet parameter is empty" { + { Set-EntraAttributeSet -MaxAttributesPerSet } | Should -Throw "Missing an argument for parameter 'MaxAttributesPerSet*" + } + It "Should fail when MaxAttributesPerSet parameter is invalid" { + { Set-EntraAttributeSet -MaxAttributesPerSet "a"} | Should -Throw "Cannot process argument transformation on parameter 'MaxAttributesPerSet'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAttributeSet" + + Set-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 | Out-Null + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { + Set-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 -Debug + } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 new file mode 100644 index 0000000000..5fe4030047 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Test for Set-EntraCustomSecurityAttributeDefinition" { + + It "Should return empty object" { + $result = Set-EntraCustomSecurityAttributeDefinition -Id "Demo12_ProjectDatevaluevaluevalue12test" -Description "Test desc" -UsePreDefinedValuesOnly $false -Status "Available" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when ID is empty" { + { Set-EntraCustomSecurityAttributeDefinition -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when Id is null" { + { Set-EntraCustomSecurityAttributeDefinition -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when invalid parameter is passed" { + { Set-EntraCustomSecurityAttributeDefinition -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraCustomSecurityAttributeDefinition" + $result = Set-EntraCustomSecurityAttributeDefinition -Id "Demo12_ProjectDatevaluevaluevalue12test" -Description "Test desc" -UsePreDefinedValuesOnly $false -Status "Available" + $params = Get-Parameters -data $result + $a= $params | ConvertTo-json | ConvertFrom-Json + $a.headers.'User-Agent' | Should -Be $userAgentHeaderValue + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraCustomSecurityAttributeDefinition -Id "Demo12_ProjectDatevaluevaluevalue12test" -Description "Test desc" -UsePreDefinedValuesOnly $false -Status "Available" } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 new file mode 100644 index 0000000000..bc5943b56a --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Test for Set-EntraCustomSecurityAttributeDefinitionAllowedValue" { + + It "Should return empty object" { + $result = Set-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "Engineering_Project" -Id "Alpine" -IsActive $true + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + + It "Should fail when CustomSecurityAttributeDefinitionId is empty" { + { Set-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'CustomSecurityAttributeDefinitionId'*" + } + It "Should fail when CustomSecurityAttributeDefinitionId is null" { + { Set-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId } | Should -Throw "Missing an argument for parameter 'CustomSecurityAttributeDefinitionId'*" + } + It "Should fail when invalid parameter is passed" { + { Set-EntraCustomSecurityAttributeDefinitionAllowedValue -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + + It "Should fail when Id is empty" { + { Set-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "Engineering_Project" -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when Id is null" { + { Set-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "Engineering_Project" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraCustomSecurityAttributeDefinitionAllowedValue" + + $result = Set-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "Engineering_Project" -Id "Alpine" -IsActive $true + $result | Should -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraCustomSecurityAttributeDefinitionAllowedValue" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "Engineering_Project" -Id "Alpine" -IsActive $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 new file mode 100644 index 0000000000..2c5566fe0b --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgDevice -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraDevice"{ + Context "Test for Set-EntraDevice" { + It "Should return empty object"{ + $result = Set-EntraDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Set-EntraDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when DeviceObjectId is invalid" { + { Set-EntraDevice -DeviceObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceObjectId' because it is an empty string." + } + It "Should fail when DeviceObjectId is empty" { + { Set-EntraDevice -DeviceObjectId } | Should -Throw "Missing an argument for parameter 'DeviceObjectId'*" + } + It "Should contain DeviceId in parameters when passed DeviceObjectId to it" { + Mock -CommandName Update-MgDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDevice" + + Set-EntraDevice -DeviceObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDevice" + + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraDevice -DeviceObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 new file mode 100644 index 0000000000..d10e094446 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "Configuration" = @{ AlertThreshold =500 ; SynchronizationPreventionType = "enabledForCount"} + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + ) + } + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra +} +Describe "Set-EntraDirSyncConfiguration" { + Context "Test for Set-EntraDirSyncConfiguration" { + It "Should Modifies the directory synchronization settings." { + $result = Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when AccidentalDeletionThreshold is empty" { + {Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold -Force } | Should -Throw "Missing an argument for parameter 'AccidentalDeletionThreshold'. Specify a parameter*" + } + + It "Should fail when AccidentalDeletionThreshold is invalid" { + {Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold "xy" -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when TenantId is empty" { + {Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold '111' -TenantId -Force } | Should -Throw "Missing an argument for parameter 'TenantId'. Specify a parameter*" + } + + It "Should fail when TenantId is invalid" { + {Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "" -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when Force parameter is passes with argument" { + {Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold "111" -Force "xy"} | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncConfiguration" + + Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncConfiguration" + + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 new file mode 100644 index 0000000000..790d50fd12 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 @@ -0,0 +1,64 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraDirSyncEnabled" { + Context "Test for Set-EntraDirSyncEnabled" { + It "Should return empty object" { + $result = Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when EnableDirsync is empty" { + {Set-EntraDirSyncEnabled -EnableDirsync -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force } | Should -Throw "Missing an argument for parameter 'EnableDirsync'. Specify a parameter*" + } + + It "Should fail when EnableDirsync is invalid" { + {Set-EntraDirSyncEnabled -EnableDirsync 'xy' -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when TenantId is empty" { + {Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId -Force } | Should -Throw "Missing an argument for parameter 'TenantId'. Specify a parameter*" + } + + It "Should fail when TenantId is invalid" { + {Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId "" -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when Force parameter is passes with argument" { + {Set-EntraDirSyncEnabled -EnableDirsync $True -Force "xy"} | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncEnabled" + Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force | Out-Null + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 new file mode 100644 index 0000000000..ecea93e5c1 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "Configuration" = @{ AlertThreshold =500 ; SynchronizationPreventionType = "enabledForCount"} + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + ) + } + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra +} +Describe "Set-EntraDirSyncFeature" { + Context "Test for Set-EntraDirSyncFeature" { + It "Should sets identity synchronization features for a tenant." { + $result = Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled $false -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Feature is empty" { + {Set-EntraDirSyncFeature -Feature -Enabled $false -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force} | Should -Throw "Missing an argument for parameter 'Feature'. Specify a parameter*" + } + + It "Should fail when Feature is invalid" { + {Set-EntraDirSyncFeature -Feature "" -Enabled $false -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force} | Should -Throw "Cannot bind argument to parameter 'Feature' because it is an empty string.*" + } + + It "Should fail when Enable is empty" { + {Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force } | Should -Throw "Missing an argument for parameter 'Enabled'.*" + } + + It "Should fail when Enable is invalid" { + {Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled "" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force} | Should -Throw "Cannot process argument transformation on parameter 'Enabled'.*" + } + + It "Should fail when TenantId is empty" { + {Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled $false -TenantId -Force } | Should -Throw "Missing an argument for parameter 'TenantId'. Specify a parameter*" + } + + It "Should fail when TenantId is invalid" { + {Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled $false -TenantId "" -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when Force parameter is passes with argument" { + {Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled $false -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force "xy"} | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncFeature" + + Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled $false -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncFeature" + + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled $false -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDirectoryRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..b47a11005e --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDirectoryRoleDefinition.Tests.ps1 @@ -0,0 +1,110 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement +} + +Describe "Set-EntraDirectoryRoleDefinition" { + Context "Test for Set-EntraDirectoryRoleDefinition" { + It "Should return empty object" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = Set-EntraDirectoryRoleDefinition -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + } + It "Should fail when UnifiedRoleDefinitionId is empty" { + { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId -DisplayName 'Mock-App' -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" + } + It "Should fail when UnifiedRoleDefinitionId is invalid" { + { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" -IsEnabled $false -DisplayName 'Mock-App' -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string*" + } + It "Should fail when RolePermissions is empty" { + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions } | Should -Throw "Missing an argument for parameter 'RolePermissions'*" + } + It "Should fail when IsEnabled is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsEnabled } | Should -Throw "Missing an argument for parameter 'IsEnabled'*" + } + It "Should fail when DisplayName is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when ResourceScopes is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -ResourceScopes } | Should -Throw "Missing an argument for parameter 'ResourceScopes'*" + } + It "Should fail when Description is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Description } | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when TemplateId is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -TemplateId } | Should -Throw "Missing an argument for parameter 'TemplateId'*" + } + It "Should fail when Version is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Version } | Should -Throw "Missing an argument for parameter 'Version'*" + } + It "Should contain UnifiedRoleDefinitionId in parameters when passed Id to it" { + Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 + $params = Get-Parameters -data $result + $params.UnifiedRoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirectoryRoleDefinition" + + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirectoryRoleDefinition" + + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 new file mode 100644 index 0000000000..b17118a9a0 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgDomain -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraDomain"{ + Context "Test for Set-EntraDomain" { + It "Should return empty object"{ + $result = Set-EntraDomain -Name "test.mail.onmicrosoft.com" -IsDefault $True -SupportedServices @("OrgIdAuthentication") + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Name is empty" { + { Set-EntraDomain -Name } | Should -Throw "Missing an argument for parameter 'Name'*" + + } + It "Should fail when Name is invalid" { + { Set-EntraDomain -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string." + + } + It "Should fail when SupportedServices is empty" { + { Set-EntraDomain -Name "test.mail.onmicrosoft.com" -SupportedServices } | Should -Throw "Missing an argument for parameter 'SupportedServices'*" + + } + It "Should fail when -IsDefault is empty" { + { Set-EntraDomain -Name "test.mail.onmicrosoft.com" -IsDefault } | Should -Throw "Missing an argument for parameter 'IsDefault'*" + + } + It "Should fail when -IsDefault is invalid" { + { Set-EntraDomain -Name "test.mail.onmicrosoft.com" -IsDefault xyz } | Should -Throw "Cannot process argument transformation on parameter 'IsDefault'*" + + } + It "Should contain DomainId in parameters when passed Name to it" { + Mock -CommandName Update-MgDomain -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraDomain -Name "test.mail.onmicrosoft.com" + $params = Get-Parameters -data $result + $params.DomainId | Should -Be "test.mail.onmicrosoft.com" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDomain" + + Set-EntraDomain -Name "test.mail.onmicrosoft.com" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDomain" + + Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraDomain -Name "test.mail.onmicrosoft.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 new file mode 100644 index 0000000000..382c9fca56 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "ActiveSignInUri" = "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" + "DisplayName" = "Contoso" + "FederatedIdpMfaBehavior" = "rejectMfaByFederatedIdp" + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "IsSignedAuthenticationRequestRequired" = "" + "IssuerUri" = "http://contoso.com/adfs/services/trust/" + "MetadataExchangeUri" = "https://sts.contoso.com/adfs/services/trust/mex" + "NextSigningCertificate" = "MIIC3jCCAcagAwIBAgIQEt0T0G5GPZ9" + "PassiveSignInUri" = "https://sts.contoso.com/adfs/ls/" + "PreferredAuthenticationProtocol" = "wsFed" + "PromptLoginBehavior" = "" + "SignOutUri" = "https://sts.deverett.info/adfs/ls/" + "SigningCertificate" = "MIIC3jCCAcagAwIBAgIQFsO0R8deG4h" + "SigningCertificateUpdateStatus" = @{ + "CertificateUpdateResult" = "success"; + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {} -ModuleName Microsoft.Graph.Entra +} +Describe "Set-EntraDomainFederationSettings" { + Context "Test for Set-EntraDomainFederationSettings" { + It "Should Updates settings for a federated domain." { + $result = Set-EntraDomainFederationSettings -DomainName "contoso.com" -LogOffUri "https://adfs1.manan.lab/adfs/" -PassiveLogOnUri "https://adfs1.manan.lab/adfs/" -ActiveLogOnUri "https://adfs1.manan.lab/adfs/services/trust/2005/" -IssuerUri "http://adfs1.manan.lab/adfs/services/" -FederationBrandName "ADFS" -MetadataExchangeUri "https://adfs1.manan.lab/adfs/services/trust/" -PreferredAuthenticationProtocol "saml" -PromptLoginBehavior "nativeSupport" -SigningCertificate "Testcertificate" -NextSigningCertificate "Testcertificate" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when DomainName is empty" { + {Set-EntraDomainFederationSettings -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" + } + + It "Should fail when DomainName is invalid" { + {Set-EntraDomainFederationSettings -DomainName ""} | Should -Throw "Cannot bind argument to parameter 'DomainName' because it is an empty string.*" + } + It "Should fail when NextSigningCertificate is empty" { + { Set-EntraDomainFederationSettings -DomainName "contoso.com" -NextSigningCertificate } | Should -Throw "Missing an argument for parameter 'NextSigningCertificate'. Specify a parameter*" + } + + It "Should fail when SigningCertificate is empty" { + { Set-EntraDomainFederationSettings -DomainName "contoso.com" -SigningCertificate } | Should -Throw "Missing an argument for parameter 'SigningCertificate'. Specify a parameter*" + } + + It "Should fail when parameter is empty" { + {Set-EntraDomainFederationSettings -DomainName "contoso.com" -LogOffUri -PassiveLogOnUri -ActiveLogOnUri -IssuerUri -FederationBrandName -MetadataExchangeUri -PreferredAuthenticationProtocol -PromptLoginBehavior } | Should -Throw "Missing an argument for parameter*" + } + It "Should fail when invalid paramter is passed"{ + {Set-EntraDomainFederationSettings -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" + } + It "Should contain DomainId in parameters when DomainName to it" { + Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra + $result = Set-EntraDomainFederationSettings -DomainName "contoso.com" + $params = Get-Parameters -data $result + $a= $params | ConvertTo-json | ConvertFrom-Json + $a.DomainId | Should -Be "contoso.com" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDomainFederationSettings" + + Set-EntraDomainFederationSettings -DomainName "contoso.com" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDomainFederationSettings" + + Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraDomainFederationSettings -DomainName "contoso.com" -LogOffUri "https://adfs1.manan.lab/adfs/" -PassiveLogOnUri "https://adfs1.manan.lab/adfs/" -ActiveLogOnUri "https://adfs1.manan.lab/adfs/services/trust/2005/" -IssuerUri "http://adfs1.manan.lab/adfs/services/" -FederationBrandName "ADFS" -MetadataExchangeUri "https://adfs1.manan.lab/adfs/services/trust/" -PreferredAuthenticationProtocol "saml" -PromptLoginBehavior "nativeSupport" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 new file mode 100644 index 0000000000..ee9509eb9c --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra -MockWith { + return @{ + value = @( + @{ + Id = "fd560167-ff1f-471a-8d74-3b0070abcea1" + Parameters = $args + } + ) + } + } +} + +Describe "Set-EntraPartnerInformation" { + Context "Test for Set-EntraPartnerInformation" { + It "Should return empty object" { + Mock -CommandName Invoke-MgGraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Set-EntraPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when PartnerSupportUrl is empty" { + { Set-EntraPartnerInformation -PartnerSupportUrl } | Should -Throw "Missing an argument for parameter 'PartnerSupportUrl'*" + } + It "Should fail when PartnerCommerceUrl is empty" { + { Set-EntraPartnerInformation -PartnerCommerceUrl } | Should -Throw "Missing an argument for parameter 'PartnerCommerceUrl'*" + } + It "Should fail when PartnerHelpUrl is empty" { + { Set-EntraPartnerInformation -PartnerHelpUrl } | Should -Throw "Missing an argument for parameter 'PartnerHelpUrl'*" + } + It "Should fail when PartnerSupportEmails is empty" { + { Set-EntraPartnerInformation -PartnerSupportEmails } | Should -Throw "Missing an argument for parameter 'PartnerSupportEmails'*" + } + It "Should fail when PartnerSupportTelephones is empty" { + { Set-EntraPartnerInformation -PartnerSupportTelephones } | Should -Throw "Missing an argument for parameter 'PartnerSupportTelephones'*" + } + It "Should fail when TenantId is empty" { + { Set-EntraPartnerInformation -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is invalid" { + { Set-EntraPartnerInformation -TenantId abc } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'*" + } + It "Should contain params" { + $result = Set-EntraPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc + $params = Get-Parameters -data $result.value.Parameters + $params.Body.supportEmails | Should -Be @("contoso@example.com") + $params.Body.supportUrl | Should -Be "http://www.test1.com" + $params.Body.partnerTenantId | Should -Be "b73cc049-a025-4441-ba3a-8826d9a68ecc" + $params.Body.helpUrl | Should -Be "http://www.test1.com" + $params.Body.commerceUrl | Should -Be "http://www.test1.com" + $params.Body.supportTelephones | Should -Be @("2342") + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPartnerInformation" + + Set-EntraPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPartnerInformation" + + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 new file mode 100644 index 0000000000..24ce2b0258 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + + $scriptblock = { + return @{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } +} + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Mock -CommandName Get-MgOrganization -MockWith {$scriptblock} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgOrganization -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraTenantDetail" { + Context "Test for Set-EntraTenantDetail" { + It "Should return empty object" { + $result = Set-EntraTenantDetail -MarketingNotificationEmails "amy@contoso.com","henry@contoso.com" -SecurityComplianceNotificationMails "john@contoso.com","mary@contoso.com" -SecurityComplianceNotificationPhones "1-555-625-9999", "1-555-233-5544" -TechnicalNotificationMails "peter@contoso.com" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when MarketingNotificationEmails is empty" { + { Set-EntraTenantDetail -MarketingNotificationEmails } | Should -Throw "Missing an argument for parameter 'MarketingNotificationEmails'.*" + } + It "Should fail when SecurityComplianceNotificationMails is empty" { + { Set-EntraTenantDetail -SecurityComplianceNotificationMails } | Should -Throw "Missing an argument for parameter 'SecurityComplianceNotificationMails'.*" + } + It "Should fail when SecurityComplianceNotificationPhones is empty" { + { Set-EntraTenantDetail -SecurityComplianceNotificationPhones } | Should -Throw "Missing an argument for parameter 'SecurityComplianceNotificationPhones'.*" + } + It "Should fail when TechnicalNotificationMails is empty" { + { Set-EntraTenantDetail -TechnicalNotificationMails } | Should -Throw "Missing an argument for parameter 'TechnicalNotificationMails'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraTenantDetail" + + Set-EntraTenantDetail -MarketingNotificationEmails "amy@contoso.com","henry@contoso.com" -SecurityComplianceNotificationMails "john@contoso.com","mary@contoso.com" -SecurityComplianceNotificationPhones "1-555-625-9999", "1-555-233-5544" -TechnicalNotificationMails "peter@contoso.com" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraTenantDetail" + + Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraTenantDetail -MarketingNotificationEmails "amy@contoso.com","henry@contoso.com" -SecurityComplianceNotificationMails "john@contoso.com","mary@contoso.com" -SecurityComplianceNotificationPhones "1-555-625-9999", "1-555-233-5544" -TechnicalNotificationMails "peter@contoso.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 new file mode 100644 index 0000000000..5013e83278 --- /dev/null +++ b/testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + + $module = Get-Module -Name Microsoft.Graph.Entra +} + +Describe "Valid parameter Tests"{ + Context "Test for valid parameters"{ + It "Should return empty object with Id parameter"{ + Write-Host "--------Start mock remove cmdlets with Id parameter only--------" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) + if($params.count -eq 1 -and $params -eq 'Id'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "---------End mock remove cmdlets with Id parameter only---------" + } + It "Should return empty object with ObjectId param"{ + Write-Host "-----Start mock remove cmdlets with ObjectId parameter only-----" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + if($params.count -eq 1 -and $params -eq 'ObjectId'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "------End mock remove cmdlets with ObjectId parameter only------" + } + # It "Should pass with 'Id' or 'ObjectId' parameter" { + # $count=0 + # $module.ExportedCommands.Keys | ForEach-Object { + + # $command = Get-Command $_ + # if ($command.Name.StartsWith('Remove')) + # { + # $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + # if($params.count -eq 1 -and ($params -eq 'ObjectId' -or $params-eq 'Id')){ + # $stringParams = $params -join ',' + # Write-Host "$command | $stringParams" + # $count++ + # } + # } + # } + # Write-Host $count + # } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Governance/Entra.Tests.ps1 b/testVNext/Entra/Governance/Entra.Tests.ps1 new file mode 100644 index 0000000000..fdbfdf6033 --- /dev/null +++ b/testVNext/Entra/Governance/Entra.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ + Import-Module .\bin\Microsoft.Graph.Entra.Governance.psd1 -Force +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra.Governance).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config diff --git a/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..932cef0a0d --- /dev/null +++ b/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 @@ -0,0 +1,129 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AppScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope" + "AppScopeId" = $null + "Id" = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + "DirectoryScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" + "DirectoryScopeId" = "/0000aaaa-11bb-cccc-dd22-eeeeee333333" + "Condition" = $null + "Principal" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" + "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "RoleDefinition" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition" + "RoleDefinitionId" = "1b1b1b1b-2222-cccc-3333-4d4d4d4d4d4d" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleAssignments/$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance +} + +Describe "Get-EntraDirectoryRoleAssignment" { + Context "Test for Get-EntraDirectoryRoleAssignment" { + It "Should return specific role assignment" { + $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when Get-EntraDirectoryRoleAssignment is empty" { + { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" + } + It "Should fail when Get-EntraDirectoryRoleAssignment is invalid" { + { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleAssignmentId' because it is an empty string." + } + It "Should return all role assignments" { + $result = Get-EntraDirectoryRoleAssignment -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraDirectoryRoleAssignment -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top role assignment" { + $result = Get-EntraDirectoryRoleAssignment -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraDirectoryRoleAssignment -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraDirectoryRoleAssignment -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return specific application by filter" { + $result = Get-EntraDirectoryRoleAssignment -Filter "PrincipalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraDirectoryRoleAssignment -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Result should Contain ObjectId" { + $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result.ObjectId | should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + } + It "Should contain UnifiedRoleAssignmentId in parameters when passed Id to it" { + $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $params = Get-Parameters -data $result.Parameters + $params.UnifiedRoleAssignmentId | Should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + } + It "Property parameter should work" { + $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Property PrincipalId + $result | Should -Not -BeNullOrEmpty + $result.PrincipalId | Should -Be 'aaaaaaaa-bbbb-cccc-1111-222222222222' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleAssignment" + + Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleAssignment" + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..068403f431 --- /dev/null +++ b/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 @@ -0,0 +1,145 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "RolePermissions" = @{AllowedResourceActions="System.Object[]"; Condition=""; ExcludedResourceActions=""; AdditionalProperties=""} + "Description" = "Mock-App" + "DisplayName" = "Mock-App" + "Id" = "0000aaaa-11bb-cccc-dd22-eeeeee333333" + "InheritsPermissionsFrom" = {} + "IsBuiltIn" = $False + "IsEnabled" = $False + "ResourceScopes" = {/} + "TemplateId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "Version" = "2" + "RoleDefinitionId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions/$entity" + "inheritsPermissionsFrom@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions('54d418b2-4cc0-47ee-9b39-e8f84ed8e073')/inheritsPermissionsFrom" + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance +} + +Describe "Get-EntraDirectoryRoleDefinition" { + Context "Test for Get-EntraDirectoryRoleDefinition" { + It "Should return specificrole Defination" { + $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-App" + $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should return specificrole Defination With Alias" { + $result = Get-EntraDirectoryRoleDefinition -Id "0000aaaa-11bb-cccc-dd22-eeeeee333333" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-App" + $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when UnifiedRoleDefinitionId is empty" { + { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" + } + It "Should fail when UnifiedRoleDefinitionId is invalid" { + { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string." + } + It "Should return all role assignments" { + $result = Get-EntraDirectoryRoleDefinition -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraDirectoryRoleDefinition -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top role assignment" { + $result = Get-EntraDirectoryRoleDefinition -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraDirectoryRoleDefinition -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraDirectoryRoleDefinition -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return specific application by SearchString" { + $result = Get-EntraDirectoryRoleDefinition -SearchString 'Mock-App' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when String is empty" { + { Get-EntraDirectoryRoleDefinition -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Should return specific application by filter" { + $result = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq 'Mock-App'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraDirectoryRoleDefinition -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Result should Contain ObjectId" { + $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" + $result.ObjectId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraDirectoryRoleDefinition -SearchString 'Mock-App' + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "Mock-App" + } + It "Property parameter should work" { + $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleDefinition" + + Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleDefinition" + + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Governance/Invalid.Tests.ps1 b/testVNext/Entra/Governance/Invalid.Tests.ps1 new file mode 100644 index 0000000000..eaf6386a58 --- /dev/null +++ b/testVNext/Entra/Governance/Invalid.Tests.ps1 @@ -0,0 +1,105 @@ +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ + Import-Module Microsoft.Graph.Entra.Governance +} + +Describe "Invalid Tests"{ + It "Should fail when parameters are invalid"{ + $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module.ExportedCommands.Keys | ForEach-Object{ + $command = Get-Command $_ + { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." + } + } + It "Should fail with 'TenantId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ + $commandScriptBlock = [scriptblock]::Create("$command -TenantId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'TenantId'.*" + } + } + } + It "Should fail with 'Id' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Id'){ + $commandScriptBlock = [scriptblock]::Create("$command -Id $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + } + } + It "Should fail with 'ObjectId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ + $commandScriptBlock = [scriptblock]::Create("$command -ObjectId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'ObjectId'.*" + } + } + } + It "Should fail with 'All' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'All'){ + $commandScriptBlock = [scriptblock]::Create("$command -All `$True") + if('Find-EntraPermission' -eq $command){ + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'*" + } + else { + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + } + } + } + It "Should fail with 'Top' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Top'){ + $commandScriptBlock = [scriptblock]::Create("$command -Top ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Top'*" + } + } + } + It "Should fail with 'Filter' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ + $commandScriptBlock = [scriptblock]::Create("$command -Filter ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + } + } + It "Should fail with 'SearchString' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ + $commandScriptBlock = [scriptblock]::Create("$command -SearchString ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + } + } + It "Should fail with exception when no parameter is passed" { + $cmdlets = @( + @{ CmdletName = 'Enable-EntraDirectoryRole'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + @{ CmdletName = 'New-EntraConditionalAccessPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraNamedLocationPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraPermissionGrantPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + ) + $cmdlets | ForEach-Object { + $commandName = $_.CmdletName + $Exception = $_.Exception + $commandScriptBlock = [scriptblock]::Create("$commandName -ErrorAction Stop") + try { + Invoke-Command -ScriptBlock $commandScriptBlock + } + catch { $_ -match $Exception | Should -BeTrue } + } + } +} diff --git a/testVNext/Entra/Governance/Module.Tests.ps1 b/testVNext/Entra/Governance/Module.Tests.ps1 new file mode 100644 index 0000000000..fb06a10706 --- /dev/null +++ b/testVNext/Entra/Governance/Module.Tests.ps1 @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Entra.Governance Module" { + Context "On module import" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance + } + } + + It "Should have exported commands" { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Governance + $PSModuleInfo | Should -Not -BeNullOrEmpty + $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 + + } + + It 'Should be compatible with PS core and desktop' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Governance + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } + + It 'Should point to script module' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Governance + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Governance.psm1" + } + + It 'Should lock GUID' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Governance + $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" + } + + It "Module import should not write to error and information streams" { + $ps = [powershell]::Create() + $ps.AddScript("Import-Module Microsoft.Graph.Entra.Governance -ErrorAction SilentlyContinue").Invoke() + "Checking Information stream" | Out-Host + $ps.Streams.Information.Count | Should -Be 0 + "Checking Error stream" | Out-Host + $ps.Streams.Error.Count | Should -Be 0 + "Checking Verbose stream" | Out-Host + $ps.Streams.Verbose.Count | Should -Be 0 + "Checking Debug stream" | Out-Host + $ps.Streams.Warning.Count | Should -Be 0 + "Checking Progress stream" | Out-Host + $ps.Streams.Progress.Count | Should -Be 0 + + $ps.Dispose() + } + } +} + diff --git a/testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..aa606d76f4 --- /dev/null +++ b/testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AppScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope" + "AppScopeId" = $null + "Id" = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + "DirectoryScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" + "DirectoryScopeId" = "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "Condition" = $null + "Principal" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" + "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "RoleDefinition" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition" + "RoleDefinitionId" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleAssignments/$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance +} + +Describe "New-EntraDirectoryRoleAssignment" { +Context "Test for New-EntraDirectoryRoleAssignment" { + It "Should return created Ms role assignment" { + $result = New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "54d418b2-4cc0-47ee-9b39-e8f84ed8e073" -DirectoryScopeId "/54d418b2-4cc0-47ee-9b39-e8f84ed8e073" + $result | Should -Not -BeNullOrEmpty + $result.PrincipalId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.RoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.DirectoryScopeId | Should -Be "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when PrincipalId is empty" { + { New-EntraDirectoryRoleAssignment -PrincipalId -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Missing an argument for parameter 'PrincipalId'*" + } + It "Should fail when PrincipalId is invalid" { + { New-EntraDirectoryRoleAssignment -PrincipalId "" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Cannot bind argument to parameter 'PrincipalId' because it is an empty string." + } + It "Should fail when RoleDefinitionId is empty" { + { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Missing an argument for parameter 'RoleDefinitionId'*" + } + It "Should fail when RoleDefinitionId is invalid" { + { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Cannot bind argument to parameter 'RoleDefinitionId' because it is an empty string." + } + It "Should fail when DirectoryScopeId is empty" { + { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId } | Should -Throw "Missing an argument for parameter 'DirectoryScopeId'*" + } + It "Result should Contain ObjectId" { + $result = New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ObjectId | should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleAssignment" + + New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleAssignment" + + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..3fe6f7b7c1 --- /dev/null +++ b/testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 @@ -0,0 +1,130 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "RolePermissions" = {"Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRolePermission"} + "Description" = "Mock-App" + "DisplayName" = "Mock-App" + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "InheritsPermissionsFrom" = {} + "IsBuiltIn" = $False + "IsEnabled" = $False + "ResourceScopes" = {/} + "TemplateId" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + "Version" = "2" + "RoleDefinitionId" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions/$entity" + } + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance +} + +Describe "New-EntraDirectoryRoleDefinition" { + Context "Test for New-EntraDirectoryRoleDefinition" { + It "Should return specific Ms role Defination" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "4dd5aa9c-cf4d-4895-a993-740d342802b1" -Version 2 + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-App" + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.IsEnabled | Should -Be $False + $result.TemplateId | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result.Version | Should -Be 2 + + + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when RolePermissions is empty" { + {New-EntraDirectoryRoleDefinition -RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'RolePermissions'*" + } + It "Should fail when IsEnabled is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'IsEnabled'*" + } + It "Should fail when IsEnabled is invalid" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled xy -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Cannot process argument transformation on parameter 'IsEnabled'*" + } + It "Should fail when DisplayName is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when DisplayName is invalid" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName "" -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." + } + It "Should fail when ResourceScopes is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'ResourceScopes'*" + } + It "Should fail when Description is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when TemplateId is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId -Version 2} | Should -Throw "Missing an argument for parameter 'TemplateId'*" + } + It "Should fail when Version is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff"-Version } | Should -Throw "Missing an argument for parameter 'Version'*" + } + It "Result should Contain ObjectId" { + $result = $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleDefinition" + + $result = $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleDefinition" + + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..9d8aa5f6b4 --- /dev/null +++ b/testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance +} + +Describe "Remove-EntraDirectoryRoleAssignment" { + Context "Test for Remove-EntraDirectoryRoleAssignment" { + It "Should return empty object" { + $result = Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when UnifiedRoleAssignmentId is empty" { + { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" + } + It "Should fail when UnifiedRoleAssignmentId is invalid" { + { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleAssignmentId' because it is an empty string." + } + It "Should contain UnifiedRoleAssignmentId in parameters when passed Id to it" { + Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Governance + + $result = Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $params = Get-Parameters -data $result + $params.UnifiedRoleAssignmentId | Should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleAssignment" + + Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleAssignment" + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..712c43d660 --- /dev/null +++ b/testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance +} + +Describe "Remove-EntraDirectoryRoleDefinition" { + Context "Test for Remove-EntraDirectoryRoleDefinition" { + It "Should return empty object" { + $result = Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraDirectoryRoleDefinition -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when UnifiedRoleDefinitionId is empty" { + { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" + } + It "Should fail when UnifiedRoleDefinitionId is invalid" { + { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string*" + } + It "Should contain UnifiedRoleDefinitionId in parameters when passed Id to it" { + Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Governance + + $result = Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result + $params.UnifiedRoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleDefinition" + + Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleDefinition" + + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..6cf8fe2228 --- /dev/null +++ b/testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 @@ -0,0 +1,110 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance +} + +Describe "Set-EntraDirectoryRoleDefinition" { + Context "Test for Set-EntraDirectoryRoleDefinition" { + It "Should return empty object" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should execute successfully with Alias" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = Set-EntraDirectoryRoleDefinition -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + It "Should fail when UnifiedRoleDefinitionId is empty" { + { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId -DisplayName 'Mock-App' -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" + } + It "Should fail when UnifiedRoleDefinitionId is invalid" { + { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" -IsEnabled $false -DisplayName 'Mock-App' -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string*" + } + It "Should fail when RolePermissions is empty" { + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions } | Should -Throw "Missing an argument for parameter 'RolePermissions'*" + } + It "Should fail when IsEnabled is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsEnabled } | Should -Throw "Missing an argument for parameter 'IsEnabled'*" + } + It "Should fail when DisplayName is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when ResourceScopes is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -ResourceScopes } | Should -Throw "Missing an argument for parameter 'ResourceScopes'*" + } + It "Should fail when Description is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Description } | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when TemplateId is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -TemplateId } | Should -Throw "Missing an argument for parameter 'TemplateId'*" + } + It "Should fail when Version is empty" { + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Version } | Should -Throw "Missing an argument for parameter 'Version'*" + } + It "Should contain UnifiedRoleDefinitionId in parameters when passed Id to it" { + Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Governance + + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + $result = Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 + $params = Get-Parameters -data $result + $params.UnifiedRoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirectoryRoleDefinition" + + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirectoryRoleDefinition" + + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission + $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} diff --git a/testVNext/Entra/Governance/Valid.Tests.ps1 b/testVNext/Entra/Governance/Valid.Tests.ps1 new file mode 100644 index 0000000000..0e82decbbf --- /dev/null +++ b/testVNext/Entra/Governance/Valid.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ + Import-Module Microsoft.Graph.Entra.Governance + } + Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + + $module = Get-Module -Name Microsoft.Graph.Entra.Governance +} + +Describe "Valid parameter Tests"{ + Context "Test for valid parameters"{ + It "Should return empty object with Id parameter"{ + Write-Host "--------Start mock remove cmdlets with Id parameter only--------" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) + if($params.count -eq 1 -and $params -eq 'Id'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "---------End mock remove cmdlets with Id parameter only---------" + } + It "Should return empty object with ObjectId param"{ + Write-Host "-----Start mock remove cmdlets with ObjectId parameter only-----" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + if($params.count -eq 1 -and $params -eq 'ObjectId'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "------End mock remove cmdlets with ObjectId parameter only------" + } + # It "Should pass with 'Id' or 'ObjectId' parameter" { + # $count=0 + # $module.ExportedCommands.Keys | ForEach-Object { + + # $command = Get-Command $_ + # if ($command.Name.StartsWith('Remove')) + # { + # $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + # if($params.count -eq 1 -and ($params -eq 'ObjectId' -or $params-eq 'Id')){ + # $stringParams = $params -join ',' + # Write-Host "$command | $stringParams" + # $count++ + # } + # } + # } + # Write-Host $count + # } + } +} diff --git a/testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 b/testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 new file mode 100644 index 0000000000..86896d7b9f --- /dev/null +++ b/testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgGroupMember -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Add-EntraGroupMember" { + Context "Test for Add-EntraGroupMember" { + It "Should add an member to a group" { + $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when GroupId is empty" { + { Add-EntraGroupMember -ObjectId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'GroupId'.*" + } + + It "Should fail when GroupId is invalid" { + { Add-EntraGroupMember -GroupId "" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should fail when RefObjectId is empty" { + { Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + + It "Should fail when RefObjectId is invalid" { + { Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaaaaaa-1111-2222-3333-cccccccccccc" + } + + It "Should contain DirectoryObjectId in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupMember" + + Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupMember" + + Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 b/testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 new file mode 100644 index 0000000000..e2c0050245 --- /dev/null +++ b/testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Add-EntraGroupOwner" { + Context "Test for Add-EntraGroupOwner" { + It "Should add an owner to a group" { + $result = Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when GroupId is empty" { + { Add-EntraGroupOwner -GroupId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'GroupId'.*" + } + + It "Should fail when GroupId is invalid" { + { Add-EntraGroupOwner -GroupId "" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should fail when RefObjectId is empty" { + { Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + + It "Should fail when RefObjectId is invalid" { + { Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName New-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaaaaaa-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupOwner" + Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupOwner" + Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 b/testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 new file mode 100644 index 0000000000..95070b8ea7 --- /dev/null +++ b/testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Value" = "True" + "AdditionalProperties" = "{[@odata.context, https://graph.microsoft.com/v1.0/`$metadata#Edm.Boolean]}" + "Parameters" = $args + } + ) + } + + Mock -CommandName Add-MgGroupToLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Add-EntraLifecyclePolicyGroup" { + Context "Test for Add-EntraLifecyclePolicyGroup" { + It "Should return created LifecyclePolicyGroup" { + $result = Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff + $result | Should -Not -BeNullOrEmpty" + $result.Value | should -Be "True" + + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return created LifecyclePolicyGroup with alias" { + $result = Add-EntraLifecyclePolicyGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff + $result | Should -Not -BeNullOrEmpty" + $result.Value | should -Be "True" + + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupLifecyclePolicyId is invalid" { + { Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string.*" + } + It "Should fail when GroupLifecyclePolicyId is empty" { + { Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'.*" + } + It "Should fail when GroupId is invalid" { + { Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string.*" + } + It "Should fail when GroupId is empty" { + { Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraLifecyclePolicyGroup" + + Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraLifecyclePolicyGroup" + + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Entra.Tests.ps1 b/testVNext/Entra/Groups/Entra.Tests.ps1 new file mode 100644 index 0000000000..e6b0c31795 --- /dev/null +++ b/testVNext/Entra/Groups/Entra.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 new file mode 100644 index 0000000000..62599d6be0 --- /dev/null +++ b/testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 @@ -0,0 +1,150 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "DeletedDateTime" = "10-05-2024 04:27:17" + "CreatedDateTime" = "07-07-2023 14:31:41" + "DisplayName" = "Mock-App" + "MailNickname" = "Demo-Mock-App" + "GroupTypes" = "Unified" + "SecurityEnabled" = $False + "MailEnabled" = $True + "Visibility" = "Public" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#groups/$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgDirectoryDeletedItemAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraDeletedGroup" { +Context "Test for Get-EntraDeletedGroup" { + It "Should return specific Deleted Group" { + $result = Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-App" + $result.GroupTypes | Should -Be "Unified" + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific Deleted Group with alias" { + $result = Get-EntraDeletedGroup -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-App" + $result.GroupTypes | Should -Be "Unified" + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupId is empty" { + { Get-EntraDeletedGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when GroupId is invalid" { + { Get-EntraDeletedGroup -GroupId ""} | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should return All deleted groups" { + $result = Get-EntraDeletedGroup -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 deleted group" { + $result = Get-EntraDeletedGroup -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-App" + $result.GroupTypes | Should -Be "Unified" + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return specific deleted group by filter" { + $result = Get-EntraDeletedGroup -Filter "DisplayName eq 'Mock-App'" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-App" + $result.GroupTypes | Should -Be "Unified" + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraDeletedGroup -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return specific deleted groupn by SearchString" { + $result = Get-EntraDeletedGroup -SearchString "Demo-Mock-App" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.MailNickname | Should -Be "Demo-Mock-App" + $result.DisplayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when searchstring is empty" { + { Get-EntraDeletedGroup -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Property parameter should work" { + $result = Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain GroupId in parameters when passed Id to it" { + $result = Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.DirectoryObjectId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraDeletedGroup -SearchString "Demo-Mock-App" + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "Mock-App" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedGroup" + $result = Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedGroup" + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 new file mode 100644 index 0000000000..b57241c64d --- /dev/null +++ b/testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraGroup with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "DisplayName" = "demo" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "MailEnabled" = "False" + "Description" = "test" + "MailNickname" = "demoNickname" + "SecurityEnabled" = "True" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraGroup" { + Context "Test for Get-EntraGroup" { + It "Should return specific group" { + $result = Get-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupId is empty" { + { Get-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when searchstring is empty" { + { Get-EntraGroup -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Should fail when filter is empty" { + { Get-EntraGroup -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should fail when Top is empty" { + { Get-EntraGroup -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraGroup -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return all group" { + $result = Get-EntraGroup -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraGroup -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + It "Should return specific group by searchstring" { + $result = Get-EntraGroup -SearchString 'demo' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'demo' + + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific group by filter" { + $result = Get-EntraGroup -Filter "DisplayName -eq 'demo'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'demo' + + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return top group" { + $result = Get-EntraGroup -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should Contain ObjectId" { + $result = Get-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain GroupId in parameters when passed GroupId to it" { + $result = Get-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.GroupId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraGroup -SearchString 'demo' + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "demo" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroup" + $result = Get-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroup" + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraGroup -SearchString 'demo' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..aef1d6a5f5 --- /dev/null +++ b/testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 @@ -0,0 +1,141 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + "AppRoleId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "CreatedDateTime" = "06-05-2024 05:42:01" + "DeletedDateTime" = $null + "PrincipalDisplayName" = "Mock-Group" + "PrincipalId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "ResourceId" = "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + "ResourceDisplayName" = "Mock-Group" + "PrincipalType" = "PrincipalType" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraGroupAppRoleAssignment" { +Context "Test for Get-EntraGroupAppRoleAssignment" { + It "Should return specific Group AppRole Assignment" { + $result = Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + $result.ResourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + + + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific Group AppRole Assignment with alias" { + $result = Get-EntraGroupAppRoleAssignment -objectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + $result.ResourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + + + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ObjectlId is empty" { + { Get-EntraGroupAppRoleAssignment -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when ObjectlId is invalid" { + { Get-EntraGroupAppRoleAssignment -GroupId ""} | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should return All Group AppRole Assignment" { + $result = Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + $result.ResourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + + + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 Group AppRole Assignment" { + $result = Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + $result.ResourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + + + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Property parameter should work" { + $result = Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.PrincipalDisplayName | Should -Be 'Mock-Group' + + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Result should Contain GroupId" { + $result = Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + } + It "Should contain GroupId in parameters when passed Id to it" { + $result = Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.GroupId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupAppRoleAssignment" + + $result = Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupAppRoleAssignment" + + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + + diff --git a/testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 new file mode 100644 index 0000000000..01c6b17d28 --- /dev/null +++ b/testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 @@ -0,0 +1,110 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AlternateNotificationEmails" = "admingroup@contoso.com" + "GroupLifetimeInDays" = 200 + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "ManagedGroupTypes" = "All" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraGroupLifecyclePolicy" { + Context "Test for Get-EntraGroupLifecyclePolicy" { + It "Retrieve all groupLifecyclePolicies" { + $result = Get-EntraGroupLifecyclePolicy + $result | Should -Not -BeNullOrEmpty + $result.GroupLifetimeInDays | Should -Be 200 + $result.AlternateNotificationEmails | Should -Be "admingroup@contoso.com" + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ManagedGroupTypes | Should -Be "All" + + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraGroupLifecyclePolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.GroupLifetimeInDays | Should -Be 200 + } + + It "Retrieve properties of an groupLifecyclePolicy" { + $result = Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.ObjectId | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.GroupLifetimeInDays | Should -Be 200 + $result.AlternateNotificationEmails | Should -Be "admingroup@contoso.com" + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ManagedGroupTypes | Should -Be "All" + + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when GroupLifecyclePolicyId is empty" { + { Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'*" + } + + It "Should fail when GroupLifecyclePolicyId is invalid" { + { Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string." + } + + It "Should contain GroupLifecyclePolicyId in parameters when passed GroupLifecyclePolicyId to it" { + $result = Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result.Parameters + $params.GroupLifecyclePolicyId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Property parameter should work" { + $result = Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupLifecyclePolicy" + + $result = Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupLifecyclePolicy" + + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 new file mode 100644 index 0000000000..15be33b616 --- /dev/null +++ b/testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "value"= @{ + "DisplayName" = "demo" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "@odata.type" = "#microsoft.graph.user" + "Description" = "test" + } + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraGroupMember" { + Context "Test for Get-EntraGroupMember" { + It "Should return specific group" { + $result = Get-EntraGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupId is invalid" { + { Get-EntraGroupMember -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should fail when GroupId is empty" { + { Get-EntraGroupMember -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when Top is empty" { + { Get-EntraGroupMember -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when Top is invalid" { + { Get-EntraGroupMember -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should return all group" { + $result = Get-EntraGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should return top group" { + $result = @(Get-EntraGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Property parameter should work" { + $result = Get-EntraGroupMember -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -top 1 -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraGroupMember -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupMember" + + $result = Get-EntraGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupMember" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraGroupMember -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 new file mode 100644 index 0000000000..2186d3ffba --- /dev/null +++ b/testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 @@ -0,0 +1,141 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $mockResponse = { + return @{ + value = @( + @{ + "DeletedDateTime" = $null + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.user" + "businessPhones" = @("425-555-0100") + "displayName" = "MOD Administrator" + "givenName" = "MOD" + "mail" = "admin@contoso.com" + "mobilePhone" = "425-555-0101" + "preferredLanguage" = "en" + "surname" = "Administrator" + "userPrincipalName" = "admin@contoso.com" + } + "Parameters" = $args + } + ) + } + } + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraGroupOwner" { + Context "Test for Get-EntraGroupOwner" { + It "Get a group owner by GroupId" { + $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + $result.DeletedDateTime | should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Get a group owner by alias" { + $result = Get-EntraGroupOwner -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + $result.DeletedDateTime | should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when GroupId is empty" { + { Get-EntraGroupOwner -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Get-EntraGroupOwner -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Gets all group owners" { + $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Gets two group owners" { + $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 2 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top XY} | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should Contain GroupId" { + $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $groupId= $params | ConvertTo-json | ConvertFrom-Json + $groupId.Uri -match "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -BeTrue + } + + It "Property parameter should work" { + $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupOwner" + + $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupOwner" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 new file mode 100644 index 0000000000..f7f49d1640 --- /dev/null +++ b/testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AlternateNotificationEmails" = "admingroup@contoso.com" + "GroupLifetimeInDays" = 200 + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "ManagedGroupTypes" = "All" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgGroupLifecyclePolicyByGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraLifecyclePolicyGroup" { + Context "Test for Get-EntraLifecyclePolicyGroup" { + It "Retrieve lifecycle policy object" { + $result = Get-EntraLifecyclePolicyGroup -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result | Should -Not -BeNullOrEmpty + $result.ObjectId | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.GroupLifetimeInDays | Should -Be 200 + $result.AlternateNotificationEmails | Should -Be "admingroup@contoso.com" + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ManagedGroupTypes | Should -Be "All" + + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Retrieve lifecycle policy object with alias" { + $result = Get-EntraLifecyclePolicyGroup -Id "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result | Should -Not -BeNullOrEmpty + $result.ObjectId | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.GroupLifetimeInDays | Should -Be 200 + $result.AlternateNotificationEmails | Should -Be "admingroup@contoso.com" + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ManagedGroupTypes | Should -Be "All" + + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when GroupId is empty" { + { Get-EntraLifecyclePolicyGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Get-EntraLifecyclePolicyGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + $result = Get-EntraLifecyclePolicyGroup -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $params = Get-Parameters -data $result.Parameters + $params.GroupId | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + } + + It "Property parameter should work" { + $result = Get-EntraLifecyclePolicyGroup -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraLifecyclePolicyGroup -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraLifecyclePolicyGroup" + + $result = Get-EntraLifecyclePolicyGroup -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraLifecyclePolicyGroup" + + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraLifecyclePolicyGroup -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 new file mode 100644 index 0000000000..aaf8c9088c --- /dev/null +++ b/testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraObjectSetting with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + id = "bbbbbbbb-1111-2222-3333-cccccccccccc" + displayName = 'Group.Unified.Guest' + values = @{value=$false; name="AllowToAddGuests"} + templateId = "bbbbbbbb-1111-2222-3333-cccccccccaaa" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups +} + +Describe "Get-EntraObjectSetting" { + Context "Test for Get-EntraObjectSetting" { + It "Should return specific Object Setting" { + $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + } + It "Should fail when TargetType is empty" { + { Get-EntraObjectSetting -TargetType } | Should -Throw "Missing an argument for parameter 'TargetType'*" + } + It "Should fail when Top is empty" { + { Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return all Object Setting" { + $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should return top Object Setting" { + $result = @(Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + } + It "Should contain ID in parameters when passed TargetType TargetObjectId to it" { + $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraObjectSetting" + $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraObjectSetting" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + It "Should contain property when passed property to it" { + $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName + $result.displayName | Should -Not -BeNullOrEmpty + } + } +} diff --git a/testVNext/Entra/Groups/Invalid.Tests.ps1 b/testVNext/Entra/Groups/Invalid.Tests.ps1 new file mode 100644 index 0000000000..6d5381a100 --- /dev/null +++ b/testVNext/Entra/Groups/Invalid.Tests.ps1 @@ -0,0 +1,105 @@ +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra +} + +Describe "Invalid Tests"{ + It "Should fail when parameters are invalid"{ + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object{ + $command = Get-Command $_ + { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." + } + } + It "Should fail with 'TenantId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ + $commandScriptBlock = [scriptblock]::Create("$command -TenantId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'TenantId'.*" + } + } + } + It "Should fail with 'Id' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Id'){ + $commandScriptBlock = [scriptblock]::Create("$command -Id $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + } + } + It "Should fail with 'ObjectId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ + $commandScriptBlock = [scriptblock]::Create("$command -ObjectId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'ObjectId'.*" + } + } + } + It "Should fail with 'All' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'All'){ + $commandScriptBlock = [scriptblock]::Create("$command -All `$True") + if('Find-EntraPermission' -eq $command){ + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'*" + } + else { + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + } + } + } + It "Should fail with 'Top' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Top'){ + $commandScriptBlock = [scriptblock]::Create("$command -Top ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Top'*" + } + } + } + It "Should fail with 'Filter' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ + $commandScriptBlock = [scriptblock]::Create("$command -Filter ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + } + } + It "Should fail with 'SearchString' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ + $commandScriptBlock = [scriptblock]::Create("$command -SearchString ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + } + } + It "Should fail with exception when no parameter is passed" { + $cmdlets = @( + @{ CmdletName = 'Enable-EntraDirectoryRole'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + @{ CmdletName = 'New-EntraConditionalAccessPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraNamedLocationPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraPermissionGrantPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + ) + $cmdlets | ForEach-Object { + $commandName = $_.CmdletName + $Exception = $_.Exception + $commandScriptBlock = [scriptblock]::Create("$commandName -ErrorAction Stop") + try { + Invoke-Command -ScriptBlock $commandScriptBlock + } + catch { $_ -match $Exception | Should -BeTrue } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Groups/Module.Tests.ps1 b/testVNext/Entra/Groups/Module.Tests.ps1 new file mode 100644 index 0000000000..cc40ad720b --- /dev/null +++ b/testVNext/Entra/Groups/Module.Tests.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Entra Module" { + Context "On module import" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + } + + It "Should have exported commands" { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo | Should -Not -BeNullOrEmpty + $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 + + } + + It 'Should be compatible with PS core and desktop' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } + + It 'Should point to script module' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + } + + It 'Should lock GUID' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" + } + + It "Module import should not write to error and information streams" { + $ps = [powershell]::Create() + $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + "Checking Information stream" | Out-Host + $ps.Streams.Information.Count | Should -Be 0 + "Checking Error stream" | Out-Host + $ps.Streams.Error.Count | Should -Be 0 + "Checking Verbose stream" | Out-Host + $ps.Streams.Verbose.Count | Should -Be 0 + "Checking Debug stream" | Out-Host + $ps.Streams.Warning.Count | Should -Be 0 + "Checking Progress stream" | Out-Host + $ps.Streams.Progress.Count | Should -Be 0 + + $ps.Dispose() + } + } +} diff --git a/testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 b/testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 new file mode 100644 index 0000000000..6c16d0b3ed --- /dev/null +++ b/testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + #Write-Host "Mocking New-EntraGroup with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "DisplayName" = "demo" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "MailEnabled" = "False" + "Description" = "test" + "MailNickname" = "demoNickname" + "SecurityEnabled" = "True" + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraGroup" { + Context "Test for New-EntraGroup" { + It "Should return created Group" { + $result = New-EntraGroup -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "demo" + $result.MailEnabled | should -Be "False" + $result.SecurityEnabled | should -Be "True" + $result.Description | should -Be "test" + + Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when parameters are invalid" { + { New-EntraGroup -DisplayName "" -MailEnabled "" -SecurityEnabled "" -MailNickName "" -Description "" } | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when parameters are empty" { + { New-EntraGroup -DisplayName -MailEnabled -SecurityEnabled -MailNickName -Description } | Should -Throw "Missing an argument for parameter*" + } + It "Result should Contain ObjectId" { + $result = New-EntraGroup -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroup" + $result = New-EntraGroup -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroup" + Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraGroup -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..efc0c14305 --- /dev/null +++ b/testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 @@ -0,0 +1,117 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AppRoleId" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "CreatedDateTime" = "06-05-2024 05:42:01" + "DeletedDateTime" = $null + "PrincipalDisplayName" = "Mock-Group" + "PrincipalId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "ResourceId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "ResourceDisplayName" = "Mock-Group" + "PrincipalType" = "PrincipalType" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#groups('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb')/appRoleAssignments/$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraGroupAppRoleAssignment" { +Context "Test for New-EntraGroupAppRoleAssignment" { + It "Should return created Group AppRole Assignment" { + $result = New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.ResourceId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return created Group AppRole Assignment with alias" { + $result = New-EntraGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.ResourceId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ObjectlId is empty" { + { New-EntraGroupAppRoleAssignment -GroupId -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when ObjectlId is invalid" { + { New-EntraGroupAppRoleAssignment -GroupId "" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should fail when PrincipalId is empty" { + { New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'PrincipalId'*" + } + It "Should fail when PrincipalId is invalid" { + { New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'PrincipalId' because it is an empty string." + } + It "Should fail when ResourceId is empty" { + { New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'ResourceId'*" + } + It "Should fail when ResourceId is invalid" { + { New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'ResourceId' because it is an empty string." + } + It "Should fail when Id is empty" { + { New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -AppRoleId } | Should -Throw "Missing an argument for parameter 'AppRoleId'*" + } + It "Should fail when Id is invalid" { + { New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -AppRoleId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleId' because it is an empty string." + } + It "Result should Contain GroupId" { + $result = New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + } + It "Should contain AppRoleId in parameters when passed Id to it" { + $result = New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroupAppRoleAssignment" + + $result = New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroupAppRoleAssignment" + + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 b/testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 new file mode 100644 index 0000000000..f6eb58547b --- /dev/null +++ b/testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 @@ -0,0 +1,87 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + "AlternateNotificationEmails" = "example@contoso.com" + "GroupLifetimeInDays" = "99" + "ManagedGroupTypes" = "Selected" + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraGroupLifecyclePolicy" { + Context "Test for New-EntraGroupLifecyclePolicy" { + It "Should return created GroupLifecyclePolicy" { + $result = New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + $result.GroupLifetimeInDays | should -Be "99" + $result.ManagedGroupTypes | should -Be "Selected" + $result.AlternateNotificationEmails | should -Be "example@contoso.com" + + Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupLifetimeInDays is invalid" { + { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays a -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Cannot process argument transformation on parameter 'GroupLifetimeInDays'.*" + } + It "Should fail when GroupLifetimeInDays is empty" { + { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Missing an argument for parameter 'GroupLifetimeInDays'.*" + } + It "Should fail when ManagedGroupTypes is invalid" { + { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes "" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Cannot bind argument to parameter 'ManagedGroupTypes' because it is an empty string.*" + } + It "Should fail when ManagedGroupTypes is empty" { + { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Missing an argument for parameter 'ManagedGroupTypes'.*" + } + It "Should fail when AlternateNotificationEmails is invalid" { + { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes "Selected" -AlternateNotificationEmails "" } | Should -Throw "Cannot bind argument to parameter 'AlternateNotificationEmails' because it is an empty string.*" + } + It "Should fail when AlternateNotificationEmails is empty" { + { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes "Selected" -AlternateNotificationEmails } | Should -Throw "Missing an argument for parameter 'AlternateNotificationEmails'.*" + } + It "Result should Contain ObjectId" { + $result = New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" + $result.ObjectId | should -Be "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroupLifecyclePolicy" + + $result = New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroupLifecyclePolicy" + + Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays 99 -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 new file mode 100644 index 0000000000..2027087493 --- /dev/null +++ b/testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgGroup -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraGroup" { + Context "Test for Remove-EntraGroup" { + It "Should return empty object" { + $result = Remove-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraGroup -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupId is invalid" { + { Remove-EntraGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should fail when GroupId is empty" { + { Remove-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Remove-MgGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroup" + + Remove-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroup" + + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..ae40a78f57 --- /dev/null +++ b/testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraGroupAppRoleAssignment" { + Context "Test for Remove-EntraGroupAppRoleAssignment" { + It "Should return empty object" { + $result = Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with Alias" { + $result = Remove-EntraGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupId is empty" { + { Remove-EntraGroupAppRoleAssignment -GroupId -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when GroupId is invalid" { + { Remove-EntraGroupAppRoleAssignment -GroupId "" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should fail when AppRoleAssignmentId is empty" { + { Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'AppRoleAssignmentId'*" + } + It "Should fail when AppRoleAssignmentId is invalid" { + { Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleAssignmentId' because it is an empty string." + } + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupAppRoleAssignment" + + Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupAppRoleAssignment" + + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 new file mode 100644 index 0000000000..9fd8573ed7 --- /dev/null +++ b/testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraGroupLifecyclePolicy" { + Context "Test for Remove-EntraGroupLifecyclePolicy" { + It "Should remove a groupLifecyclePolicies" { + $result = Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraGroupLifecyclePolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupLifecyclePolicyId is empty" { + { Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'*" + } + + It "Should fail when GroupLifecyclePolicyId is invalid" { + { Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string." + } + + It "Should contain GroupLifecyclePolicyId in parameters when passed GroupLifecyclePolicyId to it" { + Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result + $params.GroupLifecyclePolicyId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupLifecyclePolicy" + + Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupLifecyclePolicy" + + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 new file mode 100644 index 0000000000..cc7fe1b85e --- /dev/null +++ b/testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgGroupMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraGroupMember" { + Context "Test for Remove-EntraGroupMember" { + It "Should reemove a member" { + $result = Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when GroupId is empty" { + { Remove-EntraGroupMember -GroupId -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Remove-EntraGroupMember -GroupId "" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should fail when MemberId is empty" { + { Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId } | Should -Throw "Missing an argument for parameter 'MemberId'*" + } + + It "Should fail when MemberId is invalid" { + { Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "" } | Should -Throw "Cannot bind argument to parameter 'MemberId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Remove-MgGroupMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "11112222-bbbb-3333-cccc-4444dddd5555" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupMember" + + Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupMember" + + Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 new file mode 100644 index 0000000000..84decd9dd7 --- /dev/null +++ b/testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraGroupOwner" { + Context "Test for Remove-EntraGroupOwner" { + It "Should remove an owner" { + $result = Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when GroupId is empty" { + { Remove-EntraGroupOwner -GroupId -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Remove-EntraGroupOwner -GroupId "" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should fail when OwnerId is empty" { + { Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId } | Should -Throw "Missing an argument for parameter 'OwnerId'*" + } + + It "Should fail when OwnerId is invalid" { + { Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "" } | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "11112222-bbbb-3333-cccc-4444dddd5555" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupOwner" + + Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupOwner" + + Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 new file mode 100644 index 0000000000..952dacff0a --- /dev/null +++ b/testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Value" = $true + "Parameters" = $args + } + ) + } + Mock -CommandName Remove-MgGroupFromLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraLifecyclePolicyGroup" { + Context "Test for Remove-EntraLifecyclePolicyGroup" { + It "Should remove a group from a lifecycle policy" { + $result = Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" + $result.Value | Should -Be $true + + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should remove a group from a lifecycle policy with alias" { + $result = Remove-EntraLifecyclePolicyGroup -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" + $result.Value | Should -Be $true + + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when GroupLifecyclePolicyId is empty" { + { Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'*" + } + + It "Should fail when GroupLifecyclePolicyId is invalid" { + { Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string." + } + + It "Should fail when GroupId is empty" { + { Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should contain GroupLifecyclePolicyId in parameters when passed GroupLifecyclePolicyId to it" { + $result = Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "bea81df1-91cb-4b6e-aa79-b40888fe0b8b" + $params = Get-Parameters -data $result.Parameters + $params.GroupLifecyclePolicyId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + $result = Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" + $params = Get-Parameters -data $result.Parameters + $params.GroupId | Should -Be "ccccdddd-2222-eeee-3333-ffff4444aaaa" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraLifecyclePolicyGroup" + + Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraLifecyclePolicyGroup" + + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 b/testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 new file mode 100644 index 0000000000..b4ec976946 --- /dev/null +++ b/testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-MgRenewGroup -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Reset-EntraLifeCycleGroup" { + Context "Test for Reset-EntraLifeCycleGroup" { + It "Should renews a specified group" { + $result = Reset-EntraLifeCycleGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Id is empty" { + { Reset-EntraLifeCycleGroup -Id } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + + It "Should fail when Id is invalid" { + { Reset-EntraLifeCycleGroup -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed Id to it" { + Mock -CommandName Invoke-MgRenewGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Reset-EntraLifeCycleGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Reset-EntraLifeCycleGroup" + + Reset-EntraLifeCycleGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Reset-EntraLifeCycleGroup" + + Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Reset-EntraLifeCycleGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 b/testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 new file mode 100644 index 0000000000..4d8dcd66c3 --- /dev/null +++ b/testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgContactMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Select-EntraGroupIdsContactIsMemberOf" { + Context "Test for Select-EntraGroupIdsContactIsMemberOf" { + It "Should return specific Contact Membership" { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $UserID = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result = Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups + $result | Should -Not -BeNullOrEmpty + $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when ObjectId is missing" { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + { Select-EntraGroupIdsContactIsMemberOf -ObjectId -GroupIdsForMembershipCheck $Groups } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + + It "Should fail when ObjectId is empty" { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + { Select-EntraGroupIdsContactIsMemberOf -ObjectId "" -GroupIdsForMembershipCheck $Groups } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should fail when GroupIdsForMembershipCheck is empty" { + $UserID = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + { Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck } | Should -Throw "Missing an argument for parameter 'GroupIdsForMembershipCheck'*" + } + + It "Should fail when GroupIdsForMembershipCheck is invalid" { + $UserID = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + { Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck "xyz" } | Should -Throw "Cannot process argument transformation on parameter 'GroupIdsForMembershipCheck'.*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsContactIsMemberOf" + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $UserID = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result = Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsContactIsMemberOf" + + Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $UserID = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Select-EntraGroupIdsContactIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 b/testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 new file mode 100644 index 0000000000..8171a0356c --- /dev/null +++ b/testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "Parameters" = $args + } + ) + } + $scriptblock2 = { + # Write-Host "Mocking Get-EntraGroup with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "DisplayName" = "demo" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "MailEnabled" = "False" + "Description" = "test" + "MailNickname" = "demoNickname" + "SecurityEnabled" = "True" + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgGroupMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgGroup -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra +} + +Describe "Select-EntraGroupIdsGroupIsMemberOf" { + Context "Test for Select-EntraGroupIdsGroupIsMemberOf" { + It "Should return specific Group Membership" { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $GroupID = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result = Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupID -GroupIdsForMembershipCheck $Groups + $result | Should -Not -BeNullOrEmpty + $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when ObjectId is missing" { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + { Select-EntraGroupIdsGroupIsMemberOf -ObjectId -GroupIdsForMembershipCheck $Groups } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + + It "Should fail when ObjectId is empty" { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + { Select-EntraGroupIdsGroupIsMemberOf -ObjectId "" -GroupIdsForMembershipCheck $Groups } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should fail when GroupIdsForMembershipCheck is empty" { + $GroupID = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + { Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupID -GroupIdsForMembershipCheck } | Should -Throw "Missing an argument for parameter 'GroupIdsForMembershipCheck'*" + } + + It "Should fail when GroupIdsForMembershipCheck is invalid" { + $GroupID = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + { Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupID -GroupIdsForMembershipCheck "Xy" } | Should -Throw "Cannot process argument transformation on parameter 'GroupIdsForMembershipCheck'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsGroupIsMemberOf" + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $GroupID = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupID -GroupIdsForMembershipCheck $Groups + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsGroupIsMemberOf" + + Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $GroupID = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Select-EntraGroupIdsGroupIsMemberOf -ObjectId $GroupID -GroupIdsForMembershipCheck $Groups -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 b/testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 new file mode 100644 index 0000000000..ef839b024c --- /dev/null +++ b/testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 @@ -0,0 +1,79 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgUserMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Select-EntraGroupIdsUserIsMemberOf" { + Context "Test for Select-EntraGroupIdsUserIsMemberOf" { + It "Should return group membership id's" { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $userID = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result = Select-entraGroupIdsUserIsMemberOf -ObjectId $UserId -GroupIdsForMembershipCheck $Groups + $result | Should -Not -BeNullOrEmpty + $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserID is invalid " { + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $UserID = "" + { Select-EntraGroupIdsUserIsMemberOf -ObjectId $UserID -GroupIdsForMembershipCheck $Groups } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-entraGroupIdsUserIsMemberOf" + + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $userID = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result = Select-entraGroupIdsUserIsMemberOf -ObjectId $UserId -GroupIdsForMembershipCheck $Groups + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-entraGroupIdsUserIsMemberOf" + + Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $Groups = New-Object Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck + $Groups.GroupIds = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $userID = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Select-entraGroupIdsUserIsMemberOf -ObjectId $UserId -GroupIdsForMembershipCheck $Groups -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + + } +} + diff --git a/testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 b/testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 new file mode 100644 index 0000000000..13be7dbd23 --- /dev/null +++ b/testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgGroup -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraGroup" { + Context "Test for Set-EntraGroup" { + It "Should return empty object" { + $result = Set-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Set-EntraGroup -Id bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when GroupId is invalid" { + { Set-EntraGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should fail when GroupId is empty" { + { Set-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Update-MgGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraGroup" + + Set-EntraGroup -Id bbbbbbbb-1111-2222-3333-cccccccccccc + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraGroup" + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraGroup -Id bbbbbbbb-1111-2222-3333-cccccccccccc } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 b/testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 new file mode 100644 index 0000000000..a215df6447 --- /dev/null +++ b/testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + "AlternateNotificationEmails" = "admingroup@contoso.com" + "GroupLifetimeInDays" = "100" + "ManagedGroupTypes" = "All" + "Parameters" = $args + } + ) + } + + Mock -CommandName Update-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraGroupLifecyclePolicy" { + Context "Test for Set-EntraGroupLifecyclePolicy" { + It "Should return updated GroupLifecyclePolicy" { + $result = Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + $result.GroupLifetimeInDays | should -Be "100" + $result.ManagedGroupTypes | should -Be "All" + $result.AlternateNotificationEmails | should -Be "admingroup@contoso.com" + + Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Set-EntraGroupLifecyclePolicy -Id "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" + $result | Should -Not -BeNullOrEmpty + } + It "Should fail when GroupLifecyclePolicyId is invalid" { + { Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "" -GroupLifetimeInDays a -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string.*" + } + It "Should fail when GroupLifecyclePolicyId is empty" { + { Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId -GroupLifetimeInDays -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'.*" + } + It "Should fail when GroupLifetimeInDays is invalid" { + { Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays a -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Cannot process argument transformation on parameter 'GroupLifetimeInDays'.*" + } + It "Should fail when GroupLifetimeInDays is empty" { + { Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Missing an argument for parameter 'GroupLifetimeInDays'.*" + } + It "Should fail when ManagedGroupTypes is empty" { + { Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays 99 -ManagedGroupTypes -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Missing an argument for parameter 'ManagedGroupTypes'.*" + } + It "Should fail when AlternateNotificationEmails is empty" { + { Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays 99 -ManagedGroupTypes "Selected" -AlternateNotificationEmails } | Should -Throw "Missing an argument for parameter 'AlternateNotificationEmails'.*" + } + It "Result should Contain ObjectId" { + $result = Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" + $result.ObjectId | should -Be "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraGroupLifecyclePolicy" + + $result = Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraGroupLifecyclePolicy" + + Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Groups/Valid.Tests.ps1 b/testVNext/Entra/Groups/Valid.Tests.ps1 new file mode 100644 index 0000000000..5013e83278 --- /dev/null +++ b/testVNext/Entra/Groups/Valid.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + + $module = Get-Module -Name Microsoft.Graph.Entra +} + +Describe "Valid parameter Tests"{ + Context "Test for valid parameters"{ + It "Should return empty object with Id parameter"{ + Write-Host "--------Start mock remove cmdlets with Id parameter only--------" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) + if($params.count -eq 1 -and $params -eq 'Id'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "---------End mock remove cmdlets with Id parameter only---------" + } + It "Should return empty object with ObjectId param"{ + Write-Host "-----Start mock remove cmdlets with ObjectId parameter only-----" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + if($params.count -eq 1 -and $params -eq 'ObjectId'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "------End mock remove cmdlets with ObjectId parameter only------" + } + # It "Should pass with 'Id' or 'ObjectId' parameter" { + # $count=0 + # $module.ExportedCommands.Keys | ForEach-Object { + + # $command = Get-Command $_ + # if ($command.Name.StartsWith('Remove')) + # { + # $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + # if($params.count -eq 1 -and ($params -eq 'ObjectId' -or $params-eq 'Id')){ + # $stringParams = $params -join ',' + # Write-Host "$command | $stringParams" + # $count++ + # } + # } + # } + # Write-Host $count + # } + } +} \ No newline at end of file diff --git a/testVNext/Entra/New-EntraInvitation.Tests.ps1 b/testVNext/Entra/New-EntraInvitation.Tests.ps1 new file mode 100644 index 0000000000..ef281ac534 --- /dev/null +++ b/testVNext/Entra/New-EntraInvitation.Tests.ps1 @@ -0,0 +1,230 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + "InviteRedeemUrl" = "https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-ccca95d4390e%26user%3d3135a58d-b417-40ae-bb44-a82df52b7957%26ticket%3dzbiyasVbMTkRKVom98YD%25252fOJvkr2WRQsI2Om6Z62TDYg%25253d%26ver%3d2.0" + "InviteRedirectUrl" = "http://myapps.contoso.com/" + "InvitedUser" = @{ + "AboutMe" = "" + "AccountEnabled" = "" + "Activities" = "" + "AgeGroup" = "" + "AgreementAcceptances" = "" + "AppRoleAssignments" = "" + "AssignedLicenses" = "" + "AssignedPlans" = "" + "Authentication" = "" + "AuthorizationInfo" = "" + "Birthday" = "" + "BusinessPhones" = "" + "Calendar" = "" + "CalendarGroups" = "" + "CalendarView" = "" + "Calendars" = "" + "Chats" = "" + "City" = "" + "CompanyName" = "" + "ConsentProvidedForMinor" = "" + "ContactFolders" = "" + "Contacts" = "" + "Country" = "" + "CreatedDateTime" = "" + "CreatedObjects" = "" + "CreationType" = "" + "CustomSecurityAttributes" = "" + "DeletedDateTime" = "" + "Department" = "" + "DeviceEnrollmentLimit" = "" + "DeviceManagementTroubleshootingEvents" = "" + "DirectReports" = "" + "DisplayName" = "" + "Drive" = "" + "Drives" = "" + "EmployeeExperience" = "" + "EmployeeHireDate" = "" + "EmployeeId" = "" + "EmployeeLeaveDateTime" = "" + "EmployeeOrgData" = "" + "EmployeeType" = "" + "Events" = "" + "Extensions" = "" + "ExternalUserState" = "" + "ExternalUserStateChangeDateTime" = "" + "FaxNumber" = "" + "FollowedSites" = "" + "GivenName" = "" + "HireDate" = "" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "Identities" = "" + "ImAddresses" = "" + "InferenceClassification" = "" + "Insights" = "" + "Interests" = "" + "IsResourceAccount" = "" + "JobTitle" = "" + "JoinedTeams" = "" + "LastPasswordChangeDateTime" = "" + "LegalAgeGroupClassification" = "" + "LicenseAssignmentStates" = "" + "LicenseDetails" = "" + "Mail" = "" + "MailFolders" = "" + "MailNickname" = "" + "MailboxSettings" = "" + "ManagedAppRegistrations" = "" + "ManagedDevices" = "" + "Manager" = "" + "MemberOf" = "" + "Messages" = "" + "MobilePhone" = "" + "MySite" = "" + "Oauth2PermissionGrants" = "" + "OfficeLocation" = "" + "OnPremisesDistinguishedName" = "" + "OnPremisesDomainName" = "" + "OnPremisesExtensionAttributes" = "" + "OnPremisesImmutableId" = "" + "OnPremisesLastSyncDateTime" = "" + "OnPremisesProvisioningErrors" = "" + "OnPremisesSamAccountName" = "" + "OnPremisesSecurityIdentifier" = "" + "OnPremisesSyncEnabled" = "" + "OnPremisesUserPrincipalName" = "" + "Onenote" = "" + "OnlineMeetings" = "" + "OtherMails" = "" + "Outlook" = "" + "OwnedDevices" = "" + "OwnedObjects" = "" + "PasswordPolicies" = "" + "PasswordProfile" = "" + "PastProjects" = "" + "People" = "" + "PermissionGrants" = "" + "Photo" = "" + "Photos" = "" + "Planner" = "" + "PostalCode" = "" + "PreferredDataLocation" = "" + "PreferredLanguage" = "" + "PreferredName" = "" + "Presence" = "" + "Print" = "" + "ProvisionedPlans" = "" + "ProxyAddresses" = "" + "RegisteredDevices" = "" + "Responsibilities" = "" + "Schools" = "" + "ScopedRoleMemberOf" = "" + "SecurityIdentifier" = "" + "ServiceProvisioningErrors" = "" + "Settings" = "" + "ShowInAddressList" = "" + "SignInActivity" = "" + "SignInSessionsValidFromDateTime" = "" + "Skills" = "" + "State" = "" + "StreetAddress" = "" + "Surname" = "" + "Teamwork" = "" + "Todo" = "" + "TransitiveMemberOf" = "" + "UsageLocation" = "" + "UserPrincipalName" = "SawyerM@contoso.com" + "UserType" = "Guest" + } + "InvitedUserDisplayName" = "" + "InvitedUserEmailAddress" = "SawyerM@contoso.com" + "InvitedUserMessageInfo" = @{ + "CcRecipients" = [System.Object]@() + "CustomizedMessageBody" = "" + "MessageLanguage" = "" + } + "InvitedUserType" = "Guest" + "ResetRedemption" = $false + "SendInvitationMessage" = $true + "Status" = "PendingAcceptance" + "AdditionalProperties" = @{ + "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#invitations/$entity" + } + "Parameters" = $args + } + ) + } + Mock -CommandName New-MgInvitation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraInvitation" { + Context "Test for New-EntraInvitation" { + It "Should invite a new external user to your directory" { + $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result.Status | Should -Be "PendingAcceptance" + $result.InvitedUser.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.InvitedUser.UserPrincipalName | Should -Be "SawyerM@contoso.com" + $result.InvitedUser.UserType | Should -Be "Guest" + $result.InvitedUserEmailAddress | Should -Be "SawyerM@contoso.com" + $result.InvitedUserType | Should -Be "Guest" + $result.ResetRedemption | Should -Be $false + $result.SendInvitationMessage | Should -Be $true + $result.InvitedUserDisplayName | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when parameters are empty" { + { New-EntraInvitation -InvitedUserEmailAddress -SendInvitationMessage -InviteRedirectUrl } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when InviteRedirectUrl parameter are Invalid" { + { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "" } | Should -Throw "Cannot bind argument to parameter 'InviteRedirectUrl' because it is an empty string." + } + + It "Should fail when SendInvitationMessage parameter are Invalid" { + { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage "123" -InviteRedirectUrl "http://myapps.contoso.com" } | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when InvitedUserEmailAddress parameter are Invalid" { + { New-EntraInvitation -InvitedUserEmailAddress "" -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" } | Should -Throw "Cannot bind argument to parameter 'InvitedUserEmailAddress' because it is an empty string." + } + + It "Should contain ObjectId in result" { + $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" + $result.ObjectId | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraInvitation" + $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraInvitation" + Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Reports/Entra.Tests.ps1 b/testVNext/Entra/Reports/Entra.Tests.ps1 new file mode 100644 index 0000000000..51b69725fe --- /dev/null +++ b/testVNext/Entra/Reports/Entra.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ + Import-Module .\bin\Microsoft.Graph.Entra.Reports.psd1 -Force +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra.Reports).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config diff --git a/testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 b/testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 new file mode 100644 index 0000000000..e18155a03a --- /dev/null +++ b/testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Reports) -eq $null) { + Import-Module Microsoft.Graph.Entra.Reports + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraAuditDirectoryLog with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + category = 'DirectoryManagement' + resultReason = 'Successfully deleted [0] records for [[LicenseKey:][TenantId:bbbbbbbb-1111-2222-3333-ccccccccccc2][UserName:][UserObjectId:bbbbbbbb-1111-2222-3333-ccccccccccc1][HomeTenantId:bbbbbbbb-1111-2222-3333-cccccccccccc][AzureSovereign:WorldWide]]' + id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + operationType = 'Delete' + loggedByService = 'Azure MFA12' + additionalDetails = @{ key = 'RequestId'; value = '00000000-0000-0000-0000-000000000000' } + activityDisplayName = 'DeleteDataFromBackend' + targetResources = @( + @{ + userPrincipalName = '' + groupType = '' + id = 'bbbbbbbb-1111-2222-3333-cccccccccaaa' + type = 'User' + displayName = '' + modifiedProperties = @() + } + ) + correlationId = 'bbbbbbbb-1111-2222-3333-cccccccccrrr' + result = 'success' + initiatedBy = @{ app = ''; user = '' } + activityDateTime = '06/19/2024 9:52:22 am' + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Reports +} + +Describe "Get-EntraAuditDirectoryLog" { + Context "Test for Get-EntraAuditDirectoryLog" { + It "Should return specific Audit Directory Logs" { + $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraAuditDirectoryLog -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when filter is empty" { + { Get-EntraAuditDirectoryLog -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should fail when Top is empty" { + { Get-EntraAuditDirectoryLog -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraAuditDirectoryLog -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return all Audit Directory Logs" { + $result = Get-EntraAuditDirectoryLog -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should return specific Audit Directory Logs by filter" { + $result = Get-EntraAuditDirectoryLog -Filter "correlationId eq 'bbbbbbbb-1111-2222-3333-cccccccccrrr'" + $result | Should -Not -BeNullOrEmpty + $result.id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should return top Audit Directory Logs" { + $result = @(Get-EntraAuditDirectoryLog -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should contain ID in parameters when passed Id to it" { + $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Reports + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuditDirectoryLog" + $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 b/testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 new file mode 100644 index 0000000000..4334a5845b --- /dev/null +++ b/testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 @@ -0,0 +1,122 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Reports) -eq $null) { + Import-Module Microsoft.Graph.Entra.Reports + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraAuditSignInLog with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + conditionalAccessStatus = 'success' + userId = 'bbbbbbbb-1111-2222-3333-cccccccccccc' + riskLevelDuringSignIn = 'none' + userPrincipalName = 'test@m365x99297270.onmicrosoft.com' + resourceDisplayName = 'Windows Azure Active SignIn' + riskEventTypes_v2 = @{} + ipAddress = '2409:40c2:401d:1cab:9464:4580:6282:b375' + status = @{} + clientAppUsed = 'Mobile Apps and Desktop clients' + isInteractive = 'True' + createdDateTime = '06/21/2024 7:07:42 am' + correlationId = 'bbbbbbbb-1111-2222-3333-cccccccccc11' + userDisplayName = 'MOD Administrator' + location = @{} + riskDetail = 'none' + appDisplayName = 'Azure Active SignIn PowerShell' + id = 'bbbbbbbb-1111-2222-3333-cccccccccc22' + appliedConditionalAccessPolicies =@{} + deviceDetail = @{} + riskLevelAggregated = 'none' + appId = 'bbbbbbbb-1111-2222-3333-cccccccccc55' + resourceId = 'bbbbbbbb-1111-2222-3333-cccccccccc66' + riskEventTypes = @{} + riskState = 'none' + + + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Reports +} + +Describe "Get-EntraAuditSignInLog" { + Context "Test for Get-EntraAuditSignInLog" { + It "Should return specific Audit SignIn Logs" { + $result = Get-EntraAuditSignInLog -SignInId "bbbbbbbb-1111-2222-3333-cccccccccc22" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc22' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should return specific Audit SignIn Logs with alias" { + $result = Get-EntraAuditSignInLog -Id "bbbbbbbb-1111-2222-3333-cccccccccc22" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc22' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should fail when SignInId is empty" { + { Get-EntraAuditSignInLog -SignInId } | Should -Throw "Missing an argument for parameter 'SignInId'*" + } + It "Should fail when filter is empty" { + { Get-EntraAuditSignInLog -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should fail when Top is empty" { + { Get-EntraAuditSignInLog -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraAuditSignInLog -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return all Audit SignIn Logs" { + $result = Get-EntraAuditSignInLog -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraAuditSignInLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should return specific Audit SignIn Logs by filter" { + $result = Get-EntraAuditSignInLog -Filter "correlationId eq 'bbbbbbbb-1111-2222-3333-cccccccccc11'" + $result | Should -Not -BeNullOrEmpty + $result.id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc22' + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should return top Audit SignIn Logs" { + $result = @(Get-EntraAuditSignInLog -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + It "Should contain ID in parameters when passed Id to it" { + $result = Get-EntraAuditSignInLog -SignInId "bbbbbbbb-1111-2222-3333-cccccccccc22" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc22" + } + It "Should contain 'User-Agent' header" { + Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Reports + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuditSignInLog" + $result = Get-EntraAuditSignInLog -SignInId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraAuditSignInLog -SignInId "bbbbbbbb-1111-2222-3333-cccccccccc22" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Reports/Invalid.Tests.ps1 b/testVNext/Entra/Reports/Invalid.Tests.ps1 new file mode 100644 index 0000000000..f0eafa64d0 --- /dev/null +++ b/testVNext/Entra/Reports/Invalid.Tests.ps1 @@ -0,0 +1,105 @@ +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ + Import-Module Microsoft.Graph.Entra.Reports +} + +Describe "Invalid Tests"{ + It "Should fail when parameters are invalid"{ + $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module.ExportedCommands.Keys | ForEach-Object{ + $command = Get-Command $_ + { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." + } + } + It "Should fail with 'TenantId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ + $commandScriptBlock = [scriptblock]::Create("$command -TenantId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'TenantId'.*" + } + } + } + It "Should fail with 'Id' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Id'){ + $commandScriptBlock = [scriptblock]::Create("$command -Id $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + } + } + It "Should fail with 'ObjectId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ + $commandScriptBlock = [scriptblock]::Create("$command -ObjectId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'ObjectId'.*" + } + } + } + It "Should fail with 'All' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'All'){ + $commandScriptBlock = [scriptblock]::Create("$command -All `$True") + if('Find-EntraPermission' -eq $command){ + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'*" + } + else { + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + } + } + } + It "Should fail with 'Top' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Top'){ + $commandScriptBlock = [scriptblock]::Create("$command -Top ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Top'*" + } + } + } + It "Should fail with 'Filter' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ + $commandScriptBlock = [scriptblock]::Create("$command -Filter ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + } + } + It "Should fail with 'SearchString' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ + $commandScriptBlock = [scriptblock]::Create("$command -SearchString ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + } + } + It "Should fail with exception when no parameter is passed" { + $cmdlets = @( + @{ CmdletName = 'Enable-EntraDirectoryRole'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + @{ CmdletName = 'New-EntraConditionalAccessPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraNamedLocationPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraPermissionGrantPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + ) + $cmdlets | ForEach-Object { + $commandName = $_.CmdletName + $Exception = $_.Exception + $commandScriptBlock = [scriptblock]::Create("$commandName -ErrorAction Stop") + try { + Invoke-Command -ScriptBlock $commandScriptBlock + } + catch { $_ -match $Exception | Should -BeTrue } + } + } +} diff --git a/testVNext/Entra/Reports/Module.Tests.ps1 b/testVNext/Entra/Reports/Module.Tests.ps1 new file mode 100644 index 0000000000..96084885f0 --- /dev/null +++ b/testVNext/Entra/Reports/Module.Tests.ps1 @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Entra.Reports Module" { + Context "On module import" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Reports) -eq $null){ + Import-Module Microsoft.Graph.Entra.Reports + } + } + + It "Should have exported commands" { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Reports + $PSModuleInfo | Should -Not -BeNullOrEmpty + $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 + + } + + It 'Should be compatible with PS core and desktop' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Reports + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } + + It 'Should point to script module' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Reports + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Reports.psm1" + } + + It 'Should lock GUID' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Reports + $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" + } + + It "Module import should not write to error and information streams" { + $ps = [powershell]::Create() + $ps.AddScript("Import-Module Microsoft.Graph.Entra.Reports -ErrorAction SilentlyContinue").Invoke() + "Checking Information stream" | Out-Host + $ps.Streams.Information.Count | Should -Be 0 + "Checking Error stream" | Out-Host + $ps.Streams.Error.Count | Should -Be 0 + "Checking Verbose stream" | Out-Host + $ps.Streams.Verbose.Count | Should -Be 0 + "Checking Debug stream" | Out-Host + $ps.Streams.Warning.Count | Should -Be 0 + "Checking Progress stream" | Out-Host + $ps.Streams.Progress.Count | Should -Be 0 + + $ps.Dispose() + } + } +} + diff --git a/testVNext/Entra/Reports/Valid.Tests.ps1 b/testVNext/Entra/Reports/Valid.Tests.ps1 new file mode 100644 index 0000000000..808f8a92b7 --- /dev/null +++ b/testVNext/Entra/Reports/Valid.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ + Import-Module Microsoft.Graph.Entra.Reports + } + Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + + $module = Get-Module -Name Microsoft.Graph.Entra.Reports +} + +Describe "Valid parameter Tests"{ + Context "Test for valid parameters"{ + It "Should return empty object with Id parameter"{ + Write-Host "--------Start mock remove cmdlets with Id parameter only--------" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) + if($params.count -eq 1 -and $params -eq 'Id'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Reports + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Reports + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "---------End mock remove cmdlets with Id parameter only---------" + } + It "Should return empty object with ObjectId param"{ + Write-Host "-----Start mock remove cmdlets with ObjectId parameter only-----" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + if($params.count -eq 1 -and $params -eq 'ObjectId'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Reports + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Reports + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "------End mock remove cmdlets with ObjectId parameter only------" + } + # It "Should pass with 'Id' or 'ObjectId' parameter" { + # $count=0 + # $module.ExportedCommands.Keys | ForEach-Object { + + # $command = Get-Command $_ + # if ($command.Name.StartsWith('Remove')) + # { + # $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + # if($params.count -eq 1 -and ($params -eq 'ObjectId' -or $params-eq 'Id')){ + # $stringParams = $params -join ',' + # Write-Host "$command | $stringParams" + # $count++ + # } + # } + # } + # Write-Host $count + # } + } +} diff --git a/testVNext/Entra/SignIns/Entra.Tests.ps1 b/testVNext/Entra/SignIns/Entra.Tests.ps1 new file mode 100644 index 0000000000..e6b0c31795 --- /dev/null +++ b/testVNext/Entra/SignIns/Entra.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 new file mode 100644 index 0000000000..f327dcf44d --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DefaultUserRolePermissions" = @{AllowedToCreateApps = "False"; AllowedToCreateSecurityGroups = "False"; AllowedToCreateTenants = "True"; + AllowedToReadBitlockerKeysForOwnedDevice = "True"; AllowedToReadOtherUsers = "False"; PermissionGrantPoliciesAssigned = ""; + AdditionalProperties = "" + } + "DeletedDateTime" = $null + "GuestUserRoleId" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "DisplayName" = "AuthorizationPolicy" + "Description" = "AuthorizationPolicy" + "AllowEmailVerifiedUsersToJoinOrganization" = $True + "AllowedToSignUpEmailBasedSubscriptions" = $True + "AllowInvitesFrom" = "everyone" + "AllowUserConsentForRiskyApps" = "" + "AllowedToUseSspr" = $True + "BlockMsolPowerShell" = $True + "Id" = "authorizationPolicy" + "Parameters" = $args + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraAuthorizationPolicy" { + Context "Test for Get-EntraAuthorizationPolicy" { + It "Should return AuthorizationPolicy" { + $result = Get-EntraAuthorizationPolicy + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'authorizationPolicy' + $result.DisplayName | should -Be 'AuthorizationPolicy' + $result.Description | should -Be 'AuthorizationPolicy' + $result.AllowInvitesFrom | should -Be 'everyone' + $result.GuestUserRoleId | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.AllowEmailVerifiedUsersToJoinOrganization | should -Be $True + $result.AllowedToSignUpEmailBasedSubscriptions | should -Be $True + $result.AllowedToUseSspr | should -Be $True + $result.BlockMsolPowerShell | should -Be $True + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return AuthorizationPolicy when passed Id" { + $result = Get-EntraAuthorizationPolicy -Id 'authorizationPolicy' + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'authorizationPolicy' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is invalid" { + {Get-EntraAuthorizationPolicy -Id ''} | Should -Throw 'Exception calling "Substring" with "2" argument*' + } + It "Should fail when Id is invalid" { + {Get-EntraAuthorizationPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Property parameter should work" { + $result = Get-EntraAuthorizationPolicy -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'AuthorizationPolicy' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraAuthorizationPolicy -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuthorizationPolicy" + + Get-EntraAuthorizationPolicy + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuthorizationPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraAuthorizationPolicy -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 new file mode 100644 index 0000000000..aeeb700155 --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 @@ -0,0 +1,117 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Conditions" = [PSCustomObject]@{ + "ClientAppTypes" = @("all") + "ServicePrincipalRiskLevels" = @() + "SignInRiskLevels" = @() + "UserRiskLevels" = @() + } + "CreatedDateTime" = "20-May-24 9:26:07 AM" + "Description" = "" + "DisplayName" = "MFA policy" + "GrantControls" = [PSCustomObject]@{ + "BuiltInControls" = @("mfa") + "CustomAuthenticationFactors" = @() + "Operator" = "OR" + "TermsOfUse" = @() + } + "Id" = "aaaaaaaa-1111-2222-3333-ccccccccccc" + "ModifiedDateTime" = "" + "SessionControls" = [PSCustomObject]@{ + "DisableResilienceDefaults" = $null + } + "State" = "enabled" + "TemplateId" = "" + "AdditionalProperties" = @{ + "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#identity/conditionalAccess/policies/$entity" + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraConditionalAccessPolicy" { + Context "Test for Get-EntraConditionalAccessPolicy" { + It "Should retrieves a conditional access policy in Microsoft Entra ID with given ID" { + $result = Get-EntraConditionalAccessPolicy -PolicyId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result.ObjectId | Should -Be "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result.DisplayName | Should -Be "MFA policy" + $result.State | Should -Be "enabled" + + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should retrieves a list of all conditional access policies in Microsoft Entra ID" { + $result = Get-EntraConditionalAccessPolicy + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Contain "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result.ObjectId | Should -Contain "aaaaaaaa-1111-2222-3333-ccccccccccc" + + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Property parameter should work" { + $result = Get-EntraConditionalAccessPolicy -PolicyId "aaaaaaaa-1111-2222-3333-ccccccccccc" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'MFA policy' + } + + It "Should fail when PolicyId is empty" { + { Get-EntraConditionalAccessPolicy -PolicyId } | Should -Throw "Missing an argument for parameter 'PolicyId'*" + } + + It "Should fail when PolicyId is invalid" { + { Get-EntraConditionalAccessPolicy -PolicyId "" } | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string." + } + + It "Result should Contain ObjectId" { + $result = Get-EntraConditionalAccessPolicy -PolicyId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result.ObjectId | should -Be "aaaaaaaa-1111-2222-3333-ccccccccccc" + } + + It "Should contain ConditionalAccessPolicyId in parameters when passed PolicyId to it" { + $result = Get-EntraConditionalAccessPolicy -PolicyId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.ConditionalAccessPolicyId | Should -Be "aaaaaaaa-1111-2222-3333-ccccccccccc" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraConditionalAccessPolicy" + $result = Get-EntraConditionalAccessPolicy -PolicyId "aaaaaaaa-1111-2222-3333-ccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraConditionalAccessPolicy" + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraConditionalAccessPolicy -PolicyId "aaaaaaaa-1111-2222-3333-ccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 new file mode 100644 index 0000000000..08cd32dee6 --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [Microsoft.Graph.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy]@{ + "DisplayName" = "Feature-Rollout-Policy" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "IsAppliedToOrganization" = "False" + "Description" = "Feature-Rollout-Policy" + "Feature" = "emailAsAlternateId" + "IsEnabled" = "True" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns +} + +Describe "Get-EntraFeatureRolloutPolicy" { + Context "Test for Get-EntraFeatureRolloutPolicy" { + It "Should return specific FeatureRolloutPolicy" { + $result = Get-EntraFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + } + It "Should fail when Id is invalid" { + { Get-EntraFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Get-EntraFeatureRolloutPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when searchstring is empty" { + { Get-EntraFeatureRolloutPolicy -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Should fail when filter is empty" { + { Get-EntraFeatureRolloutPolicy -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return specific FeatureRolloutPolicy by searchstring" { + $result = Get-EntraFeatureRolloutPolicy -SearchString 'Feature-Rollout-Policy' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Feature-Rollout-Policy' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + } + It "Should return specific FeatureRolloutPolicy by filter" { + $result = Get-EntraFeatureRolloutPolicy -Filter "DisplayName -eq 'Feature-Rollout-Policy'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Feature-Rollout-Policy' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + } + It "Should return specific Property" { + $result = Get-EntraFeatureRolloutPolicy -Property Id + $result.Id | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraFeatureRolloutPolicy" + + $result = Get-EntraFeatureRolloutPolicy + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraFeatureRolloutPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraFeatureRolloutPolicy -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 new file mode 100644 index 0000000000..39a158c217 --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "Google-OAUTH" + "DisplayName" = "Mock-App" + "AdditionalProperties" = @{ + "@odata.context" = 'https://graph.microsoft.com/v1.0/$metadata#identity/identityProviders/$entity' + "@odata.type" = "#microsoft.graph.socialIdentityProvider" + "clientId" = "Google123" + "clientSecret" = "******" + "identityProviderType" = "Google" + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraIdentityProvider" { +Context "Test for Get-EntraIdentityProvider" { + It "Should return specific identity provider" { + $result = Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "Google-OAUTH" + $result.DisplayName | Should -Be "Mock-App" + $result.identityProviderType | Should -Be "Google" + + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific identity provider with alias" { + $result = Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "Google-OAUTH" + $result.DisplayName | Should -Be "Mock-App" + $result.identityProviderType | Should -Be "Google" + + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraIdentityProvider -IdentityProviderBaseId } | Should -Throw "Missing an argument for parameter 'IdentityProviderBaseId'*" + } + It "Should fail when Id is invalid" { + { Get-EntraIdentityProvider -IdentityProviderBaseId "" } | Should -Throw "Cannot bind argument to parameter 'IdentityProviderBaseId' because it is an empty string." + } + It "Result should Contain Alias properties" { + $result = Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" + $result.ObjectId | should -Be "Google-OAUTH" + $result.Name | should -Be "Mock-App" + $result.Type | should -Be "Google" + } + It "Should contain IdentityProviderBaseId in parameters when passed Id to it" { + + $result = Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" + $params = Get-Parameters -data $result.Parameters + $params.IdentityProviderBaseId | Should -Be "Google-OAUTH" + } + It "Property parameter should work" { + $result = Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraIdentityProvider" + + Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraIdentityProvider" + + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 new file mode 100644 index 0000000000..44603b282c --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "ClientId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "PrincipalId" = $null + "ResourceId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "ConsentType" = "AllPrincipals" + "Scope" = "Policy.Read.All Policy.ReadWrite.ConditionalAccess User.Read" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraOAuth2PermissionGrant" { +Context "Test for Get-EntraOAuth2PermissionGrant" { + It "Should return OAuth2 Permission Grant" { + $result = Get-EntraOAuth2PermissionGrant + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.ResourceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.PrincipalId | Should -BeNullOrEmpty + $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return All Group AppRole Assignment" { + $result = Get-EntraOAuth2PermissionGrant -All + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.ResourceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.PrincipalId | Should -BeNullOrEmpty + $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + + + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraOAuth2PermissionGrant -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 Group AppRole Assignment" { + $result = Get-EntraOAuth2PermissionGrant -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.ResourceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.PrincipalId | Should -BeNullOrEmpty + $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + + + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraOAuth2PermissionGrant -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraOAuth2PermissionGrant -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Result should Contain ObjectId" { + $result = Get-EntraOAuth2PermissionGrant -Top 1 + $result.ObjectId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + } + It "Property parameter should work" { + $result = Get-EntraOAuth2PermissionGrant -Property ConsentType + $result | Should -Not -BeNullOrEmpty + $result.ConsentType | Should -Be 'AllPrincipals' + + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraOAuth2PermissionGrant -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraOAuth2PermissionGrant" + + $result = Get-EntraOAuth2PermissionGrant -Top 1 + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraOAuth2PermissionGrant" + + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraOAuth2PermissionGrant -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 new file mode 100644 index 0000000000..ef9361ca2c --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "ClientApplicationIds" = {"All"} + "ClientApplicationPublisherIds" = {"All"} + "ClientApplicationTenantIds" = {"All"} + "ClientApplicationsFromVerifiedPublisherOnly" = $true + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + Mock -CommandName Get-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraPermissionGrantConditionSet"{ + It "Should not return empty object for condition set 'includes'"{ + $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should not return empty object for condition set 'excludes'"{ + $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when parameters are empty" { + { Get-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType "" -Id ""} | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when parameters are null" { + { Get-EntraPermissionGrantConditionSet -PolicyId -ConditionSetType -Id} | Should -Throw "Missing an argument for parameter*" + } + It "Should contain PermissionGrantConditionSetId in parameters when passed Id to it" { + $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.PermissionGrantConditionSetId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain PermissionGrantPolicyId in parameters when passed PolicyId to it" { + $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.PermissionGrantPolicyId | Should -Be "policy1" + } + It "Property parameter should work" { + $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + {Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPermissionGrantConditionSet" + $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPermissionGrantConditionSet" + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 new file mode 100644 index 0000000000..1a2147369d --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "microsoft-all-application-permissions" + "DeletedDateTime" = "2/8/2024 6:39:16 AM" + "Description" = "Includes all application permissions (app roles), for all APIs, for any client application." + "DisplayName" = "All application" + "Excludes" = @{} + "Includes" = @("00aa00aa-bb11-cc22-dd33-44ee44ee44ee") + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraPermissionGrantPolicy" { + Context "Test for Get-EntraPermissionGrantPolicy" { + It "Should return specific PermissionGrantPolicy" { + $result = Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "microsoft-all-application-permissions" + + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraPermissionGrantPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Get-EntraPermissionGrantPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'. Specify a parameter of type 'System.String' and try again." + } + It "Result should Contain ObjectId" { + $result = Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" + $result.ObjectId | should -Be "microsoft-all-application-permissions" + } + It "Should contain PermissionGrantPolicyId in parameters when passed ObjectId to it" { + $result = Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" + $params = Get-Parameters -data $result.Parameters + $params.PermissionGrantPolicyId | Should -Be "microsoft-all-application-permissions" + } + It "Property parameter should work" { + $result = Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'All application' + + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPermissionGrantPolicy" + + $result = Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPermissionGrantPolicy" + + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 new file mode 100644 index 0000000000..50e32a259b --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 @@ -0,0 +1,110 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $ScriptBlock = { + + $policyObject = [PSCustomObject]@{ + "value" = @( + [PSCustomObject]@{ + "id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "displayName" = "Mock Display Name" + "type" = "MockPolicy" + "Keys" = @("id", "displayName", "type") + }, + [PSCustomObject]@{ + "id" = "bbbbbbbb-1111-1111-1111-cccccccccccc" + "displayName" = "Mock Display Name" + "type" = "MockPolicy" + "Keys" = @("id", "displayName", "type") + }, + [PSCustomObject]@{ + "id" = "bbbbbbbb-2222-2222-2222-cccccccccccc" + "displayName" = "Mock Display Name" + "type" = "MockPolicy" + "Keys" = @("id", "displayName", "type") + } + ) + } + + $response = @{ + '@odata.context' = 'https://graph.microsoft.com/v1.0/$metadata#policies' + Value = $policyObject.value + } + + return $response + } + + Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraPolicy" { + Context "Test for Get-EntraPolicy" { + It "Should return specific Policy" { + $result = Get-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return all Policies" { + $result = Get-EntraPolicy -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return all Policy" { + $result = Get-EntraPolicy -Top 1 + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is invalid" { + { Get-EntraPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Get-EntraPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Top is empty" { + { Get-EntraPolicy -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraPolicy -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should fail when All has an argument" { + { Get-EntraPolicy -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPolicy" + $result = Get-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 new file mode 100644 index 0000000000..299af79aab --- /dev/null +++ b/testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 @@ -0,0 +1,92 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + @{ + "CertificateAuthorities" = @( + @{ + "isRootAuthority" = $true + "certificateRevocationListUrl"= "https://example.crl" + "deltaCertificateRevocationListUrl"= "https://test.crl" + "certificate"= + "MIIDADCCAeigAwIBAgIQZUf+HS6ftbZKl+KtsZRsTDANBgkqhkiG9w0BAQsFADATMREwDwYDVQQDDAhtc2NtZGxldDAeFw0yNDAzMDYwNzIwMzhaFw0yNT + AzMDYwNzQwMzhaMBMxETAPBgNVBAMMCG1zY21kbGV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApxIWxFGyuCi8kxmdjJI1WfY7zWqtgwvpk + wswBKrYmzN1/MzG2YX9yXsSLSd8Exh45P28ET3HpstVCXU1NnlQLW6c1ZEicRfj+Lv/h/z7Ckip8ccpJUNTaeyygC0pvqYjn+6zIVstMSOjNrWbQ8KrHTCh + lL3YvzD96PLbRHHHVcdT35fjezayWhMBSoc7rPO5Y0zgo9jKQt5rsIlEM72VssHy2H+dFkTCw2LbNy06oMoHpwXIDuQJSWXTu//G/DAuMIQ9hFDXh8hXJN5 + NCuesPF0tPqF4MbcGLREV2k6+MC7WZGsu2zcnr44Us0GZEq7F/h+hRGUeVGa/1Ve2oJmFqQIDAQABo1AwTjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFA + YIKwYBBQUHAwIGCCsGAQUFBwMBMB0GA1UdDgQWBBSgpCZWuICzX6fIkpoBGmIRMVD3iDANBgkqhkiG9w0BAQsFAAOCAQEAAYGPkNJMnBQ44FEIc7uWBI1dy + 3qtSVX3oLIawt2qtRiy7QybJCrVFhh7L5P2wcJeQAKJCwc6kL+KzL1IUSrieNt2OK0FblcW6yqLE4RnJEaa30Uog5Cwji8EOXwo1SA6P6ltXMC3qULCNjsf + VivDE3urizDBDvA8qBnh7vaQooiIwwxA0i+lqeGjB4ySpIR4rjM7PNISOWctmdgoFydJkBsyjGfTilZWI2Y4duW+CULJtuIQtw/buY/Km+CcBbbLAbE+PGF + MpTynQ2Lh66QPFimLCldkgFBsy0ShM5zMHhd8zJP3iDZ46eO03Hw/NZK/GXya3gAzDxmzaEc6iiFSig==" + "issuer"= "CN=mscmdlet" + "issuerSki"= "A0A42656B880B35FA7C8929A011A62113150F788" + "Parameters" = $args + } + ) + } + } + $tenantObj = { + return @( + [PSCustomObject]@{ + TenantId = "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + ) + + } + + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra + + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraTrustedCertificateAuthority"{ + It "Result should not be empty when no parameter passed" { + $result = Get-EntraTrustedCertificateAuthority + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Result should not be empty when parameters are empty" { + $result = Get-EntraTrustedCertificateAuthority -TrustedIssuer '' -TrustedIssuerSki '' + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Property parameter should work" { + $result = Get-EntraTrustedCertificateAuthority -Property TrustedIssuerSki + $result | Should -Not -BeNullOrEmpty + $result.TrustedIssuerSki | Should -Be 'A0A42656B880B35FA7C8929A011A62113150F788' + } + It "Should fail when TrustedIssuer is null" { + { Get-EntraTrustedCertificateAuthority -TrustedIssuer } | Should -Throw "Missing an argument for parameter*" + } + It "Should fail when TrustedIssuerSki is null" { + { Get-EntraTrustedCertificateAuthority -TrustedIssuerSki } | Should -Throw "Missing an argument for parameter*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTrustedCertificateAuthority" + Get-EntraTrustedCertificateAuthority + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTrustedCertificateAuthority" + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraTrustedCertificateAuthority -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/SignIns/Invalid.Tests.ps1 b/testVNext/Entra/SignIns/Invalid.Tests.ps1 new file mode 100644 index 0000000000..6d5381a100 --- /dev/null +++ b/testVNext/Entra/SignIns/Invalid.Tests.ps1 @@ -0,0 +1,105 @@ +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra +} + +Describe "Invalid Tests"{ + It "Should fail when parameters are invalid"{ + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object{ + $command = Get-Command $_ + { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." + } + } + It "Should fail with 'TenantId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ + $commandScriptBlock = [scriptblock]::Create("$command -TenantId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'TenantId'.*" + } + } + } + It "Should fail with 'Id' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Id'){ + $commandScriptBlock = [scriptblock]::Create("$command -Id $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + } + } + It "Should fail with 'ObjectId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ + $commandScriptBlock = [scriptblock]::Create("$command -ObjectId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'ObjectId'.*" + } + } + } + It "Should fail with 'All' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'All'){ + $commandScriptBlock = [scriptblock]::Create("$command -All `$True") + if('Find-EntraPermission' -eq $command){ + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'*" + } + else { + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + } + } + } + It "Should fail with 'Top' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Top'){ + $commandScriptBlock = [scriptblock]::Create("$command -Top ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Top'*" + } + } + } + It "Should fail with 'Filter' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ + $commandScriptBlock = [scriptblock]::Create("$command -Filter ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + } + } + It "Should fail with 'SearchString' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ + $commandScriptBlock = [scriptblock]::Create("$command -SearchString ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + } + } + It "Should fail with exception when no parameter is passed" { + $cmdlets = @( + @{ CmdletName = 'Enable-EntraDirectoryRole'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + @{ CmdletName = 'New-EntraConditionalAccessPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraNamedLocationPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraPermissionGrantPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + ) + $cmdlets | ForEach-Object { + $commandName = $_.CmdletName + $Exception = $_.Exception + $commandScriptBlock = [scriptblock]::Create("$commandName -ErrorAction Stop") + try { + Invoke-Command -ScriptBlock $commandScriptBlock + } + catch { $_ -match $Exception | Should -BeTrue } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/SignIns/Module.Tests.ps1 b/testVNext/Entra/SignIns/Module.Tests.ps1 new file mode 100644 index 0000000000..cc40ad720b --- /dev/null +++ b/testVNext/Entra/SignIns/Module.Tests.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Entra Module" { + Context "On module import" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + } + + It "Should have exported commands" { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo | Should -Not -BeNullOrEmpty + $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 + + } + + It 'Should be compatible with PS core and desktop' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } + + It 'Should point to script module' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + } + + It 'Should lock GUID' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" + } + + It "Module import should not write to error and information streams" { + $ps = [powershell]::Create() + $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + "Checking Information stream" | Out-Host + $ps.Streams.Information.Count | Should -Be 0 + "Checking Error stream" | Out-Host + $ps.Streams.Error.Count | Should -Be 0 + "Checking Verbose stream" | Out-Host + $ps.Streams.Verbose.Count | Should -Be 0 + "Checking Debug stream" | Out-Host + $ps.Streams.Warning.Count | Should -Be 0 + "Checking Progress stream" | Out-Host + $ps.Streams.Progress.Count | Should -Be 0 + + $ps.Dispose() + } + } +} diff --git a/testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 new file mode 100644 index 0000000000..302e5e5575 --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 @@ -0,0 +1,177 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Conditions" = [PSCustomObject]@{ + "ClientAppTypes" = @("all") + "ServicePrincipalRiskLevels" = @() + "SignInRiskLevels" = @() + "UserRiskLevels" = @() + } + "CreatedDateTime" = "20-May-24 9:26:07 AM" + "Description" = "" + "DisplayName" = "MFA policy" + "GrantControls" = [PSCustomObject]@{ + "BuiltInControls" = @("mfa") + "CustomAuthenticationFactors" = @() + "Operator" = "OR" + "TermsOfUse" = @() + } + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "ModifiedDateTime" = "" + "SessionControls" = [PSCustomObject]@{ + "DisableResilienceDefaults" = $null + } + "State" = "enabled" + "TemplateId" = "" + "AdditionalProperties" = @{ + "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#identity/conditionalAccess/policies/$entity" + } + "Parameters" = $args + } + ) + } + Mock -CommandName New-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraConditionalAccessPolicy" { + Context "Test for New-EntraConditionalAccessPolicy" { + It "Should return created Conditional Access Policy Id" { + $conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition + $conditions.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" + $conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition + $conditions.Users.IncludeUsers = "all" + $controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $controls._Operator = "OR" + $controls.BuiltInControls = "mfa" + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + $result = New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -State "Enabled" -Conditions $conditions -GrantControls $controls -SessionControls $SessionControls + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.DisplayName | Should -Be "MFA policy" + $result.State | Should -Be "enabled" + + + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when DisplayName parameter is empty" { + { New-EntraConditionalAccessPolicy -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + + It "Should fail when State parameter is empty" { + { New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -State } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when Conditions parameter is empty" { + { New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -Conditions } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when Conditions parameter is invalid" { + { New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -Conditions "" } | Should -Throw "Cannot process argument transformation on parameter 'Conditions'.*" + } + + It "Should fail when GrantControls parameter is empty" { + { New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -GrantControls } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when GrantControls parameter is invalid" { + { New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -GrantControls "" } | Should -Throw "Cannot process argument transformation on parameter 'GrantControls'.*" + } + + It "Should fail when SessionControls parameter is empty" { + { New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -SessionControls } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when SessionControls parameter is invalid" { + { New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -SessionControls "" } | Should -Throw "Cannot process argument transformation on parameter 'SessionControls'.*" + } + + It "Should contain IncludeUsers in parameters when passed Conditions to it" { + $conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition + $conditions.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" + $conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition + $conditions.Users.IncludeUsers = "all" + $Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + $result = New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -State "Enabled" -Conditions $conditions -GrantControls $controls -SessionControls $SessionControls + $result | Should -Not -BeNullOrEmpty + $params = Get-Parameters -data $result.Parameters + $params.Conditions.Users.IncludeUsers | Should -Be "all" + + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should contain BuiltInControls in parameters when passed GrantControls to it" { + $conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition + $conditions.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" + $conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition + $conditions.Users.IncludeUsers = "all" + $controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $controls._Operator = "OR" + $controls.BuiltInControls = "mfa" + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + $result = New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -State "Enabled" -Conditions $conditions -GrantControls $controls -SessionControls $SessionControls + $result | Should -Not -BeNullOrEmpty + $params = Get-Parameters -data $result.Parameters + $params.GrantControls.BuiltInControls | Should -Be "mfa" + + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraConditionalAccessPolicy" + $conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition + $conditions.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" + $conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition + $conditions.Users.IncludeUsers = "all" + $controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $controls._Operator = "OR" + $controls.BuiltInControls = "mfa" + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + $result = New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -State "Enabled" -Conditions $conditions -GrantControls $controls -SessionControls $SessionControls + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraConditionalAccessPolicy" + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $conditions = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $conditions.Applications = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition + $conditions.Applications.IncludeApplications = "00000002-0000-0ff1-ce00-000000000000" + $conditions.Users = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition + $conditions.Users.IncludeUsers = "all" + $controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $controls._Operator = "OR" + $controls.BuiltInControls = "mfa" + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -State "Enabled" -Conditions $conditions -GrantControls $controls -SessionControls $SessionControls -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 new file mode 100644 index 0000000000..3edbe82973 --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 @@ -0,0 +1,86 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "FeatureRolloutPolicy" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "IsEnabled" = "False" + "Description" = "FeatureRolloutPolicy" + "Feature" = "passwordHashSync" + "IsAppliedToOrganization" = "False" + "AppliesTo" = "" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns +} + +Describe "New-EntraFeatureRolloutPolicy" { + Context "Test for New-EntraFeatureRolloutPolicy" { + It "Should return created FeatureRolloutPolicy" { + $result = New-EntraFeatureRolloutPolicy -Feature 'PasswordHashSync' -DisplayName 'FeatureRolloutPolicy1' -Description 'FeatureRolloutPolicy1' -IsEnabled $false + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "FeatureRolloutPolicy" + $result.IsAppliedToOrganization | should -Be "False" + $result.IsEnabled | should -Be "False" + $result.Description | should -Be "FeatureRolloutPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + } + It "Should fail when Feature are invalid" { + { New-EntraFeatureRolloutPolicy -Feature "" } | Should -Throw "Cannot bind argument to parameter 'Feature'*" + } + It "Should fail when Feature are empty" { + { New-EntraFeatureRolloutPolicy -Feature } | Should -Throw "Missing an argument for parameter 'Feature'*" + } + It "Should fail when DisplayName are invalid" { + { New-EntraFeatureRolloutPolicy -DisplayName "" } | Should -Throw "Cannot bind argument to parameter 'DisplayName'*" + } + It "Should fail when DisplayName are empty" { + { New-EntraFeatureRolloutPolicy -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when Description are empty" { + { New-EntraFeatureRolloutPolicy -Feature 'PasswordHashSync' -DisplayName 'FeatureRolloutPolicy1' -Description -IsEnabled $false } | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when IsEnabled are invalid" { + { New-EntraFeatureRolloutPolicy -IsEnabled "" } | Should -Throw "Cannot process argument transformation on parameter 'IsEnabled'.*" + } + It "Should fail when IsEnabled are empty" { + { New-EntraFeatureRolloutPolicy -IsEnabled } | Should -Throw "Missing an argument for parameter 'IsEnabled'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraFeatureRolloutPolicy" + $result = New-EntraFeatureRolloutPolicy -Feature 'PasswordHashSync' -DisplayName 'FeatureRolloutPolicy1' -Description 'FeatureRolloutPolicy1' -IsEnabled $false + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraFeatureRolloutPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraFeatureRolloutPolicy -Feature 'PasswordHashSync' -DisplayName 'FeatureRolloutPolicy1' -Description 'FeatureRolloutPolicy1' -IsEnabled $false -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 new file mode 100644 index 0000000000..cd8cc17d41 --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 @@ -0,0 +1,110 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "Google-OAUTH" + "DisplayName" = "Mock-App" + "identityProviderType" = "Google" + "AdditionalProperties" = @{ + "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#identity/identityProviders/$entity" + "@odata.type" = "#microsoft.graph.socialIdentityProvider" + "clientId" = "Google123" + "clientSecret" = "******" + } + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraIdentityProvider" { +Context "Test for New-EntraIdentityProvider" { + It "Should return created identity provider" { + $result = New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "Google-OAUTH" + $result.DisplayName | Should -Be "Mock-App" + $result.identityProviderType | Should -Be "Google" + + Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Type is empty" { + { New-EntraIdentityProvider -Type -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" } | Should -Throw "Missing an argument for parameter 'Type'*" + } + It "Should fail when Type is invalid" { + { New-EntraIdentityProvider -Type "" -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" } | Should -Throw "Cannot bind argument to parameter 'Type' because it is an empty string." + } + It "Should fail when Name is empty" { + { New-EntraIdentityProvider -Type "Google" -Name -ClientId "Google123" -ClientSecret "GoogleId" } | Should -Throw "Missing an argument for parameter 'Name'*" + } + It "Should fail when ClientId is empty" { + { New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId -ClientSecret "GoogleId" } | Should -Throw "Missing an argument for parameter 'ClientId'*" + } + It "Should fail when ClientId is invalid" { + { New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "" -ClientSecret "GoogleId" } | Should -Throw "Cannot bind argument to parameter 'ClientId' because it is an empty string." + } + It "Should fail when ClientSecret is empty" { + { New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "Google123" -ClientSecret } | Should -Throw "Missing an argument for parameter 'ClientSecret'*" + } + It "Should fail when ClientSecret is invalid" { + { New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "Google123" -ClientSecret "" } | Should -Throw "Cannot bind argument to parameter 'ClientSecret' because it is an empty string." + } + It "Result should contain Alias properties" { + $result = New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" + $result.ObjectId | should -Be "Google-OAUTH" + $result.Name | should -Be "Mock-App" + $result.Type | should -Be "Google" + } + It "Should contain displayName in parameters when passed Name to it" { + + $result = New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" + $params = Get-Parameters -data $result.Parameters + $Para = $params | convertTo-json -depth 10 | convertFrom-json + $Para.BodyParameter.displayName | Should -Be "Mock-App" + } + It "Should contain identityProviderType in parameters when passed Type to it" { + + $result = New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" + $Param= $result.Parameters | convertTo-json -depth 10 | convertFrom-json + $params = Get-Parameters -data $Param + $Para = $params | convertTo-json -depth 10 | convertFrom-json + $Para.BodyParameter.AdditionalProperties.identityProviderType | Should -Be "Google" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraIdentityProvider" + + New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraIdentityProvider" + + Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraIdentityProvider -Type "Google" -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 new file mode 100644 index 0000000000..69b58b6e2e --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 @@ -0,0 +1,122 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + "DisplayName" = "Mock-App policies" + "CreatedDateTime" = "14-05-2024 09:38:07" + "ModifiedDateTime" = "14-05-2024 09:38:07" + "AdditionalProperties" = @{ + "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#identity/conditionalAccess/namedLocations/$entity" + "@odata.type" = "#microsoft.graph.ipNamedLocation" + "isTrusted" = $true + "ipRanges" = @{ + "@odata.type" = "#microsoft.graph.iPv4CidrRange" + "cidrAddress" = "6.5.4.1/30" + } + } + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraNamedLocationPolicy" { +Context "Test for New-EntraNamedLocationPolicy" { + It "Should return created Ms named location policy" { + $ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange + $ipRanges.cidrAddress = "6.5.4.1/30" + $result = New-EntraNamedLocationPolicy -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -IpRanges $ipRanges -IsTrusted $true -CountriesAndRegions @("US","ID","CA") -IncludeUnknownCountriesAndRegions $true + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + $result.DisplayName | Should -Be "Mock-App policies" + $result.CreatedDateTime | Should -Be "14-05-2024 09:38:07" + + Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when OdataType is empty" { + { New-EntraNamedLocationPolicy -OdataType } | Should -Throw "Missing an argument for parameter 'OdataType'*" + } + It "Should fail when DisplayName is empty" { + { New-EntraNamedLocationPolicy -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when IpRanges is empty" { + { New-EntraNamedLocationPolicy -IpRanges } | Should -Throw "Missing an argument for parameter 'IpRanges'*" + } + It "Should fail when IsTrusted is empty" { + { New-EntraNamedLocationPolicy -IsTrusted } | Should -Throw "Missing an argument for parameter 'IsTrusted'*" + } + It "Should fail when IsTrusted is invalid" { + { New-EntraNamedLocationPolicy -IsTrusted xy } | Should -Throw "Cannot process argument transformation on parameter 'IsTrusted'*" + } + It "Should fail when Id is empty" { + { New-EntraNamedLocationPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when CountriesAndRegions is empty" { + { New-EntraNamedLocationPolicy -CountriesAndRegions } | Should -Throw "Missing an argument for parameter 'CountriesAndRegions'*" + } + It "Should fail when CountriesAndRegions is invalid" { + { New-EntraNamedLocationPolicy -CountriesAndRegions xy } | Should -Throw "Cannot process argument transformation on parameter 'CountriesAndRegions'*" + } + It "Should fail when IncludeUnknownCountriesAndRegions is empty" { + { New-EntraNamedLocationPolicy -IncludeUnknownCountriesAndRegions } | Should -Throw "Missing an argument for parameter 'IncludeUnknownCountriesAndRegions'*" + } + It "Should fail when IncludeUnknownCountriesAndRegions is invalid" { + { New-EntraNamedLocationPolicy -IncludeUnknownCountriesAndRegions xyz } | Should -Throw "Cannot process argument transformation on parameter 'IncludeUnknownCountriesAndRegions'*" + } + It "Result should Contain ObjectId" { + $ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange + $ipRanges.cidrAddress = "6.5.4.1/30" + $result = New-EntraNamedLocationPolicy -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -IpRanges $ipRanges -IsTrusted $true -CountriesAndRegions @("US","ID","CA") -IncludeUnknownCountriesAndRegions $true + $result.ObjectId | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + } + It "Should contain @odata.type in bodyparameters when passed OdataId to it" { + Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + $ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange + $ipRanges.cidrAddress = "6.5.4.1/30" + $result = New-EntraNamedLocationPolicy -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -IpRanges $ipRanges -IsTrusted $true -CountriesAndRegions @("US","ID","CA") -IncludeUnknownCountriesAndRegions $true + $params= $result | Convertto-json -Depth 10 | Convertfrom-json + $additionalProperties = $params[-1].AdditionalProperties + $additionalProperties."@odata.type" | Should -Be "#microsoft.graph.ipNamedLocation" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraNamedLocationPolicy" + + $result = New-EntraNamedLocationPolicy -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -IpRanges $ipRanges -IsTrusted $true -CountriesAndRegions @("US","ID","CA") -IncludeUnknownCountriesAndRegions $true + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraNamedLocationPolicy" + + Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraNamedLocationPolicy -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -IpRanges $ipRanges -IsTrusted $true -CountriesAndRegions @("US","ID","CA") -IncludeUnknownCountriesAndRegions $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 new file mode 100644 index 0000000000..f5ec1c445d --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [Microsoft.Graph.PowerShell.Models.MicrosoftGraphOAuth2PermissionGrant]@{ + "ClientId" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "ConsentType" = "AllPrincipals" + "PrincipalId" = $null + "ResourceId" = "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" + "Scope" = "DelegatedPermissionGrant.ReadWrite.All" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraOauth2PermissionGrant" { + Context "Test for New-EntraOauth2PermissionGrant" { + It "Should return created Oauth2PermissionGrant" { + $result = New-EntraOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" + $result | Should -Not -BeNullOrEmpty + $result.ClientId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ConsentType | should -Be "AllPrincipals" + $result.ResourceId | should -Be "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" + $result.Scope | should -Be "DelegatedPermissionGrant.ReadWrite.All" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ClientId is invalid" { + { New-EntraOauth2PermissionGrant -ClientId "" } | Should -Throw "Cannot bind argument to parameter 'ClientId'*" + } + It "Should fail when ClientId is empty" { + { New-EntraOauth2PermissionGrant -ClientId } | Should -Throw "Missing an argument for parameter 'ClientId'.*" + } + It "Should fail when ConsentType is invalid" { + { New-EntraOauth2PermissionGrant -ConsentType "" } | Should -Throw "Cannot bind argument to parameter 'ConsentType'*" + } + It "Should fail when ConsentType is empty" { + { New-EntraOauth2PermissionGrant -ConsentType } | Should -Throw "Missing an argument for parameter 'ConsentType'.*" + } + It "Should fail when ResourceId is invalid" { + { New-EntraOauth2PermissionGrant -ResourceId "" } | Should -Throw "Cannot bind argument to parameter 'ResourceId'*" + } + It "Should fail when ResourceId is empty" { + { New-EntraOauth2PermissionGrant -ResourceId } | Should -Throw "Missing an argument for parameter 'ResourceId'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraOauth2PermissionGrant" + $result = New-EntraOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraOauth2PermissionGrant" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 new file mode 100644 index 0000000000..46bc3fd7cf --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "ClientApplicationIds" = {"All"} + "ClientApplicationPublisherIds" = {"All"} + "ClientApplicationTenantIds" = {"All"} + "ClientApplicationsFromVerifiedPublisherOnly" = $true + "PermissionClassification" = "all" + "PermissionType" = "delegated" + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + Mock -CommandName New-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "New-EntraPermissionGrantConditionSet"{ + It "Should not return empty object for condition set 'includes'"{ + $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -PermissionType "delegated" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should not return empty object for condition set 'excludes'"{ + $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "excludes" -PermissionType "delegated" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when parameters are empty" { + { New-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType ""} | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when parameters are null" { + { New-EntraPermissionGrantConditionSet -PolicyId -ConditionSetType } | Should -Throw "Missing an argument for parameter*" + } + It "Should contain PermissionGrantPolicyId in parameters when passed PolicyId to it" { + $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -PermissionType "delegated" + $params = Get-Parameters -data $result.Parameters + $params.PermissionGrantPolicyId | Should -Be "test1" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPermissionGrantConditionSet" + $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -PermissionType "delegated" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPermissionGrantConditionSet" + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -PermissionType "delegated" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + +} + diff --git a/testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 new file mode 100644 index 0000000000..7151be40db --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "my_new_permission_grant_policy_id" + "DeletedDateTime" = "2/8/2024 6:39:16 AM" + "Description" = "My new permission grant policy" + "DisplayName" = "My new permission grant policy" + "Excludes" = @{} + "Includes" = @("22cc22cc-dd33-ee44-ff55-66aa66aa66aa") + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraPermissionGrantPolicy" { + Context "Test for New-EntraPermissionGrantPolicy" { + It "Should return created PermissionGrantPolicy" { + $result = New-EntraPermissionGrantPolicy -Id "my_new_permission_grant_policy_id" -DisplayName "MyNewPermissionGrantPolicy" -Description "My new permission grant policy" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "my_new_permission_grant_policy_id" + $result.DisplayName | should -Be "My new permission grant policy" + $result.Description | should -Be "My new permission grant policy" + $result.Includes | should -Be @("22cc22cc-dd33-ee44-ff55-66aa66aa66aa") + $result.DeletedDateTime | should -Be "2/8/2024 6:39:16 AM" + + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is empty" { + { New-EntraPermissionGrantPolicy -Id -DisplayName "MyNewPermissionGrantPolicy" -Description "My new permission grant policy" } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + It "Should fail when DisplayName is empty" { + { New-EntraPermissionGrantPolicy -Id "my_new_permission_grant_policy_id" -DisplayName -Description "My new permission grant policy" } | Should -Throw "Missing an argument for parameter 'DisplayName'.*" + } + It "Should fail when Description is empty" { + { New-EntraPermissionGrantPolicy -Id "my_new_permission_grant_policy_id" -DisplayName "MyNewPermissionGrantPolicy" -Description } | Should -Throw "Missing an argument for parameter 'Description'.*" + } + It "Result should Contain ObjectId" { + $result = New-EntraPermissionGrantPolicy -Id "my_new_permission_grant_policy_id" -DisplayName "MyNewPermissionGrantPolicy" -Description "My new permission grant policy" + $result.ObjectId | should -Be "my_new_permission_grant_policy_id" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPermissionGrantPolicy" + + $result = New-EntraPermissionGrantPolicy -Id "my_new_permission_grant_policy_id" -DisplayName "MyNewPermissionGrantPolicy" -Description "My new permission grant policy" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPermissionGrantPolicy" + + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraPermissionGrantPolicy -Id "my_new_permission_grant_policy_id" -DisplayName "MyNewPermissionGrantPolicy" -Description "My new permission grant policy" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 new file mode 100644 index 0000000000..24afef76df --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + #Write-Host "Mocking New-EntraPolicy with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "DisplayName" = "demoClaimstest" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "Type" = "claimsMappingPolicies" + "IsOrganizationDefault" = "False" + "Definition" = "definition-value" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraPolicy" { + Context "Test for New-EntraPolicy" { + + It "Should return created policy" { + $result = New-EntraPolicy -Definition @( + "definition-value" + ) -DisplayName "Claimstest" -Type "claimsMappingPolicies" -IsOrganizationDefault $false -AlternativeIdentifier "1f587daa-d6fc-433f-88ee-ccccccccc111" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "demoClaimstest" + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.IsOrganizationDefault | should -Be "False" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when parameters are invalid" { + { New-EntraPolicy -Definition "" -DisplayName "" -Type "" -IsOrganizationDefault "" -AlternativeIdentifier "" } | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when parameters are empty" { + { New-EntraPolicy -Definition -DisplayName -Type -IsOrganizationDefault -AlternativeIdentifier } | Should -Throw "Missing an argument for parameter*" + } + It "Result should Contain Id" { + $result = New-EntraPolicy -Definition @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://xyz.xmlsoap.org/ws/2005/05/pqr/claims/name\",\"JwtClaimType\":\"xyz\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://xxx.yyy.com/identity/claims/displayname\",\"JwtClaimType\":\"ppp\"}]}}" ], "displayName": "test Claims Issuance Policy", "isOrganizationDefault": false }') -DisplayName "Claimstest" -Type "claimsMappingPolicies" -IsOrganizationDefault $false -AlternativeIdentifier "1f587daa-d6fc-433f-88ee-ccccccccc111" + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPolicy" + $result = New-EntraPolicy -Definition @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://xyz.xmlsoap.org/ws/2005/05/pqr/claims/name\",\"JwtClaimType\":\"xyz\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://xxx.yyy.com/identity/claims/displayname\",\"JwtClaimType\":\"ppp\"}]}}" ], "displayName": "test Claims Issuance Policy", "isOrganizationDefault": false }') -DisplayName "Claimstest" -Type "claimsMappingPolicies" -IsOrganizationDefault $false -AlternativeIdentifier "1f587daa-d6fc-433f-88ee-ccccccccc111" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraPolicy -Definition @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://xyz.xmlsoap.org/ws/2005/05/pqr/claims/name\",\"JwtClaimType\":\"xyz\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://xxx.yyy.com/identity/claims/displayname\",\"JwtClaimType\":\"ppp\"}]}}" ], "displayName": "test Claims Issuance Policy", "isOrganizationDefault": false }') -DisplayName "Claimstest" -Type "claimsMappingPolicies" -IsOrganizationDefault $false -AlternativeIdentifier "1f587daa-d6fc-433f-88ee-ccccccccc111" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 new file mode 100644 index 0000000000..c62e83ef5b --- /dev/null +++ b/testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 @@ -0,0 +1,150 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + $tenantObj = { + return @( + [PSCustomObject]@{ + TenantId = "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + ) + + } + + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra + + $scriptblock = { + return @( + @{ + Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + "@odata.context" = $args + certificateAuthorities = @{ + IsRootAuthority = "RootAuthority" + CertificateRevocationListUrl = "https://example.crl" + DeltaCertificateRevocationListUrl = "" + Certificate = @(70, 57, 66, 65, 57, 49, 69, 55, 54, 68, 57, 51, 49, 48, 51, 49, 55, 49, 55, 49, 50, 54, 69, 55, 68, 52, 70, 56, 70, 54, 57, 70, 55, 52, 51, 52, 57, 56, 53, 51) + Issuer = "CN=mscmdlet" + IssuerSki = "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" + } + Parameters = $args + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + $scriptblock2 = { + return @( + [PSCustomObject]@{ + CertificateAuthorities = @{ + IsRootAuthority = "RootAuthority" + CertificateRevocationListUrl = "https://example.crl" + DeltaCertificateRevocationListUrl = "" + Certificate = @(70, 57, 66, 65, 57, 49, 69, 55, 54, 68, 57, 51, 49, 48, 51, 49, 55, 49, 55, 49, 50, 54, 69, 55, 68, 52, 70, 56, 70, 54, 57, 70, 55, 52, 51, 52, 57, 56, 53, 51) + Issuer = "CN=mscmdlet" + IssuerSki = "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" + } + } + ) + + } + + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra + +} + +Describe "New-EntraTrustedCertificateAuthority" { + Context "Test for New-EntraTrustedCertificateAuthority" { + It "Should return created one" { + $byteData = @(70, 57, 66, 65, 57, 49, 69, 55, 54, 68, 57, 51, 49, 48, 51, 49, 55, 49, 55, 49, 50, 54, 69, 55, 68, 52, 70, 56, 70, 54, 57, 70, 55, 52, 51, 52, 57, 56, 53, 51) + $new_ca=New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation + $new_ca.AuthorityType=0 + $new_ca.TrustedCertificate= $byteData + $new_ca.crlDistributionPoint="https://example.crl" + $new_ca.DeltaCrlDistributionPoint="https://test.crl" + + $result = New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca + + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.certificateAuthorities.TrustedIssuer| Should -Be "CN=mscmdlet" + $result.certificateAuthorities.CrlDistributionPoint| Should -Be "https://example.crl" + $result.certificateAuthorities.AuthorityType| Should -Be "RootAuthority" + $result.certificateAuthorities.TrustedIssuerSki| Should -Be "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when parameters are empty" { + { New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when parameters are Invalid values" { + { New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation "" } | Should -Throw "Cannot process argument transformation on parameter 'CertificateAuthorityInformation'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraTrustedCertificateAuthority" + + $byteData = @(70, 57, 66, 65, 57, 49, 69, 55, 54, 68, 57, 51, 49, 48, 51, 49, 55, 49, 55, 49, 50, 54, 69, 55, 68, 52, 70, 56, 70, 54, 57, 70, 55, 52, 51, 52, 57, 56, 53, 51) + $new_ca=New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation + $new_ca.AuthorityType=0 + $new_ca.TrustedCertificate= $byteData + $new_ca.crlDistributionPoint="https://example.crl" + $new_ca.DeltaCrlDistributionPoint="https://test.crl" + + $result = New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca + + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraTrustedCertificateAuthority" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should contain 'TenantId' " { + $byteData = @(70, 57, 66, 65, 57, 49, 69, 55, 54, 68, 57, 51, 49, 48, 51, 49, 55, 49, 55, 49, 50, 54, 69, 55, 68, 52, 70, 56, 70, 54, 57, 70, 55, 52, 51, 52, 57, 56, 53, 51) + $new_ca=New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation + $new_ca.AuthorityType=0 + $new_ca.TrustedCertificate= $byteData + $new_ca.crlDistributionPoint="https://example.crl" + $new_ca.DeltaCrlDistributionPoint="https://test.crl" + + $result = New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca + + $params = Get-Parameters -data $result."@odata.context" + + $params.uri | Should -Match "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $byteData = @(70, 57, 66, 65, 57, 49, 69, 55, 54, 68, 57, 51, 49, 48, 51, 49, 55, 49, 55, 49, 50, 54, 69, 55, 68, 52, 70, 56, 70, 54, 57, 70, 55, 52, 51, 52, 57, 56, 53, 51) + $new_ca=New-Object -TypeName Microsoft.Open.AzureAD.Model.CertificateAuthorityInformation + $new_ca.AuthorityType=0 + $new_ca.TrustedCertificate= $byteData + $new_ca.crlDistributionPoint="https://example.crl" + $new_ca.DeltaCrlDistributionPoint="https://test.crl" + + try { + # Act & Assert: Ensure the function doesn't throw an exception + {New-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $new_ca -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 new file mode 100644 index 0000000000..dc181dba8e --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns +} + +Describe "Remove-EntraFeatureRolloutPolicy" { + Context "Test for Remove-EntraFeatureRolloutPolicy" { + It "Should return empty object" { + $result = Remove-EntraFeatureRolloutPolicy -Id bbbbbbbb-1111-2222-3333-cccccccccccc + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + } + It "Should fail when Id is invalid" { + { Remove-EntraFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Remove-EntraFeatureRolloutPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicy" + $result = Remove-EntraFeatureRolloutPolicy -Id bbbbbbbb-1111-2222-3333-cccccccccccc + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraFeatureRolloutPolicy -Id bbbbbbbb-1111-2222-3333-cccccccccccc -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..c7e05c4ec2 --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -0,0 +1,59 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns +} + +Describe "Remove-EntraFeatureRolloutPolicyDirectoryObject" { + Context "Test for Remove-EntraFeatureRolloutPolicyDirectoryObject" { + It "Should return empty object" { + $result = Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + } + It "Should fail when Id is invalid" { + { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when ObjectId is invalid" { + { Remove-EntraFeatureRolloutPolicyDirectoryObject -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + It "Should fail when ObjectId is empty" { + { Remove-EntraFeatureRolloutPolicyDirectoryObject -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicyDirectoryObject" + $result = Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicyDirectoryObject" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 new file mode 100644 index 0000000000..3e37fa4d91 --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Remove-MgIdentityProvider -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraIdentityProvider" { +Context "Test for Remove-EntraIdentityProvider" { + It "Should return empty object" { + $result = Remove-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraIdentityProvider -Id "Google-OAUTH" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is empty" { + { Remove-EntraIdentityProvider -IdentityProviderBaseId } | Should -Throw "Missing an argument for parameter 'IdentityProviderBaseId'*" + } + It "Should fail when IdentityProviderBaseId is invalid" { + { Remove-EntraIdentityProvider -IdentityProviderBaseId "" } | Should -Throw "Cannot bind argument to parameter 'IdentityProviderBaseId' because it is an empty string." + } + It "Should contain IdentityProviderBaseId in parameters when passed IdentityProviderBaseId to it" { + Mock -CommandName Remove-MgIdentityProvider -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" + $params = Get-Parameters -data $result + $params.IdentityProviderBaseId | Should -Be "Google-OAUTH" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraIdentityProvider" + + Remove-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraIdentityProvider" + + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 new file mode 100644 index 0000000000..f4e169c200 --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraNamedLocationPolicy" { + Context "Test for Remove-EntraNamedLocationPolicy" { + It "Should return empty object" { + $result = Remove-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when PolicyId is empty" { + { Remove-EntraNamedLocationPolicy -PolicyId } | Should -Throw "Missing an argument for parameter 'PolicyId'*" + } + It "Should fail when PolicyId is invalid" { + { Remove-EntraNamedLocationPolicy -PolicyId "" } | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string*" + } + It "Should contain NamedLocationId in parameters when passed PolicyId to it" { + Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" + $params = Get-Parameters -data $result + $params.NamedLocationId | Should -Be "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraNamedLocationPolicy" + + Remove-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraNamedLocationPolicy" + + Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 new file mode 100644 index 0000000000..de2afed6a9 --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraGroupAppRoleAssignment" { + Context "Test for Remove-EntraGroupAppRoleAssignment" { + It "Should return empty object" { + $result = Remove-EntraOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ObjectId is empty" { + { Remove-EntraOAuth2PermissionGrant -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + It "Should fail when ObjectId is invalid" { + { Remove-EntraOAuth2PermissionGrant -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + It "Should contain OAuth2PermissionGrantId in parameters when passed ObjectId to it" { + Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result + $params.OAuth2PermissionGrantId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraOAuth2PermissionGrant" + + Remove-EntraOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraOAuth2PermissionGrant" + + Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 new file mode 100644 index 0000000000..977cc18285 --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Graph.Entra + + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraPermissionGrantConditionSet"{ + Context "Test for Remove-EntraPermissionGrantConditionSet" { + It "Should delete a permission grant condition set 'includes' from a policy"{ + $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should delete a permission grant condition set 'excludes' from a policy"{ + $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "excludes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when PolicyId parameter are invalid when ConditionSetType is includes" { + { Remove-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa"} | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string.*" + } + + It "Should fail when PolicyId parameter are empty when ConditionSetType is includes" { + { Remove-EntraPermissionGrantConditionSet -PolicyId -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when PolicyId parameter are invalid when ConditionSetType is excludes" { + { Remove-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType "excludes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa"} | Should -Throw "Cannot bind argument to parameter*" + } + + It "Should fail when PolicyId parameter are empty when ConditionSetType is excludes" { + { Remove-EntraPermissionGrantConditionSet -PolicyId -ConditionSetType "excludes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when Id parameter are empty when ConditionSetType is includes" { + { Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when Id parameter are invalid when ConditionSetType is includes" { + { Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should fail when Id parameter are invalid when ConditionSetType is excludes" { + { Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "excludes" -Id ""} | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string.*" + } + + It "Should fail when Id parameter are empty when ConditionSetType is excludes" { + { Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "excludes" -Id } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when ConditionSetType parameter are empty" { + { Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" -ConditionSetType } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when ConditionSetType parameter are invalid" { + { Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" -ConditionSetType "" } | Should -Throw "Cannot bind argument to parameter 'ConditionSetType' because it is an empty string." + } + + It "Should contain PermissionGrantPolicyId in parameters when passed PolicyId to it" { + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" + $params = Get-Parameters -data $result + $params.PermissionGrantPolicyId | Should -Be "test1" + } + + It "Should contain PermissionGrantConditionSetId in parameters when passed Id to it" { + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" + $params = Get-Parameters -data $result + $params.PermissionGrantConditionSetId | Should -Be "ccccdddd-2222-eeee-3333-ffff4444aaaa" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPermissionGrantConditionSet" + + Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPermissionGrantConditionSet" + + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa"-Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 new file mode 100644 index 0000000000..09ea4413ef --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraPermissionGrantPolicy" { + Context "Test for Remove-EntraPermissionGrantPolicy" { + It "Should return empty object" { + $result = Remove-EntraPermissionGrantPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is empty" { + { Remove-EntraPermissionGrantPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Remove-EntraPermissionGrantPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string*" + } + It "Should contain PermissionGrantPolicyId in parameters when passed Id to it" { + Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraPermissionGrantPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result + $params.PermissionGrantPolicyId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPermissionGrantPolicy" + + Remove-EntraPermissionGrantPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPermissionGrantPolicy" + + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + {Remove-EntraPermissionGrantPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 new file mode 100644 index 0000000000..65926d67a2 --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 @@ -0,0 +1,63 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $ScriptBlock = { + + $response = @{ + '@odata.context' = 'https://graph.microsoft.com/v1.0/$metadata#policies/homeRealmDiscoveryPolicies/$entity' + } + + return $response + + } + Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra +} +Describe "Test for Remove-EntraPolicy" { + It "Should return empty object" { + $result = Remove-EntraPolicy -Id bbbbbbbb-1111-1111-1111-cccccccccccc + #$result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 2 + } + It "Should fail when -Id is empty" { + { Remove-EntraPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when Id is null" { + { Remove-EntraPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraPolicy -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPolicy" + $result = Remove-EntraPolicy -Id bbbbbbbb-1111-1111-1111-cccccccccccc + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraPolicy -Id bbbbbbbb-1111-1111-1111-cccccccccccc -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + + diff --git a/testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 new file mode 100644 index 0000000000..47d7725208 --- /dev/null +++ b/testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 @@ -0,0 +1,102 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + Parameters = $args + } + ) + + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + + $scriptblock2 = { + return @( + [PSCustomObject]@{ + CertificateAuthorities = @{ + IsRootAuthority = "RootAuthority" + CertificateRevocationListUrl = "https://example.crl" + DeltaCertificateRevocationListUrl = "" + Certificate = @(48, 130, 3, 0) + Issuer = "CN=mscmdlet" + IssuerSki = "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" + } + + } + ) + + } + + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra + + $scriptblock3 = { + return @( + [PSCustomObject]@{ + TenantId = "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + ) + + } + + Mock -CommandName Get-MgContext -MockWith $scriptblock3 -ModuleName Microsoft.Graph.Entra + +} + +Describe "Remove-EntraTrustedCertificateAuthority" { + Context "Test for Remove-EntraTrustedCertificateAuthority" { + It "Should return object" { + $cer = Get-EntraTrustedCertificateAuthority + $result = Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] + + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when CertificateAuthorityInformation is empty" { + { Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation} | Should -Throw "Missing an argument for parameter 'CertificateAuthorityInformation'.*" + } + It "Should fail when ObjectId is empty string" { + { Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation "" } | Should -Throw "Cannot process argument transformation on parameter 'CertificateAuthorityInformation'.*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraTrustedCertificateAuthority" + $cer = Get-EntraTrustedCertificateAuthority + $result = Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraTrustedCertificateAuthority" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $cer = Get-EntraTrustedCertificateAuthority + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 new file mode 100644 index 0000000000..ae84ebcfef --- /dev/null +++ b/testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgPolicyAuthorizationPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraAuthorizationPolicy" { + Context "Test for Set-EntraAuthorizationPolicy" { + It "Should update AuthorizationPolicy" { + $DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions + $DefaultUserRolePermissions.AllowedToCreateApps = $true + $DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $true + $DefaultUserRolePermissions.AllowedToReadOtherUsers = $true + $result = Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions $false -AllowedToUseSSPR $false -AllowEmailVerifiedUsersToJoinOrganization $true -BlockMsolPowerShell $true -DefaultUserRolePermissions $DefaultUserRolePermissions -Description "test" -DisplayName "Authorization Policies" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when AllowedToSignUpEmailBasedSubscriptions is invalid" { + { Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions 'a' } | Should -Throw "Cannot process argument transformation on parameter 'AllowedToSignUpEmailBasedSubscriptions'.*" + } + It "Should fail when AllowedToSignUpEmailBasedSubscriptions is empty" { + { Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions } | Should -Throw "Missing an argument for parameter 'AllowedToSignUpEmailBasedSubscriptions'.*" + } + It "Should fail when AllowedToUseSSPR is invalid" { + { Set-EntraAuthorizationPolicy -AllowedToUseSSPR 'a' } | Should -Throw "Cannot process argument transformation on parameter 'AllowedToUseSSPR'*" + } + It "Should fail when AllowedToUseSSPR is empty" { + { Set-EntraAuthorizationPolicy -AllowedToUseSSPR } | Should -Throw "Missing an argument for parameter 'AllowedToUseSSPR'.*" + } + It "Should fail when AllowEmailVerifiedUsersToJoinOrganization is invalid" { + { Set-EntraAuthorizationPolicy -AllowEmailVerifiedUsersToJoinOrganization 'a' } | Should -Throw "Cannot process argument transformation on parameter 'AllowEmailVerifiedUsersToJoinOrganization'*" + } + It "Should fail when AllowEmailVerifiedUsersToJoinOrganization is empty" { + { Set-EntraAuthorizationPolicy -AllowEmailVerifiedUsersToJoinOrganization } | Should -Throw "Missing an argument for parameter 'AllowEmailVerifiedUsersToJoinOrganization'.*" + } + It "Should fail when BlockMsolPowerShell is invalid" { + { Set-EntraAuthorizationPolicy -BlockMsolPowerShell 'a' } | Should -Throw "Cannot process argument transformation on parameter 'BlockMsolPowerShell'*" + } + It "Should fail when BlockMsolPowerShell is empty" { + { Set-EntraAuthorizationPolicy -BlockMsolPowerShell } | Should -Throw "Missing an argument for parameter 'BlockMsolPowerShell'.*" + } + It "Should fail when DefaultUserRolePermissions is invalid" { + { Set-EntraAuthorizationPolicy -DefaultUserRolePermissions 'a' } | Should -Throw "Cannot process argument transformation on parameter 'DefaultUserRolePermissions'*" + } + It "Should fail when DefaultUserRolePermissions is empty" { + { Set-EntraAuthorizationPolicy -DefaultUserRolePermissions } | Should -Throw "Missing an argument for parameter 'DefaultUserRolePermissions'.*" + } + It "Should fail when Description is empty" { + { Set-EntraAuthorizationPolicy -Description } | Should -Throw "Missing an argument for parameter 'Description'.*" + } + It "Should fail when DisplayName is empty" { + { Set-EntraAuthorizationPolicy -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAuthorizationPolicy" + + $DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions + $DefaultUserRolePermissions.AllowedToCreateApps = $true + $DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $true + $DefaultUserRolePermissions.AllowedToReadOtherUsers = $true + Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions $false -AllowedToUseSSPR $false -AllowEmailVerifiedUsersToJoinOrganization $true -BlockMsolPowerShell $true -DefaultUserRolePermissions $DefaultUserRolePermissions -Description "test" -DisplayName "Authorization Policies" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAuthorizationPolicy" + + Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $DefaultUserRolePermissions = New-Object -TypeName Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions + $DefaultUserRolePermissions.AllowedToCreateApps = $true + $DefaultUserRolePermissions.AllowedToCreateSecurityGroups = $true + $DefaultUserRolePermissions.AllowedToReadOtherUsers = $true + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions $false -AllowedToUseSSPR $false -AllowEmailVerifiedUsersToJoinOrganization $true -BlockMsolPowerShell $true -DefaultUserRolePermissions $DefaultUserRolePermissions -Description "test" -DisplayName "Authorization Policies" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 new file mode 100644 index 0000000000..537dbe2394 --- /dev/null +++ b/testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 @@ -0,0 +1,139 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraConditionalAccessPolicy" { + Context "Test for Set-EntraConditionalAccessPolicy" { + It "Should updates a conditional access policy in Microsoft Entra ID by PolicyId" { + $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + $result = Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" -State enabled -Conditions $Condition -GrantControls $Controls -SessionControls $SessionControls + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when PolicyId parameter is empty" { + { Set-EntraConditionalAccessPolicy -PolicyId } | Should -Throw "Missing an argument for parameter 'PolicyId'*" + } + + It "Should fail when PolicyId parameter is invalid" { + { Set-EntraConditionalAccessPolicy -PolicyId "" } | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string.*" + } + + It "Should fail when DisplayName parameter is empty" { + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when State parameter is empty" { + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -State } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when Conditions parameter is empty" { + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -Conditions } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when Conditions parameter is invalid" { + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -Conditions "" } | Should -Throw "Cannot process argument transformation on parameter 'Conditions'.*" + } + + It "Should fail when GrantControls parameter is empty" { + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -GrantControls } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when GrantControls parameter is invalid" { + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -GrantControls "" } | Should -Throw "Cannot process argument transformation on parameter 'GrantControls'.*" + } + + It "Should fail when SessionControls parameter is empty" { + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -SessionControls } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when SessionControls parameter is invalid" { + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -SessionControls "" } | Should -Throw "Cannot process argument transformation on parameter 'SessionControls'.*" + } + + It "Should contain ConditionalAccessPolicyId in parameters when passed PolicyId to it" { + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" + $params = Get-Parameters -data $result + $params.ConditionalAccessPolicyId | Should -Be "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" + } + + It "Should contain ClientAppTypes in parameters when passed Conditions to it" { + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") + $Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + $result = Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" -State enabled -Conditions $Condition -GrantControls $Controls -SessionControls $SessionControls + $params = Get-Parameters -data $result + $params.Conditions.ClientAppTypes | Should -Be @("mobileAppsAndDesktopClients","browser") + + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should contain BuiltInControls in parameters when passed GrantControls to it" { + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $Controls._Operator = "AND" + $Controls.BuiltInControls = @("mfa") + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + $result = Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" -State enabled -Conditions $Condition -GrantControls $Controls -SessionControls $SessionControls + $params = Get-Parameters -data $result + $params.GrantControls.BuiltInControls | Should -Be @("mfa") + + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraConditionalAccessPolicy" + $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $Controls._Operator = "AND" + $Controls.BuiltInControls = @("mfa") + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + + Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" -State enabled -Conditions $Condition -GrantControls $Controls -SessionControls $SessionControls + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraConditionalAccessPolicy" + + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet + $Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls + $Controls._Operator = "AND" + $Controls.BuiltInControls = @("mfa") + $SessionControls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" -State enabled -Conditions $Condition -GrantControls $Controls -SessionControls $SessionControls -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 new file mode 100644 index 0000000000..433eee8d93 --- /dev/null +++ b/testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraFeatureRolloutPolicy" { + Context "Test for Set-EntraFeatureRolloutPolicy" { + It "Should return created FeatureRolloutPolicy" { + $result = Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -DisplayName 'Feature-Rollout-Policytest' -Description 'Feature-Rollout-test' -IsEnabled $false + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id are invalid" { + { Set-EntraFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when Id are empty" { + { Set-EntraFeatureRolloutPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Feature are empty" { + { Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -Feature } | Should -Throw "Missing an argument for parameter 'Feature'*" + } + It "Should fail when DisplayName are empty" { + { Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when Description are empty" { + { Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -Description } | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when IsEnabled are invalid" { + { Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -IsEnabled "" } | Should -Throw "Cannot process argument transformation on parameter 'IsEnabled'.*" + } + It "Should fail when IsEnabled are empty" { + { Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -IsEnabled } | Should -Throw "Missing an argument for parameter 'IsEnabled'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraFeatureRolloutPolicy" + + Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -DisplayName 'Feature-Rollout-Policytest' -Description 'Feature-Rollout-test' -IsEnabled $false + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraFeatureRolloutPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -DisplayName 'Feature-Rollout-Policytest' -Description 'Feature-Rollout-test' -IsEnabled $false -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 new file mode 100644 index 0000000000..923eab9ff1 --- /dev/null +++ b/testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 @@ -0,0 +1,104 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraNamedLocationPolicy" { + Context "Test for Set-EntraNamedLocationPolicy" { + It "Should return empty object" { + $ipRanges1 = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange + $ipRanges1.cidrAddress = "6.5.4.1/30" + $ipRanges2 = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange + $ipRanges2.cidrAddress = "6.5.4.2/30" + $result = Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -IpRanges @($ipRanges1,$ipRanges2) -IsTrusted $true -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -CountriesAndRegions @("US","ID","CA") -IncludeUnknownCountriesAndRegions $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when PolicyId is empty" { + { Set-EntraNamedLocationPolicy -PolicyId -OdataType "#microsoft.graph.ipNamedLocation" } | Should -Throw "Missing an argument for parameter 'PolicyId'*" + } + It "Should fail when PolicyId is invalid" { + { Set-EntraNamedLocationPolicy -PolicyId "" -OdataType "#microsoft.graph.ipNamedLocation" } | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string*" + } + It "Should fail when OdataType is empty" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType } | Should -Throw "Missing an argument for parameter 'OdataType'*" + } + It "Should fail when DisplayName is empty" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when IpRanges is empty" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -IpRanges } | Should -Throw "Missing an argument for parameter 'IpRanges'*" + } + It "Should fail when IsTrusted is empty" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -IsTrusted } | Should -Throw "Missing an argument for parameter 'IsTrusted'*" + } + It "Should fail when IsTrusted is invalid" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -IsTrusted xy } | Should -Throw "Cannot process argument transformation on parameter 'IsTrusted'*" + } + It "Should fail when Id is empty" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when CountriesAndRegions is empty" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -CountriesAndRegions } | Should -Throw "Missing an argument for parameter 'CountriesAndRegions'*" + } + It "Should fail when CountriesAndRegions is invalid" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -CountriesAndRegions xy } | Should -Throw "Cannot process argument transformation on parameter 'CountriesAndRegions'*" + } + It "Should fail when IncludeUnknownCountriesAndRegions is empty" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -IncludeUnknownCountriesAndRegions } | Should -Throw "Missing an argument for parameter 'IncludeUnknownCountriesAndRegions'*" + } + It "Should fail when IncludeUnknownCountriesAndRegions is invalid" { + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -IncludeUnknownCountriesAndRegions xyz } | Should -Throw "Cannot process argument transformation on parameter 'IncludeUnknownCountriesAndRegions'*" + } + It "Should contain NamedLocationId in parameters when passed PolicyId to it" { + Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" + $params = Get-Parameters -data $result + $params.NamedLocationId | Should -Be "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" + } + + It "Should contain @odata.type in bodyparameters when passed OdataId to it" { + Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Write-Host $BodyParameter.AdditionalProperties."@odata.type" | ConvertTo-Json + $BodyParameter.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.ipNamedLocation" + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraNamedLocationPolicy" + + Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraNamedLocationPolicy" + + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 new file mode 100644 index 0000000000..ae7c5453e5 --- /dev/null +++ b/testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 @@ -0,0 +1,68 @@ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Graph.Entra + + Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Graph.Entra +} +Describe "Set-EntraPermissionGrantConditionSet"{ + It "Should return empty object for condition set 'includes'"{ + $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object for condition set 'excludes'"{ + $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when parameters are empty" { + { Set-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType "" -Id ""} | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when parameters are null" { + { Set-EntraPermissionGrantConditionSet -PolicyId -ConditionSetType -Id } | Should -Throw "Missing an argument for parameter*" + } + It "Should contain parameters for condition set 'includes'" { + Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra + $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" + $params = Get-Parameters -data $result + $params.PermissionGrantPolicyId | Should -Be "policy1" + $params.PermissionGrantConditionSetId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should contain parameters for condition set 'excludes'" { + Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra + $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" + $params = Get-Parameters -data $result + $params.PermissionGrantPolicyId | Should -Be "policy1" + $params.PermissionGrantConditionSetId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantConditionSet" + $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantConditionSet" + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 new file mode 100644 index 0000000000..3cbdfea400 --- /dev/null +++ b/testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraPermissionGrantPolicy" { + Context "Test for Set-EntraPermissionGrantPolicy" { + It "Should return updated PermissionGrantPolicy" { + $result = Set-EntraPermissionGrantPolicy -Id "permission_grant_policy" -Description "test" -DisplayName "Test" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Id is empty" { + { Set-EntraPermissionGrantPolicy -Id -Description "test" -DisplayName "Test" } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + It "Should fail when Id is invalid" { + { Set-EntraPermissionGrantPolicy -Id "" -Description "test" -DisplayName "Test" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string.*" + } + It "Should fail when Description is empty" { + { Set-EntraPermissionGrantPolicy -Id "permission_grant_policy" -Description -DisplayName "Test" } | Should -Throw "Missing an argument for parameter 'Description'.*" + } + It "Should fail when DisplayName is empty" { + { Set-EntraPermissionGrantPolicy -Id "permission_grant_policy" -Description "test" -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantPolicy" + + Set-EntraPermissionGrantPolicy -Id "permission_grant_policy" -Description "test" -DisplayName "Test" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantPolicy" + + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraPermissionGrantPolicy -Id "permission_grant_policy" -Description "test" -DisplayName "Test" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 new file mode 100644 index 0000000000..df702dd389 --- /dev/null +++ b/testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 @@ -0,0 +1,87 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + #Write-Host "Mocking set-EntraPolicy with parameters: $($args | ConvertTo-Json -Depth 3)" + + $response = @{ + '@odata.context' = 'https://graph.microsoft.com/v1.0/$metadata#policies/homeRealmDiscoveryPolicies/$entity' + } + + return $response + } + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Test for Set-EntraPolicy" { + + It "Should return empty object" { + $result = Set-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when id is empty" { + { Set-EntraPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" + } + It "Should fail when Id is null" { + { Set-EntraPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when displaymane is null" { + { Set-EntraPolicy -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when AlternativeIdentifier is null" { + { Set-EntraPolicy -AlternativeIdentifier } | Should -Throw "Missing an argument for parameter 'AlternativeIdentifier'*" + } + It "Should fail when IsOrganizationDefault is null" { + { Set-EntraPolicy -IsOrganizationDefault } | Should -Throw "Missing an argument for parameter 'IsOrganizationDefault'*" + } + It "Should fail when invalid parameter is passed" { + { Set-EntraPolicy -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPolicy" + + Set-EntraPolicy -Id "Engineering_Project" -type "HomeRealmDiscoveryPolicy" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPartnerInformation" + + Set-EntraPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPartnerInformation" + + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + + diff --git a/testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 new file mode 100644 index 0000000000..b14036a060 --- /dev/null +++ b/testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 @@ -0,0 +1,136 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + $tenantObj = { + return @( + [PSCustomObject]@{ + TenantId = "d5aec55f-2d12-4442-8d2f-ccca95d4390e" + } + ) + + } + + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra + + $scriptblock = { + return @( + @{ + Id = '29728ade-6ae4-4ee9-9103-412912537da5' + "@odata.context" = $args + certificateAuthorities = @{ + IsRootAuthority = "RootAuthority" + CertificateRevocationListUrl = "https://example.crl" + DeltaCertificateRevocationListUrl = "https://example2.crl" + Certificate = @(70, 57, 66, 65, 57, 49, 69, 55, 54, 68, 57, 51, 49, 48, 51, 49, 55, 49, 55, 49, 50, 54, 69, 55, 68, 52, 70, 56, 70, 54, 57, 70, 55, 52, 51, 52, 57, 56, 53, 51) + Issuer = "CN=ms-cmdlett" + IssuerSki = "E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A" + } + Parameters = $args + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + + $scriptblock2 = { + return @( + [PSCustomObject]@{ + CertificateAuthorities = @{ + IsRootAuthority = "RootAuthority" + CertificateRevocationListUrl = "https://example.crl" + DeltaCertificateRevocationListUrl = "https://example2.crl" + Certificate = @(70, 57, 66, 65, 57, 49, 69, 55, 54, 68, 57, 51, 49, 48, 51, 49, 55, 49, 55, 49, 50, 54, 69, 55, 68, 52, 70, 56, 70, 54, 57, 70, 55, 52, 51, 52, 57, 56, 53, 51) + Issuer = "CN=ms-cmdlett" + IssuerSki = "E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A" + } + } + ) + + } + + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra + +} + +Describe "Set-EntraTrustedCertificateAuthority" { + Context "Test for Set-EntraTrustedCertificateAuthority" { + It "Should return created one" { + $cer = Get-EntraTrustedCertificateAuthority + $cer[0].CrlDistributionPoint = "https://example.crl" + $cer[0].DeltaCrlDistributionPoint = "https://example2.crl" + + $result = Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer + + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "29728ade-6ae4-4ee9-9103-412912537da5" + $result.certificateAuthorities.TrustedIssuer| Should -Be "CN=ms-cmdlett" + $result.certificateAuthorities.CrlDistributionPoint| Should -Be "https://example.crl" + $result.certificateAuthorities.AuthorityType| Should -Be "RootAuthority" + $result.certificateAuthorities.TrustedIssuerSki| Should -Be "E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when parameters are empty" { + { Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when parameters are Invalid values" { + { Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation "" } | Should -Throw "Cannot process argument transformation on parameter 'CertificateAuthorityInformation'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraTrustedCertificateAuthority" + $cer = Get-EntraTrustedCertificateAuthority + $cer[0].CrlDistributionPoint = "https://example.crl" + $cer[0].DeltaCrlDistributionPoint = "https://example2.crl" + + Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraTrustedCertificateAuthority" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $cer = Get-EntraTrustedCertificateAuthority + $cer[0].CrlDistributionPoint = "https://example.crl" + $cer[0].DeltaCrlDistributionPoint = "https://example2.crl" + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + It "Should contain 'TenantId' " { + $cer = Get-EntraTrustedCertificateAuthority + $cer[0].CrlDistributionPoint = "https://example.crl" + $cer[0].DeltaCrlDistributionPoint = "https://example2.crl" + + $result = Set-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer + + $params = Get-Parameters -data $result."@odata.context" + + $params.uri | Should -Match "d5aec55f-2d12-4442-8d2f-ccca95d4390e" + } + + } +} + diff --git a/testVNext/Entra/SignIns/Valid.Tests.ps1 b/testVNext/Entra/SignIns/Valid.Tests.ps1 new file mode 100644 index 0000000000..5013e83278 --- /dev/null +++ b/testVNext/Entra/SignIns/Valid.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + + $module = Get-Module -Name Microsoft.Graph.Entra +} + +Describe "Valid parameter Tests"{ + Context "Test for valid parameters"{ + It "Should return empty object with Id parameter"{ + Write-Host "--------Start mock remove cmdlets with Id parameter only--------" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) + if($params.count -eq 1 -and $params -eq 'Id'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "---------End mock remove cmdlets with Id parameter only---------" + } + It "Should return empty object with ObjectId param"{ + Write-Host "-----Start mock remove cmdlets with ObjectId parameter only-----" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + if($params.count -eq 1 -and $params -eq 'ObjectId'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "------End mock remove cmdlets with ObjectId parameter only------" + } + # It "Should pass with 'Id' or 'ObjectId' parameter" { + # $count=0 + # $module.ExportedCommands.Keys | ForEach-Object { + + # $command = Get-Command $_ + # if ($command.Name.StartsWith('Remove')) + # { + # $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + # if($params.count -eq 1 -and ($params -eq 'ObjectId' -or $params-eq 'Id')){ + # $stringParams = $params -join ',' + # Write-Host "$command | $stringParams" + # $count++ + # } + # } + # } + # Write-Host $count + # } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Users/Entra.Tests.ps1 b/testVNext/Entra/Users/Entra.Tests.ps1 new file mode 100644 index 0000000000..e6b0c31795 --- /dev/null +++ b/testVNext/Entra/Users/Entra.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/Users/Get-EntraUser.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUser.Tests.ps1 new file mode 100644 index 0000000000..65533a2a7c --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUser.Tests.ps1 @@ -0,0 +1,175 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + $valueObject = [PSCustomObject]@{ + "DisplayName" = "Mock-User" + "AccountEnabled" = $true + "Mail" = "User@aaabbbcccc.OnMicrosoft.com" + "userPrincipalName" = "User@aaabbbcccc.OnMicrosoft.com" + "DeletedDateTime" = $null + "CreatedDateTime" = $null + "EmployeeId" = $null + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "Surname" = $null + "MailNickName" = "User" + "OnPremisesDistinguishedName" = $null + "OnPremisesSecurityIdentifier" = $null + "OnPremisesUserPrincipalName" = $null + "OnPremisesSyncEnabled" = $false + "onPremisesImmutableId" = $null + "OnPremisesLastSyncDateTime" = $null + "JobTitle" = $null + "CompanyName" = $null + "Department" = $null + "Country" = $null + "BusinessPhones" = @{} + "OnPremisesProvisioningErrors" = @{} + "ImAddresses" = @{} + "ExternalUserState" = $null + "ExternalUserStateChangeDateTime" = $null + "MobilePhone" = $null + } + + $response = @{ + '@odata.context' = 'Users()' + Value = $valueObject + } + + return @( + $response + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUser" { + Context "Test for Get-EntraUser" { + It "Should return specific user" { + $result = Get-EntraUser -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + Write-Verbose "Result : {$result}" -Verbose + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Get-EntraUser -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + Write-Verbose "Result : {$result}" -Verbose + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUser" + + $result = Get-EntraUser -Top 1 + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUser" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should fail when ObjectId is empty string value" { + { Get-EntraUser -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when ObjectId is empty" { + { Get-EntraUser -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should return all contact" { + $result = Get-EntraUser -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraUser -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should return top user" { + $result = Get-EntraUser -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraUser -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraUser -Top HH } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should return specific user by filter" { + $result = Get-EntraUser -Filter "DisplayName eq 'Mock-User'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-User' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific user by search string" { + $result = Get-EntraUser -SearchString "Mock-User" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-User' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + + } + + It "Should fail when search string is empty" { + { Get-EntraUser -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'.*" + } + + It "Should fail when Missing an argument for parameter Filter" { + { Get-EntraUser -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Property parameter should work" { + $result = Get-EntraUser -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-User' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraUser -Property } | Should -Throw "Missing an argument for parameter 'Property'.*" + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { + Get-EntraUser -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug + } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..b9a1578cf9 --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 @@ -0,0 +1,134 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + Id = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + AppRoleId = "00000000-0000-0000-0000-000000000000" + CreatedDateTime = "29-02-2024 05:53:00" + DeletedDateTime = "" + PrincipalDisplayName = "demo" + PrincipalId = "aaaaaaaa-bbbb-cccc-1111-222222222222" + PrincipalType = "Group" + ResourceDisplayName = "M365 License Manager" + ResourceId = "bbbbbbbb-cccc-dddd-2222-333333333333" + AdditionalProperties = @{} + Parameters = $args + } + ) + + } + + Mock -CommandName Get-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserAppRoleAssignment" { + Context "Test for Get-EntraUserAppRoleAssignment" { + It "Should return specific User" { + $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.AppRoleId | Should -Be "00000000-0000-0000-0000-000000000000" + $result.CreatedDateTime | Should -Be "29-02-2024 05:53:00" + $result.DeletedDateTime | Should -Be "" + $result.PrincipalDisplayName | Should -Be "demo" + $result.PrincipalId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.PrincipalType | Should -Be "Group" + $result.ResourceDisplayName | Should -Be "M365 License Manager" + $result.ResourceId | Should -Be "bbbbbbbb-cccc-dddd-2222-333333333333" + + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when ObjectId is empty string value" { + { Get-EntraUserAppRoleAssignment -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should fail when ObjectId is empty" { + { Get-EntraUserAppRoleAssignment -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'. Specify a parameter of type 'System.String' and try again." + } + + + It "Should return all contact" { + $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should return top user" { + $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top HH } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should contain UserId in parameters when passed ObjectId to it" { + $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserAppRoleAssignment" + + $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserAppRoleAssignment" + + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + + It "Property parameter should work" { + $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property PrincipalDisplayName + $result | Should -Not -BeNullOrEmpty + $result.PrincipalDisplayName | Should -Be "demo" + + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 new file mode 100644 index 0000000000..eef7d273ab --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 @@ -0,0 +1,154 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + Id = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + '@odata.type' = '#microsoft.graph.servicePrincipal' + accountEnabled = $true + alternativeNames = @{} + appDisplayName = "Microsoft Graph Command Line Tools" + appId = "44445555-eeee-6666-ffff-7777aaaa8888" + appOwnerOrganizationId = "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" + appRoleAssignmentRequired = $false + createdDateTime = "2023-07-12T10:09:17Z" + displayName = "Microsoft Graph Command Line Tools" + homepage = "https://docs.microsoft.com/en-us/graph/powershell/get-started" + notificationEmailAddresses = @{} + replyUrls = @("https://login.microsoftonline.com/common/oauth2/nativeclient", "http://localhost", "ms-appx-web://microsoft.aad.brokerplugin/14d82eec-204b-4c2f-b7e8-296a70dab67e") + servicePrincipalNames = @("11112222-bbbb-3333-cccc-4444dddd5555") + servicePrincipalType = "Application" + signInAudience = "AzureADandPersonalMicrosoftAccount" + tags = @("WindowsAzureActiveDirectoryIntegratedApp") + addIns = @{} + appRoles = @{} + info = @{ + 'logoUrl' = 'https://secure.aadcdn.microsoftonline-p.com/dbd5a2dd-n2kxueriy-dm8fhyf0anvulmvhi3kdbkkxqluuekyfc/appbranding/ougaobwb9usxq2odcg5mrmppjemia-kwnvjaepk6x3k/1033/bannerlogo?ts=637363922849342280' + 'privacyStatementUrl' = 'https://privacy.microsoft.com/en-us/privacystatement' + 'termsOfServiceUrl' = 'https://docs.microsoft.com/en-us/legal/microsoft-apis/terms-of-use?context=graph/context' + } + oauth2PermissionScopes = @{} + resourceSpecificApplicationPermissions = @{} + verifiedPublisher = @{} + keyCredentials = @{} + passwordCredentials = @{} + DeletedDateTime = "" + AdditionalProperties = @{ + "test" = "joel" + } + Parameters = $args + } + ) + + } + + Mock -CommandName Get-MgUserCreatedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserCreatedObject" { + Context "Test for Get-EntraUserCreatedObject" { + It "Should return specific User" { + $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific User with alias" { + $result = Get-EntraUserCreatedObject -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty string value" { + { Get-EntraUserCreatedObject -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Get-EntraUserCreatedObject -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should return all contact" { + $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should return top user" { + $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top HH } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserCreatedObject" + + $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserCreatedObject" + + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Property parameter should work" { + $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property appDisplayName + $result | Should -Not -BeNullOrEmpty + $result.appDisplayName | Should -Be "Microsoft Graph Command Line Tools" + + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 new file mode 100644 index 0000000000..0643919d87 --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 @@ -0,0 +1,140 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + value = @( + @{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "DisplayName" = "Mock-User" + "OnPremisesImmutableId" = $null + "DeletedDateTime" = $null + "OnPremisesSyncEnabled" = $null + "OnPremisesLastSyncDateTime" = $null + "OnPremisesProvisioningErrors" = @{} + "MobilePhone" = "425-555-0100" + "BusinessPhones" = @("425-555-0100") + "ExternalUserState" = $null + "ExternalUserStateChangeDateTime" = $null + "Parameters" = $args + } + ) + } + } + + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + + + +Describe "Get-EntraUserDirectReport" { + Context "Test for Get-EntraUserDirectReport" { + It "Should return specific user direct report" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific user direct report with alias" { + $result = Get-EntraUserDirectReport -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when UserId is empty" { + { Get-EntraUserDirectReport -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + It "Should fail when UserId is invalid" { + { Get-EntraUserDirectReport -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string.*" + } + It "Should return all user direct reports" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 user direct report" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when top is empty" { + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when top is invalid" { + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Property parameter should work" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock-User" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Result should contain Properties" { + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DeletionTimestamp | Should -Be $null + $result.DirSyncEnabled | Should -Be $null + $result.ImmutableId | Should -Be $null + $result.LastDirSyncTime | Should -Be $null + $result.Mobile | Should -Be "425-555-0100" + $result.ProvisioningErrors | Should -BeNullOrEmpty + $result.TelephoneNumber | Should -Be "425-555-0100" + $result.UserState | Should -Be $null + $result.UserStateChangedOn | Should -Be $null + + } + It "Should contain UserId in parameters when passed UserId to it" { + + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $para= $params | ConvertTo-json | ConvertFrom-Json + $para.URI | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserDirectReport" + $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserDirectReport" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } + +} + diff --git a/testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 new file mode 100644 index 0000000000..1cdbc205ec --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 @@ -0,0 +1,82 @@ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + "employeeId" = $null + "createdDateTime" = $null + "onPremisesDistinguishedName" = $null + "identities" = @("testuser@contoso.com") + "Parameters" = $args + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} +Describe "Get-EntraUserExtension" { + Context "Test for Get-EntraUserExtension" { + It "Should return user extensions" { + $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserExtension" + $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should fail when UserId is empty string value" { + { Get-EntraUserExtension -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Get-EntraUserExtension -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Property parameter should work" { + $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'.*" + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { + Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug + } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 new file mode 100644 index 0000000000..cd3ec98597 --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 @@ -0,0 +1,104 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraUserLicenseDetail with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + Id = "X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8" + ServicePlans = @("COMMON_DEFENDER_PLATFORM_FOR_OFFICE", "Bing_Chat_Enterprise", "MESH_IMMERSIVE_FOR_TEAMS", "PURVIEW_DISCOVERY") + SkuId = "00001111-aaaa-2222-bbbb-3333cccc4444" + SkuPartNumber = "ENTERPRISEPREMIUM" + AdditionalProperties = @{} + parameters = $args + } + ) + + } + + Mock -CommandName Get-MgUserLicenseDetail -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserLicenseDetail" { + Context "Test for Get-EntraUserLicenseDetail" { + It "Should return specific User" { + $result = Get-EntraUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8" + $result.ServicePlans | Should -Be @("COMMON_DEFENDER_PLATFORM_FOR_OFFICE", "Bing_Chat_Enterprise", "MESH_IMMERSIVE_FOR_TEAMS", "PURVIEW_DISCOVERY") + $result.SkuId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" + $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] + + should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific User with alias" { + $result = Get-EntraUserLicenseDetail -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8" + $result.ServicePlans | Should -Be @("COMMON_DEFENDER_PLATFORM_FOR_OFFICE", "Bing_Chat_Enterprise", "MESH_IMMERSIVE_FOR_TEAMS", "PURVIEW_DISCOVERY") + $result.SkuId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" + $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] + + should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty string value" { + { Get-EntraUserLicenseDetail -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Get-EntraUserLicenseDetail -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Property parameter should work" { + $result = Get-EntraUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8' + + Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserLicenseDetail" + + $result = Get-EntraUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserLicenseDetail" + + Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 new file mode 100644 index 0000000000..0b5a3f4ac3 --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 @@ -0,0 +1,131 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraUserManager with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + Id = '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + ageGroup = $null + onPremisesLastSyncDateTime = $null + creationType = $null + imAddresses = @("test@contoso.com") + preferredLanguage = $null + mail = "test@contoso.com" + securityIdentifier = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + identities = @( + @{ + signInType = "userPrincipalName" + issuer = "contoso.com" + issuerAssignedId = "test@contoso.com" + } + ) + Parameters = $args + } + ) + + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserManager" { + Context "Test for Get-EntraUserManager" { + It "Should return specific User" { + $result = Get-EntraUserManager -UserId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.ageGroup | Should -BeNullOrEmpty + $result.onPremisesLastSyncDateTime | Should -BeNullOrEmpty + $result.creationType | Should -BeNullOrEmpty + $result.imAddresses | Should -Be @("test@contoso.com") + $result.preferredLanguage | Should -BeNullOrEmpty + $result.mail | Should -Be "test@contoso.com" + $result.securityIdentifier | Should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result.identities | Should -HaveCount 1 + $result.identities[0].signInType | Should -Be "userPrincipalName" + $result.identities[0].issuer | Should -Be "contoso.com" + $result.identities[0].issuerAssignedId | Should -Be "test@contoso.com" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific User wit alias" { + $result = Get-EntraUserManager -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.ageGroup | Should -BeNullOrEmpty + $result.onPremisesLastSyncDateTime | Should -BeNullOrEmpty + $result.creationType | Should -BeNullOrEmpty + $result.imAddresses | Should -Be @("test@contoso.com") + $result.preferredLanguage | Should -BeNullOrEmpty + $result.mail | Should -Be "test@contoso.com" + $result.securityIdentifier | Should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + $result.identities | Should -HaveCount 1 + $result.identities[0].signInType | Should -Be "userPrincipalName" + $result.identities[0].issuer | Should -Be "contoso.com" + $result.identities[0].issuerAssignedId | Should -Be "test@contoso.com" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty string value" { + { Get-EntraUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Get-EntraUserManager -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraUserManager -UserId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result.Parameters + $params.Uri | Should -Match "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserManager" + + $result = Get-EntraUserManager -UserId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserManager" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Property parameter should work" { + $result = Get-EntraUserManager -UserId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraUserManager -UserId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserManager -UserId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 new file mode 100644 index 0000000000..bfeb1489d4 --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 @@ -0,0 +1,129 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DeletedDateTime" = "" + "Id" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + "AdditionalProperties" = @{ + '@odata.type' = '#microsoft.graph.administrativeUnit' + 'displayName' = "NEW2" + 'description' = "TEST221" + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgUserMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserMembership" { + Context "Test for Get-EntraUserMembership" { + It "Should return specific user membership" { + $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific user membership with alias" { + $result = Get-EntraUserMembership -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty" { + { Get-EntraUserMembership -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + + It "Should fail when UserId is invalid" { + { Get-EntraUserMembership -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should return all user membership" { + $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should return top user membership" { + $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 5 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should Contain ObjectId" { + $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Property parameter should work" { + $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserMembership" + + $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserMembership" + + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 new file mode 100644 index 0000000000..38367a325e --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 @@ -0,0 +1,135 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "ClientId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "ConsentType" = "Principal" + "Id" = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" + "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "ResourceId" = "bbbbbbbb-cccc-dddd-2222-333333333333" + "Scope" = "User.Read openid profile offline_access" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgUserOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserOAuth2PermissionGrant" { + Context "Test for Get-EntraUserOAuth2PermissionGrant" { + It "Should return specific UserOAuth2PermissionGrant" { + $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result | Should -Not -BeNullOrEmpty + $result.PrincipalId | should -Contain 'aaaaaaaa-bbbb-cccc-1111-222222222222' + $result.Id | Should -Contain 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' + + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific UserOAuth2PermissionGrant with alias" { + $result = Get-EntraUserOAuth2PermissionGrant -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result | Should -Not -BeNullOrEmpty + $result.PrincipalId | should -Contain 'aaaaaaaa-bbbb-cccc-1111-222222222222' + $result.Id | Should -Contain 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' + + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty" { + { Get-EntraUserOAuth2PermissionGrant -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + + It "Should fail when UserId is invalid" { + { Get-EntraUserOAuth2PermissionGrant -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should return all User OAuth2Permission Grant" { + $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should return top User OAuth2Permission Grant" { + $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should Contain PrincipalId" { + $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.PrincipalId | should -Contain "aaaaaaaa-bbbb-cccc-1111-222222222222" + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + } + + + It "Property parameter should work" { + $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Property ConsentType + $result | Should -Not -BeNullOrEmpty + $result.ConsentType | Should -Be "Principal" + + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOAuth2PermissionGrant" + + $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOAuth2PermissionGrant" + + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 new file mode 100644 index 0000000000..6bd8062221 --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 @@ -0,0 +1,144 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.device" + "accountEnabled" = $true + "createdDateTime" = "2024-01-18T08:50:28Z" + "deviceId" = "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" + "deviceMetadata" = "MetaData" + "deviceVersion" = "2" + "displayName" = "Sawyer Miller" + "isCompliant" = $false + "isManaged" = $true + "operatingSystem" = "WINDOWS" + "operatingSystemVersion" = "10.0.22621.1700" + "physicalIds" = @( + "[HWID]:h:6825786449406074" + "[USER-HWID]:7f08336b-29ed-4297-bb1f-60520d34577f:6825786449406074" + "[GID]:g:6966518641169130" + ) + "systemLabels" = @{} + "extensionAttributes" = $null + "alternativeSecurityIds" = @( + @{ + "type" = 2 + "key" = "dGVzdA==" + } + ) + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgUserOwnedDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserOwnedDevice" { +Context "Test for Get-EntraUserOwnedDevice" { + It "Should get devices owned by a user" { + $result = Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" + $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" + + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should get devices owned by a user with alias" { + $result = Get-EntraUserOwnedDevice -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" + $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" + + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Property parameter should work" { + $result = Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Property DisplayName + $result.Id | Should -Be 'aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb' + } + + It "Should fail when ObjectlId is empty" { + { Get-EntraUserOwnedDevice -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + + It "Should fail when ObjectlId is invalid" { + { Get-EntraUserOwnedDevice -UserId ""} | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should get all devices owned by a user" { + $result = Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Contain "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraGroup -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should get top one device owned by a user" { + $result = Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" + $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" + + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Top is empty" { + { Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when Top is invalid" { + { Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top "XCX" } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOwnedDevice" + $result = Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOwnedDevice" + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 new file mode 100644 index 0000000000..9682f31217 --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 @@ -0,0 +1,142 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraUserOwnedObject with parameters: $($args | ConvertTo-Json -Depth 3)" + + return @{ + value = @( + @{ + Id = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + applicationTemplateId = "00001111-aaaa-2222-bbbb-3333cccc4444" + appId = "11112222-bbbb-3333-cccc-4444dddd5555" + displayName = "ToGraph_443DEM" + signInAudience = "AzureADMyOrg" + publisherDomain = "contoso.com" + Parameters = $args + } + ) + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserOwnedObject" { + Context "Test for Get-EntraUserOwnedObject" { + It "Should return specific User" { + $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.applicationTemplateId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.appId | Should -Be "11112222-bbbb-3333-cccc-4444dddd5555" + $result.signInAudience | Should -Be "AzureADMyOrg" + $result.publisherDomain | Should -Be "contoso.com" + $result.DisplayName | Should -Be "ToGraph_443DEM" + + + should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific User with alias" { + $result = Get-EntraUserOwnedObject -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.applicationTemplateId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.appId | Should -Be "11112222-bbbb-3333-cccc-4444dddd5555" + $result.signInAudience | Should -Be "AzureADMyOrg" + $result.publisherDomain | Should -Be "contoso.com" + $result.DisplayName | Should -Be "ToGraph_443DEM" + + + should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when UserId is empty string value" { + { Get-EntraUserOwnedObject -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Get-EntraUserOwnedObject -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should return top user" { + $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should return all contact" { + $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.Uri | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOwnedObject" + + $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOwnedObject" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Property parameter should work" { + $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property displayName + $result | Should -Not -BeNullOrEmpty + $result.displayName | Should -Be "ToGraph_443DEM" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 new file mode 100644 index 0000000000..26faa233c8 --- /dev/null +++ b/testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 @@ -0,0 +1,130 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "ffffffff-5555-6666-7777-aaaaaaaaaaaa" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.device" + "accountEnabled" = $true + "deviceId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "displayName" = "Mock-App" + "isCompliant" = $false + "isManaged" = $true + "operatingSystem" = "WINDOWS" + "operatingSystemVersion" = "10.0.22621.1700" + "systemLabels" = @{} + "extensionAttributes" = $null + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgUserRegisteredDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Get-EntraUserRegisteredDevice" { +Context "Test for Get-EntraUserRegisteredDevice" { + It "Should return specific user registered device" { + $result = Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "ffffffff-5555-6666-7777-aaaaaaaaaaaa" + $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return specific user registered device with alias" { + $result = Get-EntraUserRegisteredDevice -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "ffffffff-5555-6666-7777-aaaaaaaaaaaa" + $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when ObjectlId is empty" { + { Get-EntraUserRegisteredDevice -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + It "Should fail when ObjectlId is invalid" { + { Get-EntraUserRegisteredDevice -UserId ""} | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should return All user registered devices" { + $result = Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "ffffffff-5555-6666-7777-aaaaaaaaaaaa" + $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 user registered device" { + $result = Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "ffffffff-5555-6666-7777-aaaaaaaaaaaa" + $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Property parameter should work" { + $result = Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserRegisteredDevice" + $result = Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserRegisteredDevice" + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + + diff --git a/testVNext/Entra/Users/Invalid.Tests.ps1 b/testVNext/Entra/Users/Invalid.Tests.ps1 new file mode 100644 index 0000000000..6d5381a100 --- /dev/null +++ b/testVNext/Entra/Users/Invalid.Tests.ps1 @@ -0,0 +1,105 @@ +if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra +} + +Describe "Invalid Tests"{ + It "Should fail when parameters are invalid"{ + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object{ + $command = Get-Command $_ + { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." + } + } + It "Should fail with 'TenantId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ + $commandScriptBlock = [scriptblock]::Create("$command -TenantId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'TenantId'.*" + } + } + } + It "Should fail with 'Id' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Id'){ + $commandScriptBlock = [scriptblock]::Create("$command -Id $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + } + } + It "Should fail with 'ObjectId' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ + $commandScriptBlock = [scriptblock]::Create("$command -ObjectId $objectId") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'ObjectId'.*" + } + } + } + It "Should fail with 'All' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'All'){ + $commandScriptBlock = [scriptblock]::Create("$command -All `$True") + if('Find-EntraPermission' -eq $command){ + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'*" + } + else { + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + } + } + } + It "Should fail with 'Top' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Top'){ + $commandScriptBlock = [scriptblock]::Create("$command -Top ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Top'*" + } + } + } + It "Should fail with 'Filter' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ + $commandScriptBlock = [scriptblock]::Create("$command -Filter ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + } + } + It "Should fail with 'SearchString' parameter" { + $module = Get-Module -Name Microsoft.Graph.Entra + $module.ExportedCommands.Keys | ForEach-Object { + $command = Get-Command $_ + if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ + $commandScriptBlock = [scriptblock]::Create("$command -SearchString ") + { Invoke-Command -ScriptBlock $commandScriptBlock } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + } + } + It "Should fail with exception when no parameter is passed" { + $cmdlets = @( + @{ CmdletName = 'Enable-EntraDirectoryRole'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + @{ CmdletName = 'New-EntraConditionalAccessPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraNamedLocationPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" }, + @{ CmdletName = 'New-EntraPermissionGrantPolicy'; Exception = "Authentication needed. Please call Connect-MgGraph.*" } + ) + $cmdlets | ForEach-Object { + $commandName = $_.CmdletName + $Exception = $_.Exception + $commandScriptBlock = [scriptblock]::Create("$commandName -ErrorAction Stop") + try { + Invoke-Command -ScriptBlock $commandScriptBlock + } + catch { $_ -match $Exception | Should -BeTrue } + } + } +} \ No newline at end of file diff --git a/testVNext/Entra/Users/Module.Tests.ps1 b/testVNext/Entra/Users/Module.Tests.ps1 new file mode 100644 index 0000000000..cc40ad720b --- /dev/null +++ b/testVNext/Entra/Users/Module.Tests.ps1 @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +Describe "Microsoft.Graph.Entra Module" { + Context "On module import" { + BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + } + + It "Should have exported commands" { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo | Should -Not -BeNullOrEmpty + $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 + + } + + It 'Should be compatible with PS core and desktop' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") + } + + It 'Should point to script module' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + } + + It 'Should lock GUID' { + $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" + } + + It "Module import should not write to error and information streams" { + $ps = [powershell]::Create() + $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + "Checking Information stream" | Out-Host + $ps.Streams.Information.Count | Should -Be 0 + "Checking Error stream" | Out-Host + $ps.Streams.Error.Count | Should -Be 0 + "Checking Verbose stream" | Out-Host + $ps.Streams.Verbose.Count | Should -Be 0 + "Checking Debug stream" | Out-Host + $ps.Streams.Warning.Count | Should -Be 0 + "Checking Progress stream" | Out-Host + $ps.Streams.Progress.Count | Should -Be 0 + + $ps.Dispose() + } + } +} diff --git a/testVNext/Entra/Users/New-EntraUser.Tests.ps1 b/testVNext/Entra/Users/New-EntraUser.Tests.ps1 new file mode 100644 index 0000000000..4962cdc172 --- /dev/null +++ b/testVNext/Entra/Users/New-EntraUser.Tests.ps1 @@ -0,0 +1,229 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + + #Write-Host "Mocking New-EntraUser with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + DisplayName = "demo004" + Id = "sdjfksd-2343-n21kj" + UserPrincipalName = "SawyerM@contoso.com" + AccountEnabled = "True" + MailNickname = "demoUser" + AgeGroup = "adult" + Parameters = $args + City = "New York" + ExternalUserStateChangeDateTime = "2024-05-02" + CompanyName = "ABC Inc" + PreferredLanguage = "English" + FacsimileTelephoneNumber = "123456789" + GivenName = "John" + mobilePhone = "987654321" + UsageLocation = "US" + PostalCode = "10001" + CreationType = "Manual" + ConsentProvidedForMinor = "Yes" + onPremisesImmutableId = "1234567890" + Country = "USA" + Department = "IT" + PasswordPolicies = "Default" + JobTitle = "Engineer" + IsCompromised = $false + ExternalUserState = "Active" + UserType = "Member" + OtherMails = @("alternate@email.com") + PhysicalDeliveryOfficeName = "Office A" + State = "NY" + StreetAddress = "123 Main St" + BusinessPhones = "987654321" + Surname = "Doe" + ShowInAddressList = $true + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraUser" { + Context "Test for New-EntraUser" { + + It "Should return created User" { + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + $result = New-EntraUser ` + -DisplayName "demo004" ` + -PasswordProfile $PasswordProfile ` + -UserPrincipalName "SawyerM@contoso.com" ` + -AccountEnabled $true ` + -MailNickName "demoUser" ` + -AgeGroup "adult" ` + -City "New York" ` + -UserStateChangedOn "2024-05-02" ` + -CompanyName "ABC Inc" ` + -PreferredLanguage "English" ` + -FacsimileTelephoneNumber "123456789" ` + -GivenName "John" ` + -Mobile "987654321" ` + -UsageLocation "US" ` + -PostalCode "10001" ` + -CreationType "Manual" ` + -ConsentProvidedForMinor "Yes" ` + -ImmutableId "1234567890" ` + -Country "USA" ` + -Department "IT" ` + -PasswordPolicies "Default" ` + -JobTitle "Engineer" ` + -IsCompromised $false ` + -UserState "Active" ` + -UserType "Member" ` + -OtherMails @("alternate@email.com") ` + -PhysicalDeliveryOfficeName "Office A" ` + -State "NY" ` + -StreetAddress "123 Main St" ` + -TelephoneNumber "987654321" ` + -Surname "Doe" ` + -ShowInAddressList $true + + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "demo004" + $result.AccountEnabled | Should -Be $true + $result.UserPrincipalName | Should -Be "SawyerM@contoso.com" + $result.MailNickName | Should -Be "demoUser" + $result.AgeGroup | Should -Be "adult" + $result.City | Should -Be "New York" + $result.UserStateChangedOn | Should -Be "2024-05-02" + $result.CompanyName | Should -Be "ABC Inc" + $result.PreferredLanguage | Should -Be "English" + $result.FacsimileTelephoneNumber | Should -Be "123456789" + $result.GivenName | Should -Be "John" + $result.Mobile | Should -Be "987654321" + $result.UsageLocation | Should -Be "US" + $result.PostalCode | Should -Be "10001" + $result.CreationType | Should -Be "Manual" + $result.ConsentProvidedForMinor | Should -Be "Yes" + $result.ImmutableId | Should -Be "1234567890" + $result.Country | Should -Be "USA" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when parameters are empty" { + { New-EntraUser -DisplayName "" -AgeGroup "" -AccountEnabled -MailNickName "" -UserPrincipalName "" } | Should -Throw "Missing an argument for parameter*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraUser" + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + $result = New-EntraUser -DisplayName "demo002" -PasswordProfile $PasswordProfile -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraUser" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should contain MobilePhone in parameters when passed Mobile to it" { + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + $result = New-EntraUser -DisplayName "demo002" -PasswordProfile $PasswordProfile -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" -Mobile "1234567890" + $params = Get-Parameters -data $result.Parameters + ($params.Body | ConvertFrom-Json ).MobilePhone | Should -Be "1234567890" + } + + It "Should contain Identities in parameters when passed SignInNames to it" { + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + # Create SignInName objects + $signInName1 = [Microsoft.Open.AzureAD.Model.SignInName]::new() + $signInName1.Type = "emailAddress" + $signInName1.Value = "example1@example.com" + + $result = New-EntraUser -DisplayName "demo002" -PasswordProfile $PasswordProfile ` + -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true ` + -MailNickName "demo002NickName" -AgeGroup "adult" -SignInNames @($signInName1) + + $params = Get-Parameters -data $result.Parameters + + # Check the request body for Identities + $requestBody = $params.Body | ConvertFrom-Json + + # Assert that the Identities in the request body match the SignInName objects + $requestBody.Identities[0].Type | Should -Be "emailAddress" + $requestBody.Identities[0].Value | Should -Be "example1@example.com" + } + + It "Should contain ExternalUserState, OnPremisesImmutableId, ExternalUserStateChangeDateTime, BusinessPhones" { + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + # format like "yyyy-MM-dd HH:mm:ss" + $userStateChangedOn = [System.DateTime]::Parse("2015-12-08 15:15:19") + + + $result = New-EntraUser -DisplayName "demo002" -PasswordProfile $PasswordProfile ` + -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true ` + -MailNickName "demo002NickName" -AgeGroup "adult" ` + -UserState "PendingAcceptance" ` + -UserStateChangedOn $userStateChangedOn ` + -ImmutableId "djkjsajsa-e32j2-2i32" ` + -TelephoneNumber "1234567890" + + $params = Get-Parameters -data $result.Parameters + + $requestBody = $params.Body | ConvertFrom-Json + + $requestBody.BusinessPhones[0] | Should -Be "1234567890" + + $requestBody.ExternalUserState | Should -Be "PendingAcceptance" + + $requestBody.OnPremisesImmutableId | Should -Be "djkjsajsa-e32j2-2i32" + + $requestBody.ExternalUserStateChangeDateTime | Should -Be $userStateChangedOn + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + # format like "yyyy-MM-dd HH:mm:ss" + $userStateChangedOn = [System.DateTime]::Parse("2015-12-08 15:15:19") + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraUser -DisplayName "demo002" -PasswordProfile $PasswordProfile ` + -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true ` + -MailNickName "demo002NickName" -AgeGroup "adult" ` + -UserState "PendingAcceptance" ` + -UserStateChangedOn $userStateChangedOn ` + -ImmutableId "djkjsajsa-e32j2-2i32" ` + -TelephoneNumber "1234567890" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..7374ca91bb --- /dev/null +++ b/testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 @@ -0,0 +1,118 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + #Write-Host "Mocking New-EntraUserAppRoleAssignment with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + Id = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + AppRoleId = "44445555-eeee-6666-ffff-7777aaaa8888" + CreatedDateTime = "08-05-2024 11:26:59" + DeletedDateTime = $null + PrincipalDisplayName = "Test One Updated" + PrincipalId = "aaaaaaaa-bbbb-cccc-1111-222222222222" + PrincipalType = "User" + ResourceDisplayName = "Box" + ResourceId = "bbbbbbbb-cccc-dddd-2222-333333333333" + AdditionalProperties = @( + @{ + Name = "@odata.context" + Value = "https://graph.microsoft.com/v1.0/$metadata#users('aaaa0000-bb11-2222-33cc-444444dddddd')/appRoleAssignments/$entity" + } + ) + } + ) + } + + Mock -CommandName New-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "New-EntraUserAppRoleAssignment" { + Context "Test for New-EntraUserAppRoleAssignment" { + It "Should return created Group" { + $expectedResult = @{ + Id = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + AppRoleId = "44445555-eeee-6666-ffff-7777aaaa8888" + CreatedDateTime = "08-05-2024 11:26:59" + DeletedDateTime = $null + PrincipalDisplayName = "Test One Updated" + PrincipalId = "aaaaaaaa-bbbb-cccc-1111-222222222222" + PrincipalType = "User" + ResourceDisplayName = "Box" + ResourceId = "bbbbbbbb-cccc-dddd-2222-333333333333" + AdditionalProperties = @( + @{ + Name = "@odata.context" + Value = "https://graph.microsoft.com/v1.0/$metadata#users('aaaa0000-bb11-2222-33cc-444444dddddd')/appRoleAssignments/$entity" + } + ) + } + + $result = New-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -PrincipalId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -ResourceId 'bbbbbbbb-cccc-dddd-2222-333333333333' -Id '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be $expectedResult.Id + $result.AppRoleId | Should -Be $expectedResult.AppRoleId + $result.CreatedDateTime | Should -Be $expectedResult.CreatedDateTime + $result.DeletedDateTime | Should -Be $expectedResult.DeletedDateTime + $result.PrincipalDisplayName | Should -Be $expectedResult.PrincipalDisplayName + $result.PrincipalId | Should -Be $expectedResult.PrincipalId + $result.PrincipalType | Should -Be $expectedResult.PrincipalType + $result.ResourceDisplayName | Should -Be $expectedResult.ResourceDisplayName + $result.ResourceId | Should -Be $expectedResult.ResourceId + + Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when parameters are empty" { + { New-EntraUserAppRoleAssignment -ObjectId -PrincipalId } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when parameters are Invalid values" { + { New-EntraUserAppRoleAssignment -ObjectId "" -PrincipalId "" } | Should -Throw "Cannot bind argument to parameter*" + } + + It "Should contain UserId in parameters" { + Mock -CommandName New-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = New-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -PrincipalId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -ResourceId 'bbbbbbbb-cccc-dddd-2222-333333333333' -Id '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $params = Get-Parameters -data $result + + $params.UserId | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraUserAppRoleAssignment" + + $result = New-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -PrincipalId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -ResourceId 'bbbbbbbb-cccc-dddd-2222-333333333333' -Id '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraUserAppRoleAssignment" + + Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -PrincipalId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -ResourceId 'bbbbbbbb-cccc-dddd-2222-333333333333' -Id '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 b/testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 new file mode 100644 index 0000000000..4f631de168 --- /dev/null +++ b/testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Remove-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraUser" { + Context "Test for Remove-EntraUser" { + It "Should return empty object" { + $result = Remove-EntraUser -UserId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraUser -ObjectId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when UserId is empty string" { + { Remove-EntraUser -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should fail when UserId is empty" { + { Remove-EntraUser -UserId } | Should -Throw "Missing an argument for parameter*" + } + It "Should contain Id in parameters when passed UserId to it" { + Mock -CommandName Remove-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraUser -UserId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + $params = Get-Parameters -data $result + $params.userId | Should -Be "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUser" + + Remove-EntraUser -UserId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUser" + + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraUser -UserId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..fff29e20c6 --- /dev/null +++ b/testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraUserAppRoleAssignment" { + Context "Test for Remove-EntraUserAppRoleAssignment" { + It "Should return empty object" { + $result = Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when ObjectId is invalid" { + { Remove-EntraUserAppRoleAssignment -ObjectId "" AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should fail when ObjectId is empty" { + { Remove-EntraUserAppRoleAssignment -ObjectId -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb"} | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when AppRoleAssignmentId is invalid" { + { Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" AppRoleAssignmentId "" } | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + + It "Should fail when AppRoleAssignmentId is empty" { + { Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId } | Should -Throw "Missing an argument for parameter*" + } + + It "Should contain UserId in parameters" { + Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" + $params = Get-Parameters -data $result + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUserAppRoleAssignment" + + + Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUserAppRoleAssignment" + + Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 b/testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 new file mode 100644 index 0000000000..173778b475 --- /dev/null +++ b/testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Remove-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Remove-EntraUserManager" { + Context "Test for Remove-EntraUserManager" { + It "Should return empty object" { + $result = Remove-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should return empty object with alias" { + $result = Remove-EntraUserManager -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when UserId is empty string" { + { Remove-EntraUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should fail when UserId is empty" { + { Remove-EntraUserManager -UserId } | Should -Throw "Missing an argument for parameter*" + } + It "Should contain UserId in parameters when passed UserId to it" { + Mock -CommandName Remove-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Graph.Entra + + $result = Remove-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result + $params.userId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUserManager" + + + Remove-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUserManager" + + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Set-EntraUser.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUser.Tests.ps1 new file mode 100644 index 0000000000..1dca943f40 --- /dev/null +++ b/testVNext/Entra/Users/Set-EntraUser.Tests.ps1 @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraUser" { + Context "Test for Set-EntraUser" { + It "Should return empty object" { + $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo002" -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" -PostalCode "10001" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty" { + { Set-EntraUser -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is no value" { + { Set-EntraUser -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + + It "Should contain userId in parameters when passed UserId to it" { + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra + $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -Mobile "1234567890" + $params = Get-Parameters -data $result + $params.userId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params.MobilePhone | Should -Be "1234567890" + + } + + It "Should contain MobilePhone in parameters when passed Mobile to it" { + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra + $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -Mobile "1234567890" + $params = Get-Parameters -data $result + $params.MobilePhone | Should -Be "1234567890" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUser" + + Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -Mobile "1234567890" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUser" + + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -Mobile "1234567890" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + It "Should contain ExternalUserState, OnPremisesImmutableId, ExternalUserStateChangeDateTime, BusinessPhones" { + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra + + # format like "yyyy-MM-dd HH:mm:ss" + $userStateChangedOn = [System.DateTime]::Parse("2015-12-08 15:15:19") + + $result = Set-EntraUser -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" ` + -UserState "PendingAcceptance" ` + -UserStateChangedOn $userStateChangedOn ` + -ImmutableId "djkjsajsa-e32j2-2i32" ` + -TelephoneNumber "1234567890" + + $params = Get-Parameters -data $result + + $params.BusinessPhones[0] | Should -Be "1234567890" + + $params.ExternalUserState | Should -Be "PendingAcceptance" + + $params.OnPremisesImmutableId | Should -Be "djkjsajsa-e32j2-2i32" + + $params.ExternalUserStateChangeDateTime | Should -Be $userStateChangedOn + + } + } + +} + diff --git a/testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 new file mode 100644 index 0000000000..271e826854 --- /dev/null +++ b/testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 @@ -0,0 +1,125 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Set-EntraUserLicense with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + userPrincipalName = "test122@M365x99297270.OnMicrosoft.com" + preferredLanguage = "EN" + mobilePhone = "9984534564" + displayName = "SNEHALtest" + givenName = "test12" + mail = "test122@M365x99297270.OnMicrosoft.com" + '@odata.context' = "https://graph.microsoft.com/v1.0/$metadata#users/$entity" + id = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + jobTitle = "testqa" + officeLocation = "test" + businessPhones = @("8976546787") + surname = "KTETSs" + Parameters = $args + } + ) + + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraUserLicense" { + Context "Test for Set-EntraUserLicense" { + It "Should return specific User" { + $addLicensesArray = [PSCustomObject]@{ + skuId = "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" + } + $Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses + $Licenses.AddLicenses =$addLicensesArray + $result = Set-EntraUserLicense -UserId 1139c016-f606-45f0-83f7-40eb2a552a6f -AssignedLicenses $Licenses + + $result | Should -Not -BeNullOrEmpty + $result.userPrincipalName | Should -Be "test122@M365x99297270.OnMicrosoft.com" + $result.preferredLanguage | Should -Be "EN" + $result.mobilePhone | Should -Be "9984534564" + $result.displayName | Should -Be "SNEHALtest" + $result.givenName | Should -Be "test12" + $result.mail | Should -Be "test122@M365x99297270.OnMicrosoft.com" + $result.'@odata.context' | Should -Be "https://graph.microsoft.com/v1.0/$metadata#users/$entity" + $result.id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.jobTitle | Should -Be "testqa" + $result.officeLocation | Should -Be "test" + $result.businessPhones | Should -Be @("8976546787") + $result.surname | Should -Be "KTETSs" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty string value" { + { Set-EntraUserLicense -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Set-EntraUserLicense -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should fail when AssignedLicenses is empty" { + { Set-EntraUserLicense -UserId '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' -AssignedLicenses } | Should -Throw "Missing an argument for parameter 'AssignedLicenses'. Specify a parameter of type 'Microsoft.Open.AzureAD.Model.AssignedLicenses' and try again." + } + + It "Should contain UserId in parameters when passed UserId to it" { + $addLicensesArray = [PSCustomObject]@{ + skuId = "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" + } + $Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses + $Licenses.AddLicenses =$addLicensesArray + $result = Set-EntraUserLicense -UserId '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' -AssignedLicenses $Licenses + + $params = Get-Parameters -data $result.Parameters + $params.Uri | Should -Match "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserLicense" + $addLicensesArray = [PSCustomObject]@{ + skuId = "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" + } + $Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses + $Licenses.AddLicenses =$addLicensesArray + + Set-EntraUserLicense -UserId '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' -AssignedLicenses $Licenses + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserLicense" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $addLicensesArray = [PSCustomObject]@{ + skuId = "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" + } + $Licenses = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses + $Licenses.AddLicenses =$addLicensesArray + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraUserLicense -UserId '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' -AssignedLicenses $Licenses -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 new file mode 100644 index 0000000000..f1ad254189 --- /dev/null +++ b/testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Set-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraUserManager" { + Context "Test for Set-EntraUserManager" { + It "Should return specific User" { + $result = Set-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific User with alias" { + $result = Set-EntraUserManager -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty string value" { + { Set-EntraUserManager -UserId ""} | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Set-EntraUserManager -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should fail when RefObjectId is invalid" { + { Set-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" RefObjectId ""} | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + + It "Should contain UserId in parameters when passed UserId to it" { + Mock -CommandName Set-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraUserManager -UserId "00001111-aaaa-2222-bbbb-3333cccc4444" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" + $params = Get-Parameters -data $result + $params.UserId | Should -Match "00001111-aaaa-2222-bbbb-3333cccc4444" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserManager" + + Set-EntraUserManager -UserId "00001111-aaaa-2222-bbbb-3333cccc4444" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserManager" + + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraUserManager -UserId "00001111-aaaa-2222-bbbb-3333cccc4444" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 new file mode 100644 index 0000000000..2ea8306538 --- /dev/null +++ b/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraUserPassword" { + Context "Test for Set-EntraUserPassword" { + It "Should return empty object" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + $result = Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 + } + It "Should fail when UserId is empty" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + { Set-EntraUserPassword -UserId -Password $secPassword } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + It "Should fail when UserId is invalid" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + { Set-EntraUserPassword -UserId "" -Password $secPassword } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string*" + } + It "Should fail when Password is empty" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + { Set-EntraUserPassword -UserId $userUPN -Password } | Should -Throw "Missing an argument for parameter 'Password'*" + } + It "Should fail when Password is invalid" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + { Set-EntraUserPassword -UserId $userUPN -Password "" } | Should -Throw "Cannot process argument transformation on parameter 'Password'*" + } + It "Should fail when ForceChangePasswordNextLogin is empty" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + { Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin } | Should -Throw "Missing an argument for parameter 'ForceChangePasswordNextLogin'*" + } + It "Should fail when ForceChangePasswordNextLogin is invalid" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + { Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin xyz } | Should -Throw "Cannot process argument transformation on parameter 'ForceChangePasswordNextLogin'*" + } + It "Should fail when EnforceChangePasswordPolicy is empty" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + { Set-EntraUserPassword -UserId $userUPN -Password $secPassword -EnforceChangePasswordPolicy } | Should -Throw "Missing an argument for parameter 'EnforceChangePasswordPolicy'*" + } + It "Should fail when EnforceChangePasswordPolicy is invalid" { + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + { Set-EntraUserPassword -UserId $userUPN -Password $secPassword -EnforceChangePasswordPolicy xyz } | Should -Throw "Cannot process argument transformation on parameter 'EnforceChangePasswordPolicy'*" + } + It "Should contain ForceChangePasswordNextSignIn in parameters when passed ForceChangePasswordNextLogin to it" { + Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + $result = Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true + $params = Get-Parameters -data $result + $params.PasswordProfile.ForceChangePasswordNextSignIn | Should -Be $true + } + It "Should contain ForceChangePasswordNextSignInWithMfa in parameters when passed EnforceChangePasswordPolicy to it" { + Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra + + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + $result = Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true + $params = Get-Parameters -data $result + $params.PasswordProfile.ForceChangePasswordNextSignInWithMfa | Should -Be $true + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserPassword" + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + $result = Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserPassword" + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $userUPN="mock106@M365x99297270.OnMicrosoft.com" + $newPassword="New@12345" + $secPassword = ConvertTo-SecureString $newPassword -AsPlainText -Force + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 new file mode 100644 index 0000000000..76dc3cc663 --- /dev/null +++ b/testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 @@ -0,0 +1,86 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Set-MgUserPhotoContent -MockWith {} -ModuleName Microsoft.Graph.Entra +} + +Describe "Set-EntraUserThumbnailPhoto" { + Context "Test for Set-EntraUserThumbnailPhoto" { + It "Should return specific User" { + $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should return specific User with alias" { + $result = Set-EntraUserThumbnailPhoto -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra -Times 1 + } + + It "Should fail when UserId is empty string value" { + { Set-EntraUserThumbnailPhoto -UserId ""} | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Set-EntraUserThumbnailPhoto -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should fail when RefObjectId is invalid" { + { Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" RefObjectId ""} | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + + It "Should contain UserId in parameters when passed ObjectId to it" { + Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' + $params = Get-Parameters -data $result + $params.UserId | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain InFile in parameters" { + Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Graph.Entra + + $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' + $params = Get-Parameters -data $result + $params.InFile | Should -Match "UserThumbnailPhoto.jpg" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserThumbnailPhoto" + + Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserThumbnailPhoto" + + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg'-Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 b/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 new file mode 100644 index 0000000000..9633373541 --- /dev/null +++ b/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 @@ -0,0 +1,67 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll{ + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + + $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force + $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force +} +Describe "Tests for Update-EntraSignedInUserPassword"{ + Context "Test for Update-EntraSignedInUserPassword" { + It "should return empty object"{ + $result = Update-EntraSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + } + It "Should fail when CurrentPassword is null" { + { Update-EntraSignedInUserPassword -CurrentPassword } | Should -Throw "Missing an argument for parameter 'CurrentPassword'*" + } + It "Should fail when CurrentPassword is empty" { + { Update-EntraSignedInUserPassword -CurrentPassword "" } | Should -Throw "Cannot process argument transformation on parameter 'CurrentPassword'*" + } + It "Should fail when NewPassword is null" { + { Update-EntraSignedInUserPassword -NewPassword } | Should -Throw "Missing an argument for parameter 'NewPassword'*" + } + It "Should fail when NewPassword is empty" { + { Update-EntraSignedInUserPassword -NewPassword "" } | Should -Throw "Cannot process argument transformation on parameter 'NewPassword'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraSignedInUserPassword" + + Update-EntraSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraSignedInUserPassword" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { + Update-EntraSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword -Debug + } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 b/testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 new file mode 100644 index 0000000000..8984a69096 --- /dev/null +++ b/testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblockForAuthenticationMethod = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + ) + } + $scriptblockForMgUser= { + return @( + [PSCustomObject]@{ + "Id" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + } + ) + } + + Mock -CommandName Get-MgUserAuthenticationMethod -MockWith $scriptblockForAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUser -MockWith $scriptblockForMgUser -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Reset-MgUserAuthenticationMethodPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Users +} + + Describe "Update-EntraUserFromFederated" { + Context "Test for Update-EntraUserFromFederated" { + It "Should sets identity synchronization features for a tenant." { + $result = Update-EntraUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword "Pass1234" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Reset-MgUserAuthenticationMethodPassword -ModuleName Microsoft.Graph.Entra.Users -Times 1 + } + It "Should fail when UserPrincipalName is empty" { + {Update-EntraUserFromFederated -UserPrincipalName } | Should -Throw "Missing an argument for parameter 'UserPrincipalName'. Specify a parameter*" + } + It "Should fail when UserPrincipalName is invalid" { + {Update-EntraUserFromFederated -UserPrincipalName ""} | Should -Throw "Cannot bind argument to parameter 'UserPrincipalName' because it is an empty string*" + } + It "Should fail when NewPassword is empty" { + { Update-EntraUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword } | Should -Throw "Missing an argument for parameter 'NewPassword'. Specify a parameter*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraUserFromFederated" + + Update-EntraUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword "Pass1234" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraUserFromFederated" + + Should -Invoke -CommandName Reset-MgUserAuthenticationMethodPassword -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Update-EntraUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword "Pass1234" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/Entra/Users/Valid.Tests.ps1 b/testVNext/Entra/Users/Valid.Tests.ps1 new file mode 100644 index 0000000000..5013e83278 --- /dev/null +++ b/testVNext/Entra/Users/Valid.Tests.ps1 @@ -0,0 +1,109 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll{ + if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ + Import-Module Microsoft.Graph.Entra + } + Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + + $module = Get-Module -Name Microsoft.Graph.Entra +} + +Describe "Valid parameter Tests"{ + Context "Test for valid parameters"{ + It "Should return empty object with Id parameter"{ + Write-Host "--------Start mock remove cmdlets with Id parameter only--------" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) + if($params.count -eq 1 -and $params -eq 'Id'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "---------End mock remove cmdlets with Id parameter only---------" + } + It "Should return empty object with ObjectId param"{ + Write-Host "-----Start mock remove cmdlets with ObjectId parameter only-----" + $count=0 + $module.ExportedCommands.Keys | ForEach-Object{ + $commandName = $_ + $command = Get-Command $_ + if($command.Name.StartsWith('Remove')){ + $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + if($params.count -eq 1 -and $params -eq 'ObjectId'){ + $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } + if($null -ne $filter){ + try { + Write-Host "$command" + $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") + if($filter.IsApi){ + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + } + else { + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + $result = Invoke-Command -ScriptBlock $commandScriptBlock + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + } + } + catch { + Write-Host "Exception in cmdlet" $command + } + $count++ + } + } + } + } + Write-Host "Cmdlets count: $count" + Write-Host "------End mock remove cmdlets with ObjectId parameter only------" + } + # It "Should pass with 'Id' or 'ObjectId' parameter" { + # $count=0 + # $module.ExportedCommands.Keys | ForEach-Object { + + # $command = Get-Command $_ + # if ($command.Name.StartsWith('Remove')) + # { + # $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) + # if($params.count -eq 1 -and ($params -eq 'ObjectId' -or $params-eq 'Id')){ + # $stringParams = $params -join ',' + # Write-Host "$command | $stringParams" + # $count++ + # } + # } + # } + # Write-Host $count + # } + } +} \ No newline at end of file diff --git a/testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 b/testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 new file mode 100644 index 0000000000..c9442bfa73 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Add-EntraBetaApplicationPolicy" { +Context "Test for Add-EntraBetaApplicationPolicy" { + It "Should return empty object" { + $result = Add-EntraBetaApplicationPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when Id is empty" { + { Add-EntraBetaApplicationPolicy -Id -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Add-EntraBetaApplicationPolicy -Id "" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff"} | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaApplicationPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaApplicationPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaApplicationPolicy" + + Add-EntraBetaApplicationPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaApplicationPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaApplicationPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 new file mode 100644 index 0000000000..f77955fbe1 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 @@ -0,0 +1,162 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-MgBetaApplication with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "AppId" = "5f783237-3457-45d8-93e7-a0edb1cfbfd1" + "AppRoles" = $null + "DeletedDateTime" = $null + "Id" = "aaaaaaaa-1111-1111-1111-000000000000" + "DisplayName" = "Mock-App" + "Info" = @{LogoUrl=""; MarketingUrl=""; PrivacyStatementUrl=""; SupportUrl=""; TermsOfServiceUrl=""} + "IsDeviceOnlyAuthSupported" = $True + "IsFallbackPublicClient" = $true + "KeyCredentials" = @{CustomKeyIdentifier = @(211, 174, 247);DisplayName =""; Key="";KeyId="d903c7a3-75ea-4772-8935-5c0cf82068a7";Type="Symmetric";Usage="Sign"} + "OptionalClaims" = @{AccessToken=""; IdToken=""; Saml2Token=""} + "ParentalControlSettings" = @{CountriesBlockedForMinors=$null; LegalAgeGroupRule="Allow"} + "PasswordCredentials" = @{} + "PublicClient" = @{RedirectUris=$null} + "PublisherDomain" = "M365x99297270.onmicrosoft.com" + "SignInAudience" = "AzureADandPersonalMicrosoftAccount" + "Web" = @{HomePageUrl="https://localhost/demoapp"; ImplicitGrantSettings=""; LogoutUrl="";} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaApplication" { + Context "Test for Get-EntraBetaApplication" { + It "Should return specific application" { + $result = Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('aaaaaaaa-1111-1111-1111-000000000000') + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraBetaApplication -ObjectId "aaaaaaaa-1111-1111-1111-000000000000" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Get-EntraBetaApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should return all applications" { + $result = Get-EntraBetaApplication -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when All has argument" { + { Get-EntraBetaAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + It "Should fail when invalid parameter is passed" { + { Get-EntraBetaApplication -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should return specific application by searchstring" { + $result = Get-EntraBetaApplication -SearchString 'Mock-App' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-App' + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should return specific application by filter" { + $result = Get-EntraBetaApplication -Filter "DisplayName -eq 'Mock-App'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-App' + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should return top application" { + $result = Get-EntraBetaApplication -Top 1 + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Result should Contain ApplicationId" { + $result = Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $result.ObjectId | should -Be "aaaaaaaa-1111-1111-1111-000000000000" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + $result = Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $params = Get-Parameters -data $result.Parameters + $params.ApplicationId | Should -Be "aaaaaaaa-1111-1111-1111-000000000000" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraBetaApplication -SearchString 'Mock-App' + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "Mock-App" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplication" + $result = Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplication" + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Property parameter should work" { + $result = Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + It "Should support minimum set of parameter sets" { + $GetAzureADApplication = Get-Command Get-EntraBetaApplication + $GetAzureADApplication.ParameterSets.Name | Should -BeIn @("GetQuery", "GetVague", "GetById") + $GetAzureADApplication.Visibility | Should -Be "Public" + $GetAzureADApplication.CommandType | Should -Be "Function" + } + + It "Should return a list of applications by default" { + $GetAzureADApplication = Get-Command Get-EntraBetaApplication + $GetAzureADApplication.ModuleName | Should -Be "Microsoft.Graph.Entra.Beta.Applications" + $GetAzureADApplication.DefaultParameterSet | Should -Be "GetQuery" + } + It 'Should have List parameterSet' { + $GetAzureADApplication = Get-Command Get-EntraBetaApplication + $ListParameterSet = $GetAzureADApplication.ParameterSets | Where-Object Name -eq "GetQuery" + $ListParameterSet.Parameters.Name | Should -Contain All + $ListParameterSet.Parameters.Name | Should -Contain Filter + $ListParameterSet.Parameters.Name | Should -Contain Top + } + It 'Should have Get parameterSet' { + $GetAzureADApplication = Get-Command Get-EntraBetaApplication + $GetParameterSet = $GetAzureADApplication.ParameterSets | Where-Object Name -eq "GetById" + $GetParameterSet.Parameters.Name | Should -Contain ApplicationId + } + It 'Should have GetViaIdentity parameterSet' { + $GetAzureADApplication = Get-Command Get-EntraBetaApplication + $GetViaIdentityParameterSet = $GetAzureADApplication.ParameterSets | Where-Object Name -eq "GetVague" + $GetViaIdentityParameterSet.Parameters.Name | Should -Contain SearchString + $GetViaIdentityParameterSet.Parameters.Name | Should -Contain All + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 new file mode 100644 index 0000000000..4f148933b0 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 @@ -0,0 +1,60 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + @{ + "Info" = @( + @{ + "logoUrl" = "" + "Parameters" = $args + }) + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaApplicationLogo" { + It "Should return empty" { + $result = Get-EntraBetaApplicationLogo -ApplicationId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -FilePath "D:\image.jpg" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Get-EntraBetaApplicationLogo -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is null" { + { Get-EntraBetaApplicationLogo -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationLogo" + $result = Get-EntraBetaApplicationLogo -ApplicationId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -FilePath "D:\image.jpg" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationLogo" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplicationLogo -ApplicationId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -FilePath "D:\image.jpg" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 new file mode 100644 index 0000000000..70e148c709 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + @{ + "startDateTime" = "11/24/2023 6:28:39 AM" + "keyId" = "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" + "hint" = "123" + "secretText" = "" + "endDateTime" = "11/24/2024 6:28:39 AM" + "CustomKeyIdentifier" = "dGVzdA==" + "DisplayName" = "test" + + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} +Describe "Get-EntraBetaApplicationPasswordCredential" { + Context "Test for Get-EntraBetaApplicationPasswordCredential" { + It "Should return specific credential" { + $result = Get-EntraBetaApplicationPasswordCredential -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.keyId | Should -Be "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" + $result.DisplayName | Should -Be "test" + $result.CustomKeyIdentifier.gettype().name | Should -Be 'Byte[]' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should return specific credential with Alias" { + $result = Get-EntraBetaApplicationPasswordCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when ApplicationId is invalid" { + { Get-EntraBetaApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should fail when ApplicationId is empty" { + { Get-EntraBetaApplicationPasswordCredential -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationPasswordCredential" + + $result = Get-EntraBetaApplicationPasswordCredential -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplicationPasswordCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 new file mode 100644 index 0000000000..e29e67e240 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 @@ -0,0 +1,86 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + +$scriptblock = { + return @{ + value = @( + @{ + "Id" = "bbbbbbbb-7777-8888-9999-cccccccccccc" + "DeletedDateTime" = $null + "@odata.type" = "#microsoft.graph.policy" + "keyCredentials" = $null + "alternativeIdentifier" = $null + "displayName" = "Mock application policy" + "type" = "HomeRealmDiscoveryPolicy" + "isOrganizationDefault" = $false + "createdDateTime" = "16-08-2023 08:25:02" + "Parameters" = $args + } + + ) + + } + + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaApplicationPolicy" { + Context "Test for Get-EntraBetaApplicationPolicy" { + It "Should return specific application policy" { + $result = Get-EntraBetaApplicationPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + write-host $result + $result.Id | Should -Be "bbbbbbbb-7777-8888-9999-cccccccccccc" + $result.displayName | Should -Be "Mock application policy" + $result.type | Should -be "HomeRealmDiscoveryPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraBetaApplicationPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Get-EntraBetaApplicationPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Result should Contain @odata.type" { + $result = Get-EntraBetaApplicationPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result."@odata.type" | should -Be "#microsoft.graph.policy" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationPolicy" + + $result = Get-EntraBetaApplicationPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplicationPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 new file mode 100644 index 0000000000..19f19dd634 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "AppId" = "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + "AppDisplayName" = "Mock Portal" + "AggregatedEventDateTime" = "29-05-2024 00:00:00" + "SignInCount" = "3" + "Status" = @{ + "AdditionalDetails" = $null + "ErrorCode" = "0" + "FailureReason" = $null + "AdditionalProperties" = $null + } + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaApplicationSignInDetailedSummary" { + Context "Test for Get-EntraBetaApplicationSignInDetailedSummary" { + It "Should return specific application signed in detailed summary by filter" { + $result = Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Mock Portal" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.AppId | Should -Be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaApplicationSignInDetailedSummary -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return top 1 application signed in detailed summary" { + $result = Get-EntraBetaApplicationSignInDetailedSummary -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaApplicationSignInDetailedSummary -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaApplicationSignInDetailedSummary -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInDetailedSummary" + + $result = Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInDetailedSummary" + + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInSummary.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInSummary.Tests.ps1 new file mode 100644 index 0000000000..45af3197d6 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInSummary.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + +$scriptblock = { + return @{ + value = @( + @{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "AppId" = "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + "AppDisplayName" = "Mock Portal" + "AggregatedEventDateTime" = "29-05-2024 00:00:00" + "SignInCount" = "3" + "isOrganizationDefault" = $false + "createdDateTime" = "16-08-2023 08:25:02" + "Parameters" = $args + } + + ) + + } + + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaApplicationSignInSummary" { + Context "Test for Get-EntraBetaApplicationSignInSummary" { + It "Should return application sign in summary" { + $result = Get-EntraBetaApplicationSignInSummary -Days "30" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.AppDisplayName | Should -Be "Mock Portal" + $result.AppId | Should -be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when Days is empty" { + { Get-EntraBetaApplicationSignInSummary -Days } | Should -Throw "Missing an argument for parameter 'Days'*" + } + It "Should return specific application signed in summary by filter" { + $result = Get-EntraBetaApplicationSignInSummary -Days "7" -Filter "AppdisplayName eq 'Mock Portal'" + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Mock Portal" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaApplicationSignInDetailedSummary -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return top 1 application sign in summary" { + $result = Get-EntraBetaApplicationSignInSummary -Days "7" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaApplicationSignInSummary -Days "7" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaApplicationSignInSummary -Days "7" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInSummary" + + $result = Get-EntraBetaApplicationSignInSummary -Days "30" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplicationSignInSummary -Days "30" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 new file mode 100644 index 0000000000..9b43506dca --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 @@ -0,0 +1,114 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Categories" = "businessMgmt" + "Description" = "Capture and manage your ESG data from across the organization in an integrated, cloud-based platform that connects organizational strategy, automates reporting, and simplifies stakeholder engagement." + "DisplayName" = "FigBytes" + "HomePageUrl" = "https://figbytes.biz/" + "Id" = "bbbbcccc-1111-dddd-2222-eeee3333ffff" + "LogoUrl" = "https://galleryapplogos1.azureedge.net/app-logo/figbytes_AAA12D0E_215.png" + "Publisher" = "Figbytes" + "SupportedClaimConfiguration" = [PSCustomObject]@{ + "NameIdPolicyFormat" = $null + } + "SupportedProvisioningTypes" = @() + "SupportedSingleSignOnModes" = @("saml", "external") + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/beta/`$metadata#applicationTemplates/`$entity"} + "InformationalUrls" = [PSCustomObject]@{ + "AppSignUpUrl" = "https://go.microsoft.com/fwlink/?linkid=2190589" + "SingleSignOnDocumentationUrl" = $null + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaApplicationTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaApplicationTemplate" { + Context "Test for Get-EntraBetaApplicationTemplate" { + It "Should get a specific application template" { + $result = Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'FigBytes' + $result.Description | should -Be "Capture and manage your ESG data from across the organization in an integrated, cloud-based platform that connects organizational strategy, automates reporting, and simplifies stakeholder engagement." + + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Id is empty" { + { Get-EntraBetaApplicationTemplate -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Get-EntraBetaApplicationTemplate -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should get a list of all the application templates" { + $result = Get-EntraBetaApplicationTemplate + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain Id in result" { + $result = Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result.Id | should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain ApplicationTemplateId in parameters when passed Id to it" { + $result = Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result.Parameters + $params.ApplicationTemplateId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationTemplate" + $result = Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationTemplate" + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Property parameter should work" { + $result = Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'FigBytes' + + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 new file mode 100644 index 0000000000..c02cd441bd --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -0,0 +1,100 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Credentials" = @( + [PSCustomObject]@{ + "Value" = "test420" + "Type" = "text" + "FieldId" = "param_emailOrUserName" + }, + [PSCustomObject]@{ + "Value" = "test420" + "Type" = "password" + "FieldId" = "param_password" + } + ) + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "AdditionalProperties" = @{"@odata.context"="https://graph.microsoft.com/beta/`$metadata#microsoft.graph.passwordSingleSignOnCredentialSet"} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaPasswordSingleSignOnCredential" { + Context "Test for Get-EntraBetaPasswordSingleSignOnCredential" { + It "Should gets the password sso credentials for the given ObjectId and PasswordSSOObjectId." { + $result = Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOObjectId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + + Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when ObjectId is Invalid" { + { Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "" -PasswordSSOObjectId "bbbbbbbb-1111-2222-3333-cccccccccc55"} | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should fail when PasswordSSOObjectId parameter are empty" { + { Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOObjectId } | Should -Throw "Missing an argument for parameter 'PasswordSSOObjectId'*" + } + + It "Should contain ObjectId in result" { + $result = Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOObjectId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { + $result = Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOObjectId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + + Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain BodyParameter in parameters when passed PasswordSSOObjectId to it" { + $result = Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOObjectId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.Credentials[0].Value | should -Be 'test420' + + Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPasswordSingleSignOnCredential" + $result= Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOObjectId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPasswordSingleSignOnCredential" + Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOObjectId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 new file mode 100644 index 0000000000..bdc6c20309 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 @@ -0,0 +1,258 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AccountEnabled" = $true + "AddIns" = @() + "AlternativeNames" = @() + "AppDescription" = '' + "AppDisplayName" = 'demo1' + "AppId" = 'bbbbbbbb-1111-2222-3333-cccccccccc55' + "AppManagementPolicies" = @() + "AppOwnerOrganizationId" = 'bbbbbbbb-1111-2222-3333-cccccccccc56' + "AppRoleAssignedTo" = @() + "AppRoleAssignmentRequired" = $true + "AppRoleAssignments" = @() + "AppRoles" = @('bbbbbbbb-1111-2222-3333-cccccccccc57') + "ApplicationTemplateId" = 'bbbbbbbb-1111-2222-3333-cccccccccc58' + "ClaimsMappingPolicies" = @() + "CreatedObjects" = @() + "DelegatedPermissionClassifications" = @() + "DeletedDateTime" = '' + "Description" = '' + "DisabledByMicrosoftStatus" = '' + "DisplayName" = 'demo1' + "Endpoints" = @() + "ErrorUrl" = '' + "FederatedIdentityCredentials" = '' + "HomeRealmDiscoveryPolicies" = @() + "Homepage" = 'https://*.e-days.com/SSO/SAML2/SP/AssertionConsumer.aspx?metadata=e-days|ISV9.2|primary|z' + "Id" = 'bbbbbbbb-1111-2222-3333-cccccccccc59' + "KeyCredentials" = @() + "LicenseDetails" = '' + "LoginUrl" = '' + "LogoutUrl" = '' + "MemberOf" = @() + "Notes" = '' + "NotificationEmailAddresses" = @() + "Oauth2PermissionGrants" = @() + "OwnedObjects" = @() + "Owners" = @() + "PasswordCredentials" = @() + "PreferredSingleSignOnMode" = '' + "PreferredTokenSigningKeyEndDateTime" = '' + "PreferredTokenSigningKeyThumbprint" = '' + "PublishedPermissionScopes" = @('bbbbbbbb-1111-2222-3333-cccccccccc60') + "PublisherName" = 'Contoso' + "ReplyUrls" = @() + "SamlMetadataUrl" = '' + "ServicePrincipalNames" = @('bbbbbbbb-1111-2222-3333-cccccccccc55') + "ServicePrincipalType" = 'Application' + "SignInAudience" = 'AzureADMyOrg' + "Tags" = @('WindowsAzureActiveDirectoryIntegratedApp') + "TokenEncryptionKeyId" = '' + "TokenIssuancePolicies" = @() + "TokenLifetimePolicies" = @() + "TransitiveMemberOf" = '' + "AdditionalProperties" = @{ + "@odata.context" = 'https://graph.microsoft.com/beta/$metadata#servicePrincipals/$entity' + "createdDateTime" = '2023-09-26T16:09:16Z' + "isAuthorizationServiceEnabled" = $false + "samlSLOBindingType" = 'httpRedirect' + "api" = @{ + "resourceSpecificApplicationPermissions" = @() + } + "resourceSpecificApplicationPermissions" = @{} + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaServicePrincipal" { + Context "Test for Get-EntraBetaServicePrincipal" { + It "Should get all service principal by query" { + $result = Get-EntraBetaServicePrincipal + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraBetaServicePrincipal -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc59" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc59" + $result.ServicePrincipalNames | Should -Be @('bbbbbbbb-1111-2222-3333-cccccccccc55') + $result.DisplayName | Should -Be "demo1" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.AppOwnerOrganizationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + $result.SignInAudience | Should -Be "AzureADMyOrg" + $result.ServicePrincipalType | Should -Be "Application" + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should get all service principal" { + $result = Get-EntraBetaServicePrincipal -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraBetaServicePrincipal -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should get service principal by ObjectId" { + $result = Get-EntraBetaServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc59" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc59" + $result.ServicePrincipalNames | Should -Be @('bbbbbbbb-1111-2222-3333-cccccccccc55') + $result.DisplayName | Should -Be "demo1" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.AppOwnerOrganizationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + $result.SignInAudience | Should -Be "AzureADMyOrg" + $result.ServicePrincipalType | Should -Be "Application" + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when ServicePrincipalId is empty" { + { Get-EntraBetaServicePrincipal -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'*" + } + + It "Should fail when ServicePrincipalId is Invalid" { + { Get-EntraBetaServicePrincipal -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + + It "Should get top service principal" { + $result = Get-EntraBetaServicePrincipal -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Top are empty" { + { Get-EntraBetaServicePrincipal -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when Top is Invalid" { + { Get-EntraBetaServicePrincipal -Top XYZ } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should get a specific service principal by filter" { + $result = Get-EntraBetaServicePrincipal -Filter "DisplayName eq 'demo1'" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc59" + $result.ServicePrincipalNames | Should -Be @('bbbbbbbb-1111-2222-3333-cccccccccc55') + $result.DisplayName | Should -Be "demo1" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.AppOwnerOrganizationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + $result.SignInAudience | Should -Be "AzureADMyOrg" + $result.ServicePrincipalType | Should -Be "Application" + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Filter are empty" { + { Get-EntraBetaServicePrincipal -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should select all service principal by displayname" { + $result = Get-EntraBetaServicePrincipal -Property "DisplayName" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Select are empty" { + { Get-EntraBetaServicePrincipal -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should get a specific service principal by SearchString" { + $result = Get-EntraBetaServicePrincipal -SearchString "demo1" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc59" + $result.ServicePrincipalNames | Should -Be @('bbbbbbbb-1111-2222-3333-cccccccccc55') + $result.DisplayName | Should -Be "demo1" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.AppOwnerOrganizationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + $result.SignInAudience | Should -Be "AzureADMyOrg" + $result.ServicePrincipalType | Should -Be "Application" + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when SearchString are empty" { + { Get-EntraBetaServicePrincipal -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + + It "Should contain ObjectId in result" { + $result = Get-EntraBetaServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc59" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc59" + } + + It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { + $result = Get-EntraBetaServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc59" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc59" + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain filter in parameters when passed SearchString to it" { + $result = Get-EntraBetaServicePrincipal -SearchString "demo1" + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Be "publisherName eq 'demo1' or (displayName eq 'demo1' or startswith(displayName,'demo1'))" + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipal" + $result= Get-EntraBetaServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc59" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipal" + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should fail when Property is empty" { + { Get-EntraBetaServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc59" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Property parameter should work" { + $result = Get-EntraBetaServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc59" -Property AppDisplayName + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be 'demo1' + + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc59" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 new file mode 100644 index 0000000000..c4ab31f5a5 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 @@ -0,0 +1,207 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + '@odata.type' = '#microsoft.graph.servicePrincipal' + 'accountEnabled' = $true + 'alternativeNames' = @{} + 'createdDateTime' = '2023-09-21T15:31:24Z' + 'appDisplayName' = 'ToGraph_443democc3c' + 'appId' = 'bbbbbbbb-1111-2222-3333-cccccccccc55' + 'applicationTemplateId' = 'bbbbbbbb-1111-2222-3333-cccccccccc56' + 'appOwnerOrganizationId' = 'bbbbbbbb-1111-2222-3333-cccccccccc57' + 'appRoleAssignmentRequired' = $true + 'displayName' = 'ToGraph_443democc3c' + 'homepage' = 'https://*.time2work.com/Security/ADFS.aspx?metadata=nimbus|ISV9.2|primary|z' + 'isAuthorizationServiceEnabled' = $false + 'notificationEmailAddresses' = @{} + 'publisherName' = 'Contoso' + 'replyUrls' = @{} + 'samlSLOBindingType' = 'httpRedirect' + 'servicePrincipalNames' = @('bbbbbbbb-1111-2222-3333-cccccccccc55') + 'servicePrincipalType' = 'Application' + 'signInAudience' = 'AzureADMyOrg' + 'tags' = @('WindowsAzureActiveDirectoryIntegratedApp') + 'addIns' = @{} + 'api' = @{ 'resourceSpecificApplicationPermissions' = @() } + 'appRoles' = @( + @{ + 'allowedMemberTypes' = @('User') + 'description' = 'msiam_access' + 'displayName' = 'msiam_access' + 'id' = '643985ce-3eaf-4a67-9550-ecca25cb6814' + 'isEnabled' = $true + 'origin' = 'Application' + 'isPreAuthorizationRequired' = $false + 'isPrivate' = $false + } + ) + 'info' = @{ 'logoUrl' = 'https://aadcdn.msftauthimages.net/c1c6b6c8-to49lv6wypmt9nbj9h-yeqnpoxuawhueygc1g-lkdu4/appbranding/wpnyxydq3vlekihhtujmmyy8n-0-4cx9y7wm-d9z4q/1033/bannerlogo?ts=638493625239351699' } + 'keyCredentials' = @{} + 'publishedPermissionScopes' = @{} + 'passwordCredentials' = @{} + 'resourceSpecificApplicationPermissions' = @{} + 'verifiedPublisher' = @{} + 'ObjectId' = 'bbbbbbbb-1111-2222-3333-cccccccccc58' + 'DeletedDateTime' = $null + 'Id' = 'bbbbbbbb-1111-2222-3333-cccccccccc58' + 'AdditionalProperties' = @{ + '@odata.type' = '#microsoft.graph.servicePrincipal' + 'accountEnabled' = $true + 'alternativeNames' = @{} + 'createdDateTime' = '2023-09-21T15:31:24Z' + 'appDisplayName' = 'ToGraph_443democc3c' + 'appId' = 'bbbbbbbb-1111-2222-3333-cccccccccc55' + 'applicationTemplateId' = 'bbbbbbbb-1111-2222-3333-cccccccccc56' + 'appOwnerOrganizationId' = 'bbbbbbbb-1111-2222-3333-cccccccccc57' + 'appRoleAssignmentRequired' = $true + 'displayName' = 'ToGraph_443democc3c' + 'homepage' = 'https://*.time2work.com/Security/ADFS.aspx?metadata=nimbus|ISV9.2|primary|z' + 'isAuthorizationServiceEnabled' = $false + 'notificationEmailAddresses' = @{} + 'publisherName' = 'Contoso' + 'replyUrls' = @{} + 'samlSLOBindingType' = 'httpRedirect' + 'servicePrincipalNames' = @('bbbbbbbb-1111-2222-3333-cccccccccc55') + 'servicePrincipalType' = 'Application' + 'signInAudience' = 'AzureADMyOrg' + 'tags' = @('WindowsAzureActiveDirectoryIntegratedApp') + 'addIns' = @{} + 'api' = @{ 'resourceSpecificApplicationPermissions' = @() } + 'appRoles' = @{} + 'info' = @{ 'logoUrl' = 'https://aadcdn.msftauthimages.net/c1c6b6c8-to49lv6wypmt9nbj9h-yeqnpoxuawhueygc1g-lkdu4/appbranding/wpnyxydq3vlekihhtujmmyy8n-0-4cx9y7wm-d9z4q/1033/bannerlogo?ts=638493625239351699' } + 'keyCredentials' = @{} + 'publishedPermissionScopes' = @{} + 'passwordCredentials' = @{} + 'resourceSpecificApplicationPermissions' = @{} + 'verifiedPublisher' = @{} + } + "Parameters" = $args + } + } + Mock -CommandName Get-MgBetaServicePrincipalOwnedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Get-EntraBetaServicePrincipalOwnedObject" { + Context "Test for Get-EntraBetaServicePrincipalOwnedObject" { + It "Should retrieve the owned objects of a service principal" { + $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" + $result | Should -Not -BeNullOrEmpty + $result.AdditionalProperties | Should -Not -BeNullOrEmpty + $result.displayName | Should -Be "ToGraph_443democc3c" + $result.appDisplayName | Should -Be "ToGraph_443democc3c" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc58" + $result.appId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.AdditionalProperties.appDisplayName | Should -Be "ToGraph_443democc3c" + $result.AdditionalProperties.tags | Should -Be @('WindowsAzureActiveDirectoryIntegratedApp') + + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should return specific device with Alias" { + $result = Get-EntraBetaServicePrincipalOwnedObject -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc40" + $result | Should -Not -BeNullOrEmpty + $result.AdditionalProperties | Should -Not -BeNullOrEmpty + $result.displayName | Should -Be "ToGraph_443democc3c" + $result.appDisplayName | Should -Be "ToGraph_443democc3c" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc58" + $result.appId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.AdditionalProperties.appDisplayName | Should -Be "ToGraph_443democc3c" + $result.AdditionalProperties.tags | Should -Be @('WindowsAzureActiveDirectoryIntegratedApp') + + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when ServicePrincipalId are empty" { + { Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'*" + } + + It "Should fail when ServicePrincipalId is Invalid" { + { Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + + It "Should return top service principal" { + $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Top are empty" { + { Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when Top is Invalid" { + { Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -Top XYZ } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should return all service principal" { + $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should contain Id in result" { + $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc58" + + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain ServicePrincipalId in parameters when passed Id to it" { + $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc40" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipalOwnedObject" + + $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipalOwnedObject" + + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Property parameter should work" { + $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -Property appDisplayName + $result | Should -Not -BeNullOrEmpty + $result.appDisplayName | Should -Be 'ToGraph_443democc3c' + + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -Property } | Should -Throw "Missing an argument for parameter 'Property'.*" + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 b/testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 new file mode 100644 index 0000000000..b4af29b260 --- /dev/null +++ b/testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 @@ -0,0 +1,80 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking New-MgBetaApplication with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + "AppId" = "5f783237-3457-45d8-93e7-a0edb1cfbfd1" + "DeletedDateTime" = $null + "Id" = "111cc9b5-fce9-485e-9566-c68debafac5f" + "DisplayName" = "Mock-App" + "Info" = @{LogoUrl=""; MarketingUrl=""; PrivacyStatementUrl=""; SupportUrl=""; TermsOfServiceUrl=""} + "IsDeviceOnlyAuthSupported" = $True + "IsFallbackPublicClient" = $true + "KeyCredentials" = @{CustomKeyIdentifier = @(211, 174, 247);DisplayName =""; Key="";KeyId="d903c7a3-75ea-4772-8935-5c0cf82068a7";Type="Symmetric";Usage="Sign"} + "OptionalClaims" = @{AccessToken=""; IdToken=""; Saml2Token=""} + "ParentalControlSettings" = @{CountriesBlockedForMinors=$null; LegalAgeGroupRule="Allow"} + "PasswordCredentials" = @{} + "PublicClient" = @{RedirectUris=$null} + "PublisherDomain" = "M365x99297270.onmicrosoft.com" + "SignInAudience" = "AzureADandPersonalMicrosoftAccount" + "Web" = @{HomePageUrl="https://localhost/demoapp"; ImplicitGrantSettings=""; LogoutUrl="";} + "Parameters" = $args + "AdditionalProperties" = @{CountriesBlockedForMinors = $null; LegalAgeGroupRule = "Allow" } + } + ) + } + + Mock -CommandName New-MgBetaApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "New-EntraBetaApplication"{ + Context "Test for New-EntraBetaApplication" { + It "Should return created Application"{ + $result = New-EntraBetaApplication -DisplayName "Mock-App" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "Mock-App" + $result.IsDeviceOnlyAuthSupported | should -Be "True" + $result.IsFallbackPublicClient | should -Be "True" + $result.SignInAudience | should -Be "AzureADandPersonalMicrosoftAccount" + Should -Invoke -CommandName New-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when DisplayName is empty" { + { New-EntraBetaApplication -DisplayName "" } | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when invalid parameter is passed" { + { New-EntraBetaApplication -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaApplication" + $result = New-EntraBetaApplication -DisplayName "Mock-App" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaApplication" + Should -Invoke -CommandName New-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaApplication -DisplayName "Mock-App" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 new file mode 100644 index 0000000000..bbc6eeae68 --- /dev/null +++ b/testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -0,0 +1,233 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Credentials" = @( + [PSCustomObject]@{ + "Value" = "test1" + "Type" = "text" + "FieldId" = "param_emailOrUserName" + }, + [PSCustomObject]@{ + "Value" = "test1" + "Type" = "password" + "FieldId" = "param_password" + } + ) + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "AdditionalProperties" = @{"@odata.context"='https://graph.microsoft.com/beta/$metadata#microsoft.graph.passwordSingleSignOnCredentialSet'} + "Parameters" = $args + } + ) + } + Mock -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "New-EntraBetaPasswordSingleSignOnCredential" { + Context "Test for New-EntraBetaPasswordSingleSignOnCredential" { + It "Should creates the password sso credentials for the given ObjectId and PasswordSSOObjectId." { + $params = @{ + id = "bbbbbbbb-1111-2222-3333-cccccccccc55" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test1" + } + @{ + fieldId = "param_password" + type = "password" + value = "test1" + } + ) + } + $result = New-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOCredential $params + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + + Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when ObjectId is empty" { + { $params = @{ + id = "bbbbbbbb-1111-2222-3333-cccccccccc55" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test1" + } + @{ + fieldId = "param_password" + type = "password" + value = "test1" + } + ) + } + New-EntraBetaPasswordSingleSignOnCredential -ObjectId -PasswordSSOCredential $params} | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + + It "Should fail when ObjectId is Invalid" { + { $params = @{ + id = "bbbbbbbb-1111-2222-3333-cccccccccc55" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test1" + } + @{ + fieldId = "param_password" + type = "password" + value = "test1" + } + ) + } + New-EntraBetaPasswordSingleSignOnCredential -ObjectId "" -PasswordSSOCredential $params} | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should fail when PasswordSSOCredential parameter are empty" { + { New-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOCredential } | Should -Throw "Missing an argument for parameter 'PasswordSSOCredential'*" + } + + It "Should fail when PasswordSSOCredential parameter are Invalid" { + { New-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOCredential "" } | Should -Throw "Cannot process argument transformation on parameter 'PasswordSSOCredential'*" + } + + It "Should contain ObjectId in result" { + $params = @{ + id = "bbbbbbbb-1111-2222-3333-cccccccccc55" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test1" + } + @{ + fieldId = "param_password" + type = "password" + value = "test1" + } + ) + } + $result = New-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOCredential $params + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { + $params = @{ + id = "bbbbbbbb-1111-2222-3333-cccccccccc55" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test1" + } + @{ + fieldId = "param_password" + type = "password" + value = "test1" + } + ) + } + $result = New-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOCredential $params + $params = Get-Parameters -data $result.Parameters + $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + + Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain BodyParameter in parameters when passed PasswordSSOCredential to it" { + $params = @{ + id = "bbbbbbbb-1111-2222-3333-cccccccccc55" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test1" + } + @{ + fieldId = "param_password" + type = "password" + value = "test1" + } + ) + } + $result = New-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOCredential $params + $value = $params.credentials | ConvertTo-Json + $result | Should -Not -BeNullOrEmpty + $value | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaPasswordSingleSignOnCredential" + + $params = @{ + id = "bbbbbbbb-1111-2222-3333-cccccccccc55" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test1" + } + @{ + fieldId = "param_password" + type = "password" + value = "test1" + } + ) + } + $result = New-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOCredential $params + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaPasswordSingleSignOnCredential" + + Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + $params = @{ + id = "bbbbbbbb-1111-2222-3333-cccccccccc55" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test1" + } + @{ + fieldId = "param_password" + type = "password" + value = "test1" + } + ) + } + + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOCredential $params -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 b/testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 new file mode 100644 index 0000000000..0d35d74bee --- /dev/null +++ b/testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 @@ -0,0 +1,62 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Remove-EntraBetaApplication" { + Context "Test for Remove-EntraBetaApplication" { + It "Should return empty object" { + $result = Remove-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraBetaApplication -ObjectId "aaaaaaaa-1111-1111-1111-000000000000" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Remove-EntraBetaApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraBetaApplication -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + Mock -CommandName Remove-MgBetaApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + $result = Remove-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "aaaaaaaa-1111-1111-1111-000000000000" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaApplication" + $result = Remove-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaApplication" + Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 b/testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 new file mode 100644 index 0000000000..8781f249e7 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Remove-EntraBetaApplicationPolicy" { + Context "Test for Remove-EntraBetaApplicationPolicy" { + It "Should removes an application policy from Azure Active Directory (AD)" { + $result = Remove-EntraBetaApplicationPolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when Id is empty" { + { Remove-EntraBetaApplicationPolicy -Id -PolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Remove-EntraBetaApplicationPolicy -Id "" -PolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should fail when PolicyId is empty" { + { Remove-EntraBetaApplicationPolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PolicyId } | Should -Throw "Missing an argument for parameter 'PolicyId'*" + } + + It "Should fail when PolicyId is invalid" { + { Remove-EntraBetaApplicationPolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PolicyId "" } | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string." + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaApplicationPolicy" + + $result = Remove-EntraBetaApplicationPolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaApplicationPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaApplicationPolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 new file mode 100644 index 0000000000..a922487837 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Remove-EntraBetaPasswordSingleSignOnCredential" { + Context "Test for Remove-EntraBetaPasswordSingleSignOnCredential" { + It "Should remove password single-sign-on credentials" { + $result = Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when ObjectId is empty" { + { Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + + It "Should fail when ObjectId is invalid" { + { Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should fail when PasswordSSOObjectId is empty" { + { Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId } | Should -Throw "Missing an argument for parameter 'PasswordSSOObjectId'*" + } + + It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { + Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + + $result = Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain Id in parameters when passed PasswordSSOObjectId to it" { + Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + + $result = Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaPasswordSingleSignOnCredential" + $result = Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaPasswordSingleSignOnCredential" + Should -Invoke -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 b/testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 new file mode 100644 index 0000000000..35dd6b6cfe --- /dev/null +++ b/testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 @@ -0,0 +1,62 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Set-EntraBetaApplication"{ + Context "Test for Set-EntraBetaApplication" { + It "Should return empty object"{ + $result = Set-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" -DisplayName "Mock-App" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should execute successfully with Alias" { + $result = Set-EntraBetaApplication -ObjectId "aaaaaaaa-1111-1111-1111-000000000000" -DisplayName "Mock-App" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Set-EntraBetaApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." + } + It "Should fail when invalid parameter is passed" { + { Set-EntraBetaApplication -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should contain ApplicationId in parameters when passed ApplicationId to it" { + Mock -CommandName Update-MgBetaApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + $result = Set-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $params = Get-Parameters -data $result + $params.ApplicationId | Should -Be "aaaaaaaa-1111-1111-1111-000000000000" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaApplication" + $result = Set-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaApplication" + Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + {Set-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 b/testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 new file mode 100644 index 0000000000..bad04d3bf0 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 @@ -0,0 +1,55 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Set-EntraBetaApplicationLogo"{ + Context "Test for Set-EntraBetaApplicationLogo" { + It "Should return empty object"{ + $result = Set-EntraBetaApplicationLogo -ApplicationId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -FilePath "https://th.bing.com/th?q=Perennial+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when ApplicationId is empty" { + { Set-EntraBetaApplicationLogo -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" + } + It "Should fail when ApplicationId is null" { + { Set-EntraBetaApplicationLogo -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" + } + It "Should fail when filepath invalid"{ + { Set-EntraBetaApplicationLogo -ApplicationId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -FilePath "sdd" } | Should -Throw "FilePath is invalid" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaApplicationLogo" + $result = Set-EntraBetaApplicationLogo -ApplicationId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -FilePath "https://th.bing.com/th?q=Perennial+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaApplicationLogo" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaApplicationLogo -ApplicationId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -FilePath "https://th.bing.com/th?q=Perennial+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 new file mode 100644 index 0000000000..fa408cca19 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -0,0 +1,197 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Set-EntraBetaPasswordSingleSignOnCredential" { + Context "Test for Set-EntraBetaPasswordSingleSignOnCredential" { + It "Should sets the password sso credentials for the given ObjectId and PasswordSSOObjectId." { + $params = @{ + id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test420" + } + @{ + fieldId = "param_password" + type = "password" + value = "test2420" + } + ) + } + $result = Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential $params + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + + It "Should fail when ObjectId is empty" { + { $params = @{ + id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test420" + } + @{ + fieldId = "param_password" + type = "password" + value = "test2420" + } + ) + } + Set-EntraBetaPasswordSingleSignOnCredential -ObjectId -PasswordSSOCredential $params} | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + + It "Should fail when ObjectId is Invalid" { + { $params = @{ + id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test420" + } + @{ + fieldId = "param_password" + type = "password" + value = "test2420" + } + ) + } + Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "" -PasswordSSOCredential $params} | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should fail when PasswordSSOCredential parameter are empty" { + { Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential } | Should -Throw "Missing an argument for parameter 'PasswordSSOCredential'*" + } + + It "Should fail when PasswordSSOCredential parameter are Invalid" { + { Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential "" } | Should -Throw "Cannot process argument transformation on parameter 'PasswordSSOCredential'*" + } + + It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { + Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + + $params = @{ + id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test420" + } + @{ + fieldId = "param_password" + type = "password" + value = "test2420" + } + ) + } + $result = Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential $params + $params = Get-Parameters -data $result + $params.ServicePrincipalId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain BodyParameter in parameters when passed PasswordSSOCredential to it" { + Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + + $params = @{ + id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test420" + } + @{ + fieldId = "param_password" + type = "password" + value = "test2420" + } + ) + } + $result = Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential $params + $value = $params.credentials | ConvertTo-Json + $resultParams = Get-Parameters -data $result + $expectedObject = $value | ConvertFrom-Json + $actualObject = ($resultParams.BodyParameter.Credentials | ConvertTo-Json -Depth 10 | ConvertFrom-Json) + $expectedObject | ForEach-Object { + $property = $_ + $actualProperty = $actualObject | Where-Object { $_.fieldId -eq $property.fieldId } + $actualProperty | Should -Not -BeNullOrEmpty + $actualProperty | Should -BeLike "*$($property.value)*" + $actualProperty | Should -BeLike "*$($property.type)*" + $actualProperty | Should -BeLike "*$($property.fieldId)*" + } + } + + It "Should contain 'User-Agent' header" { + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPasswordSingleSignOnCredential" + $params = @{ + id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test420" + } + @{ + fieldId = "param_password" + type = "password" + value = "test2420" + } + ) + } + $result = Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential $params + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPasswordSingleSignOnCredential" + Should -Invoke -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + $params = @{ + id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" + credentials = @( + @{ + fieldId = "param_emailOrUserName" + type = "text" + value = "test420" + } + @{ + fieldId = "param_password" + type = "password" + value = "test2420" + } + ) + } + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential $params -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + + diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 b/testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 new file mode 100644 index 0000000000..523f289ea6 --- /dev/null +++ b/testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 @@ -0,0 +1,58 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Applications + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications +} + +Describe "Set-EntraBetaServicePrincipal"{ + Context "Test for Set-EntraBetaServicePrincipal" { + It "Should return empty object"{ + $result = Set-EntraBetaServicePrincipal -ServicePrincipalId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should return empty object with Alias" { + $result = Set-EntraBetaServicePrincipal -ServicePrincipalId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + } + It "Should fail when ServicePrincipalId is invalid" { + { Set-EntraBetaServicePrincipal -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." + } + It "Should fail when ServicePrincipalId is empty" { + { Set-EntraBetaServicePrincipal -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaServicePrincipal" + Set-EntraBetaServicePrincipal -ServicePrincipalId bbbbbbbb-1111-2222-3333-cccccccccccc | Out-Null + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaServicePrincipal" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaServicePrincipal -ServicePrincipalId bbbbbbbb-1111-2222-3333-cccccccccccc -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 b/testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 new file mode 100644 index 0000000000..2f3860c880 --- /dev/null +++ b/testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Authentication) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Authentication + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.passwordAuthenticationMethod"; + createdDateTime= "2023-11-21T12:43:51Z"; + } + } + ) + } + Mock -CommandName Get-MgBetaUserAuthenticationMethod -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Authentication +} + +Describe "Reset-EntraBetaStrongAuthenticationMethodByUpn" { + Context "Test for Reset-EntraBetaStrongAuthenticationMethodByUpn" { + It "Should Resets the strong authentication method" { + $result = Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso.com#EXT#@M365x99297270.onmicrosoft.com' + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Beta.Authentication -Times 1 + } + It "Should fail when UserPrincipalName is empty" { + { Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName } | Should -Throw "Missing an argument for parameter 'UserPrincipalName'*" + } + + It "Should fail when Id is invalid" { + { Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName "" } | Should -Throw "Cannot bind argument to parameter 'UserPrincipalName' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Reset-EntraBetaStrongAuthenticationMethodByUpn" + + Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' | Out-Null + Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Beta.Authentication -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should contain 'User-Agent' header" { + Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' | Out-Null + Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Beta.Authentication -Times 1 -ParameterFilter { + $userId | Should -Be 'Test_contoso@M365x99297270.onmicrosoft.com' + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 new file mode 100644 index 0000000000..a184441f41 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName New-MgBetaAdministrativeUnitMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Add-EntraBetaAdministrativeUnitMember" { + Context "Test for Add-EntraBetaAdministrativeUnitMember" { + It "Should return empty object" { + $result = Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return empty object with alias" { + $result = Add-EntraBetaAdministrativeUnitMember -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff"} | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId ""} | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { + Mock -CommandName New-MgBetaAdministrativeUnitMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + $result = Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" + $params = Get-Parameters -data $result + $params.AdministrativeUnitId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaAdministrativeUnitMember" + + Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaAdministrativeUnitMember" + + Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 new file mode 100644 index 0000000000..c60190c546 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -0,0 +1,91 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "IsActive" = $true + "AdditionalProperties" = @{"@odata.context"="https://graph.microsoft.com/beta/`$metadata#directory/customSecurityAttributeDefinitions('Engineering_Projectt')/allowedValues/`$entity"} + "Parameters" = $args + } + ) + } + Mock -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue" { + Context "Test for Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue" { + It "Should update a specific value for the Id" { + $result = Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive $true + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.IsActive | Should -Be $true + + Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when CustomSecurityAttributeDefinitionId are empty" { + { Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive $true } | Should -Throw "Missing an argument for parameter 'CustomSecurityAttributeDefinitionId'*" + } + + It "Should fail when CustomSecurityAttributeDefinitionId is Invalid" { + { Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive $true } | Should -Throw "Cannot bind argument to parameter 'CustomSecurityAttributeDefinitionId' because it is an empty string." + } + + It "Should fail when Id are empty" { + { Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id -IsActive $true } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is Invalid" { + { Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "" -IsActive $true } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should fail when IsActive are empty" { + { Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive } | Should -Throw "Missing an argument for parameter 'IsActive'*" + } + + It "Should fail when IsActive are invalid" { + { Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive dffg } | Should -Throw "Cannot process argument transformation on parameter 'IsActive'*" + } + + It "Result should Contain ObjectId" { + $result = Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive $true + $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue" + + Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive $true + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue" + Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 new file mode 100644 index 0000000000..e8acda9bc7 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -0,0 +1,86 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Add-EntraBetaDeviceRegisteredOwner" { + Context "Test for Add-EntraBetaDeviceRegisteredOwner" { + It "Should return empty object" { + $result = Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceId is empty" { + { Add-EntraBetaDeviceRegisteredOwner -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" + } + It "Should fail when DeviceId is invalid" { + { Add-EntraBetaDeviceRegisteredOwner -DeviceId "" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should contain DeviceId in parameters when passed ObjectId to it" { + Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "412be9d1-1460-4061-8eed-cca203fcb215" + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain BodyParameter in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $value = @{ + "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} + Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' + Write-Host $BodyParameter.AdditionalProperties.'@odata.id' + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaDeviceRegisteredOwner" + + Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaDeviceRegisteredOwner" + + Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + {Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 new file mode 100644 index 0000000000..ec45b2449e --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Add-EntraBetaDeviceRegisteredUser" { + Context "Test for Add-EntraBetaDeviceRegisteredUser" { + It "Should return empty object" { + $result = Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceId is empty" { + { Add-EntraBetaDeviceRegisteredUser -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" + } + It "Should fail when DeviceId is invalid" { + { Add-EntraBetaDeviceRegisteredUser -DeviceId "" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should execute successfully with Alias" { + $result = Add-EntraBetaDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should contain DeviceId in parameters when passed DeviceId to it" { + Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain BodyParameter in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $value = @{ + "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} + Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' + Write-Host $BodyParameter.AdditionalProperties.'@odata.id' + $true + } + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaDeviceRegisteredUser" + + Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaDeviceRegisteredUser" + + Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } + +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..6290e005e0 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { + Context "Test for Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { + It "Should adds a group to the cloud authentication roll-out policy in Azure AD." { + $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id is empty" { + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + + It "Should fail when Id is invalid" { + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + + It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.FeatureRolloutPolicyId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain OdataId in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $value = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params= Get-Parameters -data $result + $params.OdataId | Should -Be $value + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaFeatureRolloutPolicyDirectoryObject" + + Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaFeatureRolloutPolicyDirectoryObject" + Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug} | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + + diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 new file mode 100644 index 0000000000..81ebc7f329 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 @@ -0,0 +1,131 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "zTVcE8KFQ0W4bI9tvt6kz-5AOA62QHJLgnvAbh9Z0r7uQTWi6U_yTLYoEC66749-U" + "RoleId" = "cccccccc-85c2-4543-b86c-cccccccccccc" + "AdministrativeUnitId" = "dddddddd-7902-4be2-a25b-dddddddddddd" + + "RoleMemberInfo" = @{ + "DisplayName" = "Conf Room Adams" + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "AdditionalProperties" = @{"userPrincipalName" = "SawyerM@contoso.com" } + } + "AdditionalProperties" = @{"@odata.context" = 'https://graph.microsoft.com/beta/$metadata#scopedRoleMemberships/$entity]'} + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Add-EntraBetaScopedRoleMembership" { + Context "Test for Add-EntraBetaScopedRoleMembership" { + It "Should add a user to the specified role within the specified administrative unit" { + $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo + $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + $result = Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "zTVcE8KFQ0W4bI9tvt6kz-5AOA62QHJLgnvAbh9Z0r7uQTWi6U_yTLYoEC66749-U" + $result.RoleId | Should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" + $result.AdministrativeUnitId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" + + Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should add a user to the specified role within the specified administrative unit with alias" { + $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo + $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + $result = Add-EntraBetaScopedRoleMembership -ObjectId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "zTVcE8KFQ0W4bI9tvt6kz-5AOA62QHJLgnvAbh9Z0r7uQTWi6U_yTLYoEC66749-U" + $result.RoleId | Should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" + $result.AdministrativeUnitId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" + + Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should fail when RoleAdministrativeUnitId is empty" { + { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId } | Should -Throw "Missing an argument for parameter 'RoleObjectId'*" + } + It "Should fail when AdministrativeUnitObjectId is empty" { + { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -AdministrativeUnitObjectId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitObjectId'*" + } + It "Should fail when RoleMemberInfo is empty" { + { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleMemberInfo } | Should -Throw "Missing an argument for parameter 'RoleMemberInfo'*" + } + It "Should fail when RoleMemberInfo is invalid" { + { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleMemberInfo "" } | Should -Throw "Cannot process argument transformation on parameter 'RoleMemberInfo'*" + } + It "Result should contain Alias properties"{ + $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo + $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + $result = Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember + $result.ObjectId | should -Be "zTVcE8KFQ0W4bI9tvt6kz-5AOA62QHJLgnvAbh9Z0r7uQTWi6U_yTLYoEC66749-U" + $result.RoleObjectId | should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" + $result.AdministrativeUnitObjectId | should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" + } + It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { + + $result = Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" + $params = Get-Parameters -data $result.Parameters + $params.AdministrativeUnitId | Should -Be "0e3840ee-40b6-4b72-827b-c06e1f59d2be" + } + It "Should contain AdministrativeUnitId1 in parameters when passed AdministrativeUnitObjectId to it" { + + $result = Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -AdministrativeUnitObjectId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" + $params = Get-Parameters -data $result.Parameters + $params.AdministrativeUnitId1 | Should -Be "0e3840ee-40b6-4b72-827b-c06e1f59d2be" + } + It "Should contain RoleId in parameters when passed RoleObjectId to it" { + $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo + $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + + $result = Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember + $params = Get-Parameters -data $result.Parameters + $params.RoleId | Should -Be "135c35cd-85c2-4543-b86c-8f6dbedea4cf" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaScopedRoleMembership" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaScopedRoleMembership" + $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo + $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + + Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaScopedRoleMembership" + + Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 new file mode 100644 index 0000000000..8327788346 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 @@ -0,0 +1,58 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Confirm-EntraBetaDomain" { + Context "Test for Confirm-EntraBetaDomain" { + It "Should return empty object" { + $result = Confirm-EntraBetaDomain -DomainName "Contoso.com" -ForceTakeover $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DomainName is invalid" { + { Confirm-EntraBetaDomain -DomainName "" } | Should -Throw "Cannot bind argument to parameter 'DomainName' because it is an empty string.*" + } + It "Should fail when DomainName is empty" { + { Confirm-EntraBetaDomain -DomainName } | Should -Throw "Missing an argument for parameter 'DomainName'*" + } + It "Should fail when ForceTakeover is invalid" { + { Confirm-EntraBetaDomain -DomainName "Contoso.com" -ForceTakeover "XY" } | Should -Throw "Cannot process argument transformation on parameter 'ForceTakeover'*" + } + It "Should fail when ForceTakeover is empty" { + { Confirm-EntraBetaDomain -DomainName "Contoso.com" -ForceTakeover } | Should -Throw "Missing an argument for parameter 'ForceTakeover'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Confirm-EntraBetaDomain" + + Confirm-EntraBetaDomain -DomainName "Contoso.com" -ForceTakeover $true + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Confirm-EntraBetaDomain -DomainName "Contoso.com" -ForceTakeover $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 new file mode 100644 index 0000000000..6fb7290881 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "PrepaidUnits" = @{Enabled=20;LockedOut= 0; Suspended= 0;Warning =0} + "Id" = "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + "ConsumedUnits" = "20" + "AccountName" = "M365x99297270" + "CapabilityStatus" = "Enabled" + "AccountId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AppliesTo" = "User" + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaAccountSku" { + Context "Test for Get-EntraBetaAccountSku" { + It "Returns all the SKUs for a company." { + $result = Get-EntraBetaAccountSku -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" + $result.ConsumedUnits | should -Be "20" + $result.AccountName | should -Be "M365x99297270" + $result.CapabilityStatus | should -Be "Enabled" + $result.AccountId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.AppliesTo | should -Be "User" + + Should -Invoke -CommandName Get-MgBetaSubscribedSku -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when TenantId is empty" { + { Get-EntraBetaAccountSku -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is invalid" { + { Get-EntraBetaAccountSku -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'.*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAccountSku" + + $result = Get-EntraBetaAccountSku -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAccountSku" + + Should -Invoke -CommandName Get-MgBetaSubscribedSku -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaAccountSku -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 new file mode 100644 index 0000000000..6be278a78e --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 @@ -0,0 +1,136 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "DisplayName" = "Mock-Administrative-unit" + "Description" = "NewAdministrativeUnit" + "DeletedDateTime" = $null + "IsMemberManagementRestricted" = $null + "Members" = $null + "ScopedRoleMembers" = $null + "Visibility" = $null + "AdditionalProperties" = @{"@odata.context" = 'https://graph.microsoft.com/beta/$metadata#scopedRoleMemberships/$entity]'} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaAdministrativeUnit -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaAdministrativeUnit" { + Context "Test for Get-EntraBetaAdministrativeUnit" { + It "Should return specific administrative unit" { + $result = Get-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-Administrative-unit" + $result.Description | Should -Be "NewAdministrativeUnit" + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return specific administrative unit with alias" { + $result = Get-EntraBetaAdministrativeUnit -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-Administrative-unit" + $result.Description | Should -Be "NewAdministrativeUnit" + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Get-EntraBetaAdministrativeUnit -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { Get-EntraBetaAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should return all administrative units" { + $result = Get-EntraBetaAdministrativeUnit -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraBetaAdministrativeUnit -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top administrative unit" { + $result = Get-EntraBetaAdministrativeUnit -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaAdministrativeUnit -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaAdministrativeUnit -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return specific administrative unit by filter" { + $result = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq 'Mock-Administrative-unit'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-Administrative-unit' + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaAdministrativeUnit -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Result should contain AdministrativeUnitId"{ + $result = Get-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.ObjectId | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + } + It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { + + $result = Get-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.AdministrativeUnitId | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + } + It "Property parameter should work" { + $result = Get-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-Administrative-unit' + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaAdministrativeUnit -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAdministrativeUnit" + + $result = Get-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAdministrativeUnit" + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 new file mode 100644 index 0000000000..3a5fb08f7e --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -0,0 +1,128 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.user" + "displayName" = "Mock-UnitMember" + "mailEnabled" = $True + "isManagementRestricted"= $False + "renewedDateTime" = "2023-10-18T07:21:48Z" + "mobilePhone" = "425-555-0101" + "businessPhones" = {"425-555-0101"} + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaAdministrativeUnitMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaAdministrativeUnitMember" { + Context "Test for Get-EntraBetaAdministrativeUnitMember" { + It "Should return specific administrative unit member" { + $result = Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.AdditionalProperties.DisplayName | Should -Be "Mock-UnitMember" + $result.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.user" + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return specific administrative unit member with alias" { + $result = Get-EntraBetaAdministrativeUnitMember -ObjectId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.AdditionalProperties.DisplayName | Should -Be "Mock-UnitMember" + $result.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.user" + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should return all administrative unit members" { + $result = Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top 1 administrative unit member" { + $result = Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Result should Contain AdministrativeUnitId" { + $result = Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { + + $result = Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" + $params = Get-Parameters -data $result.Parameters + $params.AdministrativeUnitId | Should -Be "pppppppp-1111-1111-1111-aaaaaaaaaaaa" + } + It "Property parameter should work" { + $result = Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -Property ID + $result | Should -Not -BeNullOrEmpty + $result.ID | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAdministrativeUnitMember" + + $result = Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAdministrativeUnitMember" + + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 new file mode 100644 index 0000000000..5e6c632b19 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbcccc-1111-dddd-2222-eeee3333ffff" + "Description" = "new test" + "MaxAttributesPerSet" = 22 + "AdditionalProperties" = @{"[@odata.context" = "https://graph.microsoft.com/beta/`$metadata#directory/attributeSets/`$entity"} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaDirectoryAttributeSet -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaAttributeSet" { + Context "Test for Get-EntraBetaAttributeSet" { + It "Should get attribute set by AttributeSetId" { + $result = Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbcccc-1111-dddd-2222-eeee3333ffff' + $result.Description | should -Be "new test" + $result.MaxAttributesPerSet | should -Be 22 + + Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should get attribute set using alias" { + $result = Get-EntraBetaAttributeSet -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbcccc-1111-dddd-2222-eeee3333ffff' + $result.Description | should -Be "new test" + $result.MaxAttributesPerSet | should -Be 22 + + Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when AttributeSetId is empty" { + { Get-EntraBetaAttributeSet -AttributeSetId } | Should -Throw "Missing an argument for parameter 'AttributeSetId'*" + } + + It "Should fail when AttributeSetId is invalid" { + { Get-EntraBetaAttributeSet -AttributeSetId "" } | Should -Throw "Cannot bind argument to parameter 'AttributeSetId' because it is an empty string." + } + + It "Result should Contain ObjectId" { + $result = Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result.ObjectId | should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain AttributeSetId in parameters when passed Id to it" { + $result = Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result.Parameters + $params.AttributeSetId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAttributeSet" + $result = Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAttributeSet" + Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Property parameter should work" { + $result = Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'bbbbcccc-1111-dddd-2222-eeee3333ffff' + + Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAuditDirectoryLog.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAuditDirectoryLog.Tests.ps1 new file mode 100644 index 0000000000..b54b5a744c --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAuditDirectoryLog.Tests.ps1 @@ -0,0 +1,147 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "InitiatedBy" = [PSCustomObject]@{ + "App" = "" + "User" = "" + "AdditionalProperties" = @{} + } + "TargetResources" = [PSCustomObject]@{ + "DisplayName" = "test" + "GroupType" = "" + "Id" = "00000000-0000-0000-0000-000000000000" + "ModifiedProperties" = @() + "Type" = "N/A" + "UserPrincipalName" = "" + "AdditionalProperties" = @{} + } + "AdditionalDetails" = "" + "ActivityDateTime" = "28-May-24 11:49:02 AM" + "ActivityDisplayName" = "GroupsODataV4_GetgroupLifecyclePolicies" + "Category" = "GroupManagement" + "CorrelationId" = "aaaabbbb-0000-cccc-1111-dddd2222eeee" + "Id" = "bbbbcccc-1111-dddd-2222-eeee3333ffff" + "LoggedByService" = "Self-service Group Management" + "OperationType" = "Update" + "Result" = "success" + "ResultReason" = "OK" + "UserAgent" = "" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaAuditLogDirectoryAudit -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaAuditDirectoryLog" { + Context "Test for Get-EntraBetaAuditDirectoryLog" { + It "Should get all logs" { + $result = Get-EntraBetaAuditDirectoryLog -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when All has argument" { + { Get-EntraBetaAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should get first n logs" { + $result = Get-EntraBetaAuditDirectoryLog -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.ActivityDateTime | Should -Be "28-May-24 11:49:02 AM" + $result.ActivityDisplayName | Should -Be "GroupsODataV4_GetgroupLifecyclePolicies" + $result.Category | Should -Be "GroupManagement" + $result.CorrelationId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result.LoggedByService | Should -Be "Self-service Group Management" + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraBetaAuditDirectoryLog -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraBetaAuditDirectoryLog -Top y } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should get audit logs containing a given ActivityDisplayName" { + $result = Get-EntraBetaAuditDirectoryLog -Filter "ActivityDisplayName eq 'GroupsODataV4_GetgroupLifecyclePolicies'" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.ActivityDateTime | Should -Be "28-May-24 11:49:02 AM" + $result.ActivityDisplayName | Should -Be "GroupsODataV4_GetgroupLifecyclePolicies" + $result.Category | Should -Be "GroupManagement" + $result.CorrelationId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result.LoggedByService | Should -Be "Self-service Group Management" + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Filter is empty" { + { Get-EntraBetaAuditDirectoryLog -Filter -Top 1} | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should get all audit logs with a given result(success)" { + $result = Get-EntraBetaAuditDirectoryLog -Filter "result eq 'success'" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should get all audit logs with a given result(failure)" { + $result = Get-EntraBetaAuditDirectoryLog -Filter "result eq 'failure'" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Property parameter should work" { + $result = Get-EntraBetaAuditDirectoryLog -Property ActivityDisplayName + $result | Should -Not -BeNullOrEmpty + $result.ActivityDisplayName | Should -Be 'GroupsODataV4_GetgroupLifecyclePolicies' + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaAuditDirectoryLog -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditDirectoryLog" + $result= Get-EntraBetaAuditDirectoryLog + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditDirectoryLog" + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaAuditDirectoryLog -Top 1 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 new file mode 100644 index 0000000000..0f52650f60 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AllowedValues" = "" + "AttributeSet" = "Test" + "Description" = "Target completion date" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "IsCollection" = $false + "IsSearchable" = $true + "Name" = "Date" + "Status" = "Available" + "Type" = "String" + "UsePreDefinedValuesOnly" = $true + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/beta/`$metadata#directory/customSecurityAttributeDefinitions/`$entity"} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaCustomSecurityAttributeDefinition" { + Context "Test for Get-EntraBetaCustomSecurityAttributeDefinition" { + It "Should get custom security attribute definition by Id" { + $result = Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.AllowedValues | should -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' + $result.AttributeSet | should -Be 'Test' + $result.Description | should -Be 'Target completion date' + $result.Name | should -Be 'Date' + $result.Status | should -Be 'Available' + $result.Type | should -Be 'String' + $result.IsCollection | should -Be $false + $result.IsSearchable | should -Be $true + $result.UsePreDefinedValuesOnly | should -Be $true + + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id is empty" { + { Get-EntraBetaCustomSecurityAttributeDefinition -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Get-EntraBetaCustomSecurityAttributeDefinition -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Result should Contain ObjectId" { + $result = Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain CustomSecurityAttributeDefinitionId in parameters when passed Id to it" { + $result = Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $params = Get-Parameters -data $result.Parameters + $params.CustomSecurityAttributeDefinitionId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Property parameter should work" { + $result = Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property Description + $result | Should -Not -BeNullOrEmpty + $result.Description | Should -Be 'Target completion date' + + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaCustomSecurityAttributeDefinition" + $result = Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaCustomSecurityAttributeDefinition" + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 new file mode 100644 index 0000000000..8e2e8077d0 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -0,0 +1,132 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "IsActive" = $true + "AdditionalProperties" = @{"@odata.context"="https://graph.microsoft.com/beta/`$metadata#directory/customSecurityAttributeDefinitions('Engineering_Projectt')/allowedValues/`$entity"} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { + Context "Test for Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { + It "Should get query for given CustomSecurityAttributeDefinitionId" { + $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when CustomSecurityAttributeDefinitionId are empty" { + { Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId } | Should -Throw "Missing an argument for parameter 'CustomSecurityAttributeDefinitionId'*" + } + + It "Should fail when CustomSecurityAttributeDefinitionId is Invalid" { + { Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'CustomSecurityAttributeDefinitionId' because it is an empty string." + } + + It "Should get a specific value for the Id" { + $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.IsActive | Should -Be $true + + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id are empty" { + { Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is Invalid" { + { Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should get a specific value by filter" { + $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Filter "Id eq 'bbbbbbbb-1111-2222-3333-cccccccccc55'" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.IsActive | Should -Be $true + + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Filter are empty" { + { Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should contain ObjectId in result" { + $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain AllowedValueId in parameters when passed Id to it" { + $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $params = Get-Parameters -data $result.Parameters + $params.AllowedValueId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should contain value in parameters when passed Filter to it" { + $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Filter "Id eq 'bbbbbbbb-1111-2222-3333-cccccccccc55'" + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Not -BeNullOrEmpty + $expectedFilter = "Id eq 'bbbbbbbb-1111-2222-3333-cccccccccc55'" + $params.Filter | Should -Be $expectedFilter + + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Property parameter should work" { + $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' + + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" + $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 new file mode 100644 index 0000000000..1bf5c7468f --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 @@ -0,0 +1,160 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "OnPremisesSyncEnabled" = $null + "TrustType" = $null + "OperatingSystemVersion" = "10.0.22621.1700" + "PhysicalIds" = "[HWID]:h:6825786449406074" + "ComplianceExpirationDateTime" = $null + "DeviceVersion" = "2" + "ApproximateLastSignInDateTime" = $null + "OnPremisesLastSyncDateTime" = $null + "OperatingSystem" = "WINDOWS" + "DeletedDateTime" = $null + "DisplayName" = "Mock-Device" + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaDevice" { + Context "Test for Get-EntraBetaDevice" { + It "Should return specific device" { + $result = Get-EntraBetaDevice -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | should -Be "Mock-Device" + + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return specific device with Alias" { + $result = Get-EntraBetaDevice -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceId is empty" { + { Get-EntraBetaDevice -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" + } + It "Should fail when DeviceId is invalid" { + { Get-EntraBetaDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." + } + It "Should return all applications" { + $result = Get-EntraBetaDevice -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraBetaDevice -All xy } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'*" + } + + It "Should fail when invalid parameter is passed" { + { Get-EntraBetaDevice -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should return specific application by searchstring" { + $result = Get-EntraBetaDevice -SearchString 'Mock-Device' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-Device' + + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when searchstring is empty" { + { Get-EntraBetaDevice -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Should return specific application by filter" { + $result = Get-EntraBetaDevice -Filter "DisplayName -eq 'Mock-Device'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-Device' + + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaDevice -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should return top application" { + $result = Get-EntraBetaDevice -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaDevice -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaDevice -Top xy } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Result should Contain Alias properties" { + $result = Get-EntraBetaDevice -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DevicePhysicalIds | should -Be "[HWID]:h:6825786449406074" + $result.DeviceObjectVersion | should -Be "2" + $result.DeviceOSType | should -Be "WINDOWS" + $result.DeviceOSVersion | should -Be "10.0.22621.1700" + $result.DirSyncEnabled | should -BeNullOrEmpty + $result.DeviceTrustType | should -BeNullOrEmpty + + } + It "Should contain DeviceId in parameters when passed ObjectId to it" { + $result = Get-EntraBetaDevice -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraBetaDevice -SearchString 'Mock-Device' + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match 'Mock-Device' + } + It "Property parameter should work" { + $result = Get-EntraBetaDevice -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-Device' + + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaDevice -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDevice" + + $result = Get-EntraBetaDevice -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDevice" + + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDevice -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 new file mode 100644 index 0000000000..ba0a3e6234 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -0,0 +1,125 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "BusinessPhones" = @("425-555-0100") + "onPremisesImmutableId" = $null + "deletedDateTime" = $null + "onPremisesSyncEnabled" = $null + "OnPremisesLastSyncDateTime" = $null + "onPremisesProvisioningErrors" = @{} + "mobilePhone" = "425-555-0100" + "ExternalUserState" = $null + "ExternalUserStateChangeDateTime" = $null + "Parameters" = $args + "AdditionalProperties" = @{ + "DisplayName" = "demo" + } + } + } + + + Mock -CommandName Get-MgBetaDeviceRegisteredOwner -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaDeviceRegisteredOwner" { + Context "Test for Get-EntraBetaDeviceRegisteredOwner" { + It "Should return specific device registered owner" { + $result = Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return specific device registered owner with alias" { + $result = Get-EntraBetaDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceId is empty" { + { Get-EntraBetaDeviceRegisteredOwner -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" + } + It "Should fail when DeviceId is invalid" { + { Get-EntraBetaDeviceRegisteredOwner -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string.*" + } + It "Should return all device registered owner" { + $result = Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when All is invalid" { + { Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" + } + It "Should return top device registered owner" { + $result = Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when top is empty" { + { Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when top is invalid" { + { Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain DeviceId in parameters when passed Name to it" { + + $result = Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $para= $params | ConvertTo-json | ConvertFrom-Json + $para.DeviceId | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDeviceRegisteredOwner" + $result = Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Property parameter should work" { + $result = Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property mobilePhone + $result | Should -Not -BeNullOrEmpty + $result.mobilePhone | Should -Be '425-555-0100' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } + +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 new file mode 100644 index 0000000000..773c09c421 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -0,0 +1,130 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + $scriptblock = { + @{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "onPremisesImmutableId" = $null + "deletedDateTime" = $null + "onPremisesSyncEnabled" = $null + "OnPremisesLastSyncDateTime" = $null + "onPremisesProvisioningErrors" = @{} + "mobilePhone" = "425-555-0100" + "BusinessPhones" = @("425-555-0100") + "ExternalUserState" = $null + "ExternalUserStateChangeDateTime" = $null + "Parameters" = $args + "AdditionalProperties" = @{ + "DisplayName" = "Demo" + } + } + } + + Mock -CommandName Get-MgBetaDeviceRegisteredUser -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + + + +Describe "Get-EntraBetaDeviceRegisteredUser" { + Context "Test for Get-EntraBetaDeviceRegisteredUser" { + It "Should return specific device registered User" { + $result = Get-EntraBetaDeviceRegisteredUser -DeviceId "8542ebd1-3d49-4073-9dce-30f197c67755" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return specific device registered User with alias" { + $result = Get-EntraBetaDeviceRegisteredUser -ObjectId "8542ebd1-3d49-4073-9dce-30f197c67755" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceId is empty" { + { Get-EntraBetaDeviceRegisteredUser -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" + } + It "Should fail when DeviceId is invalid" { + { Get-EntraBetaDeviceRegisteredUser -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string.*" + } + It "Should return all device registered owner" { + $result = Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should return top device registered owner" { + $result = Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when top is empty" { + { Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when top is invalid" { + { Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain DeviceId in parameters when passed Name to it" { + + $result = Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $Para= $params | ConvertTo-json | ConvertFrom-Json + $para.DeviceId | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDeviceRegisteredUser" + + $result = Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $a= $params | ConvertTo-json | ConvertFrom-Json + $a.headers.'User-Agent' | Should -Be $userAgentHeaderValue + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDeviceRegisteredUser" + + $result = Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDeviceRegisteredUser" + + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should fail when Property is empty" { + { Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + + } + +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 new file mode 100644 index 0000000000..26084ca3da --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 @@ -0,0 +1,71 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @{ + configuration = [PSCustomObject]@{ + AccidentalDeletionPrevention = [PSCustomObject]@{ + AlertThreshold = 50 + SynchronizationPreventionType = @{SynchronizationPreventionType="Threshold"; Parameters =$args} + } + } + } + } + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} +Describe "Get-EntraBetaDirSyncConfiguration" { + Context "Test for Get-EntraBetaDirSyncConfiguration" { + It "Get irectory synchronization settings" { + $result = Get-EntraBetaDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when TenantId is empty" { + { Get-EntraBetaDirSyncConfiguration -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + + It "Should fail when TenantId is invalid" { + { Get-EntraBetaDirSyncConfiguration -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'.*" + } + It "Should contain in OnPremisesDirectorySynchronizationId parameters when passed TenantId to it" { + $result = Get-EntraBetaDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result.DeletionPreventionType.parameters + $params.OnPremisesDirectorySynchronizationId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirSyncConfiguration" + + $result = Get-EntraBetaDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirSyncConfiguration" + + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + + + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 new file mode 100644 index 0000000000..0739a1c03d --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Features" = @{ + "BlockCloudObjectTakeoverThroughHardMatchEnabled" = $false; + "BlockSoftMatchEnabled" = $false; + "BypassDirSyncOverridesEnabled" = $false; + "CloudPasswordPolicyForPasswordSyncedUsersEnabled" = $false; + "ConcurrentCredentialUpdateEnabled" = $false; + "ConcurrentOrgIdProvisioningEnabled" = $true; + "DeviceWritebackEnabled" = $false; + "DirectoryExtensionsEnabled" = $false; + "FopeConflictResolutionEnabled" = $false; + "GroupWriteBackEnabled" = $true; + "PasswordSyncEnabled" = $false; + "PasswordWritebackEnabled" = $false; + "QuarantineUponProxyAddressesConflictEnabled" = $true; + "QuarantineUponUpnConflictEnabled" = $true; + "SoftMatchOnUpnEnabled" = $true; + "SynchronizeUpnForManagedUsersEnabled" = $true; + "UnifiedGroupWritebackEnabled" = $true; + "UserForcePasswordChangeOnLogonEnabled" = $false; + "UserWritebackEnabled" = $false; + } + } + ) + } + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaDirSyncFeature" { + Context "Test for Get-EntraBetaDirSyncFeature" { + It "Returns all the sync features" { + $result = Get-EntraBetaDirSyncFeature + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Returns specific sync feature" { + $result = Get-EntraBetaDirSyncFeature -Feature PasswordSync + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Returns sync feature" { + $result = Get-EntraBetaDirSyncFeature -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when TenantId is empty" { + { Get-EntraBetaDirSyncFeature -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is invalid" { + { Get-EntraBetaDirSyncFeature -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'*" + } + It "Should fail when Feature is empty" { + { Get-EntraBetaDirSyncFeature -Feature } | Should -Throw "Missing an argument for parameter 'Feature'*" + } + It "Should fail when invalid paramter is passed"{ + { Get-EntraBetaDirSyncFeature -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirSyncFeature" + + $result = Get-EntraBetaDirSyncFeature -Feature PasswordSync + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirSyncFeature" + + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDirSyncFeature -Feature PasswordSync -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 new file mode 100644 index 0000000000..edbe610dc6 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 @@ -0,0 +1,58 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaDirectoryObjectOnPremisesProvisioningError" { + Context "Test for Get-EntraBetaDirectoryObjectOnPremisesProvisioningError" { + It "Should return empty object" { + $result = Get-EntraBetaDirectoryObjectOnPremisesProvisioningError + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return empty object when TenantId is passed" { + $result = Get-EntraBetaDirectoryObjectOnPremisesProvisioningError -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when TenantId is empty" { + { Get-EntraBetaDirectoryObjectOnPremisesProvisioningError -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is invalid" { + { Get-EntraBetaDirectoryObjectOnPremisesProvisioningError -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectoryObjectOnPremisesProvisioningError" + + Get-EntraBetaDirectoryObjectOnPremisesProvisioningError + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectoryObjectOnPremisesProvisioningError" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDirectoryObjectOnPremisesProvisioningError -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 new file mode 100644 index 0000000000..a3ee8379f3 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "Application" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "TemplateId" = "bbbbbbbb-1111-2222-3333-cccccccccc56" + "Values" = @("EnableAccessCheckForPrivilegedApplicationUpdates") + "AdditionalProperties" = @{"[@odata.context" = "https://graph.microsoft.com/beta/`$metadata#settings/`$entity"} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaDirectorySetting -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaDirectorySetting" { + Context "Test for Get-EntraBetaDirectorySetting" { + It "Should gets a directory setting from Azure Active Directory (AD)" { + $result = Get-EntraBetaDirectorySetting -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' + $result.DisplayName | should -Be "Application" + $result.TemplateId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + $result.Values | should -Be @("EnableAccessCheckForPrivilegedApplicationUpdates") + + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id is empty" { + { Get-EntraBetaDirectorySetting -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Get-EntraBetaDirectorySetting -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should return all group" { + $result = Get-EntraBetaDirectorySetting -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraBetaDirectorySetting -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should return top group" { + $result = Get-EntraBetaDirectorySetting -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraBetaDirectorySetting -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraBetaDirectorySetting -Top y } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should contain DirectorySettingId in parameters when passed Id to it" { + $result = Get-EntraBetaDirectorySetting -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $params = Get-Parameters -data $result.Parameters + $params.DirectorySettingId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Property parameter should work" { + $result = Get-EntraBetaDirectorySetting -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Application' + + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaDirectorySetting -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectorySetting" + $result= Get-EntraBetaDirectorySetting -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectorySetting" + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDirectorySetting -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 new file mode 100644 index 0000000000..b4e792feb1 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "Group.Unified.Guest" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "Description" = "Settings for a specific Unified Group" + "Parameters" = $args + "Values" = @( + [PSCustomObject]@{ + "Name" = "AllowToAddGuests" + "Description" = "" + "Type" = "" + "DefaultValue" = $true + } + ) + } + ) + } + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaDirectorySettingTemplate" { + Context "Test for Get-EntraBetaDirectorySettingTemplate" { + It "Should gets a directory setting template from Azure Active Directory (AD)." { + $result = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' + $result.DisplayName | should -Be "Group.Unified.Guest" + $result.Description | should -Be "Settings for a specific Unified Group" + + Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id is empty" { + { Get-EntraBetaDirectorySettingTemplate -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Get-EntraBetaDirectorySettingTemplate -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should contain DirectorySettingTemplateId in parameters when passed Id to it" { + $result = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $DirectorySettingTemplateId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $true + } + } + It "Property parameter should work" { + $result = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Group.Unified.Guest' + + Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectorySettingTemplate" + $result = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectorySettingTemplate" + Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 new file mode 100644 index 0000000000..4a34ef2a38 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "ActiveSignInUri" = "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" + "DisplayName" = "Contoso" + "FederatedIdpMfaBehavior" = "rejectMfaByFederatedIdp" + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "IsSignedAuthenticationRequestRequired" = "" + "IssuerUri" = "http://contoso.com/adfs/services/trust/" + "MetadataExchangeUri" = "https://sts.contoso.com/adfs/services/trust/mex" + "NextSigningCertificate" = "MIIC3jCCAcagAwIBAgIQEt0T0G5GPZ9" + "PassiveSignInUri" = "https://sts.contoso.com/adfs/ls/" + "PreferredAuthenticationProtocol" = "wsFed" + "PromptLoginBehavior" = "" + "SignOutUri" = "https://sts.deverett.info/adfs/ls/" + "SigningCertificate" = "MIIC3jCCAcagAwIBAgIQFsO0R8deG4h" + "SigningCertificateUpdateStatus" = @{ + "CertificateUpdateResult" = "success"; + } + } + ) + } + Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaDomainFederationSettings" { + Context "Test for Get-EntraBetaDomainFederationSettings" { + It "Should return federation settings" { + $result = Get-EntraBetaDomainFederationSettings -DomainName "test.com" + $result | Should -Not -BeNullOrEmpty + $result.FederationBrandName | Should -Be "Contoso" + $result.ActiveLogOnUri | Should -Be "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Returns federation settings" { + $result = Get-EntraBetaDomainFederationSettings -DomainName "test.com" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when TenantId is empty" { + { Get-EntraBetaDomainFederationSettings -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is invalid" { + { Get-EntraBetaDomainFederationSettings -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'.*" + } + It "Should fail when DomainName is empty" { + { Get-EntraBetaDomainFederationSettings -DomainName } | Should -Throw "Missing an argument for parameter 'DomainName'*" + } + It "Should fail when DomainName is inavlid" { + { Get-EntraBetaDomainFederationSettings -DomainName "" } | Should -Throw "Cannot bind argument to parameter 'DomainName'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDomainFederationSettings" + + $result = Get-EntraBetaDomainFederationSettings -DomainName "test.com" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDomainFederationSettings" + + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDomainFederationSettings -DomainName "test.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 new file mode 100644 index 0000000000..d7f0445375 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "ActiveSignInUri" = "https://sts.anmaji.myworkspace.microsoft.com/adfs/services/trust/2005/usernamemixed" + "DisplayName" = "ADFS HYPER-V LAB" + "IssuerUri" = "http://anmaji.myworkspace.microsoft.com/adfs/services/trust/" + "MetadataExchangeUri" = "https://sts.anmaji.myworkspace.microsoft.com/adfs/services/trust/mex" + "PassiveSignInUri" = "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" + "SignOutUri" = "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" + "Parameters" =$args + } + ) + } + Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} +Describe "Get-EntraFederationProperty" { + Context "Test for Get-EntraFederationProperty" { + It "Should return the empty object" { + $result = Get-EntraBetaFederationProperty -DomainName "contoso.com" + $result | Should -Not -BeNullOrEmpty + $result.ActiveSignInUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/services/trust/2005/usernamemixed" + $result.DisplayName | Should -Be "ADFS HYPER-V LAB" + $result.IssuerUri | Should -Be "http://anmaji.myworkspace.microsoft.com/adfs/services/trust/" + $result.MetadataExchangeUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/services/trust/mex" + $result.PassiveSignInUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" + $result.SignOutUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" + + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DomainName is empty" { + {Get-EntraBetaFederationProperty -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" + } + + It "Should fail when DomainName is invalid" { + {Get-EntraBetaFederationProperty -DomainName ""} | Should -Throw "Cannot bind argument to parameter 'DomainName' because it is an empty string.*" + } + + It "Should contain DomainId in parameters when DomainName to it" { + Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + $result = Get-EntraBetaFederationProperty -DomainName "contoso.com" + $params = Get-Parameters -data $result + $params.DomainId | Should -Be "contoso.com" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaFederationProperty" + + $result = Get-EntraBetaFederationProperty -DomainName "contoso.com" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaFederationProperty" + + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaFederationProperty -DomainName "contoso.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 new file mode 100644 index 0000000000..8fa04c63e8 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 @@ -0,0 +1,70 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "contoso.com" + "IsAdminManaged" ="True" + "PasswordNotificationWindowInDays" = @{PasswordNotificationWindowInDays="14"; "Parameters" = $args} + "PasswordValidityPeriodInDays" = "2147483647" + } + ) + } + Mock -CommandName Get-MgBetaDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaPasswordPolicy" { + Context "Test for Get-EntraBetaPasswordPolicy" { + It "Should gets the current password policy for a tenant or a domain." { + $result = Get-EntraBetaPasswordPolicy -DomainName "contoso.com" + $result | Should -Not -BeNullOrEmpty + $result.NotificationDays.PasswordNotificationWindowInDays | Should -Be "14" + $result.ValidityPeriod | Should -Be "2147483647" + + Should -Invoke -CommandName Get-MgBetaDomain -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when DomainName is empty" { + {Get-EntraBetaPasswordPolicy -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" + } + + It "Should fail when DomainName is invalid" { + {Get-EntraBetaPasswordPolicy -DomainName ""} | Should -Throw "Cannot bind argument to parameter 'DomainName' because it is an empty string.*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPasswordPolicy" + + $result = Get-EntraBetaPasswordPolicy -DomainName "contoso.com" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPasswordPolicy" + + Should -Invoke -CommandName Get-MgBetaDomain -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaPasswordPolicy -DomainName "contoso.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 new file mode 100644 index 0000000000..bb8cb15ecd --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 @@ -0,0 +1,108 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + "RoleId" = "cccccccc-85c2-4543-b86c-cccccccccccc" + "AdministrativeUnitId" = "dddddddd-7902-4be2-a25b-dddddddddddd" + + "RoleMemberInfo" = @{ + "DisplayName" = "Conf Room Adams" + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "AdditionalProperties" = @{"userPrincipalName" = "Adams@M365x99297270.OnMicrosoft.com" } + } + "AdditionalProperties" = @{"@odata.context" = 'https://graph.microsoft.com/beta/$metadata#scopedRoleMemberships/$entity]'} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Get-EntraBetaScopedRoleMembership" { + Context "Test for Get-EntraBetaScopedRoleMembership" { + It "Should return specific scoped role membership" { + $result = Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $result.RoleId | Should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" + $result.AdministrativeUnitId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" + + Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return specific scoped role membership with alias" { + $result = Get-EntraBetaScopedRoleMembership -ObjectId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $result.RoleId | Should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" + $result.AdministrativeUnitId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" + + Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Get-EntraBetaScopedRoleMembership -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should fail when ScopedRoleMembershipId is empty" { + { Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId } | Should -Throw "Missing an argument for parameter 'ScopedRoleMembershipId'*" + } + It "Should fail when ScopedRoleMembershipId is invalid" { + { Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "" } | Should -Throw "Cannot bind argument to parameter 'ScopedRoleMembershipId' because it is an empty string." + } + It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { + + $result = Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $params = Get-Parameters -data $result.Parameters + $params.AdministrativeUnitId | Should -Be "dddddddd-1111-2222-3333-eeeeeeeeeeee" + } + It "Property parameter should work" { + $result = Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" -Property RoleId + $result | Should -Not -BeNullOrEmpty + $result.RoleId | Should -Be 'cccccccc-85c2-4543-b86c-cccccccccccc' + + Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaScopedRoleMembership" + + $result = Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaScopedRoleMembership" + + Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 new file mode 100644 index 0000000000..850611b972 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 @@ -0,0 +1,87 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "DisplayName" = "Mock-Admin-Unit" + "Description" = "NewAdministrativeUnit" + "DeletedDateTime" = $null + "IsMemberManagementRestricted" = $null + "Members" = $null + "ScopedRoleMembers" = $null + "Visibility" = $null + "AdditionalProperties" = @{"@odata.context" = 'https://graph.microsoft.com/beta/$metadata#scopedRoleMemberships/$entity]'} + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgBetaAdministrativeUnit -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "New-EntraBetaAdministrativeUnit" { + Context "Test for New-EntraBetaAdministrativeUnit" { + It "Should return created administrative unit" { + $result = New-EntraBetaAdministrativeUnit -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -IsMemberManagementRestricted $True + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-Admin-Unit" + $result.Description | Should -Be "NewAdministrativeUnit" + + Should -Invoke -CommandName New-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DisplayName is empty" { + { New-EntraBetaAdministrativeUnit -DisplayName -Description "NewAdministrativeUnit" } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when DisplayName is invalid" { + { New-EntraBetaAdministrativeUnit -DisplayName "" -Description "NewAdministrativeUnit" } | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." + } + It "Should fail when Description is empty" { + { New-EntraBetaAdministrativeUnit -DisplayName "Mock-Admin-Unit" -Description } | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when IsMemberManagementRestricted is empty" { + { New-EntraBetaAdministrativeUnit -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -IsMemberManagementRestricted } | Should -Throw "Missing an argument for parameter 'IsMemberManagementRestricted'*" + } + It "Should fail when IsMemberManagementRestricted is invalid" { + { New-EntraBetaAdministrativeUnit -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -IsMemberManagementRestricted "" } | Should -Throw "Cannot process argument transformation on parameter 'IsMemberManagementRestricted'.*" + } + It "Result should contain ObjectId"{ + $result = New-EntraBetaAdministrativeUnit -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" + $result.ObjectId | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAdministrativeUnit" + + $result = New-EntraBetaAdministrativeUnit -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAdministrativeUnit" + Should -Invoke -CommandName New-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaAdministrativeUnit -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 new file mode 100644 index 0000000000..0e589085c9 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -0,0 +1,160 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + "@odata.context" = 'https://graph.microsoft.com/beta/$metadata#scopedRoleMemberships/$entity]' + "@odata.type" = "#microsoft.graph.group" + "createdByAppId" = "8886ad7b-1795-4542-9808-c85859d97f23" + "DisplayName" = "Mock-Admin-UnitMember" + "mailNickname" = "Mock-Admin-UnitMember" + "organizationId" = "d5aec55f-2d12-4442-8d2f-ccca95d4390e" + "Description" = "NewAdministrativeUnitMember" + "groupTypes" = {"Unified", "DynamicMembership"} + "proxyAddresses" = "SMTP:testGroupInAU10@M365x99297270.onmicrosoft.com" + "membershipRuleProcessingState"= "On" + "membershipRule" = ("user.department -contains 'Marketing'") + "createdDateTime" = "2024-06-03T06:03:32Z" + "securityIdentifier" = "S-1-12-1-45050116-1081357872-244239291-3460319952" + "securityEnabled" = $False + "Members" = $null + "ScopedRoleMembers" = $null + "Visibility" = "Public" + + } + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MGBetaAdministrativeUnitMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "New-EntraBetaAdministrativeUnitMember" { + Context "Test for New-EntraBetaAdministrativeUnitMember" { + It "Should return created administrative unit member" { + $result = New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -OdataType "Microsoft.Graph.Group" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False -GroupTypes @("Unified","DynamicMembership") -MembershipRule "(user.department -contains 'Marketing')" -MembershipRuleProcessingState "On" -IsAssignableToRole $False + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.AdditionalProperties.DisplayName | Should -Be "Mock-Admin-UnitMember" + $result.AdditionalProperties.Description | Should -Be "NewAdministrativeUnitMember" + + Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = New-EntraBetaAdministrativeUnitMember -Id "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -OdataType "Microsoft.Graph.Group" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False -GroupTypes @("Unified","DynamicMembership") -MembershipRule "(user.department -contains 'Marketing')" -MembershipRuleProcessingState "On" -IsAssignableToRole $False + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + {New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False} | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should fail when DisplayName is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when DisplayName is invalid" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." + } + It "Should fail when Description is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when MailNickname is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'MailNickname'*" + } + It "Should fail when MailNickname is invalid" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "" -SecurityEnabled $False } | Should -Throw "Cannot bind argument to parameter 'MailNickname' because it is an empty string." + } + It "Should fail when MailEnabled is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'MailEnabled'*" + } + It "Should fail when MailEnabled is invalid" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled xy -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Cannot process argument transformation on parameter 'MailEnabled'*" + } + It "Should fail when SecurityEnabled is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled } | Should -Throw "Missing an argument for parameter 'SecurityEnabled'*" + } + It "Should fail when SecurityEnabled is invalid" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled xy } | Should -Throw "Cannot process argument transformation on parameter 'SecurityEnabled'*" + } + It "Should fail when OdataType is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -OdataType -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'OdataType'*" + } + It "Should fail when GroupTypes is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -GroupTypes -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'GroupTypes'*" + } + It "Should fail when MembershipRule is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -MembershipRule -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'MembershipRule'*" + } + It "Should fail when MembershipRuleProcessingState is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -MembershipRuleProcessingState -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'MembershipRuleProcessingState'*" + } + It "Should fail when AssignedLabels is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -AssignedLabels -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'AssignedLabels'*" + } + It "Should fail when ProxyAddresses is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -ProxyAddresses -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'ProxyAddresses'*" + } + It "Should fail when IsAssignableToRole is empty" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False -IsAssignableToRole } | Should -Throw "Missing an argument for parameter 'IsAssignableToRole'*" + } + It "Should fail when IsAssignableToRole is invalid" { + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False -IsAssignableToRole xy } | Should -Throw "Cannot process argument transformation on parameter 'IsAssignableToRole'*" + } + It "Should contain @odata.type in parameters when passed OdataType to it" { + $result = New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -OdataType "Microsoft.Graph.Group" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False -GroupTypes @("Unified","DynamicMembership") -MembershipRule "(user.department -contains 'Marketing')" -MembershipRuleProcessingState "On" -IsAssignableToRole $False + $jsonArray = $result.Parameters + + $hashTable = @{} + for ($i = 0; $i -lt $jsonArray.Length; $i += 2) { + $key = $jsonArray[$i] -replace '^-', '' -replace ':$', '' + $value = $jsonArray[$i + 1] + if ($value -is [PSCustomObject]) { + $value.PSObject.Properties | ForEach-Object { $_.Name = $_.Name -replace '^-', '' -replace ':$', '' } + } + $hashTable[$key] = $value + } + $OdataType = $hashTable.BodyParameter.AdditionalProperties.'@odata.type' + $OdataType | Should -Be "Microsoft.Graph.Group" + + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAdministrativeUnitMember" + + $result = New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -OdataType "Microsoft.Graph.Group" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False -GroupTypes @("Unified","DynamicMembership") -MembershipRule "(user.department -contains 'Marketing')" -MembershipRuleProcessingState "On" -IsAssignableToRole $False + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAdministrativeUnitMember" + Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -OdataType "Microsoft.Graph.Group" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False -GroupTypes @("Unified","DynamicMembership") -MembershipRule "(user.department -contains 'Marketing')" -MembershipRuleProcessingState "On" -IsAssignableToRole $False -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 new file mode 100644 index 0000000000..e0d30c3f64 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "Description" = "New AttributeSet" + "MaxAttributesPerSet" = 21 + "AdditionalProperties" = @{"[@odata.context" = 'https://graph.microsoft.com/beta/$metadata#directory/attributeSets/$entity'} + "Parameters" = $args + } + ) + } + Mock -CommandName New-MgBetaDirectoryAttributeSet -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "New-EntraBetaAttributeSet" { + Context "Test for New-EntraBetaAttributeSet" { + It "Should create new attribute set" { + $result = New-EntraBetaAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Description "New AttributeSet" -MaxAttributesPerSet 21 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' + $result.Description | should -Be "New AttributeSet" + $result.MaxAttributesPerSet | should -Be 21 + + Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should create new attribute set with alias" { + $result = New-EntraBetaAttributeSet -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Description "New AttributeSet" -MaxAttributesPerSet 21 + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' + $result.Description | should -Be "New AttributeSet" + $result.MaxAttributesPerSet | should -Be 21 + + Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when AttributeSetId is empty" { + { New-EntraBetaAttributeSet -AttributeSetId -Description "New AttributeSet" -MaxAttributesPerSet 21 } | Should -Throw "Missing an argument for parameter 'AttributeSetId'*" + } + + It "Should fail when Description is empty" { + { New-EntraBetaAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Description -MaxAttributesPerSet 21 } | Should -Throw "Missing an argument for parameter 'Description'*" + } + + It "Should fail when MaxAttributesPerSet is empty" { + { New-EntraBetaAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Description "New AttributeSet" -MaxAttributesPerSet } | Should -Throw "Missing an argument for parameter 'MaxAttributesPerSet'*" + } + + It "Should fail when MaxAttributesPerSet is invalid" { + { New-EntraBetaAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Description "New AttributeSet" -MaxAttributesPerSet "XYZ" } | Should -Throw "Cannot process argument transformation on parameter 'MaxAttributesPerSet'*" + } + + It "Result should Contain ObjectId" { + $result = New-EntraBetaAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Description "New AttributeSet" -MaxAttributesPerSet 21 + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAttributeSet" + + $result = New-EntraBetaAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Description "New AttributeSet" -MaxAttributesPerSet 21 + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAttributeSet" + + Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Description "New AttributeSet" -MaxAttributesPerSet 21 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 new file mode 100644 index 0000000000..a753027de4 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -0,0 +1,146 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AllowedValues" = "" + "AttributeSet" = "Test" + "Description" = "Target completion date" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "IsCollection" = $false + "IsSearchable" = $true + "Name" = "Date" + "Status" = "Available" + "Type" = "String" + "UsePreDefinedValuesOnly" = $true + "AdditionalProperties" = @{"@odata.context" = 'https://graph.microsoft.com/beta/$metadata#directory/customSecurityAttributeDefinitions/$entity'} + "Parameters" = $args + } + ) + } + Mock -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "New-EntraBetaCustomSecurityAttributeDefinition" { + Context "Test for New-EntraBetaCustomSecurityAttributeDefinition" { + It "Should create new custom security attribute definition" { + $result = New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true + $result | Should -Not -BeNullOrEmpty + $result.AllowedValues | should -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' + $result.AttributeSet | should -Be 'Test' + $result.Description | should -Be 'Target completion date' + $result.Name | should -Be 'Date' + $result.Status | should -Be 'Available' + $result.Type | should -Be 'String' + $result.IsCollection | should -Be $false + $result.IsSearchable | should -Be $true + $result.UsePreDefinedValuesOnly | should -Be $true + + Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when AttributeSet is empty" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'AttributeSet'*" + } + + It "Should fail when Description is empty" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'Description'*" + } + + It "Should fail when Name is empty" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'Name'*" + } + + It "Should fail when Type is empty" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'Type'*" + } + + It "Should fail when Status is empty" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'Status'*" + } + + It "Should fail when IsCollection is empty" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'IsCollection'*" + } + + It "Should fail when IsSearchable is empty" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'IsSearchable'*" + } + + It "Should fail when UsePreDefinedValuesOnly is empty" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly } | Should -Throw "Missing an argument for parameter 'UsePreDefinedValuesOnly'*" + } + + It "Should fail when AttributeSet is invalid" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'AttributeSet' because it is an empty string.*" + } + + It "Should fail when Name is invalid" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string.*" + } + + It "Should fail when Type is invalid" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'Type' because it is an empty string.*" + } + + It "Should fail when Status is invalid" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'Status' because it is an empty string.*" + } + + It "Should fail when IsCollection is invalid" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection "" -IsSearchable $true -UsePreDefinedValuesOnly $true } | Should -Throw "Cannot process argument transformation on parameter 'IsCollection'*" + } + + It "Should fail when IsSearchable is invalid" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable "" -UsePreDefinedValuesOnly $true } | Should -Throw "Cannot process argument transformation on parameter 'IsSearchable'*" + } + + It "Should fail when UsePreDefinedValuesOnly is invalid" { + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly "" } | Should -Throw "Cannot process argument transformation on parameter 'UsePreDefinedValuesOnly'*" + } + + It "Result should Contain ObjectId" { + $result = New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaCustomSecurityAttributeDefinition" + + $result = New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaCustomSecurityAttributeDefinition" + + Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaCustomSecurityAttributeDefinition -AttributeSet "Test" -Name "Date" -Description "Target completion date" -Type "String" -Status "Available" -IsCollection $false -IsSearchable $true -UsePreDefinedValuesOnly $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + + diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 new file mode 100644 index 0000000000..11922d0478 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "Password Rule Settings" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "TemplateId" = "bbbbbbbb-1111-2222-3333-cccccccccc56" + "Values" = [PSCustomObject]@{ + "BannedPasswordCheckOnPremisesMode" = "Audit" + "EnableBannedPasswordCheckOnPremises" = $true + "EnableBannedPasswordCheck" = $true + "LockoutDurationInSeconds" = 60 + "LockoutThreshold" = 10 + "BannedPasswordList" = $null + } + "AdditionalProperties" = [PSCustomObject]@{ + "@odata.context" = 'https://graph.microsoft.com/beta/$metadata#settings/$entity' + } + "Parameters" = $args + } + ) + } + + $scriptblock1 = { + return @( + [PSCustomObject]@{ + "DisplayName" = "Group.Unified.Guest" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "Description" = "Settings for a specific Unified Group" + "Parameters" = $args + "Values" = @( + [PSCustomObject]@{ + "Name" = "AllowToAddGuests" + "Description" = "" + "Type" = "" + "DefaultValue" = $true + } + ) + } + ) + } + + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock1 -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + Mock -CommandName New-MgBetaDirectorySetting -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "New-EntraBetaDirectorySetting" { + Context "Test for New-EntraBetaDirectorySetting" { + It "Should creates a directory settings object in Azure Active Directory (AD)" { + $template = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc56" + $settingsCopy = $template.CreateDirectorySetting() + $result = New-EntraBetaDirectorySetting -DirectorySetting $settingsCopy + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "Password Rule Settings" + $result.TemplateId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + + Should -Invoke -CommandName New-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when DirectorySetting is empty" { + { New-EntraBetaDirectorySetting -DirectorySetting } | Should -Throw "Missing an argument for parameter 'DirectorySetting'*" + } + + It "Should fail when DirectorySetting is Invalid" { + { + $template = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc56" + $settingsCopy = $template + New-EntraBetaDirectorySetting -DirectorySetting $settingsCopy } | Should -Throw "Cannot process argument transformation on parameter 'DirectorySetting'*" + } + + It "Should contain BodyParameter in parameters when passed DirectorySetting to it" { + $template = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc56" + $settingsCopy = $template.CreateDirectorySetting() + $result = New-EntraBetaDirectorySetting -DirectorySetting $settingsCopy + $params = Get-Parameters -data $result.Parameters + $params.BodyParameter | Should -Not -BeNullOrEmpty + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaDirectorySetting" + $template = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc56" + $settingsCopy = $template.CreateDirectorySetting() + New-EntraBetaDirectorySetting -DirectorySetting $settingsCopy + + Should -Invoke -CommandName New-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + $template = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc56" + $settingsCopy = $template.CreateDirectorySetting() + + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaDirectorySetting -DirectorySetting $settingsCopy -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 new file mode 100644 index 0000000000..0eeddc1c21 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Remove-MgBetaAdministrativeUnit -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Remove-EntraBetaAdministrativeUnit" { + Context "Test for Remove-EntraBetaAdministrativeUnit" { + It "Should return empty object" { + $result = Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return empty object with alias" { + $result = Remove-EntraBetaAdministrativeUnit -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { + Mock -CommandName Remove-MgBetaAdministrativeUnit -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $params = Get-Parameters -data $result + $params.AdministrativeUnitId | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaAdministrativeUnit" + + Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaAdministrativeUnit" + Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 new file mode 100644 index 0000000000..c33adb472e --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Remove-EntraBetaAdministrativeUnitMember" { + Context "Test for Remove-EntraBetaAdministrativeUnitMember" { + It "Should return empty object" { + $result = Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return empty object with alias" { + $result = Remove-EntraBetaAdministrativeUnitMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee" } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "" -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee"} | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should fail when MemberId is empty" { + { Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId } | Should -Throw "Missing an argument for parameter 'MemberId'*" + } + It "Should fail when MemberId is invalid" { + { Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId ""} | Should -Throw "Cannot bind argument to parameter 'MemberId' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaAdministrativeUnitMember" + + Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee" + + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaAdministrativeUnitMember" + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 new file mode 100644 index 0000000000..5f35d47e41 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Remove-EntraBetaDevice" { + Context "Test for Remove-EntraBetaDevice" { + It "Should return empty object" { + $result = Remove-EntraBetaDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraBetaDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceId is invalid" { + { Remove-EntraBetaDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." + } + It "Should fail when DeviceId is empty" { + { Remove-EntraBetaDevice -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" + } + It "Should contain DeviceId in parameters when passed DeviceId to it" { + Mock -CommandName Remove-MgBetaDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDevice" + Remove-EntraBetaDevice -DeviceId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaDevice -DeviceId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 new file mode 100644 index 0000000000..0c8b3f007a --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Remove-EntraBetaDeviceRegisteredOwner" { + Context "Test for Remove-EntraBetaDeviceRegisteredOwner" { + It "Should return empty object" { + $result = Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraBetaDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceId is empty" { + { Remove-EntraBetaDeviceRegisteredOwner -DeviceId -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } + } + It "Should fail when DeviceId is invalid" { + { Remove-EntraBetaDeviceRegisteredOwner -DeviceId "" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string.*" } + } + It "Should fail when OwnerId is empty" { + { Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId | Should -Throw "Missing an argument for parameter 'OwnerId'*" } + } + It "Should fail when OwnerId is invalid" { + { Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "" | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string.*" } + } + It "Should contain DeviceId in parameters when passed OwnerId to it" { + Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { + Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDeviceRegisteredOwner" + + $result = Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDeviceRegisteredOwner" + + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 new file mode 100644 index 0000000000..8ca3b58974 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Remove-EntraBetaDeviceRegisteredUser" { + Context "Test for Remove-EntraBetaDeviceRegisteredUser" { + It "Should return empty object" { + $result = Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraBetaDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceId is empty" { + { Remove-EntraBetaDeviceRegisteredUser -DeviceId -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } + } + It "Should fail when DeviceId is invalid" { + { Remove-EntraBetaDeviceRegisteredUser -DeviceId "" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string.*" } + } + It "Should fail when UserId is empty" { + { Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId | Should -Throw "Missing an argument for parameter 'UserId'*" } + } + It "Should fail when UserId is invalid" { + { Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "" | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string.*" } + } + It "Should contain DeviceId in parameters when passed UserId to it" { + Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain DirectoryObjectId in parameters when passed UserId to it" { + Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDeviceRegisteredUser" + + Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDeviceRegisteredUser" + + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 new file mode 100644 index 0000000000..304226c30b --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaDirectorySetting -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Remove-EntraBetaDirectorySetting" { + Context "Test for Remove-EntraBetaDirectorySetting" { + It "Should removes a directory setting from Azure Active Directory (AD)" { + $result = Remove-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id is empty" { + { Remove-EntraBetaDirectorySetting -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Remove-EntraBetaDirectorySetting -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should contain DirectorySettingId in parameters when passed Id to it" { + Mock -CommandName Remove-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.DirectorySettingId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDirectorySetting" + + $result = Remove-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDirectorySetting" + + Should -Invoke -CommandName Remove-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..9db8f3a398 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { + Context "Test for Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { + It "Should removes a group from the cloud authentication roll-out policy from Azure AD" { + $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id is empty" { + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should fail when ObjectId is empty" { + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + + It "Should fail when ObjectId is invalid" { + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId ""} | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should contain DirectoryObjectId in parameters when passed ObjectId to it" { + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result + $params.FeatureRolloutPolicyId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" + $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 new file mode 100644 index 0000000000..f8f118eb40 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Remove-EntraBetaScopedRoleMembership" { + Context "Test for Remove-EntraBetaScopedRoleMembership" { + It "Should return empty object" { + $result = Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should return empty object" { + $result = Remove-EntraBetaScopedRoleMembership -ObjectId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when AdministrativeUnitId is empty" { + { Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when AdministrativeUnitId is invalid" { + { Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU"} | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should fail when ScopedRoleMembershipId is empty" { + { Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId } | Should -Throw "Missing an argument for parameter 'ScopedRoleMembershipId'*" + } + It "Should fail when ScopedRoleMembershipId is invalid" { + { Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId ""} | Should -Throw "Cannot bind argument to parameter 'ScopedRoleMembershipId' because it is an empty string." + } + It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { + Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + $params = Get-Parameters -data $result + $params.AdministrativeUnitId | Should -Be "dddddddd-1111-2222-3333-eeeeeeeeeeee" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaScopedRoleMembership" + + Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" + + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaScopedRoleMembership" + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 new file mode 100644 index 0000000000..f95918b11a --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Update-MgBetaAdministrativeUnit -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Set-EntraBetaAdministrativeUnit" { + Context "Test for Set-EntraBetaAdministrativeUnit" { + It "Should return empty object" { + $result = Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -IsMemberManagementRestricted $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when Id is empty" { + { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId -DisplayName "Mock-Admin-Unit" } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" + } + It "Should fail when Id is invalid" { + { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "" -Description "NewAdministrativeUnit" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." + } + It "Should fail when DisplayName is empty" { + { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + It "Should fail when Description is empty" { + { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description } | Should -Throw "Missing an argument for parameter 'Description'*" + } + It "Should fail when IsMemberManagementRestricted is empty" { + { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" --DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -IsMemberManagementRestricted } | Should -Throw "Missing an argument for parameter 'IsMemberManagementRestricted'*" + } + It "Should fail when IsMemberManagementRestricted is invalid" { + { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -IsMemberManagementRestricted "" } | Should -Throw "Cannot process argument transformation on parameter 'IsMemberManagementRestricted'.*" + } + It "Should contain AdministrativeUnitId in parameters when passed ObjectId to it" { + Mock -CommandName Update-MgBetaAdministrativeUnit -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" + $params = Get-Parameters -data $result + $params.AdministrativeUnitId | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaAdministrativeUnit" + + Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" + + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaAdministrativeUnit" + Should -Invoke -CommandName Update-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 new file mode 100644 index 0000000000..d303ad1e97 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 @@ -0,0 +1,80 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaDirectoryAttributeSet -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Set-EntraBetaAttributeSet" { + Context "Test for Set-EntraBetaAttributeSet" { + It "Should update attribute set" { + $result = Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 + $result | Should -Be -NullOrEmpty + + Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should update attribute set with alias" { + $result = Set-EntraBetaAttributeSet -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 + $result | Should -Be -NullOrEmpty + + Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when AttributeSetId is empty" { + { Set-EntraBetaAttributeSet -AttributeSetId -Description "Update AttributeSet" -MaxAttributesPerSet 22 } | Should -Throw "Missing an argument for parameter 'AttributeSetId'*" + } + + It "Should fail when Description is empty" { + { Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description -MaxAttributesPerSet 22 } | Should -Throw "Missing an argument for parameter 'Description'*" + } + + It "Should fail when MaxAttributesPerSet is empty" { + { Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet } | Should -Throw "Missing an argument for parameter 'MaxAttributesPerSet'*" + } + + It "Should fail when MaxAttributesPerSet is invalid" { + { Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet "XYZ" } | Should -Throw "Cannot process argument transformation on parameter 'MaxAttributesPerSet'*" + } + + It "Should contain AttributeSetId in parameters when passed Id to it" { + Mock -CommandName Update-MgBetaDirectoryAttributeSet -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 + $params = Get-Parameters -data $result + $params.AttributeSetId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaAttributeSet" + $result = Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaAttributeSet" + Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 new file mode 100644 index 0000000000..43481545d0 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Set-EntraBetaCustomSecurityAttributeDefinition" { + Context "Test for Set-EntraBetaCustomSecurityAttributeDefinition" { + It "Should update custom security attribute definition" { + $result = Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id is empty" { + { Set-EntraBetaCustomSecurityAttributeDefinition -Id -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Description is empty" { + { Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description -Status "Available" -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'Description'*" + } + + It "Should fail when Status is empty" { + { Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status -UsePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'Status'*" + } + + It "Should fail when UsePreDefinedValuesOnly is empty" { + { Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly } | Should -Throw "Missing an argument for parameter 'UsePreDefinedValuesOnly'*" + } + + It "Should fail when Id is invalid" { + { Set-EntraBetaCustomSecurityAttributeDefinition -Id "" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string.*" + } + + It "Should fail when UsePreDefinedValuesOnly is invalid" { + { Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly "" } | Should -Throw "Cannot process argument transformation on parameter 'UsePreDefinedValuesOnly'*" + } + + It "Should contain CustomSecurityAttributeDefinitionId in parameters when passed Id to it" { + Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true + $params = Get-Parameters -data $result + $params.CustomSecurityAttributeDefinitionId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaCustomSecurityAttributeDefinition" + $result = Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaCustomSecurityAttributeDefinition" + Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 new file mode 100644 index 0000000000..444c82597f --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { + Context "Test for Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { + It "Should update a specific value for the Id" { + $result = Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when CustomSecurityAttributeDefinitionId are empty" { + { Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false } | Should -Throw "Missing an argument for parameter 'CustomSecurityAttributeDefinitionId'*" + } + + It "Should fail when CustomSecurityAttributeDefinitionId is Invalid" { + { Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "" -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false } | Should -Throw "Cannot bind argument to parameter 'CustomSecurityAttributeDefinitionId' because it is an empty string." + } + + It "Should fail when Id are empty" { + { Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id -IsActive $false } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is Invalid" { + { Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "" -IsActive $false } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should fail when IsActive are empty" { + { Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive } | Should -Throw "Missing an argument for parameter 'IsActive'*" + } + + It "Should fail when IsActive are invalid" { + { Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive dffg } | Should -Throw "Cannot process argument transformation on parameter 'IsActive'*" + } + + It "Should contain AllowedValueId in parameters when passed Id to it" { + Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false + $params = Get-Parameters -data $result + $params.AllowedValueId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" + $result = Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" + Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 new file mode 100644 index 0000000000..3cb14283f4 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Set-EntraBetaDevice"{ + Context "Test for Set-EntraBetaDevice" { + It "Should return empty object"{ + $result = Set-EntraBetaDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should execute successfully with Alias" { + $result = Set-EntraBetaDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when DeviceObjectId is invalid" { + { Set-EntraBetaDevice -DeviceObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceObjectId' because it is an empty string." + } + It "Should fail when DeviceObjectId is empty" { + { Set-EntraBetaDevice -DeviceObjectId } | Should -Throw "Missing an argument for parameter 'DeviceObjectId'*" + } + It "Should contain DeviceId in parameters when passed DeviceObjectId to it" { + Mock -CommandName Update-MgBetaDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $result = Set-EntraBetaDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc + $params = Get-Parameters -data $result + $params.DeviceId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDevice" + Set-EntraBetaDevice -DeviceObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaDevice -DeviceObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 new file mode 100644 index 0000000000..2f1237674d --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "Configuration" = @{ AlertThreshold =500 ; SynchronizationPreventionType = "enabledForCount"} + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + ) + } + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + Mock -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} +Describe "Set-EntraBetaDirSyncConfiguration" { + Context "Test for Set-EntraBetaDirSyncConfiguration" { + It "Should Modifies the directory synchronization settings." { + $result = Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when AccidentalDeletionThreshold is empty" { + {Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold -Force } | Should -Throw "Missing an argument for parameter 'AccidentalDeletionThreshold'. Specify a parameter*" + } + + It "Should fail when AccidentalDeletionThreshold is invalid" { + {Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold "xy" -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when TenantId is empty" { + {Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold '111' -TenantId -Force } | Should -Throw "Missing an argument for parameter 'TenantId'. Specify a parameter*" + } + + It "Should fail when TenantId is invalid" { + {Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "" -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when Force parameter is passes with argument" { + {Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold "111" -Force "xy"} | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDirSyncConfiguration" + + Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDirSyncConfiguration" + + Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 new file mode 100644 index 0000000000..016c06068a --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + ) + } + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + Mock -CommandName Update-MgBetaOrganization -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} +Describe "Set-EntraBetaDirSyncEnabled" { + Context "Test for Set-EntraBetaDirSyncEnabled" { + It "Should Modifies the directory synchronization settings." { + $result = Set-EntraBetaDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force + write-host $result + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgBetaOrganization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when EnableDirsync is empty" { + {Set-EntraBetaDirSyncEnabled -EnableDirsync -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force } | Should -Throw "Missing an argument for parameter 'EnableDirsync'. Specify a parameter*" + } + + It "Should fail when EnableDirsync is invalid" { + {Set-EntraBetaDirSyncEnabled -EnableDirsync 'xy' -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when TenantId is empty" { + {Set-EntraBetaDirSyncEnabled -EnableDirsync $True -TenantId -Force } | Should -Throw "Missing an argument for parameter 'TenantId'. Specify a parameter*" + } + + It "Should fail when TenantId is invalid" { + {Set-EntraBetaDirSyncEnabled -EnableDirsync $True -TenantId "" -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when Force parameter is passes with argument" { + {Set-EntraBetaDirSyncEnabled -EnableDirsync $True -Force "xy"} | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDirSyncEnabled" + + Set-EntraBetaDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force | Out-Null + Should -Invoke -CommandName Update-MgBetaOrganization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 new file mode 100644 index 0000000000..953213b34a --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "Configuration" = @{ AlertThreshold =500 ; SynchronizationPreventionType = "enabledForCount"} + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + ) + } + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + Mock -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} +Describe "Set-EntraBetaDirSyncFeature" { + Context "Test for Set-EntraBetaDirSyncFeature" { + It "Should sets identity synchronization features for a tenant." { + $result = Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable $false -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force -ErrorAction SilentlyContinue + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Feature is empty" { + {Set-EntraBetaDirSyncFeature -Feature -Enable $false -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force} | Should -Throw "Missing an argument for parameter 'Feature'. Specify a parameter*" + } + + It "Should fail when Feature is invalid" { + {Set-EntraBetaDirSyncFeature -Feature "" -Enable $false -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force} | Should -Throw "Cannot bind argument to parameter 'Feature' because it is an empty string.*" + } + + It "Should fail when Enable is empty" { + {Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force } | Should -Throw "Missing an argument for parameter 'Enabled'.*" + } + + It "Should fail when Enable is invalid" { + {Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable "" -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force} | Should -Throw "Cannot process argument transformation on parameter 'Enabled'.*" + } + + It "Should fail when TenantId is empty" { + {Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable $false -TenantId -Force } | Should -Throw "Missing an argument for parameter 'TenantId'. Specify a parameter*" + } + + It "Should fail when TenantId is invalid" { + {Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable $false -TenantId "" -Force} | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when Force parameter is passes with argument" { + {Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable $false -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force "xy"} | Should -Throw "A positional parameter cannot be found that accepts argument*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAttributeSet" + + Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable $false -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force -ErrorAction SilentlyContinue | Out-Null + Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable $false -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force -ErrorAction SilentlyContinue -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 new file mode 100644 index 0000000000..ba3835f604 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 @@ -0,0 +1,126 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "Group.Unified.Guest" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "Description" = "Settings for a specific Unified Group" + "Parameters" = $args + "Values" = @( + [PSCustomObject]@{ + "Name" = "AllowToAddGuests" + "Description" = "" + "Type" = "" + "DefaultValue" = $true + } + ) + } + ) + } + + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + Mock -CommandName Update-MgBetaDirectorySetting -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} + +Describe "Set-EntraBetaDirectorySetting" { + Context "Test for Set-EntraBetaDirectorySetting" { + It "Should updates a directory setting in Azure Active Directory (AD)" { + $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" + $result = Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting $settingsCopy + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when Id is empty" { + { $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" + Set-EntraBetaDirectorySetting -Id -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" + Set-EntraBetaDirectorySetting -Id "" -DirectorySetting $settingsCopy } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string.*" + } + + It "Should fail when DirectorySetting is empty" { + { $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" + Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting } | Should -Throw "Missing an argument for parameter 'DirectorySetting'*" + } + + It "Should fail when DirectorySetting is invalid" { + { Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting "" } | Should -Throw "Cannot process argument transformation on parameter 'DirectorySetting'.*" + } + + It "Should contain BodyParameter in parameters when passed DirectorySetting to it" { + Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" + $result = Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting $settingsCopy + $params = Get-Parameters -data $result + $params.BodyParameter | Should -Not -BeNullOrEmpty + } + + It "Should contain DirectorySettingId in parameters when passed Id to it" { + Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" + $result = Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting $settingsCopy + $params = Get-Parameters -data $result + $params.DirectorySettingId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDirectorySetting" + $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" + Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting $settingsCopy + + Should -Invoke -CommandName Update-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting $settingsCopy -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 new file mode 100644 index 0000000000..4dbe1f0360 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 @@ -0,0 +1,93 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblock = { + return @( + [PSCustomObject]@{ + "ActiveSignInUri" = "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" + "DisplayName" = "Contoso" + "FederatedIdpMfaBehavior" = "rejectMfaByFederatedIdp" + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "IsSignedAuthenticationRequestRequired" = "" + "IssuerUri" = "http://contoso.com/adfs/services/trust/" + "MetadataExchangeUri" = "https://sts.contoso.com/adfs/services/trust/mex" + "NextSigningCertificate" = "MIIC3jCCAcagAwIBAgIQEt0T0G5GPZ9" + "PassiveSignInUri" = "https://sts.contoso.com/adfs/ls/" + "PreferredAuthenticationProtocol" = "wsFed" + "PromptLoginBehavior" = "" + "SignOutUri" = "https://sts.deverett.info/adfs/ls/" + "SigningCertificate" = "MIIC3jCCAcagAwIBAgIQFsO0R8deG4h" + "SigningCertificateUpdateStatus" = @{ + "CertificateUpdateResult" = "success"; + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + + Mock -CommandName Update-MgBetaDomainFederationConfiguration -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement +} +Describe "Set-EntraBetaDomainFederationSettings" { + Context "Test for Set-EntraBetaDomainFederationSettings" { + It "Should Updates settings for a federated domain." { + $result = Set-EntraBetaDomainFederationSettings -DomainName "manan.lab.myworkspace.microsoft.com" -LogOffUri "https://adfs1.manan.lab/adfs/" -PassiveLogOnUri "https://adfs1.manan.lab/adfs/" -ActiveLogOnUri "https://adfs1.manan.lab/adfs/services/trust/2005/" -IssuerUri "http://adfs1.manan.lab/adfs/services/" -FederationBrandName "ADFS" -MetadataExchangeUri "https://adfs1.manan.lab/adfs/services/trust/" -PreferredAuthenticationProtocol "saml" -PromptLoginBehavior "nativeSupport" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + + It "Should fail when DomainName is empty" { + {Set-EntraBetaDomainFederationSettings -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" + } + + It "Should fail when DomainName is invalid" { + {Set-EntraBetaDomainFederationSettings -DomainName ""} | Should -Throw "Cannot bind argument to parameter 'DomainName' because it is an empty string.*" + } + + It "Should fail when parameter is empty" { + {Set-EntraBetaDomainFederationSettings -DomainName "manan.lab.myworkspace.microsoft.com" -LogOffUri -PassiveLogOnUri -ActiveLogOnUri -IssuerUri -FederationBrandName -MetadataExchangeUri -PreferredAuthenticationProtocol -PromptLoginBehavior } | Should -Throw "Missing an argument for parameter*" + } + It "Should fail when invalid paramter is passed"{ + {Set-EntraBetaDomainFederationSettings -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" + } + It "Should contain DomainId in parameters when DomainName to it" { + Mock -CommandName Update-MgBetaDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + $result = Set-EntraBetaDomainFederationSettings -DomainName "manan.lab.myworkspace.microsoft.com" + $params = Get-Parameters -data $result + $a= $params | ConvertTo-json | ConvertFrom-Json + $a.DomainId | Should -Be "manan.lab.myworkspace.microsoft.com" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDomainFederationSettings" + + Set-EntraBetaDomainFederationSettings -DomainName "manan.lab.myworkspace.microsoft.com" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDomainFederationSettings" + + Should -Invoke -CommandName Update-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaDomainFederationSettings -DomainName "manan.lab.myworkspace.microsoft.com" -LogOffUri "https://adfs1.manan.lab/adfs/" -PassiveLogOnUri "https://adfs1.manan.lab/adfs/" -ActiveLogOnUri "https://adfs1.manan.lab/adfs/services/trust/2005/" -IssuerUri "http://adfs1.manan.lab/adfs/services/" -FederationBrandName "ADFS" -MetadataExchangeUri "https://adfs1.manan.lab/adfs/services/trust/" -PreferredAuthenticationProtocol "saml" -PromptLoginBehavior "nativeSupport" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 new file mode 100644 index 0000000000..8b2c6005c8 --- /dev/null +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -MockWith { + return @{ + value = @( + @{ + Id = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + Parameters = $args + } + ) + } + } +} + +Describe "Set-EntraBetaPartnerInformation"{ + Context "Test for Set-EntraBetaPartnerInformation" { + It "Should return empty object"{ + Mock -CommandName Invoke-MgGraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + $result = Set-EntraBetaPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + } + It "Should fail when PartnerSupportUrl is empty" { + { Set-EntraBetaPartnerInformation -PartnerSupportUrl } | Should -Throw "Missing an argument for parameter 'PartnerSupportUrl'*" + } + It "Should fail when PartnerCommerceUrl is empty" { + { Set-EntraBetaPartnerInformation -PartnerCommerceUrl } | Should -Throw "Missing an argument for parameter 'PartnerCommerceUrl'*" + } + It "Should fail when PartnerHelpUrl is empty" { + { Set-EntraBetaPartnerInformation -PartnerHelpUrl } | Should -Throw "Missing an argument for parameter 'PartnerHelpUrl'*" + } + It "Should fail when PartnerSupportEmails is empty" { + { Set-EntraBetaPartnerInformation -PartnerSupportEmails } | Should -Throw "Missing an argument for parameter 'PartnerSupportEmails'*" + } + It "Should fail when PartnerSupportTelephones is empty" { + { Set-EntraBetaPartnerInformation -PartnerSupportTelephones } | Should -Throw "Missing an argument for parameter 'PartnerSupportTelephones'*" + } + It "Should fail when TenantId is empty" { + { Set-EntraBetaPartnerInformation -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" + } + It "Should fail when TenantId is invlaid" { + { Set-EntraBetaPartnerInformation -TenantId abc } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'*" + } + It "Should contain params" { + $result = Set-EntraBetaPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ff" + $params = Get-Parameters -data $result.value.Parameters + $params.Body.supportEmails | Should -Be @("contoso@example.com") + $params.Body.supportUrl | Should -Be "http://www.test1.com" + $params.Body.partnerTenantId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ff" + $params.Body.helpUrl | Should -Be "http://www.test1.com" + $params.Body.commerceUrl | Should -Be "http://www.test1.com" + $params.Body.supportTelephones | Should -Be @("2342") + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPartnerInformation" + Set-EntraBetaPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ff" + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaPartnerInformation -PartnerSupportUrl "http://www.test1.com" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/EntraBeta.Tests.ps1 b/testVNext/EntraBeta/EntraBeta.Tests.ps1 new file mode 100644 index 0000000000..1f1342c757 --- /dev/null +++ b/testVNext/EntraBeta/EntraBeta.Tests.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta)){ + Import-Module Microsoft.Graph.Entra.Beta +} + +Import-Module Pester + +$psmPath = (Get-Module Microsoft.Graph.Entra.Beta).Path +$testReportPath = join-path $psscriptroot "..\..\..\TestReport\EntraBeta" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\EntraBeta\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "EntraBeta.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $false +$config.CodeCoverage.CoveragePercentTarget = 100 +$config.CodeCoverage.Path = $psmPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/EntraBeta/General.Tests.ps1 b/testVNext/EntraBeta/General.Tests.ps1 new file mode 100644 index 0000000000..2b618a9554 --- /dev/null +++ b/testVNext/EntraBeta/General.Tests.ps1 @@ -0,0 +1,40 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta + } +} + +Describe 'PowerShell Version Check' { + It 'Version 5.1 or Greater' { + $semanticVersion = $PSVersionTable.PSVersion + $version = $semanticVersion.Major + ($semanticVersion.Minor * 0.1) + $version | Should -BeGreaterOrEqual 5.1 + } +} + +Describe 'Module checks' { + It 'Module imported' { + $module = Get-Module -Name Microsoft.Graph.Entra.Beta + $module | Should -Not -Be $null + } + + It 'Have more that zero exported functions' { + $module = Get-Module -Name Microsoft.Graph.Entra.Beta + $module.ExportedCommands.Keys.Count | Should -BeGreaterThan 0 + } + + # It 'Known number translated commands' { + # $module = Get-Module -Name Microsoft.Graph.Entra.Beta + # $module.ExportedCommands.Keys.Count | Should -Be 293 + # } + + It 'Running a simple command Enable-EntraAzureADAlias'{ + Enable-EntraAzureADAlias + $Alias = Get-Alias -Name Get-AzureADUser + $Alias | Should -Not -Be $null + } +} diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 new file mode 100644 index 0000000000..289b60554e --- /dev/null +++ b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 @@ -0,0 +1,158 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "new" + "ExternalId" = "/administrativeUnits/bbbbbbbb-1111-2222-3333-cccccccccc55" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "Parent" = "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphGovernanceResource" + "RegisteredDateTime" = $null + "RegisteredRoot" = $null + "RoleAssignmentRequests" = @() + "RoleAssignments" = @() + "RoleDefinitions" = @() + "RoleSettings" = @() + "Status" = "Active" + "Type" = "administrativeUnits" + "AdditionalProperties" = @{"@odata.context"="https://graph.microsoft.com/beta/`$metadata#governanceResources/`$entity"} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaPrivilegedAccessResource -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Governance +} + +Describe "Get-EntraBetaPrivilegedResource" { + Context "Test for Get-EntraBetaPrivilegedResource" { + It "Should retrieve all resources from Microsoft Entra ID." { + $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + + It "Should fail when ProviderId are empty" { + { Get-EntraBetaPrivilegedResource -ProviderId } | Should -Throw "Missing an argument for parameter 'ProviderId'*" + } + + It "Should fail when ProviderId is Invalid" { + { Get-EntraBetaPrivilegedResource -ProviderId "" } | Should -Throw "Cannot bind argument to parameter 'ProviderId' because it is an empty string." + } + + It "Should get a specific privileged resource" { + $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.Status | Should -Be "Active" + $result.Type | Should -Be "administrativeUnits" + $result.ExternalId | Should -Be "/administrativeUnits/bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.DisplayName | Should -Be "new" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + + It "Should fail when Id are empty" { + { Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is Invalid" { + { Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should get top privileged resources" { + $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + + It "Should fail when Top are empty" { + { Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when Top is Invalid" { + { Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Top XYZ } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should get a specific privileged resource by filter" { + $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Filter "DisplayName eq 'new'" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.Status | Should -Be "Active" + $result.Type | Should -Be "administrativeUnits" + $result.ExternalId | Should -Be "/administrativeUnits/bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.DisplayName | Should -Be "new" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + + It "Should fail when Filter are empty" { + { Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should contain ObjectId in result" { + $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain GovernanceResourceId in parameters when passed Id to it" { + $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $params = Get-Parameters -data $result.Parameters + $params.GovernanceResourceId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + + It "Should contain PrivilegedAccessId in parameters when passed ProviderId to it" { + $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $params = Get-Parameters -data $result.Parameters + $params.PrivilegedAccessId | Should -Be "aadRoles" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Property parameter should work" { + $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'new' + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedResource" + $result= Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedResource" + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 new file mode 100644 index 0000000000..c2dfc6a6e7 --- /dev/null +++ b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 @@ -0,0 +1,137 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "ExternalId" = "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + "DisplayName" = "Mock Portal" + "Resource" = "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphGovernanceResource" + "ResourceId" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "RoleSetting" = " Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphGovernanceRoleSetting" + "TemplateId" = "542932a4-a3b5-4094-8829-ad59de0c8689" + "AdditionalProperties" = @{"@odata.context" = 'https://graph.microsoft.com/beta/$metadata#governanceRoleDefinitions/$entity'} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Governance +} + +Describe "Get-EntraBetaPrivilegedRoleDefinition" { + Context "Test for Get-EntraBetaPrivilegedRoleDefinition" { + It "Should return specific privileged role definition" { + $result = Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock Portal" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ResourceId | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when ProviderId is empty" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'ProviderId'*" + } + It "Should fail when ProviderId is invalid" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'ProviderId' because it is an empty string." + } + It "Should fail when ResourceId is empty" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'ResourceId'*" + } + It "Should fail when ResourceId is invalid" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'ResourceId' because it is an empty string." + } + It "Should fail when Top is empty" { + { Get-EntraBetaPrivilegedRoleDefinition -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaPrivilegedRoleDefinition -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return privileged role definition by filter" { + $result = Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Filter "DisplayName eq 'Mock Portal'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "Mock Portal" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return top 1 privileged role definition " { + $result = Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain PrivilegedAccessId in parameters when passed ProviderId to it" { + + $result = Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.PrivilegedAccessId | Should -Be "MockRoles" + } + It "Should contain GovernanceRoleSettingId in parameters when passed Id to it" { + + $result = Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.GovernanceRoleDefinitionId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Property parameter should work" { + $result = Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock Portal' + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedRoleDefinition" + + $result = Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedRoleDefinition" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 new file mode 100644 index 0000000000..5d7710a138 --- /dev/null +++ b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 @@ -0,0 +1,162 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "dddddddd-7902-4be2-a25b-dddddddddddd" + "resourceId" = "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + "roleDefinitionId" = "eeeeeeee-c632-46ae-9ee0-dddddddddddd" + "IsDefault" = $False + "LastUpdatedBy" = "Mock Administrator" + "LastUpdatedDateTime" = "26-10-2023 17:06:45" + "Resource" = "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphGovernanceResource" + "RoleDefinition" = "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphGovernanceRoleDefinition" + + + + "AdminEligibleSettings" = @{ + "RuleIdentifier" = "AttributeConditionRule" + "Setting" = @{ + "condition" = $null + "conditionVersion" = $null + "conditionDescription"= $null + "enableEnforcement" = $false + } + } + "AdminMemberSettings" = @{ + "RuleIdentifier" = "AttributeConditionRule" + "Setting" = @{ + "condition" = $null + "conditionVersion" = $null + "conditionDescription"= $null + "enableEnforcement" = $true + } + } + "UserEligibleSettings" = @{ + "RuleIdentifier" = "AttributeConditionRule" + "Setting" = @{ + "condition" = $null + "conditionVersion" = $null + "conditionDescription"= $null + "enableEnforcement" = $true + } + } + "UserMemberSettings" = @{ + "RuleIdentifier" = "TicketingRule" + "Setting" = @{ + "ticketingRequired" = $false + } + } + "AdditionalProperties" = @{"@odata.context" = 'https://graph.microsoft.com/beta/$metadata#governanceRoleSettings/$entity'} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaPrivilegedAccessRoleSetting -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Governance +} + +Describe "Get-EntraBetaPrivilegedRoleSetting" { + Context "Test for Get-EntraBetaPrivilegedRoleSetting" { + It "Should return specific privileged role setting" { + $result = Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" + $result.resourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.roleDefinitionId | Should -Be "eeeeeeee-c632-46ae-9ee0-dddddddddddd" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when ProviderId is empty" { + { Get-EntraBetaPrivilegedRoleSetting -ProviderId -Id "dddddddd-7902-4be2-a25b-dddddddddddd" } | Should -Throw "Missing an argument for parameter 'ProviderId'*" + } + It "Should fail when ProviderId is invalid" { + { Get-EntraBetaPrivilegedRoleSetting -ProviderId "" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" } | Should -Throw "Cannot bind argument to parameter 'ProviderId' because it is an empty string." + } + It "Should return top privileged role setting" { + $result = Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Filter "ResourceId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.resourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Filter "ResourceId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Filter "ResourceId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return privileged role setting by filter" { + $result = Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Filter "ResourceId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" + $result | Should -Not -BeNullOrEmpty + $result.resourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Filter } | Should -Throw "Missing an argument for parameter 'filter'*" + } + It "Should contain PrivilegedAccessId in parameters when passed ProviderId to it" { + + $result = Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" + $params = Get-Parameters -data $result.Parameters + $params.PrivilegedAccessId | Should -Be "MockRoles" + } + It "Should contain GovernanceRoleSettingId in parameters when passed Id to it" { + + $result = Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" + $params = Get-Parameters -data $result.Parameters + $params.GovernanceRoleSettingId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" + } + It "Property parameter should work" { + $result = Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" -Property ResourceId + $result | Should -Not -BeNullOrEmpty + $result.resourceId | Should -Be 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedRoleSetting" + + $result = Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedRoleSetting" + + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 new file mode 100644 index 0000000000..0b42d96d6b --- /dev/null +++ b/testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 @@ -0,0 +1,142 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Governance + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Governance +} + +Describe "Set-EntraBetaPrivilegedRoleSetting" { + Context "Test for Set-EntraBetaPrivilegedRoleSetting" { + It "Should return empty object" { + + $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -RoleDefinitionId "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should return empty object for UserMemberSettings" { + $setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting + $setting.RuleIdentifier = "JustificationRule" + $setting.Setting = "{'required':true}" + + $temp = $setting + $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserMemberSettings $temp + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should return empty object for AdminEligibleSettings" { + $setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting + $setting.RuleIdentifier = "MfaRule" + $setting.Setting = "{'mfaRequired': true}" + $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AdminEligibleSettings $setting + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should return empty object for UserEligibleSettings" { + $setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting + $setting.RuleIdentifier = "AttributeConditionRule" + $setting.Setting = "{ + 'condition'= null + 'conditionVersion'= null + 'conditionDescription'= null + 'enableEnforcement'= true + }" + $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserEligibleSettings $setting + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should return empty object for AdminMemberSettings" { + $setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting + $setting.RuleIdentifier = "JustificationRule" + $setting.Setting = "{'required':true}" + + $temp = New-Object System.Collections.Generic.List[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting] + $temp.Add($setting) + + $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AdminMemberSettings $temp + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + } + It "Should fail when Id is empty" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when ProviderId is empty" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } | Should -Throw "Missing an argument for parameter 'ProviderId'*" + } + It "Should fail when ProviderId is invalid" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } | Should -Throw "Cannot bind argument to parameter 'ProviderId' because it is an empty string." + } + It "Should fail when ResourceId is empty" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId } | Should -Throw "Missing an argument for parameter 'ResourceId'*" + } + It "Should fail when RoleDefinitionId is empty" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RoleDefinitionId } | Should -Throw "Missing an argument for parameter 'RoleDefinitionId'*" + } + It "Should fail when AdminEligibleSettings is empty" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AdminEligibleSettings } | Should -Throw "Missing an argument for parameter 'AdminEligibleSettings'*" + } + It "Should fail when AdminMemberSettings is empty" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AdminMemberSettings } | Should -Throw "Missing an argument for parameter 'AdminMemberSettings'*" + } + It "Should fail when UserEligibleSettings is empty" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserEligibleSettings } | Should -Throw "Missing an argument for parameter 'UserEligibleSettings'*" + } + It "Should fail when UserMemberSettings is empty" { + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserMemberSettings } | Should -Throw "Missing an argument for parameter 'UserMemberSettings'*" + } + It "Should contain PrivilegedAccessId in parameters when passed ProviderId to it" { + Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Governance + + $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $params = Get-Parameters -data $result + $params.PrivilegedAccessId | Should -Be "MockRoles" + } + It "Should contain GovernanceRoleSettingId in parameters when passed Id to it" { + Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Governance + + $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $params = Get-Parameters -data $result + $params.GovernanceRoleSettingId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPrivilegedRoleSetting" + + Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPrivilegedRoleSetting" + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 b/testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 new file mode 100644 index 0000000000..cee8e4a61f --- /dev/null +++ b/testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 @@ -0,0 +1,82 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgBetaGroupMember -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Add-EntraBetaGroupMember" { + Context "Test for Add-EntraBetaGroupMember" { + It "Should return empty object" { + $result = Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupId is empty" { + { Add-EntraBetaGroupMember -GroupId -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'GroupId'.*" + } + + It "Should fail when GroupId is invalid" { + { Add-EntraBetaGroupMember -GroupId "" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName New-MgBetaGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain DirectoryObjectId in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgBetaGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaGroupMember" + Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaGroupMember" + Should -Invoke -CommandName New-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + + diff --git a/testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 b/testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 new file mode 100644 index 0000000000..f552ab9fc6 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Add-EntraBetaGroupOwner" { + Context "Test for Add-EntraBetaGroupOwner" { + It "Should return empty object" { + $result = Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupId is empty" { + { Add-EntraBetaGroupOwner -GroupId -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'GroupId'.*" + } + + It "Should fail when GroupId is invalid" { + { Add-EntraBetaGroupOwner -GroupId "" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + $result = Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain BodyParameter in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + $result = Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $value = @{ + "@odata.id" = "https://graph.microsoft.com/beta/users/bbbbcccc-1111-dddd-2222-eeee3333ffff"} + Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' + Write-Host $BodyParameter.AdditionalProperties.'@odata.id' + $true + } + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaGroupOwner" + + Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaGroupOwner" + Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug} | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 new file mode 100644 index 0000000000..4ce2e9d6b6 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 @@ -0,0 +1,150 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "DeletedDateTime" = "10-05-2024 04:27:17" + "CreatedDateTime" = "07-07-2023 14:31:41" + "DisplayName" = "Mock-App" + "MailNickname" = "Demo-Mock-App" + "GroupTypes" = "Unified" + "SecurityEnabled" = $False + "MailEnabled" = $True + "Visibility" = "Public" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/beta/`$metadata#groups/`$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Get-EntraBetaDeletedGroup" { +Context "Test for Get-EntraBetaDeletedGroup" { + It "Should return specific Deleted Group" { + $result = Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-App" + $result.GroupTypes | Should -Be "Unified" + + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should return specific Deleted Group with alias" { + $result = Get-EntraBetaDeletedGroup -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-App" + $result.GroupTypes | Should -Be "Unified" + + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when GroupId is empty" { + { Get-EntraBetaDeletedGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when GroupId is invalid" { + { Get-EntraBetaDeletedGroup -GroupId ""} | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should return All deleted groups" { + $result = Get-EntraBetaDeletedGroup -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 deleted group" { + $result = Get-EntraBetaDeletedGroup -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-App" + $result.GroupTypes | Should -Be "Unified" + + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return specific deleted group by filter" { + $result = Get-EntraBetaDeletedGroup -Filter "DisplayName eq 'Mock-App'" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.DisplayName | Should -Be "Mock-App" + $result.GroupTypes | Should -Be "Unified" + + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaDeletedGroup -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return specific deleted groupn by SearchString" { + $result = Get-EntraBetaDeletedGroup -SearchString "Demo-Mock-App" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.MailNickname | Should -Be "Demo-Mock-App" + $result.DisplayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when searchstring is empty" { + { Get-EntraBetaDeletedGroup -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + It "Property parameter should work" { + $result = Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-App' + + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain GroupId in parameters when passed Id to it" { + $result = Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.DirectoryObjectId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraBetaDeletedGroup -SearchString "Demo-Mock-App" + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "Mock-App" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDeletedGroup" + $result = Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDeletedGroup" + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 new file mode 100644 index 0000000000..83b4fafb7f --- /dev/null +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 @@ -0,0 +1,157 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "demo" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "MailEnabled" = "False" + "Description" = "test" + "MailNickname" = "demoNickname" + "SecurityEnabled" = "True" + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Get-EntraBetaGroup" { + Context "Test for Get-EntraBetaGroup" { + It "Should return specific group" { + $result = Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' + + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupId is empty" { + { Get-EntraBetaGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Get-EntraBetaGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should return all group" { + $result = Get-EntraBetaGroup -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraBetaGroup -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should return specific group by searchstring" { + $result = Get-EntraBetaGroup -SearchString 'demo' + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'demo' + + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when SearchString is empty" { + { Get-EntraBetaGroup -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + + It "Should return specific group by filter" { + $result = Get-EntraBetaGroup -Filter "DisplayName -eq 'demo'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'demo' + + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when Filter is empty" { + { Get-EntraBetaGroup -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should return top group" { + $result = Get-EntraBetaGroup -Top 1 + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraBetaGroup -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraBetaGroup -Top y } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should Contain GroupId" { + $result = Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + $result = Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $params = Get-Parameters -data $result.Parameters + $params.GroupId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain Filter in parameters when passed SearchString to it" { + $result = Get-EntraBetaGroup -SearchString 'demo' + $params = Get-Parameters -data $result.Parameters + $params.Filter | Should -Match "demo" + } + It "Property parameter should work" { + $result = Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'demo' + + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Property parameter should work" { + $result = Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'demo' + + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroup" + $result= Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroup" + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaGroup -SearchString 'demo' -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..5907b2d7e7 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -0,0 +1,134 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + "AppRoleId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "CreatedDateTime" = "06-05-2024 05:42:01" + "DeletedDateTime" = $null + "PrincipalDisplayName" = "Mock-Group" + "PrincipalId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "ResourceId" = "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + "ResourceDisplayName" = "Mock-Group" + "PrincipalType" = "PrincipalType" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Get-EntraBetaGroupAppRoleAssignment" { +Context "Test for Get-EntraBetaGroupAppRoleAssignment" { + It "Should return specific Group AppRole Assignment" { + $result = Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + $result.ResourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should return specific Group AppRole Assignment with alias" { + $result = Get-EntraBetaGroupAppRoleAssignment -objectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + $result.ResourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when ObjectlId is empty" { + { Get-EntraBetaGroupAppRoleAssignment -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when ObjectlId is invalid" { + { Get-EntraBetaGroupAppRoleAssignment -GroupId ""} | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should return All Group AppRole Assignment" { + $result = Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + $result.ResourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 Group AppRole Assignment" { + $result = Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + $result.ResourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Property parameter should work" { + $result = Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.PrincipalDisplayName | Should -Be 'Mock-Group' + + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Result should Contain GroupId" { + $result = Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "c1NLUiFxZk6cP6Nj0RoIyGV2homdrcZNnMeMGgMswmU" + } + It "Should contain GroupId in parameters when passed Id to it" { + $result = Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.GroupId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroupAppRoleAssignment" + $result = Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + + diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 new file mode 100644 index 0000000000..a3211581c4 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -0,0 +1,107 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AlternateNotificationEmails" = "admingroup@contoso.com" + "GroupLifetimeInDays" = 200 + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "ManagedGroupTypes" = "All" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Get-EntraBetaGroupLifecyclePolicy" { + Context "Test for Get-EntraBetaGroupLifecyclePolicy" { + It "Retrieve all groupLifecyclePolicies" { + $result = Get-EntraBetaGroupLifecyclePolicy + $result | Should -Not -BeNullOrEmpty + $result.GroupLifetimeInDays | Should -Be 200 + $result.AlternateNotificationEmails | Should -Be "admingroup@contoso.com" + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ManagedGroupTypes | Should -Be "All" + + Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should execute successfully with Alias" { + $result = Get-EntraBetaGroupLifecyclePolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.GroupLifetimeInDays | Should -Be 200 + } + + It "Retrieve properties of an groupLifecyclePolicy" { + $result = Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.ObjectId | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' + $result.GroupLifetimeInDays | Should -Be 200 + $result.AlternateNotificationEmails | Should -Be "admingroup@contoso.com" + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.ManagedGroupTypes | Should -Be "All" + + Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupLifecyclePolicyId is empty" { + { Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'*" + } + + It "Should fail when GroupLifecyclePolicyId is invalid" { + { Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string." + } + + It "Should contain GroupLifecyclePolicyId in parameters when passed GroupLifecyclePolicyId to it" { + $result = Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result.Parameters + $params.GroupLifecyclePolicyId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Property parameter should work" { + $result = Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + + Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroupLifecyclePolicy" + $result = Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 new file mode 100644 index 0000000000..93d536a23b --- /dev/null +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "@odata.type" = "#microsoft.graph.user" + "Description" = "test" + "AdditionalProperties" = @{ + "DisplayName" = "demo" + } + } + ) + } + + Mock -CommandName Get-MgBetaGroupMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Get-EntraBetaGroupMember" { + Context "Test for Get-EntraBetaGroupMember" { + It "Should return specific group" { + $result = Get-EntraBetaGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when GroupId is invalid" { + { Get-EntraBetaGroupMember -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should fail when GroupId is empty" { + { Get-EntraBetaGroupMember -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when Top is empty" { + { Get-EntraBetaGroupMember -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when Top is invalid" { + { Get-EntraBetaGroupMember -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should return all group" { + $result = Get-EntraBetaGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraBetaGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should return top group" { + $result = @(Get-EntraBetaGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Property parameter should work" { + $result = Get-EntraBetaGroupMember -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -top 1 -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaGroupMember -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroupMember" + $result = Get-EntraBetaGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaGroupMember -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 new file mode 100644 index 0000000000..a716802d8b --- /dev/null +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 @@ -0,0 +1,140 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $mockResponse = { + return @{ + value = @( + @{ + "DeletedDateTime" = $null + "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.user" + "businessPhones" = @("425-555-0100") + "displayName" = "MOD Administrator" + "givenName" = "MOD" + "mail" = "admin@M365x99297270.onmicrosoft.com" + "mobilePhone" = "425-555-0101" + "preferredLanguage" = "en" + "surname" = "Administrator" + "userPrincipalName" = "admin@M365x99297270.onmicrosoft.com" + } + "Parameters" = $args + } + ) + } + } + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Get-EntraBetaGroupOwner" { + Context "Test for Get-EntraBetaGroupOwner" { + It "Get a group owner by Id" { + $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + $result.DeletedDateTime | should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Get a group owner by alias" { + $result = Get-EntraBetaGroupOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + $result.DeletedDateTime | should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupId is empty" { + { Get-EntraBetaGroupOwner -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Get-EntraBetaGroupOwner -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Gets all group owners" { + $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraBetaGroupOwner -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Gets two group owners" { + $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 2 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top XY} | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Result should Contain ObjectId" { + $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.ObjectId | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $groupId= $params | ConvertTo-json | ConvertFrom-Json + $groupId.Uri -match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" | Should -BeTrue + } + + It "Should contain 'User-Agent' header" { + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroupOwner" + + $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroupOwner" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Property parameter should work" { + $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'.*" + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } +} +} + diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 new file mode 100644 index 0000000000..432a118416 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + # Write-Host "Mocking Get-EntraBetaObjectSetting with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + id = "bbbbbbbb-1111-2222-3333-cccccccccccc" + displayName = 'Group.Unified.Guest' + values = @{value=$false; name="AllowToAddGuests"} + templateId = "bbbbbbbb-1111-2222-3333-cccccccccaaa" + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Get-EntraBetaObjectSetting" { + Context "Test for Get-EntraBetaObjectSetting" { + It "Should return specific Object Setting" { + $result = Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when TargetType is empty" { + { Get-EntraBetaObjectSetting -TargetType } | Should -Throw "Missing an argument for parameter 'TargetType'*" + } + It "Should fail when Top is empty" { + { Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should return all Object Setting" { + $result = Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when All has an argument" { + { Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + + It "Should return top Object Setting" { + $result = @(Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 1) + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should contain ID in parameters when passed TargetType TargetObjectId to it" { + $result = Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain property when passed property to it" { + $result = Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName + $result.displayName | Should -Not -BeNullOrEmpty + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaObjectSetting" + $result = Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaObjectSetting" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 new file mode 100644 index 0000000000..4dea78f464 --- /dev/null +++ b/testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 @@ -0,0 +1,103 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "My Test san" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "MailEnabled" = $false + "Description" = "" + "CreatedByAppId" = "bbbbbbbb-1111-2222-3333-cccccccccc56" + "Mail" = "" + "MailNickname" = "NotSet" + "SecurityEnabled" = $true + "Visibility" = "" + "IsAssignableToRole" = "" + "GroupTypes" = @{} + "ProxyAddresses" = @{} + "MembershipRule" = "" + "MembershipRuleProcessingState" = "" + "Parameters" = $args + } + ) + } + Mock -CommandName New-MgBetaGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "New-EntraBetaGroup" { + Context "Test for New-EntraBetaGroup" { + It "Should return created Group" { + $result = New-EntraBetaGroup -DisplayName "My Test san" -MailEnabled $false -SecurityEnabled $true -MailNickName "NotSet" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "My Test san" + $result.Description | should -BeNullOrEmpty + $result.MailEnabled | should -Be $false + $result.MailNickname | should -Be "NotSet" + $result.SecurityEnabled | should -Be $true + $result.IsAssignableToRole | should -BeNullOrEmpty + $result.Visibility | should -BeNullOrEmpty + $result.GroupTypes | should -BeNullOrEmpty + $result.Mail | should -BeNullOrEmpty + $result.MembershipRule | should -BeNullOrEmpty + $result.MembershipRuleProcessingState | should -BeNullOrEmpty + $result.CreatedByAppId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" + $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + + Should -Invoke -CommandName New-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when parameters are empty" { + { New-EntraBetaGroup -DisplayName -Description -MailEnabled -SecurityEnabled -MailNickName -GroupTypes } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when MailEnabled parameters are Invalid" { + { New-EntraBetaGroup -DisplayName "My Test san" -MailEnabled "test" } | Should -Throw "Cannot process argument transformation on parameter*" + } + + It "Should fail when SecurityEnabled parameters are Invalid" { + { New-EntraBetaGroup -DisplayName "My Test san" -MailEnabled $false -SecurityEnabled 'test' } | Should -Throw "Cannot process argument transformation*" + } + + It "Should contain ObjectId in result" { + $result = New-EntraBetaGroup -DisplayName "My Test san" -MailEnabled $false -SecurityEnabled $true -MailNickName "NotSet" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaGroup" + + $result = New-EntraBetaGroup -DisplayName "My Test san" -MailEnabled $false -SecurityEnabled $true -MailNickName "NotSet" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaGroup" + + Should -Invoke -CommandName New-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaGroup -DisplayName "My Test san" -MailEnabled $false -SecurityEnabled $true -MailNickName "NotSet" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..1eb1fabee9 --- /dev/null +++ b/testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "AppRoleId" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "CreatedDateTime" = "06-05-2024 05:42:01" + "DeletedDateTime" = $null + "PrincipalDisplayName" = "Mock-Group" + "PrincipalId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + "ResourceId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" + "ResourceDisplayName" = "Mock-Group" + "PrincipalType" = "PrincipalType" + "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/`$metadata#groups('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb')/appRoleAssignments/`$entity"} + "Parameters" = $args + } + ) + } + + Mock -CommandName New-MgBetaGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "New-EntraBetaGroupAppRoleAssignment" { +Context "Test for New-EntraBetaGroupAppRoleAssignment" { + It "Should return created Group AppRole Assignment" { + $result = New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.ResourceId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should return created Group AppRole Assignment with alias" { + $result = New-EntraBetaGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + $result.ResourceId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" + $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when ObjectlId is empty" { + { New-EntraBetaGroupAppRoleAssignment -GroupId -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when ObjectlId is invalid" { + { New-EntraBetaGroupAppRoleAssignment -GroupId "" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should fail when PrincipalId is empty" { + { New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'PrincipalId'*" + } + It "Should fail when PrincipalId is invalid" { + { New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'PrincipalId' because it is an empty string." + } + It "Should fail when ResourceId is empty" { + { New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'ResourceId'*" + } + It "Should fail when ResourceId is invalid" { + { New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'ResourceId' because it is an empty string." + } + It "Should fail when Id is empty" { + { New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -AppRoleId } | Should -Throw "Missing an argument for parameter 'AppRoleId'*" + } + It "Should fail when Id is invalid" { + { New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -AppRoleId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleId' because it is an empty string." + } + It "Result should Contain GroupId" { + $result = New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" + } + It "Should contain AppRoleId in parameters when passed Id to it" { + $result = New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaGroupAppRoleAssignment" + $result = New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 new file mode 100644 index 0000000000..ff38f42f1b --- /dev/null +++ b/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 @@ -0,0 +1,125 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "templateId" = "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + "@odata.context" = 'https://graph.microsoft.com/beta/$metadata#settings/$entity' + "displayName" = $null + "values" = @{ + "name" = "AllowToAddGuests" + "value" = $False + } + "Parameters" = $args + } + ) + } + $TemplateScriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "Group.Unified.Guest" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "Description" = "Settings for a specific Unified Group" + "Parameters" = $args + "Values" = @( + [PSCustomObject]@{ + "Name" = "AllowToAddGuests" + "Description" = "" + "Type" = "" + "DefaultValue" = $true + } + ) + } + ) + } + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} +Describe "New-EntraBetaObjectSetting" { + Context "Test for New-EntraBetaObjectSetting" { + It "Should return created object setting" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + + $result = New-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -DirectorySetting $settingsCopy + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.templateId | Should -be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when TargetType is empty" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { New-EntraBetaObjectSetting -TargetType -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'TargetType'*" + } + It "Should fail when TargetType is invalid" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { New-EntraBetaObjectSetting -TargetType -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'TargetType'*" + } + It "Should fail when TargetObjectId is empty" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { New-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'TargetObjectId'*" + } + It "Should fail when TargetObjectId is invalid" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { New-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'TargetObjectId'*" + } + It "Should fail when DirectorySetting is empty" { + { New-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DirectorySetting } | Should -Throw "Missing an argument for parameter 'DirectorySetting'*" + } + It "Should fail when DirectorySetting is invalid" { + { New-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DirectorySetting "" } | Should -Throw "Cannot process argument transformation on parameter 'DirectorySetting*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaObjectSetting" + + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + + $result = New-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -DirectorySetting $settingsCopy + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaObjectSetting" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DirectorySetting $settingsCopy -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 new file mode 100644 index 0000000000..bb03351272 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 @@ -0,0 +1,75 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Remove-EntraBetaGroup" { + Context "Test for Remove-EntraBetaGroup" { + It "Should return empty Id" { + $result = Remove-EntraBetaGroup -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Remove-EntraBetaGroup -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupId is empty" { + { Remove-EntraBetaGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Remove-EntraBetaGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Remove-MgBetaGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Remove-EntraBetaGroup -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroup" + + $result = Remove-EntraBetaGroup -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroup" + + Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaGroup -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 new file mode 100644 index 0000000000..dc40d8a70c --- /dev/null +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module .\test\module\Common-Functions.ps1 -Force + + Mock -CommandName Remove-MgBetaGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Remove-EntraBetaGroupAppRoleAssignment" { + Context "Test for Remove-EntraBetaGroupAppRoleAssignment" { + It "Should return empty object" { + $result = Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should return empty object with Alias" { + $result = Remove-EntraBetaGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when GroupId is empty" { + { Remove-EntraBetaGroupAppRoleAssignment -GroupId -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + It "Should fail when GroupId is invalid" { + { Remove-EntraBetaGroupAppRoleAssignment -GroupId "" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + It "Should fail when AppRoleAssignmentId is empty" { + { Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'AppRoleAssignmentId'*" + } + It "Should fail when AppRoleAssignmentId is invalid" { + { Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleAssignmentId' because it is an empty string." + } + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Remove-MgBetaGroupAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupAppRoleAssignment" + Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" + + Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 new file mode 100644 index 0000000000..e27ae5a7c6 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Remove-EntraBetaGroupLifecyclePolicy" { + Context "Test for Remove-EntraBetaGroupLifecyclePolicy" { + It "Should return empty Id" { + $result = Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Remove-EntraBetaGroupLifecyclePolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupLifecyclePolicyId is empty" { + { Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'*" + } + + It "Should fail when GroupLifecyclePolicyId is invalid" { + { Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string." + } + + It "Should contain GroupLifecyclePolicyId in parameters when passed GroupLifecyclePolicyId to it" { + Mock -CommandName Remove-MgBetaGroupLifecyclePolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result + $params.GroupLifecyclePolicyId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupLifecyclePolicy" + $result = Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupLifecyclePolicy" + Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 new file mode 100644 index 0000000000..dfed226769 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaGroupMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Remove-EntraBetaGroupMember" { + Context "Test for Remove-EntraBetaGroupMember" { + It "Should return empty object" { + $result = Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaGroupMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupId is empty" { + { Remove-EntraBetaGroupMember -GroupId -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Remove-EntraBetaGroupMember -GroupId "" -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should fail when MemberId is empty" { + { Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId } | Should -Throw "Missing an argument for parameter 'MemberId'*" + } + + It "Should fail when MemberId is invalid" { + { Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId "" } | Should -Throw "Cannot bind argument to parameter 'MemberId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Remove-MgBetaGroupMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupMember" + $result = Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupMember" + Should -Invoke -CommandName Remove-MgBetaGroupMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 new file mode 100644 index 0000000000..ab54315e40 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Remove-EntraBetaGroupOwner" { + Context "Test for Remove-EntraBetaGroupOwner" { + It "Should return empty object" { + $result = Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupId is empty" { + { Remove-EntraBetaGroupOwner -GroupId -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Remove-EntraBetaGroupOwner -GroupId "" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." + } + + It "Should fail when OwnerId is empty" { + { Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId } | Should -Throw "Missing an argument for parameter 'OwnerId'*" + } + + It "Should fail when OwnerId is invalid" { + { Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId ""} | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string." + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { + Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupOwner" + $result = Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupOwner" + Should -Invoke -CommandName Remove-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 new file mode 100644 index 0000000000..0e8ce0d843 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} +Describe "Remove-EntraBetaObjectSetting" { + Context "Test for Remove-EntraBetaObjectSetting" { + It "Should return empty object" { + $result = Remove-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when TargetType is empty" { + { Remove-EntraBetaObjectSetting -TargetType -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" } | Should -Throw "Missing an argument for parameter 'TargetType'*" + } + It "Should fail when TargetType is invalid" { + { Remove-EntraBetaObjectSetting -TargetType -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" } | Should -Throw "Missing an argument for parameter 'TargetType'*" + } + It "Should fail when TargetObjectId is empty" { + { Remove-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId -Id "dddddddd-7902-4be2-a25b-dddddddddddd" } | Should -Throw "Missing an argument for parameter 'TargetObjectId'*" + } + It "Should fail when TargetObjectId is invalid" { + { Remove-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId -Id "dddddddd-7902-4be2-a25b-dddddddddddd" } | Should -Throw "Missing an argument for parameter 'TargetObjectId'*" + } + It "Should fail when Id is empty" { + { Remove-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Remove-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaAdministrativeUnit" + + Remove-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id "Remove-EntraBetaObjectSetting" + + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaObjectSetting" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 new file mode 100644 index 0000000000..3749a856c4 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 @@ -0,0 +1,96 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Set-EntraBetaGroup" { + Context "Test for Set-EntraBetaGroup" { + It "Should return empty object" { + $result = Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Description "Update Group" -DisplayName "Update My Test san" -MailEnabled $false -MailNickname "Update nickname" -SecurityEnabled $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Set-EntraBetaGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Description "Update Group" -DisplayName "Update My Test san" -MailEnabled $false -MailNickname "Update nickname" -SecurityEnabled $true + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + + It "Should fail when GroupId is empty" { + { Set-EntraBetaGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" + } + + It "Should fail when GroupId is invalid" { + { Set-EntraBetaGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string.*" + } + + It "Should fail when Description is empty" { + { Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Description } | Should -Throw "Missing an argument for parameter 'Description'.*" + } + + It "Should fail when DisplayName is empty" { + { Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'.*" + } + + It "Should fail when MailEnabled is empty" { + { Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -MailEnabled } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when MailEnabled is invalid" { + { Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -MailEnabled ""} | Should -Throw "Cannot process argument transformation on parameter 'MailEnabled'.*" + } + + It "Should fail when MailNickname is empty" { + { Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -MailNickname } | Should -Throw "Missing an argument for parameter*" + } + + It "Should fail when SecurityEnabled is empty" { + { Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -SecurityEnabled } | Should -Throw "Missing an argument for parameter*" + } + + It "Should contain GroupId in parameters when passed GroupId to it" { + Mock -CommandName Update-MgBetaGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + + $result = Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $params = Get-Parameters -data $result + $params.GroupId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaGroup" + $result = Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaGroup" + Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 new file mode 100644 index 0000000000..6db5fdd2bc --- /dev/null +++ b/testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -0,0 +1,88 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + "AlternateNotificationEmails" = "admingroup@contoso.com" + "GroupLifetimeInDays" = "100" + "ManagedGroupTypes" = "All" + "Parameters" = $args + } + ) + } + + Mock -CommandName Update-MgBetaGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups +} + +Describe "Set-EntraBetaGroupLifecyclePolicy" { + Context "Test for Set-EntraBetaGroupLifecyclePolicy" { + It "Should return updated GroupLifecyclePolicy" { + $result = Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + $result.GroupLifetimeInDays | should -Be "100" + $result.ManagedGroupTypes | should -Be "All" + $result.AlternateNotificationEmails | should -Be "admingroup@contoso.com" + + Should -Invoke -CommandName Update-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should execute successfully with Alias" { + $result = Set-EntraBetaGroupLifecyclePolicy -Id "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" + $result | Should -Not -BeNullOrEmpty + } + It "Should fail when GroupLifecyclePolicyId is invalid" { + { Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "" -GroupLifetimeInDays a -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string.*" + } + It "Should fail when GroupLifecyclePolicyId is empty" { + { Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId -GroupLifetimeInDays -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'.*" + } + It "Should fail when GroupLifetimeInDays is invalid" { + { Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays a -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Cannot process argument transformation on parameter 'GroupLifetimeInDays'.*" + } + It "Should fail when GroupLifetimeInDays is empty" { + { Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Missing an argument for parameter 'GroupLifetimeInDays'.*" + } + It "Should fail when ManagedGroupTypes is empty" { + { Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays 99 -ManagedGroupTypes -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Missing an argument for parameter 'ManagedGroupTypes'.*" + } + It "Should fail when AlternateNotificationEmails is empty" { + { Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays 99 -ManagedGroupTypes "Selected" -AlternateNotificationEmails } | Should -Throw "Missing an argument for parameter 'AlternateNotificationEmails'.*" + } + It "Result should Contain ObjectId" { + $result = Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" + $result.ObjectId | should -Be "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaGroupLifecyclePolicy" + $result = Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 new file mode 100644 index 0000000000..15d8134a65 --- /dev/null +++ b/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 @@ -0,0 +1,117 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Groups + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $TemplateScriptblock = { + return @( + [PSCustomObject]@{ + "DisplayName" = "Group.Unified.Guest" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "Description" = "Settings for a specific Unified Group" + "Parameters" = $args + "Values" = @( + [PSCustomObject]@{ + "Name" = "AllowToAddGuests" + "Description" = "" + "Type" = "" + "DefaultValue" = $true + } + ) + } + ) + } + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups +} +Describe "Set-EntraBetaObjectSetting" { + Context "Test for Set-EntraBetaObjectSetting" { + It "Should return empty object" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + + $result = Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectorySetting $settingsCopy + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + } + It "Should fail when TargetType is empty" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { Set-EntraBetaObjectSetting -TargetType -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'TargetType'*" + } + It "Should fail when TargetType is invalid" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { Set-EntraBetaObjectSetting -TargetType -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'TargetType'*" + } + It "Should fail when TargetObjectId is empty" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId -Id "dddddddd-7902-4be2-a25b-dddddddddddd" -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'TargetObjectId'*" + } + It "Should fail when TargetObjectId is invalid" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId -Id "dddddddd-7902-4be2-a25b-dddddddddddd" -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'TargetObjectId'*" + } + It "Should fail when Id is empty" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id -DirectorySetting $settingsCopy } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + { Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "" -DirectorySetting $settingsCopy } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string*" + } + It "Should fail when DirectorySetting is empty" { + { Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectorySetting } | Should -Throw "Missing an argument for parameter 'DirectorySetting'*" + } + It "Should fail when DirectorySetting is invalid" { + { Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectorySetting "" } | Should -Throw "Cannot process argument transformation on parameter 'DirectorySetting*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaObjectSetting" + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + + Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectorySetting $settingsCopy + + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaObjectSetting" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} + $settingsCopy = $template.CreateDirectorySetting() + $settingsCopy["AllowToAddGuests"]=$False + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectorySetting $settingsCopy -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 b/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 new file mode 100644 index 0000000000..62aa826f27 --- /dev/null +++ b/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Reports + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "AppId" = "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + "AppDisplayName" = "Mock Portal" + "AggregatedEventDateTime" = "29-05-2024 00:00:00" + "SignInCount" = "3" + "Status" = @{ + "AdditionalDetails" = $null + "ErrorCode" = "0" + "FailureReason" = $null + "AdditionalProperties" = $null + } + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Reports +} + +Describe "Get-EntraBetaApplicationSignInDetailedSummary" { + Context "Test for Get-EntraBetaApplicationSignInDetailedSummary" { + It "Should return specific application signed in detailed summary by filter" { + $result = Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Mock Portal" + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.AppId | Should -Be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaApplicationSignInDetailedSummary -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return top 1 application signed in detailed summary" { + $result = Get-EntraBetaApplicationSignInDetailedSummary -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaApplicationSignInDetailedSummary -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaApplicationSignInDetailedSummary -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInDetailedSummary" + + $result = Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInDetailedSummary" + + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 b/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 new file mode 100644 index 0000000000..878b717051 --- /dev/null +++ b/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Reports + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + +$scriptblock = { + return @{ + value = @( + @{ + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "AppId" = "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + "AppDisplayName" = "Mock Portal" + "AggregatedEventDateTime" = "29-05-2024 00:00:00" + "SignInCount" = "3" + "isOrganizationDefault" = $false + "createdDateTime" = "16-08-2023 08:25:02" + "Parameters" = $args + } + + ) + + } + + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Reports +} + +Describe "Get-EntraBetaApplicationSignInSummary" { + Context "Test for Get-EntraBetaApplicationSignInSummary" { + It "Should return application sign in summary" { + $result = Get-EntraBetaApplicationSignInSummary -Days "30" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.AppDisplayName | Should -Be "Mock Portal" + $result.AppId | Should -be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + It "Should fail when Days is empty" { + { Get-EntraBetaApplicationSignInSummary -Days } | Should -Throw "Missing an argument for parameter 'Days'*" + } + It "Should return specific application signed in summary by filter" { + $result = Get-EntraBetaApplicationSignInSummary -Days "7" -Filter "AppdisplayName eq 'Mock Portal'" + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Mock Portal" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + It "Should fail when filter is empty" { + { Get-EntraBetaApplicationSignInDetailedSummary -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + It "Should return top 1 application sign in summary" { + $result = Get-EntraBetaApplicationSignInSummary -Days "7" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaApplicationSignInSummary -Days "7" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaApplicationSignInSummary -Days "7" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInSummary" + + $result = Get-EntraBetaApplicationSignInSummary -Days "30" + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaApplicationSignInSummary -Days "30" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 b/testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 new file mode 100644 index 0000000000..2cef546e41 --- /dev/null +++ b/testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 @@ -0,0 +1,147 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Reports + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "InitiatedBy" = [PSCustomObject]@{ + "App" = "" + "User" = "" + "AdditionalProperties" = @{} + } + "TargetResources" = [PSCustomObject]@{ + "DisplayName" = "test" + "GroupType" = "" + "Id" = "00000000-0000-0000-0000-000000000000" + "ModifiedProperties" = @() + "Type" = "N/A" + "UserPrincipalName" = "" + "AdditionalProperties" = @{} + } + "AdditionalDetails" = "" + "ActivityDateTime" = "28-May-24 11:49:02 AM" + "ActivityDisplayName" = "GroupsODataV4_GetgroupLifecyclePolicies" + "Category" = "GroupManagement" + "CorrelationId" = "aaaabbbb-0000-cccc-1111-dddd2222eeee" + "Id" = "bbbbcccc-1111-dddd-2222-eeee3333ffff" + "LoggedByService" = "Self-service Group Management" + "OperationType" = "Update" + "Result" = "success" + "ResultReason" = "OK" + "UserAgent" = "" + "AdditionalProperties" = @{} + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaAuditLogDirectoryAudit -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Reports +} + +Describe "Get-EntraBetaAuditDirectoryLog" { + Context "Test for Get-EntraBetaAuditDirectoryLog" { + It "Should get all logs" { + $result = Get-EntraBetaAuditDirectoryLog -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should fail when All has argument" { + { Get-EntraBetaAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should get first n logs" { + $result = Get-EntraBetaAuditDirectoryLog -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.ActivityDateTime | Should -Be "28-May-24 11:49:02 AM" + $result.ActivityDisplayName | Should -Be "GroupsODataV4_GetgroupLifecyclePolicies" + $result.Category | Should -Be "GroupManagement" + $result.CorrelationId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result.LoggedByService | Should -Be "Self-service Group Management" + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraBetaAuditDirectoryLog -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraBetaAuditDirectoryLog -Top y } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should get audit logs containing a given ActivityDisplayName" { + $result = Get-EntraBetaAuditDirectoryLog -Filter "ActivityDisplayName eq 'GroupsODataV4_GetgroupLifecyclePolicies'" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.ActivityDateTime | Should -Be "28-May-24 11:49:02 AM" + $result.ActivityDisplayName | Should -Be "GroupsODataV4_GetgroupLifecyclePolicies" + $result.Category | Should -Be "GroupManagement" + $result.CorrelationId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result.LoggedByService | Should -Be "Self-service Group Management" + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should fail when Filter is empty" { + { Get-EntraBetaAuditDirectoryLog -Filter -Top 1} | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should get all audit logs with a given result(success)" { + $result = Get-EntraBetaAuditDirectoryLog -Filter "result eq 'success'" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should get all audit logs with a given result(failure)" { + $result = Get-EntraBetaAuditDirectoryLog -Filter "result eq 'failure'" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Property parameter should work" { + $result = Get-EntraBetaAuditDirectoryLog -Property ActivityDisplayName + $result | Should -Not -BeNullOrEmpty + $result.ActivityDisplayName | Should -Be 'GroupsODataV4_GetgroupLifecyclePolicies' + + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaAuditDirectoryLog -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditDirectoryLog" + $result= Get-EntraBetaAuditDirectoryLog + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditDirectoryLog" + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaAuditDirectoryLog -Top 1 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 b/testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 new file mode 100644 index 0000000000..a1d2ae06cf --- /dev/null +++ b/testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 @@ -0,0 +1,341 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Reports + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "RiskEventTypes" = @{} + "MfaDetail" = [PSCustomObject]@{ + "AuthDetail" = "" + "AuthMethod" = "Mobile app notification" + "AdditionalProperties" = @{} + } + "AppliedConditionalAccessPolicies" = @( + [PSCustomObject]@{ + "AuthenticationStrength" = "" + "ConditionsNotSatisfied" = "none" + "ConditionsSatisfied" = "application,users" + "DisplayName" = "Multifactor authentication for Microsoft partners and vendors" + "EnforcedGrantControls" = @() + "EnforcedSessionControls" = @() + "ExcludeRulesSatisfied" = @() + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc88" + "IncludeRulesSatisfied" = @() + "Result" = "failure" + "SessionControlsNotSatisfied" = @() + "AdditionalProperties" = @{} + }, + [PSCustomObject]@{ + "AuthenticationStrength" = "" + "ConditionsNotSatisfied" = "none" + "ConditionsSatisfied" = "none" + "DisplayName" = "Office 365 App Control" + "EnforcedGrantControls" = @() + "EnforcedSessionControls" = @() + "ExcludeRulesSatisfied" = @() + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc99" + "IncludeRulesSatisfied" = @() + "Result" = "notEnabled" + "SessionControlsNotSatisfied" = @() + "AdditionalProperties" = @{} + }, + [PSCustomObject]@{ + "AuthenticationStrength" = "" + "ConditionsNotSatisfied" = "none" + "ConditionsSatisfied" = "none" + "DisplayName" = "testpolicy" + "EnforcedGrantControls" = @() + "EnforcedSessionControls" = @() + "ExcludeRulesSatisfied" = @() + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc12" + "IncludeRulesSatisfied" = @() + "Result" = "notEnabled" + "SessionControlsNotSatisfied" = @() + "AdditionalProperties" = @{} + }, + [PSCustomObject]@{ + "AuthenticationStrength" = "" + "ConditionsNotSatisfied" = "none" + "ConditionsSatisfied" = "none" + "DisplayName" = "test" + "EnforcedGrantControls" = @() + "EnforcedSessionControls" = @() + "ExcludeRulesSatisfied" = @() + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc13" + "IncludeRulesSatisfied" = @() + "Result" = "notEnabled" + "SessionControlsNotSatisfied" = @() + "AdditionalProperties" = @{} + } + ) + "NetworkLocationDetails" = "" + "Location" = [PSCustomObject]@{ + "City" = "Mumbai" + "CountryOrRegion" = "IN" + "GeoCoordinates" = "" + "State" = "Maharashtra" + "AdditionalProperties" = @{} + } + "DeviceDetail" = [PSCustomObject]@{ + "Browser" = "IE 7.0" + "BrowserId" = "" + "DeviceId" = "" + "DisplayName" = "" + "IsCompliant" = $false + "IsManaged" = $false + "OperatingSystem" = "Windows10" + "TrustType" = "" + "AdditionalProperties" = @{} + } + "Status" = [PSCustomObject]@{ + "AdditionalDetails" = "The user didn't complete the MFA prompt. They may have decided not to authenticate, timed out while doing other work, or has an issue with their authentication setup." + "ErrorCode" = 500121 + "FailureReason" = "Authentication failed during strong authentication request." + "AdditionalProperties" = @{} + } + "AuthenticationProcessingDetails" = [PSCustomObject]@{ + "Key" = "Root Key Type" + "Value" = "Unknown" + "AdditionalProperties" = @{} + } + "AppDisplayName" = "Azure Active Directory PowerShell" + "AppId" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "AppTokenProtectionStatus" = "" + "AppliedEventListeners" = @{} + "AuthenticationAppDeviceDetails" = "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAuthenticationAppDeviceDetails" + "AuthenticationAppPolicyEvaluationDetails" = @{} + "AuthenticationContextClassReferences" = @{} + "AuthenticationDetails" = @( + "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAuthenticationDetail", + "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAuthenticationDetail" + ) + "AuthenticationMethodsUsed" = @{} + "AuthenticationProtocol" = "none" + "AuthenticationRequirement" = "multiFactorAuthentication" + "AuthenticationRequirementPolicies" = @( + "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAuthenticationRequirementPolicy" + ) + "AutonomousSystemNumber" = 55836 + "AzureResourceId" = "" + "ClientAppUsed" = "Mobile Apps and Desktop clients" + "ClientCredentialType" = "none" + "ConditionalAccessStatus" = "failure" + "CorrelationId" = "bbbbbbbb-1111-2222-3333-cccccccccc11" + "CreatedDateTime" = "28-May-24 3:59:27 AM" + "CrossTenantAccessType" = "none" + "FederatedCredentialId" = "" + "FlaggedForReview" = $false + "HomeTenantId" = "bbbbbbbb-1111-2222-3333-cccccccccc77" + "HomeTenantName" = "" + "IPAddress" = "2405:201:e009:60ae:e938:fdf9:5aa4:b894" + "IPAddressFromResourceProvider" = "" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc22" + "IncomingTokenType" = "none" + "IsInteractive" = $true + "IsTenantRestricted" = $false + "ManagedServiceIdentity" = "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphManagedIdentity" + "OriginalRequestId" = "" + "OriginalTransferMethod" = "none" + "PrivateLinkDetails" = "Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphPrivateLinkDetails" + "ProcessingTimeInMilliseconds" = 94 + "ResourceDisplayName" = "Windows Azure Active Directory" + "ResourceId" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "ResourceServicePrincipalId" = "bbbbbbbb-1111-2222-3333-cccccccccc66" + "ResourceTenantId" = "bbbbbbbb-1111-2222-3333-cccccccccc77" + "RiskDetail" = "none" + "RiskEventTypesV2" = @{} + "RiskLevelAggregated" = "none" + "RiskLevelDuringSignIn" = "none" + "RiskState" = "none" + "ServicePrincipalCredentialKeyId" = "" + "ServicePrincipalCredentialThumbprint" = "" + "ServicePrincipalId" = "" + "ServicePrincipalName" = "" + "SessionLifetimePolicies" = @{} + "SignInEventTypes" = @("interactiveUser") + "SignInIdentifier" = "" + "SignInIdentifierType" = "" + "SignInTokenProtectionStatus" = "unbound" + "TokenIssuerName" = "" + "TokenIssuerType" = "AzureAD" + "UniqueTokenIdentifier" = "vNB0GVLcq0SFLhthtzWAAA" + "UserAgent" = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; Win64; x64; Trident/7.0; .NET4.0C; .NET4.0E)" + "UserDisplayName" = "MOD Administrator" + "UserId" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "UserPrincipalName" = "test@contoso.com" + "UserType" = "member" + "AdditionalProperties" = [PSCustomObject]@{ + "isThroughGlobalSecureAccess" = $false + "globalSecureAccessIpAddress" = "" + "conditionalAccessAudiences" = @() + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaAuditLogSignIn -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Reports +} + +Describe "Get-EntraBetaAuditSignInLog" { + Context "Test for Get-EntraBetaAuditSignInLog" { + It "Should get all logs" { + $result = Get-EntraBetaAuditSignInLog -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraBetaAuditSignInLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should get first n logs" { + $result = Get-EntraBetaAuditSignInLog -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Azure Active Directory PowerShell" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.CorrelationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc11" + $result.ResourceDisplayName | Should -Be "Windows Azure Active Directory" + $result.ResourceServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc66" + $result.ResourceTenantId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc77" + $result.UserDisplayName | Should -Be "MOD Administrator" + $result.UserPrincipalName | Should -Be "test@contoso.com" + $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraBetaAuditSignInLog -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraBetaAuditSignInLog -Top y } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should get audit sign-in logs containing a given UserDisplayName" { + $result = Get-EntraBetaAuditSignInLog -Filter "UserDisplayName eq 'MOD Administrator'" + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Azure Active Directory PowerShell" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.CorrelationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc11" + $result.ResourceDisplayName | Should -Be "Windows Azure Active Directory" + $result.ResourceServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc66" + $result.ResourceTenantId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc77" + $result.UserDisplayName | Should -Be "MOD Administrator" + $result.UserPrincipalName | Should -Be "test@contoso.com" + $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should get audit sign-in logs containing a given userPrincipalName" { + $result = Get-EntraBetaAuditSignInLog -Filter "startsWith(userPrincipalName,'test@contoso.com')" + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Azure Active Directory PowerShell" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.CorrelationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc11" + $result.ResourceDisplayName | Should -Be "Windows Azure Active Directory" + $result.ResourceServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc66" + $result.ResourceTenantId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc77" + $result.UserDisplayName | Should -Be "MOD Administrator" + $result.UserPrincipalName | Should -Be "test@contoso.com" + $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should get audit sign-in logs containing a given appId" { + $result = Get-EntraBetaAuditSignInLog -Filter "appId eq 'bbbbbbbb-1111-2222-3333-cccccccccc55'" + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Azure Active Directory PowerShell" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.CorrelationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc11" + $result.ResourceDisplayName | Should -Be "Windows Azure Active Directory" + $result.ResourceServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc66" + $result.ResourceTenantId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc77" + $result.UserDisplayName | Should -Be "MOD Administrator" + $result.UserPrincipalName | Should -Be "test@contoso.com" + $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should get audit sign-in logs containing a given appDisplayName" { + $result = Get-EntraBetaAuditSignInLog -Filter "appDisplayName eq 'Azure Active Directory PowerShell'" + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be "Azure Active Directory PowerShell" + $result.AppId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.CorrelationId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc11" + $result.ResourceDisplayName | Should -Be "Windows Azure Active Directory" + $result.ResourceServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc66" + $result.ResourceTenantId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc77" + $result.UserDisplayName | Should -Be "MOD Administrator" + $result.UserPrincipalName | Should -Be "test@contoso.com" + $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should fail when Filter is empty" { + { Get-EntraBetaAuditSignInLog -Filter -Top 1} | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should get all sign-in logs with a given result(success)" { + $result = Get-EntraBetaAuditSignInLog -Filter "result eq 'success'" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should get all sign-in logs with a given result(failure)" { + $result = Get-EntraBetaAuditSignInLog -Filter "result eq 'failure'" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + It "Property parameter should work" { + $result = Get-EntraBetaAuditSignInLog -Property AppDisplayName + $result | Should -Not -BeNullOrEmpty + $result.AppDisplayName | Should -Be 'Azure Active Directory PowerShell' + + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaAuditSignInLog -Property } | Should -Throw "Missing an argument for parameter 'Property'.*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditSignInLog" + $result= Get-EntraBetaAuditSignInLog + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditSignInLog" + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaAuditSignInLog -Top 1 -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..14e4b1b703 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { + Context "Test for Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { + It "Should adds a group to the cloud authentication roll-out policy in Azure AD." { + $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Id is empty" { + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'Id'.*" + } + + It "Should fail when Id is invalid" { + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" + } + + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + + It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + + $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.FeatureRolloutPolicyId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain OdataId in parameters when passed RefObjectId to it" { + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + + $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $value = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params= Get-Parameters -data $result + $params.OdataId | Should -Be $value + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaFeatureRolloutPolicyDirectoryObject" + + Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaFeatureRolloutPolicyDirectoryObject" + Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug} | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + + diff --git a/testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 new file mode 100644 index 0000000000..1a3faca531 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Add-EntraBetaServicePrincipalPolicy" { + Context "Test for Add-EntraBetaServicePrincipalPolicy" { + It "Should return empty object" { + $result = Add-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-7777-8888-9999-cccccccccccc" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when Id is empty" { + { Add-EntraBetaServicePrincipalPolicy -Id -RefObjectId "bbbbbbbb-7777-8888-9999-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Add-EntraBetaServicePrincipalPolicy -Id "" -RefObjectId "bbbbbbbb-7777-8888-9999-cccccccccccc" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when RefObjectId is empty" { + { Add-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'*" + } + It "Should fail when RefObjectId is invalid" { + { Add-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId ""} | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaServicePrincipalPolicy" + + Add-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-7777-8888-9999-cccccccccccc" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaServicePrincipalPolicy" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Add-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-7777-8888-9999-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 new file mode 100644 index 0000000000..4b9b02c251 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -0,0 +1,132 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AppliesTo" = $null + "Description" = "Feature-Rollout-test" + "DisplayName" = "Feature-Rollout-Policytest" + "Feature" = "passwordHashSync" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "IsAppliedToOrganization" = $false + "IsEnabled" = $true + "AdditionalProperties" = @{ + '@odata.context' = "https://graph.microsoft.com/beta/`$metadata#policies/featureRolloutPolicies/`$entity" + } + "Parameters" = $args + } + ) + } + Mock -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Get-EntraBetaFeatureRolloutPolicy" { + Context "Test for Get-EntraBetaFeatureRolloutPolicy" { + It "Should retrieves cloud authentication roll-out in Azure AD with given Id" { + $result = Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "Feature-Rollout-Policytest" + $result.Description | should -Be "Feature-Rollout-test" + $result.IsEnabled | should -Be $true + $result.Feature | should -Be "passwordHashSync" + $result.IsAppliedToOrganization | should -Be $false + $result.AppliesTo | should -BeNullOrEmpty + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Id is empty" { + { Get-EntraBetaFeatureRolloutPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Get-EntraBetaFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should retrieves cloud authentication roll-out in Azure AD with given Filter." { + $displayName = Get-EntraBetaFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policytest'" + $displayName | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Filter is empty" { + { Get-EntraBetaFeatureRolloutPolicy -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Should retrieves cloud authentication roll-out in Azure AD with given Search String." { + $searchString = Get-EntraBetaFeatureRolloutPolicy -SearchString "Feature-Rollout-Policytest" + $searchString | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when SearchString is empty" { + { Get-EntraBetaFeatureRolloutPolicy -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" + } + + It "Result should Contain ObjectId" { + $result = Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain Filter in parameters when SearchString passed to it" { + $result = Get-EntraBetaFeatureRolloutPolicy -SearchString "Feature-Rollout-Policytest" + $params = Get-Parameters -data $result.Parameters + $expectedFilter = "displayName eq 'Feature-Rollout-Policytest' or startswith(displayName,'Feature-Rollout-Policytest')" + $params.Filter | Should -Contain $expectedFilter + } + + It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { + $result = Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $params = Get-Parameters -data $result.Parameters + $params.FeatureRolloutPolicyId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Property parameter should work" { + $result = Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Feature-Rollout-Policytest' + + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaFeatureRolloutPolicy" + $result = Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaFeatureRolloutPolicy" + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 new file mode 100644 index 0000000000..a0e46b3226 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 @@ -0,0 +1,89 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "microsoft-all-application-permissions" + "DeletedDateTime" = "2/8/2024 6:39:16 AM" + "Description" = "Includes all application permissions (app roles), for all APIs, for any client application." + "DisplayName" = "All application" + "Excludes" = @{} + "Includes" = @("00aa00aa-bb11-cc22-dd33-44ee44ee44ee") + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Get-EntraBetaPermissionGrantPolicy" { + Context "Test for Get-EntraBetaPermissionGrantPolicy" { + It "Should return specific PermissionGrantPolicy" { + $result = Get-EntraBetaPermissionGrantPolicy -Id "microsoft-all-application-permissions" + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "microsoft-all-application-permissions" + + Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraBetaPermissionGrantPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Get-EntraBetaPermissionGrantPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'. Specify a parameter of type 'System.String' and try again." + } + It "Result should Contain ObjectId" { + $result = Get-EntraBetaPermissionGrantPolicy -Id "microsoft-all-application-permissions" + $result.ObjectId | should -Be "microsoft-all-application-permissions" + } + It "Should contain PermissionGrantPolicyId in parameters when passed ObjectId to it" { + $result = Get-EntraBetaPermissionGrantPolicy -Id "microsoft-all-application-permissions" + $params = Get-Parameters -data $result.Parameters + $params.PermissionGrantPolicyId | Should -Be "microsoft-all-application-permissions" + } + It "Property parameter should work" { + $result = Get-EntraBetaPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'All application' + + Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPermissionGrantPolicy" + + $result = Get-EntraBetaPermissionGrantPolicy -Id "microsoft-all-application-permissions" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPermissionGrantPolicy" + + Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 new file mode 100644 index 0000000000..fd573cc280 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 @@ -0,0 +1,111 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $ScriptBlock = { + + $policyObject = [PSCustomObject]@{ + "value" = @( + [PSCustomObject]@{ + "id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "displayName" = "Mock Display Name" + "type" = "MockPolicy" + "Keys" = @("id", "displayName", "type") + }, + [PSCustomObject]@{ + "id" = "bbbbbbbb-1111-1111-1111-cccccccccccc" + "displayName" = "Mock Display Name" + "type" = "MockPolicy" + "Keys" = @("id", "displayName", "type") + }, + [PSCustomObject]@{ + "id" = "bbbbbbbb-2222-2222-2222-cccccccccccc" + "displayName" = "Mock Display Name" + "type" = "MockPolicy" + "Keys" = @("id", "displayName", "type") + } + ) + } + + $response = @{ + '@odata.context' = 'https://graph.microsoft.com/v1.0/$metadata#policies' + Value = $policyObject.value + } + + return $response + } + + Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} +Describe "Get-EntraBetaPolicy" { + Context "Test for Get-EntraBetaPolicy" { + It "Should return specific Policy" { + $result = Get-EntraBetaPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should return all Policies" { + $result = Get-EntraBetaPolicy -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should return all Policy" { + $result = Get-EntraBetaPolicy -Top 1 + $result | Should -Not -BeNullOrEmpty + $result | Should -HaveCount 1 + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when Id is invalid" { + { Get-EntraBetaPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when Id is empty" { + { Get-EntraBetaPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Top is empty" { + { Get-EntraBetaPolicy -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaPolicy -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should fail when All has an argument" { + { Get-EntraBetaPolicy -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPolicy" + + $result = Get-EntraBetaPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 new file mode 100644 index 0000000000..01341ac7cb --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + +$scriptblock = { + return @{ + value = @( + @{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "DeletedDateTime" = $null + "@odata.type" = "#microsoft.graph.servicePrincipal" + "keyCredentials" = "System.Collections.Hashtable" + "appId" = "0e2f044c-def9-4f98-8c82-41606d311450" + "servicePrincipalNames" = "Mock service principal" + "displayName" = "Mock policy Object" + "type" = "HomeRealmDiscoveryPolicy" + "preferredSingleSignOnMode" = "password" + "createdDateTime" = "16-08-2023 08:25:02" + "Parameters" = $args + } + ) + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Get-EntraBetaPolicyAppliedObject" { + Context "Test for Get-EntraBetaPolicyAppliedObject" { + It "Should return policy applied object" { + $result = Get-EntraBetaPolicyAppliedObject -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result.displayName | Should -Be "Mock policy Object" + $result.servicePrincipalNames | Should -be "Mock service principal" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraBetaPolicyAppliedObject -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Get-EntraBetaPolicyAppliedObject -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Result should Contain @odata.type" { + $result = Get-EntraBetaPolicyAppliedObject -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result."@odata.type" | should -Be "#microsoft.graph.servicePrincipal" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPolicyAppliedObject" + + $result = Get-EntraBetaPolicyAppliedObject -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPolicyAppliedObject" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaPolicyAppliedObject -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 new file mode 100644 index 0000000000..b1aca81848 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -0,0 +1,84 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + +$scriptblock = { + return @{ + value = @( + @{ + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "DeletedDateTime" = $null + "@odata.type" = "#microsoft.graph.policy" + "keyCredentials" = $null + "alternativeIdentifier" = "value1" + "definition" = @{"activityBasedTimeoutPolicies" = @{ + "AlternateLoginIDLookup"= $true + "IncludedUserIds" = "UserID" + } + } + "displayName" = "Mock policy" + "type" = "activityBasedTimeoutPolicy" + "isOrganizationDefault" = $false + "createdDateTime" = "16-08-2023 08:25:02" + } + ) + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Get-EntraBetaServicePrincipalPolicy" { + Context "Test for Get-EntraBetaServicePrincipalPolicy" { + It "Should return specific service principal policy" { + $result = Get-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.displayName | Should -Be "Mock policy" + $result.ServicePrincipalType | Should -be "activityBasedTimeoutPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when Id is empty" { + { Get-EntraBetaServicePrincipalPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Get-EntraBetaServicePrincipalPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Result should Contain @odata.type" { + $result = Get-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result."@odata.type" | should -Be "#microsoft.graph.policy" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipalPolicy" + + $result = Get-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipalPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 new file mode 100644 index 0000000000..47613d603f --- /dev/null +++ b/testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -0,0 +1,125 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "AppliesTo" = $null + "Description" = "Feature-Rollout-test" + "DisplayName" = "Feature-Rollout-Policytest" + "Feature" = "passwordHashSync" + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccc55" + "IsAppliedToOrganization" = $false + "IsEnabled" = $true + "AdditionalProperties" = @{ + '@odata.context' = 'https://graph.microsoft.com/beta/$metadata#policies/featureRolloutPolicies/$entity' + } + "Parameters" = $args + } + ) + } + Mock -CommandName New-MgBetaPolicyFeatureRolloutPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "New-EntraBetaFeatureRolloutPolicy" { + Context "Test for New-EntraBetaFeatureRolloutPolicy" { + It "Should creates the policy for cloud authentication roll-out in Azure AD." { + $result = New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be "Feature-Rollout-Policytest" + $result.Description | should -Be "Feature-Rollout-test" + $result.IsEnabled | should -Be $true + $result.Feature | should -Be "passwordHashSync" + $result.IsAppliedToOrganization | should -Be $false + $result.AppliesTo | should -BeNullOrEmpty + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + + Should -Invoke -CommandName New-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Feature is empty" { + { New-EntraBetaFeatureRolloutPolicy -Feature -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Missing an argument for parameter 'Feature'*" + } + + It "Should fail when Feature is invalid" { + { New-EntraBetaFeatureRolloutPolicy -Feature "" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Cannot process argument transformation on parameter 'Feature'*" + } + + It "Should fail when DisplayName is empty" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + + It "Should fail when DisplayName is invalid" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." + } + + It "Should fail when IsEnabled is empty" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Missing an argument for parameter 'IsEnabled'*" + } + + It "Should fail when IsEnabled is invalid" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled "" -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Cannot process argument transformation on parameter 'IsEnabled'*" + } + + It "Should fail when IsAppliedToOrganization is empty" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization -Description "Feature-Rollout-test" } | Should -Throw "Missing an argument for parameter 'IsAppliedToOrganization'*" + } + + It "Should fail when IsAppliedToOrganization is invalid" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization "" -Description "Feature-Rollout-test" } | Should -Throw "Cannot process argument transformation on parameter 'IsAppliedToOrganization'*" + } + + It "Should fail when Description is empty" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description } | Should -Throw "Missing an argument for parameter 'Description'*" + } + + It "Should fail when AppliesTo is empty" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" -AppliesTo } | Should -Throw "Missing an argument for parameter 'AppliesTo'*" + } + + It "Should fail when AppliesTo is invalid" { + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" -AppliesTo ""} | Should -Throw "Cannot process argument transformation on parameter 'AppliesTo'*" + } + + It "Result should Contain ObjectId" { + $result = New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" + $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaFeatureRolloutPolicy" + + $result = New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaFeatureRolloutPolicy" + + Should -Invoke -CommandName New-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaFeatureRolloutPolicy -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 b/testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 new file mode 100644 index 0000000000..2dd353b59c --- /dev/null +++ b/testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 @@ -0,0 +1,97 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphOAuth2PermissionGrant]@{ + "ClientId" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "ConsentType" = "AllPrincipals" + "PrincipalId" = $null + "ResourceId" = "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" + "Scope" = "DelegatedPermissionGrant.ReadWrite.All" + "StartTime" = "2023-06-29T03:26:33" + "ExpiryTime" = "2023-06-29T03:26:33" + + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "New-EntraBetaOauth2PermissionGrant" { + Context "Test for New-EntraBetaOauth2PermissionGrant" { + It "Should return created Oauth2PermissionGrant" { + $startTime = Get-Date -Date "2023-06-29T03:26:33" + $expiryTime = Get-Date -Date "2024-06-29T03:26:33" + $result = New-EntraBetaOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" -StartTime $startTime -ExpiryTime $expiryTime + $result | Should -Not -BeNullOrEmpty + $result.ClientId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ConsentType | should -Be "AllPrincipals" + $result.ResourceId | should -Be "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" + $result.Scope | should -Be "DelegatedPermissionGrant.ReadWrite.All" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when ClientId is invalid" { + { New-EntraBetaOauth2PermissionGrant -ClientId "" } | Should -Throw "Cannot bind argument to parameter 'ClientId'*" + } + It "Should fail when ClientId is empty" { + { New-EntraBetaOauth2PermissionGrant -ClientId } | Should -Throw "Missing an argument for parameter 'ClientId'.*" + } + It "Should fail when ConsentType is invalid" { + { New-EntraBetaOauth2PermissionGrant -ConsentType "" } | Should -Throw "Cannot bind argument to parameter 'ConsentType'*" + } + It "Should fail when ConsentType is empty" { + { New-EntraBetaOauth2PermissionGrant -ConsentType } | Should -Throw "Missing an argument for parameter 'ConsentType'.*" + } + It "Should fail when ResourceId is invalid" { + { New-EntraBetaOauth2PermissionGrant -ResourceId "" } | Should -Throw "Cannot bind argument to parameter 'ResourceId'*" + } + It "Should fail when ResourceId is empty" { + { New-EntraBetaOauth2PermissionGrant -ResourceId } | Should -Throw "Missing an argument for parameter 'ResourceId'.*" + } + It "Should fail when StartTime is invalid" { + { New-EntraBetaOauth2PermissionGrant -StartTime "" } | Should -Throw "Cannot process argument transformation on parameter 'StartTime'.*" + } + It "Should fail when StartTime is empty" { + { New-EntraBetaOauth2PermissionGrant -StartTime } | Should -Throw "Missing an argument for parameter 'StartTime'.*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaOauth2PermissionGrant" + $startTime = Get-Date -Date "2023-06-29T03:26:33" + $expiryTime = Get-Date -Date "2024-06-29T03:26:33" + $result= New-EntraBetaOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" -StartTime $startTime -ExpiryTime $expiryTime + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaOauth2PermissionGrant" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + $startTime = Get-Date -Date "2023-06-29T03:26:33" + $expiryTime = Get-Date -Date "2024-06-29T03:26:33" + + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" -StartTime $startTime -ExpiryTime $expiryTime -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 new file mode 100644 index 0000000000..1208509634 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Remove-EntraBetaFeatureRolloutPolicy" { + Context "Test for Remove-EntraBetaFeatureRolloutPolicy" { + It "Should removes the policy for cloud authentication roll-out in Azure AD" { + $result = Remove-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Id is empty" { + { Remove-EntraBetaFeatureRolloutPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Remove-EntraBetaFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + + $result = Remove-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $params = Get-Parameters -data $result + $params.FeatureRolloutPolicyId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicy" + $result = Remove-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicy" + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 new file mode 100644 index 0000000000..c49778f5a5 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -0,0 +1,81 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { + Context "Test for Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { + It "Should removes a group from the cloud authentication roll-out policy from Azure AD" { + $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Id is empty" { + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should fail when ObjectId is empty" { + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" + } + + It "Should fail when ObjectId is invalid" { + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId ""} | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." + } + + It "Should contain DirectoryObjectId in parameters when passed ObjectId to it" { + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + + $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result + $params.DirectoryObjectId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" + } + + It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + + $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $params = Get-Parameters -data $result + $params.FeatureRolloutPolicyId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" + $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 new file mode 100644 index 0000000000..e874bb9f16 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $ScriptBlock = { + $response = @{ + '@odata.context' = 'https://graph.microsoft.com/v1.0/$metadata#policies/homeRealmDiscoveryPolicies/$entity' + } + + return $response + } + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Remove-EntraBetaPolicy" { + Context "Test for Remove-EntraBetaPolicy" { + It "Should remove policy" { + $result = Remove-EntraBetaPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + #$result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Id is empty" { + { Remove-EntraBetaPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Remove-EntraBetaPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaPolicy" + + Remove-EntraBetaPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' -eq $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 new file mode 100644 index 0000000000..dde44ce750 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -0,0 +1,61 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Remove-EntraBetaServicePrincipalPolicy" { + Context "Test for Remove-EntraBetaServicePrincipalPolicy" { + It "Should return empty object" { + $result = Remove-EntraBetaServicePrincipalPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + It "Should fail when Id is empty" { + { Remove-EntraBetaServicePrincipalPolicy -Id -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" } | Should -Throw "Missing an argument for parameter 'Id'*" + } + It "Should fail when Id is invalid" { + { Remove-EntraBetaServicePrincipalPolicy -Id "" -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5"} | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + It "Should fail when PolicyId is empty" { + { Remove-EntraBetaServicePrincipalPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PolicyId } | Should -Throw "Missing an argument for parameter 'PolicyId'*" + } + It "Should fail when PolicyId is invalid" { + { Remove-EntraBetaServicePrincipalPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PolicyId ""} | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string." + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaServicePrincipalPolicy" + + Remove-EntraBetaServicePrincipalPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" + + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaServicePrincipalPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaServicePrincipalPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 new file mode 100644 index 0000000000..1f71e536e8 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaTrustFrameworkPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Remove-EntraBetaTrustFrameworkPolicy" { + Context "Test for Remove-EntraBetaTrustFrameworkPolicy" { + It "Should delete a trust framework policy in the directory" { + $result = Remove-EntraBetaTrustFrameworkPolicy -Id "B2C_1A_TRUSTFRAMEWORKLOCALIZATION" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Remove-MgBetaTrustFrameworkPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Id is empty" { + { Remove-EntraBetaTrustFrameworkPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Remove-EntraBetaTrustFrameworkPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." + } + + It "Should contain TrustFrameworkPolicyId in parameters when passed Id to it" { + Mock -CommandName Remove-MgBetaTrustFrameworkPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + + $result = Remove-EntraBetaTrustFrameworkPolicy -Id "B2C_1A_TRUSTFRAMEWORKLOCALIZATION" + $params = Get-Parameters -data $result + $params.TrustFrameworkPolicyId | Should -Be "B2C_1A_TRUSTFRAMEWORKLOCALIZATION" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaTrustFrameworkPolicy" + $result = Remove-EntraBetaTrustFrameworkPolicy -Id "B2C_1A_TRUSTFRAMEWORKLOCALIZATION" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaTrustFrameworkPolicy" + Should -Invoke -CommandName Remove-MgBetaTrustFrameworkPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaTrustFrameworkPolicy -Id "B2C_1A_TRUSTFRAMEWORKLOCALIZATION" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 new file mode 100644 index 0000000000..0410768c4d --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -0,0 +1,95 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Set-EntraBetaFeatureRolloutPolicy" { + Context "Test for Set-EntraBetaFeatureRolloutPolicy" { + It "Should creates the policy for cloud authentication roll-out in Azure AD." { + $result = Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" + $result | Should -BeNullOrEmpty + + Should -Invoke -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Feature is empty" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Missing an argument for parameter 'Feature'*" + } + + It "Should fail when Feature is invalid" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Cannot process argument transformation on parameter 'Feature'*" + } + + It "Should fail when DisplayName is empty" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + + It "Should fail when IsEnabled is empty" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Missing an argument for parameter 'IsEnabled'*" + } + + It "Should fail when IsEnabled is invalid" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled "" -IsAppliedToOrganization $false -Description "Feature-Rollout-test" } | Should -Throw "Cannot process argument transformation on parameter 'IsEnabled'*" + } + + It "Should fail when IsAppliedToOrganization is empty" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization -Description "Feature-Rollout-test" } | Should -Throw "Missing an argument for parameter 'IsAppliedToOrganization'*" + } + + It "Should fail when IsAppliedToOrganization is invalid" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization "" -Description "Feature-Rollout-test" } | Should -Throw "Cannot process argument transformation on parameter 'IsAppliedToOrganization'*" + } + + It "Should fail when Description is empty" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description } | Should -Throw "Missing an argument for parameter 'Description'*" + } + + It "Should fail when AppliesTo is empty" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" -AppliesTo } | Should -Throw "Missing an argument for parameter 'AppliesTo'*" + } + + It "Should fail when AppliesTo is invalid" { + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" -AppliesTo ""} | Should -Throw "Cannot process argument transformation on parameter 'AppliesTo'*" + } + + It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { + Mock -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + + $result = Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" + $params = Get-Parameters -data $result + $params.FeatureRolloutPolicyId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaFeatureRolloutPolicy" + Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaFeatureRolloutPolicy" + Should -Invoke -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 new file mode 100644 index 0000000000..93b1d3af25 --- /dev/null +++ b/testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 @@ -0,0 +1,101 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.SignIns + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + #Write-Host "Mocking set-EntraPolicy with parameters: $($args | ConvertTo-Json -Depth 3)" + + $response = @{ + '@odata.context' = 'https://graph.microsoft.com/v1.0/$metadata#policies/homeRealmDiscoveryPolicies/$entity' + } + + return $response + } + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns +} + +Describe "Set-EntraBetaPolicy" { + Context "Test for Set-EntraBetaPolicy" { + It "Should return updated Policy" { + Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Definition @('{"homeRealmDiscoveryPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') -DisplayName "new update 13" -IsOrganizationDefault $false + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should fail when Id is empty" { + { Set-EntraBetaPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" + } + + It "Should fail when Id is invalid" { + { Set-EntraBetaPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string.*" + } + + It "Should fail when Definition is empty" { + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Definition } | Should -Throw "Missing an argument for parameter 'Definition'*" + } + + It "Should fail when DisplayName is empty" { + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" + } + + It "Should fail when IsOrganizationDefault is empty" { + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsOrganizationDefault } | Should -Throw "Missing an argument for parameter 'IsOrganizationDefault'*" + } + + It "Should fail when IsOrganizationDefault is invalid" { + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsOrganizationDefault "" } | Should -Throw "Cannot process argument transformation on parameter 'IsOrganizationDefault'*" + } + + It "Should fail when KeyCredentials is empty" { + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -KeyCredentials } | Should -Throw "Missing an argument for parameter 'KeyCredentials'*" + } + + It "Should fail when KeyCredentials is invalid" { + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -KeyCredentials "" } | Should -Throw "Cannot process argument transformation on parameter 'KeyCredentials'*" + } + + It "Should fail when AlternativeIdentifier is empty" { + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -AlternativeIdentifier } | Should -Throw "Missing an argument for parameter 'AlternativeIdentifier'*" + } + + It "Should fail when Type is empty" { + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Type } | Should -Throw "Missing an argument for parameter 'Type'*" + } + + It "Should return updated Policy when passes Type" { + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Type "HomeRealmDiscoveryPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPolicy" + Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPolicy" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + $Headers.'User-Agent' -eq $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Definition @('{"homeRealmDiscoveryPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 new file mode 100644 index 0000000000..2b249b7270 --- /dev/null +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 @@ -0,0 +1,179 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + $valueObject = [PSCustomObject]@{ + "DisplayName" = "Mock-User" + "AccountEnabled" = $true + "Mail" = "User@aaabbbcccc.OnMicrosoft.com" + "userPrincipalName" = "User@aaabbbcccc.OnMicrosoft.com" + "DeletedDateTime" = $null + "CreatedDateTime" = $null + "EmployeeId" = $null + "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" + "Surname" = $null + "MailNickName" = "User" + "OnPremisesDistinguishedName" = $null + "OnPremisesSecurityIdentifier" = $null + "OnPremisesUserPrincipalName" = $null + "OnPremisesSyncEnabled" = $false + "onPremisesImmutableId" = $null + "OnPremisesLastSyncDateTime" = $null + "JobTitle" = $null + "CompanyName" = $null + "Department" = $null + "Country" = $null + "BusinessPhones" = @{} + "OnPremisesProvisioningErrors" = @{} + "ImAddresses" = @{} + "ExternalUserState" = $null + "ExternalUserStateChangeDateTime" = $null + "MobilePhone" = $null + } + + + $response = @{ + '@odata.context' = 'Users()' + Value = $valueObject + } + + return @( + $response + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Get-EntraBetaUser" { + Context "Test for Get-EntraBetaUser" { + It "Should return specific user" { + $result = Get-EntraBetaUser -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + Write-Verbose "Result : {$result}" -Verbose + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUser" + $result = Get-EntraBetaUser -Top 1 + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUser" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should fail when UserId is empty string value" { + { Get-EntraBetaUser -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Get-EntraBetaUser -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should return all contact" { + $result = Get-EntraBetaUser -All + $result | Should -Not -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should fail when All has an argument" { + { Get-EntraBetaUser -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." + } + + It "Should return top user" { + $result = Get-EntraBetaUser -Top 1 + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should fail when top is empty" { + { Get-EntraBetaUser -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + + It "Should fail when top is invalid" { + { Get-EntraBetaUser -Top HH } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + + It "Should return specific user by filter" { + $result = Get-EntraBetaUser -Filter "DisplayName eq 'Mock-User'" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | should -Be 'Mock-User' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should return specific user by search string" { + $result = Get-EntraBetaUser -SearchString "Mock-User" + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-User' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + + } + + It "Should fail when search string is empty" { + { Get-EntraBetaUser -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'.*" + } + + It "Should fail when Missing an argument for parameter Filter" { + { Get-EntraBetaUser -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" + } + + It "Property parameter should work" { + $result = Get-EntraBetaUser -Property DisplayName + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be 'Mock-User' + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaUser -Property } | Should -Throw "Missing an argument for parameter 'Property'.*" + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraBetaUser -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $UserId | Should -Be $null + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaUser -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + It "Should execute successfully with Alias" { + $result = Get-EntraBetaUser -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + Write-Verbose "Result : {$result}" -Verbose + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + } +} + diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 new file mode 100644 index 0000000000..73d53f42b3 --- /dev/null +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 @@ -0,0 +1,82 @@ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @{ + "employeeId" = $null + "createdDateTime" = $null + "onPremisesDistinguishedName" = $null + "identities" = @("testuser@contoso.com") + "Parameters" = $args + } + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users +} +Describe "Get-EntraBetaUserExtension" { + Context "Test for Get-EntraBetaUserExtension" { + It "Should return user extensions" { + $result = Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should execute successfully with Alias" { + $result = Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserExtension" + $result = Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should fail when UserId is empty string value" { + { Get-EntraBetaUserExtension -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Get-EntraBetaUserExtension -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Property parameter should work" { + $result = Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should fail when Property is empty" { + { Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'.*" + } + + It "Should execute successfully without throwing an error " { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { + Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug + } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 new file mode 100644 index 0000000000..49f8c71574 --- /dev/null +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 @@ -0,0 +1,95 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + Id = "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + ServicePlans = @("COMMON_DEFENDER_PLATFORM_FOR_OFFICE", "Bing_Chat_Enterprise", "MESH_IMMERSIVE_FOR_TEAMS", "PURVIEW_DISCOVERY") + SkuId = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + SkuPartNumber = "ENTERPRISEPREMIUM" + AdditionalProperties = @{} + parameters = $args + } + ) + } + + Mock -CommandName Get-MgBetaUserLicenseDetail -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Get-EntraBetaUserLicenseDetail" { + Context "Test for Get-EntraBetaUserLicenseDetail" { + It "Should return specific User License Detail" { + $result = Get-EntraBetaUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + $result.ServicePlans | Should -Be @("COMMON_DEFENDER_PLATFORM_FOR_OFFICE", "Bing_Chat_Enterprise", "MESH_IMMERSIVE_FOR_TEAMS", "PURVIEW_DISCOVERY") + $result.SkuId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" + $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] + + Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should return specific User License Detail alias" { + $result = Get-EntraBetaUserLicenseDetail -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $result | Should -Not -BeNullOrEmpty + $result.Id | should -Be "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u" + $result.ServicePlans | Should -Be @("COMMON_DEFENDER_PLATFORM_FOR_OFFICE", "Bing_Chat_Enterprise", "MESH_IMMERSIVE_FOR_TEAMS", "PURVIEW_DISCOVERY") + $result.SkuId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" + $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] + + Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should fail when UserId is empty string" { + { Get-EntraBetaUserLicenseDetail -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when UserId is empty" { + { Get-EntraBetaUserLicenseDetail -UserId } | Should -Throw "Missing an argument for parameter 'UserId'. Specify a parameter of type 'System.String' and try again." + } + + It "Should fail when invalid parameter is passed" { + { Get-EntraBetaUserLicenseDetail -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraBetaUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserLicenseDetail" + $result = Get-EntraBetaUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserLicenseDetail" + Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 new file mode 100644 index 0000000000..1665170d7d --- /dev/null +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 @@ -0,0 +1,162 @@ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + DeletedDateTime = '' + Id = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + '@odata.context' = 'https://graph.microsoft.com/beta/$metadata#directoryObjects/$entity' + '@odata.type' = '#microsoft.graph.user' + accountEnabled = $true + businessPhones = @('+1 858 555 0109') + city = 'San Diego' + createdDateTime = '2023-07-07T14:18:05Z' + country = 'United States' + department = 'Sales & Marketing' + displayName = 'Miriam Graham' + givenName = 'Miriam' + imAddresses = @('miriamg@contoso.com') + infoCatalogs = @{} + isLicenseReconciliationNeeded = $false + isManagementRestricted = $false + jobTitle = 'Director' + mail = 'MiriamG@contoso.com' + mailNickname = 'MiriamG' + officeLocation = '131/2103' + otherMails = @() + postalCode = '92121' + proxyAddresses = @('SMTP:MiriamG@contoso.com') + refreshTokensValidFromDateTime = '2023-07-12T02:36:51Z' + securityIdentifier = 'S-1-12-1-649798363-1255893902-1277583799-1163042182' + signInSessionsValidFromDateTime = '2023-07-12T02:36:51Z' + state = 'CA' + streetAddress = '9255 Towne Center Dr., Suite 400' + surname = 'Graham' + usageLocation = 'NL' + userPrincipalName = 'MiriamG@contoso.com' + userType = 'Member' + assignedLicenses = @( + @{ + disabledPlans = @() + skuId = '6a0f6da5-0b87-4190-a6ae-9bb5a2b9546a' + } + ) + assignedPlans = @( + @{ + assignedDateTime = '2023-07-07T14:18:07Z' + capabilityStatus = 'Enabled' + service = 'ProcessSimple' + servicePlanId = 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + } + ) + authorizationInfo = @{certificateUserIds = @()} + cloudRealtimeCommunicationInfo = @{isSipEnabled = $true} + deviceKeys = @{} + identities = @( + @{ + signInType = 'userPrincipalName' + issuer = 'contoso.com' + issuerAssignedId = 'MiriamG@contoso.com' + } + ) + onPremisesExtensionAttributes = @{} + onPremisesProvisioningErrors = @{} + onPremisesSipInfo = @{isSipEnabled = $false} + provisionedPlans = @( + @{ + capabilityStatus = 'Enabled' + provisioningStatus = 'Success' + service = 'SharePoint' + } + ) + serviceProvisioningErrors = @{} + AdditionalProperties = @{ + test = 'data' + } + Parameters = $args + } + ) + } + + Mock -CommandName Get-MgBetaUserManager -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Get-EntraBetaUserManager" { + Context "Test for Get-EntraBetaUserManager" { + It "Should return specific user manager" { + $result = Get-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + + $result | Should -Not -BeNullOrEmpty + $result.ageGroup | Should -BeNullOrEmpty + $result.onPremisesLastSyncDateTime | Should -BeNullOrEmpty + $result.creationType | Should -BeNullOrEmpty + $result.imAddresses | Should -Be @("miriamg@contoso.com") + $result.preferredLanguage | Should -BeNullOrEmpty + $result.mail | Should -Be "MiriamG@contoso.com" + $result.securityIdentifier | Should -Be "S-1-12-1-649798363-1255893902-1277583799-1163042182" + $result.identities | Should -HaveCount 1 + $result.identities[0].signInType | Should -Be "userPrincipalName" + $result.identities[0].issuer | Should -Be "contoso.com" + $result.identities[0].issuerAssignedId | Should -Be "MiriamG@contoso.com" + + Should -Invoke -CommandName Get-MgBetaUserManager -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should fail when ObjectId is empty" { + { Get-EntraBetaUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + + It "Should fail when invalid parameter is passed" { + { Get-EntraBetaUserManager -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + + It "Result should Contain ObjectId" { + $result = Get-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result.Id | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain UserId in parameters when passed ObjectId to it" { + $result = Get-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserManager" + + $result = Get-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result.Parameters + + $params.Headers."User-Agent" | Should -Be $userAgentHeaderValue + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserManager" + $result = Get-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserManager" + Should -Invoke -CommandName Get-MgBetaUserManager -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 new file mode 100644 index 0000000000..e0f5a78385 --- /dev/null +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 @@ -0,0 +1,128 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.group" + "displayName" = "Mock-Membership" + "description" = "MockData" + "organizationId" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + "createdByAppId" = "00001111-aaaa-2222-bbbb-3333cccc4444" + "mailEnabled" = $False + "securityEnabled" = $True + "renewedDateTime" = "2023-10-18T07:21:48Z" + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaUserMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Get-EntraBetaUserMembership" { + Context "Test for Get-EntraBetaUserMembership" { + It "Should return specific user membership" { + $result = Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.AdditionalProperties.DisplayName | Should -Be "Mock-Membership" + $result.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.group" + + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should return specific user membership with alias" { + $result = Get-EntraBetaUserMembership -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.AdditionalProperties.DisplayName | Should -Be "Mock-Membership" + $result.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.group" + + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when UserId is empty" { + { Get-EntraBetaUserMembership -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + It "Should fail when UserId is invalid" { + { Get-EntraBetaUserMembership -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should return all user memberships" { + $result = Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 user memberships" { + $result = Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Result should Contain ObjectId" { + $result = Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result.ObjectId | should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + } + It "Should contain UserId in parameters when passed UserId to it" { + + $result = Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Property parameter should work" { + $result = Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' + + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserMembership" + + $result = Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserMembership" + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 new file mode 100644 index 0000000000..05acc2b8c8 --- /dev/null +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 @@ -0,0 +1,122 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.device" + "accountEnabled" = $true + "deviceId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "createdDateTime" = "2024-01-18T08:50:28Z" + "deviceVersion" = "2" + "displayName" = "Mock-App" + "isCompliant" = $false + "isManaged" = $true + "operatingSystem" = "WINDOWS" + "operatingSystemVersion" = "10.0.22621.1700" + "physicalIds" = "[HWID]:h:6825786449406074" + "systemLabels" = @{} + "extensionAttributes" = $null + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaUserOwnedDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Get-EntraBetaUserOwnedDevice" { + Context "Test for Get-EntraBetaUserOwnedDevice" { + It "Should return specific user registered device" { + $result = Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when UserId is empty" { + { Get-EntraBetaUserOwnedDevice -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + It "Should fail when UserId is invalid" { + { Get-EntraBetaUserOwnedDevice -UserId ""} | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should return All user registered devices" { + $result = Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 user registered device" { + $result = Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Property parameter should work" { + $result = Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' + + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserOwnedDevice" + + $result = Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserOwnedDevice" + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + + diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 new file mode 100644 index 0000000000..51e2fea76d --- /dev/null +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 @@ -0,0 +1,121 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + return @( + [PSCustomObject]@{ + "Id" = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + "DeletedDateTime" = $null + "AdditionalProperties" = @{ + "@odata.type" = "#microsoft.graph.device" + "accountEnabled" = $true + "deviceId" = "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + "createdDateTime" = "2024-01-18T08:50:28Z" + "deviceVersion" = "2" + "displayName" = "Mock-App" + "isCompliant" = $false + "isManaged" = $true + "operatingSystem" = "WINDOWS" + "operatingSystemVersion" = "10.0.22621.1700" + "physicalIds" = "[HWID]:h:6825786449406074" + "systemLabels" = @{} + "extensionAttributes" = $null + } + "Parameters" = $args + } + ) + } + + Mock -CommandName Get-MgBetaUserRegisteredDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Get-EntraBetaUserRegisteredDevice" { + Context "Test for Get-EntraBetaUserRegisteredDevice" { + It "Should return specific user registered device" { + $result = Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when UserId is empty" { + { Get-EntraBetaUserRegisteredDevice -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" + } + It "Should fail when UserId is invalid" { + { Get-EntraBetaUserRegisteredDevice -UserId ""} | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should return All user registered devices" { + $result = Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All + $result | Should -Not -BeNullOrEmpty + + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when All is invalid" { + { Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" + } + It "Should return top 1 user registered device" { + $result = Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 1 + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" + $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" + $result.AdditionalProperties.displayName | Should -Be "Mock-App" + + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when Top is empty" { + { Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" + } + It "Should fail when Top is invalid" { + { Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" + } + It "Should contain UserId in parameters when passed UserId to it" { + $result = Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result.Parameters + $params.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" + } + It "Property parameter should work" { + $result = Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property Id + $result | Should -Not -BeNullOrEmpty + $result.Id | Should -Be 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' + + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when Property is empty" { + { Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserRegisteredDevice" + + $result = Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -Not -BeNullOrEmpty + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserRegisteredDevice" + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 b/testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 new file mode 100644 index 0000000000..6800d56b01 --- /dev/null +++ b/testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 @@ -0,0 +1,196 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + $scriptblock = { + + #Write-Host "Mocking New-EntraBetaUser with parameters: $($args | ConvertTo-Json -Depth 3)" + return @( + [PSCustomObject]@{ + DisplayName = "demo004" + Id = "sdjfksd-2343-n21kj" + UserPrincipalName = "demo004@contoso.com" + AccountEnabled = "True" + MailNickname = "demoUser" + AgeGroup = "adult" + Parameters = $args + City = "New York" + ExternalUserStateChangeDateTime = "2024-05-02" + CompanyName = "ABC Inc" + PreferredLanguage = "English" + FacsimileTelephoneNumber = "123456789" + GivenName = "John" + mobilePhone = "987654321" + UsageLocation = "US" + PostalCode = "10001" + CreationType = "Manual" + ConsentProvidedForMinor = "Yes" + onPremisesImmutableId = "1234567890" + Country = "USA" + Department = "IT" + PasswordPolicies = "Default" + JobTitle = "Engineer" + IsCompromised = $false + ExternalUserState = "Active" + UserType = "Member" + OtherMails = @("alternate@email.com") + PhysicalDeliveryOfficeName = "Office A" + State = "NY" + StreetAddress = "123 Main St" + BusinessPhones = "987654321" + Surname = "Doe" + ShowInAddressList = $true + } + ) + } + + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "New-EntraBetaUser" { + Context "Test for New-EntraBetaUser" { + + It "Should return created User" { + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + $result = New-EntraBetaUser ` + -DisplayName "demo004" ` + -PasswordProfile $PasswordProfile ` + -UserPrincipalName "demo004@contoso.com" ` + -AccountEnabled $true ` + -MailNickName "demoUser" ` + -AgeGroup "adult" ` + -City "New York" ` + -UserStateChangedOn "2024-05-02" ` + -CompanyName "ABC Inc" ` + -PreferredLanguage "English" ` + -FacsimileTelephoneNumber "123456789" ` + -GivenName "John" ` + -Mobile "987654321" ` + -UsageLocation "US" ` + -PostalCode "10001" ` + -CreationType "Manual" ` + -ConsentProvidedForMinor "Yes" ` + -ImmutableId "1234567890" ` + -Country "USA" ` + -Department "IT" ` + -PasswordPolicies "Default" ` + -JobTitle "Engineer" ` + -IsCompromised $false ` + -UserState "Active" ` + -UserType "Member" ` + -OtherMails @("alternate@email.com") ` + -PhysicalDeliveryOfficeName "Office A" ` + -State "NY" ` + -StreetAddress "123 Main St" ` + -TelephoneNumber "987654321" ` + -Surname "Doe" ` + -ShowInAddressList $true + + $result | Should -Not -BeNullOrEmpty + $result.DisplayName | Should -Be "demo004" + $result.AccountEnabled | Should -Be $true + $result.UserPrincipalName | Should -Be "demo004@contoso.com" + $result.MailNickName | Should -Be "demoUser" + $result.AgeGroup | Should -Be "adult" + $result.City | Should -Be "New York" + $result.UserStateChangedOn | Should -Be "2024-05-02" + $result.CompanyName | Should -Be "ABC Inc" + $result.PreferredLanguage | Should -Be "English" + $result.FacsimileTelephoneNumber | Should -Be "123456789" + $result.GivenName | Should -Be "John" + $result.Mobile | Should -Be "987654321" + $result.UsageLocation | Should -Be "US" + $result.PostalCode | Should -Be "10001" + $result.CreationType | Should -Be "Manual" + $result.ConsentProvidedForMinor | Should -Be "Yes" + $result.ImmutableId | Should -Be "1234567890" + $result.Country | Should -Be "USA" + + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should fail when parameters are empty" { + { New-EntraBetaUser -DisplayName "" -AgeGroup "" -AccountEnabled -MailNickName "" -UserPrincipalName "" } | Should -Throw "Missing an argument for parameter*" + } + + It "Should contain 'User-Agent' header" { + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaUser" + $result = New-EntraBetaUser -DisplayName "demo002" -PasswordProfile $PasswordProfile -UserPrincipalName "demo001@contoso.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" + $result | Should -Not -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaUser" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should contain MobilePhone in parameters when passed Mobile to it" { + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + $result = New-EntraBetaUser -DisplayName "demo002" -PasswordProfile $PasswordProfile -UserPrincipalName "demo001@contoso.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" -Mobile "1234567890" + $params = Get-Parameters -data $result.Parameters + ($params.Body | ConvertFrom-Json ).MobilePhone | Should -Be "1234567890" + } + + It "Should contain ExternalUserState, OnPremisesImmutableId, ExternalUserStateChangeDateTime, BusinessPhones" { + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + # format like "yyyy-MM-dd HH:mm:ss" + $userStateChangedOn = [System.DateTime]::Parse("2015-12-08 15:15:19") + + + $result = New-EntraBetaUser -DisplayName "demo002" -PasswordProfile $PasswordProfile ` + -UserPrincipalName "demo001@contoso.com" -AccountEnabled $true ` + -MailNickName "demo002NickName" -AgeGroup "adult" ` + -UserState "PendingAcceptance" ` + -UserStateChangedOn $userStateChangedOn ` + -ImmutableId "djkjsajsa-e32j2-2i32" ` + -TelephoneNumber "1234567890" + + $params = Get-Parameters -data $result.Parameters + + $requestBody = $params.Body | ConvertFrom-Json + + $requestBody.BusinessPhones | Should -Be "1234567890" + + $requestBody.ExternalUserState | Should -Be "PendingAcceptance" + + $requestBody.OnPremisesImmutableId | Should -Be "djkjsajsa-e32j2-2i32" + + $requestBody.ExternalUserStateChangeDateTime | Should -Be $userStateChangedOn + } + + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + # Define Password Profile + $PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile + $PasswordProfile.Password = "test@1234" + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { New-EntraBetaUser -DisplayName "demo002" -PasswordProfile $PasswordProfile -UserPrincipalName "demo001@contoso.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" -Mobile "1234567890" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 b/testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 new file mode 100644 index 0000000000..f6883ed06f --- /dev/null +++ b/testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 @@ -0,0 +1,63 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Remove-EntraBetaUser" { + Context "Test for Remove-EntraBetaUser" { + It "Should return empty object" { + $result = Remove-EntraBetaUser -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should execute successfully with Alias" { + $result = Remove-EntraBetaUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when UserId is empty" { + { Remove-EntraBetaUser -UserId "" } | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraBetaUser -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should contain UserId in parameters when passed UserId to it" { + Mock -CommandName Remove-MgBetaUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Users + + $result = Remove-EntraBetaUser -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaUser" + $result = Remove-EntraBetaUser -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaUser" + Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaUser -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 b/testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 new file mode 100644 index 0000000000..41b58bd16d --- /dev/null +++ b/testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 @@ -0,0 +1,63 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Remove-MgBetaUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Remove-EntraBetaUserManager" { + Context "Test for Remove-EntraBetaUserManager" { + It "Should return empty object" { + $result = Remove-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should return empty object with alias" { + $result = Remove-EntraBetaUserManager -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when UserId is empty" { + { Remove-EntraBetaUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter*" + } + It "Should fail when invalid parameter is passed" { + { Remove-EntraBetaUserManager -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should contain UserId in parameters when passed UserId to it" { + Mock -CommandName Remove-MgBetaUserManagerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Users + + $result = Remove-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $params = Get-Parameters -data $result + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaUserManager" + $result = Remove-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaUserManager" + Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Remove-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 b/testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 new file mode 100644 index 0000000000..3a6a259e76 --- /dev/null +++ b/testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 @@ -0,0 +1,63 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Update-MgBetaUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Set-EntraBetaUser"{ + Context "Test for Set-EntraBetaUser" { + It "Should return empty object"{ + $result = Set-EntraBetaUser -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName "Mock-App" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should return empty object with alias"{ + $result = Set-EntraBetaUser -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName "Mock-App" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when ObjectId is empty" { + { Set-EntraBetaUser -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should fail when invalid parameter is passed" { + { Set-EntraBetaUser -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should contain UserId in parameters when passed ObjectId to it" { + Mock -CommandName Update-MgBetaUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Users + + $result = Set-EntraBetaUser -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + $params = Get-Parameters -data $result + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaUser" + $result = Set-EntraBetaUser -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaUser" + Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaUser -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb'-Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 b/testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 new file mode 100644 index 0000000000..589e2a03a8 --- /dev/null +++ b/testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 @@ -0,0 +1,64 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Set-MgBetaUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Set-EntraBetaUserManager"{ + Context "Test for Set-EntraBetaUserManager" { + It "Should return empty object"{ + $result = Set-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should return empty object with alias"{ + $result = Set-EntraBetaUserManager -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when UserId is empty" { + { Set-EntraBetaUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." + } + It "Should fail when invalid parameter is passed" { + { Set-EntraBetaUserManager -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" + } + It "Should contain UserId in parameters when passed UserId to it" { + Mock -CommandName Set-MgBetaUserManagerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Users + + $result = Set-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $params = Get-Parameters -data $result + $params.UserId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaUserManager" + $result = Set-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaUserManager" + Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Set-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + + } +} + diff --git a/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 b/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 new file mode 100644 index 0000000000..066693ce82 --- /dev/null +++ b/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users +} + +Describe "Tests for Update-EntraBetaSignedInUserPassword"{ + Context "Test for Update-EntraBetaSignedInUserPassword" { + It "should updates the password for the signed-in user."{ + $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force + $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force + $result = Update-EntraBetaSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + + It "Should fail when CurrentPassword is null" { + { $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force + $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force + Update-EntraBetaSignedInUserPassword -CurrentPassword -NewPassword $NewPassword} | Should -Throw "Missing an argument for parameter 'CurrentPassword'*" + } + + It "Should fail when CurrentPassword is empty" { + { $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force + $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force + Update-EntraBetaSignedInUserPassword -CurrentPassword "" -NewPassword $NewPassword } | Should -Throw "Cannot process argument transformation on parameter 'CurrentPassword'*" + } + + It "Should fail when NewPassword is null" { + { $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force + $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force + Update-EntraBetaSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword } | Should -Throw "Missing an argument for parameter 'NewPassword'*" + } + + It "Should fail when NewPassword is empty" { + { $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force + $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force + Update-EntraBetaSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword "" } | Should -Throw "Cannot process argument transformation on parameter 'NewPassword'*" + } + + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraBetaSignedInUserPassword" + $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force + $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force + $result = Update-EntraBetaSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword + $result | Should -BeNullOrEmpty + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraBetaSignedInUserPassword" + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + + It "Should execute successfully without throwing an error " { + $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force + $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Update-EntraBetaSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + diff --git a/testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 b/testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 new file mode 100644 index 0000000000..0a15326074 --- /dev/null +++ b/testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 @@ -0,0 +1,72 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +BeforeAll { + if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.Users + } + Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + $scriptblockForAuthenticationMethod = { + return @( + [PSCustomObject]@{ + "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" + } + ) + } + $scriptblockForMgUser= { + return @( + [PSCustomObject]@{ + "Id" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" + } + ) + } + + Mock -CommandName Get-MgBetaUserAuthenticationMethod -MockWith $scriptblockForAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Get-MgBetaUser -MockWith $scriptblockForMgUser -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Reset-MgBetaUserAuthenticationMethodPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users +} + + Describe "Update-EntraBetaUserFromFederated" { + Context "Test for Update-EntraBetaUserFromFederated" { + It "Should sets identity synchronization features for a tenant" { + $result = Update-EntraBetaUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword "Pass1234" + $result | Should -BeNullOrEmpty + Should -Invoke -CommandName Reset-MgBetaUserAuthenticationMethodPassword -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + } + It "Should fail when UserPrincipalName is empty" { + {Update-EntraBetaUserFromFederated -UserPrincipalName } | Should -Throw "Missing an argument for parameter 'UserPrincipalName'. Specify a parameter*" + } + It "Should fail when UserPrincipalName is invalid" { + {Update-EntraBetaUserFromFederated -UserPrincipalName ""} | Should -Throw "Cannot bind argument to parameter 'UserPrincipalName' because it is an empty string*" + } + It "Should fail when NewPassword is empty" { + { Update-EntraBetaUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword } | Should -Throw "Missing an argument for parameter 'NewPassword'. Specify a parameter*" + } + It "Should contain 'User-Agent' header" { + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraBetaUserFromFederated" + + Update-EntraBetaUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword "Pass1234" + + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraBetaUserFromFederated" + + Should -Invoke -CommandName Reset-MgBetaUserAuthenticationMethodPassword -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + $Headers.'User-Agent' | Should -Be $userAgentHeaderValue + $true + } + } + It "Should execute successfully without throwing an error" { + # Disable confirmation prompts + $originalDebugPreference = $DebugPreference + $DebugPreference = 'Continue' + + try { + # Act & Assert: Ensure the function doesn't throw an exception + { Update-EntraBetaUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword "Pass1234" -Debug } | Should -Not -Throw + } finally { + # Restore original confirmation preference + $DebugPreference = $originalDebugPreference + } + } + } +} + From 99699b27b60cfb4dfaf5754b6d9f67cec675653f Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 03:23:23 +0300 Subject: [PATCH 085/124] Changes --- src/EntraModuleBuilder.ps1 | 85 ++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 35 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 9bbca4a300..ff7cccd719 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -194,62 +194,74 @@ Set-StrictMode -Version 5 } } - [void] CreateRootModule([string] $Module){ - $rootModuleName=if($Module -eq 'Entra'){ +# Main function to create the root module +[void] CreateRootModule([string] $Module) { + # Determine the root module name based on the module type + $rootModuleName = if ($Module -eq 'Entra') { 'Microsoft.Graph.Entra.psm1' - }else{ - 'Microsoft.Graph.Enta.Beta.psm1' + } else { + 'Microsoft.Graph.Entra.Beta.psm1' } - $subModuleFiles=$this.GetSubModuleFiles($Module,$this.OutputDirectory) - $subModules=@() - # Prevents the old root module from being added to prevent cyclic dependency - foreach($module in $subModuleFiles){ - if($module -ne $rootModuleName){ - $subModules+=$module - + # Get the list of submodules and exclude the root module + $subModuleFiles = $this.GetSubModuleFiles($Module, $this.OutputDirectory) + $subModules = @() + + # Prevents the old root module from being added to avoid cyclic dependencies + foreach ($module in $subModuleFiles) { + if ($module -ne $rootModuleName) { + $subModules += $module } } + # Build the code snippet using the GetCodeSnippet function + $codeSnippet = $this.GetCodeSnippet($subModules) + + # Combine the header text and the code snippet for the root module + $rootModuleContent = $this.headerText + "`n" + $codeSnippet + + # Define the file paths + $rootModulePath = Join-Path -Path $this.OutputDirectory -ChildPath $rootModuleName + + # Write the root module content (psm1) + $rootModuleContent | Out-File -FilePath $rootModulePath -Encoding utf8 + + Log-Message "[EntraModuleBuilder]: Root Module successfully created" -Level 'SUCCESS' +} - # Start building the code snippet +[string] GetCodeSnippet([Array] $subModules) { $codeSnippet = @" -# Import all sub-modules dynamically +# Set execution policy to ensure scripts can be executed +Set-ExecutionPolicy RemoteSigned -Scope Process -Force + +# Log that the module is being loaded +Write-Host 'Entra.psm1 is being loaded...' +# Import all sub-modules dynamically `$subModules = @( "@ - # Add each sub-module to the code snippet for ($i = 0; $i -lt $subModules.Count; $i++) { $codeSnippet += " '$($subModules[$i])'" if ($i -lt $subModules.Count - 1) { - $codeSnippet += ",`n" # Add a comma except for the last item + $codeSnippet += ",`n" # Add a comma except for the last item } else { $codeSnippet += "`n" # Just a newline for the last item } - } + } - # Close the array and complete the foreach loop + # Close the array and the loop $codeSnippet += @" ) `$moduleBasePath = Split-Path -Parent `$MyInvocation.MyCommand.Definition foreach (`$subModule in `$subModules) { - `$subModulePath=Join-Path `$moduleBasePath -ChildPath `$subModule - Import-Module -Name `$subModulePath -Force -ErrorAction Stop + `$subModulePath = Join-Path `$moduleBasePath -ChildPath `$subModule + Import-Module -Name `$subModulePath -Global } "@ - $rootModuleContent=$this.headerText+"`n"+$codeSnippet - # Define the file paths - - $rootPsm1FilePath = Join-Path -Path $this.OutputDirectory -ChildPath $rootModuleName - - # Write the generated code to both files - - $rootModuleContent | Out-File -FilePath $rootPsm1FilePath -Encoding utf8 - - Log-Message "[EntraModuleBuilder]: Root Module successfully created" -Level 'SUCCESS' - } + return $codeSnippet +} [void] CreateRootModuleManifest([string] $Module) { @@ -282,11 +294,14 @@ foreach (`$subModule in `$subModules) { $manifestPath = Join-Path $this.OutputDirectory -ChildPath "$($moduleName).psd1" $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) + $requiredModules=@() $nestedModules=@() foreach($module in $subModules){ - if($module -ne "$($moduleName).psm1"){ - Log-Message "[EntraModuleBuilder]: Adding $module to Root Module Nested Modules" -Level 'INFO' - $nestedModules += $module + if($module -ne $moduleName){ + Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' + $requiredModules += @{ ModuleName = $module; RequiredVersion = $content.version } + $nestedModules+=$module + } } $moduleSettings = @{ @@ -304,7 +319,7 @@ foreach (`$subModule in `$subModules) { DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) PowerShellVersion = $([System.Version]::Parse('5.1')) CompatiblePSEditions = @('Desktop','Core') - RequiredModules = @() + RequiredModules=@() NestedModules = $nestedModules } @@ -443,7 +458,7 @@ foreach (`$subModule in `$subModules) { Log-Message "[EntraModuleBuilder]: Creating manifest for $moduleName at $manifestPath" try{ New-ModuleManifest @moduleSettings - Update-ModuleManifest -Path $manifestPath -PrivateData $PSData + Update-ModuleManifest -Path $manifestPath -PrivateData $PSData # Log completion for this module Log-Message "[EntraModuleBuilder]: Manifest for $moduleName created successfully" -Level 'SUCCESS' From e473f5a3b1d5711ca130e73f7d7c8fbb10656438 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 03:26:55 +0300 Subject: [PATCH 086/124] Changes --- build/Create-EntraModule.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 8134e81015..07eb62e356 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -10,9 +10,9 @@ param ( $moduleBuilder = [EntraModuleBuilder]::new() if($Module -eq 'Entra'){ - $typeDefsPath=".\V1.0-Typedefs.txt" + $typeDefsPath=".\build\V1.0-Typedefs.txt" }else{ - $typeDefsPath='.\Beta-TypeDefs.txt' + $typeDefsPath='.\build\Beta-TypeDefs.txt' } $moduleBuilder.CreateModuleHelp($Module) From cbd85e70435b5469b59bc5d7b72fa1810e19d303 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 10:55:24 +0300 Subject: [PATCH 087/124] Generate the Root Module .ps1 file (#1192) * psd1 generation update * psd1 generation update * psd1 generation update * psd1 generation update * psd1 generation update * Changes * Changes * Changes * validate manifests * validate manifests --- build/VNext-Build.md | 7 +++++++ src/EntraModuleBuilder.ps1 | 22 +++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/build/VNext-Build.md b/build/VNext-Build.md index 5805864f80..f1b24eecfc 100644 --- a/build/VNext-Build.md +++ b/build/VNext-Build.md @@ -63,6 +63,13 @@ Create-ModuleHelp -Module Entra // or EntraBeta for the preview version ``` +If NO CHANGES have been made to the `.\module`, then proceed and build the vNext Module + +```powershell + .\build\Split-EntraModule.ps1 -Module 'Entra' + +``` + This will ensure that the cmdlet function files are moved to the right sub-module directory under `.\moduleVNext` directory. ### Build vNext module diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index ff7cccd719..615a29abb3 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -331,6 +331,16 @@ foreach (`$subModule in `$subModules) { New-ModuleManifest @moduleSettings Update-ModuleManifest -Path $manifestPath -PrivateData $PSData + + # Validate the module manifest + $manifestValidationResult = Test-ModuleManifest -Path $manifestPath + + # Check if the validation was successful + if ($manifestValidationResult) { + Log-Message "Root Module manifest is valid." -Level 'INFO' + } else { + Log-Message "Root Module manifest is invalid." -Level 'ERROR' + } Log-Message "[EntraModuleBuilder]: Root Module Manifest successfully created" -Level 'INFO' } @@ -458,7 +468,17 @@ foreach (`$subModule in `$subModules) { Log-Message "[EntraModuleBuilder]: Creating manifest for $moduleName at $manifestPath" try{ New-ModuleManifest @moduleSettings - Update-ModuleManifest -Path $manifestPath -PrivateData $PSData + Update-ModuleManifest -Path $manifestPath -PrivateData $PSData + + # Validate the module manifest + $manifestValidationResult = Test-ModuleManifest -Path $manifestPath + + # Check if the validation was successful + if ($manifestValidationResult) { + Log-Message "$manifestFileName Module manifest is valid." -Level 'INFO' + } else { + Log-Message "$manifestFileName Module manifest is invalid." -Level 'ERROR' + } # Log completion for this module Log-Message "[EntraModuleBuilder]: Manifest for $moduleName created successfully" -Level 'SUCCESS' From c8c1d0261149b9847954ff7641814e0f83e7e4e7 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:25:48 +0300 Subject: [PATCH 088/124] resolve New-EntraBetaCustomHeaders --- module/Entra/config/ModuleSettings.json | 1 + module/EntraBeta/config/ModuleSettings.json | 1 + src/EntraModuleSplitter.ps1 | 10 ++++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/module/Entra/config/ModuleSettings.json b/module/Entra/config/ModuleSettings.json index 6863871d5c..b82808b533 100644 --- a/module/Entra/config/ModuleSettings.json +++ b/module/Entra/config/ModuleSettings.json @@ -4,6 +4,7 @@ "newPrefix" : "Entra", "typePrefix" : "Microsoft.Open.", "destinationModuleName" : [ + "Microsoft.Graph", "Microsoft.Graph.DirectoryObjects", "Microsoft.Graph.Users", "Microsoft.Graph.Users.Actions", diff --git a/module/EntraBeta/config/ModuleSettings.json b/module/EntraBeta/config/ModuleSettings.json index 16ef03892a..46572adaf9 100644 --- a/module/EntraBeta/config/ModuleSettings.json +++ b/module/EntraBeta/config/ModuleSettings.json @@ -4,6 +4,7 @@ "newPrefix" : "EntraBeta", "typePrefix" : "Microsoft.Open.", "destinationModuleName" : [ + "Microsoft.Graph.Beta", "Microsoft.Graph.Beta.DirectoryObjects", "Microsoft.Graph.Beta.Users", "Microsoft.Graph.Beta.Users.Actions", diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 197cfe5b46..893bfc772b 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -113,7 +113,7 @@ class EntraModuleSplitter { } # Account for unmapped files - if (-not $isMapped -and $functionName -ne 'New-EntraCustomHeaders') { + if (-not $isMapped -and ($functionName -ne 'New-EntraCustomHeaders' -or $functionName -ne 'New-EntraBetaCustomHeaders')) { $unmappedFilePath = Join-Path -Path $unmappedDirectory -ChildPath "$functionName.ps1" Set-Content -Path $unmappedFilePath -Value $ps1Content Log-Message "[EntraModuleSplitter] Created unmapped function file: $unmappedFilePath in UnMappedFiles" -Level 'ERROR' @@ -165,7 +165,13 @@ class EntraModuleSplitter { $functions = $this.ExtractFunctions($psm1Content) # Get the function contents for both New-EntraCustomHeaders and Get-EntraUnsupportedCommand - $functionNames = @("New-EntraCustomHeaders", "Get-EntraUnsupportedCommand") + + $functionNames =if($moduleName -eq 'Microsoft.Graph.Entra'){ + @("New-EntraCustomHeaders", "Get-EntraUnsupportedCommand") + }else if($moduleName -eq 'Microsoft.Graph.Entra.Beta'){ + @("New-EntraBetaCustomHeaders","Get-EntraBetaUnsupportedCommand") + } + $functionContents = $functions | Where-Object { $functionNames -contains $_.Name } # Initialize a variable to track if the specific function is processed From 4fb5ef01de9ef264cc5e2a2fd8d3fdbecce3fc06 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:09:34 +0300 Subject: [PATCH 089/124] resolve New-EntraBetaCustomHeaders --- .../New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ .../New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ .../New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ .../Governance/New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ .../Groups/New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ .../New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ .../Reports/New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ .../SignIns/New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ .../Users/New-EntraBetaCustomHeaders.ps1 | 28 +++++++++++++++++++ 9 files changed, 252 insertions(+) create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..4e866fdb60 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +} From 5ac6e14388c2e9db9d65da45f539d387cc88b97c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:33:37 +0300 Subject: [PATCH 090/124] resolve New-EntraBetaCustomHeaders and updated splitting --- .../Add-EntraBetaApplicationOwner.ps1 | 64 +-- ...cipalDelegatedPermissionClassification.ps1 | 72 +-- .../Add-EntraBetaServicePrincipalOwner.ps1 | 64 +-- .../Enable-EntraAzureADAliases.ps1 | 116 +++++ ...-EntraBetaApplicationExtensionProperty.ps1 | 44 +- .../Get-EntraBetaDeletedApplication.ps1 | 12 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 56 +- .../Get-EntraBetaServicePrincipal.ps1 | 102 ++-- ...aBetaServicePrincipalAppRoleAssignedTo.ps1 | 68 +-- ...aBetaServicePrincipalAppRoleAssignment.ps1 | 68 +-- ...EntraBetaServicePrincipalCreatedObject.ps1 | 66 +-- ...cipalDelegatedPermissionClassification.ps1 | 78 +-- ...et-EntraBetaServicePrincipalMembership.ps1 | 66 +-- ...aServicePrincipalOAuth2PermissionGrant.ps1 | 66 +-- ...t-EntraBetaServicePrincipalOwnedObject.ps1 | 66 +-- .../Applications/New-EntraBetaApplication.ps1 | 256 ++++----- ...-EntraBetaApplicationExtensionProperty.ps1 | 70 +-- ...BetaApplicationFromApplicationTemplate.ps1 | 4 +- .../New-EntraBetaApplicationKey.ps1 | 72 +-- .../New-EntraBetaApplicationKeyCredential.ps1 | 84 +-- .../New-EntraBetaApplicationPassword.ps1 | 78 +-- .../New-EntraBetaCustomHeaders.ps1 | 11 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 56 +- .../New-EntraBetaServicePrincipal.ps1 | 164 +++--- ...aBetaServicePrincipalAppRoleAssignment.ps1 | 70 +-- .../Remove-EntraBetaApplication.ps1 | 44 +- ...-EntraBetaApplicationExtensionProperty.ps1 | 60 +-- .../Remove-EntraBetaApplicationKey.ps1 | 60 +-- ...move-EntraBetaApplicationKeyCredential.ps1 | 48 +- .../Remove-EntraBetaApplicationOwner.ps1 | 48 +- .../Remove-EntraBetaApplicationPassword.ps1 | 44 +- ...EntraBetaApplicationPasswordCredential.ps1 | 48 +- .../Remove-EntraBetaApplicationPolicy.ps1 | 4 +- ...ntraBetaApplicationProxyConnectorGroup.ps1 | 2 +- ...-EntraBetaApplicationVerifiedPublisher.ps1 | 48 +- .../Remove-EntraBetaDeletedApplication.ps1 | 44 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 56 +- .../Remove-EntraBetaServicePrincipal.ps1 | 44 +- ...aBetaServicePrincipalAppRoleAssignment.ps1 | 60 +-- ...cipalDelegatedPermissionClassification.ps1 | 4 +- .../Remove-EntraBetaServicePrincipalOwner.ps1 | 48 +- ...t-EntraBetaApplicationProxyApplication.ps1 | 2 +- ...-EntraBetaApplicationVerifiedPublisher.ps1 | 56 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 56 +- .../Enable-EntraAzureADAliases.ps1 | 51 ++ .../New-EntraBetaCustomHeaders.ps1 | 11 +- .../Revoke-EntraBetaUserAllRefreshToken.ps1 | 44 +- ...ecurityAttributeDefinitionAllowedValue.ps1 | 60 +-- .../Add-EntraBetaDeviceRegisteredOwner.ps1 | 64 +-- .../Add-EntraBetaDeviceRegisteredUser.ps1 | 64 +-- .../Add-EntraBetaDirectoryRoleMember.ps1 | 64 +-- .../Add-EntraBetaScopedRoleMembership.ps1 | 5 +- .../Enable-EntraAzureADAliases.ps1 | 111 ++++ .../Enable-EntraBetaDirectoryRole.ps1 | 48 +- .../Get-EntraBetaAdministrativeUnit.ps1 | 88 ++-- .../Get-EntraBetaAdministrativeUnitMember.ps1 | 66 +-- .../Get-EntraBetaAttributeSet.ps1 | 48 +- .../Get-EntraBetaContactDirectReport.ps1 | 66 +-- .../Get-EntraBetaContactManager.ps1 | 44 +- .../Get-EntraBetaContactMembership.ps1 | 66 +-- .../Get-EntraBetaContract.ps1 | 88 ++-- ...aBetaCustomSecurityAttributeDefinition.ps1 | 48 +- ...ecurityAttributeDefinitionAllowedValue.ps1 | 74 +-- .../Get-EntraBetaDeletedDirectoryObject.ps1 | 48 +- .../Get-EntraBetaDevice.ps1 | 114 ++-- .../Get-EntraBetaDirectoryRole.ps1 | 60 +-- .../Get-EntraBetaDirectoryRoleTemplate.ps1 | 36 +- .../Get-EntraBetaDirectorySetting.ps1 | 62 +-- ...raBetaDomainServiceConfigurationRecord.ps1 | 50 +- ...t-EntraBetaDomainVerificationDnsRecord.ps1 | 50 +- .../New-EntraBetaAdministrativeUnit.ps1 | 80 +-- .../New-EntraBetaCustomHeaders.ps1 | 11 +- ...aBetaCustomSecurityAttributeDefinition.ps1 | 98 ++-- .../New-EntraBetaDevice.ps1 | 138 ++--- .../New-EntraBetaDirectorySetting.ps1 | 58 +-- .../New-EntraBetaDomain.ps1 | 64 +-- .../Remove-EntraBetaAdministrativeUnit.ps1 | 44 +- ...move-EntraBetaAdministrativeUnitMember.ps1 | 60 +-- .../Remove-EntraBetaContact.ps1 | 44 +- .../Remove-EntraBetaDevice.ps1 | 44 +- .../Remove-EntraBetaDeviceRegisteredOwner.ps1 | 48 +- .../Remove-EntraBetaDeviceRegisteredUser.ps1 | 48 +- .../Remove-EntraBetaDirectoryRoleMember.ps1 | 60 +-- .../Remove-EntraBetaDirectorySetting.ps1 | 48 +- .../Remove-EntraBetaDomain.ps1 | 48 +- .../Remove-EntraBetaScopedRoleMembership.ps1 | 56 +- .../Set-EntraBetaAdministrativeUnit.ps1 | 94 ++-- ...aBetaCustomSecurityAttributeDefinition.ps1 | 60 +-- ...ecurityAttributeDefinitionAllowedValue.ps1 | 64 +-- .../Set-EntraBetaDirectorySetting.ps1 | 66 +-- .../Set-EntraBetaDomain.ps1 | 66 +-- .../Set-EntraBetaTenantDetail.ps1 | 8 +- .../Enable-EntraBetaAzureADAlias.ps1} | 486 +++++++++--------- .../Governance/Enable-EntraAzureADAliases.ps1 | 69 +++ .../Get-EntraBetaDirectoryRoleAssignment.ps1 | 96 ++-- .../Get-EntraBetaPrivilegedResource.ps1 | 84 +-- .../Get-EntraBetaPrivilegedRole.ps1 | 70 +-- ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 84 +-- .../Get-EntraBetaPrivilegedRoleDefinition.ps1 | 90 ++-- .../Get-EntraBetaPrivilegedRoleSetting.ps1 | 12 +- .../Governance/New-EntraBetaCustomHeaders.ps1 | 11 +- .../New-EntraBetaDirectoryRoleAssignment.ps1 | 60 +-- .../New-EntraBetaDirectoryRoleDefinition.ps1 | 100 ++-- .../New-EntraBetaPrivilegedRoleAssignment.ps1 | 82 +-- ...emove-EntraBetaDirectoryRoleAssignment.ps1 | 48 +- ...emove-EntraBetaDirectoryRoleDefinition.ps1 | 48 +- .../Set-EntraBetaDirectoryRoleDefinition.ps1 | 108 ++-- ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 74 +-- .../Set-EntraBetaPrivilegedRoleSetting.ps1 | 142 ++--- .../Groups/Add-EntraBetaGroupMember.ps1 | 60 +-- .../Groups/Add-EntraBetaGroupOwner.ps1 | 64 +-- .../Add-EntraBetaLifecyclePolicyGroup.ps1 | 52 +- .../Groups/Enable-EntraAzureADAliases.ps1 | 78 +++ .../Groups/Get-EntraBetaGroup.ps1 | 102 ++-- .../Get-EntraBetaGroupAppRoleAssignment.ps1 | 66 +-- .../Get-EntraBetaGroupLifecyclePolicy.ps1 | 48 +- .../Get-EntraBetaGroupPermissionGrant.ps1 | 48 +- .../Get-EntraBetaLifecyclePolicyGroup.ps1 | 48 +- .../Groups/Get-EntraBetaObjectSetting.ps1 | 12 +- .../Groups/New-EntraBetaCustomHeaders.ps1 | 11 +- .../Groups/New-EntraBetaGroup.ps1 | 116 ++--- .../New-EntraBetaGroupAppRoleAssignment.ps1 | 74 +-- .../New-EntraBetaGroupLifecyclePolicy.ps1 | 60 +-- .../Groups/New-EntraBetaObjectSetting.ps1 | 4 +- .../Groups/Remove-EntraBetaGroup.ps1 | 44 +- ...Remove-EntraBetaGroupAppRoleAssignment.ps1 | 60 +-- .../Remove-EntraBetaGroupLifecyclePolicy.ps1 | 48 +- .../Groups/Remove-EntraBetaGroupMember.ps1 | 60 +-- .../Groups/Remove-EntraBetaGroupOwner.ps1 | 48 +- .../Remove-EntraBetaLifecyclePolicyGroup.ps1 | 52 +- .../Groups/Reset-EntraBetaLifeCycleGroup.ps1 | 52 +- .../Groups/Set-EntraBetaGroup.ps1 | 110 ++-- .../Set-EntraBetaGroupLifecyclePolicy.ps1 | 66 +-- .../Groups/Set-EntraBetaObjectSetting.ps1 | 6 +- .../Enable-EntraAzureADAliases.ps1 | 47 ++ ...able-EntraBetaGlobalSecureAccessTenant.ps1 | 12 + ...ntraBetaGlobalSecureAccessTenantStatus.ps1 | 12 + .../Get-EntraBetaPrivateAccessApplication.ps1 | 40 ++ ...traBetaPrivateAccessApplicationSegment.ps1 | 8 +- .../New-EntraBetaCustomHeaders.ps1 | 11 +- .../New-EntraBetaPrivateAccessApplication.ps1 | 66 +++ ...traBetaPrivateAccessApplicationSegment.ps1 | 6 +- ...traBetaPrivateAccessApplicationSegment.ps1 | 49 +- .../Reports/Enable-EntraAzureADAliases.ps1 | 53 ++ ...raBetaApplicationSignInDetailedSummary.ps1 | 4 +- .../Get-EntraBetaApplicationSignInSummary.ps1 | 8 +- .../Get-EntraBetaAuditDirectoryLog.ps1 | 6 +- .../Reports/Get-EntraBetaAuditSignInLog.ps1 | 6 +- .../Reports/New-EntraBetaCustomHeaders.ps1 | 11 +- ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 56 +- .../SignIns/Enable-EntraAzureADAliases.ps1 | 94 ++++ .../Get-EntraBetaConditionalAccessPolicy.ps1 | 48 +- .../Get-EntraBetaFeatureRolloutPolicy.ps1 | 74 +-- .../SignIns/Get-EntraBetaIdentityProvider.ps1 | 48 +- .../Get-EntraBetaOAuth2PermissionGrant.ps1 | 52 +- ...t-EntraBetaPermissionGrantConditionSet.ps1 | 6 +- .../Get-EntraBetaPermissionGrantPolicy.ps1 | 48 +- .../SignIns/Get-EntraBetaPolicy.ps1 | 6 +- .../Get-EntraBetaTrustFrameworkPolicy.ps1 | 8 +- .../New-EntraBetaConditionalAccessPolicy.ps1 | 128 ++--- .../SignIns/New-EntraBetaCustomHeaders.ps1 | 11 +- .../New-EntraBetaFeatureRolloutPolicy.ps1 | 78 +-- .../SignIns/New-EntraBetaIdentityProvider.ps1 | 10 +- .../SignIns/New-EntraBetaInvitation.ps1 | 18 +- .../New-EntraBetaNamedLocationPolicy.ps1 | 14 +- ...w-EntraBetaPermissionGrantConditionSet.ps1 | 22 +- .../New-EntraBetaPermissionGrantPolicy.ps1 | 56 +- .../SignIns/New-EntraBetaPolicy.ps1 | 18 +- .../New-EntraBetaTrustFrameworkPolicy.ps1 | 8 +- ...emove-EntraBetaConditionalAccessPolicy.ps1 | 48 +- .../Remove-EntraBetaFeatureRolloutPolicy.ps1 | 48 +- ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 56 +- .../Remove-EntraBetaIdentityProvider.ps1 | 48 +- .../Remove-EntraBetaNamedLocationPolicy.ps1 | 48 +- .../Remove-EntraBetaOAuth2PermissionGrant.ps1 | 44 +- ...e-EntraBetaPermissionGrantConditionSet.ps1 | 6 +- .../Remove-EntraBetaPermissionGrantPolicy.ps1 | 48 +- ...Remove-EntraBetaServicePrincipalPolicy.ps1 | 4 +- .../Remove-EntraBetaTrustFrameworkPolicy.ps1 | 48 +- .../Set-EntraBetaAuthorizationPolicy.ps1 | 104 ++-- .../Set-EntraBetaConditionalAccessPolicy.ps1 | 186 +++---- .../Set-EntraBetaFeatureRolloutPolicy.ps1 | 80 +-- .../Set-EntraBetaNamedLocationPolicy.ps1 | 20 +- ...t-EntraBetaPermissionGrantConditionSet.ps1 | 22 +- .../Set-EntraBetaPermissionGrantPolicy.ps1 | 62 +-- .../SignIns/Set-EntraBetaPolicy.ps1 | 16 +- .../Set-EntraBetaTrustFrameworkPolicy.ps1 | 16 +- .../Users/Enable-EntraAzureADAliases.ps1 | 73 +++ .../Get-EntraBetaUserAppRoleAssignment.ps1 | 66 +-- .../Users/Get-EntraBetaUserLicenseDetail.ps1 | 44 +- .../Users/Get-EntraBetaUserMembership.ps1 | 66 +-- ...Get-EntraBetaUserOAuth2PermissionGrant.ps1 | 66 +-- .../Users/Get-EntraBetaUserThumbnailPhoto.ps1 | 66 +-- .../Users/New-EntraBetaCustomHeaders.ps1 | 11 +- .../Users/New-EntraBetaUser.ps1 | 76 +-- .../New-EntraBetaUserAppRoleAssignment.ps1 | 70 +-- .../Users/Remove-EntraBetaUser.ps1 | 44 +- .../Remove-EntraBetaUserAppRoleAssignment.ps1 | 56 +- .../Users/Remove-EntraBetaUserExtension.ps1 | 64 +-- .../Users/Remove-EntraBetaUserManager.ps1 | 44 +- .../Users/Set-EntraBetaUser.ps1 | 270 +++++----- .../Users/Set-EntraBetaUserExtension.ps1 | 66 +-- .../Users/Set-EntraBetaUserLicense.ps1 | 4 +- .../Users/Set-EntraBetaUserManager.ps1 | 64 +-- .../Users/Set-EntraBetaUserPassword.ps1 | 8 +- .../Users/Set-EntraBetaUserThumbnailPhoto.ps1 | 66 +-- .../Update-EntraBetaSignedInUserPassword.ps1 | 4 +- .../Get-EntraUnsupportedCommand.ps1 | 8 - .../New-EntraBetaCustomHeaders.ps1 | 29 -- src/EntraModuleSplitter.ps1 | 2 +- 210 files changed, 6345 insertions(+), 5507 deletions(-) create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 rename moduleVNext/EntraBeta/{UnMappedFiles/Enable-EntraAzureADAlias.ps1 => Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1} (100%) create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 create mode 100644 moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 delete mode 100644 moduleVNext/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 delete mode 100644 moduleVNext/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 index 8ef822b5ca..c787637f66 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" - $params["OdataId"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 index 820bc1ccff..bcecf7bd5a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -6,86 +6,86 @@ function Add-EntraBetaServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PermissionName, + [System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, + [System.String] $PermissionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PermissionId + [System.String] $PermissionName, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["Classification"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Classification"] = $PSBoundParameters["Classification"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PermissionId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PermissionId"] = $PSBoundParameters["PermissionId"] } if ($null -ne $PSBoundParameters["PermissionName"]) { $params["PermissionName"] = $PSBoundParameters["PermissionName"] } - if ($null -ne $PSBoundParameters["Classification"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Classification"] = $PSBoundParameters["Classification"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PermissionId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PermissionId"] = $PSBoundParameters["PermissionId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 index 7af2f0b7b7..ad02a0a4ca 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId + [System.String] $ServicePrincipalId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..3c0e9ec07e --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Remove-AzureADMSPasswordSingleSignOnCredential -Value Remove-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraBetaApplicationProxyApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationFromApplicationTemplate -Value New-EntraBetaApplicationFromApplicationTemplate -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPolicy -Value Remove-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationSignInDetailedSummary -Value Get-EntraBetaApplicationSignInDetailedSummary -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraBetaApplicationPassword -Scope Global -Force + Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraBetaApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSApplicationTemplate -Value Get-EntraBetaApplicationTemplate -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraBetaApplicationPassword -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPolicy -Value Get-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraBetaApplication -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationPolicy -Value Add-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraBetaApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraBetaServicePrincipalOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Set-AzureADMSPasswordSingleSignOnCredential -Value Set-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSPasswordSingleSignOnCredential -Value Get-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraBetaServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraBetaServicePrincipalOwnedObject -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Remove-EntraBetaApplicationProxyApplication -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraBetaServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADMSPasswordSingleSignOnCredential -Value New-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraBetaGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraBetaApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraBetaApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraBetaServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraBetaApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraBetaApplicationKey -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraBetaApplication -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraBetaDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraBetaApplicationKey -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraBetaApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-EntraBetaServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Remove-EntraBetaServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraBetaServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-EntraBetaServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 index 44126b227c..6cbe82f513 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 @@ -16,25 +16,17 @@ function Get-EntraBetaApplicationExtensionProperty { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { @@ -44,29 +36,37 @@ function Get-EntraBetaApplicationExtensionProperty { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 index 68e7132997..c0e30842c1 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 @@ -6,17 +6,17 @@ function Get-EntraBetaDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, - - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 index 208f685b76..817fda707c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -7,35 +7,29 @@ function Get-EntraBetaPasswordSingleSignOnCredential { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] + $Value = $TmpValue.Id + $params["Id"] = $Value } if ($null -ne $PSBoundParameters["ObjectId"]) { @@ -45,35 +39,41 @@ function Get-EntraBetaPasswordSingleSignOnCredential { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] - $Value = $TmpValue.Id - $params["Id"] = $Value + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 index ebd3afc182..b453aac08e 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 @@ -5,21 +5,21 @@ function Get-EntraBetaServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,36 +28,13 @@ function Get-EntraBetaServicePrincipal { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { @@ -67,44 +44,67 @@ function Get-EntraBetaServicePrincipal { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) + if($null -ne $PSBoundParameters["SearchString"]) { - $params["Top"] = $PSBoundParameters["Top"] + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "publisherName eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue'))" + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($null -ne $PSBoundParameters["SearchString"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $TmpValue = $PSBoundParameters["SearchString"] - $Value = "publisherName eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue'))" - $params["Filter"] = $Value + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 index b8dede26ef..c51c0167be 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaServicePrincipalAppRoleAssignedTo { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaServicePrincipalAppRoleAssignedTo { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaServicePrincipalAppRoleAssignedTo { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { @@ -94,7 +94,7 @@ function Get-EntraBetaServicePrincipalAppRoleAssignedTo { $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - $response = Get-MgBetaServicePrincipalAppRoleAssignment @params -Headers $customHeaders + $response = Get-MgBetaServicePrincipalAppRoleAssignedTo @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 index 5b2133bd31..79f3491c54 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaServicePrincipalAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaServicePrincipalAppRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaServicePrincipalAppRoleAssignment { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { @@ -94,7 +94,7 @@ function Get-EntraBetaServicePrincipalAppRoleAssignment { $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - $response = Get-MgBetaServicePrincipalAppRoleAssignedTo @params -Headers $customHeaders + $response = Get-MgBetaServicePrincipalAppRoleAssignment @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 index 6b161ad403..50e04d165a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaServicePrincipalCreatedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaServicePrincipalCreatedObject { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaServicePrincipalCreatedObject { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 index 8d4f1932c9..a4763c214c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -6,14 +6,14 @@ function Get-EntraBetaServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,70 +22,70 @@ function Get-EntraBetaServicePrincipalDelegatedPermissionClassification { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if($null -ne $PSBoundParameters["Filter"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 index f9a8710f14..c91c9cda05 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaServicePrincipalMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaServicePrincipalMembership { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaServicePrincipalMembership { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 index 994d5c36c5..a1ff33592c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaServicePrincipalOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaServicePrincipalOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaServicePrincipalOAuth2PermissionGrant { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 index 67238251a9..079cd01664 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaServicePrincipalOwnedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaServicePrincipalOwnedObject { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + { + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaServicePrincipalOwnedObject { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 index e619f663fa..ed1da7ad30 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 @@ -7,151 +7,130 @@ function New-EntraBetaApplication { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TokenEncryptionKeyId, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Tags, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.WebApplication] $Web, + [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, + [System.String] $TokenEncryptionKeyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, + [System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, + [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [System.Collections.Generic.List`1[System.String]] $OrgRestrictions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GroupMembershipClaims, + [System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OrgRestrictions, + [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, + [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, + [Microsoft.Open.MSGraph.Model.WebApplication] $Web, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PreAuthorizedApplications"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] } - if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RequiredResourceAccess"] + $Value = $TmpValue | ConvertTo-Json + $params["RequiredResourceAccess"] = $Value } - if($null -ne $PSBoundParameters["PasswordCredentials"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $TmpValue = $PSBoundParameters["PasswordCredentials"] - $a = @() - $input = $TmpValue - foreach($v in $input) - { - $Temp = $v | ConvertTo-Json - $hash = @{} - - (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} - $a += $hash - } - - $Value = $a - $params["PasswordCredentials"] = $Value + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($null -ne $PSBoundParameters["Api"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $TmpValue = $PSBoundParameters["Api"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["Api"] = $Value + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] } - if ($null -ne $PSBoundParameters["Tags"]) + if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { - $params["Tags"] = $PSBoundParameters["Tags"] + $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } - if($null -ne $PSBoundParameters["Web"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $TmpValue = $PSBoundParameters["Web"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["Web"] = $Value + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($null -ne $PSBoundParameters["RequiredResourceAccess"]) + if ($null -ne $PSBoundParameters["AddIns"]) { - $TmpValue = $PSBoundParameters["RequiredResourceAccess"] - $Value = $TmpValue | ConvertTo-Json - $params["RequiredResourceAccess"] = $Value + $params["AddIns"] = $PSBoundParameters["AddIns"] } - if($null -ne $PSBoundParameters["InformationalUrl"]) + if($null -ne $PSBoundParameters["Api"]) { - $TmpValue = $PSBoundParameters["InformationalUrl"] + $TmpValue = $PSBoundParameters["Api"] $Temp = $TmpValue | ConvertTo-Json $Value = $Temp - $params["Info"] = $Value + $params["Api"] = $Value } - if($null -ne $PSBoundParameters["AppRoles"]) + if($null -ne $PSBoundParameters["PasswordCredentials"]) { - $TmpValue = $PSBoundParameters["AppRoles"] + $TmpValue = $PSBoundParameters["PasswordCredentials"] $a = @() $input = $TmpValue foreach($v in $input) @@ -164,35 +143,71 @@ function New-EntraBetaApplication { } $Value = $a - $params["AppRoles"] = $Value + $params["PasswordCredentials"] = $Value } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($null -ne $PSBoundParameters["InformationalUrl"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $TmpValue = $PSBoundParameters["InformationalUrl"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Info"] = $Value } - if($null -ne $PSBoundParameters["ParentalControlSettings"]) + if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) { - $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) + { + $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] + } + if($null -ne $PSBoundParameters["OptionalClaims"]) + { + $TmpValue = $PSBoundParameters["OptionalClaims"] $Temp = $TmpValue | ConvertTo-Json $Value = $Temp - $params["ParentalControlSettings"] = $Value + $params["OptionalClaims"] = $Value } - if ($null -ne $PSBoundParameters["PreAuthorizedApplications"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OrgRestrictions"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Tags"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Tags"] = $PSBoundParameters["Tags"] + } + if ($null -ne $PSBoundParameters["IdentifierUris"]) + { + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + } + if($null -ne $PSBoundParameters["PublicClient"]) + { + $TmpValue = $PSBoundParameters["PublicClient"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["PublicClient"] = $Value + } + if($null -ne $PSBoundParameters["ParentalControlSettings"]) + { + $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["ParentalControlSettings"] = $Value } if($null -ne $PSBoundParameters["KeyCredentials"]) { @@ -216,65 +231,50 @@ function New-EntraBetaApplication { $Value = $a $params["KeyCredentials"] = $Value } - if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) + if ($null -ne $PSBoundParameters["SignInAudience"]) { - $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] + $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } - if($null -ne $PSBoundParameters["PublicClient"]) + if($null -ne $PSBoundParameters["Web"]) { - $TmpValue = $PSBoundParameters["PublicClient"] - $Temp = $TmpValue | ConvertTo-Json + $TmpValue = $PSBoundParameters["Web"] + $Temp = $TmpValue | ConvertTo-Json $Value = $Temp - $params["PublicClient"] = $Value - } - if ($null -ne $PSBoundParameters["OrgRestrictions"]) - { - $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] - } - if ($null -ne $PSBoundParameters["AddIns"]) - { - $params["AddIns"] = $PSBoundParameters["AddIns"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["IdentifierUris"]) - { - $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["SignInAudience"]) - { - $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] + $params["Web"] = $Value } - if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($null -ne $PSBoundParameters["OptionalClaims"]) + if($null -ne $PSBoundParameters["AppRoles"]) { - $TmpValue = $PSBoundParameters["OptionalClaims"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["OptionalClaims"] = $Value + $TmpValue = $PSBoundParameters["AppRoles"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $Temp = $v | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} + $a += $hash + } + + $Value = $a + $params["AppRoles"] = $Value } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 index 1a8515e9b0..5dd1d8b183 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 @@ -5,87 +5,87 @@ function New-EntraBetaApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $TargetObjects, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, + [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Name + [System.Collections.Generic.List`1[System.String]] $TargetObjects ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["DataType"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["DataType"] = $PSBoundParameters["DataType"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["TargetObjects"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["DataType"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["DataType"] = $PSBoundParameters["DataType"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Name"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["TargetObjects"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["Name"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Name"] = $PSBoundParameters["Name"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 index 581b0f7884..3d9ca19308 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 @@ -7,10 +7,10 @@ function New-EntraBetaApplicationFromApplicationTemplate { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Microsoft.Open.MSGraph.Model.ApplicationTemplateDisplayName] $DisplayName, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.ApplicationTemplateDisplayName] $DisplayName + [System.String] $Id ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 index 63943e2a58..9c5cff8a47 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 @@ -6,8 +6,8 @@ function New-EntraBetaApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $Proof, @@ -15,77 +15,77 @@ function New-EntraBetaApplicationKey { [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PasswordCredential"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["Proof"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Proof"] = $PSBoundParameters["Proof"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["KeyCredential"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["Proof"]) { - $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + $params["Proof"] = $PSBoundParameters["Proof"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["KeyCredential"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["PasswordCredential"]) + { + $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 index 0351736632..765653c56a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 @@ -7,22 +7,22 @@ function New-EntraBetaApplicationKeyCredential { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $CustomKeyIdentifier, + [System.Nullable`1[System.DateTime]] $EndDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Value, + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.DateTime]] $StartDate, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, + [System.String] $CustomKeyIdentifier, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, + [System.Nullable`1[System.DateTime]] $StartDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.DateTime]] $EndDate, + [System.String] $Value, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type @@ -32,81 +32,81 @@ function New-EntraBetaApplicationKeyCredential { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["EndDate"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["EndDate"] = $PSBoundParameters["EndDate"] } - if ($null -ne $PSBoundParameters["Value"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Value"] = $PSBoundParameters["Value"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["Usage"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Usage"] = $PSBoundParameters["Usage"] } - if ($null -ne $PSBoundParameters["StartDate"]) + if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { - $params["StartDate"] = $PSBoundParameters["StartDate"] + $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["StartDate"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["StartDate"] = $PSBoundParameters["StartDate"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["Usage"]) + if ($null -ne $PSBoundParameters["Value"]) { - $params["Usage"] = $PSBoundParameters["Usage"] + $params["Value"] = $PSBoundParameters["Value"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["EndDate"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["EndDate"] = $PSBoundParameters["EndDate"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["Type"]) { $params["Type"] = $PSBoundParameters["Type"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 index 5b8c4777a7..89f22c905a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 @@ -6,49 +6,28 @@ function New-EntraBetaApplicationPassword { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if($null -ne $PSBoundParameters["PasswordCredential"]) - { - $TmpValue = $PSBoundParameters["PasswordCredential"] - $hash = @{} - $TmpValue.PSObject.Properties | ForEach-Object { - if ($_.Value) { - $hash[$_.Name] = $_.Value - } - } - - $Value = $hash - $params["PasswordCredential"] = $Value - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ObjectId"]) { @@ -58,29 +37,50 @@ function New-EntraBetaApplicationPassword { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["PasswordCredential"]) + { + $TmpValue = $PSBoundParameters["PasswordCredential"] + $hash = @{} + $TmpValue.PSObject.Properties | ForEach-Object { + if ($_.Value) { + $hash[$_.Name] = $_.Value + } + } + + $Value = $hash + $params["PasswordCredential"] = $Value } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 index e5de19bd52..228fec953b 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -7,31 +7,35 @@ function New-EntraBetaPasswordSingleSignOnCredential { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if($null -ne $PSBoundParameters["PasswordSSOCredential"]) { @@ -39,41 +43,37 @@ function New-EntraBetaPasswordSingleSignOnCredential { $Value = $TmpValue | ConvertTo-Json $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 index 6c019d3ed8..9459bb1b0f 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 @@ -6,74 +6,105 @@ function New-EntraBetaServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ServicePrincipalType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, + [System.Collections.Generic.List`1[System.String]] $AlternativeNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + [System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ErrorUrl, + [System.String] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $ServicePrincipalType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Tags, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $PublisherName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Homepage, + [System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $SamlMetadataUrl, + [System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $AlternativeNames, + [System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, + [System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AccountEnabled, + [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $LogoutUrl, + [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $ReplyUrls, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AppId + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ServicePrincipalType"]) + if ($null -ne $PSBoundParameters["AppId"]) { - $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] + $params["AppId"] = $PSBoundParameters["AppId"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AlternativeNames"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["Homepage"]) + { + $params["Homepage"] = $PSBoundParameters["Homepage"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($null -ne $PSBoundParameters["AccountEnabled"]) + { + $TmpValue = $PSBoundParameters["AccountEnabled"] + $Value = $null + + if (-not [bool]::TryParse($TmpValue, [ref]$Value)) { + throw 'Invalid input for AccountEnabled' + return + } + $params["AccountEnabled"] = $Value + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalType"]) + { + $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { @@ -94,57 +125,41 @@ function New-EntraBetaServicePrincipal { $Value = $a $params["PasswordCredentials"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ErrorUrl"]) - { - $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] - } - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if ($null -ne $PSBoundParameters["Tags"]) - { - $params["Tags"] = $PSBoundParameters["Tags"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } if ($null -ne $PSBoundParameters["PublisherName"]) { $params["PublisherName"] = $PSBoundParameters["PublisherName"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["Homepage"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Homepage"] = $PSBoundParameters["Homepage"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["SamlMetadataUrl"]) + if ($null -ne $PSBoundParameters["Tags"]) { - $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] + $params["Tags"] = $PSBoundParameters["Tags"] } - if ($null -ne $PSBoundParameters["AlternativeNames"]) + if ($null -ne $PSBoundParameters["ErrorUrl"]) { - $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] + $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["LogoutUrl"]) + { + $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { @@ -167,48 +182,33 @@ function New-EntraBetaServicePrincipal { $Value = $a $params["KeyCredentials"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["SamlMetadataUrl"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) { $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($null -ne $PSBoundParameters["AccountEnabled"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["AccountEnabled"] - $Value = $null - - if (-not [bool]::TryParse($TmpValue, [ref]$Value)) { - throw 'Invalid input for AccountEnabled' - return - } - $params["AccountEnabled"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["LogoutUrl"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) { - $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] + $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] } if ($null -ne $PSBoundParameters["ReplyUrls"]) { $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } - if ($null -ne $PSBoundParameters["AppId"]) - { - $params["AppId"] = $PSBoundParameters["AppId"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 index cf6de3dd25..8630dd498a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -6,86 +6,86 @@ function New-EntraBetaServicePrincipalAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["AppRoleId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["AppRoleId"] = $PSBoundParameters["Id"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 index fd5afde7f6..f2b0a968bd 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaApplication { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaApplication { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 index fe1367998f..f6837401e9 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 @@ -5,41 +5,25 @@ function Remove-EntraBetaApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionPropertyId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionPropertyId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ExtensionPropertyId"]) - { - $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { @@ -49,30 +33,46 @@ function Remove-EntraBetaApplicationExtensionProperty { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ExtensionPropertyId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 index 92cb34a504..b43bc4c80e 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 @@ -9,44 +9,32 @@ function Remove-EntraBetaApplicationKey { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $KeyId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Proof, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Proof ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Proof"]) - { - $params["Proof"] = $PSBoundParameters["Proof"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ObjectId"]) { @@ -56,29 +44,41 @@ function Remove-EntraBetaApplicationKey { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["Proof"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Proof"] = $PSBoundParameters["Proof"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 index 5c64834554..fb2a7c3d71 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 @@ -17,29 +17,17 @@ function Remove-EntraBetaApplicationKeyCredential { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { @@ -49,29 +37,41 @@ function Remove-EntraBetaApplicationKeyCredential { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 index 5a205a3ca7..7e63e90af5 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 @@ -17,25 +17,13 @@ function Remove-EntraBetaApplicationOwner { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { @@ -45,33 +33,45 @@ function Remove-EntraBetaApplicationOwner { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 index b0dd5425f1..72798e3f25 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 @@ -17,29 +17,21 @@ function Remove-EntraBetaApplicationPassword { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ObjectId"]) { @@ -49,29 +41,37 @@ function Remove-EntraBetaApplicationPassword { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 index 77cc98c711..b5fdc8dec3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 @@ -17,29 +17,17 @@ function Remove-EntraBetaApplicationPasswordCredential { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["KeyId"]) { $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { @@ -49,29 +37,41 @@ function Remove-EntraBetaApplicationPasswordCredential { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 index c2e089e165..6ac9e1a018 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 @@ -7,10 +7,10 @@ function Remove-EntraBetaApplicationPolicy { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $PolicyId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId + [System.String] $Id ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 index 223beccb35..598da3f558 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 @@ -24,5 +24,5 @@ function Remove-EntraBetaApplicationProxyConnectorGroup { Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri } -}# ------------------------------------------------------------------------------ +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 index 3c8b0c9bf8..52a3b30972 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaApplicationVerifiedPublisher { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["AppObjectId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["AppObjectId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 index 9a1f36c217..2acfb14026 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaDeletedApplication { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ObjectId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaDeletedApplication { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 index 375f7bfa63..4f38aa8316 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -7,35 +7,29 @@ function Remove-EntraBetaPasswordSingleSignOnCredential { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] + $Value = $TmpValue.Id + $params["Id"] = $Value } if ($null -ne $PSBoundParameters["ObjectId"]) { @@ -45,35 +39,41 @@ function Remove-EntraBetaPasswordSingleSignOnCredential { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] - $Value = $TmpValue.Id - $params["Id"] = $Value + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 index ca9c692b00..034eea8e7d 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaServicePrincipal { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaServicePrincipal { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 index d132a0dc79..7c6cf20c58 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -5,38 +5,26 @@ function Remove-EntraBetaServicePrincipalAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AppRoleAssignmentId + [System.String] $AppRoleAssignmentId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] @@ -45,33 +33,45 @@ function Remove-EntraBetaServicePrincipalAppRoleAssignment { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 index a5ae6f0d90..3bdc8d23dc 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -7,10 +7,10 @@ function Remove-EntraBetaServicePrincipalDelegatedPermissionClassification { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId + [System.String] $Id ) PROCESS{ diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 index 1ca53d5f43..6f0a7ebf2e 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 @@ -17,25 +17,13 @@ function Remove-EntraBetaServicePrincipalOwner { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { @@ -45,33 +33,45 @@ function Remove-EntraBetaServicePrincipalOwner { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 index 60ea488a7f..34f7fec157 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 @@ -136,5 +136,5 @@ function Set-EntraBetaApplicationProxyApplication { } $response | Select-Object ObjectId,ExternalAuthenticationType,ApplicationServerTimeout,ExternalUrl,InternalUrl,IsTranslateHostHeaderEnabled,IsTranslateLinksInBodyEnabled,IsOnPremPublishingEnabled,VerifiedCustomDomainCertificatesMetadata,VerifiedCustomDomainKeyCredential,VerifiedCustomDomainPasswordCredential,SingleSignOnSettings,IsHttpOnlyCookieEnabled,IsSecureCookieEnabled,IsPersistentCookieEnabled } -} +}# ------------------------------------------------------------------------------ diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 index 697f5344a7..8b4d8e21b2 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 @@ -7,71 +7,71 @@ function Set-EntraBetaApplicationVerifiedPublisher { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AppObjectId, + [Microsoft.Open.MSGraph.Model.SetVerifiedPublisherRequest] $SetVerifiedPublisherRequest, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.SetVerifiedPublisherRequest] $SetVerifiedPublisherRequest + [System.String] $AppObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["AppObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["AppObjectId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } - if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 index b7991ab66e..b0eac52efe 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -7,31 +7,35 @@ function Set-EntraBetaPasswordSingleSignOnCredential { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if($null -ne $PSBoundParameters["PasswordSSOCredential"]) { @@ -39,41 +43,37 @@ function Set-EntraBetaPasswordSingleSignOnCredential { $Value = $TmpValue | ConvertTo-Json $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..2a28ee0685 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,51 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraBetaSignedInUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraBetaUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Connect-AzureAD -Value Connect-EntraBeta -Scope Global -Force + Set-Alias -Name Disconnect-AzureAD -Value Disconnect-EntraBeta -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 index c92d12398f..5f077a4885 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 @@ -14,25 +14,17 @@ function Revoke-EntraBetaUserAllRefreshToken { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ObjectId"]) { @@ -42,29 +34,37 @@ function Revoke-EntraBetaUserAllRefreshToken { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 index 435493fbd9..affb1b65a5 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -7,10 +7,10 @@ function Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id, + [System.Nullable`1[System.Boolean]] $IsActive, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsActive, + [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $CustomSecurityAttributeDefinitionId @@ -20,29 +20,21 @@ function Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["Id"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { @@ -52,33 +44,41 @@ function Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { { $params["IsActive"] = $PSBoundParameters["IsActive"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 index f43bb31968..18bf2c6a06 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId + [System.String] $DeviceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 index 92c6af02f2..fe5c34c78c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaDeviceRegisteredUser { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId + [System.String] $DeviceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 index 18d61eb65d..ee8080b64f 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DirectoryRoleId + [System.String] $DirectoryRoleId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" - $params["OdataId"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 index befe5f3153..0a0ee20222 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 @@ -10,7 +10,7 @@ function Add-EntraBetaScopedRoleMembership { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $AdministrativeUnitObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.AzureAD.Model.RoleMemberInfo] $RoleMemberInfo, + [Microsoft.Open.MSGraph.Model.MsRoleMemberInfo] $RoleMemberInfo, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $AdministrativeUnitId @@ -18,7 +18,6 @@ function Add-EntraBetaScopedRoleMembership { PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] @@ -71,7 +70,7 @@ function Add-EntraBetaScopedRoleMembership { { $TmpValue = $PSBoundParameters["RoleMemberInfo"] $Value = @{ - id = ($TmpValue).ObjectId + id = ($TmpValue).Id } | ConvertTo-Json $params["RoleMemberInfo"] = $Value } diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..e2ad75f306 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,111 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinition -Value Set-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADAdministrativeUnit -Value Remove-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraBetaContactDirectReport -Scope Global -Force + Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Get-AzureADAdministrativeUnitMember -Value Get-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADContract -Value Get-EntraBetaContract -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraBetaContact -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraBetaContactManager -Scope Global -Force + Set-Alias -Name Add-AzureADAdministrativeUnitMember -Value Add-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name New-AzureADDevice -Value New-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Get-AzureADMSAttributeSet -Value Get-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraBetaDomainVerificationDnsRecord -Scope Global -Force + Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinition -Value Get-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADScopedRoleMembership -Value Get-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDirectorySetting -Value Get-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Add-AzureADMScustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectorySetting -Value Remove-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSAttributeSet -Value Set-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnitMember -Value New-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraBetaContact -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Add-AzureADScopedRoleMembership -Value Add-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name New-AzureADMSAttributeSet -Value New-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Get-AzureADDirectorySettingTemplate -Value Get-EntraBetaDirectorySettingTemplate -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraBetaTenantDetail -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraBetaTenantDetail -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSCustomSecurityAttributeDefinition -Value New-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraBetaDomain -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Remove-AzureADScopedRoleMembership -Value Remove-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADAdministrativeUnitMember -Value Remove-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraBetaSubscribedSku -Scope Global -Force + Set-Alias -Name Set-AzureADDirectorySetting -Value Set-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraBetaDomainNameReference -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraBetaDirectoryRoleTemplate -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name New-AzureADDirectorySetting -Value New-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraBetaContactMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraBetaDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Set-AzureADDevice -Value Set-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraBetaDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Get-AzureADAdministrativeUnit -Value Get-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-EntraBetaRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraBetaRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 index fedbcdb2a8..2bdc3515a3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 @@ -14,21 +14,17 @@ function Enable-EntraBetaDirectoryRole { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { @@ -38,34 +34,38 @@ function Enable-EntraBetaDirectoryRole { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["RoleTemplateId"]) { $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 index f84eac1292..06179ca326 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 @@ -5,18 +5,18 @@ function Get-EntraBetaAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $AdministrativeUnitId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, + [System.String] $Filter, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -25,36 +25,13 @@ function Get-EntraBetaAdministrativeUnit { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"} - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { @@ -64,17 +41,9 @@ function Get-EntraBetaAdministrativeUnit { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -85,18 +54,49 @@ function Get-EntraBetaAdministrativeUnit { $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Verbose")) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 index 277db8f9cf..5ec4f62b23 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $AdministrativeUnitId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaAdministrativeUnitMember { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaAdministrativeUnitMember { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) - { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 index b25551944b..f7dd8f845f 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaAttributeSet { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["AttributeSetId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["AttributeSetId"] = $PSBoundParameters["AttributeSetId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["AttributeSetId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["AttributeSetId"] = $PSBoundParameters["AttributeSetId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 index 38e11067c3..d21c5bd415 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaContactDirectReport { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $OrgContactId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaContactDirectReport { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaContactDirectReport { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) - { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 index 54906e95a5..8db726755c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 @@ -16,25 +16,17 @@ function Get-EntraBetaContactManager { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["OrgContactId"]) { @@ -44,29 +36,37 @@ function Get-EntraBetaContactManager { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 index b2d9b0e8f8..02afb8ca85 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaContactMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $OrgContactId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaContactMembership { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["OrgContactId"]) + { + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaContactMembership { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) - { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 index e914b7e814..72d417cac5 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 @@ -5,18 +5,18 @@ function Get-EntraBetaContract { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ContractId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, + [System.String] $Filter, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -25,36 +25,13 @@ function Get-EntraBetaContract { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ContractId"]) { @@ -64,17 +41,9 @@ function Get-EntraBetaContract { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -85,18 +54,49 @@ function Get-EntraBetaContract { $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Verbose")) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 index 6595dcf58d..f4371c10d3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaCustomSecurityAttributeDefinition { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 index ed8fa8897f..7480b958a6 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -6,14 +6,14 @@ function Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $CustomSecurityAttributeDefinitionId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomSecurityAttributeDefinitionId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,70 +22,70 @@ function Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{} - if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["AllowedValueId"] = $PSBoundParameters["Id"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["AllowedValueId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 index bd547328eb..2823970182 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaDeletedDirectoryObject { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["DirectoryObjectId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["DirectoryObjectId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 index 6342f9684f..9cc9bc11a3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 @@ -5,21 +5,21 @@ function Get-EntraBetaDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $DeviceId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,36 +28,13 @@ function Get-EntraBetaDevice { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["DeviceId"]) { @@ -67,44 +44,67 @@ function Get-EntraBetaDevice { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) + if($null -ne $PSBoundParameters["SearchString"]) { - $params["Top"] = $PSBoundParameters["Top"] + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($null -ne $PSBoundParameters["SearchString"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $TmpValue = $PSBoundParameters["SearchString"] - $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" - $params["Filter"] = $Value + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { @@ -118,16 +118,16 @@ function Get-EntraBetaDevice { $response = Get-MgBetaDevice @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceTrustType -Value TrustType - Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceObjectVersion -Value DeviceVersion - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem - Add-Member -InputObject $_ -MemberType AliasProperty -Name DevicePhysicalIds -Value PhysicalIds Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSVersion -Value OperatingSystemVersion + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceObjectVersion -Value DeviceVersion Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name ComplianceExpiryTime -Value ComplianceExpirationDateTime - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSVersion -Value OperatingSystemVersion + Add-Member -InputObject $_ -MemberType AliasProperty -Name DevicePhysicalIds -Value PhysicalIds + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 index c14e11ede5..accfb57c10 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 @@ -19,26 +19,10 @@ function Get-EntraBetaDirectoryRole { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] @@ -47,17 +31,9 @@ function Get-EntraBetaDirectoryRole { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -68,18 +44,42 @@ function Get-EntraBetaDirectoryRole { $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 index 61a3593bdf..e576835759 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 @@ -13,25 +13,29 @@ function Get-EntraBetaDirectoryRoleTemplate { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { @@ -41,25 +45,21 @@ function Get-EntraBetaDirectoryRoleTemplate { { $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 index d15ec6dce6..34a472a8c3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 @@ -6,12 +6,12 @@ function Get-EntraBetaDirectorySetting { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,17 +22,21 @@ function Get-EntraBetaDirectorySetting { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["DirectorySettingId"] = $PSBoundParameters["Id"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -41,49 +45,45 @@ function Get-EntraBetaDirectorySetting { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DirectorySettingId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 index 8bb2a23f99..62dbab0370 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaDomainServiceConfigurationRecord { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DomainId"] = $PSBoundParameters["Name"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { @@ -80,8 +80,8 @@ function Get-EntraBetaDomainServiceConfigurationRecord { $response = Get-MgBetaDomainServiceConfigurationRecord @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 index 2541b23f3c..b1753054dc 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaDomainVerificationDnsRecord { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DomainId"] = $PSBoundParameters["Name"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { @@ -80,8 +80,8 @@ function Get-EntraBetaDomainVerificationDnsRecord { $response = Get-MgBetaDomainVerificationDnsRecord @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties + Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 index e8f06f9bc7..a00b2eedd4 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 @@ -7,10 +7,7 @@ function New-EntraBetaAdministrativeUnit { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRule, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipType, + [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DisplayName, @@ -19,87 +16,90 @@ function New-EntraBetaAdministrativeUnit { [System.String] $MembershipRuleProcessingState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.String] $MembershipType, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRule, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted + [System.String] $Description ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["MembershipRule"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["MembershipType"]) - { - $params["MembershipType"] = $PSBoundParameters["MembershipType"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["MembershipType"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["MembershipType"] = $PSBoundParameters["MembershipType"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["MembershipRule"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] } - if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Description"] = $PSBoundParameters["Description"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 index 6b620bde29..59de00b833 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -6,114 +6,114 @@ function New-EntraBetaCustomSecurityAttributeDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Type, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $AttributeSet, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsCollection, + [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Name, + [System.String] $Type, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.Nullable`1[System.Boolean]] $IsSearchable, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Status + [System.String] $Status, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsCollection ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["Type"]) + if ($null -ne $PSBoundParameters["AttributeSet"]) { - $params["Type"] = $PSBoundParameters["Type"] + $params["AttributeSet"] = $PSBoundParameters["AttributeSet"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["AttributeSet"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["AttributeSet"] = $PSBoundParameters["AttributeSet"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["IsCollection"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["IsCollection"] = $PSBoundParameters["IsCollection"] + $params["Name"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Type"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Type"] = $PSBoundParameters["Type"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IsSearchable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IsSearchable"] = $PSBoundParameters["IsSearchable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Name"] = $PSBoundParameters["Name"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] } - if ($null -ne $PSBoundParameters["IsSearchable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["IsSearchable"] = $PSBoundParameters["IsSearchable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["Status"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Status"] = $PSBoundParameters["Status"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["Status"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Status"] = $PSBoundParameters["Status"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["IsCollection"]) + { + $params["IsCollection"] = $PSBoundParameters["IsCollection"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 index 7ca274631b..beff85586c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 @@ -7,162 +7,162 @@ function New-EntraBetaDevice { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompliant, + [System.Nullable`1[System.Int32]] $DeviceObjectVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ProfileType, + [System.String] $DeviceTrustType, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DeviceOSType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceMetadata, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsManaged, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DeviceId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $AccountEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $SystemLabels, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DeviceOSVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DeviceMetadata, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, + [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsManaged, + [System.String] $ProfileType, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Int32]] $DeviceObjectVersion, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $DeviceOSType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, + [System.Nullable`1[System.Boolean]] $IsCompliant, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DeviceTrustType + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["IsCompliant"]) + if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) { - $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] + $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] } - if ($null -ne $PSBoundParameters["ProfileType"]) + if ($null -ne $PSBoundParameters["DeviceTrustType"]) { - $params["ProfileType"] = $PSBoundParameters["ProfileType"] + $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] } - if ($null -ne $PSBoundParameters["DeviceOSType"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["DeviceMetadata"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["SystemLabels"]) + if ($null -ne $PSBoundParameters["IsManaged"]) { - $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] + $params["IsManaged"] = $PSBoundParameters["IsManaged"] } - if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["AccountEnabled"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } - if ($null -ne $PSBoundParameters["DeviceOSVersion"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["DeviceMetadata"]) + if ($null -ne $PSBoundParameters["SystemLabels"]) { - $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] } if ($null -ne $PSBoundParameters["DevicePhysicalIds"]) { $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["DeviceOSVersion"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["IsManaged"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["IsManaged"] = $PSBoundParameters["IsManaged"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) + if ($null -ne $PSBoundParameters["ProfileType"]) { - $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] + $params["ProfileType"] = $PSBoundParameters["ProfileType"] } - if ($null -ne $PSBoundParameters["AccountEnabled"]) + if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) { - $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["DeviceOSType"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] } - if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) + if ($null -ne $PSBoundParameters["IsCompliant"]) { - $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] + $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] } - if ($null -ne $PSBoundParameters["DeviceTrustType"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 index 89a8a5aff6..f9e0d3666b 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 @@ -14,62 +14,62 @@ function New-EntraBetaDirectorySetting { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["DirectorySetting"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["DirectorySetting"] + $Value = $TmpValue | ForEach-Object { + $NonEmptyProperties = $_.psobject.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name + $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json + } + $params["BodyParameter"] = $Value } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if($null -ne $PSBoundParameters["DirectorySetting"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $TmpValue = $PSBoundParameters["DirectorySetting"] - $Value = $TmpValue | ForEach-Object { - $NonEmptyProperties = $_.psobject.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name - $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json - } - $params["BodyParameter"] = $Value + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 index e41f89c415..6281860d12 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 @@ -9,83 +9,83 @@ function New-EntraBetaDomain { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $SupportedServices, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefault, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Name, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefault + [System.String] $Name ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["SupportedServices"]) { $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) - { - $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IsDefault"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IsDefault"] = $PSBoundParameters["IsDefault"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["Name"]) { $params["Id"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["IsDefault"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["IsDefault"] = $PSBoundParameters["IsDefault"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 index 338c47586d..8d50f9ba69 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaAdministrativeUnit { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaAdministrativeUnit { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 index 60860cb9f2..052722d9cf 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 @@ -5,42 +5,22 @@ function Remove-EntraBetaAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $MemberId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId + [System.String] $AdministrativeUnitId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["MemberId"]) - { - $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] @@ -49,30 +29,50 @@ function Remove-EntraBetaAdministrativeUnitMember { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 index 55d8d2a236..122f7ee791 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaContact { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["OrgContactId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaContact { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 index 59785ff1d4..04cd2a6d32 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaDevice { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["DeviceId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaDevice { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 index 6b2981e20e..d9bd95fd77 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 @@ -17,25 +17,13 @@ function Remove-EntraBetaDeviceRegisteredOwner { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["DeviceId"]) { @@ -45,33 +33,45 @@ function Remove-EntraBetaDeviceRegisteredOwner { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 index 3f755f060d..b6ed99f7dd 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaDeviceRegisteredUser { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 index b5b037ec8d..c73617d23a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 @@ -5,42 +5,22 @@ function Remove-EntraBetaDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $MemberId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DirectoryRoleId + [System.String] $DirectoryRoleId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["MemberId"]) - { - $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] @@ -49,30 +29,50 @@ function Remove-EntraBetaDirectoryRoleMember { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 index 374554ba37..abf94d1d3e 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDirectorySetting { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["DirectorySettingId"] = $PSBoundParameters["Id"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["DirectorySettingId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 index 449b200027..f516c57792 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDomain { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DomainId"] = $PSBoundParameters["Name"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 index b65efd9cb6..cb1656c3a4 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 @@ -5,37 +5,29 @@ function Remove-EntraBetaScopedRoleMembership { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ScopedRoleMembershipId + [System.String] $ScopedRoleMembershipId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { @@ -45,33 +37,41 @@ function Remove-EntraBetaScopedRoleMembership { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 index 4c1d238280..73db49fc25 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 @@ -5,108 +5,108 @@ function Set-EntraBetaAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRule, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipType, + [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $MembershipRuleProcessingState, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.String] $MembershipType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted + [System.String] $MembershipRule, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["MembershipRule"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["MembershipType"]) - { - $params["MembershipType"] = $PSBoundParameters["MembershipType"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] } - if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["MembershipType"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["MembershipType"] = $PSBoundParameters["MembershipType"] } - if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) + if ($null -ne $PSBoundParameters["MembershipRule"]) { - $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 index 967c8c2374..27d9f1d8d6 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -23,69 +23,69 @@ function Set-EntraBetaCustomSecurityAttributeDefinition { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["Status"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Status"] = $PSBoundParameters["Status"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["Status"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Status"] = $PSBoundParameters["Status"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 index 72b736f62e..ac204cb020 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -6,79 +6,79 @@ function Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $CustomSecurityAttributeDefinitionId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsActive, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsActive + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $CustomSecurityAttributeDefinitionId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["AllowedValueId"] = $PSBoundParameters["Id"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["IsActive"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["IsActive"] = $PSBoundParameters["IsActive"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["AllowedValueId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["IsActive"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["IsActive"] = $PSBoundParameters["IsActive"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 index 7d7b8905e7..cb7c68f49b 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 @@ -7,76 +7,76 @@ function Set-EntraBetaDirectorySetting { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["DirectorySettingId"] = $PSBoundParameters["Id"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["DirectorySetting"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["DirectorySetting"] + $Value = $TmpValue | ForEach-Object { + $NonEmptyProperties = $_.psobject.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name + $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json + } + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectorySettingId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["DirectorySetting"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $TmpValue = $PSBoundParameters["DirectorySetting"] - $Value = $TmpValue | ForEach-Object { - $NonEmptyProperties = $_.psobject.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name - $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json - } - $params["BodyParameter"] = $Value + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 index fefa9b41e7..7042554c30 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 @@ -6,86 +6,86 @@ function Set-EntraBetaDomain { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Name, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $SupportedServices, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Name, + [System.Nullable`1[System.Boolean]] $IsDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefault + [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["SupportedServices"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DomainId"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["SupportedServices"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) + if ($null -ne $PSBoundParameters["IsDefault"]) { - $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] + $params["IsDefault"] = $PSBoundParameters["IsDefault"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["Name"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["IsDefault"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["IsDefault"] = $PSBoundParameters["IsDefault"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 index 06301906c7..ddf10871fb 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 @@ -7,16 +7,16 @@ function Set-EntraBetaTenantDetail { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationPhones, + [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails, + [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationMails, + [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationPhones, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails, + [System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile diff --git a/moduleVNext/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 similarity index 100% rename from moduleVNext/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 rename to moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 index 19f7649bcf..72b1ab5c7b 100644 --- a/moduleVNext/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 @@ -3,251 +3,251 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAlias { - Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraBetaDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicy -Value Remove-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADScopedRoleMembership -Value Add-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinition -Value Set-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraBetaApplication -Scope Global -Force - Set-Alias -Name New-AzureADMSFeatureRolloutPolicy -Value New-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADPolicy -Value Remove-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name New-AzureADDomain -Value New-EntraBetaDomain -Scope Global -Force Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Set-AzureADMSPrivilegedRoleSetting -Value Set-EntraBetaPrivilegedRoleSetting -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationFromApplicationTemplate -Value New-EntraBetaApplicationFromApplicationTemplate -Scope Global -Force - Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADUser -Value New-EntraBetaUser -Scope Global -Force - Set-Alias -Name Get-AzureADGroup -Value Get-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADAdministrativeUnitMember -Value Remove-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraBetaDirectoryRole -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraBetaLifeCycleGroup -Scope Global -Force - Set-Alias -Name Set-AzureADDomain -Value Set-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Get-AzureADAdministrativeUnit -Value Get-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnitMember -Value New-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPolicy -Value Get-EntraBetaApplicationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraBetaUserRegisteredDevice -Scope Global -Force - Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinition -Value Get-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADContract -Value Get-EntraBetaContract -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraBetaAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPasswordSingleSignOnCredential -Value Remove-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinition -Value Set-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraBetaInvitation -Scope Global -Force + Set-Alias -Name Remove-AzureADAdministrativeUnit -Value Remove-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraBetaObjectByObjectId -Scope Global -Force - Set-Alias -Name Set-AzureADMSPrivilegedRoleAssignmentRequest -Value Set-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force - Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraBetaApplicationPassword -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraBetaApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraBetaApplicationProxyApplication -Scope Global -Force + Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraBetaContactDirectReport -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalPolicy -Value Add-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADObjectSetting -Value New-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Get-AzureADAdministrativeUnitMember -Value Get-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADContract -Value Get-EntraBetaContract -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraBetaContact -Scope Global -Force + Set-Alias -Name Set-AzureADPolicy -Value Set-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraBetaContactManager -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraBetaLifeCycleGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraBetaConditionalAccessPolicy -Scope Global -Force Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraBetaUserMembership -Scope Global -Force - Set-Alias -Name Get-AzureADDevice -Value Get-EntraBetaDevice -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationFromApplicationTemplate -Value New-EntraBetaApplicationFromApplicationTemplate -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADObjectSetting -Value Set-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPolicy -Value Remove-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADAdministrativeUnitMember -Value Add-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationSignInDetailedSummary -Value Get-EntraBetaApplicationSignInDetailedSummary -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraBetaUserOwnedDevice -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraBetaApplicationPassword -Scope Global -Force Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraBetaApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Get-AzureADContactManager -Value Get-EntraBetaContactManager -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name New-AzureADDevice -Value New-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Set-AzureADUserManager -Value Set-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Get-AzureADMSAttributeSet -Value Get-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Get-AzureADMSApplicationTemplate -Value Get-EntraBetaApplicationTemplate -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraBetaUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name New-AzureADPolicy -Value New-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraBetaDomainVerificationDnsRecord -Scope Global -Force + Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinition -Value Get-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Remove-AzureADMSTrustFrameworkPolicy -Value Remove-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADDomain -Value Get-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADScopedRoleMembership -Value Get-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADGroup -Value Get-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraBetaApplicationPassword -Scope Global -Force + Set-Alias -Name Get-AzureADDirectorySetting -Value Get-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPolicy -Value Get-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADMScustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectorySetting -Value Remove-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSAttributeSet -Value Set-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraBetaApplication -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraBetaDeletedGroup -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraBetaUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnitMember -Value New-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraBetaUser -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraBetaApplication -Scope Global -Force Set-Alias -Name Get-AzureADPolicy -Value Get-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationPolicy -Value Add-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSTrustFrameworkPolicy -Value New-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADContact -Value Remove-EntraBetaContact -Scope Global -Force - Set-Alias -Name New-AzureADMSInvitation -Value New-EntraBetaInvitation -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraBetaApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraBetaServicePrincipalCreatedObject -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Set-AzureADUser -Value Set-EntraBetaUser -Scope Global -Force - Set-Alias -Name New-AzureADPolicy -Value New-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraBetaApplicationKey -Scope Global -Force - Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraBetaContactMembership -Scope Global -Force - Set-Alias -Name New-AzureADMSGroup -Value New-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraBetaApplicationLogo -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraBetaServicePrincipalOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Get-AzureADPolicyAppliedObject -Value Get-EntraBetaPolicyAppliedObject -Scope Global -Force - Set-Alias -Name Remove-AzureADObjectSetting -Value Remove-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraBetaGroupPermissionGrant -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraBetaAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADScopedRoleMembership -Value Add-EntraBetaScopedRoleMembership -Scope Global -Force Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name New-AzureADPrivilegedRoleAssignment -Value New-EntraBetaPrivilegedRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name New-AzureADMSAttributeSet -Value New-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraBetaUserOwnedObject -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedResource -Value Get-EntraBetaPrivilegedResource -Scope Global -Force + Set-Alias -Name Set-AzureADMSPasswordSingleSignOnCredential -Value Set-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADDirectorySettingTemplate -Value Get-EntraBetaDirectorySettingTemplate -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraBetaTenantDetail -Scope Global -Force Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Add-AzureADApplicationPolicy -Value Add-EntraBetaApplicationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraBetaUserAllRefreshToken -Scope Global -Force - Set-Alias -Name Set-AzureADDirectorySetting -Value Set-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraBetaServicePrincipalOwnedObject -Scope Global -Force - Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraBetaApplication -Scope Global -Force - Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraBetaGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraBetaUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADMSPasswordSingleSignOnCredential -Value Get-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSApplicationTemplate -Value Get-EntraBetaApplicationTemplate -Scope Global -Force - Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraBetaUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraBetaTenantDetail -Scope Global -Force - Set-Alias -Name Set-AzureADMSAttributeSet -Value Set-EntraBetaAttributeSet -Scope Global -Force - Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRole -Value Get-EntraBetaPrivilegedRole -Scope Global -Force - Set-Alias -Name New-AzureADMSPasswordSingleSignOnCredential -Value New-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraBetaGroupIdsGroupIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Remove-EntraBetaApplicationProxyApplication -Scope Global -Force - Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraBetaUserOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name New-AzureADMSAttributeSet -Value New-EntraBetaAttributeSet -Scope Global -Force - Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraBetaUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force - Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraBetaOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraBetaDomainNameReference -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraBetaGroupIdsServicePrincipalIsMemberOf -Scope Global -Force - Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraBetaSubscribedSku -Scope Global -Force - Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADUserManager -Value Get-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraBetaDomainServiceConfigurationRecord -Scope Global -Force - Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraBetaApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraBetaApplicationProxyApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraBetaServicePrincipalOwner -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraBetaApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraBetaUserPassword -Scope Global -Force - Set-Alias -Name New-AzureADMSTrustFrameworkPolicy -Value New-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADUser -Value Remove-EntraBetaUser -Scope Global -Force - Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraBetaDomainVerificationDnsRecord -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraBetaUserOwnedDevice -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleDefinition -Value Get-EntraBetaPrivilegedRoleDefinition -Scope Global -Force - Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraBetaApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADDirectorySetting -Value New-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraBetaDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSApplication -Value New-EntraBetaApplication -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraBetaTenantDetail -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleSetting -Value Get-EntraBetaPrivilegedRoleSetting -Scope Global -Force Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraBetaLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADAdministrativeUnit -Value Remove-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraBetaUserLicense -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraBetaTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraBetaServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADApplication -Value Get-EntraBetaApplication -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalPolicy -Value Add-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraBetaDeletedApplication -Scope Global -Force - Set-Alias -Name Get-AzureADDirectorySetting -Value Get-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraBetaDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraBetaUserDirectReport -Scope Global -Force - Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraBetaDirectoryRoleTemplate -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraBetaDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraBetaUserExtension -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Set-AzureADMSPasswordSingleSignOnCredential -Value Set-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Get-AzureADUser -Value Get-EntraBetaUser -Scope Global -Force - Set-Alias -Name Set-AzureADObjectSetting -Value Set-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraBetaGroupOwner -Scope Global -Force Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name New-AzureADMSCustomSecurityAttributeDefinition -Value New-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADContact -Value Get-EntraBetaContact -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraBetaServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedResource -Value Get-EntraBetaPrivilegedResource -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraBetaApplicationKey -Scope Global -Force - Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraBetaGroup -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraBetaGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADScopedRoleMembership -Value Remove-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSFeatureRolloutPolicy -Value New-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADPolicyAppliedObject -Value Get-EntraBetaPolicyAppliedObject -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraBetaServicePrincipalOwnedObject -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADMSFeatureRolloutPolicy -Value Get-EntraBetaFeatureRolloutPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSAttributeSet -Value Get-EntraBetaAttributeSet -Scope Global -Force - Set-Alias -Name New-AzureADDevice -Value New-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraBetaUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADDirectorySettingTemplate -Value Get-EntraBetaDirectorySettingTemplate -Scope Global -Force - Set-Alias -Name Get-AzureADAdministrativeUnitMember -Value Get-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraBetaGroupIdsContactIsMemberOf -Scope Global -Force Set-Alias -Name Add-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraBetaApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraBetaDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationSignInDetailedSummary -Value Get-EntraBetaApplicationSignInDetailedSummary -Scope Global -Force - Set-Alias -Name Set-AzureADMSTrustFrameworkPolicy -Value Set-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Remove-EntraBetaApplicationProxyApplication -Scope Global -Force + Set-Alias -Name Set-AzureADMSFeatureRolloutPolicy -Value Set-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADAdministrativeUnitMember -Value Remove-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraBetaServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraBetaTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Get-AzureADObjectSetting -Value Get-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraBetaUserCreatedObject -Scope Global -Force - Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraBetaApplicationPassword -Scope Global -Force - Set-Alias -Name Get-AzureADScopedRoleMembership -Value Get-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleSetting -Value Get-EntraBetaPrivilegedRoleSetting -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name Remove-AzureADMSTrustFrameworkPolicy -Value Remove-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraBetaSubscribedSku -Scope Global -Force + Set-Alias -Name New-AzureADMSPasswordSingleSignOnCredential -Value New-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Set-AzureADDirectorySetting -Value Set-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraBetaDomainNameReference -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraBetaAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraBetaUser -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraBetaGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraBetaDirectoryRoleTemplate -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADPolicy -Value Remove-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraBetaServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraBetaUserOwnedObject -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraBetaUserRegisteredDevice -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraBetaGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraBetaGroupOwner -Scope Global -Force Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraBetaUserExtension -Scope Global -Force - Set-Alias -Name Remove-AzureADScopedRoleMembership -Value Remove-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraBetaContactDirectReport -Scope Global -Force - Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraBetaTenantDetail -Scope Global -Force - Set-Alias -Name Remove-AzureADDirectorySetting -Value Remove-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraBetaUserLicenseDetail -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraBetaUserDirectReport -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraBetaGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADObjectSetting -Value Remove-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name New-AzureADDirectorySetting -Value New-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraBetaUser -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Get-AzureADAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraBetaApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraBetaApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraBetaUserCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraBetaServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRole -Value Get-EntraBetaPrivilegedRole -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Set-AzureADMSTrustFrameworkPolicy -Value Set-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraBetaApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraBetaUser -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleDefinition -Value Get-EntraBetaPrivilegedRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraBetaUserLicense -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraBetaSignedInUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraBetaUserOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraBetaSignedInUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Set-AzureADMSPrivilegedRoleSetting -Value Set-EntraBetaPrivilegedRoleSetting -Scope Global -Force + Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraBetaContactMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraBetaApplicationKey -Scope Global -Force + Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicy -Value Remove-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSPrivilegedRoleAssignmentRequest -Value Set-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraBetaSignedInUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraBetaUserLicenseDetail -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraBetaGroupIdsUserIsMemberOf -Scope Global -Force - Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADMScustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraBetaDomainServiceConfigurationRecord -Scope Global -Force Set-Alias -Name Set-AzureADDevice -Value Set-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPasswordSingleSignOnCredential -Value Remove-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraBetaServicePrincipalMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraBetaLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADAdministrativeUnitMember -Value Add-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Get-AzureADAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraBetaConditionalAccessPolicy -Scope Global -Force Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name New-AzureADObjectSetting -Value New-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADPolicy -Value Set-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADUserManager -Value Set-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraBetaDeletedGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraBetaAuthorizationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraBetaUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraBetaUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADMSTrustFrameworkPolicy -Value Get-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationPolicy -Value Remove-EntraBetaApplicationPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSFeatureRolloutPolicy -Value Get-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraBetaOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADMSFeatureRolloutPolicy -Value Set-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraBetaDeletedApplication -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraBetaDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraBetaDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraBetaApplicationKey -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADPrivilegedRoleAssignment -Value New-EntraBetaPrivilegedRoleAssignment -Scope Global -Force + Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraBetaUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Get-AzureADAdministrativeUnit -Value Get-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraBetaApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraBetaUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraBetaLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force @@ -256,38 +256,38 @@ function Enable-EntraAzureADAlias { Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Connect-AzureAD -Value Connect-EntraBeta -Scope Global -Force Set-Alias -Name Disconnect-AzureAD -Value Disconnect-EntraBeta -Scope Global -Force Set-Alias -Name Remove-EntraBetaRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..2627eeaa40 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedResource -Value Get-EntraBetaPrivilegedResource -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleSetting -Value Get-EntraBetaPrivilegedRoleSetting -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRole -Value Get-EntraBetaPrivilegedRole -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleDefinition -Value Get-EntraBetaPrivilegedRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSPrivilegedRoleSetting -Value Set-EntraBetaPrivilegedRoleSetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSPrivilegedRoleAssignmentRequest -Value Set-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADPrivilegedRoleAssignment -Value New-EntraBetaPrivilegedRoleAssignment -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-EntraBetaRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-EntraBetaRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name New-EntraBetaRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Set-EntraBetaRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-EntraBetaRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-EntraBetaRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name New-EntraBetaRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 index 171aa61050..606d17909b 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 @@ -5,21 +5,21 @@ function Get-EntraBetaDirectoryRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('Id')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UnifiedRoleAssignmentId, + + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('Id')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleAssignmentId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, - - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,17 +28,30 @@ function Get-EntraBetaDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["SearchString"]) + { + $params["SearchString"] = $PSBoundParameters["SearchString"] + } + if($null -ne $PSBoundParameters["Filter"]) + { + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } if($null -ne $PSBoundParameters["All"]) { @@ -47,62 +60,49 @@ function Get-EntraBetaDirectoryRoleAssignment { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Top"] = $PSBoundParameters["Top"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["SearchString"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["SearchString"] = $PSBoundParameters["SearchString"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 index 2005b35446..8b401bb497 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 @@ -6,17 +6,17 @@ function Get-EntraBetaPrivilegedResource { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ProviderId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -25,49 +25,21 @@ function Get-EntraBetaPrivilegedResource { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ProviderId = "PrivilegedAccessId"} - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["GovernanceResourceId"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -78,21 +50,49 @@ function Get-EntraBetaPrivilegedResource { $Value = $TmpValue $params["Filter"] = $Value } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["GovernanceResourceId"] = $PSBoundParameters["Id"] + } if ($null -ne $PSBoundParameters["ProviderId"]) { $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 index 115218c6d5..e832202939 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 @@ -6,11 +6,11 @@ function Get-EntraBetaPrivilegedRole { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -19,45 +19,21 @@ function Get-EntraBetaPrivilegedRole { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["PrivilegedRoleId"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -68,18 +44,42 @@ function Get-EntraBetaPrivilegedRole { $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["Id"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["PrivilegedRoleId"] = $PSBoundParameters["Id"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 index ee0e56dee4..f778e45cb6 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 @@ -6,17 +6,17 @@ function Get-EntraBetaPrivilegedRoleAssignmentRequest { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ProviderId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -25,49 +25,21 @@ function Get-EntraBetaPrivilegedRoleAssignmentRequest { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -78,21 +50,49 @@ function Get-EntraBetaPrivilegedRoleAssignmentRequest { $Value = $TmpValue $params["Filter"] = $Value } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] + } if ($null -ne $PSBoundParameters["ProviderId"]) { $params["ProviderId"] = $PSBoundParameters["ProviderId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 index 69e695dd4d..eb1c2ac880 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 @@ -6,20 +6,20 @@ function Get-EntraBetaPrivilegedRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, + [System.String] $Filter, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ResourceId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ProviderId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,78 +28,78 @@ function Get-EntraBetaPrivilegedRoleDefinition { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ResourceId = "GovernanceResourceId"; ProviderId = "PrivilegedAccessId"} - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["GovernanceRoleDefinitionId"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ResourceId"]) { $params["GovernanceResourceId"] = $PSBoundParameters["ResourceId"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["Id"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["GovernanceRoleDefinitionId"] = $PSBoundParameters["Id"] } if ($null -ne $PSBoundParameters["ProviderId"]) { $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 index 0af9bce53e..1ae5d32564 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 @@ -6,17 +6,17 @@ function Get-EntraBetaPrivilegedRoleSetting { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ProviderId, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 index 3f16f1be7d..45b2c917d9 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 @@ -7,10 +7,10 @@ function New-EntraBetaDirectoryRoleAssignment { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $RoleDefinitionId, + [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PrincipalId, + [System.String] $RoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DirectoryScopeId @@ -20,65 +20,65 @@ function New-EntraBetaDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["PrincipalId"]) { $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["DirectoryScopeId"]) - { - $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DirectoryScopeId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 index 34f7ad2977..fa8096dec4 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 @@ -6,120 +6,120 @@ function New-EntraBetaDirectoryRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsEnabled, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TemplateId, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition]] $InheritsPermissionsFrom, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $ResourceScopes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsEnabled ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["RolePermissions"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $TmpValue = $PSBoundParameters["RolePermissions"] - $Temp = @{ - allowedResourceActions = $TmpValue.allowedResourceActions - condition = $TmpValue.condition - } - $Value = $Temp - $params["RolePermissions"] = $Value + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["TemplateId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["TemplateId"] = $PSBoundParameters["TemplateId"] } if ($null -ne $PSBoundParameters["Version"]) { $params["Version"] = $PSBoundParameters["Version"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InheritsPermissionsFrom"] = $PSBoundParameters["InheritsPermissionsFrom"] } - if ($null -ne $PSBoundParameters["TemplateId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["TemplateId"] = $PSBoundParameters["TemplateId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) - { - $params["InheritsPermissionsFrom"] = $PSBoundParameters["InheritsPermissionsFrom"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["RolePermissions"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $TmpValue = $PSBoundParameters["RolePermissions"] + $Temp = @{ + allowedResourceActions = $TmpValue.allowedResourceActions + condition = $TmpValue.condition + } + $Value = $Temp + $params["RolePermissions"] = $Value } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["ResourceScopes"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ResourceScopes"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 index 7b43988416..52b1c0e069 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 @@ -6,100 +6,100 @@ function New-EntraBetaPrivilegedRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $RoleId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [System.Nullable`1[System.DateTime]] $ExpirationDateTime, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsElevated, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $UserId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.DateTime]] $ExpirationDateTime, + [System.String] $ResultMessage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResultMessage, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $RoleId + [System.String] $UserId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["RoleId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["RoleId"] = $PSBoundParameters["RoleId"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Id"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ExpirationDateTime"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ExpirationDateTime"] = $PSBoundParameters["ExpirationDateTime"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["IsElevated"]) - { - $params["IsElevated"] = $PSBoundParameters["IsElevated"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["IsElevated"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["IsElevated"] = $PSBoundParameters["IsElevated"] } - if ($null -ne $PSBoundParameters["UserId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ExpirationDateTime"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ExpirationDateTime"] = $PSBoundParameters["ExpirationDateTime"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ResultMessage"]) { $params["ResultMessage"] = $PSBoundParameters["ResultMessage"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Id"] = $PSBoundParameters["Id"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["RoleId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["RoleId"] = $PSBoundParameters["RoleId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 index a507fd15ff..da5e311cd6 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 index 98f3a02077..6e455a0dfa 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDirectoryRoleDefinition { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 index 517196dcf0..8a317fee83 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 @@ -5,31 +5,31 @@ function Set-EntraBetaDirectoryRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UnifiedRoleDefinitionId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TemplateId, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition]] $InheritsPermissionsFrom, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $ResourceScopes, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UnifiedRoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Description, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsEnabled ) @@ -38,41 +38,29 @@ function Set-EntraBetaDirectoryRoleDefinition { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["TemplateId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["TemplateId"] = $PSBoundParameters["TemplateId"] } if ($null -ne $PSBoundParameters["Version"]) { $params["Version"] = $PSBoundParameters["Version"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["TemplateId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["TemplateId"] = $PSBoundParameters["TemplateId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) { @@ -82,56 +70,68 @@ function Set-EntraBetaDirectoryRoleDefinition { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["RolePermissions"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["RolePermissions"] + $Value = @() + foreach($val in $TmpValue) + { + $Temp = $val | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $hash[$_.Name] = $_.Value } + $Value += $hash + } + $params["RolePermissions"] = $Value } if ($null -ne $PSBoundParameters["ResourceScopes"]) { $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["RolePermissions"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RolePermissions"] - $Value = @() - foreach($val in $TmpValue) - { - $Temp = $val | ConvertTo-Json - $hash = @{} - - (ConvertFrom-Json $Temp).psobject.properties | Foreach { $hash[$_.Name] = $_.Value } - $Value += $hash - } - $params["RolePermissions"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Description"] = $PSBoundParameters["Description"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["IsEnabled"]) { $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 index 26b4c82eb2..c5793d0bf5 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 @@ -6,101 +6,101 @@ function Set-EntraBetaPrivilegedRoleAssignmentRequest { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Reason, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Decision, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Reason, + [System.String] $AssignmentState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule] $Schedule, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AssignmentState, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ProviderId + [System.String] $Decision ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["Reason"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Reason"] = $PSBoundParameters["Reason"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["Decision"]) + if ($null -ne $PSBoundParameters["ProviderId"]) { - $params["Decision"] = $PSBoundParameters["Decision"] + $params["ProviderId"] = $PSBoundParameters["ProviderId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["Reason"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Reason"] = $PSBoundParameters["Reason"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["Schedule"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Schedule"] = $PSBoundParameters["Schedule"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["AssignmentState"]) { $params["AssignmentState"] = $PSBoundParameters["AssignmentState"] } - if ($null -ne $PSBoundParameters["ProviderId"]) + if ($null -ne $PSBoundParameters["Schedule"]) { - $params["ProviderId"] = $PSBoundParameters["ProviderId"] + $params["Schedule"] = $PSBoundParameters["Schedule"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Decision"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Decision"] = $PSBoundParameters["Decision"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 index 68425f289a..9952db65cc 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 @@ -6,50 +6,94 @@ function Set-EntraBetaPrivilegedRoleSetting { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $AdminMemberSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $RoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserMemberSettings, + [System.String] $ResourceId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $AdminMemberSettings, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserEligibleSettings, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserMemberSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $AdminEligibleSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResourceId, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ProviderId + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserEligibleSettings ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if($null -ne $PSBoundParameters["AdminMemberSettings"]) + { + $TmpValue = $PSBoundParameters["AdminMemberSettings"] + $a = @() + foreach($setting in $TmpValue) { + $Temp = $setting | ConvertTo-Json + $a += $Temp + } + + $Value = $a + $params["AdminMemberSettings"] = $Value + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + { + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] + } if ($null -ne $PSBoundParameters["Id"]) { $params["GovernanceRoleSettingId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ProviderId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] } - if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if($null -ne $PSBoundParameters["UserMemberSettings"]) { @@ -63,21 +107,21 @@ function Set-EntraBetaPrivilegedRoleSetting { $Value = $a $params["UserMemberSettings"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["AdminMemberSettings"]) + if($null -ne $PSBoundParameters["AdminEligibleSettings"]) { - $TmpValue = $PSBoundParameters["AdminMemberSettings"] + $TmpValue = $PSBoundParameters["AdminEligibleSettings"] $a = @() foreach($setting in $TmpValue) { $Temp = $setting | ConvertTo-Json @@ -85,7 +129,11 @@ function Set-EntraBetaPrivilegedRoleSetting { } $Value = $a - $params["AdminMemberSettings"] = $Value + $params["AdminEligibleSettings"] = $Value + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["UserEligibleSettings"]) { @@ -99,54 +147,6 @@ function Set-EntraBetaPrivilegedRoleSetting { $Value = $a $params["UserEligibleSettings"] = $Value } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["AdminEligibleSettings"]) - { - $TmpValue = $PSBoundParameters["AdminEligibleSettings"] - $a = @() - foreach($setting in $TmpValue) { - $Temp = $setting | ConvertTo-Json - $a += $Temp - } - - $Value = $a - $params["AdminEligibleSettings"] = $Value - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ResourceId"]) - { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] - } - if ($null -ne $PSBoundParameters["ProviderId"]) - { - $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 index 8c1c56ec38..de42e5703a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 @@ -5,73 +5,73 @@ function Add-EntraBetaGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 index 73a561b078..a8c3d034f2 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 index 8130006870..55ad0afc18 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 @@ -17,61 +17,61 @@ function Add-EntraBetaLifecyclePolicyGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..b273032bb4 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,78 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraBetaObjectByObjectId -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name New-AzureADObjectSetting -Value New-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraBetaLifeCycleGroup -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Set-AzureADObjectSetting -Value Set-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADGroup -Value Get-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraBetaDeletedGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraBetaGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraBetaGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Get-AzureADObjectSetting -Value Get-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraBetaGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraBetaGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADObjectSetting -Value Remove-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraBetaGroup -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 index 747a2d04c4..75c593e57d 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 @@ -5,21 +5,21 @@ function Get-EntraBetaGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $GroupId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,36 +28,13 @@ function Get-EntraBetaGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["GroupId"]) { @@ -67,44 +44,67 @@ function Get-EntraBetaGroup { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) + if($null -ne $PSBoundParameters["SearchString"]) { - $params["Top"] = $PSBoundParameters["Top"] + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($null -ne $PSBoundParameters["SearchString"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $TmpValue = $PSBoundParameters["SearchString"] - $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" - $params["Filter"] = $Value + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 index 2aa265e72f..e62cdc813d 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $GroupId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaGroupAppRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaGroupAppRoleAssignment { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 index 096a7b04e1..abc5dae833 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 index c07789a4fc..b26ba7b98c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaGroupPermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 index 8e67fbc3fe..2250039237 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaLifecyclePolicyGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 index 8cb3cdac44..cfe1ed1630 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 @@ -6,20 +6,20 @@ function Get-EntraBetaObjectSetting { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $TargetObjectId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $TargetType, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 index be031b92af..7996cd0be7 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 @@ -7,134 +7,134 @@ function New-EntraBetaGroup { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRule, + [System.Collections.Generic.List`1[System.String]] $GroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $MailNickname, + [System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $MailEnabled, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Visibility, + [System.String] $MembershipRuleProcessingState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRuleProcessingState, + [System.String] $MembershipRule, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $SecurityEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Visibility, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $LabelId, + [System.String] $MailNickname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $GroupTypes, + [System.String] $Description, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $LabelId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $SecurityEnabled ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["MembershipRule"]) - { - $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["GroupTypes"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } - if ($null -ne $PSBoundParameters["MailNickname"]) + if ($null -ne $PSBoundParameters["MailEnabled"]) { - $params["MailNickname"] = $PSBoundParameters["MailNickname"] + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["MailEnabled"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Visibility"]) + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) { - $params["Visibility"] = $PSBoundParameters["Visibility"] + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["MembershipRule"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] } - if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["SecurityEnabled"]) + if ($null -ne $PSBoundParameters["Visibility"]) { - $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] + $params["Visibility"] = $PSBoundParameters["Visibility"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["LabelId"]) + if ($null -ne $PSBoundParameters["MailNickname"]) { - $params["LabelId"] = $PSBoundParameters["LabelId"] + $params["MailNickname"] = $PSBoundParameters["MailNickname"] } - if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["GroupTypes"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["LabelId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["LabelId"] = $PSBoundParameters["LabelId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["SecurityEnabled"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 index 7ed6bf56c4..467d7ab489 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 @@ -5,87 +5,87 @@ function New-EntraBetaGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('Id')] - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AppRoleId, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PrincipalId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $GroupId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId + [System.String] $PrincipalId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId, + [Alias('Id')] + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppRoleId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["AppRoleId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["AppRoleId"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 index d5e3a2dcc8..f7e609a168 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 @@ -7,38 +7,34 @@ function New-EntraBetaGroupLifecyclePolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AlternateNotificationEmails, + [System.String] $ManagedGroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ManagedGroupTypes + [System.String] $AlternateNotificationEmails ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) { - $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { @@ -48,37 +44,41 @@ function New-EntraBetaGroupLifecyclePolicy { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { - $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 index c513ecfca6..2b380b0a7c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 @@ -7,10 +7,10 @@ function New-EntraBetaObjectSetting { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetObjectId, + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, + [System.String] $TargetObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $TargetType diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 index e434fa19c1..c5a57717eb 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["GroupId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaGroup { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 index 1bb9c64c82..59dcb6621c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 @@ -5,38 +5,26 @@ function Remove-EntraBetaGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AppRoleAssignmentId + [System.String] $AppRoleAssignmentId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] @@ -45,33 +33,45 @@ function Remove-EntraBetaGroupAppRoleAssignment { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 index d2a838d4b3..e5174ec9e0 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 index 3bcbb973ec..a690e7abd3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 @@ -5,42 +5,22 @@ function Remove-EntraBetaGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $MemberId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["MemberId"]) - { - $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] @@ -49,30 +29,50 @@ function Remove-EntraBetaGroupMember { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["MemberId"]) + { + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 index 6fc94d4da8..aa8e51c255 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 @@ -17,25 +17,13 @@ function Remove-EntraBetaGroupOwner { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["GroupId"]) { @@ -45,33 +33,45 @@ function Remove-EntraBetaGroupOwner { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["OwnerId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 index ca985cfd06..93bfa9e816 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaLifecyclePolicyGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 index 7cbf7d85cf..c4e513204b 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 @@ -14,57 +14,57 @@ function Reset-EntraBetaLifeCycleGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 index 5c06e49515..bc56ef2667 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 @@ -7,16 +7,13 @@ function Set-EntraBetaGroup { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRule, - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, + [System.Collections.Generic.List`1[System.String]] $GroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickname, + [System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $MailEnabled, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $MembershipRuleProcessingState, @@ -25,99 +22,102 @@ function Set-EntraBetaGroup { [System.String] $Visibility, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $SecurityEnabled, + [System.String] $MembershipRule, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $LabelId, + [System.String] $MailNickname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $GroupTypes, + [System.String] $Description, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $LabelId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.Nullable`1[System.Boolean]] $SecurityEnabled ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["MembershipRule"]) - { - $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] - } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["GroupTypes"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } - if ($null -ne $PSBoundParameters["MailNickname"]) + if ($null -ne $PSBoundParameters["MailEnabled"]) { - $params["MailNickname"] = $PSBoundParameters["MailNickname"] + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["MailEnabled"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + { + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + } if ($null -ne $PSBoundParameters["Visibility"]) { $params["Visibility"] = $PSBoundParameters["Visibility"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["MembershipRule"]) + { + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["SecurityEnabled"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["MailNickname"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["MailNickname"] = $PSBoundParameters["MailNickname"] } - if ($null -ne $PSBoundParameters["LabelId"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["LabelId"] = $PSBoundParameters["LabelId"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["GroupTypes"]) + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) { - $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } if ($null -ne $PSBoundParameters["OutVariable"]) { @@ -127,21 +127,21 @@ function Set-EntraBetaGroup { { $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["LabelId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["LabelId"] = $PSBoundParameters["LabelId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["SecurityEnabled"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 index ac6f91b2ca..6d80797ac8 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 @@ -5,6 +5,9 @@ function Set-EntraBetaGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, [Alias('Id')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $GroupLifecyclePolicyId, @@ -12,9 +15,6 @@ function Set-EntraBetaGroupLifecyclePolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $AlternateNotificationEmails, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $ManagedGroupTypes ) @@ -23,69 +23,69 @@ function Set-EntraBetaGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } - if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 index 6354e38743..6eafa64ead 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 @@ -7,13 +7,13 @@ function Set-EntraBetaObjectSetting { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetObjectId, + [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, + [System.String] $TargetObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $TargetType diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..4e0632b31c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,47 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 new file mode 100644 index 0000000000..5ad5958614 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 @@ -0,0 +1,12 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraBetaGlobalSecureAccessTenant { + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $response = Invoke-GraphRequest -Method POST -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/networkAccess/microsoft.graph.networkaccess.onboard" + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 new file mode 100644 index 0000000000..c3e847035b --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 @@ -0,0 +1,12 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaGlobalSecureAccessTenantStatus { + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/networkAccess/tenantStatus" + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 new file mode 100644 index 0000000000..a3f6019e75 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 @@ -0,0 +1,40 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaPrivateAccessApplication { + + [CmdletBinding(DefaultParameterSetName = 'AllPrivateAccessApps')] + param ( + [Alias("ObjectId")] + [Parameter(Mandatory = $True, Position = 1, ParameterSetName = 'SingleAppID')] + [string] + $ApplicationId, + + [Parameter(Mandatory = $False, ParameterSetName = 'SingleAppName')] + [string] + $ApplicationName + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + switch ($PSCmdlet.ParameterSetName) { + "AllPrivateAccessApps" { + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri 'https://graph.microsoft.com/beta/applications?$count=true&$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames&$filter=tags/Any(x: x eq ''PrivateAccessNonWebApplication'') or tags/Any(x: x eq ''NetworkAccessManagedApplication'') or tags/Any(x: x eq ''NetworkAccessQuickAccessApplication'')' + $response.value + break + } + "SingleAppID" { + Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/?`$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames" + break + } + "SingleAppName" { + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications?`$count=true&`$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames&`$filter=DisplayName eq '$ApplicationName'" + $response.value + break + } + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 index 550349ad0e..0995adc371 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -6,10 +6,10 @@ function Get-EntraBetaPrivateAccessApplicationSegment { [CmdletBinding(DefaultParameterSetName = 'AllApplicationSegments')] param ( - [Alias('id')] + [Alias('ObjectId')] [Parameter(Mandatory = $True, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [string] - $ObjectId, + $ApplicationId, [Parameter(Mandatory = $False, Position = 2, ParameterSetName = 'SingleApplicationSegment')] [string] $ApplicationSegmentId @@ -19,12 +19,12 @@ function Get-EntraBetaPrivateAccessApplicationSegment { $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand switch ($PSCmdlet.ParameterSetName) { "AllApplicationSegments" { - $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments" + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments" $response.value break } "SingleApplicationSegment" { - Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" + Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" break } } diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 new file mode 100644 index 0000000000..94f7c5211d --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaPrivateAccessApplication { + + [CmdletBinding(DefaultParameterSetName = 'AllPrivateAccessApps')] + param ( + [Parameter(Mandatory = $True, Position = 1)] + [string] + $ApplicationName, + + [Parameter(Mandatory = $False, Position = 2)] + [string] + $ConnectorGroupId + ) + + PROCESS { + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + $bodyJson = @{ displayName = $ApplicationName } | ConvertTo-Json -Depth 99 -Compress + + # Instantiate the Private Access app + try { + $newApp = Invoke-GraphRequest -Method POST -Headers $customHeaders -Uri 'https://graph.microsoft.com/beta/applicationTemplates/8adf8e6e-67b2-4cf2-a259-e3dc5476c621/instantiate' -Body $bodyJson + } + catch { + Write-Error "Failed to create the Private Access app. Error: $_" + return + } + + $bodyJson = @{ + "onPremisesPublishing" = @{ + "applicationType" = "nonwebapp" + "isAccessibleViaZTNAClient" = $true + } + } | ConvertTo-Json -Depth 99 -Compress + + $newAppId = $newApp.application.objectId + + # Set the Private Access app to be accessible via the ZTNA client + $params = @{ + Method = 'PATCH' + Uri = "https://graph.microsoft.com/beta/applications/$newAppId/" + Body = $bodyJson + } + + Invoke-GraphRequest @params + + # If ConnectorGroupId has been specified, assign the connector group to the app, otherwise the default connector group will be assigned. + if ($ConnectorGroupId) { + $bodyJson = @{ + "@odata.id" = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationproxy/connectorGroups/$ConnectorGroupId" + } | ConvertTo-Json -Depth 99 -Compress + + $params = @{ + Method = 'PUT' + Uri = "https://graph.microsoft.com/beta/applications/$newAppId/connectorGroup/`$ref" + Body = $bodyJson + } + + Invoke-GraphRequest @params + } + } +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 index 6e08860a2a..9f9221e09c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -7,10 +7,10 @@ function New-EntraBetaPrivateAccessApplicationSegment { [CmdletBinding()] param ( - [Alias('id')] + [Alias('ObjectId')] [Parameter(Mandatory = $True, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [string] - $ObjectID, + $ApplicationId, [Parameter(Mandatory = $True)] [string] @@ -72,7 +72,7 @@ function New-EntraBetaPrivateAccessApplicationSegment { $params = @{ Method = 'POST' - Uri = "https://graph.microsoft.com/beta/applications/$ObjectID/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/" + Uri = "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/" Headers = $customHeaders Body = $bodyJson OutputType = 'PSObject' diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 index 9ef92b3bee..2c3e659f83 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -6,9 +6,10 @@ function Remove-EntraBetaPrivateAccessApplicationSegment { [CmdletBinding()] param ( + [Alias('ObjectId')] [Parameter(Mandatory = $True, Position = 1)] [string] - $ObjectID, + $ApplicationId, [Parameter(Mandatory = $False, Position = 2)] [string] $ApplicationSegmentId @@ -16,7 +17,51 @@ function Remove-EntraBetaPrivateAccessApplicationSegment { PROCESS { $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - Invoke-GraphRequest -Method DELETE -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ObjectID/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" + Invoke-GraphRequest -Method DELETE -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" } +}function Restore-EntraBetaDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $AutoReconcileProxyConflict + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = 'https://graph.microsoft.com/beta/directory/deletedItems/' + $params["Method"] = "POST" + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] += $Id+"/microsoft.graph.restore" + } + if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) + { + $params["Body"] = @{ + autoReconcileProxyConflict = $true + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } }# ------------------------------------------------------------------------------ diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..063d5a1fba --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-AzureADApplicationSignInDetailedSummary -Value Get-EntraBetaApplicationSignInDetailedSummary -Scope Global -Force + Set-Alias -Name Get-AzureADAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force + Set-Alias -Name Get-AzureADAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-EntraBetaAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force + Set-Alias -Name Get-EntraBetaAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 index ba5c5777a6..b1fa00a624 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 @@ -7,10 +7,10 @@ function Get-EntraBetaApplicationSignInDetailedSummary { param ( [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, + [System.String] $Filter, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 index bb60f0511d..a0eade9a4a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 @@ -6,14 +6,14 @@ function Get-EntraBetaApplicationSignInSummary { [CmdletBinding(DefaultParameterSetName = '')] param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Days, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter + [System.Nullable`1[System.Int32]] $Top ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 index a62c75478b..4418fed453 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 @@ -6,14 +6,14 @@ function Get-EntraBetaAuditDirectoryLog { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 index 35eadd4fbc..05630fcf08 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 @@ -6,14 +6,14 @@ function Get-EntraBetaAuditSignInLog { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, - - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 index 5a6f093940..8abc221a94 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 @@ -17,63 +17,63 @@ function Add-EntraBetaFeatureRolloutPolicyDirectoryObject { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["Id"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" - $params["OdataId"] = $Value + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..6bcb016863 --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,94 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraBetaInvitation -Scope Global -Force + Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalPolicy -Value Add-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADPolicy -Value Set-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name New-AzureADPolicy -Value New-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADPolicy -Value Get-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSTrustFrameworkPolicy -Value New-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraBetaAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADMSFeatureRolloutPolicy -Value New-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADPolicyAppliedObject -Value Get-EntraBetaPolicyAppliedObject -Scope Global -Force + Set-Alias -Name Get-AzureADMSFeatureRolloutPolicy -Value Get-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force + Set-Alias -Name Set-AzureADMSFeatureRolloutPolicy -Value Set-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADMSTrustFrameworkPolicy -Value Remove-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraBetaAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADPolicy -Value Remove-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSTrustFrameworkPolicy -Value Set-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicy -Value Remove-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADMSTrustFrameworkPolicy -Value Get-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 index 26c20e0b79..cf6e3aadd3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaConditionalAccessPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 index d7ca7e7443..2ee8d32786 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 @@ -6,14 +6,14 @@ function Get-EntraBetaFeatureRolloutPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,72 +22,72 @@ function Get-EntraBetaFeatureRolloutPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{SearchString = "Filter"} - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["SearchString"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["SearchString"] + $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($null -ne $PSBoundParameters["SearchString"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $TmpValue = $PSBoundParameters["SearchString"] - $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" - $params["Filter"] = $Value + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 index 5295ce3132..3615380baa 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaIdentityProvider { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 index da81e28c9a..e86662745c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 @@ -19,13 +19,21 @@ function Get-EntraBetaOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -34,49 +42,41 @@ function Get-EntraBetaOAuth2PermissionGrant { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 index e6bd758e9c..2876daa183 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 @@ -6,14 +6,14 @@ function Get-EntraBetaPermissionGrantConditionSet { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $PolicyId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ConditionSetType, + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 index d429a78971..c9d032dbb0 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 index 91d5b04669..5ae49c843e 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 @@ -6,12 +6,12 @@ function Get-EntraBetaPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top ) diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 index f12b841efb..8393ce52b2 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 @@ -6,11 +6,11 @@ function Get-EntraBetaTrustFrameworkPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "GetById", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OutputFilePath + [System.String] $OutputFilePath, + + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 index 0ed86edf1c..35ae267ec7 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 @@ -7,61 +7,69 @@ function New-EntraBetaConditionalAccessPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ModifiedDateTime, + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [System.String] $ModifiedDateTime, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreatedDateTime, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + [System.String] $CreatedDateTime, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, + [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["GrantControls"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $TmpValue = $PSBoundParameters["GrantControls"] + $hash = @{} + if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } + if($null -ne $TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } + if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } + if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } + + $Value = $hash + $params["GrantControls"] = $Value } if ($null -ne $PSBoundParameters["ModifiedDateTime"]) { $params["ModifiedDateTime"] = $PSBoundParameters["ModifiedDateTime"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Id"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["State"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["State"] = $PSBoundParameters["State"] } - if ($null -ne $PSBoundParameters["CreatedDateTime"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { @@ -71,29 +79,18 @@ function New-EntraBetaConditionalAccessPolicy { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["CreatedDateTime"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] } - if($null -ne $PSBoundParameters["Conditions"]) + if($null -ne $PSBoundParameters["SessionControls"]) { - $TmpValue = $PSBoundParameters["Conditions"] + $TmpValue = $PSBoundParameters["SessionControls"] $Value = @{} $TmpValue.PSObject.Properties | foreach { $propName = $_.Name $propValue = $_.Value - if ($propName -eq 'clientAppTypes') { - $Value[$propName] = $propValue - } - elseif ($propValue -is [System.Object]) { + if ($propValue -is [System.Object]) { $nestedProps = @{} $propValue.PSObject.Properties | foreach { $nestedPropName = $_.Name @@ -103,40 +100,51 @@ function New-EntraBetaConditionalAccessPolicy { $Value[$propName] = $nestedProps } } - $params["Conditions"] = $Value - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["SessionControls"] = $Value } - if($null -ne $PSBoundParameters["GrantControls"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $TmpValue = $PSBoundParameters["GrantControls"] - $hash = @{} - if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } - if($null -ne $TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } - if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } - if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } - - $Value = $hash - $params["GrantControls"] = $Value + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["SessionControls"]) + if ($null -ne $PSBoundParameters["Id"]) { - $TmpValue = $PSBoundParameters["SessionControls"] + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Conditions"]) + { + $TmpValue = $PSBoundParameters["Conditions"] $Value = @{} $TmpValue.PSObject.Properties | foreach { $propName = $_.Name $propValue = $_.Value - if ($propValue -is [System.Object]) { + if ($propName -eq 'clientAppTypes') { + $Value[$propName] = $propValue + } + elseif ($propValue -is [System.Object]) { $nestedProps = @{} $propValue.PSObject.Properties | foreach { $nestedPropName = $_.Name @@ -146,15 +154,7 @@ function New-EntraBetaConditionalAccessPolicy { $Value[$propName] = $nestedProps } } - $params["SessionControls"] = $Value - } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["State"]) - { - $params["State"] = $PSBoundParameters["State"] + $params["Conditions"] = $Value } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 index 2cb5c42dd3..8fd7415ae3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 @@ -7,99 +7,99 @@ function New-EntraBetaFeatureRolloutPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsEnabled, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.Nullable`1[System.Boolean]] $IsEnabled ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) { $params["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["AppliesTo"]) - { - $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] - } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Feature"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Feature"] = $PSBoundParameters["Feature"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["Feature"]) + if ($null -ne $PSBoundParameters["AppliesTo"]) { - $params["Feature"] = $PSBoundParameters["Feature"] + $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 index 861aa8265c..b0392069da 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 @@ -6,17 +6,17 @@ function New-EntraBetaIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Type, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $ClientId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ClientSecret, + [System.String] $Type, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Name + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ClientSecret ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 index aad5cefb98..7783ad0746 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 @@ -7,28 +7,28 @@ function New-EntraBetaInvitation { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $SendInvitationMessage, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.User] $InvitedUser, + [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo, + [System.Nullable`1[System.Boolean]] $ResetRedemption, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $InvitedUserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ResetRedemption, + [System.String] $InvitedUserDisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $InvitedUserEmailAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $InvitedUserDisplayName, + [System.Nullable`1[System.Boolean]] $SendInvitationMessage, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $InviteRedirectUrl, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $InvitedUserEmailAddress + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.User] $InvitedUser ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 index b9439f7a4d..6ff58c0e37 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 @@ -7,25 +7,25 @@ function New-EntraBetaNamedLocationPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $OdataType, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsTrusted, + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, + [System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, + [System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 index bc3aad0100..70956d7262 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 @@ -7,10 +7,7 @@ function New-EntraBetaPermissionGrantConditionSet { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionClassification, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + [System.String] $ResourceApplication, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $Permissions, @@ -18,23 +15,26 @@ function New-EntraBetaPermissionGrantConditionSet { [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $PolicyId, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + [System.String] $PermissionType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionType, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResourceApplication, + [System.String] $PermissionClassification, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 index f2aabeaece..4bdc97f991 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 @@ -7,10 +7,10 @@ function New-EntraBetaPermissionGrantPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Description @@ -20,25 +20,21 @@ function New-EntraBetaPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Id"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { @@ -48,37 +44,41 @@ function New-EntraBetaPermissionGrantPolicy { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 index aea901302a..525725d229 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 @@ -6,23 +6,23 @@ function New-EntraBetaPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Type, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsOrganizationDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AlternativeIdentifier, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[System.String]] $Definition, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AlternativeIdentifier, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DisplayName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Type, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsOrganizationDefault + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[System.String]] $Definition ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 index 26818bcb79..7dfcc442b3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 @@ -11,11 +11,11 @@ function New-EntraBetaTrustFrameworkPolicy { [Parameter(ParameterSetName = "File")] [System.String] $OutputFilePath, - [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $InputFilePath, - [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Content + [System.String] $Content, + + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $InputFilePath ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 index 097bdad52b..88cc5b6ebf 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaConditionalAccessPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 index 4d350076f8..7a34320a59 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaFeatureRolloutPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 index 5f8095a94b..28be009099 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 @@ -7,71 +7,71 @@ function Remove-EntraBetaFeatureRolloutPolicyDirectoryObject { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 index b4217f874b..2970f6c56c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaIdentityProvider { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 index 51025be063..ea9ee584f4 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaNamedLocationPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 index 62c20b9842..3134aed672 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ObjectId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaOAuth2PermissionGrant { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 index 78b116ec91..8ffdf83107 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 @@ -7,13 +7,13 @@ function Remove-EntraBetaPermissionGrantConditionSet { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $PolicyId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [System.String] $ConditionSetType, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType + [System.String] $Id ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 index fbfbbab1de..b7565ce9af 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 index d041c7b970..579f170a1d 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 @@ -7,10 +7,10 @@ function Remove-EntraBetaServicePrincipalPolicy { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $PolicyId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId + [System.String] $Id ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 index 3557ccdccf..c094de018f 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaTrustFrameworkPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["TrustFrameworkPolicyId"] = $PSBoundParameters["Id"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["TrustFrameworkPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 index 3a37dd8b95..69c05bae68 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 @@ -6,29 +6,26 @@ function Set-EntraBetaAuthorizationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $PermissionGrantPolicyIdsAssignedToDefaultUserRole, + [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, + [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $EnabledPreviewFeatures, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.String] $DisplayName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, + [System.Collections.Generic.List`1[System.String]] $PermissionGrantPolicyIdsAssignedToDefaultUserRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, @@ -36,6 +33,9 @@ function Set-EntraBetaAuthorizationPolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $GuestUserRoleId ) @@ -44,86 +44,74 @@ function Set-EntraBetaAuthorizationPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["AuthorizationPolicyId"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] } - if ($null -ne $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] = $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) + if ($null -ne $PSBoundParameters["EnabledPreviewFeatures"]) { - $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] + $params["EnabledPreviewFeatures"] = $PSBoundParameters["EnabledPreviewFeatures"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["EnabledPreviewFeatures"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["EnabledPreviewFeatures"] = $PSBoundParameters["EnabledPreviewFeatures"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["Description"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Description"] = $PSBoundParameters["Description"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] + $params["AuthorizationPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] = $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] } - if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) { $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) { $TmpValue = $PSBoundParameters["DefaultUserRolePermissions"] @@ -135,9 +123,21 @@ function Set-EntraBetaAuthorizationPolicy { $Value = $hash $params["DefaultUserRolePermissions"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) + { + $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["GuestUserRoleId"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 index 001908caf7..9041ee0ed1 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 @@ -9,130 +9,66 @@ function Set-EntraBetaConditionalAccessPolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $ModifiedDateTime, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreatedDateTime, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, + [System.String] $CreatedDateTime, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } if ($null -ne $PSBoundParameters["ModifiedDateTime"]) { $params["ModifiedDateTime"] = $PSBoundParameters["ModifiedDateTime"] } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["Id"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["CreatedDateTime"]) - { - $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["State"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["State"] = $PSBoundParameters["State"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($null -ne $PSBoundParameters["Conditions"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["Conditions"] - if($TmpValue.Applications){ - $Applications=@{} - $Applications["IncludeApplications"] = $TmpValue.Applications.IncludeApplications - $Applications["ExcludeApplications"] = $TmpValue.Applications.ExcludeApplications - $Applications["IncludeUserActions"] = $TmpValue.Applications.IncludeUserActions - $Applications["IncludeProtectionLevels"] = $TmpValue.Applications.IncludeProtectionLevels - } - if($TmpValue.Locations){ - $Locations = @{} - $Locations["IncludeLocations"] = $TmpValue.Locations.IncludeLocations - $Locations["ExcludeLocations"] = $TmpValue.Locations.ExcludeLocations - } - if($TmpValue.Platforms){ - $Platforms = @{} - $Platforms["IncludePlatforms"] = $TmpValue.Platforms.IncludePlatforms - $Platforms["ExcludePlatforms"] = $TmpValue.Platforms.ExcludePlatforms - } - if($TmpValue.Users){ - $Users = @{} - $Users["IncludeUsers"] = $TmpValue.Users.IncludeUsers - $Users["ExcludeUsers"] = $TmpValue.Users.ExcludeUsers - $Users["IncludeGroups"] = $TmpValue.Users.IncludeGroups - $Users["ExcludeGroups"] = $TmpValue.Users.ExcludeGroups - $Users["IncludeRoles"] = $TmpValue.Users.IncludeRoles - $Users["ExcludeRoles"] = $TmpValue.Users.ExcludeRoles - } - - $hash = @{} - if($TmpValue.Applications) {$hash["Applications"] = $Applications } - if($TmpValue.ClientAppTypes) { $hash["ClientAppTypes"] = $TmpValue.ClientAppTypes } - if($TmpValue.Locations) { $hash["Locations"] = $Locations } - if($TmpValue.Platforms) { $hash["Platforms"] = $Platforms } - if($TmpValue.SignInRiskLevels) { $hash["SignInRiskLevels"] = $TmpValue.SignInRiskLevels } - if($TmpValue.Users) { $hash["Users"] = $Users } - $Value = $hash - $params["Conditions"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["GrantControls"]) { @@ -145,13 +81,9 @@ function Set-EntraBetaConditionalAccessPolicy { $Value = $hash $params["GrantControls"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["CreatedDateTime"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] } if($null -ne $PSBoundParameters["SessionControls"]) { @@ -185,13 +117,81 @@ function Set-EntraBetaConditionalAccessPolicy { $Value = $hash $params["SessionControls"] = $Value } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["State"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["State"] = $PSBoundParameters["State"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if($null -ne $PSBoundParameters["Conditions"]) + { + $TmpValue = $PSBoundParameters["Conditions"] + if($TmpValue.Applications){ + $Applications=@{} + $Applications["IncludeApplications"] = $TmpValue.Applications.IncludeApplications + $Applications["ExcludeApplications"] = $TmpValue.Applications.ExcludeApplications + $Applications["IncludeUserActions"] = $TmpValue.Applications.IncludeUserActions + $Applications["IncludeProtectionLevels"] = $TmpValue.Applications.IncludeProtectionLevels + } + if($TmpValue.Locations){ + $Locations = @{} + $Locations["IncludeLocations"] = $TmpValue.Locations.IncludeLocations + $Locations["ExcludeLocations"] = $TmpValue.Locations.ExcludeLocations + } + if($TmpValue.Platforms){ + $Platforms = @{} + $Platforms["IncludePlatforms"] = $TmpValue.Platforms.IncludePlatforms + $Platforms["ExcludePlatforms"] = $TmpValue.Platforms.ExcludePlatforms + } + if($TmpValue.Users){ + $Users = @{} + $Users["IncludeUsers"] = $TmpValue.Users.IncludeUsers + $Users["ExcludeUsers"] = $TmpValue.Users.ExcludeUsers + $Users["IncludeGroups"] = $TmpValue.Users.IncludeGroups + $Users["ExcludeGroups"] = $TmpValue.Users.ExcludeGroups + $Users["IncludeRoles"] = $TmpValue.Users.IncludeRoles + $Users["ExcludeRoles"] = $TmpValue.Users.ExcludeRoles + } + + $hash = @{} + if($TmpValue.Applications) {$hash["Applications"] = $Applications } + if($TmpValue.ClientAppTypes) { $hash["ClientAppTypes"] = $TmpValue.ClientAppTypes } + if($TmpValue.Locations) { $hash["Locations"] = $Locations } + if($TmpValue.Platforms) { $hash["Platforms"] = $Platforms } + if($TmpValue.SignInRiskLevels) { $hash["SignInRiskLevels"] = $TmpValue.SignInRiskLevels } + if($TmpValue.Users) { $hash["Users"] = $Users } + $Value = $hash + $params["Conditions"] = $Value } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 index ab37100724..c714f1640c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 @@ -6,20 +6,20 @@ function Set-EntraBetaFeatureRolloutPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, + [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Description, @@ -32,82 +32,82 @@ function Set-EntraBetaFeatureRolloutPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) { $params["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["AppliesTo"]) - { - $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Feature"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Feature"] = $PSBoundParameters["Feature"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["Feature"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Feature"] = $PSBoundParameters["Feature"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["AppliesTo"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["IsEnabled"]) { $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 index 23873079b9..e88a42f1e8 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 @@ -6,29 +6,29 @@ function Set-EntraBetaNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $OdataType, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsTrusted, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, + [System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Id, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 index c7dc4d01c0..2d47652733 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 @@ -6,11 +6,8 @@ function Set-EntraBetaPermissionGrantConditionSet { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + [System.String] $ResourceApplication, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $Permissions, @@ -18,26 +15,29 @@ function Set-EntraBetaPermissionGrantConditionSet { [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $PolicyId, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionType, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ConditionSetType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $PermissionClassification, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResourceApplication, + [System.String] $PermissionType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 index 564ffd9d56..f66a237ec9 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 @@ -6,12 +6,12 @@ function Set-EntraBetaPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Description ) @@ -20,65 +20,65 @@ function Set-EntraBetaPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["Description"]) { $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 index 0b75488400..92cce1f914 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 @@ -6,26 +6,26 @@ function Set-EntraBetaPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AlternativeIdentifier, + [System.Nullable`1[System.Boolean]] $IsOrganizationDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Definition, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Type, + [System.String] $AlternativeIdentifier, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [System.String] $Type, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsOrganizationDefault + [System.Collections.Generic.List`1[System.String]] $Definition ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 index bb6ea05195..9c381c06a1 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 @@ -6,21 +6,21 @@ function Set-EntraBetaTrustFrameworkPolicy { [CmdletBinding(DefaultParameterSetName = 'Content')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "Content")] [Parameter(ParameterSetName = "File")] - [System.String] $Id, + [System.String] $OutputFilePath, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Content, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "Content")] [Parameter(ParameterSetName = "File")] - [System.String] $OutputFilePath, + [System.String] $Id, [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $InputFilePath, - - [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Content + [System.String] $InputFilePath ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 new file mode 100644 index 0000000000..1c1062114c --- /dev/null +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Enable-EntraAzureADAliases { + Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraBetaUserMembership -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraBetaUserOwnedDevice -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Set-AzureADUserManager -Value Set-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraBetaUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraBetaUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraBetaUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraBetaUserOwnedObject -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraBetaUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraBetaUserRegisteredDevice -Scope Global -Force + Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraBetaUserLicenseDetail -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraBetaUserDirectReport -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraBetaUser -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraBetaUserCreatedObject -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraBetaUser -Scope Global -Force + Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraBetaUserLicense -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraBetaSignedInUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraBetaUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraBetaUserPassword -Scope Global -Force + Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + +} diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 index 4ed9a5953f..671b882e2b 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 @@ -6,12 +6,12 @@ function Get-EntraBetaUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ObjectId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaUserAppRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaUserAppRoleAssignment { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) - { - $params["UserId"] = $PSBoundParameters["ObjectId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 index e33fb1728c..5933b81d5f 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 @@ -16,25 +16,17 @@ function Get-EntraBetaUserLicenseDetail { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["UserId"]) { @@ -44,29 +36,37 @@ function Get-EntraBetaUserLicenseDetail { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 index d948a39fcb..c47916135d 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 @@ -5,13 +5,13 @@ function Get-EntraBetaUserMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UserId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaUserMembership { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaUserMembership { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) - { - $params["UserId"] = $PSBoundParameters["UserId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 index 4891cdff65..87c171c121 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 @@ -6,12 +6,12 @@ function Get-EntraBetaUserOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ObjectId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] @@ -22,13 +22,25 @@ function Get-EntraBetaUserOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["ObjectId"]) + { + $params["UserId"] = $PSBoundParameters["ObjectId"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["All"]) { @@ -37,53 +49,41 @@ function Get-EntraBetaUserOAuth2PermissionGrant { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) - { - $params["UserId"] = $PSBoundParameters["ObjectId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Top"] = $PSBoundParameters["Top"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 index 75733bcda8..65f2038a0e 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 @@ -5,15 +5,15 @@ function Get-EntraBetaUserThumbnailPhoto { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FileName, + [System.String] $FilePath, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FilePath, + [System.String] $FileName, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Boolean] $View, @@ -25,25 +25,25 @@ function Get-EntraBetaUserThumbnailPhoto { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["FilePath"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["FilePath"] = $PSBoundParameters["FilePath"] + } + if ($null -ne $PSBoundParameters["FileName"]) + { + $params["FileName"] = $PSBoundParameters["FileName"] } if ($null -ne $PSBoundParameters["UserId"]) { @@ -53,41 +53,41 @@ function Get-EntraBetaUserThumbnailPhoto { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["FileName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["FileName"] = $PSBoundParameters["FileName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["FilePath"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["FilePath"] = $PSBoundParameters["FilePath"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["View"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["View"] = $PSBoundParameters["View"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["View"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["View"] = $PSBoundParameters["View"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 index 4e866fdb60..16c1e3b342 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 @@ -1,7 +1,7 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function New-EntraBetaCustomHeaders { <# .SYNOPSIS @@ -25,4 +25,5 @@ function New-EntraBetaCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -} +}# ------------------------------------------------------------------------------ + diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 index 5ff9fb5915..b9a46bc8d8 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 @@ -7,106 +7,106 @@ function New-EntraBetaUser { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CompanyName, + [System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Surname, + [System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $JobTitle, + [System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ImmutableId, + [System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AgeGroup, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GivenName, + [System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OtherMails, + [System.String] $City, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TelephoneNumber, + [System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ConsentProvidedForMinor, + [System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $City, + [System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ShowInAddressList, + [System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserPrincipalName, + [System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $FacsimileTelephoneNumber, + [System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickName, + [System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserType, + [System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserStateChangedOn, + [System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + [System.Nullable`1[System.Boolean]] $IsCompromised, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Country, + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PostalCode, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UsageLocation, + [System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserState, + [System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Mobile, + [System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Department, + [System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PreferredLanguage, + [System.String] $UserStateChangedOn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + [System.String] $GivenName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompromised, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PhysicalDeliveryOfficeName, + [System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreationType, + [System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $StreetAddress, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PasswordPolicies + [System.String] $Mobile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 index 22be40db7c..b7d8ff27a2 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 @@ -6,86 +6,86 @@ function New-EntraBetaUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["AppRoleId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["AppRoleId"] = $PSBoundParameters["Id"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 index 245fba5620..ab3342f351 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaUser { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["UserId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaUser { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 index 54d5ce9b81..549d0f40f3 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 @@ -7,36 +7,24 @@ function Remove-EntraBetaUserAppRoleAssignment { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [System.String] $AppRoleAssignmentId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AppRoleAssignmentId + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if ($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] @@ -45,33 +33,45 @@ function Remove-EntraBetaUserAppRoleAssignment { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 index 77f52d5408..f168ec5c4b 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 @@ -6,44 +6,32 @@ function Remove-EntraBetaUserExtension { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Collections.Generic.List`1[System.String]] $ExtensionNames, + [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ExtensionName, [Alias('ObjectId')] [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ExtensionId, - [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionName + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Generic.List`1[System.String]] $ExtensionNames ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["ExtensionNames"]) - { - $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ExtensionName"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } if ($null -ne $PSBoundParameters["ExtensionId"]) { @@ -53,33 +41,45 @@ function Remove-EntraBetaUserExtension { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ExtensionName"]) + if ($null -ne $PSBoundParameters["ExtensionNames"]) { - $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 index 5e9db09cde..9c2c5e1fbd 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 @@ -14,25 +14,17 @@ function Remove-EntraBetaUserManager { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["UserId"]) { @@ -42,29 +34,37 @@ function Remove-EntraBetaUserManager { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 index c18fd9d6c4..83a0491f5b 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 @@ -7,308 +7,308 @@ function Set-EntraBetaUser { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CompanyName, + [System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Surname, + [System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $JobTitle, + [System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AgeGroup, + [System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GivenName, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OtherMails, + [System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ImmutableId, + [System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TelephoneNumber, + [System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ConsentProvidedForMinor, + [System.String] $FacsimileTelephoneNumber, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $City, + [System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ShowInAddressList, + [System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserPrincipalName, + [System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserStateChangedOn, + [System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $FacsimileTelephoneNumber, + [System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickName, + [System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserType, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId, + [System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + [System.Nullable`1[System.Boolean]] $IsCompromised, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Country, + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PostalCode, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UsageLocation, + [System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserState, + [System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Mobile, + [System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Department, + [System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PreferredLanguage, + [System.String] $UserStateChangedOn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + [System.String] $GivenName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompromised, + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PhysicalDeliveryOfficeName, + [System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreationType, + [System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $StreetAddress, + [System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PasswordPolicies + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["CompanyName"]) - { - $params["CompanyName"] = $PSBoundParameters["CompanyName"] - } - if ($null -ne $PSBoundParameters["Surname"]) - { - $params["Surname"] = $PSBoundParameters["Surname"] - } if ($null -ne $PSBoundParameters["JobTitle"]) { $params["JobTitle"] = $PSBoundParameters["JobTitle"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["PreferredLanguage"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] } - if ($null -ne $PSBoundParameters["AgeGroup"]) + if ($null -ne $PSBoundParameters["CreationType"]) { - $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] + $params["CreationType"] = $PSBoundParameters["CreationType"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["MailNickName"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["MailNickName"] = $PSBoundParameters["MailNickName"] } - if ($null -ne $PSBoundParameters["GivenName"]) + if ($null -ne $PSBoundParameters["State"]) { - $params["GivenName"] = $PSBoundParameters["GivenName"] + $params["State"] = $PSBoundParameters["State"] } - if ($null -ne $PSBoundParameters["OtherMails"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OtherMails"] = $PSBoundParameters["OtherMails"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ImmutableId"]) + if ($null -ne $PSBoundParameters["Department"]) { - $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] + $params["Department"] = $PSBoundParameters["Department"] } - if ($null -ne $PSBoundParameters["TelephoneNumber"]) + if ($null -ne $PSBoundParameters["City"]) { - $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] + $params["City"] = $PSBoundParameters["City"] } - if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + if ($null -ne $PSBoundParameters["ShowInAddressList"]) { - $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] + $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] } - if($null -ne $PSBoundParameters["PasswordProfile"]) + if ($null -ne $PSBoundParameters["OtherMails"]) { - $TmpValue = $PSBoundParameters["PasswordProfile"] - $Value = @{ - forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin - forceChangePasswordNextSignInWithMfa = $TmpValue.EnforceChangePasswordPolicy - password = $TmpValue.Password - } - $params["PasswordProfile"] = $Value + $params["OtherMails"] = $PSBoundParameters["OtherMails"] } - if ($null -ne $PSBoundParameters["City"]) + if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) { - $params["City"] = $PSBoundParameters["City"] + $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] } - if ($null -ne $PSBoundParameters["ShowInAddressList"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["UserPrincipalName"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserStateChangedOn"]) + if ($null -ne $PSBoundParameters["AccountEnabled"]) { - $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } - if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) + if ($null -ne $PSBoundParameters["UserState"]) { - $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] + $params["ExternalUserState"] = $PSBoundParameters["UserState"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["MailNickName"]) + if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) { - $params["MailNickName"] = $PSBoundParameters["MailNickName"] + $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] } - if ($null -ne $PSBoundParameters["UserType"]) + if ($null -ne $PSBoundParameters["PasswordPolicies"]) { - $params["UserType"] = $PSBoundParameters["UserType"] + $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["AgeGroup"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] } - if ($null -ne $PSBoundParameters["ExtensionProperty"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["CompanyName"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["CompanyName"] = $PSBoundParameters["CompanyName"] + } + if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + { + $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] } if ($null -ne $PSBoundParameters["Country"]) { $params["Country"] = $PSBoundParameters["Country"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IsCompromised"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] } - if ($null -ne $PSBoundParameters["PostalCode"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PostalCode"] = $PSBoundParameters["PostalCode"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ExtensionProperty"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["SignInNames"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Identities"] = $PSBoundParameters["SignInNames"] } - if ($null -ne $PSBoundParameters["UsageLocation"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["UserState"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ExternalUserState"] = $PSBoundParameters["UserState"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Mobile"]) + if ($null -ne $PSBoundParameters["TelephoneNumber"]) { - $params["MobilePhone"] = $PSBoundParameters["Mobile"] + $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] } - if ($null -ne $PSBoundParameters["Department"]) + if ($null -ne $PSBoundParameters["StreetAddress"]) { - $params["Department"] = $PSBoundParameters["Department"] + $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] } - if ($null -ne $PSBoundParameters["PreferredLanguage"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["SignInNames"]) + if ($null -ne $PSBoundParameters["ImmutableId"]) { - $params["Identities"] = $PSBoundParameters["SignInNames"] + $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["UserType"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserType"] = $PSBoundParameters["UserType"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["UserStateChangedOn"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GivenName"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GivenName"] = $PSBoundParameters["GivenName"] } - if ($null -ne $PSBoundParameters["IsCompromised"]) + if($null -ne $PSBoundParameters["PasswordProfile"]) { - $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + $TmpValue = $PSBoundParameters["PasswordProfile"] + $Value = @{ + forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin + forceChangePasswordNextSignInWithMfa = $TmpValue.EnforceChangePasswordPolicy + password = $TmpValue.Password + } + $params["PasswordProfile"] = $Value } - if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) + if ($null -ne $PSBoundParameters["UsageLocation"]) { - $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] + $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] } - if ($null -ne $PSBoundParameters["CreationType"]) + if ($null -ne $PSBoundParameters["UserPrincipalName"]) { - $params["CreationType"] = $PSBoundParameters["CreationType"] + $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] } - if ($null -ne $PSBoundParameters["StreetAddress"]) + if ($null -ne $PSBoundParameters["Surname"]) { - $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] + $params["Surname"] = $PSBoundParameters["Surname"] } - if ($null -ne $PSBoundParameters["AccountEnabled"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["State"]) + if ($null -ne $PSBoundParameters["PostalCode"]) { - $params["State"] = $PSBoundParameters["State"] + $params["PostalCode"] = $PSBoundParameters["PostalCode"] } - if ($null -ne $PSBoundParameters["PasswordPolicies"]) + if ($null -ne $PSBoundParameters["Mobile"]) { - $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] + $params["MobilePhone"] = $PSBoundParameters["Mobile"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 index fd497c04a0..23cc509e8f 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 @@ -7,46 +7,38 @@ function Set-EntraBetaUserExtension { param ( [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionValue, + [System.String] $ExtensionName, [Alias('ObjectId')] [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, - [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionNameValues, - [Parameter(ParameterSetName = "SetSingle", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionName + [System.String] $ExtensionValue, + + [Parameter(ParameterSetName = "SetMultiple", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionNameValues ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["ExtensionValue"]) + if ($null -ne $PSBoundParameters["ExtensionName"]) { - $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["Id"]) { @@ -56,37 +48,45 @@ function Set-EntraBetaUserExtension { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ExtensionNameValues"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ExtensionValue"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] } - if ($null -ne $PSBoundParameters["ExtensionName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ExtensionNameValues"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 index b0362bff2b..4ef8ee927e 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 @@ -7,10 +7,10 @@ function Set-EntraBetaUserLicense { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.AssignedLicenses] $AssignedLicenses, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.AssignedLicenses] $AssignedLicenses ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 index 21e7f5d1cf..230339a18e 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 @@ -5,75 +5,75 @@ function Set-EntraBetaUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId + [System.String] $UserId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $RefObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["UserId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 index 6bf3c064ce..2ab8caf7d9 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 @@ -9,14 +9,14 @@ function Set-EntraBetaUserPassword { [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ObjectId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $EnforceChangePasswordPolicy, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Security.SecureString] $Password, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Boolean] $ForceChangePasswordNextLogin, - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Boolean] $EnforceChangePasswordPolicy + [System.Boolean] $ForceChangePasswordNextLogin ) PROCESS { diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 index ae03459a12..e6640a9343 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 @@ -8,47 +8,43 @@ function Set-EntraBetaUserThumbnailPhoto { [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.IO.Stream] $FileStream, + + [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Byte[]] $ImageByteArray, + + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "Stream")] [Parameter(ParameterSetName = "File")] [Parameter(ParameterSetName = "ByteArray")] - [System.String] $UserId, - - [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FilePath, - - [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Byte[]] $ImageByteArray + [System.String] $UserId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } if ($null -ne $PSBoundParameters["FileStream"]) { $params["FileStream"] = $PSBoundParameters["FileStream"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ImageByteArray"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] + } + if ($null -ne $PSBoundParameters["FilePath"]) + { + $params["InFile"] = $PSBoundParameters["FilePath"] } if ($null -ne $PSBoundParameters["UserId"]) { @@ -58,37 +54,41 @@ function Set-EntraBetaUserThumbnailPhoto { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["FilePath"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["InFile"] = $PSBoundParameters["FilePath"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ImageByteArray"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 index b2815c8141..a00c8292ee 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 @@ -7,10 +7,10 @@ function Update-EntraBetaSignedInUserPassword { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Security.SecureString] $CurrentPassword, + [System.Security.SecureString] $NewPassword, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Security.SecureString] $NewPassword + [System.Security.SecureString] $CurrentPassword ) PROCESS { diff --git a/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 b/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/moduleVNext/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 deleted file mode 100644 index 16c1e3b342..0000000000 --- a/moduleVNext/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraBetaCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .EXAMPLE - New-EntraBetaCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 893bfc772b..4b3d31c1c6 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -168,7 +168,7 @@ class EntraModuleSplitter { $functionNames =if($moduleName -eq 'Microsoft.Graph.Entra'){ @("New-EntraCustomHeaders", "Get-EntraUnsupportedCommand") - }else if($moduleName -eq 'Microsoft.Graph.Entra.Beta'){ + }else{ @("New-EntraBetaCustomHeaders","Get-EntraBetaUnsupportedCommand") } From 7a274a0447bc2d50a8d7760051a764549b0111d1 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:56:40 +0300 Subject: [PATCH 091/124] clean up --- src/EntraModuleBuilder.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 615a29abb3..dfa543c98f 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -234,9 +234,6 @@ Set-StrictMode -Version 5 # Set execution policy to ensure scripts can be executed Set-ExecutionPolicy RemoteSigned -Scope Process -Force -# Log that the module is being loaded -Write-Host 'Entra.psm1 is being loaded...' - # Import all sub-modules dynamically `$subModules = @( "@ From b13532e66f2698cc9526014e1e2c0612b385c1ed Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:02:00 +0300 Subject: [PATCH 092/124] clean up --- src/TypeDefs.txt | 771 ----------------------------------------------- 1 file changed, 771 deletions(-) delete mode 100644 src/TypeDefs.txt diff --git a/src/TypeDefs.txt b/src/TypeDefs.txt deleted file mode 100644 index 1465a1ad21..0000000000 --- a/src/TypeDefs.txt +++ /dev/null @@ -1,771 +0,0 @@ -# ------------------------------------------------------------------------------ -# Type definitios required for commands inputs -# ------------------------------------------------------------------------------ - -$def = @" - -namespace Microsoft.Open.AzureAD.Graph.PowerShell.Custom -{ - - using System.Linq; - public enum KeyType{ - Symmetric = 0, - AsymmetricX509Cert = 1, - } - public enum KeyUsage{ - Sign = 0, - Verify = 1, - Decrypt = 2, - Encrypt = 3, - } -} - -namespace Microsoft.Open.AzureAD.Model -{ - - using System.Linq; - public class AlternativeSecurityId - { - public System.String IdentityProvider; - public System.Byte[] Key; - public System.Nullable Type; - - } - public class AppRole - { - public System.Collections.Generic.List AllowedMemberTypes; - public System.String Description; - public System.String DisplayName; - public System.String Id; - public System.Nullable IsEnabled; - public System.String Origin; - public System.String Value; - } - public class AssignedLicense - { - public System.Collections.Generic.List DisabledPlans; - public System.String SkuId; - - } - public class AssignedLicenses - { - public System.Collections.Generic.List AddLicenses; - public System.Collections.Generic.List RemoveLicenses; - - } - public class CertificateAuthorityInformation - { - public enum AuthorityTypeEnum{ - RootAuthority = 0, - IntermediateAuthority = 1, - } - public System.Nullable AuthorityType; - public System.String CrlDistributionPoint; - public System.String DeltaCrlDistributionPoint; - public System.Byte[] TrustedCertificate; - public System.String TrustedIssuer; - public System.String TrustedIssuerSki; - - } - public class CrossCloudVerificationCodeBody - { - public System.String CrossCloudVerificationCode; - public CrossCloudVerificationCodeBody() - { - } - - public CrossCloudVerificationCodeBody(System.String value) - { - CrossCloudVerificationCode = value; - } - } - public class GroupIdsForMembershipCheck - { - public System.Collections.Generic.List GroupIds; - public GroupIdsForMembershipCheck() - { - } - - public GroupIdsForMembershipCheck(System.Collections.Generic.List value) - { - GroupIds = value; - } - } - public class KeyCredential - { - public System.Byte[] CustomKeyIdentifier; - public System.Nullable EndDate; - public System.String KeyId; - public System.Nullable StartDate; - public System.String Type; - public System.String Usage; - public System.Byte[] Value; - - } - public class PasswordCredential - { - public System.Byte[] CustomKeyIdentifier; - public System.Nullable EndDate; - public System.String KeyId; - public System.Nullable StartDate; - public System.String Value; - - } - public class PasswordProfile - { - public System.String Password; - public System.Nullable ForceChangePasswordNextLogin; - public System.Nullable EnforceChangePasswordPolicy; - - } - public class PrivacyProfile - { - public System.String ContactEmail; - public System.String StatementUrl; - - } - public class SignInName - { - public System.String Type; - public System.String Value; - - } -} - -namespace Microsoft.Open.MSGraph.Model -{ - - using System.Linq; - public class AddIn - { - public System.String Id; - public System.String Type; - public System.Collections.Generic.List Properties; - - } - public class ApiApplication - { - public System.Nullable AcceptMappedClaims; - public System.Collections.Generic.List KnownClientApplications; - public System.Collections.Generic.List PreAuthorizedApplications; - public System.Nullable RequestedAccessTokenVersion; - public System.Collections.Generic.List Oauth2PermissionScopes; - - } - public class AppRole - { - public System.Collections.Generic.List AllowedMemberTypes; - public System.String Description; - public System.String DisplayName; - public System.String Id; - public System.Nullable IsEnabled; - public System.String Origin; - public System.String Value; - - } - public class ConditionalAccessApplicationCondition - { - public System.Collections.Generic.List IncludeApplications; - public System.Collections.Generic.List ExcludeApplications; - public System.Collections.Generic.List IncludeUserActions; - public System.Collections.Generic.List IncludeProtectionLevels; - - } - public class ConditionalAccessApplicationEnforcedRestrictions - { - public System.Nullable IsEnabled; - public ConditionalAccessApplicationEnforcedRestrictions() - { - } - - public ConditionalAccessApplicationEnforcedRestrictions(System.Nullable value) - { - IsEnabled = value; - } - } - public class ConditionalAccessCloudAppSecurity - { - public enum CloudAppSecurityTypeEnum{ - McasConfigured = 0, - MonitorOnly = 1, - BlockDownloads = 2, - } - public System.Nullable CloudAppSecurityType; - public System.Nullable IsEnabled; - - } - public class ConditionalAccessConditionSet - { - public Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationCondition Applications; - public Microsoft.Open.MSGraph.Model.ConditionalAccessUserCondition Users; - public Microsoft.Open.MSGraph.Model.ConditionalAccessPlatformCondition Platforms; - public Microsoft.Open.MSGraph.Model.ConditionalAccessLocationCondition Locations; - public enum ConditionalAccessRiskLevel{ - Low = 0, - Medium = 1, - High = 2, - Hidden = 3, - None = 4, - UnknownFutureValue = 5, - } - public System.Collections.Generic.List SignInRiskLevels; - public enum ConditionalAccessClientApp{ - All = 0, - Browser = 1, - MobileAppsAndDesktopClients = 2, - ExchangeActiveSync = 3, - EasSupported = 4, - Other = 5, - } - public System.Collections.Generic.List ClientAppTypes; - - } - public class ConditionalAccessGrantControls - { - public System.String _Operator; - public enum ConditionalAccessGrantControl{ - Block = 0, - Mfa = 1, - CompliantDevice = 2, - DomainJoinedDevice = 3, - ApprovedApplication = 4, - CompliantApplication = 5, - PasswordChange = 6, - } - public System.Collections.Generic.List BuiltInControls; - public System.Collections.Generic.List CustomAuthenticationFactors; - public System.Collections.Generic.List TermsOfUse; - - } - public class ConditionalAccessLocationCondition - { - public System.Collections.Generic.List IncludeLocations; - public System.Collections.Generic.List ExcludeLocations; - - } - public class ConditionalAccessPersistentBrowser - { - public enum ModeEnum{ - Always = 0, - Never = 1, - } - public System.Nullable Mode; - public System.Nullable IsEnabled; - - } - public class ConditionalAccessPlatformCondition - { - public enum ConditionalAccessDevicePlatforms{ - Android = 0, - IOS = 1, - Windows = 2, - WindowsPhone = 3, - MacOS = 4, - All = 5, - } - public System.Collections.Generic.List IncludePlatforms; - public System.Collections.Generic.List ExcludePlatforms; - - } - public class ConditionalAccessSessionControls - { - public Microsoft.Open.MSGraph.Model.ConditionalAccessApplicationEnforcedRestrictions ApplicationEnforcedRestrictions; - public Microsoft.Open.MSGraph.Model.ConditionalAccessCloudAppSecurity CloudAppSecurity; - public Microsoft.Open.MSGraph.Model.ConditionalAccessSignInFrequency SignInFrequency; - public Microsoft.Open.MSGraph.Model.ConditionalAccessPersistentBrowser PersistentBrowser; - - } - public class ConditionalAccessSignInFrequency - { - public enum TypeEnum{ - Days = 0, - Hours = 1, - } - public System.Nullable Type; - public System.Nullable Value; - public System.Nullable IsEnabled; - - } - public class ConditionalAccessUserCondition - { - public System.Collections.Generic.List IncludeUsers; - public System.Collections.Generic.List ExcludeUsers; - public System.Collections.Generic.List IncludeGroups; - public System.Collections.Generic.List ExcludeGroups; - public System.Collections.Generic.List IncludeRoles; - public System.Collections.Generic.List ExcludeRoles; - - } - public enum CountriesAndRegion{ - AD = 0, - AE = 1, - AF = 2, - AG = 3, - AI = 4, - AL = 5, - AM = 6, - AN = 7, - AO = 8, - AQ = 9, - AR = 10, - AS = 11, - AT = 12, - AU = 13, - AW = 14, - AX = 15, - AZ = 16, - BA = 17, - BB = 18, - BD = 19, - BE = 20, - BF = 21, - BG = 22, - BH = 23, - BI = 24, - BJ = 25, - BL = 26, - BM = 27, - BN = 28, - BO = 29, - BQ = 30, - BR = 31, - BS = 32, - BT = 33, - BV = 34, - BW = 35, - BY = 36, - BZ = 37, - CA = 38, - CC = 39, - CD = 40, - CF = 41, - CG = 42, - CH = 43, - CI = 44, - CK = 45, - CL = 46, - CM = 47, - CN = 48, - CO = 49, - CR = 50, - CU = 51, - CV = 52, - CW = 53, - CX = 54, - CY = 55, - CZ = 56, - DE = 57, - DJ = 58, - DK = 59, - DM = 60, - DO = 61, - DZ = 62, - EC = 63, - EE = 64, - EG = 65, - EH = 66, - ER = 67, - ES = 68, - ET = 69, - FI = 70, - FJ = 71, - FK = 72, - FM = 73, - FO = 74, - FR = 75, - GA = 76, - GB = 77, - GD = 78, - GE = 79, - GF = 80, - GG = 81, - GH = 82, - GI = 83, - GL = 84, - GM = 85, - GN = 86, - GP = 87, - GQ = 88, - GR = 89, - GS = 90, - GT = 91, - GU = 92, - GW = 93, - GY = 94, - HK = 95, - HM = 96, - HN = 97, - HR = 98, - HT = 99, - HU = 100, - ID = 101, - IE = 102, - IL = 103, - IM = 104, - IN = 105, - IO = 106, - IQ = 107, - IR = 108, - IS = 109, - IT = 110, - JE = 111, - JM = 112, - JO = 113, - JP = 114, - KE = 115, - KG = 116, - KH = 117, - KI = 118, - KM = 119, - KN = 120, - KP = 121, - KR = 122, - KW = 123, - KY = 124, - KZ = 125, - LA = 126, - LB = 127, - LC = 128, - LI = 129, - LK = 130, - LR = 131, - LS = 132, - LT = 133, - LU = 134, - LV = 135, - LY = 136, - MA = 137, - MC = 138, - MD = 139, - ME = 140, - MF = 141, - MG = 142, - MH = 143, - MK = 144, - ML = 145, - MM = 146, - MN = 147, - MO = 148, - MP = 149, - MQ = 150, - MR = 151, - MS = 152, - MT = 153, - MU = 154, - MV = 155, - MW = 156, - MX = 157, - MY = 158, - MZ = 159, - NA = 160, - NC = 161, - NE = 162, - NF = 163, - NG = 164, - NI = 165, - NL = 166, - NO = 167, - NP = 168, - NR = 169, - NU = 170, - NZ = 171, - OM = 172, - PA = 173, - PE = 174, - PF = 175, - PG = 176, - PH = 177, - PK = 178, - PL = 179, - PM = 180, - PN = 181, - PR = 182, - PS = 183, - PT = 184, - PW = 185, - PY = 186, - QA = 187, - RE = 188, - RO = 189, - RS = 190, - RU = 191, - RW = 192, - SA = 193, - SB = 194, - SC = 195, - SD = 196, - SE = 197, - SG = 198, - SH = 199, - SI = 200, - SJ = 201, - SK = 202, - SL = 203, - SM = 204, - SN = 205, - SO = 206, - SR = 207, - SS = 208, - ST = 209, - SV = 210, - SX = 211, - SY = 212, - SZ = 213, - TC = 214, - TD = 215, - TF = 216, - TG = 217, - TH = 218, - TJ = 219, - TK = 220, - TL = 221, - TM = 222, - TN = 223, - TO = 224, - TR = 225, - TT = 226, - TV = 227, - TW = 228, - TZ = 229, - UA = 230, - UG = 231, - UM = 232, - US = 233, - UY = 234, - UZ = 235, - VA = 236, - VC = 237, - VE = 238, - VG = 239, - VI = 240, - VN = 241, - VU = 242, - WF = 243, - WS = 244, - YE = 245, - YT = 246, - ZA = 247, - ZM = 248, - ZW = 249, - } - public class DefaultUserRolePermissions - { - public System.Nullable AllowedToCreateApps; - public System.Nullable AllowedToCreateSecurityGroups; - public System.Nullable AllowedToReadOtherUsers; - public System.Collections.Generic.List PermissionGrantPoliciesAssigned; - - } - public class DelegatedPermissionClassification - { - public enum ClassificationEnum{ - Low = 0, - Medium = 1, - High = 2, - } - public System.Nullable Classification; - public System.String Id; - public System.String PermissionId; - public System.String PermissionName; - - } - public class EmailAddress - { - public System.String Name; - public System.String Address; - - } - public class ImplicitGrantSettings - { - public System.Nullable EnableIdTokenIssuance; - public System.Nullable EnableAccessTokenIssuance; - - } - public class InformationalUrl - { - public System.String TermsOfServiceUrl; - public System.String MarketingUrl; - public System.String PrivacyStatementUrl; - public System.String SupportUrl; - public System.String LogoUrl; - - } - public class InvitedUserMessageInfo - { - public System.Collections.Generic.List CcRecipients; - public System.String CustomizedMessageBody; - public System.String MessageLanguage; - - } - public class IpRange - { - public System.String CidrAddress; - public IpRange() - { - } - - public IpRange(System.String value) - { - CidrAddress = value; - } - } - public class KeyCredential - { - public System.Byte[] CustomKeyIdentifier; - public System.String DisplayName; - public System.Nullable EndDateTime; - public System.String KeyId; - public System.Nullable StartDateTime; - public System.String Type; - public System.String Usage; - public System.Byte[] Key; - - } - public class KeyValue - { - public System.String Key; - public System.String Value; - - } - public class MsDirectoryObject - { - public System.String Id; - public System.String OdataType; - } - public class MsRoleMemberInfo - { - public System.String Id; - } - public class OptionalClaim - { - public System.String Name; - public System.String Source; - public System.Nullable Essential; - public System.Collections.Generic.List AdditionalProperties; - - } - public class OptionalClaims - { - public System.Collections.Generic.List IdToken; - public System.Collections.Generic.List AccessToken; - public System.Collections.Generic.List Saml2Token; - - } - public class ParentalControlSettings - { - public enum LegalAgeGroupRuleEnum{ - Allow = 0, - RequireConsentForPrivacyServices = 1, - RequireConsentForMinors = 2, - RequireConsentForKids = 3, - BlockMinors = 4, - } - public System.Nullable LegalAgeGroupRule; - public System.Collections.Generic.List CountriesBlockedForMinors; - - } - public class PasswordCredential - { - public System.Byte[] CustomKeyIdentifier; - public System.Nullable EndDateTime; - public System.String DisplayName; - public System.String KeyId; - public System.Nullable StartDateTime; - public System.String SecretText; - public System.String Hint; - - } - public class PermissionScope - { - public System.String AdminConsentDescription; - public System.String AdminConsentDisplayName; - public System.String Id; - public System.Nullable IsEnabled; - public System.String Type; - public System.String UserConsentDescription; - public System.String UserConsentDisplayName; - public System.String Value; - - } - public class PreAuthorizedApplication - { - public System.String AppId; - public System.Collections.Generic.List DelegatedPermissionIds; - - } - public class PublicClientApplication - { - public System.Collections.Generic.List RedirectUris; - public PublicClientApplication() - { - } - - public PublicClientApplication(System.Collections.Generic.List value) - { - RedirectUris = value; - } - } - public class Recipient - { - public Microsoft.Open.MSGraph.Model.EmailAddress EmailAddress; - public Recipient() - { - } - - public Recipient(Microsoft.Open.MSGraph.Model.EmailAddress value) - { - EmailAddress = value; - } - } - public class RequiredResourceAccess - { - public System.String ResourceAppId; - public System.Collections.Generic.List ResourceAccess; - - } - public class ResourceAccess - { - public System.String Id; - public System.String Type; - - } - public class RolePermission - { - public System.Collections.Generic.List AllowedResourceActions; - public System.String Condition; - - } - public class SetVerifiedPublisherRequest - { - public System.String VerifiedPublisherId; - public SetVerifiedPublisherRequest() - { - } - - public SetVerifiedPublisherRequest(System.String value) - { - VerifiedPublisherId = value; - } - } - public class User - { - public System.String Id; - public System.String OdataType; - - } - public class WebApplication - { - public System.String HomePageUrl; - public System.String LogoutUrl; - public System.Collections.Generic.List RedirectUris; - public Microsoft.Open.MSGraph.Model.ImplicitGrantSettings ImplicitGrantSettings; - - } -} -"@ - try{ Add-Type -TypeDefinition $def } - catch{} - -# ------------------------------------------------------------------------------ -# End of Type definitios required for commands inputs -# ------------------------------------------------------------------------------ From 478594d99386c33c93339be3f4d8a89f80c6d4dc Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:25:40 +0300 Subject: [PATCH 093/124] Directory Harmonization --- build/Create-EntraModule.ps1 | 5 +++-- src/EntraModuleBuilder.ps1 | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 07eb62e356..ae95777f0d 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -10,9 +10,10 @@ param ( $moduleBuilder = [EntraModuleBuilder]::new() if($Module -eq 'Entra'){ - $typeDefsPath=".\build\V1.0-Typedefs.txt" + + $typeDefsPath=(Join-Path $PSScriptRoot "/V1.0-Typedefs.txt") }else{ - $typeDefsPath='.\build\Beta-TypeDefs.txt' + $typeDefsPath=(Join-Path $PSScriptRoot "/Beta-TypeDefs.txt") } $moduleBuilder.CreateModuleHelp($Module) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index dfa543c98f..bd53fb411a 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -20,9 +20,9 @@ Set-StrictMode -Version 5 "@ - $this.OutputDirectory = './bin/' - $this.TypeDefsDirectory="./build/TypeDefs.txt" - $this.BaseDocsPath='./moduleVNext/docs/' + $this.OutputDirectory = (Join-Path $PSScriptRoot '/bin/') + $this.TypeDefsDirectory=(Join-Path $PSScriptRoot "./build/TypeDefs.txt") + $this.BaseDocsPath=(Join-Path $PSScriptRoot '/moduleVNext/docs/') } @@ -125,9 +125,9 @@ Set-StrictMode -Version 5 [void] CreateSubModuleFile([string]$Module, [string]$typedefsFilePath=$this.TypeDefsDirectory) { # Determine the output path based on the module $startDirectory = if ($Module -eq "Entra") { - ".\moduleVNext\Entra\Microsoft.Graph.Entra" + (Join-Path $PSScripRoot "\moduleVNext\Entra\Microsoft.Graph.Entra") } else { - ".\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta" + (Join-Path $PSScriptRoot "\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta") } Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." @@ -264,9 +264,9 @@ foreach (`$subModule in `$subModules) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - "./moduleVNext/Entra" + (Join-Path $PSScriptRoot "/moduleVNext/Entra") } else { - "./moduleVNext/EntraBeta" + (Join-Path $PSScriptRoot "/moduleVNext/EntraBeta") } $moduleName=if($Module -eq 'Entra'){ @@ -344,15 +344,15 @@ foreach (`$subModule in `$subModules) { [void] CreateModuleManifest($module) { # Update paths specific to this sub-directory - $rootPath=if ($Module -eq "Entra") { - "./moduleVNext/Entra" + $rootPath=if ($Module -eq "Entra") { + (Join-Path $PSScriptRoot "/moduleVNext/Entra") } else { - "./moduleVNext/EntraBeta" + (Join-Path $PSScriptRoot "/moduleVNext/EntraBeta") } $moduleBasePath =if ($Module -eq "Entra") { - "./moduleVNext/Entra/Microsoft.Graph.Entra" + (Join-Path $rootPath "/Microsoft.Graph.Entra") } else { - "./moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta" + (Join-Path $rootPath "/Microsoft.Graph.Entra.Beta") } $subDirectories = Get-ChildItem -Path $moduleBasePath -Directory From 5de6d5a93091f2e69a9355ba0400a86e45b189e9 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:49:06 +0300 Subject: [PATCH 094/124] Directory Harmonization --- src/EntraModuleBuilder.ps1 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index bd53fb411a..f8a946b695 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -20,9 +20,9 @@ Set-StrictMode -Version 5 "@ - $this.OutputDirectory = (Join-Path $PSScriptRoot '/bin/') - $this.TypeDefsDirectory=(Join-Path $PSScriptRoot "./build/TypeDefs.txt") - $this.BaseDocsPath=(Join-Path $PSScriptRoot '/moduleVNext/docs/') + $this.OutputDirectory = (Join-Path $PSScriptRoot '../bin/') + $this.TypeDefsDirectory=(Join-Path $PSScriptRoot "../build/TypeDefs.txt") + $this.BaseDocsPath=(Join-Path $PSScriptRoot '../moduleVNext/docs/') } @@ -125,9 +125,9 @@ Set-StrictMode -Version 5 [void] CreateSubModuleFile([string]$Module, [string]$typedefsFilePath=$this.TypeDefsDirectory) { # Determine the output path based on the module $startDirectory = if ($Module -eq "Entra") { - (Join-Path $PSScripRoot "\moduleVNext\Entra\Microsoft.Graph.Entra") + (Join-Path $PSScriptRoot "..\moduleVNext\Entra\Microsoft.Graph.Entra") } else { - (Join-Path $PSScriptRoot "\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta") + (Join-Path $PSScriptRoot "..\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta") } Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." @@ -150,7 +150,7 @@ Set-StrictMode -Version 5 $parentDirPath = Get-Item $resolvedStartDirectory $parentDirName = $parentDirPath.Name - $destDirectory = Join-Path -Path (Get-Location) -ChildPath $this.OutputDirectory + $destDirectory = $this.OutputDirectory $this.EnsureDestinationDirectory($destDirectory) foreach ($subDir in $subDirectories) { @@ -264,9 +264,9 @@ foreach (`$subModule in `$subModules) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - (Join-Path $PSScriptRoot "/moduleVNext/Entra") + (Join-Path $PSScriptRoot "../moduleVNext/Entra") } else { - (Join-Path $PSScriptRoot "/moduleVNext/EntraBeta") + (Join-Path $PSScriptRoot "../moduleVNext/EntraBeta") } $moduleName=if($Module -eq 'Entra'){ @@ -345,9 +345,9 @@ foreach (`$subModule in `$subModules) { [void] CreateModuleManifest($module) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - (Join-Path $PSScriptRoot "/moduleVNext/Entra") + (Join-Path $PSScriptRoot "../moduleVNext/Entra") } else { - (Join-Path $PSScriptRoot "/moduleVNext/EntraBeta") + (Join-Path $PSScriptRoot "../moduleVNext/EntraBeta") } $moduleBasePath =if ($Module -eq "Entra") { (Join-Path $rootPath "/Microsoft.Graph.Entra") From 351e7b2a399d48268f2332e9e40b749ee7811d0e Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:14:34 +0300 Subject: [PATCH 095/124] Commented out call to create root psm1 file --- src/EntraModuleBuilder.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index f8a946b695..74ffe8709a 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -278,7 +278,7 @@ foreach (`$subModule in `$subModules) { $settingPath = Join-Path $rootPath -ChildPath "/config/ModuleMetadata.json" #We do not need to create a help file for the root module, since once the nested modules are loaded, their help will be available - $files = @("$($moduleName).psd1", "$($moduleName).psm1") + $files = @("$($moduleName).psd1") $content = Get-Content -Path $settingPath | ConvertFrom-Json $PSData = @{ Tags = $($content.tags) @@ -311,7 +311,6 @@ foreach (`$subModule in `$subModules) { Author = $($content.authors) CompanyName = $($content.owners) FileList = $files - RootModule = "$($moduleName).psm1" Description = 'Microsoft Graph Entra PowerShell.' DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) PowerShellVersion = $([System.Version]::Parse('5.1')) @@ -488,7 +487,7 @@ foreach (`$subModule in `$subModules) { #Create the Root Module Manifest - $this.CreateRootModuleManifest($module) + # $this.CreateRootModuleManifest($module) } From 89b1f7e4470503b58951aeb87fa31d99c2dd421d Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 11 Nov 2024 09:25:14 +0300 Subject: [PATCH 096/124] Inject RequiredModules section into Root Module Manifest (#1195) * Sub-Modules as RequiredModules Hack * Sub-Modules as RequiredModules Hack * Sub-Modules as RequiredModules Hack * Sub-Modules as RequiredModules Hack * Sub-Modules as RequiredModules Hack * Sub-Modules as RequiredModules Hack --- build/Create-EntraModule.ps1 | 14 +++++-- src/EntraModuleBuilder.ps1 | 77 ++++++++++++++++++++++++++++-------- 2 files changed, 71 insertions(+), 20 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index ae95777f0d..911a56c9d1 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -1,7 +1,8 @@ [cmdletbinding()] param ( - [string]$Module = "Entra" # Default to "Entra" if no argument is provided + [string]$Module = "Entra", # Default to "Entra" if no argument is provided + [switch]$Root ) . (Join-Path $psscriptroot "/common-functions.ps1") @@ -16,6 +17,11 @@ if($Module -eq 'Entra'){ $typeDefsPath=(Join-Path $PSScriptRoot "/Beta-TypeDefs.txt") } -$moduleBuilder.CreateModuleHelp($Module) -$moduleBuilder.CreateSubModuleFile($Module, $typeDefsPath) -$moduleBuilder.CreateModuleManifest($Module) +if($Root){ + $moduleBuilder.CreateRootModuleManifest($Module) +}else{ + $moduleBuilder.CreateModuleHelp($Module) + $moduleBuilder.CreateSubModuleFile($Module, $typeDefsPath) + $moduleBuilder.CreateModuleManifest($Module) +} + diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 74ffe8709a..1adf546382 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -194,6 +194,35 @@ Set-StrictMode -Version 5 } } + [string[]] GetSubModuleFileNames([string] $Module, [string]$DirectoryPath) { + # Check if the directory exists + # Define the pattern for matching submodule files + $pattern = if ($module -like "Microsoft.Graph.Entra.Beta.*") { + "Microsoft.Graph.Entra.Beta.*.psd1" + } else { + "Microsoft.Graph.Entra.*.psd1" + } + + if (-Not (Test-Path -Path $DirectoryPath)) { + Log-Message "[EntraModuleBuilder]: Directory does not exist: $directoryPath" -ForegroundColor Red + return $null # Return null if directory does not exist + } + + # Get all .psm1 files in the specified directory + $subModules = Get-ChildItem -Path $DirectoryPath -Filter $pattern -File + + # Check if any .psm1 files were found + if ($subModules.Count -eq 0) { + Log-Message "[EntraModuleBuilder]: No .psd1 files found in the directory: $directoryPath" -Level 'INFO' + return @() # Return an empty array if no files are found + } else { + # Return the names of the .psd1 files + return $subModules | ForEach-Object { [System.IO.Path]::GetFileNameWithoutExtension($_.Name) } + } + } + + + # Main function to create the root module [void] CreateRootModule([string] $Module) { # Determine the root module name based on the module type @@ -290,14 +319,14 @@ foreach (`$subModule in `$subModules) { } $manifestPath = Join-Path $this.OutputDirectory -ChildPath "$($moduleName).psd1" - $subModules=$this.GetSubModuleFiles($Module,$this.OutputDirectory) + $subModules=$this.GetSubModuleFileNames($Module,$this.OutputDirectory) $requiredModules=@() $nestedModules=@() foreach($module in $subModules){ if($module -ne $moduleName){ Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' $requiredModules += @{ ModuleName = $module; RequiredVersion = $content.version } - $nestedModules+=$module + $nestedModules+="$($module).psm1" } } @@ -315,8 +344,7 @@ foreach (`$subModule in `$subModules) { DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) PowerShellVersion = $([System.Version]::Parse('5.1')) CompatiblePSEditions = @('Desktop','Core') - RequiredModules=@() - NestedModules = $nestedModules + NestedModules = @() } if($null -ne $content.Prerelease){ @@ -328,16 +356,37 @@ foreach (`$subModule in `$subModules) { New-ModuleManifest @moduleSettings Update-ModuleManifest -Path $manifestPath -PrivateData $PSData - # Validate the module manifest - $manifestValidationResult = Test-ModuleManifest -Path $manifestPath + # Construct the entries for the RequiredModules section + $requiredModulesEntries = $requiredModules | ForEach-Object { + " @{ ModuleName = '$($_.ModuleName)'; ModuleVersion = '$($_.RequiredVersion)' }" + } - # Check if the validation was successful - if ($manifestValidationResult) { - Log-Message "Root Module manifest is valid." -Level 'INFO' - } else { - Log-Message "Root Module manifest is invalid." -Level 'ERROR' +# Join the entries with commas and new lines for a properly formatted block +$requiredModulesText = @" +RequiredModules = @( +$($requiredModulesEntries -join ",`n") +) +"@.Trim() # Trim to remove any leading or trailing newlines + + # Read the existing manifest file content as an array of lines + $fileContent = Get-Content -Path $manifestPath + + # Find and update the `# RequiredModules` line + for ($i = 0; $i -lt $fileContent.Count; $i++) { + if ($fileContent[$i] -match '^#\s*RequiredModules') { + # Uncomment and replace the line with the new RequiredModules content + Log-Message "Found RequiredModule Section.." + $fileContent[$i] = $requiredModulesText + break + } } - + + # Write the updated content back to the manifest file + $fileContent | Set-Content -Path $manifestPath -Force + + Write-Host "Manifest file updated successfully." + + Log-Message "[EntraModuleBuilder]: Root Module Manifest successfully created" -Level 'INFO' } @@ -484,10 +533,6 @@ foreach (`$subModule in `$subModules) { } } - - #Create the Root Module Manifest - - # $this.CreateRootModuleManifest($module) } From 5a66eedd630ee6c6d3b4081918b785c0db1dfb51 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:07:11 +0300 Subject: [PATCH 097/124] Commented out call to create root psm1 file (#1199) --- src/EntraModuleBuilder.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 1adf546382..2fa50e844f 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -163,7 +163,7 @@ Set-StrictMode -Version 5 } #Create the RootModule .psm1 file - $this.CreateRootModule($Module) + #$this.CreateRootModule($Module) Log-Message "[EntraModuleBuilder] CreateSubModuleFile script completed." -Level 'SUCCESS' } From ff48ca5740b33e1ae57ba7cfff630da73555e32c Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:40:18 +0300 Subject: [PATCH 098/124] Enganga/remove root module psm1 file (#1200) --- src/EntraModuleBuilder.ps1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 2fa50e844f..f488eae293 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -321,13 +321,10 @@ foreach (`$subModule in `$subModules) { $subModules=$this.GetSubModuleFileNames($Module,$this.OutputDirectory) $requiredModules=@() - $nestedModules=@() foreach($module in $subModules){ if($module -ne $moduleName){ Log-Message "Adding $module to Root Module Nested Modules" -Level 'INFO' $requiredModules += @{ ModuleName = $module; RequiredVersion = $content.version } - $nestedModules+="$($module).psm1" - } } $moduleSettings = @{ From 56e20948e3cef8361a904104f15667215412d8aa Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:57:04 +0300 Subject: [PATCH 099/124] Tests Cleanup (#1209) --- .../Groups/Get-EntraAuthorizationPolicy.ps1 | 50 ++++++ .../Restore-EntraDeletedDirectoryObject.ps1 | 52 +++++++ src/EntraModuleBuilder.ps1 | 5 + .../Get-EntraAuditDirectoryLog.Tests.ps1 | 114 -------------- ....ps1 => Get-EntraDirSyncFeature.Tests.ps1} | 0 .../Get-EntraUserDirectReport.Tests.ps1 | 140 ----------------- ...New-EntraDirectoryRoleDefinition.Tests.ps1 | 130 ---------------- ...move-EntraDeletedDirectoryObject.Tests.ps1 | 64 -------- ...ove-EntraDirectoryRoleAssignment.Tests.ps1 | 66 -------- ...ove-EntraDirectoryRoleDefinition.Tests.ps1 | 66 -------- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 59 ------- ...Get-EntraDirectoryRoleAssignment.Tests.ps1 | 129 ---------------- ...Get-EntraDirectoryRoleDefinition.Tests.ps1 | 145 ------------------ 13 files changed, 107 insertions(+), 913 deletions(-) create mode 100644 moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraAuthorizationPolicy.ps1 create mode 100644 moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Restore-EntraDeletedDirectoryObject.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraAuditDirectoryLog.Tests.ps1 rename testVNext/Entra/DirectoryManagement/{Get-EntraDirSyncFeatures.Tests.ps1 => Get-EntraDirSyncFeature.Tests.ps1} (100%) delete mode 100644 testVNext/Entra/DirectoryManagement/Get-EntraUserDirectReport.Tests.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleDefinition.Tests.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDeletedDirectoryObject.Tests.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleAssignment.Tests.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleDefinition.Tests.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 delete mode 100644 testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 delete mode 100644 testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraAuthorizationPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraAuthorizationPolicy.ps1 new file mode 100644 index 0000000000..61325dc14f --- /dev/null +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraAuthorizationPolicy.ps1 @@ -0,0 +1,50 @@ +function Get-EntraAuthorizationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/authorizationPolicy?" + $params["Method"] = "GET" + + if($null -ne $PSBoundParameters["Id"]) + { + $Id = $Id.Substring(0, 1).ToLower() + $Id.Substring(1) + $Filter = "Id eq '$Id'" + $f = '$' + 'Filter' + $params["Uri"] += "&$f=$Filter" + } + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $params["Uri"] += "&$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + if($response){ + $policyList = @() + foreach ($data in $response) { + $policyType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAuthorizationPolicy + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $policyType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $policyList += $policyType + } + $policyList + } + } +}# ------------------------------------------------------------------------------ diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Restore-EntraDeletedDirectoryObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Restore-EntraDeletedDirectoryObject.ps1 new file mode 100644 index 0000000000..3d515e7353 --- /dev/null +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Restore-EntraDeletedDirectoryObject.ps1 @@ -0,0 +1,52 @@ +function Restore-EntraDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $AutoReconcileProxyConflict + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = 'https://graph.microsoft.com/v1.0/directory/deletedItems/' + $params["Method"] = "POST" + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] += $Id+"/microsoft.graph.restore" + } + if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) + { + $params["Body"] = @{ + autoReconcileProxyConflict = $true + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $data | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $userList = @() + foreach ($res in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } +}# ------------------------------------------------------------------------------ + diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index f488eae293..049e7c1612 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -530,6 +530,11 @@ $($requiredModulesEntries -join ",`n") } } + + + #Create the Root Module Manifest + + # $this.CreateRootModuleManifest($module) } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAuditDirectoryLog.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAuditDirectoryLog.Tests.ps1 deleted file mode 100644 index 35d07002f5..0000000000 --- a/testVNext/Entra/DirectoryManagement/Get-EntraAuditDirectoryLog.Tests.ps1 +++ /dev/null @@ -1,114 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - $scriptblock = { - # Write-Host "Mocking Get-EntraAuditDirectoryLog with parameters: $($args | ConvertTo-Json -Depth 3)" - return @( - [PSCustomObject]@{ - category = 'DirectoryManagement' - resultReason = 'Successfully deleted [0] records for [[LicenseKey:][TenantId:bbbbbbbb-1111-2222-3333-ccccccccccc2][UserName:][UserObjectId:bbbbbbbb-1111-2222-3333-ccccccccccc1][HomeTenantId:bbbbbbbb-1111-2222-3333-cccccccccccc][AzureSovereign:WorldWide]]' - id = 'bbbbbbbb-1111-2222-3333-cccccccccccc' - operationType = 'Delete' - loggedByService = 'Azure MFA12' - additionalDetails = @{ key = 'RequestId'; value = '00000000-0000-0000-0000-000000000000' } - activityDisplayName = 'DeleteDataFromBackend' - targetResources = @( - @{ - userPrincipalName = '' - groupType = '' - id = 'bbbbbbbb-1111-2222-3333-cccccccccaaa' - type = 'User' - displayName = '' - modifiedProperties = @() - } - ) - correlationId = 'bbbbbbbb-1111-2222-3333-cccccccccrrr' - result = 'success' - initiatedBy = @{ app = ''; user = '' } - activityDateTime = '06/19/2024 9:52:22 am' - } - ) - } - - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement -} - -Describe "Get-EntraAuditDirectoryLog" { - Context "Test for Get-EntraAuditDirectoryLog" { - It "Should return specific Audit Directory Logs" { - $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" - $result | Should -Not -BeNullOrEmpty - $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when Id is empty" { - { Get-EntraAuditDirectoryLog -Id } | Should -Throw "Missing an argument for parameter 'Id'*" - } - It "Should fail when filter is empty" { - { Get-EntraAuditDirectoryLog -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" - } - It "Should fail when Top is empty" { - { Get-EntraAuditDirectoryLog -Top } | Should -Throw "Missing an argument for parameter 'Top'*" - } - It "Should fail when Top is invalid" { - { Get-EntraAuditDirectoryLog -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" - } - It "Should return all Audit Directory Logs" { - $result = Get-EntraAuditDirectoryLog -All - $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when All has an argument" { - { Get-EntraAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" - } - - It "Should return specific Audit Directory Logs by filter" { - $result = Get-EntraAuditDirectoryLog -Filter "correlationId eq 'bbbbbbbb-1111-2222-3333-cccccccccrrr'" - $result | Should -Not -BeNullOrEmpty - $result.id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should return top Audit Directory Logs" { - $result = @(Get-EntraAuditDirectoryLog -Top 1) - $result | Should -Not -BeNullOrEmpty - $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should contain ID in parameters when passed Id to it" { - $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" - $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - } - - It "Should contain 'User-Agent' header" { - Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuditDirectoryLog" - $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" - $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - - It "Should execute successfully without throwing an error " { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeatures.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeatures.Tests.ps1 rename to testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraUserDirectReport.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraUserDirectReport.Tests.ps1 deleted file mode 100644 index 0643919d87..0000000000 --- a/testVNext/Entra/DirectoryManagement/Get-EntraUserDirectReport.Tests.ps1 +++ /dev/null @@ -1,140 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - $scriptblock = { - return @{ - value = @( - @{ - "Id" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - "DisplayName" = "Mock-User" - "OnPremisesImmutableId" = $null - "DeletedDateTime" = $null - "OnPremisesSyncEnabled" = $null - "OnPremisesLastSyncDateTime" = $null - "OnPremisesProvisioningErrors" = @{} - "MobilePhone" = "425-555-0100" - "BusinessPhones" = @("425-555-0100") - "ExternalUserState" = $null - "ExternalUserStateChangeDateTime" = $null - "Parameters" = $args - } - ) - } - } - - - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra -} - - - -Describe "Get-EntraUserDirectReport" { - Context "Test for Get-EntraUserDirectReport" { - It "Should return specific user direct report" { - $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - $result | Should -Not -BeNullOrEmpty - $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 - } - It "Should return specific user direct report with alias" { - $result = Get-EntraUserDirectReport -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - $result | Should -Not -BeNullOrEmpty - $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 - } - It "Should fail when UserId is empty" { - { Get-EntraUserDirectReport -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" - } - It "Should fail when UserId is invalid" { - { Get-EntraUserDirectReport -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string.*" - } - It "Should return all user direct reports" { - $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All - $result | Should -Not -BeNullOrEmpty - $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 - } - It "Should fail when All is invalid" { - { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" - } - It "Should return top 1 user direct report" { - $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 - $result | Should -Not -BeNullOrEmpty - $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 - } - It "Should fail when top is empty" { - { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" - } - It "Should fail when top is invalid" { - { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top xyz } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" - } - It "Property parameter should work" { - $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property DisplayName - $result | Should -Not -BeNullOrEmpty - $result.DisplayName | Should -Be "Mock-User" - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 - } - It "Should fail when Property is empty" { - { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" - } - It "Result should contain Properties" { - $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - $result.ObjectId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - $result.DeletionTimestamp | Should -Be $null - $result.DirSyncEnabled | Should -Be $null - $result.ImmutableId | Should -Be $null - $result.LastDirSyncTime | Should -Be $null - $result.Mobile | Should -Be "425-555-0100" - $result.ProvisioningErrors | Should -BeNullOrEmpty - $result.TelephoneNumber | Should -Be "425-555-0100" - $result.UserState | Should -Be $null - $result.UserStateChangedOn | Should -Be $null - - } - It "Should contain UserId in parameters when passed UserId to it" { - - $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - $params = Get-Parameters -data $result.Parameters - $para= $params | ConvertTo-json | ConvertFrom-Json - $para.URI | Should -Match "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserDirectReport" - $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - $result | Should -Not -BeNullOrEmpty - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserDirectReport" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error " { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - - } - -} - diff --git a/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleDefinition.Tests.ps1 deleted file mode 100644 index dccea60aca..0000000000 --- a/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleDefinition.Tests.ps1 +++ /dev/null @@ -1,130 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - $scriptblock = { - return @( - [PSCustomObject]@{ - "RolePermissions" = {"Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRolePermission"} - "Description" = "Mock-App" - "DisplayName" = "Mock-App" - "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - "InheritsPermissionsFrom" = {} - "IsBuiltIn" = $False - "IsEnabled" = $False - "ResourceScopes" = {/} - "TemplateId" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - "Version" = "2" - "RoleDefinitionId" = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" - "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions/$entity" - } - "Parameters" = $args - } - ) - } - - Mock -CommandName New-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement -} - -Describe "New-EntraDirectoryRoleDefinition" { - Context "Test for New-EntraDirectoryRoleDefinition" { - It "Should return specific Ms role Defination" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "4dd5aa9c-cf4d-4895-a993-740d342802b1" -Version 2 - $result | Should -Not -BeNullOrEmpty - $result.DisplayName | Should -Be "Mock-App" - $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - $result.IsEnabled | Should -Be $False - $result.TemplateId | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - $result.Version | Should -Be 2 - - - Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when RolePermissions is empty" { - {New-EntraDirectoryRoleDefinition -RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'RolePermissions'*" - } - It "Should fail when IsEnabled is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'IsEnabled'*" - } - It "Should fail when IsEnabled is invalid" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled xy -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Cannot process argument transformation on parameter 'IsEnabled'*" - } - It "Should fail when DisplayName is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'DisplayName'*" - } - It "Should fail when DisplayName is invalid" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName "" -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." - } - It "Should fail when ResourceScopes is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'ResourceScopes'*" - } - It "Should fail when Description is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'Description'*" - } - It "Should fail when TemplateId is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId -Version 2} | Should -Throw "Missing an argument for parameter 'TemplateId'*" - } - It "Should fail when Version is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff"-Version } | Should -Throw "Missing an argument for parameter 'Version'*" - } - It "Result should Contain ObjectId" { - $result = $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 - $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleDefinition" - - $result = $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - $result = New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleDefinition" - - Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { New-EntraDirectoryRoleDefinition -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} - diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDeletedDirectoryObject.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDeletedDirectoryObject.Tests.ps1 deleted file mode 100644 index ee39953e51..0000000000 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraDeletedDirectoryObject.Tests.ps1 +++ /dev/null @@ -1,64 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra -} - -Describe "Remove-EntraDeletedDirectoryObject" { - Context "Test for Remove-EntraDeletedDirectoryObject" { - It "Should delete a previously deleted directory object" { - $result = Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 - } - - It "Should execute successfully with Alias" { - $result = Remove-EntraDeletedDirectoryObject -Id "11112222-bbbb-3333-cccc-4444dddd5555" - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 - } - - It "Should fail when DirectoryObjectId is empty" { - { Remove-EntraDeletedDirectoryObject -DirectoryObjectId } | Should -Throw "Missing an argument for parameter 'DirectoryObjectId'*" - } - - It "Should fail when DirectoryObjectId is invalid" { - { Remove-EntraDeletedDirectoryObject -DirectoryObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DirectoryObjectId' because it is an empty string." - } - - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedDirectoryObject" - - Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedDirectoryObject" - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} - diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleAssignment.Tests.ps1 deleted file mode 100644 index 085fd324e8..0000000000 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleAssignment.Tests.ps1 +++ /dev/null @@ -1,66 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement -} - -Describe "Remove-EntraDirectoryRoleAssignment" { - Context "Test for Remove-EntraDirectoryRoleAssignment" { - It "Should return empty object" { - $result = Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should execute successfully with Alias" { - $result = Remove-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when UnifiedRoleAssignmentId is empty" { - { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" - } - It "Should fail when UnifiedRoleAssignmentId is invalid" { - { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleAssignmentId' because it is an empty string." - } - It "Should contain UnifiedRoleAssignmentId in parameters when passed Id to it" { - Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement - - $result = Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - $params = Get-Parameters -data $result - $params.UnifiedRoleAssignmentId | Should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleAssignment" - - Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleAssignment" - - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleDefinition.Tests.ps1 deleted file mode 100644 index 696a70a0cc..0000000000 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleDefinition.Tests.ps1 +++ /dev/null @@ -1,66 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement -} - -Describe "Remove-EntraDirectoryRoleDefinition" { - Context "Test for Remove-EntraDirectoryRoleDefinition" { - It "Should return empty object" { - $result = Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should execute successfully with Alias" { - $result = Remove-EntraDirectoryRoleDefinition -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when UnifiedRoleDefinitionId is empty" { - { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" - } - It "Should fail when UnifiedRoleDefinitionId is invalid" { - { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string*" - } - It "Should contain UnifiedRoleDefinitionId in parameters when passed Id to it" { - Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement - - $result = Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - $params = Get-Parameters -data $result - $params.UnifiedRoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleDefinition" - - Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleDefinition" - - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 deleted file mode 100644 index abdd91c9db..0000000000 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ /dev/null @@ -1,59 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement -} - -Describe "Remove-EntraFeatureRolloutPolicyDirectoryObject" { - Context "Test for Remove-EntraFeatureRolloutPolicyDirectoryObject" { - It "Should return empty object" { - $result = Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when Id is invalid" { - { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." - } - It "Should fail when Id is empty" { - { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id } | Should -Throw "Missing an argument for parameter 'Id'*" - } - It "Should fail when ObjectId is invalid" { - { Remove-EntraFeatureRolloutPolicyDirectoryObject -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." - } - It "Should fail when ObjectId is empty" { - { Remove-EntraFeatureRolloutPolicyDirectoryObject -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicyDirectoryObject" - $result = Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa - $result | Should -BeNullOrEmpty - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicyDirectoryObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error " { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} - diff --git a/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 deleted file mode 100644 index 932cef0a0d..0000000000 --- a/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 +++ /dev/null @@ -1,129 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - $scriptblock = { - return @( - [PSCustomObject]@{ - "AppScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope" - "AppScopeId" = $null - "Id" = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - "DirectoryScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" - "DirectoryScopeId" = "/0000aaaa-11bb-cccc-dd22-eeeeee333333" - "Condition" = $null - "Principal" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" - "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" - "RoleDefinition" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition" - "RoleDefinitionId" = "1b1b1b1b-2222-cccc-3333-4d4d4d4d4d4d" - "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleAssignments/$entity"} - "Parameters" = $args - } - ) - } - - Mock -CommandName Get-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance -} - -Describe "Get-EntraDirectoryRoleAssignment" { - Context "Test for Get-EntraDirectoryRoleAssignment" { - It "Should return specific role assignment" { - $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - $result | Should -Not -BeNullOrEmpty - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should execute successfully with Alias" { - $result = Get-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - $result | Should -Not -BeNullOrEmpty - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when Get-EntraDirectoryRoleAssignment is empty" { - { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" - } - It "Should fail when Get-EntraDirectoryRoleAssignment is invalid" { - { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleAssignmentId' because it is an empty string." - } - It "Should return all role assignments" { - $result = Get-EntraDirectoryRoleAssignment -All - $result | Should -Not -BeNullOrEmpty - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when All is invalid" { - { Get-EntraDirectoryRoleAssignment -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" - } - It "Should return top role assignment" { - $result = Get-EntraDirectoryRoleAssignment -Top 1 - $result | Should -Not -BeNullOrEmpty - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when Top is empty" { - { Get-EntraDirectoryRoleAssignment -Top } | Should -Throw "Missing an argument for parameter 'Top'*" - } - It "Should fail when Top is invalid" { - { Get-EntraDirectoryRoleAssignment -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" - } - It "Should return specific application by filter" { - $result = Get-EntraDirectoryRoleAssignment -Filter "PrincipalId eq 'aaaaaaaa-bbbb-cccc-1111-222222222222'" - $result | Should -Not -BeNullOrEmpty - $result.Id | should -Be 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when filter is empty" { - { Get-EntraDirectoryRoleAssignment -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" - } - - It "Result should Contain ObjectId" { - $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - $result.ObjectId | should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - } - It "Should contain UnifiedRoleAssignmentId in parameters when passed Id to it" { - $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - $params = Get-Parameters -data $result.Parameters - $params.UnifiedRoleAssignmentId | Should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - } - It "Property parameter should work" { - $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Property PrincipalId - $result | Should -Not -BeNullOrEmpty - $result.PrincipalId | Should -Be 'aaaaaaaa-bbbb-cccc-1111-222222222222' - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when Property is empty" { - { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleAssignment" - - Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleAssignment" - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} diff --git a/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 deleted file mode 100644 index 068403f431..0000000000 --- a/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 +++ /dev/null @@ -1,145 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - $scriptblock = { - return @( - [PSCustomObject]@{ - "RolePermissions" = @{AllowedResourceActions="System.Object[]"; Condition=""; ExcludedResourceActions=""; AdditionalProperties=""} - "Description" = "Mock-App" - "DisplayName" = "Mock-App" - "Id" = "0000aaaa-11bb-cccc-dd22-eeeeee333333" - "InheritsPermissionsFrom" = {} - "IsBuiltIn" = $False - "IsEnabled" = $False - "ResourceScopes" = {/} - "TemplateId" = "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - "Version" = "2" - "RoleDefinitionId" = "00001111-aaaa-2222-bbbb-3333cccc4444" - "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions/$entity" - "inheritsPermissionsFrom@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleDefinitions('54d418b2-4cc0-47ee-9b39-e8f84ed8e073')/inheritsPermissionsFrom" - } - "Parameters" = $args - } - ) - } - - Mock -CommandName Get-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance -} - -Describe "Get-EntraDirectoryRoleDefinition" { - Context "Test for Get-EntraDirectoryRoleDefinition" { - It "Should return specificrole Defination" { - $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" - $result | Should -Not -BeNullOrEmpty - $result.DisplayName | Should -Be "Mock-App" - $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should return specificrole Defination With Alias" { - $result = Get-EntraDirectoryRoleDefinition -Id "0000aaaa-11bb-cccc-dd22-eeeeee333333" - $result | Should -Not -BeNullOrEmpty - $result.DisplayName | Should -Be "Mock-App" - $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when UnifiedRoleDefinitionId is empty" { - { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" - } - It "Should fail when UnifiedRoleDefinitionId is invalid" { - { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string." - } - It "Should return all role assignments" { - $result = Get-EntraDirectoryRoleDefinition -All - $result | Should -Not -BeNullOrEmpty - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when All is invalid" { - { Get-EntraDirectoryRoleDefinition -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" - } - It "Should return top role assignment" { - $result = Get-EntraDirectoryRoleDefinition -Top 1 - $result | Should -Not -BeNullOrEmpty - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when Top is empty" { - { Get-EntraDirectoryRoleDefinition -Top } | Should -Throw "Missing an argument for parameter 'Top'*" - } - It "Should fail when Top is invalid" { - { Get-EntraDirectoryRoleDefinition -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" - } - It "Should return specific application by SearchString" { - $result = Get-EntraDirectoryRoleDefinition -SearchString 'Mock-App' - $result | Should -Not -BeNullOrEmpty - $result.DisplayName | should -Be 'Mock-App' - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when String is empty" { - { Get-EntraDirectoryRoleDefinition -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" - } - It "Should return specific application by filter" { - $result = Get-EntraDirectoryRoleDefinition -Filter "DisplayName eq 'Mock-App'" - $result | Should -Not -BeNullOrEmpty - $result.DisplayName | should -Be 'Mock-App' - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when filter is empty" { - { Get-EntraDirectoryRoleDefinition -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" - } - It "Result should Contain ObjectId" { - $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" - $result.ObjectId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - } - It "Should contain Filter in parameters when passed SearchString to it" { - $result = Get-EntraDirectoryRoleDefinition -SearchString 'Mock-App' - $params = Get-Parameters -data $result.Parameters - $params.Filter | Should -Match "Mock-App" - } - It "Property parameter should work" { - $result = Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Property DisplayName - $result | Should -Not -BeNullOrEmpty - $result.DisplayName | Should -Be 'Mock-App' - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 - } - It "Should fail when Property is empty" { - { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleDefinition" - - Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleDefinition" - - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} From a91f1371095b427cf2c7926d322923ed1e50eea1 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:41:25 +0300 Subject: [PATCH 100/124] Add the Sub-Modules as RequiredModules in the Root Module Manifest (#1194) * Sub-Modules as RequiredModules * Sub-Modules as RequiredModules * Sub-Modules as RequiredModules * Sub-Modules as RequiredModules * Sub-Modules as RequiredModules * Sub-Modules as RequiredModules --- build/Create-EntraModule.ps1 | 8 ++++++++ src/EntraModuleBuilder.ps1 | 22 +++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index 911a56c9d1..b7f0395678 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -16,6 +16,14 @@ if($Module -eq 'Entra'){ }else{ $typeDefsPath=(Join-Path $PSScriptRoot "/Beta-TypeDefs.txt") } +if($Root){ + $moduleBuilder.CreateRootModuleManifest($Module) +}else{ + $moduleBuilder.CreateModuleHelp($Module) + $moduleBuilder.CreateSubModuleFile($Module, $typeDefsPath) + $moduleBuilder.CreateModuleManifest($Module) +} + if($Root){ $moduleBuilder.CreateRootModuleManifest($Module) diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 049e7c1612..c1979b37e0 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -193,6 +193,19 @@ Set-StrictMode -Version 5 return $subModules.Name } } + [string[]] GetSubModuleManifestFiles([string] $Module, [string]$DirectoryPath) { + # Check if the directory exists + # Define the pattern for matching submodule files + $pattern = if ($module -like "Microsoft.Graph.Entra.Beta.*") { + "Microsoft.Graph.Entra.Beta.*.psd1" + } else { + "Microsoft.Graph.Entra.*.psd1" + } + + if (-Not (Test-Path -Path $DirectoryPath)) { + Log-Message "[EntraModuleBuilder]: Directory does not exist: $directoryPath" -ForegroundColor Red + return $null # Return null if directory does not exist + } [string[]] GetSubModuleFileNames([string] $Module, [string]$DirectoryPath) { # Check if the directory exists @@ -216,6 +229,7 @@ Set-StrictMode -Version 5 Log-Message "[EntraModuleBuilder]: No .psd1 files found in the directory: $directoryPath" -Level 'INFO' return @() # Return an empty array if no files are found } else { + # Return the names of the .psd1 files return $subModules | ForEach-Object { [System.IO.Path]::GetFileNameWithoutExtension($_.Name) } } @@ -319,7 +333,8 @@ foreach (`$subModule in `$subModules) { } $manifestPath = Join-Path $this.OutputDirectory -ChildPath "$($moduleName).psd1" - $subModules=$this.GetSubModuleFileNames($Module,$this.OutputDirectory) + $subModules=$this.GetSubModuleManifestFiles($Module,$this.OutputDirectory) + $requiredModules=@() foreach($module in $subModules){ if($module -ne $moduleName){ @@ -341,6 +356,8 @@ foreach (`$subModule in `$subModules) { DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) PowerShellVersion = $([System.Version]::Parse('5.1')) CompatiblePSEditions = @('Desktop','Core') + RequiredModules=$requiredModules + NestedModules = $nestedModules NestedModules = @() } @@ -351,7 +368,7 @@ foreach (`$subModule in `$subModules) { Log-Message "[EntraModuleBuilder]: Starting Root Module Manifest generation" -Level 'INFO' New-ModuleManifest @moduleSettings - Update-ModuleManifest -Path $manifestPath -PrivateData $PSData + Update-ModuleManifest -Path $manifestPath -PrivateData $PSData -Verbose # Construct the entries for the RequiredModules section $requiredModulesEntries = $requiredModules | ForEach-Object { @@ -531,7 +548,6 @@ $($requiredModulesEntries -join ",`n") } - #Create the Root Module Manifest # $this.CreateRootModuleManifest($module) From 9773c1cbe3e4c919f41ce8b1db464ece475aad14 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:01:41 +0300 Subject: [PATCH 101/124] Merge branch 'modularize' of https://github.com/microsoftgraph/entra-powershell into modularize --- build/Create-EntraModule.ps1 | 7 ------- src/EntraModuleBuilder.ps1 | 24 ++++-------------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/build/Create-EntraModule.ps1 b/build/Create-EntraModule.ps1 index b7f0395678..a89765ac42 100644 --- a/build/Create-EntraModule.ps1 +++ b/build/Create-EntraModule.ps1 @@ -25,11 +25,4 @@ if($Root){ } -if($Root){ - $moduleBuilder.CreateRootModuleManifest($Module) -}else{ - $moduleBuilder.CreateModuleHelp($Module) - $moduleBuilder.CreateSubModuleFile($Module, $typeDefsPath) - $moduleBuilder.CreateModuleManifest($Module) -} diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index c1979b37e0..b3fdd50060 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -193,19 +193,6 @@ Set-StrictMode -Version 5 return $subModules.Name } } - [string[]] GetSubModuleManifestFiles([string] $Module, [string]$DirectoryPath) { - # Check if the directory exists - # Define the pattern for matching submodule files - $pattern = if ($module -like "Microsoft.Graph.Entra.Beta.*") { - "Microsoft.Graph.Entra.Beta.*.psd1" - } else { - "Microsoft.Graph.Entra.*.psd1" - } - - if (-Not (Test-Path -Path $DirectoryPath)) { - Log-Message "[EntraModuleBuilder]: Directory does not exist: $directoryPath" -ForegroundColor Red - return $null # Return null if directory does not exist - } [string[]] GetSubModuleFileNames([string] $Module, [string]$DirectoryPath) { # Check if the directory exists @@ -229,7 +216,6 @@ Set-StrictMode -Version 5 Log-Message "[EntraModuleBuilder]: No .psd1 files found in the directory: $directoryPath" -Level 'INFO' return @() # Return an empty array if no files are found } else { - # Return the names of the .psd1 files return $subModules | ForEach-Object { [System.IO.Path]::GetFileNameWithoutExtension($_.Name) } } @@ -333,8 +319,7 @@ foreach (`$subModule in `$subModules) { } $manifestPath = Join-Path $this.OutputDirectory -ChildPath "$($moduleName).psd1" - $subModules=$this.GetSubModuleManifestFiles($Module,$this.OutputDirectory) - + $subModules=$this.GetSubModuleFileNames($Module,$this.OutputDirectory) $requiredModules=@() foreach($module in $subModules){ if($module -ne $moduleName){ @@ -356,8 +341,6 @@ foreach (`$subModule in `$subModules) { DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) PowerShellVersion = $([System.Version]::Parse('5.1')) CompatiblePSEditions = @('Desktop','Core') - RequiredModules=$requiredModules - NestedModules = $nestedModules NestedModules = @() } @@ -368,7 +351,7 @@ foreach (`$subModule in `$subModules) { Log-Message "[EntraModuleBuilder]: Starting Root Module Manifest generation" -Level 'INFO' New-ModuleManifest @moduleSettings - Update-ModuleManifest -Path $manifestPath -PrivateData $PSData -Verbose + Update-ModuleManifest -Path $manifestPath -PrivateData $PSData # Construct the entries for the RequiredModules section $requiredModulesEntries = $requiredModules | ForEach-Object { @@ -527,7 +510,7 @@ $($requiredModulesEntries -join ",`n") Log-Message "[EntraModuleBuilder]: Creating manifest for $moduleName at $manifestPath" try{ New-ModuleManifest @moduleSettings - Update-ModuleManifest -Path $manifestPath -PrivateData $PSData + Update-ModuleManifest -Path $manifestPath -PrivateData $PSData # Validate the module manifest $manifestValidationResult = Test-ModuleManifest -Path $manifestPath @@ -548,6 +531,7 @@ $($requiredModulesEntries -join ",`n") } + #Create the Root Module Manifest # $this.CreateRootModuleManifest($module) From d4b8994729cc521121f1213eec4c74e4b364adba Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:07:16 +0300 Subject: [PATCH 102/124] Groups changes --- .../Groups/Add-EntraGroupMember.ps1 | 1 + .../Groups/Add-EntraGroupOwner.ps1 | 1 + .../Groups/Add-EntraLifecyclePolicyGroup.ps1 | 1 + .../Groups/Get-EntraDeletedGroup.ps1 | 2 + .../Groups/Get-EntraObjectSetting.ps1 | 53 +------------------ .../Groups/Set-EntraGroup.ps1 | 1 + .../Groups/Set-EntraGroupLifecyclePolicy.ps1 | 1 + 7 files changed, 9 insertions(+), 51 deletions(-) diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 index cd9fdedd95..40eec2c654 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Add-EntraGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 index 421fc5f4c6..b450bbe0ea 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Add-EntraGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 index ba8844e444..18dd4aab98 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Add-EntraLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 index e8acc5e627..2ce6c42255 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 @@ -2,6 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + + function Get-EntraDeletedGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 index 49bf23daad..90357d24ff 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Get-EntraObjectSetting { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( @@ -97,54 +98,4 @@ function Get-EntraObjectSetting { $targetTypeList } -}function Get-EntraAuthorizationPolicy { - [CmdletBinding(DefaultParameterSetName = '')] - param ( - [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] - [System.String[]] $Property - ) - - PROCESS { - $params = @{} - $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/authorizationPolicy?" - $params["Method"] = "GET" - - if($null -ne $PSBoundParameters["Id"]) - { - $Id = $Id.Substring(0, 1).ToLower() + $Id.Substring(1) - $Filter = "Id eq '$Id'" - $f = '$' + 'Filter' - $params["Uri"] += "&$f=$Filter" - } - if($null -ne $PSBoundParameters["Property"]) - { - $selectProperties = $PSBoundParameters["Property"] - $selectProperties = $selectProperties -Join ',' - $properties = "`$select=$($selectProperties)" - $params["Uri"] += "&$properties" - } - - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug - Write-Debug("=========================================================================`n") - - $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json - if($response){ - $policyList = @() - foreach ($data in $response) { - $policyType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAuthorizationPolicy - $data.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name - $propertyValue = $_.Value - $policyType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force - } - $policyList += $policyType - } - $policyList - } - } -}# ------------------------------------------------------------------------------ - +} diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 index b4aaddfe98..eed82ce744 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Set-EntraGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 index 6ba19e69ec..f7c264c22f 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Set-EntraGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( From 9471507dc80db23c8e0c2993ec24b244f1595dc9 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:11:07 +0300 Subject: [PATCH 103/124] Groups changes --- .../{Groups => SignIns}/Get-EntraAuthorizationPolicy.ps1 | 5 +++++ 1 file changed, 5 insertions(+) rename moduleVNext/Entra/Microsoft.Graph.Entra/{Groups => SignIns}/Get-EntraAuthorizationPolicy.ps1 (87%) diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraAuthorizationPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 similarity index 87% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraAuthorizationPolicy.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 index 61325dc14f..0f05e3d3cf 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraAuthorizationPolicy.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 @@ -1,3 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + function Get-EntraAuthorizationPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( From a6b2cae3dd27a34bb3285685ad0508870c70b168 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:14:38 +0300 Subject: [PATCH 104/124] Groups changes --- .../Restore-EntraDeletedDirectoryObject.ps1 | 0 .../Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 | 1 + .../SignIns/Get-EntraConditionalAccessPolicy.ps1 | 1 + .../SignIns/Get-EntraFeatureRolloutPolicy.ps1 | 1 + .../Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 | 1 + .../SignIns/Get-EntraNamedLocationPolicy.ps1 | 1 + .../SignIns/Get-EntraOAuth2PermissionGrant.ps1 | 1 + .../Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 | 1 + 8 files changed, 7 insertions(+) rename moduleVNext/Entra/Microsoft.Graph.Entra/{SignIns => DirectoryManagement}/Restore-EntraDeletedDirectoryObject.ps1 (100%) diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Restore-EntraDeletedDirectoryObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Restore-EntraDeletedDirectoryObject.ps1 rename to moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 index e1c785cd92..53791c7e76 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Enable-EntraAzureADAliases { Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 index 5e41ff8a5f..7ab3f04c1a 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Get-EntraConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 index 3558d25a9a..0e1a86add5 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Get-EntraFeatureRolloutPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 index 131dfd69e9..17b6d1049c 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Get-EntraIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 index e24ca7a7d0..ca6de2cb6f 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Get-EntraNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 index 513fd53aca..15e775d502 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Get-EntraOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 index d04e28dae7..1ea1167baf 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Get-EntraPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( From 2ce393829a6e0d313c0d5d2a42d0e52ece8cd07d Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:52:03 +0300 Subject: [PATCH 105/124] entra-beta-audit changes (#1210) --- .../Restore-EntraDeletedDirectoryObject.ps1 | 5 + .../Get-EntraBetaAuditDirectoryLog.Tests.ps1 | 147 ------------------ 2 files changed, 5 insertions(+), 147 deletions(-) delete mode 100644 testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAuditDirectoryLog.Tests.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 index 3d515e7353..e8b4f1e345 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 @@ -1,3 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + function Restore-EntraDeletedDirectoryObject { [CmdletBinding(DefaultParameterSetName = '')] param ( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAuditDirectoryLog.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAuditDirectoryLog.Tests.ps1 deleted file mode 100644 index b54b5a744c..0000000000 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAuditDirectoryLog.Tests.ps1 +++ /dev/null @@ -1,147 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - $scriptblock = { - return @( - [PSCustomObject]@{ - "InitiatedBy" = [PSCustomObject]@{ - "App" = "" - "User" = "" - "AdditionalProperties" = @{} - } - "TargetResources" = [PSCustomObject]@{ - "DisplayName" = "test" - "GroupType" = "" - "Id" = "00000000-0000-0000-0000-000000000000" - "ModifiedProperties" = @() - "Type" = "N/A" - "UserPrincipalName" = "" - "AdditionalProperties" = @{} - } - "AdditionalDetails" = "" - "ActivityDateTime" = "28-May-24 11:49:02 AM" - "ActivityDisplayName" = "GroupsODataV4_GetgroupLifecyclePolicies" - "Category" = "GroupManagement" - "CorrelationId" = "aaaabbbb-0000-cccc-1111-dddd2222eeee" - "Id" = "bbbbcccc-1111-dddd-2222-eeee3333ffff" - "LoggedByService" = "Self-service Group Management" - "OperationType" = "Update" - "Result" = "success" - "ResultReason" = "OK" - "UserAgent" = "" - "AdditionalProperties" = @{} - "Parameters" = $args - } - ) - } - Mock -CommandName Get-MgBetaAuditLogDirectoryAudit -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -} - -Describe "Get-EntraBetaAuditDirectoryLog" { - Context "Test for Get-EntraBetaAuditDirectoryLog" { - It "Should get all logs" { - $result = Get-EntraBetaAuditDirectoryLog -All - $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 - } - - It "Should fail when All has argument" { - { Get-EntraBetaAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." - } - - It "Should get first n logs" { - $result = Get-EntraBetaAuditDirectoryLog -Top 1 - $result | Should -Not -BeNullOrEmpty - $result.ActivityDateTime | Should -Be "28-May-24 11:49:02 AM" - $result.ActivityDisplayName | Should -Be "GroupsODataV4_GetgroupLifecyclePolicies" - $result.Category | Should -Be "GroupManagement" - $result.CorrelationId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" - $result.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" - $result.LoggedByService | Should -Be "Self-service Group Management" - - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 - } - - It "Should fail when top is empty" { - { Get-EntraBetaAuditDirectoryLog -Top } | Should -Throw "Missing an argument for parameter 'Top'*" - } - - It "Should fail when top is invalid" { - { Get-EntraBetaAuditDirectoryLog -Top y } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" - } - - It "Should get audit logs containing a given ActivityDisplayName" { - $result = Get-EntraBetaAuditDirectoryLog -Filter "ActivityDisplayName eq 'GroupsODataV4_GetgroupLifecyclePolicies'" -Top 1 - $result | Should -Not -BeNullOrEmpty - $result.ActivityDateTime | Should -Be "28-May-24 11:49:02 AM" - $result.ActivityDisplayName | Should -Be "GroupsODataV4_GetgroupLifecyclePolicies" - $result.Category | Should -Be "GroupManagement" - $result.CorrelationId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" - $result.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" - $result.LoggedByService | Should -Be "Self-service Group Management" - - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 - } - - It "Should fail when Filter is empty" { - { Get-EntraBetaAuditDirectoryLog -Filter -Top 1} | Should -Throw "Missing an argument for parameter 'Filter'*" - } - - It "Should get all audit logs with a given result(success)" { - $result = Get-EntraBetaAuditDirectoryLog -Filter "result eq 'success'" - $result | Should -Not -BeNullOrEmpty - - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 - } - - It "Should get all audit logs with a given result(failure)" { - $result = Get-EntraBetaAuditDirectoryLog -Filter "result eq 'failure'" -All - $result | Should -Not -BeNullOrEmpty - - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 - } - - It "Property parameter should work" { - $result = Get-EntraBetaAuditDirectoryLog -Property ActivityDisplayName - $result | Should -Not -BeNullOrEmpty - $result.ActivityDisplayName | Should -Be 'GroupsODataV4_GetgroupLifecyclePolicies' - - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 - } - It "Should fail when Property is empty" { - { Get-EntraBetaAuditDirectoryLog -Property } | Should -Throw "Missing an argument for parameter 'Property'*" - } - - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditDirectoryLog" - $result= Get-EntraBetaAuditDirectoryLog - $result | Should -Not -BeNullOrEmpty - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditDirectoryLog" - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error " { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Get-EntraBetaAuditDirectoryLog -Top 1 -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} - From 80039690f911c1518a71b315c37e9ca9226b0613 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:45:18 +0300 Subject: [PATCH 106/124] Additional EntraBeta Tests Issues (#1211) --- build/Beta-TypeDefs.txt | 12 ++- build/V1.0-TypeDefs.txt | 14 ++- ...ApplicationSignInDetailedSummary.Tests.ps1 | 89 ----------------- ...ntraBetaApplicationSignInSummary.Tests.ps1 | 97 ------------------- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 84 ---------------- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 81 ---------------- .../New-EntraBetaObjectSetting.Tests.ps1 | 5 +- .../Set-EntraBetaObjectSetting.Tests.ps1 | 6 +- 8 files changed, 33 insertions(+), 355 deletions(-) delete mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 delete mode 100644 testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInSummary.Tests.ps1 delete mode 100644 testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 delete mode 100644 testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 diff --git a/build/Beta-TypeDefs.txt b/build/Beta-TypeDefs.txt index 551e675620..16b94375c5 100644 --- a/build/Beta-TypeDefs.txt +++ b/build/Beta-TypeDefs.txt @@ -141,8 +141,18 @@ namespace Microsoft.Open.AzureAD.Model namespace Microsoft.Open.MSGraph.Model { - + using System.Linq; + + public class MsRoleMemberInfo{ + public System.String Id; + } + + public class MsDirectoryObject{ + public System.String Id; + public System.String OdataType; + } + public class AddIn { public System.String Id; diff --git a/build/V1.0-TypeDefs.txt b/build/V1.0-TypeDefs.txt index 1465a1ad21..529fc20967 100644 --- a/build/V1.0-TypeDefs.txt +++ b/build/V1.0-TypeDefs.txt @@ -136,6 +136,16 @@ namespace Microsoft.Open.MSGraph.Model { using System.Linq; + + public class MsRoleMemberInfo{ + public System.String Id; + } + + public class MsDirectoryObject{ + public System.String Id; + public System.String OdataType; + } + public class AddIn { public System.String Id; @@ -632,10 +642,12 @@ namespace Microsoft.Open.MSGraph.Model public System.String Id; public System.String OdataType; } + public class MsRoleMemberInfo { - public System.String Id; + public System.String Id; } + public class OptionalClaim { public System.String Name; diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 deleted file mode 100644 index 19f19dd634..0000000000 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 +++ /dev/null @@ -1,89 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - $scriptblock = { - return @( - [PSCustomObject]@{ - "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" - "AppId" = "dddddddd-1111-2222-3333-aaaaaaaaaaaa" - "AppDisplayName" = "Mock Portal" - "AggregatedEventDateTime" = "29-05-2024 00:00:00" - "SignInCount" = "3" - "Status" = @{ - "AdditionalDetails" = $null - "ErrorCode" = "0" - "FailureReason" = $null - "AdditionalProperties" = $null - } - "AdditionalProperties" = @{} - "Parameters" = $args - } - ) - } - - Mock -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications -} - -Describe "Get-EntraBetaApplicationSignInDetailedSummary" { - Context "Test for Get-EntraBetaApplicationSignInDetailedSummary" { - It "Should return specific application signed in detailed summary by filter" { - $result = Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" - $result | Should -Not -BeNullOrEmpty - $result.AppDisplayName | Should -Be "Mock Portal" - $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - $result.AppId | Should -Be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" - - Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 - } - It "Should fail when filter is empty" { - { Get-EntraBetaApplicationSignInDetailedSummary -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" - } - It "Should return top 1 application signed in detailed summary" { - $result = Get-EntraBetaApplicationSignInDetailedSummary -Top 1 - $result | Should -Not -BeNullOrEmpty - $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - - Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 - } - It "Should fail when Top is empty" { - { Get-EntraBetaApplicationSignInDetailedSummary -Top } | Should -Throw "Missing an argument for parameter 'Top'*" - } - It "Should fail when Top is invalid" { - { Get-EntraBetaApplicationSignInDetailedSummary -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInDetailedSummary" - - $result = Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" - $result | Should -Not -BeNullOrEmpty - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInDetailedSummary" - - Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Get-EntraBetaApplicationSignInDetailedSummary -Filter "appDisplayName eq 'Mock Portal'" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - - } -} - diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInSummary.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInSummary.Tests.ps1 deleted file mode 100644 index 45af3197d6..0000000000 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationSignInSummary.Tests.ps1 +++ /dev/null @@ -1,97 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - -$scriptblock = { - return @{ - value = @( - @{ - "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" - "AppId" = "dddddddd-1111-2222-3333-aaaaaaaaaaaa" - "AppDisplayName" = "Mock Portal" - "AggregatedEventDateTime" = "29-05-2024 00:00:00" - "SignInCount" = "3" - "isOrganizationDefault" = $false - "createdDateTime" = "16-08-2023 08:25:02" - "Parameters" = $args - } - - ) - - } - - } - - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications -} - -Describe "Get-EntraBetaApplicationSignInSummary" { - Context "Test for Get-EntraBetaApplicationSignInSummary" { - It "Should return application sign in summary" { - $result = Get-EntraBetaApplicationSignInSummary -Days "30" - $result | Should -Not -BeNullOrEmpty - $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - $result.AppDisplayName | Should -Be "Mock Portal" - $result.AppId | Should -be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 - } - It "Should fail when Days is empty" { - { Get-EntraBetaApplicationSignInSummary -Days } | Should -Throw "Missing an argument for parameter 'Days'*" - } - It "Should return specific application signed in summary by filter" { - $result = Get-EntraBetaApplicationSignInSummary -Days "7" -Filter "AppdisplayName eq 'Mock Portal'" - $result | Should -Not -BeNullOrEmpty - $result.AppDisplayName | Should -Be "Mock Portal" - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 - } - It "Should fail when filter is empty" { - { Get-EntraBetaApplicationSignInDetailedSummary -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" - } - It "Should return top 1 application sign in summary" { - $result = Get-EntraBetaApplicationSignInSummary -Days "7" -Top 1 - $result | Should -Not -BeNullOrEmpty - $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 - } - It "Should fail when Top is empty" { - { Get-EntraBetaApplicationSignInSummary -Days "7" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" - } - It "Should fail when Top is invalid" { - { Get-EntraBetaApplicationSignInSummary -Days "7" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInSummary" - - $result = Get-EntraBetaApplicationSignInSummary -Days "30" - $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Get-EntraBetaApplicationSignInSummary -Days "30" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - - } -} - diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 deleted file mode 100644 index 6290e005e0..0000000000 --- a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ /dev/null @@ -1,84 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -} - -Describe "Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { - Context "Test for Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { - It "Should adds a group to the cloud authentication roll-out policy in Azure AD." { - $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 - } - - It "Should fail when Id is empty" { - { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Missing an argument for parameter 'Id'.*" - } - - It "Should fail when Id is invalid" { - { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." - } - - It "Should fail when RefObjectId is empty" { - { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId } | Should -Throw "Missing an argument for parameter 'RefObjectId'.*" - } - - It "Should fail when RefObjectId is invalid" { - { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." - } - - It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { - Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement - - $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" - $params = Get-Parameters -data $result - $params.FeatureRolloutPolicyId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" - } - - It "Should contain OdataId in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement - - $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" - $value = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbcccc-1111-dddd-2222-eeee3333ffff" - $params= Get-Parameters -data $result - $params.OdataId | Should -Be $value - } - - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaFeatureRolloutPolicyDirectoryObject" - - Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaFeatureRolloutPolicyDirectoryObject" - Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - - It "Should execute successfully without throwing an error " { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Debug} | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} - - diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 deleted file mode 100644 index 9db8f3a398..0000000000 --- a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ /dev/null @@ -1,81 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -} - -Describe "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { - Context "Test for Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { - It "Should removes a group from the cloud authentication roll-out policy from Azure AD" { - $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 - } - - It "Should fail when Id is empty" { - { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" } | Should -Throw "Missing an argument for parameter 'Id'*" - } - - It "Should fail when Id is invalid" { - { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." - } - - It "Should fail when ObjectId is empty" { - { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" - } - - It "Should fail when ObjectId is invalid" { - { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId ""} | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." - } - - It "Should contain DirectoryObjectId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement - - $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" - $params = Get-Parameters -data $result - $params.DirectoryObjectId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" - } - - It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { - Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement - - $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" - $params = Get-Parameters -data $result - $params.FeatureRolloutPolicyId | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" - } - - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" - $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" - $result | Should -BeNullOrEmpty - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" - Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - - It "Should execute successfully without throwing an error " { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} - diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 index ff38f42f1b..9cc72a6a1a 100644 --- a/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 @@ -5,6 +5,9 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force $scriptblock = { @@ -40,7 +43,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups } Describe "New-EntraBetaObjectSetting" { diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 index 15d8134a65..12be199832 100644 --- a/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 @@ -5,6 +5,10 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } + + if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + } Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force $TemplateScriptblock = { return @( @@ -24,7 +28,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } Describe "Set-EntraBetaObjectSetting" { From b00cba4f244551698cd4424a409ed9031454c08e Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:49:37 +0300 Subject: [PATCH 107/124] Removed additional entry for MsDirectoryObject --- build/Beta-TypeDefs.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build/Beta-TypeDefs.txt b/build/Beta-TypeDefs.txt index 16b94375c5..9edc2d468b 100644 --- a/build/Beta-TypeDefs.txt +++ b/build/Beta-TypeDefs.txt @@ -147,12 +147,7 @@ namespace Microsoft.Open.MSGraph.Model public class MsRoleMemberInfo{ public System.String Id; } - - public class MsDirectoryObject{ - public System.String Id; - public System.String OdataType; - } - + public class AddIn { public System.String Id; From fcc3a592ef6c01769665e5b45990077c4b6f273f Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:19:00 +0300 Subject: [PATCH 108/124] Removed additional entry for MsDirectoryObject and MsRoleMemberInfo (#1212) --- build/V1.0-TypeDefs.txt | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/build/V1.0-TypeDefs.txt b/build/V1.0-TypeDefs.txt index 529fc20967..6e1e7e8eca 100644 --- a/build/V1.0-TypeDefs.txt +++ b/build/V1.0-TypeDefs.txt @@ -136,16 +136,6 @@ namespace Microsoft.Open.MSGraph.Model { using System.Linq; - - public class MsRoleMemberInfo{ - public System.String Id; - } - - public class MsDirectoryObject{ - public System.String Id; - public System.String OdataType; - } - public class AddIn { public System.String Id; @@ -647,7 +637,7 @@ namespace Microsoft.Open.MSGraph.Model { public System.String Id; } - + public class OptionalClaim { public System.String Name; From c36796eb5e0f5a90683bc3ced6f7fce67bca5cd6 Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Mon, 18 Nov 2024 12:26:09 +0300 Subject: [PATCH 109/124] Run modular tests on the pipeline (#1186) --- .../1es-entra-powershell-ci-build.yml | 2 +- ...grate-1es.yml => generate_adapter-1es.yml} | 112 +++-- .../generation-templates/generate_adapter.yml | 102 ++-- 1 | 1 + build/Publish-LocalCompatModule.ps1 | 56 ++- build/ValidateAuthenticodeSignature.ps1 | 21 + build/common-functions.ps1 | 83 ++-- module/Entra/config/ModuleSettings.json | 1 - module/EntraBeta/config/ModuleSettings.json | 1 - .../New-EntraBetaCustomHeaders.ps1 | 2 +- .../New-EntraBetaCustomHeaders.ps1 | 2 +- .../New-EntraBetaCustomHeaders.ps1 | 2 +- .../Governance/New-EntraBetaCustomHeaders.ps1 | 2 +- .../Groups/New-EntraBetaCustomHeaders.ps1 | 2 +- .../New-EntraBetaCustomHeaders.ps1 | 2 +- .../Reports/New-EntraBetaCustomHeaders.ps1 | 2 +- .../SignIns/New-EntraBetaCustomHeaders.ps1 | 2 +- .../Users/New-EntraBetaCustomHeaders.ps1 | 2 +- src/EntraModuleBuilder.ps1 | 27 +- testVNext/Common-Functions.ps1 | 83 ++++ .../Add-EntraApplicationOwner.Tests.ps1 | 14 +- ...elegatedPermissionClassification.Tests.ps1 | 12 +- .../Add-EntraServicePrincipalOwner.Tests.ps1 | 18 +- testVNext/Entra/Applications/Entra.Tests.ps1 | 31 -- .../Get-EntraApplication.Tests.ps1 | 24 +- ...ntraApplicationExtensionProperty.Tests.ps1 | 16 +- ...et-EntraApplicationKeyCredential.Tests.ps1 | 12 +- .../Get-EntraApplicationLogo.Tests.ps1 | 14 +- .../Get-EntraApplicationOwner.Tests.ps1 | 12 +- ...traApplicationPasswordCredential.Tests.ps1 | 14 +- .../Get-EntraApplicationTemplate.Tests.ps1 | 18 +- .../Get-EntraDeletedApplication.Tests.ps1 | 20 +- .../Get-EntraServicePrincipal.Tests.ps1 | 24 +- ...ervicePrincipalAppRoleAssignedTo.Tests.ps1 | 2 +- ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 2 +- ...elegatedPermissionClassification.Tests.ps1 | 14 +- ...traServicePrincipalKeyCredential.Tests.ps1 | 14 +- ...-EntraServicePrincipalMembership.Tests.ps1 | 20 +- ...cePrincipalOAuth2PermissionGrant.Tests.ps1 | 20 +- ...EntraServicePrincipalOwnedObject.Tests.ps1 | 18 +- .../Get-EntraServicePrincipalOwner.Tests.ps1 | 20 +- ...rvicePrincipalPasswordCredential.Tests.ps1 | 14 +- .../Entra/Applications/Invalid.Tests.ps1 | 20 +- testVNext/Entra/Applications/Module.Tests.ps1 | 18 +- .../New-EntraApplication.Tests.ps1 | 12 +- ...ntraApplicationExtensionProperty.Tests.ps1 | 14 +- ...plicationFromApplicationTemplate.Tests.ps1 | 2 +- .../New-EntraApplicationPassword.Tests.ps1 | 12 +- ...traApplicationPasswordCredential.Tests.ps1 | 12 +- .../New-EntraServicePrincipal.Tests.ps1 | 12 +- ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 2 +- ...rvicePrincipalPasswordCredential.Tests.ps1 | 14 +- .../Remove-EntraApplication.Tests.ps1 | 16 +- ...ntraApplicationExtensionProperty.Tests.ps1 | 16 +- .../Remove-EntraApplicationOwner.Tests.ps1 | 18 +- .../Remove-EntraApplicationPassword.Tests.ps1 | 14 +- ...traApplicationPasswordCredential.Tests.ps1 | 16 +- .../Remove-EntraDeletedApplication.Tests.ps1 | 14 +- ...move-EntraDeletedDirectoryObject.Tests.ps1 | 14 +- .../Remove-EntraServicePrincipal.Tests.ps1 | 16 +- ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 2 +- ...elegatedPermissionClassification.Tests.ps1 | 14 +- ...emove-EntraServicePrincipalOwner.Tests.ps1 | 18 +- ...rvicePrincipalPasswordCredential.Tests.ps1 | 16 +- .../Restore-EntraDeletedApplication.Tests.ps1 | 12 +- ...oupIdsServicePrincipalIsMemberOf.Tests.ps1 | 12 +- .../Set-EntraApplication.Tests.ps1 | 16 +- .../Set-EntraApplicationLogo.Tests.ps1 | 14 +- .../Set-EntraServicePrincipal.Tests.ps1 | 20 +- testVNext/Entra/Applications/Valid.Tests.ps1 | 28 +- .../Entra/Authentication/Entra.Tests.ps1 | 31 -- .../Entra/Authentication/Invalid.Tests.ps1 | 20 +- .../Entra/Authentication/Module.Tests.ps1 | 18 +- ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 2 +- ...EntraSignedInUserAllRefreshToken.Tests.ps1 | 12 +- .../Revoke-EntraUserAllRefreshToken.Tests.ps1 | 16 +- .../Entra/Authentication/Valid.Tests.ps1 | 28 +- ...dd-EntraAdministrativeUnitMember.Tests.ps1 | 14 +- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 2 +- .../Add-EntraDeviceRegisteredOwner.Tests.ps1 | 20 +- .../Add-EntraDeviceRegisteredUser.Tests.ps1 | 20 +- .../Add-EntraDirectoryRoleMember.Tests.ps1 | 18 +- .../Add-EntraScopedRoleMembership.Tests.ps1 | 12 +- .../Enable-EntraDirectoryRole.Tests.ps1 | 12 +- .../Entra/DirectoryManagement/Entra.Tests.ps1 | 31 -- .../Get-EntraAccountSku.Tests.ps1 | 12 +- .../Get-EntraAdministrativeUnit.Tests.ps1 | 18 +- ...et-EntraAdministrativeUnitMember.Tests.ps1 | 16 +- .../Get-EntraAttributeSet.Tests.ps1 | 2 +- .../Get-EntraContact.Tests.ps1 | 22 +- .../Get-EntraContactMembership.Tests.ps1 | 20 +- ...ustomSecurityAttributeDefinition.Tests.ps1 | 2 +- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 2 +- .../Get-EntraDeletedDirectoryObject.Tests.ps1 | 12 +- .../Get-EntraDevice.Tests.ps1 | 24 +- .../Get-EntraDeviceRegisteredOwner.Tests.ps1 | 20 +- .../Get-EntraDeviceRegisteredUser.Tests.ps1 | 18 +- .../Get-EntraDirSyncConfiguration.Tests.ps1 | 12 +- .../Get-EntraDirSyncFeature.Tests.ps1 | 164 +++---- ...bjectOnPremisesProvisioningError.Tests.ps1 | 2 +- .../Get-EntraDirectoryRole.Tests.ps1 | 18 +- .../Get-EntraDirectoryRoleMember.Tests.ps1 | 16 +- .../Get-EntraDirectoryRoleTemplate.Tests.ps1 | 14 +- .../Get-EntraDomain.Tests.ps1 | 18 +- ...et-EntraDomainFederationSettings.Tests.ps1 | 12 +- .../Get-EntraDomainNameReference.Tests.ps1 | 14 +- ...DomainServiceConfigurationRecord.Tests.ps1 | 2 +- ...EntraDomainVerificationDnsRecord.Tests.ps1 | 18 +- .../Get-EntraFederationProperty.Tests.ps1 | 14 +- .../Get-EntraObjectByObjectId.Tests.ps1 | 2 +- .../Get-EntraPasswordPolicy.Tests.ps1 | 12 +- .../Get-EntraScopedRoleMembership.Tests.ps1 | 14 +- .../Get-EntraSubscribedSku.Tests.ps1 | 18 +- .../Get-EntraTenantDetail.Tests.ps1 | 16 +- .../DirectoryManagement/Invalid.Tests.ps1 | 20 +- .../DirectoryManagement/Module.Tests.ps1 | 18 +- .../New-EntraAdministrativeUnit.Tests.ps1 | 12 +- .../New-EntraAttributeSet.Tests.ps1 | 2 +- ...ustomSecurityAttributeDefinition.Tests.ps1 | 2 +- ...New-EntraDirectoryRoleAssignment.Tests.ps1 | 88 ---- .../New-EntraDomain.Tests.ps1 | 12 +- .../Remove-EntraAdministrativeUnit.Tests.ps1 | 12 +- ...ve-EntraAdministrativeUnitMember.Tests.ps1 | 14 +- .../Remove-EntraDevice.Tests.ps1 | 16 +- ...emove-EntraDeviceRegisteredOwner.Tests.ps1 | 20 +- ...Remove-EntraDeviceRegisteredUser.Tests.ps1 | 20 +- .../Remove-EntraDirectoryRoleMember.Tests.ps1 | 18 +- .../Remove-EntraDomain.Tests.ps1 | 14 +- ...Remove-EntraScopedRoleMembership.Tests.ps1 | 14 +- ...tore-EntraDeletedDirectoryObject.Tests.ps1 | 14 +- .../Set-EntraAdministrativeUnit.Tests.ps1 | 14 +- .../Set-EntraAttributeSet.Tests.ps1 | 2 +- ...ustomSecurityAttributeDefinition.Tests.ps1 | 2 +- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 2 +- .../Set-EntraDevice.Tests.ps1 | 16 +- .../Set-EntraDirSyncConfiguration.Tests.ps1 | 14 +- .../Set-EntraDirSyncEnabled.Tests.ps1 | 12 +- .../Set-EntraDirSyncFeature.Tests.ps1 | 14 +- ...Set-EntraDirectoryRoleDefinition.Tests.ps1 | 110 ----- .../Set-EntraDomain.Tests.ps1 | 14 +- ...et-EntraDomainFederationSettings.Tests.ps1 | 16 +- .../Set-EntraPartnerInformation.Tests.ps1 | 14 +- .../Set-EntraTenantDetail.Tests.ps1 | 14 +- .../Entra/DirectoryManagement/Valid.Tests.ps1 | 28 +- testVNext/Entra/Entra.Tests.ps1 | 54 +++ testVNext/Entra/EntraCmdletsMap.ps1 | 413 +++++++++++++++++ testVNext/Entra/Governance/Entra.Tests.ps1 | 31 -- ...Get-EntraDirectoryRoleAssignment.Tests.ps1 | 22 +- ...Get-EntraDirectoryRoleDefinition.Tests.ps1 | 24 +- ...New-EntraDirectoryRoleAssignment.Tests.ps1 | 2 +- ...New-EntraDirectoryRoleDefinition.Tests.ps1 | 2 +- ...ove-EntraDirectoryRoleAssignment.Tests.ps1 | 2 +- ...ove-EntraDirectoryRoleDefinition.Tests.ps1 | 2 +- ...Set-EntraDirectoryRoleDefinition.Tests.ps1 | 2 +- testVNext/Entra/Governance/Valid.Tests.ps1 | 6 +- .../Groups/Add-EntraGroupMember.Tests.ps1 | 16 +- .../Groups/Add-EntraGroupOwner.Tests.ps1 | 14 +- .../Add-EntraLifecyclePolicyGroup.Tests.ps1 | 14 +- testVNext/Entra/Groups/Entra.Tests.ps1 | 31 -- .../Groups/Get-EntraDeletedGroup.Tests.ps1 | 24 +- .../Entra/Groups/Get-EntraGroup.Tests.ps1 | 20 +- .../Get-EntraGroupAppRoleAssignment.Tests.ps1 | 20 +- .../Get-EntraGroupLifecyclePolicy.Tests.ps1 | 16 +- .../Groups/Get-EntraGroupMember.Tests.ps1 | 18 +- .../Groups/Get-EntraGroupOwner.Tests.ps1 | 20 +- .../Get-EntraLifecyclePolicyGroup.Tests.ps1 | 16 +- .../Groups/Get-EntraObjectSetting.Tests.ps1 | 2 +- testVNext/Entra/Groups/Invalid.Tests.ps1 | 20 +- testVNext/Entra/Groups/Module.Tests.ps1 | 18 +- .../Entra/Groups/New-EntraGroup.Tests.ps1 | 12 +- .../New-EntraGroupAppRoleAssignment.Tests.ps1 | 14 +- .../New-EntraGroupLifecyclePolicy.Tests.ps1 | 12 +- .../Entra/Groups/Remove-EntraGroup.Tests.ps1 | 16 +- ...move-EntraGroupAppRoleAssignment.Tests.ps1 | 16 +- ...Remove-EntraGroupLifecyclePolicy.Tests.ps1 | 16 +- .../Groups/Remove-EntraGroupMember.Tests.ps1 | 14 +- .../Groups/Remove-EntraGroupOwner.Tests.ps1 | 14 +- ...Remove-EntraLifecyclePolicyGroup.Tests.ps1 | 14 +- .../Reset-EntraLifeCycleGroup.Tests.ps1 | 14 +- ...t-EntraGroupIdsContactIsMemberOf.Tests.ps1 | 12 +- ...ect-EntraGroupIdsGroupIsMemberOf.Tests.ps1 | 14 +- ...lect-EntraGroupIdsUserIsMemberOf.Tests.ps1 | 12 +- .../Entra/Groups/Set-EntraGroup.Tests.ps1 | 16 +- .../Set-EntraGroupLifecyclePolicy.Tests.ps1 | 12 +- testVNext/Entra/Groups/Valid.Tests.ps1 | 28 +- testVNext/Entra/New-EntraInvitation.Tests.ps1 | 434 +++++++++--------- testVNext/Entra/Reports/Entra.Tests.ps1 | 31 -- .../Get-EntraAuditDirectoryLog.Tests.ps1 | 2 +- .../Reports/Get-EntraAuditSignInLog.Tests.ps1 | 2 +- testVNext/Entra/Reports/Valid.Tests.ps1 | 6 +- testVNext/Entra/SignIns/Entra.Tests.ps1 | 31 -- .../Get-EntraAuthorizationPolicy.Tests.ps1 | 16 +- ...Get-EntraConditionalAccessPolicy.Tests.ps1 | 14 +- .../Get-EntraFeatureRolloutPolicy.Tests.ps1 | 2 +- .../Get-EntraIdentityProvider.Tests.ps1 | 16 +- .../Get-EntraOAuth2PermissionGrant.Tests.ps1 | 18 +- ...EntraPermissionGrantConditionSet.Tests.ps1 | 18 +- .../Get-EntraPermissionGrantPolicy.Tests.ps1 | 14 +- .../Entra/SignIns/Get-EntraPolicy.Tests.ps1 | 16 +- ...EntraTrustedCertificateAuthority.Tests.ps1 | 16 +- testVNext/Entra/SignIns/Invalid.Tests.ps1 | 20 +- testVNext/Entra/SignIns/Module.Tests.ps1 | 18 +- ...New-EntraConditionalAccessPolicy.Tests.ps1 | 16 +- .../New-EntraFeatureRolloutPolicy.Tests.ps1 | 2 +- .../New-EntraIdentityProvider.Tests.ps1 | 12 +- .../New-EntraNamedLocationPolicy.Tests.ps1 | 14 +- .../New-EntraOauth2PermissionGrant.Tests.ps1 | 12 +- ...EntraPermissionGrantConditionSet.Tests.ps1 | 16 +- .../New-EntraPermissionGrantPolicy.Tests.ps1 | 12 +- .../Entra/SignIns/New-EntraPolicy.Tests.ps1 | 12 +- ...EntraTrustedCertificateAuthority.Tests.ps1 | 16 +- ...Remove-EntraFeatureRolloutPolicy.Tests.ps1 | 2 +- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 2 +- .../Remove-EntraIdentityProvider.Tests.ps1 | 16 +- .../Remove-EntraNamedLocationPolicy.Tests.ps1 | 14 +- ...emove-EntraOAuth2PermissionGrant.Tests.ps1 | 14 +- ...EntraPermissionGrantConditionSet.Tests.ps1 | 20 +- ...emove-EntraPermissionGrantPolicy.Tests.ps1 | 14 +- .../SignIns/Remove-EntraPolicy.Tests.ps1 | 12 +- ...EntraTrustedCertificateAuthority.Tests.ps1 | 16 +- .../Set-EntraAuthorizationPolicy.Tests.ps1 | 12 +- ...Set-EntraConditionalAccessPolicy.Tests.ps1 | 22 +- .../Set-EntraFeatureRolloutPolicy.Tests.ps1 | 12 +- .../Set-EntraNamedLocationPolicy.Tests.ps1 | 16 +- ...EntraPermissionGrantConditionSet.Tests.ps1 | 24 +- .../Set-EntraPermissionGrantPolicy.Tests.ps1 | 12 +- .../Entra/SignIns/Set-EntraPolicy.Tests.ps1 | 26 +- ...EntraTrustedCertificateAuthority.Tests.ps1 | 16 +- testVNext/Entra/SignIns/Valid.Tests.ps1 | 28 +- testVNext/Entra/Users/Entra.Tests.ps1 | 31 -- testVNext/Entra/Users/Get-EntraUser.Tests.ps1 | 24 +- .../Get-EntraUserAppRoleAssignment.Tests.ps1 | 18 +- .../Get-EntraUserCreatedObject.Tests.ps1 | 20 +- .../Users/Get-EntraUserDirectReport.Tests.ps1 | 20 +- .../Users/Get-EntraUserExtension.Tests.ps1 | 16 +- .../Get-EntraUserLicenseDetail.Tests.ps1 | 16 +- .../Users/Get-EntraUserManager.Tests.ps1 | 16 +- .../Users/Get-EntraUserMembership.Tests.ps1 | 20 +- ...t-EntraUserOAuth2PermissionGrant.Tests.ps1 | 20 +- .../Users/Get-EntraUserOwnedDevice.Tests.ps1 | 18 +- .../Users/Get-EntraUserOwnedObject.Tests.ps1 | 20 +- .../Get-EntraUserRegisteredDevice.Tests.ps1 | 20 +- testVNext/Entra/Users/Invalid.Tests.ps1 | 20 +- testVNext/Entra/Users/Module.Tests.ps1 | 18 +- testVNext/Entra/Users/New-EntraUser.Tests.ps1 | 12 +- .../New-EntraUserAppRoleAssignment.Tests.ps1 | 14 +- .../Entra/Users/Remove-EntraUser.Tests.ps1 | 16 +- ...emove-EntraUserAppRoleAssignment.Tests.ps1 | 14 +- .../Users/Remove-EntraUserManager.Tests.ps1 | 16 +- testVNext/Entra/Users/Set-EntraUser.Tests.ps1 | 18 +- .../Users/Set-EntraUserLicense.Tests.ps1 | 12 +- .../Users/Set-EntraUserManager.Tests.ps1 | 16 +- .../Users/Set-EntraUserPassword.Tests.ps1 | 16 +- .../Set-EntraUserThumbnailPhoto.Tests.ps1 | 18 +- ...Update-EntraSignedInUserPassword.Tests.ps1 | 2 +- .../Update-EntraUserFromFederated.Tests.ps1 | 2 +- testVNext/Entra/Users/Valid.Tests.ps1 | 28 +- .../Add-EntraBetaApplicationPolicy.Tests.ps1 | 2 +- .../Get-EntraBetaApplication.Tests.ps1 | 2 +- .../Get-EntraBetaApplicationLogo.Tests.ps1 | 2 +- ...etaApplicationPasswordCredential.Tests.ps1 | 2 +- .../Get-EntraBetaApplicationPolicy.Tests.ps1 | 2 +- ...Get-EntraBetaApplicationTemplate.Tests.ps1 | 2 +- ...taPasswordSingleSignOnCredential.Tests.ps1 | 2 +- .../Get-EntraBetaServicePrincipal.Tests.ps1 | 2 +- ...aBetaServicePrincipalOwnedObject.Tests.ps1 | 2 +- .../New-EntraBetaApplication.Tests.ps1 | 2 +- ...taPasswordSingleSignOnCredential.Tests.ps1 | 2 +- .../Remove-EntraBetaApplication.Tests.ps1 | 2 +- ...emove-EntraBetaApplicationPolicy.Tests.ps1 | 2 +- ...taPasswordSingleSignOnCredential.Tests.ps1 | 2 +- .../Set-EntraBetaApplication.Tests.ps1 | 2 +- .../Set-EntraBetaApplicationLogo.Tests.ps1 | 2 +- ...taPasswordSingleSignOnCredential.Tests.ps1 | 2 +- .../Set-EntraBetaServicePrincipal.Tests.ps1 | 2 +- ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 2 +- ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 2 +- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 2 +- ...d-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 2 +- ...dd-EntraBetaDeviceRegisteredUser.Tests.ps1 | 2 +- ...dd-EntraBetaScopedRoleMembership.Tests.ps1 | 22 +- .../Confirm-EntraBetaDomain.Tests.ps1 | 2 +- .../Get-EntraBetaAccountSku.Tests.ps1 | 2 +- .../Get-EntraBetaAdministrativeUnit.Tests.ps1 | 2 +- ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 2 +- .../Get-EntraBetaAttributeSet.Tests.ps1 | 2 +- ...ustomSecurityAttributeDefinition.Tests.ps1 | 2 +- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 2 +- .../Get-EntraBetaDevice.Tests.ps1 | 2 +- ...t-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 2 +- ...et-EntraBetaDeviceRegisteredUser.Tests.ps1 | 2 +- ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 2 +- .../Get-EntraBetaDirSyncFeature.Tests.ps1 | 2 +- ...bjectOnPremisesProvisioningError.Tests.ps1 | 2 +- .../Get-EntraBetaDirectorySetting.Tests.ps1 | 2 +- ...ntraBetaDirectorySettingTemplate.Tests.ps1 | 2 +- ...ntraBetaDomainFederationSettings.Tests.ps1 | 2 +- .../Get-EntraBetaFederationProperty.Tests.ps1 | 2 +- .../Get-EntraBetaPasswordPolicy.Tests.ps1 | 2 +- ...et-EntraBetaScopedRoleMembership.Tests.ps1 | 2 +- .../New-EntraBetaAdministrativeUnit.Tests.ps1 | 2 +- ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 2 +- .../New-EntraBetaAttributeSet.Tests.ps1 | 2 +- ...ustomSecurityAttributeDefinition.Tests.ps1 | 2 +- .../New-EntraBetaDirectorySetting.Tests.ps1 | 2 +- ...move-EntraBetaAdministrativeUnit.Tests.ps1 | 2 +- ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 2 +- .../Remove-EntraBetaDevice.Tests.ps1 | 2 +- ...e-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 2 +- ...ve-EntraBetaDeviceRegisteredUser.Tests.ps1 | 2 +- ...Remove-EntraBetaDirectorySetting.Tests.ps1 | 2 +- ...ve-EntraBetaScopedRoleMembership.Tests.ps1 | 2 +- .../Set-EntraBetaAdministrativeUnit.Tests.ps1 | 2 +- .../Set-EntraBetaAttributeSet.Tests.ps1 | 2 +- ...ustomSecurityAttributeDefinition.Tests.ps1 | 2 +- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 2 +- .../Set-EntraBetaDevice.Tests.ps1 | 2 +- ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 2 +- .../Set-EntraBetaDirSyncEnabled.Tests.ps1 | 2 +- .../Set-EntraBetaDirSyncFeature.Tests.ps1 | 2 +- .../Set-EntraBetaDirectorySetting.Tests.ps1 | 2 +- ...ntraBetaDomainFederationSettings.Tests.ps1 | 2 +- .../Set-EntraBetaPartnerInformation.Tests.ps1 | 2 +- testVNext/EntraBeta/EntraBeta.Tests.ps1 | 35 +- testVNext/EntraBeta/General.Tests.ps1 | 68 +-- .../Get-EntraBetaPrivilegedResource.Tests.ps1 | 2 +- ...ntraBetaPrivilegedRoleDefinition.Tests.ps1 | 2 +- ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 2 +- ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 2 +- .../Groups/Add-EntraBetaGroupMember.Tests.ps1 | 2 +- .../Groups/Add-EntraBetaGroupOwner.Tests.ps1 | 2 +- .../Get-EntraBetaDeletedGroup.Tests.ps1 | 2 +- .../Groups/Get-EntraBetaGroup.Tests.ps1 | 2 +- ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 2 +- ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 2 +- .../Groups/Get-EntraBetaGroupMember.Tests.ps1 | 2 +- .../Groups/Get-EntraBetaGroupOwner.Tests.ps1 | 2 +- .../Get-EntraBetaObjectSetting.Tests.ps1 | 2 +- .../Groups/New-EntraBetaGroup.Tests.ps1 | 2 +- ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 2 +- .../New-EntraBetaObjectSetting.Tests.ps1 | 2 +- .../Groups/Remove-EntraBetaGroup.Tests.ps1 | 2 +- ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 2 +- ...ve-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 2 +- .../Remove-EntraBetaGroupMember.Tests.ps1 | 2 +- .../Remove-EntraBetaGroupOwner.Tests.ps1 | 2 +- .../Remove-EntraBetaObjectSetting.Tests.ps1 | 2 +- .../Groups/Set-EntraBetaGroup.Tests.ps1 | 2 +- ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 2 +- .../Set-EntraBetaObjectSetting.Tests.ps1 | 4 +- ...ApplicationSignInDetailedSummary.Tests.ps1 | 2 +- ...ntraBetaApplicationSignInSummary.Tests.ps1 | 2 +- .../Get-EntraBetaAuditDirectoryLog.Tests.ps1 | 2 +- .../Get-EntraBetaAuditSignInLog.Tests.ps1 | 2 +- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 2 +- ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 2 +- ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 2 +- ...t-EntraBetaPermissionGrantPolicy.Tests.ps1 | 2 +- .../SignIns/Get-EntraBetaPolicy.Tests.ps1 | 2 +- ...Get-EntraBetaPolicyAppliedObject.Tests.ps1 | 2 +- ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 2 +- ...ew-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 2 +- ...w-EntraBetaOauth2PermissionGrant.Tests.ps1 | 2 +- ...ve-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 2 +- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 2 +- .../SignIns/Remove-EntraBetaPolicy.Tests.ps1 | 2 +- ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 2 +- ...ve-EntraBetaTrustFrameworkPolicy.Tests.ps1 | 2 +- ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 2 +- .../SignIns/Set-EntraBetaPolicy.Tests.ps1 | 2 +- .../Users/Get-EntraBetaUser.Tests.ps1 | 2 +- .../Get-EntraBetaUserExtension.Tests.ps1 | 2 +- .../Get-EntraBetaUserLicenseDetail.Tests.ps1 | 2 +- .../Users/Get-EntraBetaUserManager.Tests.ps1 | 2 +- .../Get-EntraBetaUserMembership.Tests.ps1 | 2 +- .../Get-EntraBetaUserOwnedDevice.Tests.ps1 | 2 +- ...et-EntraBetaUserRegisteredDevice.Tests.ps1 | 2 +- .../Users/New-EntraBetaUser.Tests.ps1 | 2 +- .../Users/Remove-EntraBetaUser.Tests.ps1 | 2 +- .../Remove-EntraBetaUserManager.Tests.ps1 | 2 +- .../Users/Set-EntraBetaUser.Tests.ps1 | 2 +- .../Users/Set-EntraBetaUserManager.Tests.ps1 | 2 +- ...te-EntraBetaSignedInUserPassword.Tests.ps1 | 2 +- ...pdate-EntraBetaUserFromFederated.Tests.ps1 | 2 +- 384 files changed, 2929 insertions(+), 2648 deletions(-) rename .azure-pipelines/generation-templates/{generate_adapter-migrate-1es.yml => generate_adapter-1es.yml} (73%) create mode 100644 1 create mode 100644 build/ValidateAuthenticodeSignature.ps1 create mode 100644 testVNext/Common-Functions.ps1 delete mode 100644 testVNext/Entra/Applications/Entra.Tests.ps1 delete mode 100644 testVNext/Entra/Authentication/Entra.Tests.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/Entra.Tests.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleAssignment.Tests.ps1 delete mode 100644 testVNext/Entra/DirectoryManagement/Set-EntraDirectoryRoleDefinition.Tests.ps1 create mode 100644 testVNext/Entra/Entra.Tests.ps1 create mode 100644 testVNext/Entra/EntraCmdletsMap.ps1 delete mode 100644 testVNext/Entra/Governance/Entra.Tests.ps1 rename testVNext/Entra/{DirectoryManagement => Governance}/Get-EntraDirectoryRoleAssignment.Tests.ps1 (88%) rename testVNext/Entra/{DirectoryManagement => Governance}/Get-EntraDirectoryRoleDefinition.Tests.ps1 (88%) delete mode 100644 testVNext/Entra/Groups/Entra.Tests.ps1 delete mode 100644 testVNext/Entra/Reports/Entra.Tests.ps1 delete mode 100644 testVNext/Entra/SignIns/Entra.Tests.ps1 delete mode 100644 testVNext/Entra/Users/Entra.Tests.ps1 diff --git a/.azure-pipelines/1es-entra-powershell-ci-build.yml b/.azure-pipelines/1es-entra-powershell-ci-build.yml index fa72ad1d83..20001ad6ab 100644 --- a/.azure-pipelines/1es-entra-powershell-ci-build.yml +++ b/.azure-pipelines/1es-entra-powershell-ci-build.yml @@ -42,7 +42,7 @@ extends: - template: .azure-pipelines/common-templates/install-tools.yml@self - template: .azure-pipelines/common-templates/security-pre-checks.yml@self - - template: .azure-pipelines/generation-templates/generate_adapter-migrate-1es.yml@self + - template: .azure-pipelines/generation-templates/generate_adapter-1es.yml@self parameters: Sign: ${{ parameters.Sign }} diff --git a/.azure-pipelines/generation-templates/generate_adapter-migrate-1es.yml b/.azure-pipelines/generation-templates/generate_adapter-1es.yml similarity index 73% rename from .azure-pipelines/generation-templates/generate_adapter-migrate-1es.yml rename to .azure-pipelines/generation-templates/generate_adapter-1es.yml index dfa002b8ae..51680a631d 100644 --- a/.azure-pipelines/generation-templates/generate_adapter-migrate-1es.yml +++ b/.azure-pipelines/generation-templates/generate_adapter-1es.yml @@ -16,26 +16,26 @@ steps: inputs: targetType: inline script: 'echo $PSVersionTable' - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Set maximum function count' inputs: targetType: inline script: '$MaximumFunctionCount=32768' - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Install Dependencies Entra' inputs: targetType: inline script: | ./build/Install-Dependencies.ps1 -ModuleName Entra -Verbose - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Install PlatyPS' inputs: targetType: inline script: Install-Module PlatyPS -scope currentuser -Force - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Create Module Help Files Entra' inputs: @@ -44,13 +44,21 @@ steps: Import-Module PlatyPS . ./build/common-functions.ps1 Create-ModuleHelp -Module Entra - pwsh: false + pwsh: true +# - task: powershell@2 +# displayName: 'Build Entra' +# inputs: +# targetType: inline +# script: ./build/Create-CompatModule.ps1 -Module Entra -Verbose +# pwsh: true - task: powershell@2 - displayName: 'Build Entra' + displayName: '[Modularization ] Build Entra' inputs: targetType: inline - script: ./build/Create-CompatModule.ps1 -Module Entra -Verbose - pwsh: false + script: | + ./build/Create-EntraModule.ps1 -Module Entra -Verbose + ./build/Create-EntraModule.ps1 -Module Entra -Root -Verbose + pwsh: true - ${{ if eq(parameters.Sign, true) }}: - template: ../common-templates/esrp/codesign-migrate.yml parameters: @@ -61,11 +69,7 @@ steps: inputs: targetType: "inline" pwsh: true - script: | - $ModulePsd1 = "bin/Microsoft.Graph.Entra.psd1" - $ModulePsm1 = "bin/Microsoft.Graph.Entra.psm1" - ($ModulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" - ($ModulePsm1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" + script: ./build/ValidateAuthenticodeSignature.ps1 - task: powershell@2 displayName: 'Create Module Files Entra' inputs: @@ -73,7 +77,7 @@ steps: script: | . ./build/common-functions.ps1 Create-ModuleFolder - pwsh: false + pwsh: true - task: 1ES.PublishBuildArtifacts@1 displayName: 'Publish Module Files EntraBeta' inputs: @@ -86,13 +90,13 @@ steps: script: | . ./build/common-functions.ps1 Register-LocalGallery -Path $(Build.ArtifactStagingDirectory) - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Publish to Local Gallery Entra' inputs: targetType: inline script: ./build/Publish-LocalCompatModule.ps1 -Install - pwsh: false + pwsh: true - task: 1ES.PublishBuildArtifacts@1 displayName: 'Publish Module Nuget File Entra' inputs: @@ -105,14 +109,14 @@ steps: script: | . ./build/common-functions.ps1 Remove-BuildDirectories - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Install Dependencies EntraBeta' inputs: targetType: inline script: | ./build/Install-Dependencies.ps1 -ModuleName EntraBeta -Verbose - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Create Module Help Files EntraBeta' inputs: @@ -121,15 +125,23 @@ steps: Import-Module PlatyPS . ./build/common-functions.ps1 Create-ModuleHelp -Module EntraBeta - pwsh: false + pwsh: true +# - task: powershell@2 +# displayName: 'Build EntraBeta' +# inputs: +# targetType: inline +# script: | +# $MaximumFunctionCount=32768 +# ./build/Create-CompatModule.ps1 -Module EntraBeta -Verbose +# pwsh: true - task: powershell@2 - displayName: 'Build EntraBeta' + displayName: '[Modularization ] Build EntraBeta' inputs: targetType: inline script: | - $MaximumFunctionCount=32768 - ./build/Create-CompatModule.ps1 -Module EntraBeta -Verbose - pwsh: false + ./build/Create-EntraModule.ps1 -Module EntraBeta -Verbose + ./build/Create-EntraModule.ps1 -Module EntraBeta -Root -Verbose + pwsh: true - ${{ if eq(parameters.Sign, true) }}: - template: ../common-templates/esrp/codesign-migrate.yml parameters: @@ -140,11 +152,7 @@ steps: inputs: targetType: "inline" pwsh: true - script: | - $ModulePsd1 = "bin/Microsoft.Graph.Entra.Beta.psd1" - $ModulePsm1 = "bin/Microsoft.Graph.Entra.Beta.psm1" - ($ModulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" - ($ModulePsm1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" + script: ./build/ValidateAuthenticodeSignature.ps1 - task: powershell@2 displayName: 'Create Module Files EntraBeta' inputs: @@ -152,7 +160,7 @@ steps: script: | . ./build/common-functions.ps1 Create-ModuleFolder - pwsh: false + pwsh: true - task: 1ES.PublishBuildArtifacts@1 displayName: 'Publish Module Files EntraBeta' inputs: @@ -163,7 +171,7 @@ steps: inputs: targetType: inline script: ./build/Publish-LocalCompatModule.ps1 -Install - pwsh: false + pwsh: true - task: 1ES.PublishBuildArtifacts@1 displayName: 'Publish Module Nuget File EntraBeta' inputs: @@ -176,20 +184,46 @@ steps: script: | . ./build/common-functions.ps1 Remove-BuildDirectories - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Install Pester' inputs: targetType: inline script: Install-Module Pester -scope currentuser -SkipPublisherCheck -Force - pwsh: false + pwsh: true +# - task: powershell@2 +# displayName: 'Run tests Entra' +# inputs: +# targetType: inline +# pwsh: true +# script: | +# cd test/module/entra +# Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml +# - task: PublishTestResults@2 +# inputs: +# testResultsFormat: NUnit +# testResultsFiles: "./test/results/pester-test-results-ad.xml" +# failTaskOnFailedTests: true +# - task: powershell@2 +# displayName: 'Run tests EntraBeta' +# inputs: +# targetType: inline +# pwsh: true +# script: | +# cd test/module/entrabeta +# Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml +# - task: PublishTestResults@2 +# inputs: +# testResultsFormat: NUnit +# testResultsFiles: "./test/results/pester-test-results-preview.xml" +# failTaskOnFailedTests: true - task: powershell@2 - displayName: 'Run tests Entra' + displayName: '[Modularization] Run tests Entra' inputs: targetType: inline pwsh: true script: | - cd test/module/entra + cd testVNext/Entra Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml - task: PublishTestResults@2 inputs: @@ -197,17 +231,17 @@ steps: testResultsFiles: "./test/results/pester-test-results-ad.xml" failTaskOnFailedTests: true - task: powershell@2 - displayName: 'Run tests EntraBeta' + displayName: '[Modularization] Run tests Entra Beta' inputs: targetType: inline pwsh: true script: | - cd test/module/entrabeta - Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml + cd testVNext/EntraBeta + Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml - task: PublishTestResults@2 inputs: testResultsFormat: NUnit - testResultsFiles: "./test/results/pester-test-results-preview.xml" + testResultsFiles: "./test/results/pester-test-results-ad.xml" failTaskOnFailedTests: true - ${{ if eq(parameters.Integration, true) }}: - task: powershell@2 @@ -243,7 +277,7 @@ steps: script: | . ./build/common-functions.ps1 Unregister-LocalGallery - pwsh: false + pwsh: true - task: PSScriptAnalyzer@1 displayName: 'Run PSScriptAnalyzer' inputs: diff --git a/.azure-pipelines/generation-templates/generate_adapter.yml b/.azure-pipelines/generation-templates/generate_adapter.yml index 30567ca177..0cc75ef8a4 100644 --- a/.azure-pipelines/generation-templates/generate_adapter.yml +++ b/.azure-pipelines/generation-templates/generate_adapter.yml @@ -16,26 +16,26 @@ steps: inputs: targetType: inline script: 'echo $PSVersionTable' - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Set maximum function count' inputs: targetType: inline script: '$MaximumFunctionCount=32768' - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Install Dependencies Entra' inputs: targetType: inline script: | ./build/Install-Dependencies.ps1 -ModuleName Entra -Verbose - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Install PlatyPS' inputs: targetType: inline script: Install-Module PlatyPS -scope currentuser -Force - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Create Module Help Files Entra' inputs: @@ -44,13 +44,23 @@ steps: Import-Module PlatyPS . ./build/common-functions.ps1 Create-ModuleHelp -Module Entra - pwsh: false + pwsh: true +# - task: powershell@2 +# displayName: 'Build Entra' +# inputs: +# targetType: inline +# script: | +# $MaximumFunctionCount=32768 +# ./build/Create-CompatModule.ps1 -Module Entra -Verbose +# pwsh: true - task: powershell@2 - displayName: 'Build Entra' + displayName: '[Modularization ] Build Entra' inputs: targetType: inline - script: ./build/Create-CompatModule.ps1 -Module Entra -Verbose - pwsh: false + script: | + ./build/Create-EntraModule.ps1 -Module Entra -Verbose + ./build/Create-EntraModule.ps1 -Module Entra -Root -Verbose + pwsh: true - ${{ if eq(parameters.Sign, true) }}: - template: ../common-templates/esrp/codesign.yml parameters: @@ -73,7 +83,7 @@ steps: script: | . ./build/common-functions.ps1 Create-ModuleFolder - pwsh: false + pwsh: true - task: PublishBuildArtifacts@1 displayName: 'Publish Module Files Entra' inputs: @@ -86,13 +96,13 @@ steps: script: | . ./build/common-functions.ps1 Register-LocalGallery -Path $(Build.ArtifactStagingDirectory) - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Publish to Local Gallery Entra' inputs: targetType: inline script: ./build/Publish-LocalCompatModule.ps1 -Install - pwsh: false + pwsh: true - task: PublishBuildArtifacts@1 displayName: 'Publish Module Nuget File Entra' inputs: @@ -105,14 +115,14 @@ steps: script: | . ./build/common-functions.ps1 Remove-BuildDirectories - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Install Dependencies EntraBeta' inputs: targetType: inline script: | ./build/Install-Dependencies.ps1 -ModuleName EntraBeta -Verbose - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Create Module Help Files EntraBeta' inputs: @@ -121,15 +131,23 @@ steps: Import-Module PlatyPS . ./build/common-functions.ps1 Create-ModuleHelp -Module EntraBeta - pwsh: false + pwsh: true +# - task: powershell@2 +# displayName: 'Build EntraBeta' +# inputs: +# targetType: inline +# script: | +# $MaximumFunctionCount=32768 +# ./build/Create-CompatModule.ps1 -Module EntraBeta -Verbose +# pwsh: true - task: powershell@2 - displayName: 'Build EntraBeta' + displayName: '[Modularization ] Build EntraBeta' inputs: targetType: inline script: | - $MaximumFunctionCount=32768 - ./build/Create-CompatModule.ps1 -Module EntraBeta -Verbose - pwsh: false + ./build/Create-EntraModule.ps1 -Module EntraBeta -Verbose + ./build/Create-EntraModule.ps1 -Module EntraBeta -Root -Verbose + pwsh: true - ${{ if eq(parameters.Sign, true) }}: - template: ../common-templates/esrp/codesign.yml parameters: @@ -152,7 +170,7 @@ steps: script: | . ./build/common-functions.ps1 Create-ModuleFolder - pwsh: false + pwsh: true - task: PublishBuildArtifacts@1 displayName: 'Publish Module Files EntraBeta' inputs: @@ -163,7 +181,7 @@ steps: inputs: targetType: inline script: ./build/Publish-LocalCompatModule.ps1 -Install - pwsh: false + pwsh: true - task: PublishBuildArtifacts@1 displayName: 'Publish Module Nuget File EntraBeta' inputs: @@ -176,20 +194,46 @@ steps: script: | . ./build/common-functions.ps1 Remove-BuildDirectories - pwsh: false + pwsh: true - task: powershell@2 displayName: 'Install Pester' inputs: targetType: inline script: Install-Module Pester -scope currentuser -SkipPublisherCheck -Force - pwsh: false + pwsh: true +# - task: powershell@2 +# displayName: 'Run tests Entra' +# inputs: +# targetType: inline +# pwsh: true +# script: | +# cd test/module/entra +# Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml +# - task: PublishTestResults@2 +# inputs: +# testResultsFormat: NUnit +# testResultsFiles: "./test/results/pester-test-results-ad.xml" +# failTaskOnFailedTests: true +# - task: powershell@2 +# displayName: 'Run tests EntraBeta' +# inputs: +# targetType: inline +# pwsh: true +# script: | +# cd test/module/entrabeta +# Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml +# - task: PublishTestResults@2 +# inputs: +# testResultsFormat: NUnit +# testResultsFiles: "./test/results/pester-test-results-preview.xml" +# failTaskOnFailedTests: true - task: powershell@2 - displayName: 'Run tests Entra' + displayName: '[Modularization] Run tests Entra' inputs: targetType: inline pwsh: true script: | - cd test/module/entra + cd testVNext/Entra Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml - task: PublishTestResults@2 inputs: @@ -197,17 +241,17 @@ steps: testResultsFiles: "./test/results/pester-test-results-ad.xml" failTaskOnFailedTests: true - task: powershell@2 - displayName: 'Run tests EntraBeta' + displayName: '[Modularization] Run tests Entra Beta' inputs: targetType: inline pwsh: true script: | - cd test/module/entrabeta - Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml + cd testVNext/EntraBeta + Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml - task: PublishTestResults@2 inputs: testResultsFormat: NUnit - testResultsFiles: "./test/results/pester-test-results-preview.xml" + testResultsFiles: "./test/results/pester-test-results-ad.xml" failTaskOnFailedTests: true - ${{ if eq(parameters.Integration, true) }}: - task: powershell@2 @@ -243,7 +287,7 @@ steps: script: | . ./build/common-functions.ps1 Unregister-LocalGallery - pwsh: false + pwsh: true - task: PSScriptAnalyzer@1 displayName: 'Run PSScriptAnalyzer' inputs: diff --git a/1 b/1 new file mode 100644 index 0000000000..ec635144f6 --- /dev/null +++ b/1 @@ -0,0 +1 @@ +9 diff --git a/build/Publish-LocalCompatModule.ps1 b/build/Publish-LocalCompatModule.ps1 index 023851a7ca..89a28e6903 100644 --- a/build/Publish-LocalCompatModule.ps1 +++ b/build/Publish-LocalCompatModule.ps1 @@ -10,18 +10,29 @@ param( . "$psscriptroot/common-functions.ps1" -$modulePath = Join-Path (Get-ModuleBasePath) (Get-ConfigValue -Name ModuleOutputSubdirectoryName) -$modulePath = Join-Path $modulePath (Get-ModuleName) -$fullModuleName = Get-ModuleName -if($fullModuleName -eq 'Microsoft.Graph.Entra'){ - $moduleName = 'Entra' +$fullModuleNames = @() +$modName = Get-ModuleName + +if($modName -is [array]){ + $fullModuleName = $modName[0] + $fullModuleNames = $modName } else{ + $fullModuleName = $modName + $fullModuleNames += $modName +} + +if($fullModuleName -like 'Microsoft.Graph.Entra.Beta*'){ $moduleName = 'EntraBeta' } +else{ + $moduleName = 'Entra' +} $settingPath = "$PSScriptRoot/../module/$ModuleName/config/ModuleSettings.json" $content = Get-Content -Path $settingPath | ConvertFrom-Json +$metadataPath = "$PSScriptRoot/../module/$ModuleName/config/ModuleMetadata.json" +$metadata = Get-Content -Path $metadataPath | ConvertFrom-Json if($moduleName -eq 'Entra'){ Publish-Module -Name Microsoft.Graph.Authentication -RequiredVersion $content.destinationModuleVersion -Repository (Get-LocalPSRepoName) @@ -32,8 +43,37 @@ foreach ($destinationModuleName in $content.destinationModuleName){ Publish-Module -Name $destinationModuleName -RequiredVersion $content.destinationModuleVersion -Repository (Get-LocalPSRepoName) } -Publish-Module -Path $modulePath -Repository (Get-LocalPSRepoName) +foreach($module in $fullModuleNames){ + if(($module -eq 'Microsoft.Graph.Entra') -or ($module -eq 'Microsoft.Graph.Entra.Beta')){ + continue + } + $modulePath = Join-Path (Get-ModuleBasePath) (Get-ConfigValue -Name ModuleOutputSubdirectoryName) + $modulePath = Join-Path $modulePath $module + Log-Message "[Publish Local Compat] module : $module" -Level 'INFO' + Log-Message "[Publish Local Compat] modulePath : $modulePath" -Level 'INFO' + Publish-Module -Path $modulePath -Repository (Get-LocalPSRepoName) + + if ($Install) { + Log-Message "[Publish Local Compat] Installing : $module" -Level 'INFO' + Install-Module -Name $module -Repository (Get-LocalPSRepoName) -AllowClobber + } +} + +if($moduleName -eq 'Entra'){ + $module = 'Microsoft.Graph.Entra' +} +else{ + $module = 'Microsoft.Graph.Entra.Beta' +} + +$modulePath = Join-Path (Get-ModuleBasePath) (Get-ConfigValue -Name ModuleOutputSubdirectoryName) +$modulePath = Join-Path $modulePath $module +$modulePath = Join-Path $modulePath $metadata.version +Log-Message "[Publish Local Compat] module : $module" -Level 'INFO' +Log-Message "[Publish Local Compat] modulePath : $modulePath" -Level 'INFO' +Publish-PSResource -Path $modulePath -Repository (Get-LocalPSRepoName) -SkipDependenciesCheck if ($Install) { - Install-Module -Name (Get-ModuleName) -Repository (Get-LocalPSRepoName) -AllowClobber -} \ No newline at end of file + Log-Message "[Publish Local Compat] Installing : $module" -Level 'INFO' + Install-Module -Name $module -Repository (Get-LocalPSRepoName) -AllowClobber +} diff --git a/build/ValidateAuthenticodeSignature.ps1 b/build/ValidateAuthenticodeSignature.ps1 new file mode 100644 index 0000000000..3904e0c5e6 --- /dev/null +++ b/build/ValidateAuthenticodeSignature.ps1 @@ -0,0 +1,21 @@ + +# [cmdletbinding()] +# param ( +# [string]$Module = "Entra" +# ) + +. "$psscriptroot/common-functions.ps1" + +$moduleNames = Get-ModuleName + +foreach($moduleName in $moduleNames){ + $modulePath = Join-Path (Get-ModuleBasePath) $moduleName + $modulePsd1 = $modulePath + ".psd1" + ($modulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" + + if(($moduleName -eq 'Microsoft.Graph.Entra') -or ($moduleName -eq 'Microsoft.Graph.Entra.Beta')){ + continue + } + $modulePsm1 = $modulePath + ".psm1" + ($modulePsm1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" +} \ No newline at end of file diff --git a/build/common-functions.ps1 b/build/common-functions.ps1 index a03db9e1e9..11f691650d 100644 --- a/build/common-functions.ps1 +++ b/build/common-functions.ps1 @@ -28,11 +28,13 @@ function Get-ModuleBasePath { } function Get-ModuleVersion { - (Get-ModuleManifestFile).FullName | Test-ModuleManifest | Select-Object -ExpandProperty Version + # Added -ErrorAction SilentlyContinue due to validation failure on Microsoft.Graph.Entra RequiredModules + # The RequiredModules are the Microsoft.Graph.Entra.* sub-modules + (Get-ModuleManifestFile).FullName | Test-ModuleManifest -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version } function Get-ModuleFiles { - (Get-ModuleManifestFile).FullName | Test-ModuleManifest | Select-Object -ExpandProperty FileList + (Get-ModuleManifestFile).FullName | Test-ModuleManifest -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FileList } function Get-PSGalleryRepoName { @@ -82,10 +84,12 @@ function Register-LocalGallery { } $null = Register-PSRepository -Name (Get-LocalPSRepoName) -SourceLocation ($repoPath) -ScriptSourceLocation ($repoPath) -InstallationPolicy Trusted + $null = Register-PSResourceRepository -Name (Get-LocalPSRepoName) -Uri ($repoPath) } function Unregister-LocalGallery { $null = Unregister-PSRepository (Get-LocalPSRepoName) + $null = Unregister-PSResourceRepository (Get-LocalPSRepoName) } function Update-ModuleVersion { @@ -136,40 +140,67 @@ function Create-ModuleFolder { $null = Remove-Item -Recurse -Force $modulesDirectory } - $thisModuleDirectory = Join-Path $modulesDirectory (Get-ModuleName) - $targetDirectory = Join-Path $thisModuleDirectory (Get-ModuleVersion).tostring() + $modules = @() + $moduleName = Get-ModuleName + $moduleVersion = Get-ModuleVersion + if($moduleVersion -is [array]) + { + $moduleVersion = $moduleVersion[0] + } - $null = New-Item -Path $targetDirectory -ItemType Directory + if($moduleName -isnot [array]){ + $modules += $moduleName + } + else{ + $modules = $moduleName + } - $ignorableSegmentCount = ((Get-ModuleBasePath).replace("`\", '/') -split '/').count - $sourceFileList = @() - $destinationFileList = @() - Get-ModuleFiles | ForEach-Object { - $normalizedFile = $_.replace("`\", '/') - $segments = $normalizedFile -split '/' - $relativeSegments = $segments[$ignorableSegmentCount..($segments.length - 1)] - $relativePath = $relativeSegments -join '/' + foreach($module in $modules){ + $thisModuleDirectory = Join-Path $modulesDirectory $module + $targetDirectory = Join-Path $thisModuleDirectory $moduleVersion.tostring() - $sourceFileList += Join-Path (Get-ModuleBasePath) $relativePath - $destinationFileList += Join-Path $targetDirectory $relativePath - } + $null = New-Item -Path $targetDirectory -ItemType Directory + + $ignorableSegmentCount = ((Get-ModuleBasePath).replace("`\", '/') -split '/').count + $sourceFileList = @() + $destinationFileList = @() + $moduleFiles = @() - 0..($sourceFileList.length - 1) | ForEach-Object { - $parent = Split-Path -Parent $destinationFileList[ $_ ] - if ( -not (Test-Path $parent) ) { - $null = New-Item -Path $parent -ItemType Directory + if(($module -eq 'Microsoft.Graph.Entra') -or ($module -eq 'Microsoft.Graph.Entra.Beta')){ + $moduleFiles += Get-ModuleFiles | Where { $_ -like "*$module.psd1" } + $moduleFiles += Get-ModuleFiles | Where { $_ -like "*$module.psm1" } + } + else{ + $moduleFiles += Get-ModuleFiles | Where { $_ -like "*$module*" } } - $destinationName = Split-Path -Leaf $destinationFileList[ $_ ] - $syntaxOnlySourceName = Split-Path -Leaf $sourceFileList[ $_ ] - $sourceActualName = (Get-ChildItem (Split-Path -Parent $sourceFileList[ $_ ]) -Filter $syntaxOnlySourceName).name + $moduleFiles | ForEach-Object { + $normalizedFile = $_.replace("`\", '/') + $segments = $normalizedFile -split '/' + $relativeSegments = $segments[$ignorableSegmentCount..($segments.length - 1)] + $relativePath = $relativeSegments -join '/' - if ( $destinationName -cne $sourceActualName ) { - throw "The case-sensitive name of the file at source path '$($sourceFileList[$_])' is actually '$sourceActualName' and it does not match the case of the last element of destination path '$($destinationFileList[$_])' -- the case of the file names must match exactly in order to support environments with case-sensitive file systems. This can be corrected in the module manifest by specifying the case of the file exactly as it exists in the module source code directory" + $sourceFileList += Join-Path (Get-ModuleBasePath) $relativePath + $destinationFileList += Join-Path $targetDirectory $relativePath } - Copy-Item $sourceFileList[ $_ ] $destinationFileList[ $_ ] + 0..($sourceFileList.length - 1) | ForEach-Object { + $parent = Split-Path -Parent $destinationFileList[ $_ ] + if ( -not (Test-Path $parent) ) { + $null = New-Item -Path $parent -ItemType Directory + } + + $destinationName = Split-Path -Leaf $destinationFileList[ $_ ] + $syntaxOnlySourceName = Split-Path -Leaf $sourceFileList[ $_ ] + $sourceActualName = (Get-ChildItem (Split-Path -Parent $sourceFileList[ $_ ]) -Filter $syntaxOnlySourceName).name + + if ( $destinationName -cne $sourceActualName ) { + throw "The case-sensitive name of the file at source path '$($sourceFileList[$_])' is actually '$sourceActualName' and it does not match the case of the last element of destination path '$($destinationFileList[$_])' -- the case of the file names must match exactly in order to support environments with case-sensitive file systems. This can be corrected in the module manifest by specifying the case of the file exactly as it exists in the module source code directory" + } + + Copy-Item $sourceFileList[ $_ ] $destinationFileList[ $_ ] + } } } diff --git a/module/Entra/config/ModuleSettings.json b/module/Entra/config/ModuleSettings.json index b82808b533..6863871d5c 100644 --- a/module/Entra/config/ModuleSettings.json +++ b/module/Entra/config/ModuleSettings.json @@ -4,7 +4,6 @@ "newPrefix" : "Entra", "typePrefix" : "Microsoft.Open.", "destinationModuleName" : [ - "Microsoft.Graph", "Microsoft.Graph.DirectoryObjects", "Microsoft.Graph.Users", "Microsoft.Graph.Users.Actions", diff --git a/module/EntraBeta/config/ModuleSettings.json b/module/EntraBeta/config/ModuleSettings.json index 46572adaf9..16ef03892a 100644 --- a/module/EntraBeta/config/ModuleSettings.json +++ b/module/EntraBeta/config/ModuleSettings.json @@ -4,7 +4,6 @@ "newPrefix" : "EntraBeta", "typePrefix" : "Microsoft.Open.", "destinationModuleName" : [ - "Microsoft.Graph.Beta", "Microsoft.Graph.Beta.DirectoryObjects", "Microsoft.Graph.Beta.Users", "Microsoft.Graph.Beta.Users.Actions", diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..b4eea56ed8 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Applications | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..81f47023ec 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Authentication | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..13c5cca04a 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.DirectoryManagement | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..153948c902 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Governance | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..ac596542b5 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Groups | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..dfff098b9c 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.NetworkAccess | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..cfa34c26e5 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Reports | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..4ffe593717 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.SignIns | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 index 16c1e3b342..b403d3a712 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Users | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index b3fdd50060..51a6f86faa 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -451,13 +451,13 @@ $($requiredModulesEntries -join ",`n") $manifestPath = Join-Path $this.OutputDirectory "$manifestFileName" # Check if the specified directory exists - if (-Not (Test-Path -Path $subDir)) { + if (-Not (Test-Path -Path $subDir.FullName)) { Log-Message "[EntraModuleBuilder]: The specified directory does not exist: $subDir" -Level 'ERROR' exit } # Get all files in the specified directory and its subdirectories, without extensions - $allFunctions = Get-ChildItem -Path $subDir -Recurse -File | ForEach-Object { $_.BaseName } + $allFunctions = Get-ChildItem -Path $subDir.FullName -Recurse -File | ForEach-Object { $_.BaseName } $functions = $allFunctions + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" @@ -509,7 +509,7 @@ $($requiredModulesEntries -join ",`n") # Create and update the module manifest Log-Message "[EntraModuleBuilder]: Creating manifest for $moduleName at $manifestPath" try{ - New-ModuleManifest @moduleSettings + New-ModuleManifest @moduleSettings Update-ModuleManifest -Path $manifestPath -PrivateData $PSData # Validate the module manifest @@ -551,10 +551,12 @@ $($requiredModulesEntries -join ",`n") $docsPath = $this.BaseDocsPath if ($Module -eq "Entra") { $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-v1.0" - } elseif ($Module -eq "EntraBeta") { + } + elseif ($Module -eq "EntraBeta") { $docsPath = Join-Path -Path $this.BaseDocsPath -ChildPath "entra-powershell-beta" - } else { - Log-Message "[EntraModuleBuilder] CreateModuleHelp:Invalid module specified: $Module" -Level 'ERROR' + } + else { + Log-Message "[EntraModuleBuilder] CreateModuleHelp:Invalid module specified: $Module" -Level 'ERROR' return } @@ -568,6 +570,7 @@ $($requiredModulesEntries -join ",`n") # Get all subdirectories within the base docs path $subDirectories = Get-ChildItem -Path $docsPath -Directory + foreach ($subDirectory in $subDirectories) { # Skip the 'Migration' sub-directory if ($subDirectory.Name -eq 'Migration' -or $subDirectory.Name -eq 'Invitations') { @@ -575,29 +578,25 @@ $($requiredModulesEntries -join ",`n") continue } - Log-Message "[EntraModuleBuilder] CreateModuleHelp:Creating help file for $subDirectory.." + Log-Message "[EntraModuleBuilder] CreateModuleHelp:Creating help file for $subDirectory.." # Get all markdown files in the current subdirectory $markDownFiles = Get-ChildItem -Path $subDirectory.FullName -Filter "*.md" - # Check if markdown files are found if (-not($markDownFiles)) { Log-Message "[EntraModuleBuilder] CreateModuleHelp:No markdown files found in $($subDirectory.FullName)." -Level 'ERROR' continue } - # Generate the help file name based on the module and sub-directory - $subDirectoryName = [System.IO.Path]::GetFileName($subDirectory.FullName) - $helpFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$subDirectoryName-Help.xml" + "Microsoft.Graph.Entra.$($subDirectory.Name)-Help.xml" } else { - "Microsoft.Graph.Entra.Beta.$subDirectoryName-Help.xml" + "Microsoft.Graph.Entra.Beta.$($subDirectory.Name)-Help.xml" } $helpOutputFilePath = Join-Path -Path $this.OutputDirectory -ChildPath $helpFileName - $moduleDocsPath = $subDirectory + $moduleDocsPath = $subDirectory.FullName try { # Create the help file using PlatyPS diff --git a/testVNext/Common-Functions.ps1 b/testVNext/Common-Functions.ps1 new file mode 100644 index 0000000000..2c5f6ee76a --- /dev/null +++ b/testVNext/Common-Functions.ps1 @@ -0,0 +1,83 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +$psVersion = $global:PSVersionTable.PSVersion + +# Entra + +if($null -ne (Get-Module -Name Microsoft.Graph.Entra)){ + $entraVersion = (Get-module Microsoft.Graph.Entra | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Applications)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Applications | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Authentication | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.DirectoryManagement | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Governance)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Governance | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Users)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Users | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Groups)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Groups | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Reports)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Reports | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.SignIns | select version).Version.ToString() +} + +#EntraBeta + +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Applications)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Applications | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Authentication)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Authentication | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.DirectoryManagement | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Governance)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Governance | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Users)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Users | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Groups)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Groups | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Reports)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Reports | select version).Version.ToString() +} +if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns)){ + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.SignIns | select version).Version.ToString() +} + + +function Get-Parameters{ + param( + $data + ) + + PROCESS{ + $params = @{} + for ($i = 0; $i -lt $data.Length; $i += 2) { + $key = $data[$i] -replace '-', '' -replace ':', '' + $value = $data[$i + 1] + $params[$key] = $value + } + + $params + } +} \ No newline at end of file diff --git a/testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 b/testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 index b3016636ee..ba116e9a87 100644 --- a/testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 +++ b/testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Add-EntraApplicationOwner" { @@ -16,13 +16,13 @@ Describe "Add-EntraApplicationOwner" { $result = Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when parameters are empty" { { Add-EntraApplicationOwner -ApplicationId "" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter*" } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName New-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -32,7 +32,7 @@ Describe "Add-EntraApplicationOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraApplicationOwner" Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraApplicationOwner" - Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 index 39925b7cf7..de61d03e6b 100644 --- a/testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 +++ b/testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking New-MgServicePrincipalDelegatedPermissionClassification with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName New-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Add-EntraServicePrincipalDelegatedPermissionClassification"{ Context "Test for Add-EntraServicePrincipalDelegatedPermissionClassification" { @@ -33,7 +33,7 @@ Describe "Add-EntraServicePrincipalDelegatedPermissionClassification"{ $result.Classification | should -Be "low" $result.PermissionName | should -Be "access_microsoftstream_embed" - Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Result should Contain ObjectId" { $result = Add-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PermissionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Classification "low" -PermissionName "access_microsoftstream_embed" @@ -47,7 +47,7 @@ Describe "Add-EntraServicePrincipalDelegatedPermissionClassification"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraServicePrincipalDelegatedPermissionClassification" - Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 b/testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 index 3a2dd0ed64..7f08bc7ef5 100644 --- a/testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 +++ b/testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Add-EntraServicePrincipalOwner" { @@ -16,13 +16,13 @@ Describe "Add-EntraServicePrincipalOwner" { $result = Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Add-EntraServicePrincipalOwner -ObjectId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Add-EntraServicePrincipalOwner -ServicePrincipalId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -37,7 +37,7 @@ Describe "Add-EntraServicePrincipalOwner" { { Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -46,7 +46,7 @@ Describe "Add-EntraServicePrincipalOwner" { It "Should contain BodyParameter in parameters when passed RefObjectId to it" { Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $value = @{"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} - Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -59,7 +59,7 @@ Describe "Add-EntraServicePrincipalOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraServicePrincipalOwner" - Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Entra.Tests.ps1 b/testVNext/Entra/Applications/Entra.Tests.ps1 deleted file mode 100644 index e6b0c31795..0000000000 --- a/testVNext/Entra/Applications/Entra.Tests.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force -} - -Import-Module Pester - -$psmPath = (Get-Module Microsoft.Graph.Entra).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" - -$testOutputFile = "$testReportPath\TestResults.xml" -if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} - -$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } - -$config = New-PesterConfiguration -$config.Run.Path = $mockScripts -$config.Run.PassThru = $true -$config.Run.Exit = $true -$config.CodeCoverage.Enabled = $true -$config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath -$config.TestResult.Enabled = $true -$config.TestResult.OutputPath = $testOutputFile -$config.Output.Verbosity = "Detailed" - -Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 index bebd63819d..7558c2a297 100644 --- a/testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1" ) -Force $scriptblock = { return @( @@ -31,7 +31,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraApplication" { @@ -41,7 +41,7 @@ Describe "Get-EntraApplication" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is invalid" { { Get-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -53,7 +53,7 @@ Describe "Get-EntraApplication" { $result = Get-EntraApplication -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraApplication -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -75,21 +75,21 @@ Describe "Get-EntraApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return specific application by filter" { $result = Get-EntraApplication -Filter "DisplayName -eq 'Mock-App'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return top application" { $result = @(Get-EntraApplication -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Result should Contain ApplicationId" { $result = Get-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -113,7 +113,7 @@ Describe "Get-EntraApplication" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplication" - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -123,7 +123,7 @@ Describe "Get-EntraApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -147,7 +147,7 @@ Describe "Get-EntraApplication" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } } } diff --git a/testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 index 7627d7bafd..b4bff3d66e 100644 --- a/testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraApplicationExtensionProperty with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraApplicationExtensionProperty" { @@ -28,13 +28,13 @@ BeforeAll { $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-1111-2222-3333-ccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Get-EntraApplicationExtensionProperty -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -53,7 +53,7 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.Name | Should -Be 'extension_222_324_NewAttribute' - Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -66,7 +66,7 @@ BeforeAll { $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationExtensionProperty" - Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 index 7bc3c922f4..2ca78d0fd4 100644 --- a/testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @{ @@ -24,7 +24,7 @@ BeforeAll { } } - Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraApplicationKeyCredential" { @@ -32,7 +32,7 @@ BeforeAll { It "Should not return empty" { $result = Get-EntraApplicationKeyCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { { Get-EntraApplicationKeyCredential -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." @@ -42,7 +42,7 @@ BeforeAll { $result = Get-EntraApplicationKeyCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationKeyCredential" - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 index 509f3a0164..e3d1825f62 100644 --- a/testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @{ @@ -18,19 +18,19 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraApplicationLogo" { It "Should return empty" { $result = Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return empty" { $result = Get-EntraApplicationLogo -ObjectId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return empty when passed ileName parameter" { $result = Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FileName "image" @@ -59,7 +59,7 @@ Describe "Get-EntraApplicationLogo" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationLogo" Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationLogo" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 index d1a82d07b7..97b32204da 100644 --- a/testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $mockResponse = { return @{ @@ -26,7 +26,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraApplicationOwner"{ @@ -37,7 +37,7 @@ Describe "Get-EntraApplicationOwner"{ $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Get-EntraApplicationOwner -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -64,7 +64,7 @@ Describe "Get-EntraApplicationOwner"{ $result = Get-EntraApplicationOwner -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationOwner" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 index 77aac893c5..af39808455 100644 --- a/testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 @@ -1,8 +1,8 @@ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @{ @@ -21,7 +21,7 @@ BeforeAll { } } - Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraApplicationPasswordCredential" { @@ -29,7 +29,7 @@ BeforeAll { It "Should not return empty" { $result = Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Get-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -45,7 +45,7 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Test" - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { @@ -57,7 +57,7 @@ BeforeAll { $result = Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationPasswordCredential" - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 index 0322de771d..fb26e2a765 100644 --- a/testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $response = @{ "id" = "aaaaaaaa-1111-2222-3333-cccccccccccc" @@ -19,14 +19,14 @@ BeforeAll{ "supportedProvisioningTypes" = @{} } - Mock -CommandName Invoke-GraphRequest -MockWith { $response } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith { $response } -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraApplicationTemplate tests"{ It "Should return specific application" { $result = Get-EntraApplicationTemplate -Id "aaaaaaaa-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('aaaaaaaa-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Id is empty" { { Get-EntraApplicationTemplate -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" @@ -40,7 +40,7 @@ Describe "Get-EntraApplicationTemplate tests"{ It "Should return all application templates" { $result = Get-EntraApplicationTemplate $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should execute successfully without throwing an error " { # Disable confirmation prompts @@ -58,7 +58,7 @@ Describe "Get-EntraApplicationTemplate tests"{ It "Should return top ApplicationTemplate" { $result = Get-EntraApplicationTemplate -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Top is invalid" { { Get-EntraApplicationTemplate -Id "aaaaaaaa-1111-2222-3333-cccccccccccc" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" @@ -66,7 +66,7 @@ Describe "Get-EntraApplicationTemplate tests"{ It "Should return all templates" { $result = Get-EntraApplicationTemplate -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraApplicationTemplate -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -82,7 +82,7 @@ Describe "Get-EntraApplicationTemplate tests"{ $result = Get-EntraApplicationTemplate -Filter "DisplayName eq 'test name'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'test name' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } } diff --git a/testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 index 673bd64db7..ae9e470f91 100644 --- a/testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -48,7 +48,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryDeletedItemAsApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDirectoryDeletedItemAsApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraDeletedApplication" { @@ -56,7 +56,7 @@ Describe "Get-EntraDeletedApplication" { It "Should return all applications" { $result = Get-EntraDeletedApplication | ConvertTo-Json -Depth 5 | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when All is empty" { { Get-EntraDeletedApplication -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -69,20 +69,20 @@ Describe "Get-EntraDeletedApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-test-App' - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return specific application by filter" { $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-test-App' - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return top application" { $result = Get-EntraDeletedApplication -Top 1 | ConvertTo-Json -Depth 5 | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Result should Contain ObjectId" { $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json @@ -98,7 +98,7 @@ Describe "Get-EntraDeletedApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Mock-test-App" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { @@ -109,7 +109,7 @@ Describe "Get-EntraDeletedApplication" { $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedApplication" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 index cdd98a2c7f..ac6584cda0 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -71,7 +71,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraServicePrincipal" { @@ -81,7 +81,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { @@ -89,7 +89,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { @@ -104,7 +104,7 @@ Describe "Get-EntraServicePrincipal" { $result = Get-EntraServicePrincipal -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when All has an argument" { @@ -115,7 +115,7 @@ Describe "Get-EntraServicePrincipal" { $result = Get-EntraServicePrincipal -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when top is empty" { @@ -136,7 +136,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Windows Update for Business Deployment Service' - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when searchstring is empty" { @@ -148,7 +148,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Windows Update for Business Deployment Service' - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when filter is empty" { @@ -177,7 +177,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Windows Update for Business Deployment Service" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { @@ -191,7 +191,7 @@ Describe "Get-EntraServicePrincipal" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipal" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 index 8d52263bfd..b32fcd41a1 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraServicePrincipalAppRoleAssignedTo with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 index 4c282ea158..3cfbb77a63 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraServicePrincipalAppRoleAssignment with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 index 3812741e27..8dd8285fea 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { @@ -29,7 +29,7 @@ Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "T2qU_E28O0GgkLLIYRPsTwE" - Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is invalid" { { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" @@ -61,7 +61,7 @@ Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { $result | Should -Not -BeNullOrEmpty $result.PermissionName | Should -Be 'LicenseManager.AccessAsUser' - Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -74,7 +74,7 @@ Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalDelegatedPermissionClassification" - Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 index 43596da516..44fba45b5c 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -25,7 +25,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraServicePrincipalKeyCredential" { @@ -36,7 +36,7 @@ Describe "Get-EntraServicePrincipalKeyCredential" { $result | Should -Not -BeNullOrEmpty $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { @@ -45,7 +45,7 @@ Describe "Get-EntraServicePrincipalKeyCredential" { $result | Should -Not -BeNullOrEmpty $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { $errorActionPreference = "Stop" @@ -72,7 +72,7 @@ Describe "Get-EntraServicePrincipalKeyCredential" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalKeyCredential" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 index 0fd4ef5494..732c95b702 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -17,18 +17,18 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalTransitiveMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipalTransitiveMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraServicePrincipalMembership"{ It "Result should not be empty" { $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Get-EntraServicePrincipalMembership -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalMembership -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." @@ -36,7 +36,7 @@ Describe "Get-EntraServicePrincipalMembership"{ It "Should return all applications" { $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -44,7 +44,7 @@ Describe "Get-EntraServicePrincipalMembership"{ It "Should return top application" { $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Result should Contain ServicePrincipalId" { $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -60,7 +60,7 @@ Describe "Get-EntraServicePrincipalMembership"{ $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -70,7 +70,7 @@ Describe "Get-EntraServicePrincipalMembership"{ $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalMembership" - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 index e322ea7a81..89ac33a018 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -21,18 +21,18 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalOauth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipalOauth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ It "Result should not be empty" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." @@ -40,7 +40,7 @@ Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ It "Should return all applications" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -48,7 +48,7 @@ Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ It "Should return top application" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Result should Contain ServicePrincipalId" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -64,7 +64,7 @@ Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -74,7 +74,7 @@ Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOAuth2PermissionGrant" - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 index 4ef2ec18dc..0668c7984b 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalOwnedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipalOwnedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraServicePrincipalOwnedObject" { @@ -32,13 +32,13 @@ Describe "Get-EntraServicePrincipalOwnedObject" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('111cc9b5-fce9-485e-9566-c68debafac5f') - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return specific ServicePrincipalOwnedObject with Alias" { $result = Get-EntraServicePrincipalOwnedObject -ObjectId "2d028fff-7e65-4340-80ca-89be16dae0b3" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('111cc9b5-fce9-485e-9566-c68debafac5f') - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId'*" @@ -49,7 +49,7 @@ Describe "Get-EntraServicePrincipalOwnedObject" { It "Should return all Owned Objects" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -57,7 +57,7 @@ Describe "Get-EntraServicePrincipalOwnedObject" { It "Should return top Owned Object" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Result should Contain ServicePrincipalId" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" @@ -74,7 +74,7 @@ Describe "Get-EntraServicePrincipalOwnedObject" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOwnedObject" - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 index 63fa525132..a59e92908e 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -41,18 +41,18 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalOwner -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipalOwner -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraServicePrincipalOwner"{ It "Result should not be empty" { $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Get-EntraServicePrincipalOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalOwner -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." @@ -60,7 +60,7 @@ Describe "Get-EntraServicePrincipalOwner"{ It "Should return all applications" { $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -68,7 +68,7 @@ Describe "Get-EntraServicePrincipalOwner"{ It "Should return top application" { $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Result should Contain ServicePrincipalId" { $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -84,7 +84,7 @@ Describe "Get-EntraServicePrincipalOwner"{ $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Adams Smith' - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -94,7 +94,7 @@ Describe "Get-EntraServicePrincipalOwner"{ $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOwner" - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 index d4fea0294b..c635adf919 100644 --- a/testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 +++ b/testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -27,7 +27,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Get-EntraServicePrincipalPasswordCredential" { @@ -38,7 +38,7 @@ Describe "Get-EntraServicePrincipalPasswordCredential" { $result | Should -Not -BeNullOrEmpty $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { @@ -47,7 +47,7 @@ Describe "Get-EntraServicePrincipalPasswordCredential" { $result | Should -Not -BeNullOrEmpty $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { @@ -75,7 +75,7 @@ Describe "Get-EntraServicePrincipalPasswordCredential" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalPasswordCredential" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Invalid.Tests.ps1 b/testVNext/Entra/Applications/Invalid.Tests.ps1 index 6d5381a100..ef75d9bb5e 100644 --- a/testVNext/Entra/Applications/Invalid.Tests.ps1 +++ b/testVNext/Entra/Applications/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Applications)){ + Import-Module Microsoft.Graph.Entra.Applications } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/testVNext/Entra/Applications/Module.Tests.ps1 b/testVNext/Entra/Applications/Module.Tests.ps1 index cc40ad720b..fb12f884f5 100644 --- a/testVNext/Entra/Applications/Module.Tests.ps1 +++ b/testVNext/Entra/Applications/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra Module" { +Describe "Microsoft.Graph.Entra.Applications Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Applications $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Applications $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Applications + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Applications.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Applications $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Graph.Entra.Applications -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 index cc3aa0337f..ae7bbf9638 100644 --- a/testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 +++ b/testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -31,7 +31,7 @@ BeforeAll { ) } - Mock -CommandName New-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "New-EntraApplication"{ @@ -44,7 +44,7 @@ Describe "New-EntraApplication"{ $result.IsFallbackPublicClient | should -Be "True" $result.SignInAudience | should -Be "AzureADandPersonalMicrosoftAccount" - Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when DisplayName is empty" { { New-EntraApplication -DisplayName "" } | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." @@ -54,7 +54,7 @@ Describe "New-EntraApplication"{ $result = New-EntraApplication -DisplayName "Mock-App" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplication" - Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 index 882e1ecdaa..9f03f4d7dd 100644 --- a/testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 +++ b/testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName New-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "New-EntraApplicationExtensionProperty" { @@ -37,7 +37,7 @@ Context "Test for New-EntraApplicationExtensionProperty" { $result.TargetObjects | Should -Be "Application" $result.DataType | Should -Be "MockType" - Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return created MS application extension property with alias" { $result = New-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" @@ -47,7 +47,7 @@ Context "Test for New-EntraApplicationExtensionProperty" { $result.TargetObjects | Should -Be "Application" $result.DataType | Should -Be "MockType" - Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { New-EntraApplicationExtensionProperty -ApplicationId -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" @@ -78,7 +78,7 @@ Context "Test for New-EntraApplicationExtensionProperty" { $result = New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationExtensionProperty" - Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 index 8f4f77d4c6..26a53d1a24 100644 --- a/testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 +++ b/testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll{ if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $response = @{ "@odata.context" = 'https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.applicationServicePrincipal' diff --git a/testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 index 7315d6480f..082b6d4264 100644 --- a/testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 +++ b/testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "New-EntraApplicationPassword"{ It "Should return created password credential"{ @@ -30,7 +30,7 @@ Describe "New-EntraApplicationPassword"{ $result | Should -Not -BeNullOrEmpty $result.KeyId | should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result.SecretText | Should -Be "wbBNW8kCuiPjNRg9NX98W_EaU6cqG" - Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { New-EntraApplicationPassword -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -69,7 +69,7 @@ Describe "New-EntraApplicationPassword"{ $result = New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ displayname = "mypassword" } | ConvertTo-Json | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationPassword" - Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 index ab3f1fd9b4..7b23264712 100644 --- a/testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 +++ b/testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "New-EntraApplicationPasswordCredential"{ It "Should return created password credential"{ @@ -30,7 +30,7 @@ Describe "New-EntraApplicationPasswordCredential"{ $result | Should -Not -BeNullOrEmpty $result.KeyId | should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result.SecretText | Should -Be "wbBNW8kCuiPjNRg9NX98W_EaU6cqG" - Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { New-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -75,7 +75,7 @@ Describe "New-EntraApplicationPasswordCredential"{ $result = New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationPasswordCredential" - Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 b/testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 index cca44e22a4..187f44fd68 100644 --- a/testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 +++ b/testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking New-MgServicePrincipal with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -32,7 +32,7 @@ BeforeAll { ) } - Mock -CommandName New-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "New-EntraServicePrincipal"{ @@ -52,7 +52,7 @@ Describe "New-EntraServicePrincipal"{ $result.ServicePrincipalType | should -Be "Application" $result.ServicePrincipalNames | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when AppID is empty" { { New-EntraServicePrincipal -AppId } | Should -Throw "Missing an argument for parameter 'AppId'.*" @@ -98,7 +98,7 @@ Describe "New-EntraServicePrincipal"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipal" - Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 index ee7b9c10e2..e79970abea 100644 --- a/testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking New-MgServicePrincipalAppRoleAssignment with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 index 00eb234c6a..8574c00e09 100644 --- a/testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 +++ b/testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Add-MgServicePrincipalPassword with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Add-MgServicePrincipalPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Add-MgServicePrincipalPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "New-EntraServicePrincipalPasswordCredential"{ @@ -34,13 +34,13 @@ Describe "New-EntraServicePrincipalPasswordCredential"{ $result.StartDate | should -Be "16/09/2024 14:14:14" $result.EndDate | should -Be "16/12/2024 13:14:14" - Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = New-EntraServicePrincipalPasswordCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate "2024-09-16T14:14:14Z" -EndDate "2024-12-16T13:14:14Z" $result | Should -Not -Be NullOrEmpty - Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { {New-EntraServicePrincipalPasswordCredential -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -73,7 +73,7 @@ Describe "New-EntraServicePrincipalPasswordCredential"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipalPasswordCredential" - Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 index 2d0e78a184..3bd14690c9 100644 --- a/testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplication -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraApplication" { @@ -17,13 +17,13 @@ Describe "Remove-EntraApplication" { $result = Remove-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is invalid" { { Remove-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Remove-EntraApplication" { { Remove-EntraApplication -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Remove-MgApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Remove-EntraApplication" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplication" Remove-EntraApplication -ApplicationId bbbbbbbb-1111-2222-3333-cccccccccccc - Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 index 6e6e9e2169..5d7acf815b 100644 --- a/testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraApplicationExtensionProperty" { @@ -16,13 +16,13 @@ Describe "Remove-EntraApplicationExtensionProperty" { $result = Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Remove-EntraApplicationExtensionProperty -ApplicationId -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444"} | Should -Throw "Missing an argument for parameter 'ApplicationId'*" @@ -37,7 +37,7 @@ Describe "Remove-EntraApplicationExtensionProperty" { { Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "" } | Should -Throw "Cannot bind argument to parameter 'ExtensionPropertyId' because it is an empty string." } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraApplicationExtensionProperty" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationExtensionProperty" - Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 index 51461cbd96..680110fffe 100644 --- a/testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraApplicationOwner"{ It "Should return empty object" { $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return empty object" { $result = Remove-EntraApplicationOwner -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Remove-EntraApplicationOwner -ApplicationId "" } @@ -28,13 +28,13 @@ Describe "Remove-EntraApplicationOwner"{ { Remove-EntraApplicationOwner -OwnerId "" } } It "Should contain ApplicationId in parameters" { - Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $params = Get-Parameters -data $result $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" } It "Should contain DirectoryObjectId in parameters" { - Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $params = Get-Parameters -data $result $params.DirectoryObjectId | Should -Be "bbbbbbbb-cccc-dddd-2222-333333333333" @@ -44,7 +44,7 @@ Describe "Remove-EntraApplicationOwner"{ $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationOwner" - Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 index de5a5a136a..f076400ec3 100644 --- a/testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 @@ -2,19 +2,19 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraApplicationPassword"{ It "Should return empty object" { $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { { Remove-EntraApplicationPassword -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId'*" @@ -29,7 +29,7 @@ Describe "Remove-EntraApplicationPassword"{ { Remove-EntraApplicationPassword -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." } It "Should contain ApplicationId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $params = Get-Parameters -data $result $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" @@ -39,7 +39,7 @@ Describe "Remove-EntraApplicationPassword"{ $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationPassword" - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 index dbe56b4e3f..ca15d59453 100644 --- a/testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraApplicationPasswordCredential"{ It "Should return empty object" { $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraApplicationPasswordCredential -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Remove-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -37,7 +37,7 @@ Describe "Remove-EntraApplicationPasswordCredential"{ { Remove-EntraApplicationPasswordCredential -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" $params = Get-Parameters -data $result $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" @@ -47,7 +47,7 @@ Describe "Remove-EntraApplicationPasswordCredential"{ $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationPasswordCredential" - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 index 37aaef9405..a45899aae0 100644 --- a/testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraDeletedApplication" { @@ -16,7 +16,7 @@ Describe "Remove-EntraDeletedApplication" { $result = Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { @@ -28,7 +28,7 @@ Describe "Remove-EntraDeletedApplication" { } It "Should contain DirectoryObjectId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -39,7 +39,7 @@ Describe "Remove-EntraDeletedApplication" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedApplication" Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedApplication" - Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 index ee39953e51..f946b44f8e 100644 --- a/testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraDeletedDirectoryObject" { @@ -16,14 +16,14 @@ Describe "Remove-EntraDeletedDirectoryObject" { $result = Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDeletedDirectoryObject -Id "11112222-bbbb-3333-cccc-4444dddd5555" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when DirectoryObjectId is empty" { @@ -41,7 +41,7 @@ Describe "Remove-EntraDeletedDirectoryObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedDirectoryObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 index 2c8611deb4..97dd35444e 100644 --- a/testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipal -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipal -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraServicePrincipal" { Context "Test for Remove-EntraServicePrincipal" { It "Should return empty object" { $result = Remove-EntraServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Remove-EntraServicePrincipal -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Remove-EntraServicePrincipal -ServicePrincipalId }| Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -28,7 +28,7 @@ Describe "Remove-EntraServicePrincipal" { { Remove-EntraServicePrincipal -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName Remove-MgServicePrincipal -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipal -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Remove-EntraServicePrincipal" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipal" - Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 index edc7a3fe47..e22ec6ea72 100644 --- a/testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgServicePrincipalAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 index 0983ac2780..01f1ca5b1b 100644 --- a/testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { @@ -16,7 +16,7 @@ Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { $result = Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId -Id "00001111-aaaa-2222-bbbb-3333cccc4444" } | should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -31,7 +31,7 @@ Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "" } | should -Throw "Cannot bind argument to parameter 'Id'*" } It "Should contain DelegatedPermissionClassificationId in parameters when passed Id to it" { - Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalDelegatedPermissionClassification" - Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 index a322efcd9e..598be8fdae 100644 --- a/testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraServicePrincipalOwner" { @@ -15,12 +15,12 @@ Describe "Remove-EntraServicePrincipalOwner" { It "Should return empty object" { $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Remove-EntraServicePrincipalOwner -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Remove-EntraServicePrincipalOwner -ServicePrincipalId -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" }| Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -35,14 +35,14 @@ Describe "Remove-EntraServicePrincipalOwner" { { Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId ""} | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string." } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $params = Get-Parameters -data $result $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" } It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $params = Get-Parameters -data $result @@ -56,7 +56,7 @@ Describe "Remove-EntraServicePrincipalOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalOwner" - Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 b/testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 index b7b4074b94..2df05c5100 100644 --- a/testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 +++ b/testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Remove-EntraServicePrincipalPasswordCredential" { @@ -16,13 +16,13 @@ Describe "Remove-EntraServicePrincipalPasswordCredential" { $result = Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Remove-EntraServicePrincipalPasswordCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" } | should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -37,7 +37,7 @@ Describe "Remove-EntraServicePrincipalPasswordCredential" { { Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId ""} | should -Throw "Cannot bind argument to parameter 'KeyId'*" } It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraServicePrincipalPasswordCredential" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalPasswordCredential" - Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 b/testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 index c8808157e0..8c8910817e 100644 --- a/testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 +++ b/testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -38,7 +38,7 @@ BeforeAll { ) } - Mock -CommandName Restore-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Restore-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Restore-EntraDeletedApplication" { Context "Restore-EntraDeletedApplication" { @@ -47,7 +47,7 @@ Context "Restore-EntraDeletedApplication" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { { Restore-EntraDeletedApplication -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" @@ -87,7 +87,7 @@ Context "Restore-EntraDeletedApplication" { $result = Restore-EntraDeletedApplication -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedApplication" - Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 b/testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 index 301fb92bb9..1392bda50a 100644 --- a/testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 +++ b/testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ @@ -15,7 +15,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgServicePrincipalMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications } Describe "Select-EntraGroupIdsServicePrincipalIsMemberOf" { @@ -26,7 +26,7 @@ Describe "Select-EntraGroupIdsServicePrincipalIsMemberOf" { $SPId = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" $result = Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId $SPId -GroupIdsForMembershipCheck $Groups $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ObjectID parameter is empty" { { Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId -GroupIdsForMembershipCheck "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" } | Should -Throw "Missing an argument for parameter*" @@ -50,7 +50,7 @@ Describe "Select-EntraGroupIdsServicePrincipalIsMemberOf" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsServicePrincipalIsMemberOf" - Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 b/testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 index dd6a34b0bc..3bb0806c6b 100644 --- a/testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 +++ b/testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgApplication -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Set-EntraApplication"{ @@ -17,13 +17,13 @@ Describe "Set-EntraApplication"{ $result = Set-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is invalid" { { Set-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Set-EntraApplication"{ { Set-EntraApplication -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Update-MgApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications $result = Set-EntraApplication -ApplicationId bbbbbbbb-1111-2222-3333-cccccccccccc $result = Set-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -46,7 +46,7 @@ Describe "Set-EntraApplication"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraApplication" - Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 b/testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 index 965a515af9..b8556d7520 100644 --- a/testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 +++ b/testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Set-EntraApplicationLogo"{ @@ -15,12 +15,12 @@ Describe "Set-EntraApplicationLogo"{ It "Should return empty object"{ $result = Set-EntraApplicationLogo -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -FilePath "https://th.bing.com/th?q=Application+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should return empty object with alias"{ $result = Set-EntraApplicationLogo -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -FilePath "https://th.bing.com/th?q=Application+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { @@ -39,7 +39,7 @@ Describe "Set-EntraApplicationLogo"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraApplicationLogo" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 b/testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 index f80453f6c0..a4695d38ec 100644 --- a/testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 +++ b/testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications } Describe "Set-EntraServicePrincipal"{ @@ -17,25 +17,25 @@ Describe "Set-EntraServicePrincipal"{ $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -AccountEnabled $false -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -AppRoleAssignmentRequired $true -DisplayName "test11" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Tags $tags $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result= Set-EntraServicePrincipal -ObjectId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -AccountEnabled $false -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -AppRoleAssignmentRequired $true -DisplayName "test11" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the LogoutUrl and ServicePrincipalType parameter" { $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -LogoutUrl 'https://securescore.office.com/SignOut' -ServicePrincipalType "Application" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the Homepage, ReplyUrls and AlternativeNames parameter" { $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Homepage 'https://HomePageurlss.com' -ReplyUrls 'https://admin.microsoft1.com' -AlternativeNames "updatetest" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should update the KeyCredentials parameter" { $creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential @@ -49,7 +49,7 @@ Describe "Set-EntraServicePrincipal"{ $result= Set-EntraServicePrincipal -ServicePrincipalId 6aa187e3-bbbb-4748-a708-fc380aa9eb17 -KeyCredentials $creds $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Set-EntraServicePrincipal -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -67,7 +67,7 @@ Describe "Set-EntraServicePrincipal"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraServicePrincipal" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Applications/Valid.Tests.ps1 b/testVNext/Entra/Applications/Valid.Tests.ps1 index 5013e83278..fb28955ce8 100644 --- a/testVNext/Entra/Applications/Valid.Tests.ps1 +++ b/testVNext/Entra/Applications/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Applications)){ + Import-Module Microsoft.Graph.Entra.Applications } - Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Applications } Describe "Valid parameter Tests"{ @@ -20,23 +20,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) - if($params.count -eq 1 -and $params -eq 'Id'){ + if(($params -eq 'Id') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'Id')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } } catch { @@ -58,23 +58,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) - if($params.count -eq 1 -and $params -eq 'ObjectId'){ + if(($params -eq 'ObjectId') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'ObjectId')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Applications -Times 1 } } catch { diff --git a/testVNext/Entra/Authentication/Entra.Tests.ps1 b/testVNext/Entra/Authentication/Entra.Tests.ps1 deleted file mode 100644 index e6b0c31795..0000000000 --- a/testVNext/Entra/Authentication/Entra.Tests.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force -} - -Import-Module Pester - -$psmPath = (Get-Module Microsoft.Graph.Entra).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" - -$testOutputFile = "$testReportPath\TestResults.xml" -if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} - -$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } - -$config = New-PesterConfiguration -$config.Run.Path = $mockScripts -$config.Run.PassThru = $true -$config.Run.Exit = $true -$config.CodeCoverage.Enabled = $true -$config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath -$config.TestResult.Enabled = $true -$config.TestResult.OutputPath = $testOutputFile -$config.Output.Verbosity = "Detailed" - -Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/Authentication/Invalid.Tests.ps1 b/testVNext/Entra/Authentication/Invalid.Tests.ps1 index 6d5381a100..0f0902f6ee 100644 --- a/testVNext/Entra/Authentication/Invalid.Tests.ps1 +++ b/testVNext/Entra/Authentication/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ + Import-Module Microsoft.Graph.Entra.Authentication } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/testVNext/Entra/Authentication/Module.Tests.ps1 b/testVNext/Entra/Authentication/Module.Tests.ps1 index cc40ad720b..a0cf17d8d9 100644 --- a/testVNext/Entra/Authentication/Module.Tests.ps1 +++ b/testVNext/Entra/Authentication/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra Module" { +Describe "Microsoft.Graph.Entra.Authentication Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null){ + Import-Module Microsoft.Graph.Entra.Authentication } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Authentication $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Authentication $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Authentication + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Authentication.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Authentication $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Graph.Entra.Authentication -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 b/testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 index 721913c1c5..9436cf2410 100644 --- a/testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 +++ b/testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null){ Import-Module Microsoft.Graph.Entra.Authentication } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 b/testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 index a4fd3f06b5..e1bff23d70 100644 --- a/testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 +++ b/testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null){ + Import-Module Microsoft.Graph.Entra.Authentication } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $mockResponse = { return @{ @@ -15,7 +15,7 @@ BeforeAll { } } } - Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra.Authentication } Describe "Revoke-EntraSignedInUserAllRefreshToken" { @@ -25,7 +25,7 @@ Describe "Revoke-EntraSignedInUserAllRefreshToken" { $result | Should -Not -BeNullOrEmpty $result | Should -Be $true - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 } It "Should contain 'User-Agent' header" { @@ -35,7 +35,7 @@ Describe "Revoke-EntraSignedInUserAllRefreshToken" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Revoke-EntraSignedInUserAllRefreshToken" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 b/testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 index 717168fd2a..a1b5135d22 100644 --- a/testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 +++ b/testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null) { + Import-Module Microsoft.Graph.Entra.Authentication } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Revoke-MgUserSignInSession -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Revoke-MgUserSignInSession -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication } Describe "Revoke-EntraUserAllRefreshToken" { @@ -16,12 +16,12 @@ Describe "Revoke-EntraUserAllRefreshToken" { It "Should return empty object" { $result = Revoke-EntraUserAllRefreshToken -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 } It "Should return empty object with alias" { $result = Revoke-EntraUserAllRefreshToken -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 } It "Should fail when UserId is empty string" { { Revoke-EntraUserAllRefreshToken -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -30,7 +30,7 @@ Describe "Revoke-EntraUserAllRefreshToken" { { Revoke-EntraUserAllRefreshToken -UserId } | Should -Throw "Missing an argument for parameter*" } It "Should contain Id in parameters when passed UserId to it" { - Mock -CommandName Revoke-MgUserSignInSession -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Revoke-MgUserSignInSession -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Authentication $result = Revoke-EntraUserAllRefreshToken -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Revoke-EntraUserAllRefreshToken" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Revoke-EntraUserAllRefreshToken" - Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Authentication/Valid.Tests.ps1 b/testVNext/Entra/Authentication/Valid.Tests.ps1 index 5013e83278..e4f6630faf 100644 --- a/testVNext/Entra/Authentication/Valid.Tests.ps1 +++ b/testVNext/Entra/Authentication/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ + Import-Module Microsoft.Graph.Entra.Authentication } - Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Authentication } Describe "Valid parameter Tests"{ @@ -20,23 +20,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) - if($params.count -eq 1 -and $params -eq 'Id'){ + if(($params -eq 'Id') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'Id')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 } } catch { @@ -58,23 +58,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) - if($params.count -eq 1 -and $params -eq 'ObjectId'){ + if(($params -eq 'ObjectId') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'ObjectId')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 } } catch { diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 index a18309a0ca..a2bdba7d56 100644 --- a/testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Add-EntraAdministrativeUnitMember tests"{ It "Should return empty object"{ $result = Add-EntraAdministrativeUnitMember -AdministrativeUnitId "f306a126-cf2e-439d-b20f-95ce4bcb7ffa" -RefObjectId "d6873b36-81d6-4c5e-bec0-9e3ca2c86846" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return empty object with ObjectId"{ $result = Add-EntraAdministrativeUnitMember -ObjectId "f306a126-cf2e-439d-b20f-95ce4bcb7ffa" -RefObjectId "d6873b36-81d6-4c5e-bec0-9e3ca2c86846" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty"{ { Add-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -40,7 +40,7 @@ Describe "Add-EntraAdministrativeUnitMember tests"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraAdministrativeUnitMember" Add-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraAdministrativeUnitMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index ecbf81bddb..fe584e5b7f 100644 --- a/testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 index bb5cc1f438..beb1229062 100644 --- a/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Add-EntraDeviceRegisteredOwner" { @@ -16,13 +16,13 @@ Describe "Add-EntraDeviceRegisteredOwner" { $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Add-EntraDeviceRegisteredOwner -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" @@ -37,19 +37,19 @@ Describe "Add-EntraDeviceRegisteredOwner" { { Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." } It "Should contain DeviceId in parameters when passed ObjectId to it" { - Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "412be9d1-1460-4061-8eed-cca203fcb215" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain BodyParameter in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} - Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -62,7 +62,7 @@ Describe "Add-EntraDeviceRegisteredOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDeviceRegisteredOwner" - Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 index 7b1cf1d272..b9c24deef8 100644 --- a/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Add-EntraDeviceRegisteredUser" { @@ -16,7 +16,7 @@ Describe "Add-EntraDeviceRegisteredUser" { $result = Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Add-EntraDeviceRegisteredUser -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" @@ -34,22 +34,22 @@ Describe "Add-EntraDeviceRegisteredUser" { $result = Add-EntraDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should contain DeviceId in parameters when passed DeviceId to it" { - Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain BodyParameter in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} - Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -62,7 +62,7 @@ Describe "Add-EntraDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDeviceRegisteredUser" - Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 index 2d05182ad9..ad50e33894 100644 --- a/testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Add-EntraDirectoryRoleMember" { @@ -16,13 +16,13 @@ Describe "Add-EntraDirectoryRoleMember" { $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return empty object with alias" { $result = Add-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DirectoryRoleId is empty" { { Add-EntraDirectoryRoleMember -DirectoryRoleId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'.*" @@ -37,14 +37,14 @@ Describe "Add-EntraDirectoryRoleMember" { { Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." } It "Should contain DirectoryRoleId in parameters when passed ObjectId to it" { - Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DirectoryRoleId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain OdataId in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -58,7 +58,7 @@ Describe "Add-EntraDirectoryRoleMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDirectoryRoleMember" - Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 index e924260546..0be93af496 100644 --- a/testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $userObjId = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $roleObjId = "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" @@ -29,20 +29,20 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Tests for Add-EntraScopedRoleMembership"{ It "Result should not be empty"{ $result = Add-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -RoleObjectId $roleObjId -RoleMemberInfo $RoleMember $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('NewDummyId') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Result should not be empty with ObjectId"{ $result = Add-EntraScopedRoleMembership -ObjectId $unitObjId -RoleObjectId $roleObjId -RoleMemberInfo $RoleMember $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('NewDummyId') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is invalid" { { Add-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" diff --git a/testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 index 749cf3daca..4c6f141989 100644 --- a/testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgDirectoryRole -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDirectoryRole -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Enable-EntraDirectoryRole" { @@ -17,7 +17,7 @@ Describe "Enable-EntraDirectoryRole" { $result = Enable-EntraDirectoryRole -RoleTemplateId 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when RoleTemplateId is empty" { { Enable-EntraDirectoryRole -RoleTemplateId } | Should -Throw "Missing an argument for parameter 'RoleTemplateId'*" @@ -26,7 +26,7 @@ Describe "Enable-EntraDirectoryRole" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Enable-EntraDirectoryRole" Enable-EntraDirectoryRole -RoleTemplateId 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Enable-EntraDirectoryRole" - Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Entra.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Entra.Tests.ps1 deleted file mode 100644 index e6b0c31795..0000000000 --- a/testVNext/Entra/DirectoryManagement/Entra.Tests.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force -} - -Import-Module Pester - -$psmPath = (Get-Module Microsoft.Graph.Entra).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" - -$testOutputFile = "$testReportPath\TestResults.xml" -if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} - -$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } - -$config = New-PesterConfiguration -$config.Run.Path = $mockScripts -$config.Run.PassThru = $true -$config.Run.Exit = $true -$config.CodeCoverage.Enabled = $true -$config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath -$config.TestResult.Enabled = $true -$config.TestResult.OutputPath = $testOutputFile -$config.Output.Verbosity = "Detailed" - -Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 index 718b833131..fa4e6b3ebb 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -21,7 +21,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraAccountSku" { @@ -36,7 +36,7 @@ Describe "Get-EntraAccountSku" { $result.AccountId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AppliesTo | should -Be "User" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraAccountSku -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -53,7 +53,7 @@ Describe "Get-EntraAccountSku" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAccountSku" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 index 877c4b3d50..86efb9ee10 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @{ @@ -21,18 +21,18 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Tests for Get-EntraAdministrativeUnit"{ It "Result should not be empty"{ $result = Get-EntraAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Result should not be empty objectid"{ $result = Get-EntraAdministrativeUnit -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Get-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -59,20 +59,20 @@ Describe "Tests for Get-EntraAdministrativeUnit"{ $result = Get-EntraAdministrativeUnit -Filter "displayName -eq 'test111'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'test111' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return top AdministrativeUnit" { $result = @(Get-EntraAdministrativeUnit -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnit" $result = Get-EntraAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnit" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 index 371152add0..019b916f77 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @{ @@ -21,18 +21,18 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Tests for Get-EntraAdministrativeUnitMember"{ It "Result should not be empty"{ $result = Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Result should not be empty objectId"{ $result = Get-EntraAdministrativeUnitMember -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Get-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -56,14 +56,14 @@ Describe "Tests for Get-EntraAdministrativeUnitMember"{ $result = @(Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnitMember" $result = Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnitMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 index 7b357e2da8..360f30ff39 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 index 38a042bba0..d495ae9c9c 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -42,7 +42,7 @@ BeforeAll { } - Mock -CommandName Get-MgContact -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgContact -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraContact" { @@ -58,7 +58,7 @@ Describe "Get-EntraContact" { $result.Mobile | Should -BeNullOrEmpty $result.TelephoneNumber | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific Contact alias" { @@ -72,7 +72,7 @@ Describe "Get-EntraContact" { $result.Mobile | Should -BeNullOrEmpty $result.TelephoneNumber | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } @@ -88,7 +88,7 @@ Describe "Get-EntraContact" { $result = Get-EntraContact -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraContact -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -99,7 +99,7 @@ Describe "Get-EntraContact" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Bob Kelly (TAILSPIN)' - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when filter is empty" { @@ -110,7 +110,7 @@ Describe "Get-EntraContact" { $result = Get-EntraContact -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when top is empty" { @@ -136,7 +136,7 @@ Describe "Get-EntraContact" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Bob Kelly (TAILSPIN)' - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -150,7 +150,7 @@ Describe "Get-EntraContact" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraContact" - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 index 7cc591d9ba..76335f1c75 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -26,7 +26,7 @@ BeforeAll { } - Mock -CommandName Get-MgContactMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgContactMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraContactMembership" { @@ -37,7 +37,7 @@ Describe "Get-EntraContactMembership" { $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' $result.DeletedDateTime | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific Contact Membership with alias" { @@ -46,7 +46,7 @@ Describe "Get-EntraContactMembership" { $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' $result.DeletedDateTime | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when OrgContactId is invalid" { @@ -57,7 +57,7 @@ Describe "Get-EntraContactMembership" { $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -67,7 +67,7 @@ Describe "Get-EntraContactMembership" { $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when top is empty" { @@ -94,7 +94,7 @@ Describe "Get-EntraContactMembership" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { @@ -109,7 +109,7 @@ Describe "Get-EntraContactMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraContactMembership" - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 index 5e3546a328..a3c37188db 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index 1ece0a2c29..5892021c71 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 index 50c70c3e0d..0cc8be44cc 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -18,7 +18,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraDeletedDirectoryObject"{ @@ -49,7 +49,7 @@ Describe "Get-EntraDeletedDirectoryObject"{ $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { @@ -60,7 +60,7 @@ Describe "Get-EntraDeletedDirectoryObject"{ $result = Get-EntraDeletedDirectoryObject -DirectoryObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedDirectoryObject" - Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 index eb5b549810..5ca2420a0e 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-MgDevice with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -45,7 +45,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraDevice" { @@ -55,13 +55,13 @@ Describe "Get-EntraDevice" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb') - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific device with Alias" { $result = Get-EntraDevice -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is invalid" { { Get-EntraDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." @@ -85,7 +85,7 @@ Describe "Get-EntraDevice" { $result = Get-EntraDevice -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when All has an argument" { { Get-EntraDevice -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -95,27 +95,27 @@ Describe "Get-EntraDevice" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific device by filter" { $result = Get-EntraDevice -Filter "DisplayName -eq 'Mock-Device'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return top device" { $result = Get-EntraDevice -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Property parameter should work" { $result = Get-EntraDevice -Property DisplayName $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDevice -Property DisplayName -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -134,7 +134,7 @@ Describe "Get-EntraDevice" { $result = Get-EntraDevice -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDevice" - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 index cc1a882fd9..390fb15926 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ @@ -28,7 +28,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } @@ -40,14 +40,14 @@ Describe "Get-EntraDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific device registered owner with alias" { $result = Get-EntraDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Get-EntraDeviceRegisteredOwner -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" @@ -60,7 +60,7 @@ Describe "Get-EntraDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { @@ -71,7 +71,7 @@ Describe "Get-EntraDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when top is empty" { { Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -109,7 +109,7 @@ Describe "Get-EntraDeviceRegisteredOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredOwner" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -120,7 +120,7 @@ Describe "Get-EntraDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.mobilePhone | Should -Be '425-555-0100' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 index e1841fd41e..f71ea4f4e9 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ @@ -28,7 +28,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } @@ -40,14 +40,14 @@ Describe "Get-EntraDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific device registered User with alias" { $result = Get-EntraDeviceRegisteredUser -ObjectId "8542ebd1-3d49-4073-9dce-30f197c67755" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Get-EntraDeviceRegisteredUser -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" @@ -60,7 +60,7 @@ Describe "Get-EntraDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return top device registered owner" { @@ -68,7 +68,7 @@ Describe "Get-EntraDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when top is empty" { { Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -115,7 +115,7 @@ Describe "Get-EntraDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredUser" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 index 5546ee23a1..b2a9a439e2 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 @@ -2,11 +2,11 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ configuration = [PSCustomObject]@{ @@ -17,14 +17,14 @@ BeforeAll { } } } - Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraDirSyncConfiguration" { Context "Test for Get-EntraDirSyncConfiguration" { It "Get irectory synchronization settings" { $result = Get-EntraDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraDirSyncConfiguration -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -46,7 +46,7 @@ Describe "Get-EntraDirSyncConfiguration" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncConfiguration" - Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 index 0636ae1291..4fb4efac23 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 @@ -1,85 +1,85 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force +# # ------------------------------------------------------------------------------ +# # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# # ------------------------------------------------------------------------------ +# BeforeAll { +# if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ +# Import-Module Microsoft.Graph.Entra.DirectoryManagement +# } +# Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - $scriptblock = { - return @( - [PSCustomObject]@{ - "Features" = @{ - "BlockCloudObjectTakeoverThroughHardMatchEnabled" = $false; - "BlockSoftMatchEnabled" = $false; - "BypassDirSyncOverridesEnabled" = $false; - "CloudPasswordPolicyForPasswordSyncedUsersEnabled" = $false; - "ConcurrentCredentialUpdateEnabled" = $false; - "ConcurrentOrgIdProvisioningEnabled" = $true; - "DeviceWritebackEnabled" = $false; - "DirectoryExtensionsEnabled" = $false; - "FopeConflictResolutionEnabled" = $false; - "GroupWriteBackEnabled" = $true; - "PasswordSyncEnabled" = $false; - "PasswordWritebackEnabled" = $false; - "QuarantineUponProxyAddressesConflictEnabled" = $true; - "QuarantineUponUpnConflictEnabled" = $true; - "SoftMatchOnUpnEnabled" = $true; - "SynchronizeUpnForManagedUsersEnabled" = $true; - "UnifiedGroupWritebackEnabled" = $true; - "UserForcePasswordChangeOnLogonEnabled" = $false; - "UserWritebackEnabled" = $false; - } - } - ) - } - Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement -} +# $scriptblock = { +# return @( +# [PSCustomObject]@{ +# "Features" = @{ +# "BlockCloudObjectTakeoverThroughHardMatchEnabled" = $false; +# "BlockSoftMatchEnabled" = $false; +# "BypassDirSyncOverridesEnabled" = $false; +# "CloudPasswordPolicyForPasswordSyncedUsersEnabled" = $false; +# "ConcurrentCredentialUpdateEnabled" = $false; +# "ConcurrentOrgIdProvisioningEnabled" = $true; +# "DeviceWritebackEnabled" = $false; +# "DirectoryExtensionsEnabled" = $false; +# "FopeConflictResolutionEnabled" = $false; +# "GroupWriteBackEnabled" = $true; +# "PasswordSyncEnabled" = $false; +# "PasswordWritebackEnabled" = $false; +# "QuarantineUponProxyAddressesConflictEnabled" = $true; +# "QuarantineUponUpnConflictEnabled" = $true; +# "SoftMatchOnUpnEnabled" = $true; +# "SynchronizeUpnForManagedUsersEnabled" = $true; +# "UnifiedGroupWritebackEnabled" = $true; +# "UserForcePasswordChangeOnLogonEnabled" = $false; +# "UserWritebackEnabled" = $false; +# } +# } +# ) +# } +# Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +# } -Describe "Get-EntraDirSyncFeature" { - Context "Test for Get-EntraDirSyncFeature" { - It "Returns all the sync features" { - $result = Get-EntraDirSyncFeature - $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Returns specific sync feature" { - $result = Get-EntraDirSyncFeature -Feature PasswordSync - $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when TenantId is null" { - { Get-EntraDirSyncFeature -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" - } - It "Should fail when TenantId is empty" { - { Get-EntraDirSyncFeature -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'*" - } - It "Should fail when invalid paramter is passed"{ - { Get-EntraDirSyncFeature -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncFeature" - $result = Get-EntraDirSyncFeature -Feature PasswordSync - $result | Should -Not -BeNullOrEmpty - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncFeature" - Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error " { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' +# Describe "Get-EntraDirSyncFeature" { +# Context "Test for Get-EntraDirSyncFeature" { +# It "Returns all the sync features" { +# $result = Get-EntraDirSyncFeature +# $result | Should -Not -BeNullOrEmpty +# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 +# } +# It "Returns specific sync feature" { +# $result = Get-EntraDirSyncFeature -Feature PasswordSync +# $result | Should -Not -BeNullOrEmpty +# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 +# } +# It "Should fail when TenantId is null" { +# { Get-EntraDirSyncFeature -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" +# } +# It "Should fail when TenantId is empty" { +# { Get-EntraDirSyncFeature -TenantId "" } | Should -Throw "Cannot process argument transformation on parameter 'TenantId'*" +# } +# It "Should fail when invalid paramter is passed"{ +# { Get-EntraDirSyncFeature -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" +# } +# It "Should contain 'User-Agent' header" { +# $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncFeature" +# $result = Get-EntraDirSyncFeature -Feature PasswordSync +# $result | Should -Not -BeNullOrEmpty +# $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncFeature" +# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { +# $Headers.'User-Agent' | Should -Be $userAgentHeaderValue +# $true +# } +# } +# It "Should execute successfully without throwing an error " { +# # Disable confirmation prompts +# $originalDebugPreference = $DebugPreference +# $DebugPreference = 'Continue' - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Get-EntraDirSyncFeature -Feature PasswordSync -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} +# try { +# # Act & Assert: Ensure the function doesn't throw an exception +# { Get-EntraDirSyncFeature -Feature PasswordSync -Debug } | Should -Not -Throw +# } finally { +# # Restore original confirmation preference +# $DebugPreference = $originalDebugPreference +# } +# } +# } +# } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 index e1e229f724..b6e8ad80b4 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 index c9a2e8dfae..55b758e35b 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraDirectoryRole with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryRole -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDirectoryRole -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraDirectoryRole" { @@ -34,14 +34,14 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraDirectoryRole -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DirectoryRoleId is empty" { { Get-EntraDirectoryRole -DirectoryRoleId "" } | Should -Throw "Cannot bind argument to parameter 'DirectoryRoleId' because it is an empty string." @@ -51,7 +51,7 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Attribute Assignment Reader' - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Result should Contain DirectoryRoleId" { $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -67,7 +67,7 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Attribute Assignment Reader' - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -77,7 +77,7 @@ BeforeAll { $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRole" - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 index 9e7c6dd4b8..48cc479025 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 @@ -2,11 +2,11 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ value = @( @@ -23,7 +23,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } @@ -34,14 +34,14 @@ Describe "EntraDirectoryRoleMember" { $result | Should -Not -BeNullOrEmpty $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific directory rolemember with alias" { $result = (Get-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb") | ConvertTo-json | ConvertFrom-json $result | Should -Not -BeNullOrEmpty $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DirectoryRoleId is empty" { { Get-EntraDirectoryRoleMember -DirectoryRoleId } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'*" @@ -69,7 +69,7 @@ Describe "EntraDirectoryRoleMember" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -82,7 +82,7 @@ Describe "EntraDirectoryRoleMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 index f2653aceb4..d4663ce81b 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -20,7 +20,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryRoleTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDirectoryRoleTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraDirectoryRoleTemplate" { @@ -31,7 +31,7 @@ Describe "Get-EntraDirectoryRoleTemplate" { $result.Id | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.DisplayName | should -Be "Mock-App" - Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should be fail when provide non supported parameter" { { Get-EntraDirectoryRoleTemplate -Top 1} | should -Throw "A parameter cannot be found that matches parameter name 'Top'." @@ -41,7 +41,7 @@ Describe "Get-EntraDirectoryRoleTemplate" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRoleTemplate -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -53,7 +53,7 @@ Describe "Get-EntraDirectoryRoleTemplate" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleTemplate" - Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 index 4467d2ffde..711af48106 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 @@ -2,11 +2,11 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -34,7 +34,7 @@ $scriptblock = { } - Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraDomain" { @@ -44,7 +44,7 @@ Describe "Get-EntraDomain" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'test.mail.onmicrosoft.com' - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { { Get-EntraDomain -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string." @@ -53,13 +53,13 @@ Describe "Get-EntraDomain" { $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" $result.ObjectId | should -Be "test.mail.onmicrosoft.com" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Result should Contain Name" { $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" $result.Name | should -Be "test.mail.onmicrosoft.com" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should contain DomainId in parameters when passed Name to it" { $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" @@ -71,7 +71,7 @@ Describe "Get-EntraDomain" { $result | Should -Not -BeNullOrEmpty $result.AuthenticationType | Should -Be 'Managed' - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { {Get-EntraDomain -Name "test.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -82,7 +82,7 @@ Describe "Get-EntraDomain" { Get-EntraDomain -Name "test.mail.onmicrosoft.com" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomain" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 index b96973a169..e01b761ba0 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -29,7 +29,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraDomainFederationSettings" { @@ -39,7 +39,7 @@ Describe "Get-EntraDomainFederationSettings" { $result | Should -Not -BeNullOrEmpty $result.FederationBrandName | Should -Be "Contoso" $result.ActiveLogOnUri | Should -Be "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" - Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when TenantId is null" { { Get-EntraDomainFederationSettings -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -61,7 +61,7 @@ Describe "Get-EntraDomainFederationSettings" { $result = Get-EntraDomainFederationSettings -DomainName "test.com" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainFederationSettings" - Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 index f503703a02..6ea961d652 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 @@ -3,10 +3,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ @@ -28,7 +28,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } @@ -40,7 +40,7 @@ Describe "Get-EntraDomainNameReference" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '22cc22cc-dd33-ee44-ff55-66aa66aa66aa' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { { Get-EntraDomainNameReference -Name } | Should -Throw "Missing an argument for parameter 'Name'*" @@ -73,7 +73,7 @@ Describe "Get-EntraDomainNameReference" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be '22cc22cc-dd33-ee44-ff55-66aa66aa66aa' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -85,7 +85,7 @@ Describe "Get-EntraDomainNameReference" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainNameReference" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 index d0aa101fff..3acbad54db 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 index f009b71538..984f74e6f1 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 @@ -2,11 +2,11 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -28,7 +28,7 @@ $scriptblock = { } - Mock -CommandName Get-MgDomainVerificationDnsRecord -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDomainVerificationDnsRecord -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraDomainVerificationDnsRecord" { @@ -38,7 +38,7 @@ Describe "Get-EntraDomainVerificationDnsRecord" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '0000aaaa-11bb-cccc-dd22-eeeeee333333' - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { @@ -51,13 +51,13 @@ Describe "Get-EntraDomainVerificationDnsRecord" { $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" $result.DnsRecordId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Result should Contain ObjectId" { $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" $result.ObjectId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should contain DomainId in parameters when passed Name to it" { $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" @@ -69,7 +69,7 @@ Describe "Get-EntraDomainVerificationDnsRecord" { $result | Should -Not -BeNullOrEmpty $result.RecordType | Should -Be 'Txt' - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -81,7 +81,7 @@ Describe "Get-EntraDomainVerificationDnsRecord" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainVerificationDnsRecord" - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 index 624c27135b..9aee14e4da 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -20,7 +20,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraFederationProperty" { Context "Test for Get-EntraFederationProperty" { @@ -34,7 +34,7 @@ Describe "Get-EntraFederationProperty" { $result.PassiveSignInUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" $result.SignOutUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" - Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { {Get-EntraFederationProperty -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" @@ -45,7 +45,7 @@ Describe "Get-EntraFederationProperty" { } It "Should contain DomainId in parameters when DomainName to it" { - Mock -CommandName Get-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Get-EntraFederationProperty -DomainName "anmaji.myworkspace.contoso.com" $params = Get-Parameters -data $result $params.DomainId | Should -Be "anmaji.myworkspace.contoso.com" @@ -59,7 +59,7 @@ Describe "Get-EntraFederationProperty" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraFederationProperty" - Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 index 6ad007cbd9..87feec0045 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ value = @( diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 index 04f9ce610b..4d3798ade3 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -17,7 +17,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Get-EntraPasswordPolicy" { @@ -28,7 +28,7 @@ Describe "Get-EntraPasswordPolicy" { $result.NotificationDays.PasswordNotificationWindowInDays | Should -Be "14" $result.ValidityPeriod | Should -Be "2147483647" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { @@ -47,7 +47,7 @@ Describe "Get-EntraPasswordPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPasswordPolicy" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 index 20066df554..ae370cb0bd 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $userObjId = "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $roleObjId = "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" @@ -28,7 +28,7 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Tests for Get-EntraScopedRoleMembership"{ It "Result should not be empty"{ @@ -37,7 +37,7 @@ Describe "Tests for Get-EntraScopedRoleMembership"{ $result.ObjectId | should -Be $scopedRoleMembershipId $result.AdministrativeUnitObjectId | should -Be $unitObjId $result.RoleObjectId | should -Be $roleObjId - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Result should not be empty with ObjectId"{ $result = Get-EntraScopedRoleMembership -ObjectId $unitObjId -ScopedRoleMembershipId $scopedRoleMembershipId @@ -45,7 +45,7 @@ Describe "Tests for Get-EntraScopedRoleMembership"{ $result.ObjectId | should -Be $scopedRoleMembershipId $result.AdministrativeUnitObjectId | should -Be $unitObjId $result.RoleObjectId | should -Be $roleObjId - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is invalid" { { Get-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -64,7 +64,7 @@ Describe "Tests for Get-EntraScopedRoleMembership"{ $result = Get-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -ScopedRoleMembershipId $scopedRoleMembershipId $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraScopedRoleMembership" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 index b0d7bb95b7..67471ef5df 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 @@ -2,11 +2,11 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -29,7 +29,7 @@ $scriptblock = { } - Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } @@ -40,14 +40,14 @@ Describe "Get-EntraSubscribedSku" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific SubscribedSku with alias" { $result = Get-EntraSubscribedSku -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when SubscribedSkuId empty" { { Get-EntraSubscribedSku -SubscribedSkuId } | Should -Throw "Missing an argument for parameter 'SubscribedSkuId'*" @@ -59,14 +59,14 @@ Describe "Get-EntraSubscribedSku" { $result = Get-EntraSubscribedSku $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Property parameter should work" { $result = Get-EntraSubscribedSku -Property AppliesTo $result | Should -Not -BeNullOrEmpty $result.AppliesTo | Should -Be 'User' - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraSubscribedSku -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -78,7 +78,7 @@ Describe "Get-EntraSubscribedSku" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraSubscribedSku" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 index 6dfe7a8768..7dc35b5a63 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 @@ -2,11 +2,11 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -34,7 +34,7 @@ $scriptblock = { } - Mock -CommandName Get-MgOrganization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgOrganization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } @@ -44,7 +44,7 @@ Describe "Get-EntraTenantDetail" { $result = Get-EntraTenantDetail -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraTenantDetail -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -53,7 +53,7 @@ Describe "Get-EntraTenantDetail" { $result = Get-EntraTenantDetail -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Top is empty" { { Get-EntraTenantDetail -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -66,7 +66,7 @@ Describe "Get-EntraTenantDetail" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock App' - Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraTenantDetail -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -78,7 +78,7 @@ Describe "Get-EntraTenantDetail" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTenantDetail" - Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 index 6d5381a100..9d6567d899 100644 --- a/testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement)){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/testVNext/Entra/DirectoryManagement/Module.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Module.Tests.ps1 index cc40ad720b..24e5e5254d 100644 --- a/testVNext/Entra/DirectoryManagement/Module.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra Module" { +Describe "Microsoft.Graph.Entra.DirectoryManagement Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.DirectoryManagement $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.DirectoryManagement $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.DirectoryManagement + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.DirectoryManagement.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.DirectoryManagement $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Graph.Entra.DirectoryManagement -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 index decb8e2315..8fc7085775 100644 --- a/testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @{ @@ -21,7 +21,7 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Tests for New-EntraAdministrativeUnit"{ It "Result should not be empty"{ @@ -29,7 +29,7 @@ Describe "Tests for New-EntraAdministrativeUnit"{ $result | Should -Not -BeNullOrEmpty $result.id | should -Be @('aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb') $result.displayName | Should -Be "DummyName" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DisplayName is empty" { { New-EntraAdministrativeUnit -DisplayName "" } | Should -Throw "Cannot bind argument to parameter 'DisplayName'*" @@ -45,7 +45,7 @@ Describe "Tests for New-EntraAdministrativeUnit"{ $result = New-EntraAdministrativeUnit -DisplayName "DummyName" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraAdministrativeUnit" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 index 6b08b9c40f..151ea9cf42 100644 --- a/testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 index aef4120477..1056792593 100644 --- a/testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleAssignment.Tests.ps1 deleted file mode 100644 index 541948b95e..0000000000 --- a/testVNext/Entra/DirectoryManagement/New-EntraDirectoryRoleAssignment.Tests.ps1 +++ /dev/null @@ -1,88 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - $scriptblock = { - return @( - [PSCustomObject]@{ - "AppScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphAppScope" - "AppScopeId" = $null - "Id" = "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - "DirectoryScope" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" - "DirectoryScopeId" = "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - "Condition" = $null - "Principal" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject" - "PrincipalId" = "aaaaaaaa-bbbb-cccc-1111-222222222222" - "RoleDefinition" = "Microsoft.Graph.PowerShell.Models.MicrosoftGraphUnifiedRoleDefinition" - "RoleDefinitionId" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - "AdditionalProperties" = @{"@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleAssignments/$entity"} - "Parameters" = $args - } - ) - } - - Mock -CommandName New-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement -} - -Describe "New-EntraDirectoryRoleAssignment" { -Context "Test for New-EntraDirectoryRoleAssignment" { - It "Should return created Ms role assignment" { - $result = New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "54d418b2-4cc0-47ee-9b39-e8f84ed8e073" -DirectoryScopeId "/54d418b2-4cc0-47ee-9b39-e8f84ed8e073" - $result | Should -Not -BeNullOrEmpty - $result.PrincipalId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" - $result.RoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - $result.DirectoryScopeId | Should -Be "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - - Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when PrincipalId is empty" { - { New-EntraDirectoryRoleAssignment -PrincipalId -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Missing an argument for parameter 'PrincipalId'*" - } - It "Should fail when PrincipalId is invalid" { - { New-EntraDirectoryRoleAssignment -PrincipalId "" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Cannot bind argument to parameter 'PrincipalId' because it is an empty string." - } - It "Should fail when RoleDefinitionId is empty" { - { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Missing an argument for parameter 'RoleDefinitionId'*" - } - It "Should fail when RoleDefinitionId is invalid" { - { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Cannot bind argument to parameter 'RoleDefinitionId' because it is an empty string." - } - It "Should fail when DirectoryScopeId is empty" { - { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId } | Should -Throw "Missing an argument for parameter 'DirectoryScopeId'*" - } - It "Result should Contain ObjectId" { - $result = New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - $result.ObjectId | should -Be "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleAssignment" - - New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleAssignment" - - Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { New-EntraDirectoryRoleAssignment -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} diff --git a/testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 b/testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 index 526f492be0..8bc101403a 100644 --- a/testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -29,7 +29,7 @@ BeforeAll { ) } - Mock -CommandName New-MgDomain -MockWith $scriptBlock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgDomain -MockWith $scriptBlock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "New-EntraDomain" { @@ -39,7 +39,7 @@ Describe "New-EntraDomain" { $result.ObjectId | should -Be "lala.uk" $result.Name | should -Be "lala.uk" - Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Create a new Domain with a list of domain capabilities" { @@ -88,7 +88,7 @@ Describe "New-EntraDomain" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDomain" - Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 index eaec460fe5..54abf08186 100644 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 @@ -2,19 +2,19 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Test for Remove-EntraAdministrativeUnit" { It "Should return empty object" { $result = Remove-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -32,7 +32,7 @@ Describe "Test for Remove-EntraAdministrativeUnit" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraAdministrativeUnit" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 index 9aa44a82f5..624069e0f2 100644 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $auId = "bbbbbbbb-1111-1111-1111-cccccccccccc" $memId = "bbbbbbbb-2222-2222-2222-cccccccccccc" @@ -17,12 +17,12 @@ Describe "Test for Remove-EntraAdministrativeUnitMember" { It "Should return empty object" { $result = Remove-EntraAdministrativeUnitMember -AdministrativeUnitId $auId -MemberId $memId $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return empty object with ObjectId" { $result = Remove-EntraAdministrativeUnitMember -ObjectId $auId -MemberId $memId $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -46,7 +46,7 @@ Describe "Test for Remove-EntraAdministrativeUnitMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraAdministrativeUnitMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 index 1cc1570053..c78c13796e 100644 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDevice -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Remove-EntraDevice" { @@ -17,13 +17,13 @@ Describe "Remove-EntraDevice" { $result = Remove-EntraDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is invalid" { { Remove-EntraDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Remove-EntraDevice" { { Remove-EntraDevice -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" } It "Should contain DeviceId in parameters when passed DeviceId to it" { - Mock -CommandName Remove-MgDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Remove-EntraDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraDevice" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDevice" - Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 index 3e7a531075..9c70ddd44b 100644 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - #Import-Module .\bin\Microsoft.Graph.Entra.psm1 -Force - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + #Import-Module .\bin\Microsoft.Graph.Entra.DirectoryManagement.psm1 -Force + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Remove-EntraDeviceRegisteredOwner" { @@ -17,13 +17,13 @@ Describe "Remove-EntraDeviceRegisteredOwner" { $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Remove-EntraDeviceRegisteredOwner -DeviceId -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } @@ -38,14 +38,14 @@ Describe "Remove-EntraDeviceRegisteredOwner" { { Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "" | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string.*" } } It "Should contain DeviceId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -59,7 +59,7 @@ Describe "Remove-EntraDeviceRegisteredOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeviceRegisteredOwner" - Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 index b2f4e8fa4c..162f668905 100644 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - #Import-Module .\bin\Microsoft.Graph.Entra.psm1 -Force - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + #Import-Module .\bin\Microsoft.Graph.Entra.DirectoryManagement.psm1 -Force + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Remove-EntraDeviceRegisteredUser" { @@ -17,13 +17,13 @@ Describe "Remove-EntraDeviceRegisteredUser" { $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Remove-EntraDeviceRegisteredUser -DeviceId -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } @@ -38,14 +38,14 @@ Describe "Remove-EntraDeviceRegisteredUser" { { Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "" | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string.*" } } It "Should contain DeviceId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain DirectoryObjectId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -59,7 +59,7 @@ Describe "Remove-EntraDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeviceRegisteredUser" - Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 index a7f52b489d..3b0ebcb558 100644 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Remove-EntraDirectoryRoleMember" { @@ -16,13 +16,13 @@ Describe "Remove-EntraDirectoryRoleMember" { $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DirectoryRoleId is empty" { { Remove-EntraDirectoryRoleMember -DirectoryRoleId -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'*" @@ -37,14 +37,14 @@ Describe "Remove-EntraDirectoryRoleMember" { { Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "" } | Should -Throw "Cannot bind argument to parameter 'MemberId' because it is an empty string." } It "Should contain DirectoryRoleId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DirectoryRoleId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain DirectoryObjectId in parameters when passed RefObjectId to it" { - Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -57,7 +57,7 @@ Describe "Remove-EntraDirectoryRoleMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleMember" - Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 index eefa38c963..a14ef7328d 100644 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDomain -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDomain -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Remove-EntraDomain" { @@ -16,7 +16,7 @@ Describe "Remove-EntraDomain" { $result = Remove-EntraDomain -Name "Contoso.com" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { @@ -28,7 +28,7 @@ Describe "Remove-EntraDomain" { } It "Should contain DomainId in parameters when passed Name to it" { - Mock -CommandName Remove-MgDomain -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgDomain -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Remove-EntraDomain -Name "Contoso.com" $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Remove-EntraDomain" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDomain" - Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 index 31a0e682a2..31800cc995 100644 --- a/testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Test for Remove-EntraScopedRoleMembership" { It "Should return empty object" { $result = Remove-EntraScopedRoleMembership -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -ScopedRoleMembershipId bbbbbbbb-2222-2222-2222-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return empty object with ObjectId" { $result = Remove-EntraScopedRoleMembership -ObjectId bbbbbbbb-1111-1111-1111-cccccccccccc -ScopedRoleMembershipId bbbbbbbb-2222-2222-2222-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -43,7 +43,7 @@ Describe "Test for Remove-EntraScopedRoleMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraScopedRoleMembership" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 index b8b20e12f9..a8c74dc31a 100644 --- a/testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Restore-EntraDeletedDirectoryObject" { Context "Restore-EntraDeletedDirectoryObject" { @@ -31,13 +31,13 @@ Describe "Restore-EntraDeletedDirectoryObject" { $result = Restore-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return specific MS deleted directory object with AutoReconcileProxyConflict" { $result = Restore-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AutoReconcileProxyConflict $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { { Restore-EntraDeletedDirectoryObject -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -54,7 +54,7 @@ Describe "Restore-EntraDeletedDirectoryObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedDirectoryObject" Restore-EntraDeletedDirectoryObject -Id "11112222-bbbb-3333-cccc-4444dddd5555" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedDirectoryObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 index 93b6de6e81..5f63390768 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Test for Set-EntraAdministrativeUnit" { It "Should return empty object" { $result = Set-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should return empty object withObjectID" { $result = Set-EntraAdministrativeUnit -ObjectId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Set-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -33,7 +33,7 @@ Describe "Test for Set-EntraAdministrativeUnit" { It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAdministrativeUnit" Set-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 index c3ea97c21d..00f0c4fdd0 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 index 5fe4030047..50c707cdf5 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index bc5943b56a..8af4d00301 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 index 2c5566fe0b..b5abc863b4 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgDevice -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Set-EntraDevice"{ @@ -17,13 +17,13 @@ Describe "Set-EntraDevice"{ $result = Set-EntraDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceObjectId is invalid" { { Set-EntraDevice -DeviceObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceObjectId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Set-EntraDevice"{ { Set-EntraDevice -DeviceObjectId } | Should -Throw "Missing an argument for parameter 'DeviceObjectId'*" } It "Should contain DeviceId in parameters when passed DeviceObjectId to it" { - Mock -CommandName Update-MgDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Set-EntraDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Set-EntraDevice"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDevice" - Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 index d10e094446..6dc0fca714 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ @@ -14,16 +14,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement - Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Set-EntraDirSyncConfiguration" { Context "Test for Set-EntraDirSyncConfiguration" { It "Should Modifies the directory synchronization settings." { $result = Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when AccidentalDeletionThreshold is empty" { @@ -52,7 +52,7 @@ Describe "Set-EntraDirSyncConfiguration" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncConfiguration" - Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 index 790d50fd12..a79acb5bb2 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Set-EntraDirSyncEnabled" { @@ -16,7 +16,7 @@ Describe "Set-EntraDirSyncEnabled" { It "Should return empty object" { $result = Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when EnableDirsync is empty" { @@ -41,7 +41,7 @@ Describe "Set-EntraDirSyncEnabled" { It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncEnabled" Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force | Out-Null - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 index ecea93e5c1..82211abc78 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ @@ -14,16 +14,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement - Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Set-EntraDirSyncFeature" { Context "Test for Set-EntraDirSyncFeature" { It "Should sets identity synchronization features for a tenant." { $result = Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled $false -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Feature is empty" { @@ -60,7 +60,7 @@ Describe "Set-EntraDirSyncFeature" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncFeature" - Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDirectoryRoleDefinition.Tests.ps1 deleted file mode 100644 index b47a11005e..0000000000 --- a/testVNext/Entra/DirectoryManagement/Set-EntraDirectoryRoleDefinition.Tests.ps1 +++ /dev/null @@ -1,110 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - - Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement -} - -Describe "Set-EntraDirectoryRoleDefinition" { - Context "Test for Set-EntraDirectoryRoleDefinition" { - It "Should return empty object" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - $result = Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should execute successfully with Alias" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - $result = Set-EntraDirectoryRoleDefinition -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 - $result | Should -BeNullOrEmpty - - Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 - } - It "Should fail when UnifiedRoleDefinitionId is empty" { - { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId -DisplayName 'Mock-App' -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" - } - It "Should fail when UnifiedRoleDefinitionId is invalid" { - { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" -IsEnabled $false -DisplayName 'Mock-App' -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string*" - } - It "Should fail when RolePermissions is empty" { - {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions } | Should -Throw "Missing an argument for parameter 'RolePermissions'*" - } - It "Should fail when IsEnabled is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsEnabled } | Should -Throw "Missing an argument for parameter 'IsEnabled'*" - } - It "Should fail when DisplayName is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DisplayName } | Should -Throw "Missing an argument for parameter 'DisplayName'*" - } - It "Should fail when ResourceScopes is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -ResourceScopes } | Should -Throw "Missing an argument for parameter 'ResourceScopes'*" - } - It "Should fail when Description is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Description } | Should -Throw "Missing an argument for parameter 'Description'*" - } - It "Should fail when TemplateId is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -TemplateId } | Should -Throw "Missing an argument for parameter 'TemplateId'*" - } - It "Should fail when Version is empty" { - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Version } | Should -Throw "Missing an argument for parameter 'Version'*" - } - It "Should contain UnifiedRoleDefinitionId in parameters when passed Id to it" { - Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement - - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - $result = Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 - $params = Get-Parameters -data $result - $params.UnifiedRoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirectoryRoleDefinition" - - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirectoryRoleDefinition" - - Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error" { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' - $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission - $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") - - try { - # Act & Assert: Ensure the function doesn't throw an exception - { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2 -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - - } -} diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 index b17118a9a0..c5d6277150 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgDomain -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgDomain -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Set-EntraDomain"{ @@ -17,7 +17,7 @@ Describe "Set-EntraDomain"{ $result = Set-EntraDomain -Name "test.mail.onmicrosoft.com" -IsDefault $True -SupportedServices @("OrgIdAuthentication") $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { { Set-EntraDomain -Name } | Should -Throw "Missing an argument for parameter 'Name'*" @@ -40,7 +40,7 @@ Describe "Set-EntraDomain"{ } It "Should contain DomainId in parameters when passed Name to it" { - Mock -CommandName Update-MgDomain -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgDomain -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Set-EntraDomain -Name "test.mail.onmicrosoft.com" $params = Get-Parameters -data $result @@ -53,7 +53,7 @@ Describe "Set-EntraDomain"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDomain" - Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 index 382c9fca56..28e1ed12be 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ @@ -29,16 +29,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement - Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Set-EntraDomainFederationSettings" { Context "Test for Set-EntraDomainFederationSettings" { It "Should Updates settings for a federated domain." { $result = Set-EntraDomainFederationSettings -DomainName "contoso.com" -LogOffUri "https://adfs1.manan.lab/adfs/" -PassiveLogOnUri "https://adfs1.manan.lab/adfs/" -ActiveLogOnUri "https://adfs1.manan.lab/adfs/services/trust/2005/" -IssuerUri "http://adfs1.manan.lab/adfs/services/" -FederationBrandName "ADFS" -MetadataExchangeUri "https://adfs1.manan.lab/adfs/services/trust/" -PreferredAuthenticationProtocol "saml" -PromptLoginBehavior "nativeSupport" -SigningCertificate "Testcertificate" -NextSigningCertificate "Testcertificate" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { @@ -63,7 +63,7 @@ Describe "Set-EntraDomainFederationSettings" { {Set-EntraDomainFederationSettings -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" } It "Should contain DomainId in parameters when DomainName to it" { - Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Set-EntraDomainFederationSettings -DomainName "contoso.com" $params = Get-Parameters -data $result $a= $params | ConvertTo-json | ConvertFrom-Json @@ -76,7 +76,7 @@ Describe "Set-EntraDomainFederationSettings" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDomainFederationSettings" - Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 index ee9509eb9c..152d68323c 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra -MockWith { + Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -MockWith { return @{ value = @( @{ @@ -23,10 +23,10 @@ BeforeAll { Describe "Set-EntraPartnerInformation" { Context "Test for Set-EntraPartnerInformation" { It "Should return empty object" { - Mock -CommandName Invoke-MgGraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-MgGraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Set-EntraPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when PartnerSupportUrl is empty" { { Set-EntraPartnerInformation -PartnerSupportUrl } | Should -Throw "Missing an argument for parameter 'PartnerSupportUrl'*" @@ -66,7 +66,7 @@ Describe "Set-EntraPartnerInformation" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPartnerInformation" - Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 index 24ce2b0258..07a69df178 100644 --- a/testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } $scriptblock = { @@ -11,9 +11,9 @@ BeforeAll { "Id" = "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force - Mock -CommandName Get-MgOrganization -MockWith {$scriptblock} -ModuleName Microsoft.Graph.Entra - Mock -CommandName Update-MgOrganization -MockWith {} -ModuleName Microsoft.Graph.Entra + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force + Mock -CommandName Get-MgOrganization -MockWith {$scriptblock} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgOrganization -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement } Describe "Set-EntraTenantDetail" { @@ -21,7 +21,7 @@ Describe "Set-EntraTenantDetail" { It "Should return empty object" { $result = Set-EntraTenantDetail -MarketingNotificationEmails "amy@contoso.com","henry@contoso.com" -SecurityComplianceNotificationMails "john@contoso.com","mary@contoso.com" -SecurityComplianceNotificationPhones "1-555-625-9999", "1-555-233-5544" -TechnicalNotificationMails "peter@contoso.com" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } It "Should fail when MarketingNotificationEmails is empty" { { Set-EntraTenantDetail -MarketingNotificationEmails } | Should -Throw "Missing an argument for parameter 'MarketingNotificationEmails'.*" @@ -42,7 +42,7 @@ Describe "Set-EntraTenantDetail" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraTenantDetail" - Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 b/testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 index 5013e83278..bad9e7540e 100644 --- a/testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 +++ b/testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement)){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement } - Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement } Describe "Valid parameter Tests"{ @@ -20,23 +20,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) - if($params.count -eq 1 -and $params -eq 'Id'){ + if(($params -eq 'Id') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'Id')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } } catch { @@ -58,23 +58,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) - if($params.count -eq 1 -and $params -eq 'ObjectId'){ + if(($params -eq 'ObjectId') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'ObjectId')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 } } catch { diff --git a/testVNext/Entra/Entra.Tests.ps1 b/testVNext/Entra/Entra.Tests.ps1 new file mode 100644 index 0000000000..db2f146455 --- /dev/null +++ b/testVNext/Entra/Entra.Tests.ps1 @@ -0,0 +1,54 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ + +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ + Import-Module Microsoft.Graph.Entra.Authentication -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Applications)){ + Import-Module Microsoft.Graph.Entra.Applications -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement)){ + Import-Module Microsoft.Graph.Entra.DirectoryManagement -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ + Import-Module Microsoft.Graph.Entra.Governance -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Users)){ + Import-Module Microsoft.Graph.Entra.Users -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Groups)){ + Import-Module Microsoft.Graph.Entra.Groups -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ + Import-Module Microsoft.Graph.Entra.Reports -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ + Import-Module Microsoft.Graph.Entra.SignIns -Force +} + +Import-Module Pester + +#$psmPath = (Get-Module Microsoft.Graph.Entra.Applications).Path +$ps1FilesPath = join-path $psscriptroot "..\..\moduleVNext\Entra\Microsoft.Graph.Entra" +$testReportPath = join-path $psscriptroot "..\..\TestReport\Entra" +$mockScriptsPath = join-path $psscriptroot "..\..\testVNext\Entra\*\*.Tests.ps1" + +$testOutputFile = "$testReportPath\TestResults.xml" +if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} + +$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } + +$config = New-PesterConfiguration +$config.Run.Path = $mockScripts +$config.Run.PassThru = $true +$config.Run.Exit = $true +$config.CodeCoverage.Enabled = $true +$config.CodeCoverage.CoveragePercentTarget = 100 +#$config.CodeCoverage.Path = $psmPath +$config.CodeCoverage.Path = $ps1FilesPath +$config.TestResult.Enabled = $true +$config.TestResult.OutputPath = $testOutputFile +$config.Output.Verbosity = "Detailed" + +Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/EntraCmdletsMap.ps1 b/testVNext/Entra/EntraCmdletsMap.ps1 new file mode 100644 index 0000000000..d83a5ca5b7 --- /dev/null +++ b/testVNext/Entra/EntraCmdletsMap.ps1 @@ -0,0 +1,413 @@ +$cmdlets = @( + @{ + SourceName = "Remove-EntraAdministrativeUnit"; + TargetName = "Remove-MgDirectoryAdministrativeUnit"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraDeletedDirectoryObject"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Remove-EntraGroup"; + TargetName = "Remove-MgGroup"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraGroupLifecyclePolicy"; + TargetName = "Remove-MgGroupLifecyclePolicy"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraIdentityProvider"; + TargetName = "Remove-MgIdentityProvider"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraPermissionGrantPolicy"; + TargetName = "Remove-MgPolicyPermissionGrantPolicy"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraRoleAssignment"; + TargetName = "Remove-MgRoleManagementDirectoryRoleAssignment" + IsApi = $false + }, + @{ + SourceName = "Remove-EntraRoleDefinition"; + TargetName = "Remove-MgRoleManagementDirectoryRoleDefinition"; + IsApi = $false + }, + # @{ + # SourceName = "Remove-EntraApplication"; + # TargetName = "Remove-MgApplication"; + # IsApi = $false + # }, + @{ + SourceName = "Remove-EntraContact"; + TargetName = "Remove-MgContact"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraDeletedApplication"; + TargetName = "Remove-MgDirectoryDeletedItem"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraDevice"; + TargetName = "Remove-MgDevice"; + IsApi = $false + }, + # @{ + # SourceName = "Remove-EntraGroup"; + # TargetName = "Remove-MgGroup"; + # IsApi = $false + # }, + @{ + SourceName = "Remove-EntraApplication"; + TargetName = "Remove-MgApplication"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraApplicationKey"; + TargetName = "Remove-MgApplicationKey"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraApplicationPassword"; + TargetName = "Remove-MgApplicationPassword"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraOAuth2PermissionGrant"; + TargetName = "Remove-MgOAuth2PermissionGrant"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraServicePrincipal"; + TargetName = "Remove-MgServicePrincipal"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraUser"; + TargetName = "Remove-MgUser"; + IsApi = $false + }, + @{ + SourceName = "Remove-EntraUserManager"; + TargetName = "Remove-MgUserManagerByRef"; + IsApi = $false + } +) + +$cmdlets2 = @( + @{ + SourceName = "Get-EntraApplication"; + TargetName = "Get-MgApplication"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraApplicationExtensionProperty"; + TargetName = "Get-MgApplicationExtensionProperty"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraApplicationKeyCredential"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraApplicationLogo"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraApplicationOwner"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraApplicationPasswordCredential"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraApplicationServiceEndpoint"; + TargetName = "Get-MgServicePrincipalEndpoint"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraContact"; + TargetName = "Get-MgContact"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraContactDirectReport"; + TargetName = "Get-MgContactDirectReport"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraContactManager"; + TargetName = "Get-MgContactManager"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraContactMembership"; + TargetName = "Get-MgContactMemberOf"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraContract"; + TargetName = "Get-MgContract"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraDevice"; + TargetName = "Get-MgDevice"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraDeviceRegisteredOwner"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraDeviceRegisteredUser"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraDirectoryRole"; + TargetName = "Get-MgDirectoryRole"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraDirectoryRoleMember"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraGroup"; + TargetName = "Get-MgGroup"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraGroupAppRoleAssignment"; + TargetName = "Get-MgGroupAppRoleAssignment"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraGroupMember"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraGroupOwner"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraServiceAppRoleAssignedTo"; + TargetName = "Get-MgServicePrincipalAppRoleAssignment"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraServiceAppRoleAssignment"; + TargetName = "Get-MgServicePrincipalAppRoleAssignedTo"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraServicePrincipal"; + TargetName = "Get-MgServicePrincipal"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraServicePrincipalCreatedObject"; + TargetName = "Get-MgServicePrincipalCreatedObject"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraServicePrincipalKeyCredential"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraServicePrincipalMembership"; + TargetName = "Get-MgServicePrincipalTransitiveMemberOf"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraServicePrincipalOAuth2PermissionGrant"; + TargetName = "Get-MgServicePrincipalOauth2PermissionGrant"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraServicePrincipalOwnedObject"; + TargetName = "Get-MgServicePrincipalOwnedObject"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraServicePrincipalOwner"; + TargetName = "Get-MgServicePrincipalOwner"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraServicePrincipalPasswordCredential"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraSubscribedSku"; + TargetName = "Get-MgSubscribedSku"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraUser"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraUserAppRoleAssignment"; + TargetName = "Get-MgUserAppRoleAssignment"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraUserCreatedObject"; + TargetName = "Get-MgUserCreatedObject"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraUserDirectReport"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraUserExtension"; + TargetName = "Get-MgUserExtension"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraUserLicenseDetail"; + TargetName = "Get-MgUserLicenseDetail"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraUserManager"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraUserMembership"; + TargetName = "Get-MgUserMemberOf"; + IsApi = $true + }, + @{ + SourceName = "Get-EntraUserOAuth2PermissionGrant"; + TargetName = "Get-MgUserOAuth2PermissionGrant"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraUserOwnedDevice"; + TargetName = "Get-MgUserOwnedDevice"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraUserOwnedObject"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraUserRegisteredDevice"; + TargetName = "Get-MgUserRegisteredDevice"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraUserThumbnailPhoto"; + TargetName = "Get-MgUserPhoto"; + IsApi = $false + } +) +$cmdlets3 = @( + @{ + SourceName = "Get-EntraAdministrativeUnit"; + TargetName = "Get-MgDirectoryAdministrativeUnit"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraAdministrativeUnitMember"; + TargetName = "Get-MgDirectoryAdministrativeUnitMember"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraAttributeSet"; + TargetName = ""; + IsApi = $true + } + , + @{ + SourceName = "Get-EntraDeletedDirectoryObject"; + TargetName = "Get-MgDirectoryDeletedItem"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraDeletedGroup"; + TargetName = "Get-MgDirectoryDeletedItemAsGroup"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraGroupLifecyclePolicy"; + TargetName = "Get-MgGroupLifecyclePolicy"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraGroupPermissionGrant"; + TargetName = "Get-MgGroupPermissionGrant"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraIdentityProvider"; + TargetName = "Get-MgIdentityProvider"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraLifecyclePolicyGroup"; + TargetName = "Get-MgGroupLifecyclePolicyByGroup"; + IsApi = $false + }, + # @{ + # SourceName = "Get-EntraPermissionGrantConditionSet"; + # TargetName = "Get-MgPolicyPermissionGrantPolicyInclude"; + # IsApi = $false + # }, + @{ + SourceName = "Get-EntraPermissionGrantPolicy"; + TargetName = "Get-MgPolicyPermissionGrantPolicy"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraPolicy"; + TargetName = ""; + IsApi = $true + }, + @{ + SourceName = "Get-EntraRoleAssignment"; + TargetName = "Get-MgRoleManagementDirectoryRoleAssignment"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraRoleDefinition"; + TargetName = "Get-MgRoleManagementDirectoryRoleDefinition"; + IsApi = $false + }, + @{ + SourceName = "Get-EntraScopedRoleMembership"; + TargetName = "Get-MgDirectoryAdministrativeUnitScopedRoleMember"; + IsApi = $false + } + # @{ + # SourceName = "Get-EntraServicePrincipalDelegatedPermissionClassification"; + # TargetName = "Get-MgServicePrincipalDelegatedPermissionClassification"; + # IsApi = $false + # } +) \ No newline at end of file diff --git a/testVNext/Entra/Governance/Entra.Tests.ps1 b/testVNext/Entra/Governance/Entra.Tests.ps1 deleted file mode 100644 index fdbfdf6033..0000000000 --- a/testVNext/Entra/Governance/Entra.Tests.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ - Import-Module .\bin\Microsoft.Graph.Entra.Governance.psd1 -Force -} - -Import-Module Pester - -$psmPath = (Get-Module Microsoft.Graph.Entra.Governance).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" - -$testOutputFile = "$testReportPath\TestResults.xml" -if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} - -$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } - -$config = New-PesterConfiguration -$config.Run.Path = $mockScripts -$config.Run.PassThru = $true -$config.Run.Exit = $true -$config.CodeCoverage.Enabled = $true -$config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath -$config.TestResult.Enabled = $true -$config.TestResult.OutputPath = $testOutputFile -$config.Output.Verbosity = "Detailed" - -Invoke-Pester -Configuration $config diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 similarity index 88% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleAssignment.Tests.ps1 rename to testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 index 1fd5f92252..98a2326d26 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -26,7 +26,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance } Describe "Get-EntraDirectoryRoleAssignment" { @@ -35,13 +35,13 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when Get-EntraDirectoryRoleAssignment is empty" { { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" @@ -53,7 +53,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result = Get-EntraDirectoryRoleAssignment -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when All is invalid" { { Get-EntraDirectoryRoleAssignment -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -62,7 +62,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result = Get-EntraDirectoryRoleAssignment -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when Top is empty" { { Get-EntraDirectoryRoleAssignment -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -75,7 +75,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when filter is empty" { { Get-EntraDirectoryRoleAssignment -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -95,7 +95,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.PrincipalId | Should -Be 'aaaaaaaa-bbbb-cccc-1111-222222222222' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -107,7 +107,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleAssignment" - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 88% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleDefinition.Tests.ps1 rename to testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 index 11ee775625..bef299fdeb 100644 --- a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleDefinition.Tests.ps1 +++ b/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ + Import-Module Microsoft.Graph.Entra.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -29,7 +29,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance } Describe "Get-EntraDirectoryRoleDefinition" { @@ -40,7 +40,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result.DisplayName | Should -Be "Mock-App" $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should return specificrole Defination With Alias" { $result = Get-EntraDirectoryRoleDefinition -Id "0000aaaa-11bb-cccc-dd22-eeeeee333333" @@ -48,7 +48,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result.DisplayName | Should -Be "Mock-App" $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when UnifiedRoleDefinitionId is empty" { { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" @@ -60,7 +60,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result = Get-EntraDirectoryRoleDefinition -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when All is invalid" { { Get-EntraDirectoryRoleDefinition -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -69,7 +69,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result = Get-EntraDirectoryRoleDefinition -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when Top is empty" { { Get-EntraDirectoryRoleDefinition -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -82,7 +82,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when String is empty" { { Get-EntraDirectoryRoleDefinition -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" @@ -92,7 +92,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when filter is empty" { { Get-EntraDirectoryRoleDefinition -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -111,7 +111,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -123,7 +123,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleDefinition" - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 index aa606d76f4..ca62493b3c 100644 --- a/testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 index 3fe6f7b7c1..7cd12e45aa 100644 --- a/testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 +++ b/testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 b/testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 index 9d8aa5f6b4..87f3ecd292 100644 --- a/testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance } diff --git a/testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 index 712c43d660..228d3ba693 100644 --- a/testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 +++ b/testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance } diff --git a/testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 b/testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 index 6cf8fe2228..e22a6dc8a8 100644 --- a/testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 +++ b/testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance } diff --git a/testVNext/Entra/Governance/Valid.Tests.ps1 b/testVNext/Entra/Governance/Valid.Tests.ps1 index 0e82decbbf..cfd385b6f1 100644 --- a/testVNext/Entra/Governance/Valid.Tests.ps1 +++ b/testVNext/Entra/Governance/Valid.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll{ if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ Import-Module Microsoft.Graph.Entra.Governance } - Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force $module = Get-Module -Name Microsoft.Graph.Entra.Governance } @@ -20,7 +20,7 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) - if($params.count -eq 1 -and $params -eq 'Id'){ + if(($params -eq 'Id') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'Id')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { @@ -58,7 +58,7 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) - if($params.count -eq 1 -and $params -eq 'ObjectId'){ + if(($params -eq 'ObjectId') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'ObjectId')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { diff --git a/testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 b/testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 index 86896d7b9f..9ad88c8664 100644 --- a/testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 +++ b/testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgGroupMember -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgGroupMember -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Add-EntraGroupMember" { @@ -16,7 +16,7 @@ Describe "Add-EntraGroupMember" { $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Add-EntraGroupMember" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Add-EntraGroupMember" { } It "Should contain DirectoryObjectId in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -58,7 +58,7 @@ Describe "Add-EntraGroupMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupMember" - Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 b/testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 index e2c0050245..31d7ddd504 100644 --- a/testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 +++ b/testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Add-EntraGroupOwner" { @@ -16,7 +16,7 @@ Describe "Add-EntraGroupOwner" { $result = Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Add-EntraGroupOwner" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName New-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -47,7 +47,7 @@ Describe "Add-EntraGroupOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupOwner" Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupOwner" - Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 b/testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 index 95070b8ea7..5370eb2848 100644 --- a/testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -17,7 +17,7 @@ BeforeAll { ) } - Mock -CommandName Add-MgGroupToLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Add-MgGroupToLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Add-EntraLifecyclePolicyGroup" { @@ -27,14 +27,14 @@ Describe "Add-EntraLifecyclePolicyGroup" { $result | Should -Not -BeNullOrEmpty" $result.Value | should -Be "True" - Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should return created LifecyclePolicyGroup with alias" { $result = Add-EntraLifecyclePolicyGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff $result | Should -Not -BeNullOrEmpty" $result.Value | should -Be "True" - Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is invalid" { { Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string.*" @@ -55,7 +55,7 @@ Describe "Add-EntraLifecyclePolicyGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraLifecyclePolicyGroup" - Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Entra.Tests.ps1 b/testVNext/Entra/Groups/Entra.Tests.ps1 deleted file mode 100644 index e6b0c31795..0000000000 --- a/testVNext/Entra/Groups/Entra.Tests.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force -} - -Import-Module Pester - -$psmPath = (Get-Module Microsoft.Graph.Entra).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" - -$testOutputFile = "$testReportPath\TestResults.xml" -if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} - -$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } - -$config = New-PesterConfiguration -$config.Run.Path = $mockScripts -$config.Run.PassThru = $true -$config.Run.Exit = $true -$config.CodeCoverage.Enabled = $true -$config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath -$config.TestResult.Enabled = $true -$config.TestResult.OutputPath = $testOutputFile -$config.Output.Verbosity = "Detailed" - -Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 index 62599d6be0..0ddac6e107 100644 --- a/testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryDeletedItemAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgDirectoryDeletedItemAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Get-EntraDeletedGroup" { @@ -37,7 +37,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should return specific Deleted Group with alias" { $result = Get-EntraDeletedGroup -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -46,7 +46,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { { Get-EntraDeletedGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -58,7 +58,7 @@ Context "Test for Get-EntraDeletedGroup" { $result = Get-EntraDeletedGroup -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when All is invalid" { { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -70,7 +70,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Top is empty" { { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -85,7 +85,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when filter is empty" { { Get-EntraDeletedGroup -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -97,7 +97,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.MailNickname | Should -Be "Demo-Mock-App" $result.DisplayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when searchstring is empty" { { Get-EntraDeletedGroup -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" @@ -107,7 +107,7 @@ Context "Test for Get-EntraDeletedGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Property is empty" { { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -127,7 +127,7 @@ Context "Test for Get-EntraDeletedGroup" { $result = Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedGroup" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 index b57241c64d..e643ec070f 100644 --- a/testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraGroup with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Get-EntraGroup" { @@ -32,7 +32,7 @@ Describe "Get-EntraGroup" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { { Get-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -53,7 +53,7 @@ Describe "Get-EntraGroup" { $result = Get-EntraGroup -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when All has an argument" { { Get-EntraGroup -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -63,20 +63,20 @@ Describe "Get-EntraGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'demo' - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should return specific group by filter" { $result = Get-EntraGroup -Filter "DisplayName -eq 'demo'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'demo' - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should return top group" { $result = Get-EntraGroup -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Result should Contain ObjectId" { $result = Get-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -97,7 +97,7 @@ Describe "Get-EntraGroup" { $result = Get-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroup" - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 index aef1d6a5f5..1fbf2f27e8 100644 --- a/testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Get-EntraGroupAppRoleAssignment" { @@ -39,7 +39,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should return specific Group AppRole Assignment with alias" { $result = Get-EntraGroupAppRoleAssignment -objectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -50,7 +50,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when ObjectlId is empty" { { Get-EntraGroupAppRoleAssignment -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -67,7 +67,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when All is invalid" { { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -81,7 +81,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Top is empty" { { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -94,7 +94,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.PrincipalDisplayName | Should -Be 'Mock-Group' - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Property is empty" { { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -116,7 +116,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupAppRoleAssignment" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 index 01c6b17d28..061882aaf7 100644 --- a/testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 +++ b/testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Get-EntraGroupLifecyclePolicy" { @@ -32,7 +32,7 @@ Describe "Get-EntraGroupLifecyclePolicy" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraGroupLifecyclePolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" @@ -49,7 +49,7 @@ Describe "Get-EntraGroupLifecyclePolicy" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is empty" { @@ -71,7 +71,7 @@ Describe "Get-EntraGroupLifecyclePolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Property is empty" { @@ -86,7 +86,7 @@ Describe "Get-EntraGroupLifecyclePolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupLifecyclePolicy" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 index 15be33b616..c4ced384ca 100644 --- a/testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 +++ b/testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Get-EntraGroupMember" { @@ -31,7 +31,7 @@ Describe "Get-EntraGroupMember" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is invalid" { { Get-EntraGroupMember -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." @@ -52,7 +52,7 @@ Describe "Get-EntraGroupMember" { $result = Get-EntraGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when All has an argument" { @@ -63,7 +63,7 @@ Describe "Get-EntraGroupMember" { $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Property parameter should work" { @@ -71,7 +71,7 @@ Describe "Get-EntraGroupMember" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Property is empty" { @@ -86,7 +86,7 @@ Describe "Get-EntraGroupMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 index 2186d3ffba..f1b95bc9eb 100644 --- a/testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 +++ b/testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $mockResponse = { return @{ @@ -29,7 +29,7 @@ BeforeAll { ) } } - Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra.Groups } Describe "Get-EntraGroupOwner" { @@ -40,7 +40,7 @@ Describe "Get-EntraGroupOwner" { $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' $result.DeletedDateTime | should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Get a group owner by alias" { $result = Get-EntraGroupOwner -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -48,7 +48,7 @@ Describe "Get-EntraGroupOwner" { $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' $result.DeletedDateTime | should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -63,7 +63,7 @@ Describe "Get-EntraGroupOwner" { $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when All has an argument" { @@ -74,7 +74,7 @@ Describe "Get-EntraGroupOwner" { $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 2 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when top is empty" { @@ -102,7 +102,7 @@ Describe "Get-EntraGroupOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Property is empty" { @@ -117,7 +117,7 @@ Describe "Get-EntraGroupOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupOwner" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 index f7f49d1640..c64b13959b 100644 --- a/testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgGroupLifecyclePolicyByGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgGroupLifecyclePolicyByGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Get-EntraLifecyclePolicyGroup" { @@ -33,7 +33,7 @@ Describe "Get-EntraLifecyclePolicyGroup" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Retrieve lifecycle policy object with alias" { @@ -45,7 +45,7 @@ Describe "Get-EntraLifecyclePolicyGroup" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -67,7 +67,7 @@ Describe "Get-EntraLifecyclePolicyGroup" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Property is empty" { @@ -82,7 +82,7 @@ Describe "Get-EntraLifecyclePolicyGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraLifecyclePolicyGroup" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 b/testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 index aaf8c9088c..08c3b12e1c 100644 --- a/testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 +++ b/testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraObjectSetting with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/Entra/Groups/Invalid.Tests.ps1 b/testVNext/Entra/Groups/Invalid.Tests.ps1 index 6d5381a100..d5a5c36d90 100644 --- a/testVNext/Entra/Groups/Invalid.Tests.ps1 +++ b/testVNext/Entra/Groups/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Groups)){ + Import-Module Microsoft.Graph.Entra.Groups } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/testVNext/Entra/Groups/Module.Tests.ps1 b/testVNext/Entra/Groups/Module.Tests.ps1 index cc40ad720b..e4ba28e9d8 100644 --- a/testVNext/Entra/Groups/Module.Tests.ps1 +++ b/testVNext/Entra/Groups/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra Module" { +Describe "Microsoft.Graph.Entra.Groups Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Groups $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Groups $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Groups + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Groups.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Groups $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Graph.Entra.Groups -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 b/testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 index 6c16d0b3ed..aeffb5bdc9 100644 --- a/testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { #Write-Host "Mocking New-EntraGroup with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName New-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "New-EntraGroup" { @@ -36,7 +36,7 @@ Describe "New-EntraGroup" { $result.SecurityEnabled | should -Be "True" $result.Description | should -Be "test" - Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when parameters are invalid" { { New-EntraGroup -DisplayName "" -MailEnabled "" -SecurityEnabled "" -MailNickName "" -Description "" } | Should -Throw "Cannot bind argument to parameter*" @@ -53,7 +53,7 @@ Describe "New-EntraGroup" { $result = New-EntraGroup -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroup" - Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 index efc0c14305..021dbb5c95 100644 --- a/testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName New-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "New-EntraGroupAppRoleAssignment" { @@ -39,7 +39,7 @@ Context "Test for New-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should return created Group AppRole Assignment with alias" { $result = New-EntraGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -50,7 +50,7 @@ Context "Test for New-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when ObjectlId is empty" { { New-EntraGroupAppRoleAssignment -GroupId -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -93,7 +93,7 @@ Context "Test for New-EntraGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroupAppRoleAssignment" - Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 b/testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 index f6eb58547b..03bd4e7b9f 100644 --- a/testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 +++ b/testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName New-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "New-EntraGroupLifecyclePolicy" { @@ -32,7 +32,7 @@ Describe "New-EntraGroupLifecyclePolicy" { $result.ManagedGroupTypes | should -Be "Selected" $result.AlternateNotificationEmails | should -Be "example@contoso.com" - Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupLifetimeInDays is invalid" { { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays a -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Cannot process argument transformation on parameter 'GroupLifetimeInDays'.*" @@ -64,7 +64,7 @@ Describe "New-EntraGroupLifecyclePolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroupLifecyclePolicy" - Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 index 2027087493..6428a80019 100644 --- a/testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroup -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Remove-EntraGroup" { @@ -17,13 +17,13 @@ Describe "Remove-EntraGroup" { $result = Remove-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraGroup -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is invalid" { { Remove-EntraGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Remove-EntraGroup" { { Remove-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Remove-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroup" - Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 index ae40a78f57..2675331bdc 100644 --- a/testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Remove-EntraGroupAppRoleAssignment" { @@ -16,13 +16,13 @@ Describe "Remove-EntraGroupAppRoleAssignment" { $result = Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should return empty object with Alias" { $result = Remove-EntraGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { { Remove-EntraGroupAppRoleAssignment -GroupId -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -37,7 +37,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { { Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleAssignmentId' because it is an empty string." } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupAppRoleAssignment" - Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 index 9fd8573ed7..43418b65d3 100644 --- a/testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 +++ b/testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Remove-EntraGroupLifecyclePolicy" { @@ -16,13 +16,13 @@ Describe "Remove-EntraGroupLifecyclePolicy" { $result = Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraGroupLifecyclePolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is empty" { { Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'*" @@ -33,7 +33,7 @@ Describe "Remove-EntraGroupLifecyclePolicy" { } It "Should contain GroupLifecyclePolicyId in parameters when passed GroupLifecyclePolicyId to it" { - Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $params = Get-Parameters -data $result @@ -47,7 +47,7 @@ Describe "Remove-EntraGroupLifecyclePolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupLifecyclePolicy" - Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 index cc7fe1b85e..511131eb27 100644 --- a/testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 +++ b/testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroupMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Remove-EntraGroupMember" { @@ -16,7 +16,7 @@ Describe "Remove-EntraGroupMember" { $result = Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Remove-EntraGroupMember" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgGroupMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraGroupMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupMember" - Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 index 84decd9dd7..e79061b99a 100644 --- a/testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 +++ b/testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Remove-EntraGroupOwner" { @@ -16,7 +16,7 @@ Describe "Remove-EntraGroupOwner" { $result = Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Remove-EntraGroupOwner" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraGroupOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupOwner" - Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 b/testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 index 952dacff0a..72baf13dc4 100644 --- a/testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -15,7 +15,7 @@ BeforeAll { } ) } - Mock -CommandName Remove-MgGroupFromLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgGroupFromLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Remove-EntraLifecyclePolicyGroup" { @@ -24,14 +24,14 @@ Describe "Remove-EntraLifecyclePolicyGroup" { $result = Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" $result.Value | Should -Be $true - Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should remove a group from a lifecycle policy with alias" { $result = Remove-EntraLifecyclePolicyGroup -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" $result.Value | Should -Be $true - Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is empty" { @@ -69,7 +69,7 @@ Describe "Remove-EntraLifecyclePolicyGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraLifecyclePolicyGroup" - Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 b/testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 index b4ec976946..b949aebfad 100644 --- a/testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-MgRenewGroup -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-MgRenewGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Reset-EntraLifeCycleGroup" { @@ -16,7 +16,7 @@ Describe "Reset-EntraLifeCycleGroup" { $result = Reset-EntraLifeCycleGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when Id is empty" { @@ -28,7 +28,7 @@ Describe "Reset-EntraLifeCycleGroup" { } It "Should contain GroupId in parameters when passed Id to it" { - Mock -CommandName Invoke-MgRenewGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-MgRenewGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Reset-EntraLifeCycleGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Reset-EntraLifeCycleGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Reset-EntraLifeCycleGroup" - Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 b/testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 index 4d8dcd66c3..2d39ef4825 100644 --- a/testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 +++ b/testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -15,7 +15,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgContactMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgContactMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Select-EntraGroupIdsContactIsMemberOf" { @@ -28,7 +28,7 @@ Describe "Select-EntraGroupIdsContactIsMemberOf" { $result | Should -Not -BeNullOrEmpty $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when ObjectId is missing" { @@ -63,7 +63,7 @@ Describe "Select-EntraGroupIdsContactIsMemberOf" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsContactIsMemberOf" - Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 b/testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 index 8171a0356c..b154a818e3 100644 --- a/testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 +++ b/testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -29,8 +29,8 @@ BeforeAll { } ) } - Mock -CommandName Get-MgGroupMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra - Mock -CommandName Get-MgGroup -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgGroupMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgGroup -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra.Groups } Describe "Select-EntraGroupIdsGroupIsMemberOf" { @@ -43,7 +43,7 @@ Describe "Select-EntraGroupIdsGroupIsMemberOf" { $result | Should -Not -BeNullOrEmpty $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when ObjectId is missing" { @@ -77,7 +77,7 @@ Describe "Select-EntraGroupIdsGroupIsMemberOf" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsGroupIsMemberOf" - Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 b/testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 index ef839b024c..cc296e5930 100644 --- a/testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 +++ b/testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -16,7 +16,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgUserMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgUserMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Select-EntraGroupIdsUserIsMemberOf" { @@ -29,7 +29,7 @@ Describe "Select-EntraGroupIdsUserIsMemberOf" { $result | Should -Not -BeNullOrEmpty $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when UserID is invalid " { @@ -50,7 +50,7 @@ Describe "Select-EntraGroupIdsUserIsMemberOf" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-entraGroupIdsUserIsMemberOf" - Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 b/testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 index 13be7dbd23..18b3a9246d 100644 --- a/testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 +++ b/testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgGroup -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups } Describe "Set-EntraGroup" { @@ -17,13 +17,13 @@ Describe "Set-EntraGroup" { $result = Set-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraGroup -Id bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should fail when GroupId is invalid" { { Set-EntraGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Set-EntraGroup" { { Set-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Update-MgGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups $result = Set-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Set-EntraGroup" { Set-EntraGroup -Id bbbbbbbb-1111-2222-3333-cccccccccccc $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraGroup" - Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 b/testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 index a215df6447..a6d2479b3d 100644 --- a/testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 +++ b/testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName Update-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups } Describe "Set-EntraGroupLifecyclePolicy" { @@ -32,7 +32,7 @@ Describe "Set-EntraGroupLifecyclePolicy" { $result.ManagedGroupTypes | should -Be "All" $result.AlternateNotificationEmails | should -Be "admingroup@contoso.com" - Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraGroupLifecyclePolicy -Id "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" @@ -68,7 +68,7 @@ Describe "Set-EntraGroupLifecyclePolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraGroupLifecyclePolicy" - Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Groups/Valid.Tests.ps1 b/testVNext/Entra/Groups/Valid.Tests.ps1 index 5013e83278..924359246d 100644 --- a/testVNext/Entra/Groups/Valid.Tests.ps1 +++ b/testVNext/Entra/Groups/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Groups)){ + Import-Module Microsoft.Graph.Entra.Groups } - Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Groups } Describe "Valid parameter Tests"{ @@ -20,23 +20,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) - if($params.count -eq 1 -and $params -eq 'Id'){ + if(($params -eq 'Id') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'Id')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } } catch { @@ -58,23 +58,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) - if($params.count -eq 1 -and $params -eq 'ObjectId'){ + if(($params -eq 'ObjectId') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'ObjectId')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Groups -Times 1 } } catch { diff --git a/testVNext/Entra/New-EntraInvitation.Tests.ps1 b/testVNext/Entra/New-EntraInvitation.Tests.ps1 index ef281ac534..acea6a2caa 100644 --- a/testVNext/Entra/New-EntraInvitation.Tests.ps1 +++ b/testVNext/Entra/New-EntraInvitation.Tests.ps1 @@ -1,230 +1,230 @@ # ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra - } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force +# BeforeAll { +# if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ +# Import-Module Microsoft.Graph.Entra +# } +# Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - $scriptblock = { - return @( - [PSCustomObject]@{ - "Id" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - "InviteRedeemUrl" = "https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-ccca95d4390e%26user%3d3135a58d-b417-40ae-bb44-a82df52b7957%26ticket%3dzbiyasVbMTkRKVom98YD%25252fOJvkr2WRQsI2Om6Z62TDYg%25253d%26ver%3d2.0" - "InviteRedirectUrl" = "http://myapps.contoso.com/" - "InvitedUser" = @{ - "AboutMe" = "" - "AccountEnabled" = "" - "Activities" = "" - "AgeGroup" = "" - "AgreementAcceptances" = "" - "AppRoleAssignments" = "" - "AssignedLicenses" = "" - "AssignedPlans" = "" - "Authentication" = "" - "AuthorizationInfo" = "" - "Birthday" = "" - "BusinessPhones" = "" - "Calendar" = "" - "CalendarGroups" = "" - "CalendarView" = "" - "Calendars" = "" - "Chats" = "" - "City" = "" - "CompanyName" = "" - "ConsentProvidedForMinor" = "" - "ContactFolders" = "" - "Contacts" = "" - "Country" = "" - "CreatedDateTime" = "" - "CreatedObjects" = "" - "CreationType" = "" - "CustomSecurityAttributes" = "" - "DeletedDateTime" = "" - "Department" = "" - "DeviceEnrollmentLimit" = "" - "DeviceManagementTroubleshootingEvents" = "" - "DirectReports" = "" - "DisplayName" = "" - "Drive" = "" - "Drives" = "" - "EmployeeExperience" = "" - "EmployeeHireDate" = "" - "EmployeeId" = "" - "EmployeeLeaveDateTime" = "" - "EmployeeOrgData" = "" - "EmployeeType" = "" - "Events" = "" - "Extensions" = "" - "ExternalUserState" = "" - "ExternalUserStateChangeDateTime" = "" - "FaxNumber" = "" - "FollowedSites" = "" - "GivenName" = "" - "HireDate" = "" - "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" - "Identities" = "" - "ImAddresses" = "" - "InferenceClassification" = "" - "Insights" = "" - "Interests" = "" - "IsResourceAccount" = "" - "JobTitle" = "" - "JoinedTeams" = "" - "LastPasswordChangeDateTime" = "" - "LegalAgeGroupClassification" = "" - "LicenseAssignmentStates" = "" - "LicenseDetails" = "" - "Mail" = "" - "MailFolders" = "" - "MailNickname" = "" - "MailboxSettings" = "" - "ManagedAppRegistrations" = "" - "ManagedDevices" = "" - "Manager" = "" - "MemberOf" = "" - "Messages" = "" - "MobilePhone" = "" - "MySite" = "" - "Oauth2PermissionGrants" = "" - "OfficeLocation" = "" - "OnPremisesDistinguishedName" = "" - "OnPremisesDomainName" = "" - "OnPremisesExtensionAttributes" = "" - "OnPremisesImmutableId" = "" - "OnPremisesLastSyncDateTime" = "" - "OnPremisesProvisioningErrors" = "" - "OnPremisesSamAccountName" = "" - "OnPremisesSecurityIdentifier" = "" - "OnPremisesSyncEnabled" = "" - "OnPremisesUserPrincipalName" = "" - "Onenote" = "" - "OnlineMeetings" = "" - "OtherMails" = "" - "Outlook" = "" - "OwnedDevices" = "" - "OwnedObjects" = "" - "PasswordPolicies" = "" - "PasswordProfile" = "" - "PastProjects" = "" - "People" = "" - "PermissionGrants" = "" - "Photo" = "" - "Photos" = "" - "Planner" = "" - "PostalCode" = "" - "PreferredDataLocation" = "" - "PreferredLanguage" = "" - "PreferredName" = "" - "Presence" = "" - "Print" = "" - "ProvisionedPlans" = "" - "ProxyAddresses" = "" - "RegisteredDevices" = "" - "Responsibilities" = "" - "Schools" = "" - "ScopedRoleMemberOf" = "" - "SecurityIdentifier" = "" - "ServiceProvisioningErrors" = "" - "Settings" = "" - "ShowInAddressList" = "" - "SignInActivity" = "" - "SignInSessionsValidFromDateTime" = "" - "Skills" = "" - "State" = "" - "StreetAddress" = "" - "Surname" = "" - "Teamwork" = "" - "Todo" = "" - "TransitiveMemberOf" = "" - "UsageLocation" = "" - "UserPrincipalName" = "SawyerM@contoso.com" - "UserType" = "Guest" - } - "InvitedUserDisplayName" = "" - "InvitedUserEmailAddress" = "SawyerM@contoso.com" - "InvitedUserMessageInfo" = @{ - "CcRecipients" = [System.Object]@() - "CustomizedMessageBody" = "" - "MessageLanguage" = "" - } - "InvitedUserType" = "Guest" - "ResetRedemption" = $false - "SendInvitationMessage" = $true - "Status" = "PendingAcceptance" - "AdditionalProperties" = @{ - "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#invitations/$entity" - } - "Parameters" = $args - } - ) - } - Mock -CommandName New-MgInvitation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra -} +# $scriptblock = { +# return @( +# [PSCustomObject]@{ +# "Id" = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" +# "InviteRedeemUrl" = "https://login.microsoftonline.com/redeem?rd=https%3a%2f%2finvitations.microsoft.com%2fredeem%2f%3ftenant%3dd5aec55f-2d12-4442-8d2f-ccca95d4390e%26user%3d3135a58d-b417-40ae-bb44-a82df52b7957%26ticket%3dzbiyasVbMTkRKVom98YD%25252fOJvkr2WRQsI2Om6Z62TDYg%25253d%26ver%3d2.0" +# "InviteRedirectUrl" = "http://myapps.contoso.com/" +# "InvitedUser" = @{ +# "AboutMe" = "" +# "AccountEnabled" = "" +# "Activities" = "" +# "AgeGroup" = "" +# "AgreementAcceptances" = "" +# "AppRoleAssignments" = "" +# "AssignedLicenses" = "" +# "AssignedPlans" = "" +# "Authentication" = "" +# "AuthorizationInfo" = "" +# "Birthday" = "" +# "BusinessPhones" = "" +# "Calendar" = "" +# "CalendarGroups" = "" +# "CalendarView" = "" +# "Calendars" = "" +# "Chats" = "" +# "City" = "" +# "CompanyName" = "" +# "ConsentProvidedForMinor" = "" +# "ContactFolders" = "" +# "Contacts" = "" +# "Country" = "" +# "CreatedDateTime" = "" +# "CreatedObjects" = "" +# "CreationType" = "" +# "CustomSecurityAttributes" = "" +# "DeletedDateTime" = "" +# "Department" = "" +# "DeviceEnrollmentLimit" = "" +# "DeviceManagementTroubleshootingEvents" = "" +# "DirectReports" = "" +# "DisplayName" = "" +# "Drive" = "" +# "Drives" = "" +# "EmployeeExperience" = "" +# "EmployeeHireDate" = "" +# "EmployeeId" = "" +# "EmployeeLeaveDateTime" = "" +# "EmployeeOrgData" = "" +# "EmployeeType" = "" +# "Events" = "" +# "Extensions" = "" +# "ExternalUserState" = "" +# "ExternalUserStateChangeDateTime" = "" +# "FaxNumber" = "" +# "FollowedSites" = "" +# "GivenName" = "" +# "HireDate" = "" +# "Id" = "bbbbbbbb-1111-2222-3333-cccccccccccc" +# "Identities" = "" +# "ImAddresses" = "" +# "InferenceClassification" = "" +# "Insights" = "" +# "Interests" = "" +# "IsResourceAccount" = "" +# "JobTitle" = "" +# "JoinedTeams" = "" +# "LastPasswordChangeDateTime" = "" +# "LegalAgeGroupClassification" = "" +# "LicenseAssignmentStates" = "" +# "LicenseDetails" = "" +# "Mail" = "" +# "MailFolders" = "" +# "MailNickname" = "" +# "MailboxSettings" = "" +# "ManagedAppRegistrations" = "" +# "ManagedDevices" = "" +# "Manager" = "" +# "MemberOf" = "" +# "Messages" = "" +# "MobilePhone" = "" +# "MySite" = "" +# "Oauth2PermissionGrants" = "" +# "OfficeLocation" = "" +# "OnPremisesDistinguishedName" = "" +# "OnPremisesDomainName" = "" +# "OnPremisesExtensionAttributes" = "" +# "OnPremisesImmutableId" = "" +# "OnPremisesLastSyncDateTime" = "" +# "OnPremisesProvisioningErrors" = "" +# "OnPremisesSamAccountName" = "" +# "OnPremisesSecurityIdentifier" = "" +# "OnPremisesSyncEnabled" = "" +# "OnPremisesUserPrincipalName" = "" +# "Onenote" = "" +# "OnlineMeetings" = "" +# "OtherMails" = "" +# "Outlook" = "" +# "OwnedDevices" = "" +# "OwnedObjects" = "" +# "PasswordPolicies" = "" +# "PasswordProfile" = "" +# "PastProjects" = "" +# "People" = "" +# "PermissionGrants" = "" +# "Photo" = "" +# "Photos" = "" +# "Planner" = "" +# "PostalCode" = "" +# "PreferredDataLocation" = "" +# "PreferredLanguage" = "" +# "PreferredName" = "" +# "Presence" = "" +# "Print" = "" +# "ProvisionedPlans" = "" +# "ProxyAddresses" = "" +# "RegisteredDevices" = "" +# "Responsibilities" = "" +# "Schools" = "" +# "ScopedRoleMemberOf" = "" +# "SecurityIdentifier" = "" +# "ServiceProvisioningErrors" = "" +# "Settings" = "" +# "ShowInAddressList" = "" +# "SignInActivity" = "" +# "SignInSessionsValidFromDateTime" = "" +# "Skills" = "" +# "State" = "" +# "StreetAddress" = "" +# "Surname" = "" +# "Teamwork" = "" +# "Todo" = "" +# "TransitiveMemberOf" = "" +# "UsageLocation" = "" +# "UserPrincipalName" = "SawyerM@contoso.com" +# "UserType" = "Guest" +# } +# "InvitedUserDisplayName" = "" +# "InvitedUserEmailAddress" = "SawyerM@contoso.com" +# "InvitedUserMessageInfo" = @{ +# "CcRecipients" = [System.Object]@() +# "CustomizedMessageBody" = "" +# "MessageLanguage" = "" +# } +# "InvitedUserType" = "Guest" +# "ResetRedemption" = $false +# "SendInvitationMessage" = $true +# "Status" = "PendingAcceptance" +# "AdditionalProperties" = @{ +# "@odata.context" = "https://graph.microsoft.com/v1.0/$metadata#invitations/$entity" +# } +# "Parameters" = $args +# } +# ) +# } +# Mock -CommandName New-MgInvitation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +# } -Describe "New-EntraInvitation" { - Context "Test for New-EntraInvitation" { - It "Should invite a new external user to your directory" { - $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" - $result | Should -Not -BeNullOrEmpty - $result.Id | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - $result.Status | Should -Be "PendingAcceptance" - $result.InvitedUser.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - $result.InvitedUser.UserPrincipalName | Should -Be "SawyerM@contoso.com" - $result.InvitedUser.UserType | Should -Be "Guest" - $result.InvitedUserEmailAddress | Should -Be "SawyerM@contoso.com" - $result.InvitedUserType | Should -Be "Guest" - $result.ResetRedemption | Should -Be $false - $result.SendInvitationMessage | Should -Be $true - $result.InvitedUserDisplayName | Should -BeNullOrEmpty +# Describe "New-EntraInvitation" { +# Context "Test for New-EntraInvitation" { +# It "Should invite a new external user to your directory" { +# $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" +# $result | Should -Not -BeNullOrEmpty +# $result.Id | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" +# $result.Status | Should -Be "PendingAcceptance" +# $result.InvitedUser.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" +# $result.InvitedUser.UserPrincipalName | Should -Be "SawyerM@contoso.com" +# $result.InvitedUser.UserType | Should -Be "Guest" +# $result.InvitedUserEmailAddress | Should -Be "SawyerM@contoso.com" +# $result.InvitedUserType | Should -Be "Guest" +# $result.ResetRedemption | Should -Be $false +# $result.SendInvitationMessage | Should -Be $true +# $result.InvitedUserDisplayName | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Graph.Entra -Times 1 - } +# Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Graph.Entra -Times 1 +# } - It "Should fail when parameters are empty" { - { New-EntraInvitation -InvitedUserEmailAddress -SendInvitationMessage -InviteRedirectUrl } | Should -Throw "Missing an argument for parameter*" - } +# It "Should fail when parameters are empty" { +# { New-EntraInvitation -InvitedUserEmailAddress -SendInvitationMessage -InviteRedirectUrl } | Should -Throw "Missing an argument for parameter*" +# } - It "Should fail when InviteRedirectUrl parameter are Invalid" { - { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "" } | Should -Throw "Cannot bind argument to parameter 'InviteRedirectUrl' because it is an empty string." - } +# It "Should fail when InviteRedirectUrl parameter are Invalid" { +# { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "" } | Should -Throw "Cannot bind argument to parameter 'InviteRedirectUrl' because it is an empty string." +# } - It "Should fail when SendInvitationMessage parameter are Invalid" { - { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage "123" -InviteRedirectUrl "http://myapps.contoso.com" } | Should -Throw "Cannot process argument transformation on parameter*" - } +# It "Should fail when SendInvitationMessage parameter are Invalid" { +# { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage "123" -InviteRedirectUrl "http://myapps.contoso.com" } | Should -Throw "Cannot process argument transformation on parameter*" +# } - It "Should fail when InvitedUserEmailAddress parameter are Invalid" { - { New-EntraInvitation -InvitedUserEmailAddress "" -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" } | Should -Throw "Cannot bind argument to parameter 'InvitedUserEmailAddress' because it is an empty string." - } +# It "Should fail when InvitedUserEmailAddress parameter are Invalid" { +# { New-EntraInvitation -InvitedUserEmailAddress "" -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" } | Should -Throw "Cannot bind argument to parameter 'InvitedUserEmailAddress' because it is an empty string." +# } - It "Should contain ObjectId in result" { - $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" - $result.ObjectId | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - } +# It "Should contain ObjectId in result" { +# $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" +# $result.ObjectId | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" +# } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraInvitation" - $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" - $result | Should -Not -BeNullOrEmpty - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraInvitation" - Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } - It "Should execute successfully without throwing an error " { - # Disable confirmation prompts - $originalDebugPreference = $DebugPreference - $DebugPreference = 'Continue' +# It "Should contain 'User-Agent' header" { +# $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraInvitation" +# $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" +# $result | Should -Not -BeNullOrEmpty +# $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraInvitation" +# Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { +# $Headers.'User-Agent' | Should -Be $userAgentHeaderValue +# $true +# } +# } +# It "Should execute successfully without throwing an error " { +# # Disable confirmation prompts +# $originalDebugPreference = $DebugPreference +# $DebugPreference = 'Continue' - try { - # Act & Assert: Ensure the function doesn't throw an exception - { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" -Debug } | Should -Not -Throw - } finally { - # Restore original confirmation preference - $DebugPreference = $originalDebugPreference - } - } - } -} +# try { +# # Act & Assert: Ensure the function doesn't throw an exception +# { New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" -Debug } | Should -Not -Throw +# } finally { +# # Restore original confirmation preference +# $DebugPreference = $originalDebugPreference +# } +# } +# } +# } diff --git a/testVNext/Entra/Reports/Entra.Tests.ps1 b/testVNext/Entra/Reports/Entra.Tests.ps1 deleted file mode 100644 index 51b69725fe..0000000000 --- a/testVNext/Entra/Reports/Entra.Tests.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ - Import-Module .\bin\Microsoft.Graph.Entra.Reports.psd1 -Force -} - -Import-Module Pester - -$psmPath = (Get-Module Microsoft.Graph.Entra.Reports).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" - -$testOutputFile = "$testReportPath\TestResults.xml" -if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} - -$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } - -$config = New-PesterConfiguration -$config.Run.Path = $mockScripts -$config.Run.PassThru = $true -$config.Run.Exit = $true -$config.CodeCoverage.Enabled = $true -$config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath -$config.TestResult.Enabled = $true -$config.TestResult.OutputPath = $testOutputFile -$config.Output.Verbosity = "Detailed" - -Invoke-Pester -Configuration $config diff --git a/testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 b/testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 index e18155a03a..8b98d25284 100644 --- a/testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 +++ b/testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Reports) -eq $null) { Import-Module Microsoft.Graph.Entra.Reports } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraAuditDirectoryLog with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 b/testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 index 4334a5845b..4efece827a 100644 --- a/testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 +++ b/testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Reports) -eq $null) { Import-Module Microsoft.Graph.Entra.Reports } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraAuditSignInLog with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/Entra/Reports/Valid.Tests.ps1 b/testVNext/Entra/Reports/Valid.Tests.ps1 index 808f8a92b7..efe88f1a52 100644 --- a/testVNext/Entra/Reports/Valid.Tests.ps1 +++ b/testVNext/Entra/Reports/Valid.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll{ if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ Import-Module Microsoft.Graph.Entra.Reports } - Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force $module = Get-Module -Name Microsoft.Graph.Entra.Reports } @@ -20,7 +20,7 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) - if($params.count -eq 1 -and $params -eq 'Id'){ + if(($params -eq 'Id') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'Id')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { @@ -58,7 +58,7 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) - if($params.count -eq 1 -and $params -eq 'ObjectId'){ + if(($params -eq 'ObjectId') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'ObjectId')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { diff --git a/testVNext/Entra/SignIns/Entra.Tests.ps1 b/testVNext/Entra/SignIns/Entra.Tests.ps1 deleted file mode 100644 index e6b0c31795..0000000000 --- a/testVNext/Entra/SignIns/Entra.Tests.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force -} - -Import-Module Pester - -$psmPath = (Get-Module Microsoft.Graph.Entra).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" - -$testOutputFile = "$testReportPath\TestResults.xml" -if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} - -$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } - -$config = New-PesterConfiguration -$config.Run.Path = $mockScripts -$config.Run.PassThru = $true -$config.Run.Exit = $true -$config.CodeCoverage.Enabled = $true -$config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath -$config.TestResult.Enabled = $true -$config.TestResult.OutputPath = $testOutputFile -$config.Output.Verbosity = "Detailed" - -Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 index f327dcf44d..8c263652fe 100644 --- a/testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -30,7 +30,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Get-EntraAuthorizationPolicy" { @@ -48,14 +48,14 @@ Describe "Get-EntraAuthorizationPolicy" { $result.AllowedToUseSspr | should -Be $True $result.BlockMsolPowerShell | should -Be $True - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should return AuthorizationPolicy when passed Id" { $result = Get-EntraAuthorizationPolicy -Id 'authorizationPolicy' $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'authorizationPolicy' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id is invalid" { {Get-EntraAuthorizationPolicy -Id ''} | Should -Throw 'Exception calling "Substring" with "2" argument*' @@ -68,7 +68,7 @@ Describe "Get-EntraAuthorizationPolicy" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'AuthorizationPolicy' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraAuthorizationPolicy -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -80,7 +80,7 @@ Describe "Get-EntraAuthorizationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuthorizationPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 index aeeb700155..2df798c937 100644 --- a/testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -39,7 +39,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Get-EntraConditionalAccessPolicy" { @@ -52,7 +52,7 @@ Describe "Get-EntraConditionalAccessPolicy" { $result.DisplayName | Should -Be "MFA policy" $result.State | Should -Be "enabled" - Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should retrieves a list of all conditional access policies in Microsoft Entra ID" { @@ -61,7 +61,7 @@ Describe "Get-EntraConditionalAccessPolicy" { $result.Id | Should -Contain "aaaaaaaa-1111-2222-3333-ccccccccccc" $result.ObjectId | Should -Contain "aaaaaaaa-1111-2222-3333-ccccccccccc" - Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Property parameter should work" { @@ -94,7 +94,7 @@ Describe "Get-EntraConditionalAccessPolicy" { $result = Get-EntraConditionalAccessPolicy -PolicyId "aaaaaaaa-1111-2222-3333-ccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraConditionalAccessPolicy" - Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 index 08cd32dee6..420ed9c003 100644 --- a/testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 index 39a158c217..5c839ba397 100644 --- a/testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Get-EntraIdentityProvider" { @@ -36,7 +36,7 @@ Context "Test for Get-EntraIdentityProvider" { $result.DisplayName | Should -Be "Mock-App" $result.identityProviderType | Should -Be "Google" - Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should return specific identity provider with alias" { $result = Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" @@ -45,7 +45,7 @@ Context "Test for Get-EntraIdentityProvider" { $result.DisplayName | Should -Be "Mock-App" $result.identityProviderType | Should -Be "Google" - Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Get-EntraIdentityProvider -IdentityProviderBaseId } | Should -Throw "Missing an argument for parameter 'IdentityProviderBaseId'*" @@ -70,7 +70,7 @@ Context "Test for Get-EntraIdentityProvider" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -82,7 +82,7 @@ Context "Test for Get-EntraIdentityProvider" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraIdentityProvider" - Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 index 44603b282c..0cb7353576 100644 --- a/testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Get-EntraOAuth2PermissionGrant" { @@ -35,7 +35,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $result.PrincipalId | Should -BeNullOrEmpty $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should return All Group AppRole Assignment" { $result = Get-EntraOAuth2PermissionGrant -All @@ -46,7 +46,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when All is invalid" { { Get-EntraOAuth2PermissionGrant -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -60,7 +60,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Top is empty" { { Get-EntraOAuth2PermissionGrant -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -77,7 +77,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $result | Should -Not -BeNullOrEmpty $result.ConsentType | Should -Be 'AllPrincipals' - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraOAuth2PermissionGrant -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -90,7 +90,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraOAuth2PermissionGrant" - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 index ef9361ca2c..e8a95c2858 100644 --- a/testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -20,20 +20,20 @@ BeforeAll { ) } - Mock -CommandName Get-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns - Mock -CommandName Get-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Get-EntraPermissionGrantConditionSet"{ It "Should not return empty object for condition set 'includes'"{ $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should not return empty object for condition set 'excludes'"{ $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { { Get-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType "" -Id ""} | Should -Throw "Cannot bind argument to parameter*" @@ -56,7 +56,7 @@ Describe "Get-EntraPermissionGrantConditionSet"{ $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { @@ -67,7 +67,7 @@ Describe "Get-EntraPermissionGrantConditionSet"{ $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPermissionGrantConditionSet" - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 index 1a2147369d..0a005309f7 100644 --- a/testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Get-EntraPermissionGrantPolicy" { @@ -31,7 +31,7 @@ Describe "Get-EntraPermissionGrantPolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "microsoft-all-application-permissions" - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Get-EntraPermissionGrantPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -53,7 +53,7 @@ Describe "Get-EntraPermissionGrantPolicy" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'All application' - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -66,7 +66,7 @@ Describe "Get-EntraPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPermissionGrantPolicy" - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 index 50e32a259b..2dd83a26f3 100644 --- a/testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 @@ -3,11 +3,11 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $ScriptBlock = { @@ -42,7 +42,7 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Get-EntraPolicy" { Context "Test for Get-EntraPolicy" { @@ -52,20 +52,20 @@ Describe "Get-EntraPolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should return all Policies" { $result = Get-EntraPolicy -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should return all Policy" { $result = Get-EntraPolicy -Top 1 $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id is invalid" { { Get-EntraPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -87,7 +87,7 @@ Describe "Get-EntraPolicy" { $result = Get-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 b/testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 index 299af79aab..239e7c7ddb 100644 --- a/testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 +++ b/testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @{ @@ -40,20 +40,20 @@ BeforeAll { } - Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra.SignIns - Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Get-EntraTrustedCertificateAuthority"{ It "Result should not be empty when no parameter passed" { $result = Get-EntraTrustedCertificateAuthority $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Result should not be empty when parameters are empty" { $result = Get-EntraTrustedCertificateAuthority -TrustedIssuer '' -TrustedIssuerSki '' $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Property parameter should work" { $result = Get-EntraTrustedCertificateAuthority -Property TrustedIssuerSki @@ -70,7 +70,7 @@ Describe "Get-EntraTrustedCertificateAuthority"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTrustedCertificateAuthority" Get-EntraTrustedCertificateAuthority $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTrustedCertificateAuthority" - Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Invalid.Tests.ps1 b/testVNext/Entra/SignIns/Invalid.Tests.ps1 index 6d5381a100..a3c5cd01a1 100644 --- a/testVNext/Entra/SignIns/Invalid.Tests.ps1 +++ b/testVNext/Entra/SignIns/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ + Import-Module Microsoft.Graph.Entra.SignIns } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/testVNext/Entra/SignIns/Module.Tests.ps1 b/testVNext/Entra/SignIns/Module.Tests.ps1 index cc40ad720b..46b6aad654 100644 --- a/testVNext/Entra/SignIns/Module.Tests.ps1 +++ b/testVNext/Entra/SignIns/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra Module" { +Describe "Microsoft.Graph.Entra.SignIns Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.SignIns $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.SignIns $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.SignIns + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.SignIns.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.SignIns $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Graph.Entra.SignIns -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 index 302e5e5575..8a3ad5b7dd 100644 --- a/testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -39,7 +39,7 @@ BeforeAll { } ) } - Mock -CommandName New-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "New-EntraConditionalAccessPolicy" { @@ -62,7 +62,7 @@ Describe "New-EntraConditionalAccessPolicy" { $result.State | Should -Be "enabled" - Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when DisplayName parameter is empty" { @@ -110,7 +110,7 @@ Describe "New-EntraConditionalAccessPolicy" { $params = Get-Parameters -data $result.Parameters $params.Conditions.Users.IncludeUsers | Should -Be "all" - Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should contain BuiltInControls in parameters when passed GrantControls to it" { @@ -128,7 +128,7 @@ Describe "New-EntraConditionalAccessPolicy" { $params = Get-Parameters -data $result.Parameters $params.GrantControls.BuiltInControls | Should -Be "mfa" - Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should contain 'User-Agent' header" { @@ -145,7 +145,7 @@ Describe "New-EntraConditionalAccessPolicy" { $result = New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -State "Enabled" -Conditions $conditions -GrantControls $controls -SessionControls $SessionControls $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraConditionalAccessPolicy" - Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 index 3edbe82973..e2f797bf06 100644 --- a/testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 index cd8cc17d41..55e2b4c5fe 100644 --- a/testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName New-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "New-EntraIdentityProvider" { @@ -36,7 +36,7 @@ Context "Test for New-EntraIdentityProvider" { $result.DisplayName | Should -Be "Mock-App" $result.identityProviderType | Should -Be "Google" - Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Type is empty" { { New-EntraIdentityProvider -Type -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" } | Should -Throw "Missing an argument for parameter 'Type'*" @@ -87,7 +87,7 @@ Context "Test for New-EntraIdentityProvider" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraIdentityProvider" - Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 index 69b58b6e2e..2e4a996a08 100644 --- a/testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -28,7 +28,7 @@ BeforeAll { ) } - Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "New-EntraNamedLocationPolicy" { @@ -42,7 +42,7 @@ Context "Test for New-EntraNamedLocationPolicy" { $result.DisplayName | Should -Be "Mock-App policies" $result.CreatedDateTime | Should -Be "14-05-2024 09:38:07" - Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when OdataType is empty" { { New-EntraNamedLocationPolicy -OdataType } | Should -Throw "Missing an argument for parameter 'OdataType'*" @@ -81,7 +81,7 @@ Context "Test for New-EntraNamedLocationPolicy" { $result.ObjectId | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } It "Should contain @odata.type in bodyparameters when passed OdataId to it" { - Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns $ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange $ipRanges.cidrAddress = "6.5.4.1/30" @@ -98,7 +98,7 @@ Context "Test for New-EntraNamedLocationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraNamedLocationPolicy" - Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 index f5ec1c445d..4af685ac8e 100644 --- a/testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -20,7 +20,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "New-EntraOauth2PermissionGrant" { @@ -33,7 +33,7 @@ Describe "New-EntraOauth2PermissionGrant" { $result.ResourceId | should -Be "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" $result.Scope | should -Be "DelegatedPermissionGrant.ReadWrite.All" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when ClientId is invalid" { { New-EntraOauth2PermissionGrant -ClientId "" } | Should -Throw "Cannot bind argument to parameter 'ClientId'*" @@ -58,7 +58,7 @@ Describe "New-EntraOauth2PermissionGrant" { $result = New-EntraOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraOauth2PermissionGrant" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 index 46bc3fd7cf..1a89cfb3f5 100644 --- a/testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -22,20 +22,20 @@ BeforeAll { ) } - Mock -CommandName New-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns - Mock -CommandName New-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "New-EntraPermissionGrantConditionSet"{ It "Should not return empty object for condition set 'includes'"{ $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -PermissionType "delegated" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should not return empty object for condition set 'excludes'"{ $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "excludes" -PermissionType "delegated" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { { New-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType ""} | Should -Throw "Cannot bind argument to parameter*" @@ -53,7 +53,7 @@ Describe "New-EntraPermissionGrantConditionSet"{ $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -PermissionType "delegated" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPermissionGrantConditionSet" - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 index 7151be40db..a240228529 100644 --- a/testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName New-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "New-EntraPermissionGrantPolicy" { @@ -35,7 +35,7 @@ Describe "New-EntraPermissionGrantPolicy" { $result.Includes | should -Be @("22cc22cc-dd33-ee44-ff55-66aa66aa66aa") $result.DeletedDateTime | should -Be "2/8/2024 6:39:16 AM" - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { New-EntraPermissionGrantPolicy -Id -DisplayName "MyNewPermissionGrantPolicy" -Description "My new permission grant policy" } | Should -Throw "Missing an argument for parameter 'Id'.*" @@ -58,7 +58,7 @@ Describe "New-EntraPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPermissionGrantPolicy" - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 index 24afef76df..4500f49c6d 100644 --- a/testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { #Write-Host "Mocking New-EntraPolicy with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -20,7 +20,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "New-EntraPolicy" { @@ -35,7 +35,7 @@ Describe "New-EntraPolicy" { $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" $result.IsOrganizationDefault | should -Be "False" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when parameters are invalid" { { New-EntraPolicy -Definition "" -DisplayName "" -Type "" -IsOrganizationDefault "" -AlternativeIdentifier "" } | Should -Throw "Cannot bind argument to parameter*" @@ -52,7 +52,7 @@ Describe "New-EntraPolicy" { $result = New-EntraPolicy -Definition @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://xyz.xmlsoap.org/ws/2005/05/pqr/claims/name\",\"JwtClaimType\":\"xyz\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://xxx.yyy.com/identity/claims/displayname\",\"JwtClaimType\":\"ppp\"}]}}" ], "displayName": "test Claims Issuance Policy", "isOrganizationDefault": false }') -DisplayName "Claimstest" -Type "claimsMappingPolicies" -IsOrganizationDefault $false -AlternativeIdentifier "1f587daa-d6fc-433f-88ee-ccccccccc111" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 b/testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 index c62e83ef5b..c1a1fdcf3f 100644 --- a/testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 +++ b/testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $tenantObj = { @@ -17,7 +17,7 @@ BeforeAll { } - Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra.SignIns $scriptblock = { return @( @@ -37,7 +37,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns $scriptblock2 = { return @( @@ -55,7 +55,7 @@ BeforeAll { } - Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra.SignIns } @@ -78,7 +78,7 @@ Describe "New-EntraTrustedCertificateAuthority" { $result.certificateAuthorities.AuthorityType| Should -Be "RootAuthority" $result.certificateAuthorities.TrustedIssuerSki| Should -Be "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { @@ -105,7 +105,7 @@ Describe "New-EntraTrustedCertificateAuthority" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraTrustedCertificateAuthority" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 index dc181dba8e..83fa25c7ea 100644 --- a/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } diff --git a/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 index c7e05c4ec2..1af8be8fe6 100644 --- a/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } diff --git a/testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 index 3e37fa4d91..54e1a2fff3 100644 --- a/testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgIdentityProvider -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgIdentityProvider -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Remove-EntraIdentityProvider" { @@ -17,13 +17,13 @@ Context "Test for Remove-EntraIdentityProvider" { $result = Remove-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraIdentityProvider -Id "Google-OAUTH" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Remove-EntraIdentityProvider -IdentityProviderBaseId } | Should -Throw "Missing an argument for parameter 'IdentityProviderBaseId'*" @@ -32,7 +32,7 @@ Context "Test for Remove-EntraIdentityProvider" { { Remove-EntraIdentityProvider -IdentityProviderBaseId "" } | Should -Throw "Cannot bind argument to parameter 'IdentityProviderBaseId' because it is an empty string." } It "Should contain IdentityProviderBaseId in parameters when passed IdentityProviderBaseId to it" { - Mock -CommandName Remove-MgIdentityProvider -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgIdentityProvider -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Remove-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Context "Test for Remove-EntraIdentityProvider" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraIdentityProvider" - Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 index f4e169c200..6bcfd858b1 100644 --- a/testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Remove-EntraNamedLocationPolicy" { @@ -16,7 +16,7 @@ Describe "Remove-EntraNamedLocationPolicy" { $result = Remove-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when PolicyId is empty" { { Remove-EntraNamedLocationPolicy -PolicyId } | Should -Throw "Missing an argument for parameter 'PolicyId'*" @@ -25,7 +25,7 @@ Describe "Remove-EntraNamedLocationPolicy" { { Remove-EntraNamedLocationPolicy -PolicyId "" } | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string*" } It "Should contain NamedLocationId in parameters when passed PolicyId to it" { - Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Remove-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" $params = Get-Parameters -data $result @@ -38,7 +38,7 @@ Describe "Remove-EntraNamedLocationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraNamedLocationPolicy" - Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 index de2afed6a9..8589509a8a 100644 --- a/testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Remove-EntraGroupAppRoleAssignment" { @@ -16,7 +16,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { $result = Remove-EntraOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when ObjectId is empty" { { Remove-EntraOAuth2PermissionGrant -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" @@ -25,7 +25,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { { Remove-EntraOAuth2PermissionGrant -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." } It "Should contain OAuth2PermissionGrantId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Remove-EntraOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -38,7 +38,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraOAuth2PermissionGrant" - Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 index 977cc18285..0294c62d38 100644 --- a/testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 @@ -2,14 +2,14 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns - Mock -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Remove-EntraPermissionGrantConditionSet"{ @@ -18,14 +18,14 @@ Describe "Remove-EntraPermissionGrantConditionSet"{ $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should delete a permission grant condition set 'excludes' from a policy"{ $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "excludes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when PolicyId parameter are invalid when ConditionSetType is includes" { @@ -69,7 +69,7 @@ Describe "Remove-EntraPermissionGrantConditionSet"{ } It "Should contain PermissionGrantPolicyId in parameters when passed PolicyId to it" { - Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" $params = Get-Parameters -data $result @@ -77,7 +77,7 @@ Describe "Remove-EntraPermissionGrantConditionSet"{ } It "Should contain PermissionGrantConditionSetId in parameters when passed Id to it" { - Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" $params = Get-Parameters -data $result @@ -91,7 +91,7 @@ Describe "Remove-EntraPermissionGrantConditionSet"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPermissionGrantConditionSet" - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 index 09ea4413ef..e1d72017a6 100644 --- a/testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Remove-EntraPermissionGrantPolicy" { @@ -16,7 +16,7 @@ Describe "Remove-EntraPermissionGrantPolicy" { $result = Remove-EntraPermissionGrantPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Remove-EntraPermissionGrantPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -25,7 +25,7 @@ Describe "Remove-EntraPermissionGrantPolicy" { { Remove-EntraPermissionGrantPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string*" } It "Should contain PermissionGrantPolicyId in parameters when passed Id to it" { - Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Remove-EntraPermissionGrantPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $params = Get-Parameters -data $result @@ -38,7 +38,7 @@ Describe "Remove-EntraPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPermissionGrantPolicy" - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 index 65926d67a2..6d54d86cb8 100644 --- a/testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 @@ -3,11 +3,11 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $ScriptBlock = { @@ -18,13 +18,13 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Test for Remove-EntraPolicy" { It "Should return empty object" { $result = Remove-EntraPolicy -Id bbbbbbbb-1111-1111-1111-cccccccccccc #$result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 2 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 2 } It "Should fail when -Id is empty" { { Remove-EntraPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" @@ -40,7 +40,7 @@ Describe "Test for Remove-EntraPolicy" { $result = Remove-EntraPolicy -Id bbbbbbbb-1111-1111-1111-cccccccccccc $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 b/testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 index 47d7725208..25a1aff3ce 100644 --- a/testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 +++ b/testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -17,7 +17,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns $scriptblock2 = { @@ -37,7 +37,7 @@ BeforeAll { } - Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra.SignIns $scriptblock3 = { return @( @@ -48,7 +48,7 @@ BeforeAll { } - Mock -CommandName Get-MgContext -MockWith $scriptblock3 -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgContext -MockWith $scriptblock3 -ModuleName Microsoft.Graph.Entra.SignIns } @@ -59,7 +59,7 @@ Describe "Remove-EntraTrustedCertificateAuthority" { $result = Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when CertificateAuthorityInformation is empty" { @@ -77,7 +77,7 @@ Describe "Remove-EntraTrustedCertificateAuthority" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraTrustedCertificateAuthority" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 index ae84ebcfef..08a27b7564 100644 --- a/testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgPolicyAuthorizationPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgPolicyAuthorizationPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Set-EntraAuthorizationPolicy" { @@ -20,7 +20,7 @@ Describe "Set-EntraAuthorizationPolicy" { $result = Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions $false -AllowedToUseSSPR $false -AllowEmailVerifiedUsersToJoinOrganization $true -BlockMsolPowerShell $true -DefaultUserRolePermissions $DefaultUserRolePermissions -Description "test" -DisplayName "Authorization Policies" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when AllowedToSignUpEmailBasedSubscriptions is invalid" { { Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions 'a' } | Should -Throw "Cannot process argument transformation on parameter 'AllowedToSignUpEmailBasedSubscriptions'.*" @@ -69,7 +69,7 @@ Describe "Set-EntraAuthorizationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAuthorizationPolicy" - Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 index 537dbe2394..fe0d799668 100644 --- a/testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Set-EntraConditionalAccessPolicy" { @@ -19,7 +19,7 @@ Describe "Set-EntraConditionalAccessPolicy" { $result = Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" -State enabled -Conditions $Condition -GrantControls $Controls -SessionControls $SessionControls $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when PolicyId parameter is empty" { @@ -63,7 +63,7 @@ Describe "Set-EntraConditionalAccessPolicy" { } It "Should contain ConditionalAccessPolicyId in parameters when passed PolicyId to it" { - Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" $params = Get-Parameters -data $result @@ -71,7 +71,7 @@ Describe "Set-EntraConditionalAccessPolicy" { } It "Should contain ClientAppTypes in parameters when passed Conditions to it" { - Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet $Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") @@ -81,11 +81,11 @@ Describe "Set-EntraConditionalAccessPolicy" { $params = Get-Parameters -data $result $params.Conditions.ClientAppTypes | Should -Be @("mobileAppsAndDesktopClients","browser") - Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should contain BuiltInControls in parameters when passed GrantControls to it" { - Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet $Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls @@ -96,7 +96,7 @@ Describe "Set-EntraConditionalAccessPolicy" { $params = Get-Parameters -data $result $params.GrantControls.BuiltInControls | Should -Be @("mfa") - Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should contain 'User-Agent' header" { @@ -111,7 +111,7 @@ Describe "Set-EntraConditionalAccessPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraConditionalAccessPolicy" - Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 index 433eee8d93..333b815034 100644 --- a/testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Set-EntraFeatureRolloutPolicy" { @@ -17,7 +17,7 @@ Describe "Set-EntraFeatureRolloutPolicy" { $result = Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -DisplayName 'Feature-Rollout-Policytest' -Description 'Feature-Rollout-test' -IsEnabled $false $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id are invalid" { { Set-EntraFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" @@ -47,7 +47,7 @@ Describe "Set-EntraFeatureRolloutPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraFeatureRolloutPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 index 923eab9ff1..0ad72de98c 100644 --- a/testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Set-EntraNamedLocationPolicy" { @@ -20,7 +20,7 @@ Describe "Set-EntraNamedLocationPolicy" { $result = Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -IpRanges @($ipRanges1,$ipRanges2) -IsTrusted $true -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -CountriesAndRegions @("US","ID","CA") -IncludeUnknownCountriesAndRegions $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when PolicyId is empty" { { Set-EntraNamedLocationPolicy -PolicyId -OdataType "#microsoft.graph.ipNamedLocation" } | Should -Throw "Missing an argument for parameter 'PolicyId'*" @@ -59,7 +59,7 @@ Describe "Set-EntraNamedLocationPolicy" { { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -IncludeUnknownCountriesAndRegions xyz } | Should -Throw "Cannot process argument transformation on parameter 'IncludeUnknownCountriesAndRegions'*" } It "Should contain NamedLocationId in parameters when passed PolicyId to it" { - Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" $params = Get-Parameters -data $result @@ -68,7 +68,7 @@ Describe "Set-EntraNamedLocationPolicy" { It "Should contain @odata.type in bodyparameters when passed OdataId to it" { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" - Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { Write-Host $BodyParameter.AdditionalProperties."@odata.type" | ConvertTo-Json $BodyParameter.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.ipNamedLocation" $true @@ -81,7 +81,7 @@ Describe "Set-EntraNamedLocationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraNamedLocationPolicy" - Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 index ae7c5453e5..4ca67e573b 100644 --- a/testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 +++ b/testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 @@ -1,23 +1,23 @@ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns - Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Set-EntraPermissionGrantConditionSet"{ It "Should return empty object for condition set 'includes'"{ $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should return empty object for condition set 'excludes'"{ $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { { Set-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType "" -Id ""} | Should -Throw "Cannot bind argument to parameter*" @@ -26,27 +26,27 @@ Describe "Set-EntraPermissionGrantConditionSet"{ { Set-EntraPermissionGrantConditionSet -PolicyId -ConditionSetType -Id } | Should -Throw "Missing an argument for parameter*" } It "Should contain parameters for condition set 'includes'" { - Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $params = Get-Parameters -data $result $params.PermissionGrantPolicyId | Should -Be "policy1" $params.PermissionGrantConditionSetId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should contain parameters for condition set 'excludes'" { - Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $params = Get-Parameters -data $result $params.PermissionGrantPolicyId | Should -Be "policy1" $params.PermissionGrantConditionSetId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantConditionSet" $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantConditionSet" - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 index 3cbdfea400..3b497e1cdc 100644 --- a/testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Set-EntraPermissionGrantPolicy" { @@ -16,7 +16,7 @@ Describe "Set-EntraPermissionGrantPolicy" { $result = Set-EntraPermissionGrantPolicy -Id "permission_grant_policy" -Description "test" -DisplayName "Test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Set-EntraPermissionGrantPolicy -Id -Description "test" -DisplayName "Test" } | Should -Throw "Missing an argument for parameter 'Id'.*" @@ -37,7 +37,7 @@ Describe "Set-EntraPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantPolicy" - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 index df702dd389..ee6aee13b7 100644 --- a/testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 +++ b/testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { #Write-Host "Mocking set-EntraPolicy with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -15,7 +15,7 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns } Describe "Test for Set-EntraPolicy" { @@ -23,7 +23,7 @@ Describe "Test for Set-EntraPolicy" { It "Should return empty object" { $result = Set-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when id is empty" { @@ -50,25 +50,11 @@ Describe "Test for Set-EntraPolicy" { Set-EntraPolicy -Id "Engineering_Project" -type "HomeRealmDiscoveryPolicy" - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPolicy" - - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } } - It "Should contain 'User-Agent' header" { - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPartnerInformation" - - Set-EntraPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc - - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPartnerInformation" - - Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { - $Headers.'User-Agent' | Should -Be $userAgentHeaderValue - $true - } - } It "Should execute successfully without throwing an error" { # Disable confirmation prompts $originalDebugPreference = $DebugPreference diff --git a/testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 b/testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 index b14036a060..0d47c7a867 100644 --- a/testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 +++ b/testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $tenantObj = { @@ -17,7 +17,7 @@ BeforeAll { } - Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra.SignIns $scriptblock = { return @( @@ -37,7 +37,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns $scriptblock2 = { return @( @@ -55,7 +55,7 @@ BeforeAll { } - Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra.SignIns } @@ -75,7 +75,7 @@ Describe "Set-EntraTrustedCertificateAuthority" { $result.certificateAuthorities.AuthorityType| Should -Be "RootAuthority" $result.certificateAuthorities.TrustedIssuerSki| Should -Be "E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { @@ -96,7 +96,7 @@ Describe "Set-EntraTrustedCertificateAuthority" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraTrustedCertificateAuthority" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/SignIns/Valid.Tests.ps1 b/testVNext/Entra/SignIns/Valid.Tests.ps1 index 5013e83278..8feeeeb40b 100644 --- a/testVNext/Entra/SignIns/Valid.Tests.ps1 +++ b/testVNext/Entra/SignIns/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ + Import-Module Microsoft.Graph.Entra.SignIns } - Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.SignIns } Describe "Valid parameter Tests"{ @@ -20,23 +20,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) - if($params.count -eq 1 -and $params -eq 'Id'){ + if(($params -eq 'Id') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'Id')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } } catch { @@ -58,23 +58,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) - if($params.count -eq 1 -and $params -eq 'ObjectId'){ + if(($params -eq 'ObjectId') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'ObjectId')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 } } catch { diff --git a/testVNext/Entra/Users/Entra.Tests.ps1 b/testVNext/Entra/Users/Entra.Tests.ps1 deleted file mode 100644 index e6b0c31795..0000000000 --- a/testVNext/Entra/Users/Entra.Tests.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ - -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force -} - -Import-Module Pester - -$psmPath = (Get-Module Microsoft.Graph.Entra).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" - -$testOutputFile = "$testReportPath\TestResults.xml" -if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} - -$mockScripts = Get-ChildItem -Path $mockScriptsPath -Exclude "Entra.Tests.ps1" | ForEach-Object { $_.FullName } - -$config = New-PesterConfiguration -$config.Run.Path = $mockScripts -$config.Run.PassThru = $true -$config.Run.Exit = $true -$config.CodeCoverage.Enabled = $true -$config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath -$config.TestResult.Enabled = $true -$config.TestResult.OutputPath = $testOutputFile -$config.Output.Verbosity = "Detailed" - -Invoke-Pester -Configuration $config \ No newline at end of file diff --git a/testVNext/Entra/Users/Get-EntraUser.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUser.Tests.ps1 index 65533a2a7c..25930ba106 100644 --- a/testVNext/Entra/Users/Get-EntraUser.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUser.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { $valueObject = [PSCustomObject]@{ @@ -48,7 +48,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUser" { @@ -59,7 +59,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should execute successfully with Alias" { @@ -68,7 +68,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should contain 'User-Agent' header" { @@ -79,7 +79,7 @@ Describe "Get-EntraUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUser" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -96,7 +96,7 @@ Describe "Get-EntraUser" { It "Should return all contact" { $result = Get-EntraUser -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -107,7 +107,7 @@ Describe "Get-EntraUser" { $result = Get-EntraUser -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -123,7 +123,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific user by search string" { @@ -131,7 +131,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } @@ -148,7 +148,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 index b9a1578cf9..93c37783e6 100644 --- a/testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -26,7 +26,7 @@ BeforeAll { } - Mock -CommandName Get-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserAppRoleAssignment" { @@ -45,7 +45,7 @@ Describe "Get-EntraUserAppRoleAssignment" { $result.ResourceDisplayName | Should -Be "M365 License Manager" $result.ResourceId | Should -Be "bbbbbbbb-cccc-dddd-2222-333333333333" - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when ObjectId is empty string value" { @@ -60,7 +60,7 @@ Describe "Get-EntraUserAppRoleAssignment" { It "Should return all contact" { $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -71,7 +71,7 @@ Describe "Get-EntraUserAppRoleAssignment" { $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -96,7 +96,7 @@ Describe "Get-EntraUserAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserAppRoleAssignment" - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -108,7 +108,7 @@ Describe "Get-EntraUserAppRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.PrincipalDisplayName | Should -Be "demo" - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 index eef7d273ab..a057e402f8 100644 --- a/testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -49,7 +49,7 @@ BeforeAll { } - Mock -CommandName Get-MgUserCreatedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgUserCreatedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserCreatedObject" { @@ -59,7 +59,7 @@ Describe "Get-EntraUserCreatedObject" { $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific User with alias" { @@ -67,7 +67,7 @@ Describe "Get-EntraUserCreatedObject" { $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -81,7 +81,7 @@ Describe "Get-EntraUserCreatedObject" { It "Should return all contact" { $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -92,7 +92,7 @@ Describe "Get-EntraUserCreatedObject" { $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -117,7 +117,7 @@ Describe "Get-EntraUserCreatedObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserCreatedObject" - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -128,7 +128,7 @@ Describe "Get-EntraUserCreatedObject" { $result | Should -Not -BeNullOrEmpty $result.appDisplayName | Should -Be "Microsoft Graph Command Line Tools" - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 index 0643919d87..463aaec321 100644 --- a/testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ @@ -29,7 +29,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } @@ -41,14 +41,14 @@ Describe "Get-EntraUserDirectReport" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific user direct report with alias" { $result = Get-EntraUserDirectReport -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty" { { Get-EntraUserDirectReport -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" @@ -61,7 +61,7 @@ Describe "Get-EntraUserDirectReport" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All is invalid" { { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -71,7 +71,7 @@ Describe "Get-EntraUserDirectReport" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when top is empty" { { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -84,7 +84,7 @@ Describe "Get-EntraUserDirectReport" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Mock-User" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -115,7 +115,7 @@ Describe "Get-EntraUserDirectReport" { $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserDirectReport" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 index 1cdbc205ec..764b74477e 100644 --- a/testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 @@ -1,8 +1,8 @@ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ @@ -14,7 +14,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserExtension" { Context "Test for Get-EntraUserExtension" { @@ -22,14 +22,14 @@ Describe "Get-EntraUserExtension" { $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should contain 'User-Agent' header" { @@ -37,7 +37,7 @@ Describe "Get-EntraUserExtension" { $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -55,7 +55,7 @@ Describe "Get-EntraUserExtension" { $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 index cd3ec98597..e6baca9901 100644 --- a/testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraUserLicenseDetail with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -22,7 +22,7 @@ BeforeAll { } - Mock -CommandName Get-MgUserLicenseDetail -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgUserLicenseDetail -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserLicenseDetail" { @@ -36,7 +36,7 @@ Describe "Get-EntraUserLicenseDetail" { $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] - should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra -Times 1 + should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific User with alias" { $result = Get-EntraUserLicenseDetail -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -47,7 +47,7 @@ Describe "Get-EntraUserLicenseDetail" { $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] - should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra -Times 1 + should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -68,7 +68,7 @@ Describe "Get-EntraUserLicenseDetail" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8' - Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -81,7 +81,7 @@ Describe "Get-EntraUserLicenseDetail" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserLicenseDetail" - Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 index 0b5a3f4ac3..6419064700 100644 --- a/testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraUserManager with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -32,7 +32,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserManager" { @@ -52,7 +52,7 @@ Describe "Get-EntraUserManager" { $result.identities[0].issuer | Should -Be "contoso.com" $result.identities[0].issuerAssignedId | Should -Be "test@contoso.com" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific User wit alias" { @@ -70,7 +70,7 @@ Describe "Get-EntraUserManager" { $result.identities[0].issuer | Should -Be "contoso.com" $result.identities[0].issuerAssignedId | Should -Be "test@contoso.com" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -95,7 +95,7 @@ Describe "Get-EntraUserManager" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserManager" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -106,7 +106,7 @@ Describe "Get-EntraUserManager" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 index bfeb1489d4..d0dea5239e 100644 --- a/testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -21,7 +21,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgUserMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgUserMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserMembership" { @@ -30,14 +30,14 @@ Describe "Get-EntraUserMembership" { $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific user membership with alias" { $result = Get-EntraUserMembership -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty" { @@ -52,7 +52,7 @@ Describe "Get-EntraUserMembership" { $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -63,7 +63,7 @@ Describe "Get-EntraUserMembership" { $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 5 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -90,7 +90,7 @@ Describe "Get-EntraUserMembership" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { @@ -105,7 +105,7 @@ Describe "Get-EntraUserMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserMembership" - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 index 38367a325e..1d879ef92b 100644 --- a/testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -21,7 +21,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgUserOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgUserOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserOAuth2PermissionGrant" { @@ -32,7 +32,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result.PrincipalId | should -Contain 'aaaaaaaa-bbbb-cccc-1111-222222222222' $result.Id | Should -Contain 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific UserOAuth2PermissionGrant with alias" { @@ -41,7 +41,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result.PrincipalId | should -Contain 'aaaaaaaa-bbbb-cccc-1111-222222222222' $result.Id | Should -Contain 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty" { @@ -56,7 +56,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -67,7 +67,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -95,7 +95,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result | Should -Not -BeNullOrEmpty $result.ConsentType | Should -Be "Principal" - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { @@ -110,7 +110,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOAuth2PermissionGrant" - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 index 6bd8062221..d1e8150bd6 100644 --- a/testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -42,7 +42,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgUserOwnedDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgUserOwnedDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserOwnedDevice" { @@ -54,7 +54,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should get devices owned by a user with alias" { @@ -64,7 +64,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Property parameter should work" { @@ -85,7 +85,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Contain "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -99,7 +99,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Top is empty" { @@ -121,7 +121,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result = Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOwnedDevice" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 index 9682f31217..a9c806ffe2 100644 --- a/testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraUserOwnedObject with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -25,7 +25,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserOwnedObject" { @@ -42,7 +42,7 @@ Describe "Get-EntraUserOwnedObject" { $result.DisplayName | Should -Be "ToGraph_443DEM" - should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific User with alias" { $result = Get-EntraUserOwnedObject -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -56,7 +56,7 @@ Describe "Get-EntraUserOwnedObject" { $result.DisplayName | Should -Be "ToGraph_443DEM" - should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { { Get-EntraUserOwnedObject -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -70,7 +70,7 @@ Describe "Get-EntraUserOwnedObject" { $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -84,7 +84,7 @@ Describe "Get-EntraUserOwnedObject" { It "Should return all contact" { $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -105,7 +105,7 @@ Describe "Get-EntraUserOwnedObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOwnedObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -116,7 +116,7 @@ Describe "Get-EntraUserOwnedObject" { $result | Should -Not -BeNullOrEmpty $result.displayName | Should -Be "ToGraph_443DEM" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 b/testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 index 26faa233c8..21b3855d67 100644 --- a/testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 +++ b/testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -29,7 +29,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgUserRegisteredDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Get-MgUserRegisteredDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Get-EntraUserRegisteredDevice" { @@ -41,7 +41,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific user registered device with alias" { $result = Get-EntraUserRegisteredDevice -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -50,7 +50,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when ObjectlId is empty" { { Get-EntraUserRegisteredDevice -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" @@ -65,7 +65,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when All is invalid" { { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -77,7 +77,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Top is empty" { { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -90,7 +90,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result | Should -Not -BeNullOrEmpty $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -105,7 +105,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result = Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserRegisteredDevice" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Invalid.Tests.ps1 b/testVNext/Entra/Users/Invalid.Tests.ps1 index 6d5381a100..86b4e6e2a0 100644 --- a/testVNext/Entra/Users/Invalid.Tests.ps1 +++ b/testVNext/Entra/Users/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Users)){ + Import-Module Microsoft.Graph.Entra.Users } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/testVNext/Entra/Users/Module.Tests.ps1 b/testVNext/Entra/Users/Module.Tests.ps1 index cc40ad720b..fdfd4009f8 100644 --- a/testVNext/Entra/Users/Module.Tests.ps1 +++ b/testVNext/Entra/Users/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra Module" { +Describe "Microsoft.Graph.Entra.Users Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Users $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Users $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.psm1" + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Users + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Users.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra + $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Users $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Graph.Entra.Users -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/testVNext/Entra/Users/New-EntraUser.Tests.ps1 b/testVNext/Entra/Users/New-EntraUser.Tests.ps1 index 4962cdc172..73965333b1 100644 --- a/testVNext/Entra/Users/New-EntraUser.Tests.ps1 +++ b/testVNext/Entra/Users/New-EntraUser.Tests.ps1 @@ -3,10 +3,10 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -50,7 +50,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "New-EntraUser" { @@ -115,7 +115,7 @@ Describe "New-EntraUser" { $result.ImmutableId | Should -Be "1234567890" $result.Country | Should -Be "USA" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when parameters are empty" { @@ -131,7 +131,7 @@ Describe "New-EntraUser" { $result = New-EntraUser -DisplayName "demo002" -PasswordProfile $PasswordProfile -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraUser" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 index 7374ca91bb..11d35f157d 100644 --- a/testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { #Write-Host "Mocking New-EntraUserAppRoleAssignment with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -30,7 +30,7 @@ BeforeAll { ) } - Mock -CommandName New-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "New-EntraUserAppRoleAssignment" { @@ -66,7 +66,7 @@ Describe "New-EntraUserAppRoleAssignment" { $result.ResourceDisplayName | Should -Be $expectedResult.ResourceDisplayName $result.ResourceId | Should -Be $expectedResult.ResourceId - Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when parameters are empty" { @@ -78,7 +78,7 @@ Describe "New-EntraUserAppRoleAssignment" { } It "Should contain UserId in parameters" { - Mock -CommandName New-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName New-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Users $result = New-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -PrincipalId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -ResourceId 'bbbbbbbb-cccc-dddd-2222-333333333333' -Id '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' $params = Get-Parameters -data $result @@ -94,7 +94,7 @@ Describe "New-EntraUserAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraUserAppRoleAssignment" - Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 b/testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 index 4f631de168..2cf62af69e 100644 --- a/testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 +++ b/testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 @@ -3,13 +3,13 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Users } Describe "Remove-EntraUser" { @@ -17,12 +17,12 @@ Describe "Remove-EntraUser" { It "Should return empty object" { $result = Remove-EntraUser -UserId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraUser -ObjectId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string" { { Remove-EntraUser -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -31,7 +31,7 @@ Describe "Remove-EntraUser" { { Remove-EntraUser -UserId } | Should -Throw "Missing an argument for parameter*" } It "Should contain Id in parameters when passed UserId to it" { - Mock -CommandName Remove-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users $result = Remove-EntraUser -UserId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Remove-EntraUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUser" - Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 b/testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 index fff29e20c6..d69e00ee75 100644 --- a/testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 +++ b/testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Users } Describe "Remove-EntraUserAppRoleAssignment" { @@ -16,7 +16,7 @@ Describe "Remove-EntraUserAppRoleAssignment" { $result = Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when ObjectId is invalid" { @@ -36,7 +36,7 @@ Describe "Remove-EntraUserAppRoleAssignment" { } It "Should contain UserId in parameters" { - Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Users $result = Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraUserAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUserAppRoleAssignment" - Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 b/testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 index 173778b475..390af4bcd0 100644 --- a/testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 +++ b/testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Users } Describe "Remove-EntraUserManager" { @@ -16,12 +16,12 @@ Describe "Remove-EntraUserManager" { It "Should return empty object" { $result = Remove-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraUserManager -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string" { { Remove-EntraUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -30,7 +30,7 @@ Describe "Remove-EntraUserManager" { { Remove-EntraUserManager -UserId } | Should -Throw "Missing an argument for parameter*" } It "Should contain UserId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Remove-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users $result = Remove-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraUserManager" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUserManager" - Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Set-EntraUser.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUser.Tests.ps1 index 1dca943f40..7c6245d4d4 100644 --- a/testVNext/Entra/Users/Set-EntraUser.Tests.ps1 +++ b/testVNext/Entra/Users/Set-EntraUser.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Users } Describe "Set-EntraUser" { @@ -17,7 +17,7 @@ Describe "Set-EntraUser" { $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo002" -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" -PostalCode "10001" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty" { @@ -29,7 +29,7 @@ Describe "Set-EntraUser" { } It "Should contain userId in parameters when passed UserId to it" { - Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -Mobile "1234567890" $params = Get-Parameters -data $result $params.userId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -38,7 +38,7 @@ Describe "Set-EntraUser" { } It "Should contain MobilePhone in parameters when passed Mobile to it" { - Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -Mobile "1234567890" $params = Get-Parameters -data $result $params.MobilePhone | Should -Be "1234567890" @@ -51,7 +51,7 @@ Describe "Set-EntraUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUser" - Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -70,7 +70,7 @@ Describe "Set-EntraUser" { } } It "Should contain ExternalUserState, OnPremisesImmutableId, ExternalUserStateChangeDateTime, BusinessPhones" { - Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users # format like "yyyy-MM-dd HH:mm:ss" $userStateChangedOn = [System.DateTime]::Parse("2015-12-08 15:15:19") diff --git a/testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 index 271e826854..7d92630d82 100644 --- a/testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 +++ b/testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 @@ -2,10 +2,10 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Set-EntraUserLicense with parameters: $($args | ConvertTo-Json -Depth 3)" @@ -29,7 +29,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users } Describe "Set-EntraUserLicense" { @@ -56,7 +56,7 @@ Describe "Set-EntraUserLicense" { $result.businessPhones | Should -Be @("8976546787") $result.surname | Should -Be "KTETSs" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -95,7 +95,7 @@ Describe "Set-EntraUserLicense" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserLicense" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 index f1ad254189..5bd5a7b7a0 100644 --- a/testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 +++ b/testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Set-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Set-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Users } Describe "Set-EntraUserManager" { @@ -16,14 +16,14 @@ Describe "Set-EntraUserManager" { $result = Set-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific User with alias" { $result = Set-EntraUserManager -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -39,7 +39,7 @@ Describe "Set-EntraUserManager" { } It "Should contain UserId in parameters when passed UserId to it" { - Mock -CommandName Set-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Set-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users $result = Set-EntraUserManager -UserId "00001111-aaaa-2222-bbbb-3333cccc4444" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -53,7 +53,7 @@ Describe "Set-EntraUserManager" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserManager" - Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 index 2ea8306538..e3f259d7c1 100644 --- a/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 +++ b/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ - Import-Module Microsoft.Graph.Entra + if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Users } Describe "Set-EntraUserPassword" { @@ -19,7 +19,7 @@ Describe "Set-EntraUserPassword" { $result = Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty" { $userUPN="mock106@M365x99297270.OnMicrosoft.com" @@ -70,7 +70,7 @@ Describe "Set-EntraUserPassword" { { Set-EntraUserPassword -UserId $userUPN -Password $secPassword -EnforceChangePasswordPolicy xyz } | Should -Throw "Cannot process argument transformation on parameter 'EnforceChangePasswordPolicy'*" } It "Should contain ForceChangePasswordNextSignIn in parameters when passed ForceChangePasswordNextLogin to it" { - Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Users $userUPN="mock106@M365x99297270.OnMicrosoft.com" $newPassword="New@12345" @@ -80,7 +80,7 @@ Describe "Set-EntraUserPassword" { $params.PasswordProfile.ForceChangePasswordNextSignIn | Should -Be $true } It "Should contain ForceChangePasswordNextSignInWithMfa in parameters when passed EnforceChangePasswordPolicy to it" { - Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Users $userUPN="mock106@M365x99297270.OnMicrosoft.com" $newPassword="New@12345" @@ -97,7 +97,7 @@ Describe "Set-EntraUserPassword" { $result = Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserPassword" - Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 index 76dc3cc663..0c69ce7dd8 100644 --- a/testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 +++ b/testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra) -eq $null) { - Import-Module Microsoft.Graph.Entra + if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Set-MgUserPhotoContent -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Set-MgUserPhotoContent -MockWith {} -ModuleName Microsoft.Graph.Entra.Users } Describe "Set-EntraUserThumbnailPhoto" { @@ -16,14 +16,14 @@ Describe "Set-EntraUserThumbnailPhoto" { $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should return specific User with alias" { $result = Set-EntraUserThumbnailPhoto -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -39,7 +39,7 @@ Describe "Set-EntraUserThumbnailPhoto" { } It "Should contain UserId in parameters when passed ObjectId to it" { - Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' $params = Get-Parameters -data $result @@ -47,7 +47,7 @@ Describe "Set-EntraUserThumbnailPhoto" { } It "Should contain InFile in parameters" { - Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Graph.Entra + Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' $params = Get-Parameters -data $result @@ -61,7 +61,7 @@ Describe "Set-EntraUserThumbnailPhoto" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserThumbnailPhoto" - Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 b/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 index 9633373541..f1d0495279 100644 --- a/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 +++ b/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll{ if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Users diff --git a/testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 b/testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 index 8984a69096..20e8a811bf 100644 --- a/testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 +++ b/testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblockForAuthenticationMethod = { return @( [PSCustomObject]@{ diff --git a/testVNext/Entra/Users/Valid.Tests.ps1 b/testVNext/Entra/Users/Valid.Tests.ps1 index 5013e83278..f396e57626 100644 --- a/testVNext/Entra/Users/Valid.Tests.ps1 +++ b/testVNext/Entra/Users/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra)){ - Import-Module Microsoft.Graph.Entra + if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Users)){ + Import-Module Microsoft.Graph.Entra.Users } - Import-Module (Join-Path $psscriptroot ".\EntraCmdletsMap.ps1") -Force + Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra + $module = Get-Module -Name Microsoft.Graph.Entra.Users } Describe "Valid parameter Tests"{ @@ -20,23 +20,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | Select-Object -expand Name) - if($params.count -eq 1 -and $params -eq 'Id'){ + if(($params -eq 'Id') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'Id')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Users $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Users $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Users -Times 1 } } catch { @@ -58,23 +58,23 @@ Describe "Valid parameter Tests"{ $command = Get-Command $_ if($command.Name.StartsWith('Remove')){ $params = ($command.ParameterSets.Parameters | Where-Object {$_.IsMandatory -eq $true} | select -expand Name) - if($params.count -eq 1 -and $params -eq 'ObjectId'){ + if(($params -eq 'ObjectId') -or ($params -is [array] -and $params.count -eq 1 -and $params -eq 'ObjectId')){ $filter = $cmdlets | Where-Object { $_.SourceName -eq $command } if($null -ne $filter){ try { Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Users $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Users $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Users -Times 1 } } catch { diff --git a/testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 b/testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 index c9442bfa73..3eeea0f488 100644 --- a/testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 index f77955fbe1..d1b50f31fa 100644 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-MgBetaApplication with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 index 4f148933b0..3e05180639 100644 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @{ diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 index 70e148c709..6948b2f0d4 100644 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 index e29e67e240..32640a785e 100644 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 index 9b43506dca..1ebf8411a6 100644 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 index c02cd441bd..1a7340a586 100644 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 index bdc6c20309..d4dc7d7f1c 100644 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 b/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 index c4ab31f5a5..d3c8905adc 100644 --- a/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ diff --git a/testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 b/testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 index b4af29b260..d36a1c16f9 100644 --- a/testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking New-MgBetaApplication with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 index bbc6eeae68..47fdb0e381 100644 --- a/testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 b/testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 index 0d35d74bee..13a1faf2e4 100644 --- a/testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications } diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 b/testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 index 8781f249e7..d83d815cc0 100644 --- a/testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications } diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 index a922487837..519fd5fb5f 100644 --- a/testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications } diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 b/testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 index 35dd6b6cfe..869025515e 100644 --- a/testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications } diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 b/testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 index bad04d3bf0..88cef370e0 100644 --- a/testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications } diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 index fa408cca19..011a30e326 100644 --- a/testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications } diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 b/testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 index 523f289ea6..f9e18078ef 100644 --- a/testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 +++ b/testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Applications } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications } diff --git a/testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 b/testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 index 2f3860c880..a31127e3fa 100644 --- a/testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 +++ b/testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Authentication) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Authentication } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 index a184441f41..eb22b02d7c 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName New-MgBetaAdministrativeUnitMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index c60190c546..d0603e66b5 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 index e8acda9bc7..9c0de190cc 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 index ec45b2449e..284c6aae99 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 index 81ebc7f329..d54b41bc41 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( @@ -31,8 +31,8 @@ BeforeAll { Describe "Add-EntraBetaScopedRoleMembership" { Context "Test for Add-EntraBetaScopedRoleMembership" { It "Should add a user to the specified role within the specified administrative unit" { - $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo - $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + $RoleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo + $RoleMember.Id = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" $result = Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "zTVcE8KFQ0W4bI9tvt6kz-5AOA62QHJLgnvAbh9Z0r7uQTWi6U_yTLYoEC66749-U" @@ -42,8 +42,8 @@ Describe "Add-EntraBetaScopedRoleMembership" { Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 } It "Should add a user to the specified role within the specified administrative unit with alias" { - $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo - $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + $RoleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo + $RoleMember.Id = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" $result = Add-EntraBetaScopedRoleMembership -ObjectId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "zTVcE8KFQ0W4bI9tvt6kz-5AOA62QHJLgnvAbh9Z0r7uQTWi6U_yTLYoEC66749-U" @@ -71,8 +71,8 @@ Describe "Add-EntraBetaScopedRoleMembership" { { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleMemberInfo "" } | Should -Throw "Cannot process argument transformation on parameter 'RoleMemberInfo'*" } It "Result should contain Alias properties"{ - $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo - $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + $RoleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo + $RoleMember.Id = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" $result = Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember $result.ObjectId | should -Be "zTVcE8KFQ0W4bI9tvt6kz-5AOA62QHJLgnvAbh9Z0r7uQTWi6U_yTLYoEC66749-U" $result.RoleObjectId | should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" @@ -91,8 +91,8 @@ Describe "Add-EntraBetaScopedRoleMembership" { $params.AdministrativeUnitId1 | Should -Be "0e3840ee-40b6-4b72-827b-c06e1f59d2be" } It "Should contain RoleId in parameters when passed RoleObjectId to it" { - $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo - $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + $RoleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo + $RoleMember.Id = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" $result = Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember $params = Get-Parameters -data $result.Parameters @@ -101,8 +101,8 @@ Describe "Add-EntraBetaScopedRoleMembership" { It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaScopedRoleMembership" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaScopedRoleMembership" - $RoleMember = New-Object -TypeName Microsoft.Open.AzureAD.Model.RoleMemberInfo - $RoleMember.ObjectId = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" + $RoleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo + $RoleMember.Id = "a23541ee-4fe9-4cf2-b628-102ebaef8f7e" Add-EntraBetaScopedRoleMembership -AdministrativeUnitId "0e3840ee-40b6-4b72-827b-c06e1f59d2be" -RoleObjectId "135c35cd-85c2-4543-b86c-8f6dbedea4cf" -RoleMemberInfo $RoleMember diff --git a/testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 index 8327788346..02caea1746 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 index 6fb7290881..b83bb56761 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 index 6be278a78e..a3afdbcaa9 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 index 3a5fb08f7e..0af73b9bb5 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 index 5e6c632b19..a50f96b2ec 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 index 0f52650f60..5d25212440 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index 8e2e8077d0..5ba897a74d 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 index 1bf5c7468f..b54a324949 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 index ba0a3e6234..a679a6cc46 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 index 773c09c421..f5aeda00fd 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 index 26084ca3da..83080e7d68 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ configuration = [PSCustomObject]@{ diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 index 0739a1c03d..a9a1ad930b 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 index edbe610dc6..f8b2a5ff44 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 index a3ee8379f3..4b5ba79b96 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 index b4e792feb1..0ec2c20676 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 index 4a34ef2a38..4afa3025f1 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 index d7f0445375..31e48c281c 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 index 8fa04c63e8..7379f832c9 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 index bb8cb15ecd..3a89ac45b9 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 index 850611b972..a74da8f0da 100644 --- a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 index 0e589085c9..830edd06d5 100644 --- a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 index e0d30c3f64..3e7e9db762 100644 --- a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 index a753027de4..a4145e9116 100644 --- a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 index 11922d0478..96aa0016ad 100644 --- a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 index 0eeddc1c21..849dd34b89 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaAdministrativeUnit -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 index c33adb472e..001a22f648 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 index 5f35d47e41..5eff0971a7 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 index 0c8b3f007a..4552ae175d 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 index 8ca3b58974..e9d21155af 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 index 304226c30b..44cbee9ba5 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaDirectorySetting -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 index f8f118eb40..9d0b5721f3 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 index f95918b11a..c085c13761 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaAdministrativeUnit -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 index d303ad1e97..4f7a96dc27 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaDirectoryAttributeSet -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 index 43481545d0..b0de1ebe16 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index 444c82597f..37202db2ab 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 index 3cb14283f4..17b7b8b975 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement } diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 index 2f1237674d..68ab5a687a 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 index 016c06068a..ce8e8fb162 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 index 953213b34a..48bf466feb 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 index ba3835f604..1cf50c7b3f 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 index 4dbe1f0360..256e7834ec 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 index 8b2c6005c8..ab6d3f52de 100644 --- a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 +++ b/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -MockWith { return @{ diff --git a/testVNext/EntraBeta/EntraBeta.Tests.ps1 b/testVNext/EntraBeta/EntraBeta.Tests.ps1 index 1f1342c757..ec17be3e87 100644 --- a/testVNext/EntraBeta/EntraBeta.Tests.ps1 +++ b/testVNext/EntraBeta/EntraBeta.Tests.ps1 @@ -2,15 +2,37 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta)){ - Import-Module Microsoft.Graph.Entra.Beta +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Authentication)){ + Import-Module Microsoft.Graph.Entra.Beta.Authentication -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Applications)){ + Import-Module Microsoft.Graph.Entra.Beta.Applications -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement)){ + Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Governance)){ + Import-Module Microsoft.Graph.Entra.Beta.Governance -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Users)){ + Import-Module Microsoft.Graph.Entra.Beta.Users -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Groups)){ + Import-Module Microsoft.Graph.Entra.Beta.Groups -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Reports)){ + Import-Module Microsoft.Graph.Entra.Beta.Reports -Force +} +if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns)){ + Import-Module Microsoft.Graph.Entra.Beta.SignIns -Force } Import-Module Pester -$psmPath = (Get-Module Microsoft.Graph.Entra.Beta).Path -$testReportPath = join-path $psscriptroot "..\..\..\TestReport\EntraBeta" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\EntraBeta\*.Tests.ps1" +#$psmPath = (Get-Module Microsoft.Graph.Entra.Beta).Path +$ps1FilesPath = join-path $psscriptroot "..\..\moduleVNext\EntraBeta\Microsoft.Graph.Entra" +$testReportPath = join-path $psscriptroot "..\..\TestReport\EntraBeta" +$mockScriptsPath = join-path $psscriptroot "..\..\testVNext\EntraBeta\*\*.Tests.ps1" $testOutputFile = "$testReportPath\TestResults.xml" if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} @@ -23,7 +45,8 @@ $config.Run.PassThru = $true $config.Run.Exit = $true $config.CodeCoverage.Enabled = $false $config.CodeCoverage.CoveragePercentTarget = 100 -$config.CodeCoverage.Path = $psmPath +# $config.CodeCoverage.Path = $psmPath +$config.CodeCoverage.Path = $ps1FilesPath $config.TestResult.Enabled = $true $config.TestResult.OutputPath = $testOutputFile $config.Output.Verbosity = "Detailed" diff --git a/testVNext/EntraBeta/General.Tests.ps1 b/testVNext/EntraBeta/General.Tests.ps1 index 2b618a9554..c9e1aaba5a 100644 --- a/testVNext/EntraBeta/General.Tests.ps1 +++ b/testVNext/EntraBeta/General.Tests.ps1 @@ -1,40 +1,40 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ +# # ------------------------------------------------------------------------------ +# # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# # ------------------------------------------------------------------------------ -BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta - } -} +# BeforeAll { +# if((Get-Module -Name Microsoft.Graph.Entra.Beta) -eq $null){ +# Import-Module Microsoft.Graph.Entra.Beta +# } +# } -Describe 'PowerShell Version Check' { - It 'Version 5.1 or Greater' { - $semanticVersion = $PSVersionTable.PSVersion - $version = $semanticVersion.Major + ($semanticVersion.Minor * 0.1) - $version | Should -BeGreaterOrEqual 5.1 - } -} +# Describe 'PowerShell Version Check' { +# It 'Version 5.1 or Greater' { +# $semanticVersion = $PSVersionTable.PSVersion +# $version = $semanticVersion.Major + ($semanticVersion.Minor * 0.1) +# $version | Should -BeGreaterOrEqual 5.1 +# } +# } -Describe 'Module checks' { - It 'Module imported' { - $module = Get-Module -Name Microsoft.Graph.Entra.Beta - $module | Should -Not -Be $null - } +# Describe 'Module checks' { +# It 'Module imported' { +# $module = Get-Module -Name Microsoft.Graph.Entra.Beta +# $module | Should -Not -Be $null +# } - It 'Have more that zero exported functions' { - $module = Get-Module -Name Microsoft.Graph.Entra.Beta - $module.ExportedCommands.Keys.Count | Should -BeGreaterThan 0 - } +# It 'Have more that zero exported functions' { +# $module = Get-Module -Name Microsoft.Graph.Entra.Beta +# $module.ExportedCommands.Keys.Count | Should -BeGreaterThan 0 +# } - # It 'Known number translated commands' { - # $module = Get-Module -Name Microsoft.Graph.Entra.Beta - # $module.ExportedCommands.Keys.Count | Should -Be 293 - # } +# It 'Known number translated commands' { +# $module = Get-Module -Name Microsoft.Graph.Entra.Beta +# $module.ExportedCommands.Keys.Count | Should -Be 293 +# } - It 'Running a simple command Enable-EntraAzureADAlias'{ - Enable-EntraAzureADAlias - $Alias = Get-Alias -Name Get-AzureADUser - $Alias | Should -Not -Be $null - } -} +# It 'Running a simple command Enable-EntraAzureADAlias'{ +# Enable-EntraAzureADAlias +# $Alias = Get-Alias -Name Get-AzureADUser +# $Alias | Should -Not -Be $null +# } +# } diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 index 289b60554e..b9b8c38831 100644 --- a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 +++ b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 index c2dfc6a6e7..f7e1d0f4b0 100644 --- a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 +++ b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 index 5d7710a138..0c33316eaf 100644 --- a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 +++ b/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 index 0b42d96d6b..0371c31e3e 100644 --- a/testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 +++ b/testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Governance } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Governance diff --git a/testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 b/testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 index cee8e4a61f..1226ef17e9 100644 --- a/testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName New-MgBetaGroupMember -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 b/testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 index f552ab9fc6..54d3053ba4 100644 --- a/testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 index 4ce2e9d6b6..0511fb4ca7 100644 --- a/testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 index 83b4fafb7f..abb9708746 100644 --- a/testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 index 5907b2d7e7..9d9c92ca26 100644 --- a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 index a3211581c4..0bde4799a2 100644 --- a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 index 93d536a23b..e02ba3a561 100644 --- a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 index a716802d8b..7b51502990 100644 --- a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $mockResponse = { return @{ diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 index 432a118416..7cd44e8a28 100644 --- a/testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { # Write-Host "Mocking Get-EntraBetaObjectSetting with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 index 4dea78f464..c8f445e239 100644 --- a/testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 index 1eb1fabee9..82d74bcdea 100644 --- a/testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 index 9cc72a6a1a..816d1c877e 100644 --- a/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 @@ -8,7 +8,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 index bb03351272..a73800fcfd 100644 --- a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 index dc40d8a70c..eab382f6dd 100644 --- a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 index e27ae5a7c6..c9b0dcf3dd 100644 --- a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 index dfed226769..71791befa9 100644 --- a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaGroupMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 index ab54315e40..2f0a568b2b 100644 --- a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 index 0e8ce0d843..16e197c2af 100644 --- a/testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 b/testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 index 3749a856c4..bb994f2f0c 100644 --- a/testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups } diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 index 6db5fdd2bc..547138a569 100644 --- a/testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.Groups } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 b/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 index 12be199832..0a3420c612 100644 --- a/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 +++ b/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 @@ -5,11 +5,11 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Groups } - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force + $TemplateScriptblock = { return @( [PSCustomObject]@{ diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 b/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 index 62aa826f27..51512fa6a3 100644 --- a/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 +++ b/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Reports } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 b/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 index 878b717051..841d8ab180 100644 --- a/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 +++ b/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Reports } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 b/testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 index 2cef546e41..32e410dc56 100644 --- a/testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 +++ b/testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Reports } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 b/testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 index a1d2ae06cf..f8fde9c6ac 100644 --- a/testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 +++ b/testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Reports } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 index 14e4b1b703..069c37d2d3 100644 --- a/testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns } diff --git a/testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 index 1a3faca531..f36eb6778c 100644 --- a/testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 index 4b9b02c251..1f2bc03968 100644 --- a/testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 index a0e46b3226..7200b0957a 100644 --- a/testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 index fd573cc280..7be65c068f 100644 --- a/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 @@ -7,7 +7,7 @@ BeforeAll { Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $ScriptBlock = { diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 index 01341ac7cb..173b576e63 100644 --- a/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 index b1aca81848..31b0df9d78 100644 --- a/testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { diff --git a/testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 index 47613d603f..523c632b45 100644 --- a/testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 b/testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 index 2dd353b59c..9fef2ee19f 100644 --- a/testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 index 1208509634..e6589caaad 100644 --- a/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns } diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 index c49778f5a5..3a8ceb779d 100644 --- a/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns } diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 index e874bb9f16..0964ff8f28 100644 --- a/testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $ScriptBlock = { $response = @{ '@odata.context' = 'https://graph.microsoft.com/v1.0/$metadata#policies/homeRealmDiscoveryPolicies/$entity' diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 index dde44ce750..909c7d7139 100644 --- a/testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 index 1f71e536e8..c4befe3344 100644 --- a/testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaTrustFrameworkPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns } diff --git a/testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 index 0410768c4d..0e05cf9deb 100644 --- a/testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns } diff --git a/testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 b/testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 index 93b1d3af25..3af495e065 100644 --- a/testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 +++ b/testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.SignIns } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { #Write-Host "Mocking set-EntraPolicy with parameters: $($args | ConvertTo-Json -Depth 3)" diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 index 2b249b7270..40e5e605c8 100644 --- a/testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { $valueObject = [PSCustomObject]@{ diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 index 73d53f42b3..e329fc36de 100644 --- a/testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 @@ -2,7 +2,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @{ diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 index 49f8c71574..10ed0626f8 100644 --- a/testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 index 1665170d7d..44d1be83d5 100644 --- a/testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 @@ -2,7 +2,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 index e0f5a78385..23e392d5c8 100644 --- a/testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 index 05acc2b8c8..bd9fed0c3f 100644 --- a/testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 b/testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 index 51e2fea76d..43fe01e921 100644 --- a/testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { return @( diff --git a/testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 b/testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 index 6800d56b01..65f58bd90d 100644 --- a/testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 +++ b/testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { diff --git a/testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 b/testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 index f6883ed06f..5628cffad4 100644 --- a/testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users } diff --git a/testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 b/testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 index 41b58bd16d..0b29232f5e 100644 --- a/testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Remove-MgBetaUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users } diff --git a/testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 b/testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 index 3a6a259e76..f0cef92b5a 100644 --- a/testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Update-MgBetaUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users } diff --git a/testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 b/testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 index 589e2a03a8..4307e68cfa 100644 --- a/testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Set-MgBetaUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users } diff --git a/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 b/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 index 066693ce82..ba378a9889 100644 --- a/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users } diff --git a/testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 b/testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 index 0a15326074..6ececce1d5 100644 --- a/testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users } - Import-Module (Join-Path $PSScriptRoot "..\..\build\Common-Functions.ps1") -Force + Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblockForAuthenticationMethod = { return @( [PSCustomObject]@{ From fe9da9556d09a4dec09ac8acf7a8a503f300b335 Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Wed, 20 Nov 2024 10:23:58 +0300 Subject: [PATCH 110/124] Credscan and PSScriptAnalyzer suppressions (#1220) --- .../1es-entra-powershell-ci-build.yml | 8 ++++ .config/CredScanSuppressions.json | 45 +++++++++++++++++++ .configCredScanSuppressions.json | 0 build/ValidateAuthenticodeSignature.ps1 | 8 ++-- .../Users/New-EntraUser.ps1 | 1 + .../Users/Set-EntraUser.ps1 | 1 + .../Users/Update-EntraUserFromFederated.ps1 | 1 + .../Users/New-EntraBetaUser.ps1 | 1 + .../Users/Set-EntraBetaUser.ps1 | 1 + .../Update-EntraBetaUserFromFederated.ps1 | 1 + .../Users/Set-EntraUserPassword.Tests.ps1 | 4 ++ ...Update-EntraSignedInUserPassword.Tests.ps1 | 3 ++ ...te-EntraBetaSignedInUserPassword.Tests.ps1 | 3 ++ 13 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 .config/CredScanSuppressions.json create mode 100644 .configCredScanSuppressions.json diff --git a/.azure-pipelines/1es-entra-powershell-ci-build.yml b/.azure-pipelines/1es-entra-powershell-ci-build.yml index 20001ad6ab..d43b9004ae 100644 --- a/.azure-pipelines/1es-entra-powershell-ci-build.yml +++ b/.azure-pipelines/1es-entra-powershell-ci-build.yml @@ -32,6 +32,14 @@ extends: name: MSSecurity-1ES-Build-Agents-Pool image: MSSecurity-1ES-Windows-2022 os: windows + credscan: + suppressionsFile: $(Build.SourcesDirectory)\.config\CredScanSuppressions.json + outputFormat: pre + debugMode: false + batchSize: 16 + psscriptanalyzer: + break: false + enabled: true stages: - stage: build jobs: diff --git a/.config/CredScanSuppressions.json b/.config/CredScanSuppressions.json new file mode 100644 index 0000000000..9ce47d809b --- /dev/null +++ b/.config/CredScanSuppressions.json @@ -0,0 +1,45 @@ +{ + "tool": "Credential Scanner", + "suppressions": [ + { + "file": "test\\module\\Entra\\Update-EntraSignedInUserPassword.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "test\\module\\Entra\\Update-EntraUserFromFederated.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "test\\module\\EntraBeta\\Update-EntraBetaSignedInUserPassword.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "test\\module\\EntraBeta\\Update-EntraBetaUserFromFederated.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "testVNext\\Entra\\Users\\Update-EntraSignedInUserPassword.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "testVNext\\Entra\\Users\\Update-EntraUserFromFederated.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "testVNext\\EntraBeta\\Users\\Update-EntraBetaSignedInUserPassword.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "testVNext\\EntraBeta\\Users\\Update-EntraBetaUserFromFederated.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "test\\module\\Entra\\New-EntraUser.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + }, + { + "file": "testVNext\\Entra\\Users\\New-EntraUser.Tests.ps1", + "_justification": "Unit test file has a sample Password used in mocking." + } + ] +} \ No newline at end of file diff --git a/.configCredScanSuppressions.json b/.configCredScanSuppressions.json new file mode 100644 index 0000000000..e69de29bb2 diff --git a/build/ValidateAuthenticodeSignature.ps1 b/build/ValidateAuthenticodeSignature.ps1 index 3904e0c5e6..a75010abd9 100644 --- a/build/ValidateAuthenticodeSignature.ps1 +++ b/build/ValidateAuthenticodeSignature.ps1 @@ -1,8 +1,8 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ -# [cmdletbinding()] -# param ( -# [string]$Module = "Entra" -# ) +Set-StrictMode -Version 5 . "$psscriptroot/common-functions.ps1" diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 index 1a9dd81a22..68616d017c 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function New-EntraUser { + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope="Function", Target="*")] [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 index b14221cd9d..accbb1423b 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Set-EntraUser { + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope="Function", Target="*")] [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 index b5e4230487..873e5ef61b 100644 --- a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 +++ b/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Update-EntraUserFromFederated { + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope="Function", Target="*")] [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserPrincipalName, diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 index b9a46bc8d8..af5a8529c1 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function New-EntraBetaUser { + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope="Function", Target="*")] [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 index 83a0491f5b..71a65d71fe 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Set-EntraBetaUser { + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope="Function", Target="*")] [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 index 38cf3dee80..a2c4544441 100644 --- a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 +++ b/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 @@ -3,6 +3,7 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Update-EntraBetaUserFromFederated { + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope="Function", Target="*")] [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserPrincipalName, diff --git a/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 b/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 index e3f259d7c1..c52dbb7607 100644 --- a/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 +++ b/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 @@ -1,6 +1,10 @@ # ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] +param() + BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Users diff --git a/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 b/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 index f1d0495279..711ec74034 100644 --- a/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 +++ b/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 @@ -2,6 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] +param() + BeforeAll{ if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Users diff --git a/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 b/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 index ba378a9889..f25a87c45d 100644 --- a/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 +++ b/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 @@ -2,6 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] +param() + BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta.Users From 119292ce6515b6a4aca55ae4081108a45e8ddfde Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Thu, 21 Nov 2024 10:45:47 +0300 Subject: [PATCH 111/124] Kemunga/modularize folders restructure (#1222) --- .../generate_adapter-1es.yml | 66 +--- .../generate_adapter-legacy.yml | 253 +++++++++++++++ .../generation-templates/generate_adapter.yml | 70 +--- .config/CredScanSuppressions.json | 20 +- .configCredScanSuppressions.json | 0 build/Create-ModuleMapping.ps1 | 8 +- build/Split-Docs.ps1 | 14 +- build/Split-EntraModule.ps1 | 9 +- build/Split-Tests.ps1 | 12 +- build/Update-CommonFunctionsImport.ps1 | 4 +- build/build.config.psd1 | 2 +- build/common-functions.ps1 | 4 +- .../Add-EntraApplicationOwner.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 .../Add-EntraServicePrincipalOwner.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Applications/Get-EntraApplication.ps1 | 0 .../Get-EntraApplicationExtensionProperty.ps1 | 0 .../Get-EntraApplicationKeyCredential.ps1 | 0 .../Applications/Get-EntraApplicationLogo.ps1 | 0 .../Get-EntraApplicationOwner.ps1 | 0 ...Get-EntraApplicationPasswordCredential.ps1 | 0 .../Get-EntraApplicationServiceEndpoint.ps1 | 0 .../Get-EntraApplicationTemplate.ps1 | 0 .../Get-EntraDeletedApplication.ps1 | 0 .../Get-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignedTo.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...Get-EntraServicePrincipalCreatedObject.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...Get-EntraServicePrincipalKeyCredential.ps1 | 0 .../Get-EntraServicePrincipalMembership.ps1 | 0 ...aServicePrincipalOAuth2PermissionGrant.ps1 | 0 .../Get-EntraServicePrincipalOwnedObject.ps1 | 0 .../Get-EntraServicePrincipalOwner.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Applications/New-EntraApplication.ps1 | 0 .../New-EntraApplicationExtensionProperty.ps1 | 0 ...ntraApplicationFromApplicationTemplate.ps1 | 0 .../Applications/New-EntraApplicationKey.ps1 | 0 .../New-EntraApplicationKeyCredential.ps1 | 0 .../New-EntraApplicationPassword.ps1 | 0 ...New-EntraApplicationPasswordCredential.ps1 | 0 .../Applications/New-EntraCustomHeaders.ps1 | 0 .../New-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Applications/Remove-EntraApplication.ps1 | 0 ...move-EntraApplicationExtensionProperty.ps1 | 0 .../Remove-EntraApplicationKey.ps1 | 0 .../Remove-EntraApplicationKeyCredential.ps1 | 0 .../Remove-EntraApplicationOwner.ps1 | 0 .../Remove-EntraApplicationPassword.ps1 | 0 ...ove-EntraApplicationPasswordCredential.ps1 | 0 ...move-EntraApplicationVerifiedPublisher.ps1 | 0 .../Remove-EntraDeletedApplication.ps1 | 0 .../Remove-EntraDeletedDirectoryObject.ps1 | 0 .../Remove-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...ove-EntraServicePrincipalKeyCredential.ps1 | 0 .../Remove-EntraServicePrincipalOwner.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Restore-EntraDeletedApplication.ps1 | 0 ...ntraGroupIdsServicePrincipalIsMemberOf.ps1 | 0 .../Applications/Set-EntraApplication.ps1 | 0 .../Applications/Set-EntraApplicationLogo.ps1 | 0 .../Set-EntraApplicationVerifiedPublisher.ps1 | 0 .../Set-EntraServicePrincipal.ps1 | 0 .../Authentication/Add-EntraEnvironment.ps1 | 0 .../Authentication/Connect-Entra.ps1 | 0 .../Authentication/Disconnect-Entra.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Authentication/Find-EntraPermission.ps1 | 0 .../Authentication/Get-EntraContext.ps1 | 0 .../Authentication/Get-EntraEnvironment.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Authentication/New-EntraCustomHeaders.ps1 | 0 ...t-EntraStrongAuthenticationMethodByUpn.ps1 | 0 ...evoke-EntraSignedInUserAllRefreshToken.ps1 | 0 .../Revoke-EntraUserAllRefreshToken.ps1 | 0 .../Add-EntraAdministrativeUnitMember.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Add-EntraDeviceRegisteredOwner.ps1 | 0 .../Add-EntraDeviceRegisteredUser.ps1 | 0 .../Add-EntraDirectoryRoleMember.ps1 | 0 .../Add-EntraScopedRoleMembership.ps1 | 0 .../Confirm-EntraDomain.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Enable-EntraDirectoryRole.ps1 | 0 .../Get-EntraAccountSku.ps1 | 0 .../Get-EntraAdministrativeUnit.ps1 | 0 .../Get-EntraAdministrativeUnitMember.ps1 | 0 .../Get-EntraAttributeSet.ps1 | 0 .../DirectoryManagement/Get-EntraContact.ps1 | 0 .../Get-EntraContactDirectReport.ps1 | 0 .../Get-EntraContactManager.ps1 | 0 .../Get-EntraContactMembership.ps1 | 0 .../DirectoryManagement/Get-EntraContract.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Get-EntraDeletedDirectoryObject.ps1 | 0 .../DirectoryManagement/Get-EntraDevice.ps1 | 0 .../Get-EntraDeviceRegisteredOwner.ps1 | 0 .../Get-EntraDeviceRegisteredUser.ps1 | 0 .../Get-EntraDirSyncConfiguration.ps1 | 0 ...ctoryObjectOnPremisesProvisioningError.ps1 | 0 .../Get-EntraDirectoryRole.ps1 | 0 .../Get-EntraDirectoryRoleMember.ps1 | 0 .../Get-EntraDirectoryRoleTemplate.ps1 | 0 .../DirectoryManagement/Get-EntraDomain.ps1 | 0 .../Get-EntraDomainFederationSettings.ps1 | 0 .../Get-EntraDomainNameReference.ps1 | 0 ...-EntraDomainServiceConfigurationRecord.ps1 | 0 .../Get-EntraDomainVerificationDnsRecord.ps1 | 0 .../Get-EntraExtensionProperty.ps1 | 0 .../Get-EntraFederationProperty.ps1 | 0 .../Get-EntraObjectByObjectId.ps1 | 0 .../Get-EntraPartnerInformation.ps1 | 0 .../Get-EntraPasswordPolicy.ps1 | 0 .../Get-EntraScopedRoleMembership.ps1 | 0 .../Get-EntraSubscribedSku.ps1 | 0 .../Get-EntraTenantDetail.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraAdministrativeUnit.ps1 | 0 .../New-EntraAttributeSet.ps1 | 0 .../New-EntraCustomHeaders.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 .../DirectoryManagement/New-EntraDevice.ps1 | 0 .../DirectoryManagement/New-EntraDomain.ps1 | 0 .../Remove-EntraAdministrativeUnit.ps1 | 0 .../Remove-EntraAdministrativeUnitMember.ps1 | 0 .../Remove-EntraContact.ps1 | 0 .../Remove-EntraDevice.ps1 | 0 .../Remove-EntraDeviceRegisteredOwner.ps1 | 0 .../Remove-EntraDeviceRegisteredUser.ps1 | 0 .../Remove-EntraDirectoryRoleMember.ps1 | 0 .../Remove-EntraDomain.ps1 | 0 .../Remove-EntraScopedRoleMembership.ps1 | 0 .../Restore-EntraDeletedDirectoryObject.ps1 | 0 .../Set-EntraAdministrativeUnit.ps1 | 0 .../Set-EntraAttributeSet.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../DirectoryManagement/Set-EntraDevice.ps1 | 0 .../Set-EntraDirSyncConfiguration.ps1 | 0 .../Set-EntraDirSyncEnabled.ps1 | 0 .../Set-EntraDirSyncFeature.ps1 | 0 .../DirectoryManagement/Set-EntraDomain.ps1 | 0 .../Set-EntraDomainFederationSettings.ps1 | 0 .../Set-EntraPartnerInformation.ps1 | 0 .../Set-EntraTenantDetail.ps1 | 0 .../Enable-EntraAzureADAlias.ps1 | 0 .../Governance/Enable-EntraAzureADAliases.ps1 | 0 .../Get-EntraDirectoryRoleAssignment.ps1 | 0 .../Get-EntraDirectoryRoleDefinition.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Governance/New-EntraCustomHeaders.ps1 | 0 .../New-EntraDirectoryRoleAssignment.ps1 | 0 .../New-EntraDirectoryRoleDefinition.ps1 | 0 .../Remove-EntraDirectoryRoleAssignment.ps1 | 0 .../Remove-EntraDirectoryRoleDefinition.ps1 | 0 .../Set-EntraDirectoryRoleDefinition.ps1 | 0 .../Groups/Add-EntraGroupMember.ps1 | 0 .../Groups/Add-EntraGroupOwner.ps1 | 0 .../Groups/Add-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Enable-EntraAzureADAliases.ps1 | 0 .../Groups/Get-EntraDeletedGroup.ps1 | 0 .../Groups/Get-EntraGroup.ps1 | 0 .../Get-EntraGroupAppRoleAssignment.ps1 | 0 .../Groups/Get-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Get-EntraGroupMember.ps1 | 0 .../Groups/Get-EntraGroupOwner.ps1 | 0 .../Groups/Get-EntraGroupPermissionGrant.ps1 | 0 .../Groups/Get-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Get-EntraObjectSetting.ps1 | 0 .../Groups/Get-EntraUnsupportedCommand.ps1 | 0 .../Groups/New-EntraCustomHeaders.ps1 | 0 .../Groups/New-EntraGroup.ps1 | 0 .../New-EntraGroupAppRoleAssignment.ps1 | 0 .../Groups/New-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Remove-EntraGroup.ps1 | 0 .../Remove-EntraGroupAppRoleAssignment.ps1 | 0 .../Remove-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Remove-EntraGroupMember.ps1 | 0 .../Groups/Remove-EntraGroupOwner.ps1 | 0 .../Remove-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Reset-EntraLifeCycleGroup.ps1 | 0 .../Select-EntraGroupIdsContactIsMemberOf.ps1 | 0 .../Select-EntraGroupIdsGroupIsMemberOf.ps1 | 0 .../Select-EntraGroupIdsUserIsMemberOf.ps1 | 0 .../Groups/Set-EntraGroup.ps1 | 0 .../Groups/Set-EntraGroupLifecyclePolicy.ps1 | 0 .../Reports/Enable-EntraAzureADAliases.ps1 | 0 .../Reports/Get-EntraAuditDirectoryLog.ps1 | 0 .../Reports/Get-EntraAuditSignInLog.ps1 | 0 .../Reports/Get-EntraUnsupportedCommand.ps1 | 0 .../Reports/New-EntraCustomHeaders.ps1 | 0 .../SignIns/Enable-EntraAzureADAliases.ps1 | 0 .../SignIns/Get-EntraAuthorizationPolicy.ps1 | 0 .../Get-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/Get-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/Get-EntraIdentityProvider.ps1 | 0 .../SignIns/Get-EntraNamedLocationPolicy.ps1 | 0 .../Get-EntraOAuth2PermissionGrant.ps1 | 0 .../Get-EntraPermissionGrantConditionSet.ps1 | 0 .../Get-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Get-EntraPolicy.ps1 | 0 .../Get-EntraTrustedCertificateAuthority.ps1 | 0 .../SignIns/Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/New-EntraCustomHeaders.ps1 | 0 .../SignIns/New-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/New-EntraIdentityProvider.ps1 | 0 .../SignIns/New-EntraNamedLocationPolicy.ps1 | 0 .../New-EntraOauth2PermissionGrant.ps1 | 0 .../New-EntraPermissionGrantConditionSet.ps1 | 0 .../New-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/New-EntraPolicy.ps1 | 0 .../New-EntraTrustedCertificateAuthority.ps1 | 0 .../Remove-EntraConditionalAccessPolicy.ps1 | 0 .../Remove-EntraFeatureRolloutPolicy.ps1 | 0 ...traFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../SignIns/Remove-EntraIdentityProvider.ps1 | 0 .../Remove-EntraNamedLocationPolicy.ps1 | 0 .../Remove-EntraOAuth2PermissionGrant.ps1 | 0 ...emove-EntraPermissionGrantConditionSet.ps1 | 0 .../Remove-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Remove-EntraPolicy.ps1 | 0 ...emove-EntraTrustedCertificateAuthority.ps1 | 0 .../SignIns/Set-EntraAuthorizationPolicy.ps1 | 0 .../Set-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/Set-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/Set-EntraIdentityProvider.ps1 | 0 .../SignIns/Set-EntraNamedLocationPolicy.ps1 | 0 .../Set-EntraPermissionGrantConditionSet.ps1 | 0 .../Set-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Set-EntraPolicy.ps1 | 0 .../Set-EntraTrustedCertificateAuthority.ps1 | 0 .../UnMappedAliases.psd1 | 0 .../Users/Enable-EntraAzureADAliases.ps1 | 0 .../Users/Get-EntraUnsupportedCommand.ps1 | 0 .../Users/Get-EntraUser.ps1 | 0 .../Users/Get-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Get-EntraUserCreatedObject.ps1 | 0 .../Users/Get-EntraUserDirectReport.ps1 | 0 .../Users/Get-EntraUserExtension.ps1 | 0 .../Users/Get-EntraUserLicenseDetail.ps1 | 0 .../Users/Get-EntraUserManager.ps1 | 0 .../Users/Get-EntraUserMembership.ps1 | 0 .../Get-EntraUserOAuth2PermissionGrant.ps1 | 0 .../Users/Get-EntraUserOwnedDevice.ps1 | 0 .../Users/Get-EntraUserOwnedObject.ps1 | 0 .../Users/Get-EntraUserRegisteredDevice.ps1 | 0 .../Users/Get-EntraUserThumbnailPhoto.ps1 | 0 .../Users/New-EntraCustomHeaders.ps1 | 0 .../Users/New-EntraUser.ps1 | 0 .../Users/New-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraUser.ps1 | 0 .../Remove-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraUserExtension.ps1 | 0 .../Users/Remove-EntraUserManager.ps1 | 0 .../Users/Set-EntraUser.ps1 | 0 .../Users/Set-EntraUserExtension.ps1 | 0 .../Users/Set-EntraUserLicense.ps1 | 0 .../Users/Set-EntraUserManager.ps1 | 0 .../Users/Set-EntraUserPassword.ps1 | 0 .../Users/Set-EntraUserThumbnailPhoto.ps1 | 0 .../Update-EntraSignedInUserPassword.ps1 | 0 .../Users/Update-EntraUserFromFederated.ps1 | 0 .../UnMappedFiles/Get-EntraDirSyncfeature.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../UnMappedFiles/New-EntraInvitation.ps1 | 0 .../Entra/UnMappedFiles/Test-EntraScript.ps1 | 0 .../Add-EntraBetaApplicationOwner.ps1 | 0 .../Add-EntraBetaApplicationPolicy.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 .../Add-EntraBetaServicePrincipalOwner.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Applications/Get-EntraBetaApplication.ps1 | 0 ...-EntraBetaApplicationExtensionProperty.ps1 | 0 .../Get-EntraBetaApplicationKeyCredential.ps1 | 0 .../Get-EntraBetaApplicationLogo.ps1 | 0 .../Get-EntraBetaApplicationOwner.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 .../Get-EntraBetaApplicationPolicy.ps1 | 0 ...t-EntraBetaApplicationProxyApplication.ps1 | 0 ...Get-EntraBetaApplicationProxyConnector.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 ...aApplicationProxyConnectorGroupMembers.ps1 | 0 ...aBetaApplicationProxyConnectorMemberOf.ps1 | 0 .../Get-EntraBetaApplicationTemplate.ps1 | 0 .../Get-EntraBetaDeletedApplication.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 .../Get-EntraBetaServicePrincipal.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignedTo.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...EntraBetaServicePrincipalCreatedObject.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...EntraBetaServicePrincipalKeyCredential.ps1 | 0 ...et-EntraBetaServicePrincipalMembership.ps1 | 0 ...aServicePrincipalOAuth2PermissionGrant.ps1 | 0 ...t-EntraBetaServicePrincipalOwnedObject.ps1 | 0 .../Get-EntraBetaServicePrincipalOwner.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Applications/New-EntraBetaApplication.ps1 | 0 ...-EntraBetaApplicationExtensionProperty.ps1 | 0 ...BetaApplicationFromApplicationTemplate.ps1 | 0 .../New-EntraBetaApplicationKey.ps1 | 0 .../New-EntraBetaApplicationKeyCredential.ps1 | 0 .../New-EntraBetaApplicationPassword.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 ...w-EntraBetaApplicationProxyApplication.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 .../New-EntraBetaServicePrincipal.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 .../Remove-EntraBetaApplication.ps1 | 0 ...-EntraBetaApplicationExtensionProperty.ps1 | 0 .../Remove-EntraBetaApplicationKey.ps1 | 0 ...move-EntraBetaApplicationKeyCredential.ps1 | 0 .../Remove-EntraBetaApplicationOwner.ps1 | 0 .../Remove-EntraBetaApplicationPassword.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 .../Remove-EntraBetaApplicationPolicy.ps1 | 0 ...e-EntraBetaApplicationProxyApplication.ps1 | 0 ...licationProxyApplicationConnectorGroup.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 ...-EntraBetaApplicationVerifiedPublisher.ps1 | 0 .../Remove-EntraBetaDeletedApplication.ps1 | 0 ...Remove-EntraBetaDeletedDirectoryObject.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 .../Remove-EntraBetaServicePrincipal.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 .../Remove-EntraBetaServicePrincipalOwner.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 .../Restore-EntraBetaDeletedApplication.ps1 | 0 ...BetaGroupIdsServicePrincipalIsMemberOf.ps1 | 0 .../Applications/Set-EntraBetaApplication.ps1 | 0 .../Set-EntraBetaApplicationLogo.ps1 | 0 ...t-EntraBetaApplicationProxyApplication.ps1 | 0 ...licationProxyApplicationConnectorGroup.ps1 | 0 ...pplicationProxyApplicationSingleSignOn.ps1 | 0 ...Set-EntraBetaApplicationProxyConnector.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 ...-EntraBetaApplicationVerifiedPublisher.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 .../Set-EntraBetaServicePrincipal.ps1 | 0 .../Authentication/Connect-Entra.ps1 | 0 .../Authentication/Disconnect-Entra.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Authentication/Get-EntraContext.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 0 ...traBetaStrongAuthenticationMethodByUpn.ps1 | 0 ...e-EntraBetaSignedInUserAllRefreshToken.ps1 | 0 .../Revoke-EntraBetaUserAllRefreshToken.ps1 | 0 .../Add-EntraBetaAdministrativeUnitMember.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Add-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Add-EntraBetaDeviceRegisteredUser.ps1 | 0 .../Add-EntraBetaDirectoryRoleMember.ps1 | 0 .../Add-EntraBetaScopedRoleMembership.ps1 | 0 .../Confirm-EntraBetaDomain.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Enable-EntraBetaDirectoryRole.ps1 | 0 .../Get-EntraBetaAccountSku.ps1 | 0 .../Get-EntraBetaAdministrativeUnit.ps1 | 0 .../Get-EntraBetaAdministrativeUnitMember.ps1 | 0 .../Get-EntraBetaAttributeSet.ps1 | 0 .../Get-EntraBetaContact.ps1 | 0 .../Get-EntraBetaContactDirectReport.ps1 | 0 .../Get-EntraBetaContactManager.ps1 | 0 .../Get-EntraBetaContactMembership.ps1 | 0 .../Get-EntraBetaContract.ps1 | 0 ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Get-EntraBetaDeletedDirectoryObject.ps1 | 0 .../Get-EntraBetaDevice.ps1 | 0 .../Get-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Get-EntraBetaDeviceRegisteredUser.ps1 | 0 .../Get-EntraBetaDirSyncConfiguration.ps1 | 0 .../Get-EntraBetaDirSyncfeature.ps1 | 0 ...ctoryObjectOnPremisesProvisioningError.ps1 | 0 .../Get-EntraBetaDirectoryRole.ps1 | 0 .../Get-EntraBetaDirectoryRoleMember.ps1 | 0 .../Get-EntraBetaDirectoryRoleTemplate.ps1 | 0 .../Get-EntraBetaDirectorySetting.ps1 | 0 .../Get-EntraBetaDirectorySettingTemplate.ps1 | 0 .../Get-EntraBetaDomain.ps1 | 0 .../Get-EntraBetaDomainFederationSettings.ps1 | 0 .../Get-EntraBetaDomainNameReference.ps1 | 0 ...raBetaDomainServiceConfigurationRecord.ps1 | 0 ...t-EntraBetaDomainVerificationDnsRecord.ps1 | 0 .../Get-EntraBetaFederationProperty.ps1 | 0 .../Get-EntraBetaPartnerInformation.ps1 | 0 .../Get-EntraBetaPasswordPolicy.ps1 | 0 .../Get-EntraBetaScopedRoleMembership.ps1 | 0 .../Get-EntraBetaSubscribedSku.ps1 | 0 .../Get-EntraBetaTenantDetail.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaAdministrativeUnit.ps1 | 0 .../New-EntraBetaAdministrativeUnitMember.ps1 | 0 .../New-EntraBetaAttributeSet.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 0 ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 .../New-EntraBetaDevice.ps1 | 0 .../New-EntraBetaDirectorySetting.ps1 | 0 .../New-EntraBetaDomain.ps1 | 0 .../Remove-EntraBetaAdministrativeUnit.ps1 | 0 ...move-EntraBetaAdministrativeUnitMember.ps1 | 0 .../Remove-EntraBetaContact.ps1 | 0 .../Remove-EntraBetaDevice.ps1 | 0 .../Remove-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Remove-EntraBetaDeviceRegisteredUser.ps1 | 0 .../Remove-EntraBetaDirectoryRoleMember.ps1 | 0 .../Remove-EntraBetaDirectorySetting.ps1 | 0 .../Remove-EntraBetaDomain.ps1 | 0 .../Remove-EntraBetaScopedRoleMembership.ps1 | 0 ...estore-EntraBetaDeletedDirectoryObject.ps1 | 0 .../Set-EntraBetaAdministrativeUnit.ps1 | 0 .../Set-EntraBetaAttributeSet.ps1 | 0 ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Set-EntraBetaDevice.ps1 | 0 .../Set-EntraBetaDirSyncConfiguration.ps1 | 0 .../Set-EntraBetaDirSyncEnabled.ps1 | 0 .../Set-EntraBetaDirSyncFeature.ps1 | 0 .../Set-EntraBetaDirectorySetting.ps1 | 0 .../Set-EntraBetaDomain.ps1 | 0 .../Set-EntraBetaDomainFederationSettings.ps1 | 0 .../Set-EntraBetaPartnerInformation.ps1 | 0 .../Set-EntraBetaTenantDetail.ps1 | 0 .../Enable-EntraBetaAzureADAlias.ps1 | 0 .../Governance/Enable-EntraAzureADAliases.ps1 | 0 .../Get-EntraBetaDirectoryRoleAssignment.ps1 | 0 .../Get-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../Get-EntraBetaPrivilegedResource.ps1 | 0 .../Get-EntraBetaPrivilegedRole.ps1 | 0 ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 0 .../Get-EntraBetaPrivilegedRoleDefinition.ps1 | 0 .../Get-EntraBetaPrivilegedRoleSetting.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Governance/New-EntraBetaCustomHeaders.ps1 | 0 .../New-EntraBetaDirectoryRoleAssignment.ps1 | 0 .../New-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../New-EntraBetaPrivilegedRoleAssignment.ps1 | 0 ...emove-EntraBetaDirectoryRoleAssignment.ps1 | 0 ...emove-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../Set-EntraBetaDirectoryRoleDefinition.ps1 | 0 ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 0 .../Set-EntraBetaPrivilegedRoleSetting.ps1 | 0 .../Groups/Add-EntraBetaGroupMember.ps1 | 0 .../Groups/Add-EntraBetaGroupOwner.ps1 | 0 .../Add-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Groups/Enable-EntraAzureADAliases.ps1 | 0 .../Groups/Get-EntraBetaDeletedGroup.ps1 | 0 .../Groups/Get-EntraBetaGroup.ps1 | 0 .../Get-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../Get-EntraBetaGroupLifecyclePolicy.ps1 | 0 .../Groups/Get-EntraBetaGroupMember.ps1 | 0 .../Groups/Get-EntraBetaGroupOwner.ps1 | 0 .../Get-EntraBetaGroupPermissionGrant.ps1 | 0 .../Get-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Groups/Get-EntraBetaObjectByObjectId.ps1 | 0 .../Groups/Get-EntraBetaObjectSetting.ps1 | 0 .../Groups/Get-EntraUnsupportedCommand.ps1 | 0 .../Groups/New-EntraBetaCustomHeaders.ps1 | 0 .../Groups/New-EntraBetaGroup.ps1 | 0 .../New-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../New-EntraBetaGroupLifecyclePolicy.ps1 | 0 .../Groups/New-EntraBetaObjectSetting.ps1 | 0 .../Groups/Remove-EntraBetaGroup.ps1 | 0 ...Remove-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../Remove-EntraBetaGroupLifecyclePolicy.ps1 | 0 .../Groups/Remove-EntraBetaGroupMember.ps1 | 0 .../Groups/Remove-EntraBetaGroupOwner.ps1 | 0 .../Remove-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Groups/Remove-EntraBetaObjectSetting.ps1 | 0 .../Groups/Reset-EntraBetaLifeCycleGroup.ps1 | 0 ...ect-EntraBetaGroupIdsContactIsMemberOf.ps1 | 0 ...elect-EntraBetaGroupIdsGroupIsMemberOf.ps1 | 0 ...Select-EntraBetaGroupIdsUserIsMemberOf.ps1 | 0 .../Groups/Set-EntraBetaGroup.ps1 | 0 .../Set-EntraBetaGroupLifecyclePolicy.ps1 | 0 .../Groups/Set-EntraBetaObjectSetting.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 ...able-EntraBetaGlobalSecureAccessTenant.ps1 | 0 ...ntraBetaGlobalSecureAccessTenantStatus.ps1 | 0 .../Get-EntraBetaPrivateAccessApplication.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 0 .../New-EntraBetaPrivateAccessApplication.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 .../Reports/Enable-EntraAzureADAliases.ps1 | 0 ...raBetaApplicationSignInDetailedSummary.ps1 | 0 .../Get-EntraBetaApplicationSignInSummary.ps1 | 0 .../Get-EntraBetaAuditDirectoryLog.ps1 | 0 .../Reports/Get-EntraBetaAuditSignInLog.ps1 | 0 .../Reports/Get-EntraUnsupportedCommand.ps1 | 0 .../Reports/New-EntraBetaCustomHeaders.ps1 | 0 ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../Add-EntraBetaServicePrincipalPolicy.ps1 | 0 .../SignIns/Enable-EntraAzureADAliases.ps1 | 0 .../Get-EntraBetaAuthorizationPolicy.ps1 | 0 .../Get-EntraBetaConditionalAccessPolicy.ps1 | 0 .../Get-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../SignIns/Get-EntraBetaIdentityProvider.ps1 | 0 .../Get-EntraBetaNamedLocationPolicy.ps1 | 0 .../Get-EntraBetaOAuth2PermissionGrant.ps1 | 0 ...t-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Get-EntraBetaPermissionGrantPolicy.ps1 | 0 .../SignIns/Get-EntraBetaPolicy.ps1 | 0 .../Get-EntraBetaPolicyAppliedObject.ps1 | 0 .../Get-EntraBetaServicePrincipalPolicy.ps1 | 0 .../Get-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...t-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../SignIns/Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaConditionalAccessPolicy.ps1 | 0 .../SignIns/New-EntraBetaCustomHeaders.ps1 | 0 .../New-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../SignIns/New-EntraBetaIdentityProvider.ps1 | 0 .../SignIns/New-EntraBetaInvitation.ps1 | 0 .../New-EntraBetaNamedLocationPolicy.ps1 | 0 .../New-EntraBetaOauth2PermissionGrant.ps1 | 0 ...w-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../New-EntraBetaPermissionGrantPolicy.ps1 | 0 .../SignIns/New-EntraBetaPolicy.ps1 | 0 .../New-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...w-EntraBetaTrustedCertificateAuthority.ps1 | 0 ...emove-EntraBetaConditionalAccessPolicy.ps1 | 0 .../Remove-EntraBetaFeatureRolloutPolicy.ps1 | 0 ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../Remove-EntraBetaIdentityProvider.ps1 | 0 .../Remove-EntraBetaNamedLocationPolicy.ps1 | 0 .../Remove-EntraBetaOAuth2PermissionGrant.ps1 | 0 ...e-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Remove-EntraBetaPermissionGrantPolicy.ps1 | 0 .../SignIns/Remove-EntraBetaPolicy.ps1 | 0 ...Remove-EntraBetaServicePrincipalPolicy.ps1 | 0 .../Remove-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...e-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../Set-EntraBetaAuthorizationPolicy.ps1 | 0 .../Set-EntraBetaConditionalAccessPolicy.ps1 | 0 .../Set-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../SignIns/Set-EntraBetaIdentityProvider.ps1 | 0 .../Set-EntraBetaNamedLocationPolicy.ps1 | 0 ...t-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Set-EntraBetaPermissionGrantPolicy.ps1 | 0 .../SignIns/Set-EntraBetaPolicy.ps1 | 0 .../Set-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...t-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../Users/Enable-EntraAzureADAliases.ps1 | 0 .../Users/Get-EntraBetaUser.ps1 | 0 .../Get-EntraBetaUserAppRoleAssignment.ps1 | 0 .../Users/Get-EntraBetaUserCreatedObject.ps1 | 0 .../Users/Get-EntraBetaUserDirectReport.ps1 | 0 .../Users/Get-EntraBetaUserExtension.ps1 | 0 .../Users/Get-EntraBetaUserLicenseDetail.ps1 | 0 .../Users/Get-EntraBetaUserManager.ps1 | 0 .../Users/Get-EntraBetaUserMembership.ps1 | 0 ...Get-EntraBetaUserOAuth2PermissionGrant.ps1 | 0 .../Users/Get-EntraBetaUserOwnedDevice.ps1 | 0 .../Users/Get-EntraBetaUserOwnedObject.ps1 | 0 .../Get-EntraBetaUserRegisteredDevice.ps1 | 0 .../Users/Get-EntraBetaUserThumbnailPhoto.ps1 | 0 .../Users/Get-EntraUnsupportedCommand.ps1 | 0 .../Users/New-EntraBetaCustomHeaders.ps1 | 0 .../Users/New-EntraBetaUser.ps1 | 0 .../New-EntraBetaUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraBetaUser.ps1 | 0 .../Remove-EntraBetaUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraBetaUserExtension.ps1 | 0 .../Users/Remove-EntraBetaUserManager.ps1 | 0 .../Users/Set-EntraBetaUser.ps1 | 0 .../Users/Set-EntraBetaUserExtension.ps1 | 0 .../Users/Set-EntraBetaUserLicense.ps1 | 0 .../Users/Set-EntraBetaUserManager.ps1 | 0 .../Users/Set-EntraBetaUserPassword.ps1 | 0 .../Users/Set-EntraBetaUserThumbnailPhoto.ps1 | 0 .../Update-EntraBetaSignedInUserPassword.ps1 | 0 .../Update-EntraBetaUserFromFederated.ps1 | 0 .../Get-EntraBetaDirSyncfeature.ps1 | 0 .../UnMappedFiles/Test-EntraScript.ps1 | 0 .../EntraBeta/config/dependencyMapping.json | 3 +- module/EntraBeta/config/moduleMapping.json | 303 +++++++++++++++++- .../Add-EntraBetaApplicationOwner.md | 0 .../Add-EntraBetaApplicationPolicy.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 .../Add-EntraBetaServicePrincipalOwner.md | 0 ...nable-EntraBetaGlobalSecureAccessTenant.md | 0 .../Get-EntraBetaApplication.md | 0 ...t-EntraBetaApplicationExtensionProperty.md | 0 .../Get-EntraBetaApplicationKeyCredential.md | 0 .../Get-EntraBetaApplicationLogo.md | 0 .../Get-EntraBetaApplicationOwner.md | 0 ...-EntraBetaApplicationPasswordCredential.md | 0 .../Get-EntraBetaApplicationPolicy.md | 0 ...et-EntraBetaApplicationProxyApplication.md | 0 ...plicationProxyApplicationConnectorGroup.md | 0 .../Get-EntraBetaApplicationProxyConnector.md | 0 ...EntraBetaApplicationProxyConnectorGroup.md | 0 ...taApplicationProxyConnectorGroupMembers.md | 0 ...raBetaApplicationProxyConnectorMemberOf.md | 0 ...Get-EntraBetaApplicationServiceEndpoint.md | 0 .../Get-EntraBetaApplicationTemplate.md | 0 .../Get-EntraBetaDeletedApplication.md | 0 ...EntraBetaGlobalSecureAccessTenantStatus.md | 0 ...EntraBetaPasswordSingleSignOnCredential.md | 0 .../Get-EntraBetaPrivateAccessApplication.md | 0 .../Get-EntraBetaServicePrincipal.md | 0 ...raBetaServicePrincipalAppRoleAssignedTo.md | 0 ...raBetaServicePrincipalAppRoleAssignment.md | 0 ...-EntraBetaServicePrincipalCreatedObject.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 ...-EntraBetaServicePrincipalKeyCredential.md | 0 ...Get-EntraBetaServicePrincipalMembership.md | 0 ...taServicePrincipalOAuth2PermissionGrant.md | 0 ...et-EntraBetaServicePrincipalOwnedObject.md | 0 .../Get-EntraBetaServicePrincipalOwner.md | 0 ...aBetaServicePrincipalPasswordCredential.md | 0 .../Get-EntraBetaUserAuthenticationMethod.md | 0 ...-EntraBetaUserAuthenticationRequirement.md | 0 .../New-EntraBetaApplication.md | 0 ...w-EntraBetaApplicationExtensionProperty.md | 0 ...aBetaApplicationFromApplicationTemplate.md | 0 .../New-EntraBetaApplicationKey.md | 0 .../New-EntraBetaApplicationKeyCredential.md | 0 .../New-EntraBetaApplicationPassword.md | 0 ...-EntraBetaApplicationPasswordCredential.md | 0 ...ew-EntraBetaApplicationProxyApplication.md | 0 ...EntraBetaApplicationProxyConnectorGroup.md | 0 ...EntraBetaPasswordSingleSignOnCredential.md | 0 .../New-EntraBetaPrivateAccessApplication.md | 0 .../New-EntraBetaServicePrincipal.md | 0 ...raBetaServicePrincipalAppRoleAssignment.md | 0 ...aBetaServicePrincipalPasswordCredential.md | 0 .../Remove-EntraBetaApplication.md | 0 ...e-EntraBetaApplicationExtensionProperty.md | 0 .../Remove-EntraBetaApplicationKey.md | 0 ...emove-EntraBetaApplicationKeyCredential.md | 0 .../Remove-EntraBetaApplicationOwner.md | 0 .../Remove-EntraBetaApplicationPassword.md | 0 ...-EntraBetaApplicationPasswordCredential.md | 0 .../Remove-EntraBetaApplicationPolicy.md | 0 ...ve-EntraBetaApplicationProxyApplication.md | 0 ...plicationProxyApplicationConnectorGroup.md | 0 ...EntraBetaApplicationProxyConnectorGroup.md | 0 ...e-EntraBetaApplicationVerifiedPublisher.md | 0 .../Remove-EntraBetaDeletedApplication.md | 0 .../Remove-EntraBetaDeletedDirectoryObject.md | 0 ...EntraBetaPasswordSingleSignOnCredential.md | 0 .../Remove-EntraBetaServicePrincipal.md | 0 ...raBetaServicePrincipalAppRoleAssignment.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 .../Remove-EntraBetaServicePrincipalOwner.md | 0 ...aBetaServicePrincipalPasswordCredential.md | 0 .../Restore-EntraBetaDeletedApplication.md | 0 ...aBetaGroupIdsServicePrincipalIsMemberOf.md | 0 .../Set-EntraBetaApplication.md | 0 .../Set-EntraBetaApplicationLogo.md | 0 ...et-EntraBetaApplicationProxyApplication.md | 0 ...plicationProxyApplicationConnectorGroup.md | 0 ...ApplicationProxyApplicationSingleSignOn.md | 0 .../Set-EntraBetaApplicationProxyConnector.md | 0 ...EntraBetaApplicationProxyConnectorGroup.md | 0 ...t-EntraBetaApplicationVerifiedPublisher.md | 0 ...EntraBetaPasswordSingleSignOnCredential.md | 0 .../Set-EntraBetaServicePrincipal.md | 0 .../Update-EntraBetaOauth2PermissionGrant.md | 0 ...-EntraBetaUserAuthenticationRequirement.md | 0 .../Connect-Entra.md | 0 .../Disconnect-Entra.md | 0 .../Get-EntraContext.md | 0 ...ntraBetaStrongAuthenticationMethodByUpn.md | 0 ...ke-EntraBetaSignedInUserAllRefreshToken.md | 0 .../Revoke-EntraBetaUserAllRefreshToken.md | 0 .../Add-EntraBetaAdministrativeUnitMember.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Add-EntraBetaDeviceRegisteredOwner.md | 0 .../Add-EntraBetaDeviceRegisteredUser.md | 0 .../Add-EntraBetaDirectoryRoleMember.md | 0 .../Add-EntraBetaScopedRoleMembership.md | 0 .../Confirm-EntraBetaDomain.md | 0 .../Enable-EntraBetaDirectoryRole.md | 0 .../Get-EntraBetaAccountSku.md | 0 .../Get-EntraBetaAdministrativeUnit.md | 0 .../Get-EntraBetaAdministrativeUnitMember.md | 0 .../Get-EntraBetaAttributeSet.md | 0 .../Get-EntraBetaContact.md | 0 .../Get-EntraBetaContactDirectReport.md | 0 .../Get-EntraBetaContactManager.md | 0 .../Get-EntraBetaContactMembership.md | 0 .../Get-EntraBetaContract.md | 0 ...raBetaCustomSecurityAttributeDefinition.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Get-EntraBetaDeletedDirectoryObject.md | 0 .../Get-EntraBetaDevice.md | 0 .../Get-EntraBetaDeviceRegisteredOwner.md | 0 .../Get-EntraBetaDeviceRegisteredUser.md | 0 .../Get-EntraBetaDirSyncConfiguration.md | 0 .../Get-EntraBetaDirSyncFeature.md | 0 ...ectoryObjectOnPremisesProvisioningError.md | 0 .../Get-EntraBetaDirectoryRole.md | 0 .../Get-EntraBetaDirectoryRoleMember.md | 0 .../Get-EntraBetaDirectoryRoleTemplate.md | 0 .../Get-EntraBetaDirectorySetting.md | 0 .../Get-EntraBetaDirectorySettingTemplate.md | 0 .../Get-EntraBetaDomain.md | 0 .../Get-EntraBetaDomainFederationSettings.md | 0 .../Get-EntraBetaDomainNameReference.md | 0 ...traBetaDomainServiceConfigurationRecord.md | 0 ...et-EntraBetaDomainVerificationDnsRecord.md | 0 .../Get-EntraBetaFederationProperty.md | 0 .../Get-EntraBetaPartnerInformation.md | 0 .../Get-EntraBetaPasswordPolicy.md | 0 .../Get-EntraBetaScopedRoleMembership.md | 0 .../Get-EntraBetaSubscribedSku.md | 0 .../Get-EntraBetaTenantDetail.md | 0 .../New-EntraBetaAdministrativeUnit.md | 0 .../New-EntraBetaAdministrativeUnitMember.md | 0 .../New-EntraBetaAttributeSet.md | 0 ...raBetaCustomSecurityAttributeDefinition.md | 0 .../New-EntraBetaDevice.md | 0 .../New-EntraBetaDirectorySetting.md | 0 .../New-EntraBetaDomain.md | 0 .../Remove-EntraBetaAdministrativeUnit.md | 0 ...emove-EntraBetaAdministrativeUnitMember.md | 0 .../Remove-EntraBetaContact.md | 0 .../Remove-EntraBetaDevice.md | 0 .../Remove-EntraBetaDeviceRegisteredOwner.md | 0 .../Remove-EntraBetaDeviceRegisteredUser.md | 0 .../Remove-EntraBetaDirectoryRoleMember.md | 0 .../Remove-EntraBetaDirectorySetting.md | 0 .../Remove-EntraBetaDomain.md | 0 .../Remove-EntraBetaScopedRoleMembership.md | 0 ...Restore-EntraBetaDeletedDirectoryObject.md | 0 .../Set-EntraBetaAdministrativeUnit.md | 0 .../Set-EntraBetaAttributeSet.md | 0 ...raBetaCustomSecurityAttributeDefinition.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Set-EntraBetaDevice.md | 0 .../Set-EntraBetaDirSyncConfiguration.md | 0 .../Set-EntraBetaDirSyncEnabled.md | 0 .../Set-EntraBetaDirSyncFeature.md | 0 .../Set-EntraBetaDirectorySetting.md | 0 .../Set-EntraBetaDomain.md | 0 .../Set-EntraBetaDomainFederationSettings.md | 0 .../Set-EntraBetaPartnerInformation.md | 0 .../Set-EntraBetaTenantDetail.md | 0 .../Get-EntraBetaDirectoryRoleAssignment.md | 0 .../Get-EntraBetaDirectoryRoleDefinition.md | 0 .../Get-EntraBetaPrivilegedResource.md | 0 .../Get-EntraBetaPrivilegedRole.md | 0 .../Get-EntraBetaPrivilegedRoleDefinition.md | 0 .../Get-EntraBetaPrivilegedRoleSetting.md | 0 .../New-EntraBetaDirectoryRoleAssignment.md | 0 .../New-EntraBetaDirectoryRoleDefinition.md | 0 .../New-EntraBetaPrivilegedRoleAssignment.md | 0 ...Remove-EntraBetaDirectoryRoleAssignment.md | 0 ...Remove-EntraBetaDirectoryRoleDefinition.md | 0 .../Set-EntraBetaDirectoryRoleDefinition.md | 0 ...ntraBetaPrivilegedRoleAssignmentRequest.md | 0 .../Set-EntraBetaPrivilegedRoleSetting.md | 0 .../Groups/Add-EntraBetaGroupMember.md | 0 .../Groups/Add-EntraBetaGroupOwner.md | 0 .../Add-EntraBetaLifecyclePolicyGroup.md | 0 .../Groups/Get-EntraBetaDeletedGroup.md | 0 .../Groups/Get-EntraBetaGroup.md | 0 .../Get-EntraBetaGroupAppRoleAssignment.md | 0 .../Get-EntraBetaGroupLifecyclePolicy.md | 0 .../Groups/Get-EntraBetaGroupMember.md | 0 .../Groups/Get-EntraBetaGroupOwner.md | 0 .../Get-EntraBetaGroupPermissionGrant.md | 0 .../Get-EntraBetaLifecyclePolicyGroup.md | 0 .../Get-EntraBetaObjectByObjectId.md | 0 .../Groups/Get-EntraBetaObjectSetting.md | 0 .../New-EntraBetaGroup.md | 0 .../New-EntraBetaGroupAppRoleAssignment.md | 0 .../New-EntraBetaGroupLifecyclePolicy.md | 0 .../Groups/New-EntraBetaObjectSetting.md | 0 .../Groups/Remove-EntraBetaGroup.md | 0 .../Remove-EntraBetaGroupAppRoleAssignment.md | 0 .../Remove-EntraBetaGroupLifecyclePolicy.md | 0 .../Groups/Remove-EntraBetaGroupMember.md | 0 .../Groups/Remove-EntraBetaGroupOwner.md | 0 .../Remove-EntraBetaLifecyclePolicyGroup.md | 0 .../Remove-EntraBetaObjectSetting.md | 0 .../Groups/Reset-EntraBetaLifeCycleGroup.md | 0 ...lect-EntraBetaGroupIdsContactIsMemberOf.md | 0 ...Select-EntraBetaGroupIdsGroupIsMemberOf.md | 0 .../Select-EntraBetaGroupIdsUserIsMemberOf.md | 0 .../Groups/Set-EntraBetaGroup.md | 0 .../Set-EntraBetaGroupLifecyclePolicy.md | 0 .../Set-EntraBetaObjectSetting.md | 0 ...ntraBetaPrivateAccessApplicationSegment.md | 0 ...ntraBetaPrivateAccessApplicationSegment.md | 0 ...ntraBetaPrivateAccessApplicationSegment.md | 0 ...traBetaApplicationSignInDetailedSummary.md | 0 .../Get-EntraBetaApplicationSignInSummary.md | 0 .../Get-EntraBetaAuditDirectoryLog.md | 0 .../Get-EntraBetaAuditSignInLog.md | 0 ...BetaFeatureRolloutPolicyDirectoryObject.md | 0 .../Add-EntraBetaServicePrincipalPolicy.md | 0 .../Get-EntraBetaAuthorizationPolicy.md | 0 .../Get-EntraBetaConditionalAccessPolicy.md | 0 .../Get-EntraBetaFeatureRolloutPolicy.md | 0 .../Get-EntraBetaIdentityProvider.md | 0 .../Get-EntraBetaNamedLocationPolicy.md | 0 .../Get-EntraBetaOAuth2PermissionGrant.md | 0 ...et-EntraBetaPermissionGrantConditionSet.md | 0 .../Get-EntraBetaPermissionGrantPolicy.md | 0 .../Get-EntraBetaPolicy.md | 0 .../Get-EntraBetaPolicyAppliedObject.md | 0 .../Get-EntraBetaServicePrincipalPolicy.md | 0 .../Get-EntraBetaTrustFrameworkPolicy.md | 0 ...et-EntraBetaTrustedCertificateAuthority.md | 0 .../New-EntraBetaConditionalAccessPolicy.md | 0 .../New-EntraBetaFeatureRolloutPolicy.md | 0 .../New-EntraBetaIdentityProvider.md | 0 .../New-EntraBetaInvitation.md | 0 .../New-EntraBetaNamedLocationPolicy.md | 0 .../New-EntraBetaOauth2PermissionGrant.md | 0 ...ew-EntraBetaPermissionGrantConditionSet.md | 0 .../New-EntraBetaPermissionGrantPolicy.md | 0 .../New-EntraBetaPolicy.md | 0 .../New-EntraBetaTrustFrameworkPolicy.md | 0 ...ew-EntraBetaTrustedCertificateAuthority.md | 0 ...Remove-EntraBetaConditionalAccessPolicy.md | 0 .../Remove-EntraBetaFeatureRolloutPolicy.md | 0 ...BetaFeatureRolloutPolicyDirectoryObject.md | 0 .../Remove-EntraBetaIdentityProvider.md | 0 .../Remove-EntraBetaNamedLocationPolicy.md | 0 .../Remove-EntraBetaOAuth2PermissionGrant.md | 0 ...ve-EntraBetaPermissionGrantConditionSet.md | 0 .../Remove-EntraBetaPermissionGrantPolicy.md | 0 .../Remove-EntraBetaPolicy.md | 0 .../Remove-EntraBetaServicePrincipalPolicy.md | 0 .../Remove-EntraBetaTrustFrameworkPolicy.md | 0 ...ve-EntraBetaTrustedCertificateAuthority.md | 0 .../Set-EntraBetaAuthorizationPolicy.md | 0 .../Set-EntraBetaConditionalAccessPolicy.md | 0 .../Set-EntraBetaFeatureRolloutPolicy.md | 0 .../Set-EntraBetaIdentityProvider.md | 0 .../Set-EntraBetaNamedLocationPolicy.md | 0 ...et-EntraBetaPermissionGrantConditionSet.md | 0 .../Set-EntraBetaPermissionGrantPolicy.md | 0 .../Set-EntraBetaPolicy.md | 0 .../Set-EntraBetaTrustFrameworkPolicy.md | 0 ...et-EntraBetaTrustedCertificateAuthority.md | 0 .../Users/Get-EntraBetaUser.md | 0 .../Get-EntraBetaUserAppRoleAssignment.md | 0 .../Get-EntraBetaUserCreatedObject.md | 0 .../Get-EntraBetaUserDirectReport.md | 0 .../Get-EntraBetaUserExtension.md | 0 .../Get-EntraBetaUserLicenseDetail.md | 0 .../Get-EntraBetaUserManager.md | 0 .../Get-EntraBetaUserMembership.md | 0 .../Get-EntraBetaUserOAuth2PermissionGrant.md | 0 .../Get-EntraBetaUserOwnedDevice.md | 0 .../Get-EntraBetaUserOwnedObject.md | 0 .../Get-EntraBetaUserRegisteredDevice.md | 0 .../Get-EntraBetaUserThumbnailPhoto.md | 0 .../New-EntraBetaUser.md | 0 .../New-EntraBetaUserAppRoleAssignment.md | 0 .../Remove-EntraBetaUser.md | 0 .../Remove-EntraBetaUserAppRoleAssignment.md | 0 .../Remove-EntraBetaUserExtension.md | 0 .../Remove-EntraBetaUserManager.md | 0 .../Set-EntraBetaUser.md | 0 .../Set-EntraBetaUserExtension.md | 0 .../Set-EntraBetaUserLicense.md | 0 .../Set-EntraBetaUserManager.md | 0 .../Set-EntraBetaUserPassword.md | 0 .../Set-EntraBetaUserThumbnailPhoto.md | 0 .../Update-EntraBetaSignedInUserPassword.md | 0 .../Update-EntraBetaUserFromFederated.md | 0 .../Add-EntraApplicationOwner.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 .../Add-EntraServicePrincipalOwner.md | 0 .../Get-EntraApplication.md | 0 .../Get-EntraApplicationExtensionProperty.md | 0 .../Get-EntraApplicationKeyCredential.md | 0 .../Get-EntraApplicationLogo.md | 0 .../Get-EntraApplicationOwner.md | 0 .../Get-EntraApplicationPasswordCredential.md | 0 .../Get-EntraApplicationServiceEndpoint.md | 0 .../Get-EntraApplicationTemplate.md | 0 .../Get-EntraDeletedApplication.md | 0 .../Get-EntraServicePrincipal.md | 0 ...-EntraServicePrincipalAppRoleAssignedTo.md | 0 ...-EntraServicePrincipalAppRoleAssignment.md | 0 .../Get-EntraServicePrincipalCreatedObject.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 .../Get-EntraServicePrincipalKeyCredential.md | 0 .../Get-EntraServicePrincipalMembership.md | 0 ...raServicePrincipalOAuth2PermissionGrant.md | 0 .../Get-EntraServicePrincipalOwnedObject.md | 0 .../Get-EntraServicePrincipalOwner.md | 0 ...EntraServicePrincipalPasswordCredential.md | 0 .../New-EntraApplication.md | 0 .../New-EntraApplicationExtensionProperty.md | 0 ...EntraApplicationFromApplicationTemplate.md | 0 .../New-EntraApplicationKey.md | 0 .../New-EntraApplicationKeyCredential.md | 0 .../New-EntraApplicationPassword.md | 0 .../New-EntraApplicationPasswordCredential.md | 0 .../New-EntraServicePrincipal.md | 0 ...-EntraServicePrincipalAppRoleAssignment.md | 0 .../New-EntraServicePrincipalKeyCredential.md | 0 ...EntraServicePrincipalPasswordCredential.md | 0 .../Remove-EntraApplication.md | 0 ...emove-EntraApplicationExtensionProperty.md | 0 .../Remove-EntraApplicationKey.md | 0 .../Remove-EntraApplicationKeyCredential.md | 0 .../Remove-EntraApplicationOwner.md | 0 .../Remove-EntraApplicationPassword.md | 0 ...move-EntraApplicationPasswordCredential.md | 0 ...emove-EntraApplicationVerifiedPublisher.md | 0 .../Remove-EntraDeletedApplication.md | 0 .../Remove-EntraDeletedDirectoryObject.md | 0 .../Remove-EntraServicePrincipal.md | 0 ...-EntraServicePrincipalAppRoleAssignment.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 ...move-EntraServicePrincipalKeyCredential.md | 0 .../Remove-EntraServicePrincipalOwner.md | 0 ...EntraServicePrincipalPasswordCredential.md | 0 .../Restore-EntraDeletedApplication.md | 0 ...EntraGroupIdsServicePrincipalIsMemberOf.md | 0 .../Set-EntraApplication.md | 0 .../Set-EntraApplicationLogo.md | 0 .../Set-EntraApplicationVerifiedPublisher.md | 0 .../Set-EntraServicePrincipal.md | 0 .../Add-EntraEnvironment.md | 0 .../Connect-Entra.md | 0 .../Disconnect-Entra.md | 0 .../Find-EntraPermission.md | 0 .../Get-EntraContext.md | 0 .../Get-EntraEnvironment.md | 0 ...et-EntraStrongAuthenticationMethodByUpn.md | 0 ...Revoke-EntraSignedInUserAllRefreshToken.md | 0 .../Revoke-EntraUserAllRefreshToken.md | 0 .../Add-EntraAdministrativeUnitMember.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Add-EntraDeviceRegisteredOwner.md | 0 .../Add-EntraDeviceRegisteredUser.md | 0 .../Add-EntraDirectoryRoleMember.md | 0 .../Add-EntraScopedRoleMembership.md | 0 .../Confirm-EntraDomain.md | 0 .../Enable-EntraDirectoryRole.md | 0 .../Get-CrossCloudVerificationCode.md | 0 .../Get-EntraAccountSku.md | 0 .../Get-EntraAdministrativeUnit.md | 0 .../Get-EntraAdministrativeUnitMember.md | 0 .../Get-EntraAttributeSet.md | 0 .../Get-EntraContact.md | 0 .../Get-EntraContactDirectReport.md | 0 .../Get-EntraContactManager.md | 0 .../Get-EntraContactMembership.md | 0 .../Get-EntraContactThumbnailPhoto.md | 0 .../Get-EntraContract.md | 0 ...-EntraCustomSecurityAttributeDefinition.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Get-EntraDeletedDirectoryObject.md | 0 .../Get-EntraDevice.md | 0 .../Get-EntraDeviceRegisteredOwner.md | 0 .../Get-EntraDeviceRegisteredUser.md | 0 .../Get-EntraDirSyncConfiguration.md | 0 .../Get-EntraDirSyncFeature.md | 0 ...ectoryObjectOnPremisesProvisioningError.md | 0 .../Get-EntraDirectoryRole.md | 0 .../Get-EntraDirectoryRoleMember.md | 0 .../Get-EntraDirectoryRoleTemplate.md | 0 .../Get-EntraDomain.md | 0 .../Get-EntraDomainFederationSettings.md | 0 .../Get-EntraDomainNameReference.md | 0 ...t-EntraDomainServiceConfigurationRecord.md | 0 .../Get-EntraDomainVerificationDnsRecord.md | 0 .../Get-EntraExtensionProperty.md | 0 .../Get-EntraFederationProperty.md | 0 .../Get-EntraObjectByObjectId.md | 0 .../Get-EntraPartnerInformation.md | 0 .../Get-EntraPasswordPolicy.md | 0 .../Get-EntraScopedRoleMembership.md | 0 .../Get-EntraSubscribedSku.md | 0 .../Get-EntraTenantDetail.md | 0 .../Get-EntraUserAuthenticationMethod.md | 0 .../New-EntraAdministrativeUnit.md | 0 .../New-EntraAttributeSet.md | 0 ...-EntraCustomSecurityAttributeDefinition.md | 0 .../New-EntraDevice.md | 0 .../New-EntraDomain.md | 0 .../Remove-EntraAdministrativeUnit.md | 0 .../Remove-EntraAdministrativeUnitMember.md | 0 .../Remove-EntraContact.md | 0 .../Remove-EntraDevice.md | 0 .../Remove-EntraDeviceRegisteredOwner.md | 0 .../Remove-EntraDeviceRegisteredUser.md | 0 .../Remove-EntraDirectoryRoleMember.md | 0 .../Remove-EntraDomain.md | 0 .../Remove-EntraExternalDomainFederation.md | 0 .../Remove-EntraScopedRoleMembership.md | 0 .../Restore-EntraDeletedDirectoryObject.md | 0 .../Set-EntraAdministrativeUnit.md | 0 .../Set-EntraAttributeSet.md | 0 ...-EntraCustomSecurityAttributeDefinition.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Set-EntraDevice.md | 0 .../Set-EntraDirSyncConfiguration.md | 0 .../Set-EntraDirSyncEnabled.md | 0 .../Set-EntraDirSyncFeature.md | 0 .../Set-EntraDomain.md | 0 .../Set-EntraDomainFederationSettings.md | 0 .../Set-EntraPartnerInformation.md | 0 .../Set-EntraTenantDetail.md | 0 .../Update-EntraOauth2PermissionGrant.md | 0 .../Get-EntraDirectoryRoleAssignment.md | 0 .../Get-EntraDirectoryRoleDefinition.md | 0 .../New-EntraDirectoryRoleAssignment.md | 0 .../New-EntraDirectoryRoleDefinition.md | 0 .../Remove-EntraDirectoryRoleAssignment.md | 0 .../Remove-EntraDirectoryRoleDefinition.md | 0 .../Set-EntraDirectoryRoleDefinition.md | 0 .../Add-EntraGroupMember.md | 0 .../Add-EntraGroupOwner.md | 0 .../Add-EntraLifecyclePolicyGroup.md | 0 .../Get-EntraDeletedGroup.md | 0 .../Get-EntraGroup.md | 0 .../Get-EntraGroupAppRoleAssignment.md | 0 .../Get-EntraGroupLifecyclePolicy.md | 0 .../Get-EntraGroupMember.md | 0 .../Get-EntraGroupOwner.md | 0 .../Get-EntraGroupPermissionGrant.md | 0 .../Get-EntraLifecyclePolicyGroup.md | 0 .../Get-EntraObjectSetting.md | 0 .../New-EntraGroup.md | 0 .../New-EntraGroupAppRoleAssignment.md | 0 .../New-EntraGroupLifecyclePolicy.md | 0 .../Remove-EntraGroup.md | 0 .../Remove-EntraGroupAppRoleAssignment.md | 0 .../Remove-EntraGroupLifecyclePolicy.md | 0 .../Remove-EntraGroupMember.md | 0 .../Remove-EntraGroupOwner.md | 0 .../Remove-EntraLifecyclePolicyGroup.md | 0 .../Reset-EntraLifeCycleGroup.md | 0 .../Select-EntraGroupIdsContactIsMemberOf.md | 0 .../Select-EntraGroupIdsGroupIsMemberOf.md | 0 .../Select-EntraGroupIdsUserIsMemberOf.md | 0 .../Set-EntraGroup.md | 0 .../Set-EntraGroupLifecyclePolicy.md | 0 .../Get-EntraAuditDirectoryLog.md | 0 .../Get-EntraAuditSignInLog.md | 0 .../Get-EntraAuthorizationPolicy.md | 0 .../Get-EntraConditionalAccessPolicy.md | 0 .../Get-EntraFeatureRolloutPolicy.md | 0 .../Get-EntraIdentityProvider.md | 0 .../Get-EntraNamedLocationPolicy.md | 0 .../Get-EntraOAuth2PermissionGrant.md | 0 .../Get-EntraPermissionGrantConditionSet.md | 0 .../Get-EntraPermissionGrantPolicy.md | 0 .../Get-EntraPolicy.md | 0 .../Get-EntraTrustedCertificateAuthority.md | 0 .../New-EntraConditionalAccessPolicy.md | 0 .../New-EntraFeatureRolloutPolicy.md | 0 .../New-EntraIdentityProvider.md | 0 .../New-EntraNamedLocationPolicy.md | 0 .../New-EntraOauth2PermissionGrant.md | 0 .../New-EntraPermissionGrantConditionSet.md | 0 .../New-EntraPermissionGrantPolicy.md | 0 .../New-EntraPolicy.md | 0 .../New-EntraTrustedCertificateAuthority.md | 0 .../Remove-EntraConditionalAccessPolicy.md | 0 .../Remove-EntraFeatureRolloutPolicy.md | 0 ...ntraFeatureRolloutPolicyDirectoryObject.md | 0 .../Remove-EntraIdentityProvider.md | 0 .../Remove-EntraNamedLocationPolicy.md | 0 .../Remove-EntraOAuth2PermissionGrant.md | 0 ...Remove-EntraPermissionGrantConditionSet.md | 0 .../Remove-EntraPermissionGrantPolicy.md | 0 .../Remove-EntraPolicy.md | 0 ...Remove-EntraTrustedCertificateAuthority.md | 0 .../Set-EntraAuthorizationPolicy.md | 0 .../Set-EntraConditionalAccessPolicy.md | 0 .../Set-EntraFeatureRolloutPolicy.md | 0 .../Set-EntraIdentityProvider.md | 0 .../Set-EntraNamedLocationPolicy.md | 0 .../Set-EntraPermissionGrantConditionSet.md | 0 .../Set-EntraPermissionGrantPolicy.md | 0 .../Set-EntraPolicy.md | 0 .../Set-EntraTrustedCertificateAuthority.md | 0 .../Get-EntraUser.md | 0 .../Get-EntraUserAppRoleAssignment.md | 0 .../Get-EntraUserCreatedObject.md | 0 .../Get-EntraUserDirectReport.md | 0 .../Get-EntraUserExtension.md | 0 .../Get-EntraUserLicenseDetail.md | 0 .../Get-EntraUserManager.md | 0 .../Get-EntraUserMembership.md | 0 .../Get-EntraUserOAuth2PermissionGrant.md | 0 .../Get-EntraUserOwnedDevice.md | 0 .../Get-EntraUserOwnedObject.md | 0 .../Get-EntraUserRegisteredDevice.md | 0 .../Get-EntraUserThumbnailPhoto.md | 0 .../New-EntraUser.md | 0 .../New-EntraUserAppRoleAssignment.md | 0 .../Remove-EntraUser.md | 0 .../Remove-EntraUserAppRoleAssignment.md | 0 .../Remove-EntraUserExtension.md | 0 .../Remove-EntraUserManager.md | 0 .../Set-EntraUser.md | 0 .../Set-EntraUserExtension.md | 0 .../Set-EntraUserLicense.md | 0 .../Set-EntraUserManager.md | 0 .../Set-EntraUserPassword.md | 0 .../Set-EntraUserThumbnailPhoto.md | 0 .../Update-EntraSignedInUserPassword.md | 0 .../Update-EntraUserFromFederated.md | 0 .../EntraBeta/config/moduleMapping.json | 291 ----------------- .../.sourcemap-maml-0.json | 0 .../Add-EntraAdministrativeUnitMember.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Add-EntraEnvironment.ps1 | 0 .../Add-EntraScopedRoleMembership.ps1 | 0 .../AdditionalFunctions/Connect-Entra.ps1 | 0 .../AdditionalFunctions/Disconnect-Entra.ps1 | 0 .../Find-EntraPermission.ps1 | 0 .../Get-EntraAccountSku.ps1 | 0 .../Get-EntraAdministrativeUnit.ps1 | 0 .../Get-EntraAdministrativeUnitMember.ps1 | 0 .../Get-EntraApplicationTemplate.ps1 | 0 .../Get-EntraAttributeSet.ps1 | 0 .../Get-EntraAuditDirectoryLog.ps1 | 0 .../Get-EntraAuditSignInLog.ps1 | 0 .../Get-EntraAuthorizationPolicy.ps1 | 0 .../AdditionalFunctions/Get-EntraContext.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Get-EntraDirSyncConfiguration.ps1 | 0 .../Get-EntraDirSyncFeature.ps1 | 0 ...ctoryObjectOnPremisesProvisioningError.ps1 | 0 .../Get-EntraDomainFederationSettings.ps1 | 0 .../Get-EntraEnvironment.ps1 | 0 .../Get-EntraFeatureRolloutPolicy.ps1 | 0 .../Get-EntraFederationProperty.ps1 | 0 .../Get-EntraObjectSetting.ps1 | 0 .../Get-EntraPartnerInformation.ps1 | 0 .../Get-EntraPasswordPolicy.ps1 | 0 .../AdditionalFunctions/Get-EntraPolicy.ps1 | 0 .../Get-EntraScopedRoleMembership.ps1 | 0 .../Get-EntraUserAuthenticationMethod.ps1 | 0 .../New-EntraAdministrativeUnit.ps1 | 0 ...ntraApplicationFromApplicationTemplate.ps1 | 0 .../New-EntraAttributeSet.ps1 | 0 .../New-EntraCustomHeaders.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 .../New-EntraFeatureRolloutPolicy.ps1 | 0 .../New-EntraOauth2PermissionGrant.ps1 | 0 .../AdditionalFunctions/New-EntraPolicy.ps1 | 0 .../Entra/AdditionalFunctions/README.md | 0 .../Remove-EntraAdministrativeUnit.ps1 | 0 .../Remove-EntraAdministrativeUnitMember.ps1 | 0 .../Remove-EntraFeatureRolloutPolicy.ps1 | 0 ...traFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../Remove-EntraPolicy.ps1 | 0 .../Remove-EntraScopedRoleMembership.ps1 | 0 ...t-EntraStrongAuthenticationMethodByUpn.ps1 | 0 .../Restore-EntraDeletedDirectoryObject.ps1 | 0 .../Set-EntraAdministrativeUnit.ps1 | 0 .../Set-EntraAttributeSet.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Set-EntraDirSyncConfiguration.ps1 | 0 .../Set-EntraDirSyncEnabled.ps1 | 0 .../Set-EntraDirSyncFeature.ps1 | 0 .../Set-EntraDomainFederationSettings.ps1 | 0 .../Set-EntraFeatureRolloutPolicy.ps1 | 0 .../Set-EntraPartnerInformation.ps1 | 0 .../AdditionalFunctions/Set-EntraPolicy.ps1 | 0 .../Set-EntraServicePrincipal.ps1 | 0 .../AdditionalFunctions/Test-EntraScript.ps1 | 0 .../Update-EntraOAuth2PermissionGrant.ps1 | 0 .../Update-EntraUserFromFederated.ps1 | 1 + .../Entra/config/ModuleMetadata.json | 0 .../Entra/config/ModuleSettings.json | 0 .../Entra/config/dependencyMapping.json | 0 .../Entra/config/moduleMapping.json | 0 .../Add-EntraApplicationOwner.ps1 | 0 .../Add-EntraDeviceRegisteredOwner.ps1 | 0 .../Add-EntraDeviceRegisteredUser.ps1 | 0 .../Add-EntraDirectoryRoleMember.ps1 | 0 .../customizations/Add-EntraGroupMember.ps1 | 0 .../customizations/Add-EntraGroupOwner.ps1 | 0 .../Add-EntraLifecyclePolicyGroup.ps1 | 0 .../Add-EntraServicePrincipalOwner.ps1 | 0 .../customizations/Confirm-EntraDomain.ps1 | 0 .../Entra/customizations/Generic.ps1 | 0 .../customizations/Get-EntraApplication.ps1 | 0 .../Get-EntraApplicationKeyCredential.ps1 | 0 .../Get-EntraApplicationLogo.ps1 | 0 .../Get-EntraApplicationOwner.ps1 | 0 ...Get-EntraApplicationPasswordCredential.ps1 | 0 .../Get-EntraApplicationServiceEndpoint.ps1 | 0 .../Get-EntraConditionalAccessPolicy.ps1 | 0 .../Entra/customizations/Get-EntraContact.ps1 | 0 .../Get-EntraContactDirectReport.ps1 | 0 .../Get-EntraContactMembership.ps1 | 0 .../Get-EntraDeletedApplication.ps1 | 0 .../Get-EntraDeletedDirectoryObject.ps1 | 0 .../customizations/Get-EntraDeletedGroup.ps1 | 0 .../Entra/customizations/Get-EntraDevice.ps1 | 0 .../Get-EntraDeviceRegisteredOwner.ps1 | 0 .../Get-EntraDeviceRegisteredUser.ps1 | 0 .../Get-EntraDirectoryRoleAssignment.ps1 | 0 .../Get-EntraDirectoryRoleDefinition.ps1 | 0 .../Get-EntraDirectoryRoleMember.ps1 | 0 .../Entra/customizations/Get-EntraDomain.ps1 | 0 .../Get-EntraDomainNameReference.ps1 | 0 ...-EntraDomainServiceConfigurationRecord.ps1 | 0 .../Get-EntraDomainVerificationDnsRecord.ps1 | 0 .../Get-EntraExtensionProperty.ps1 | 0 .../Entra/customizations/Get-EntraGroup.ps1 | 0 .../Get-EntraGroupAppRoleAssignment.ps1 | 0 .../customizations/Get-EntraGroupMember.ps1 | 0 .../customizations/Get-EntraGroupOwner.ps1 | 0 .../Get-EntraIdentityProvider.ps1 | 0 .../Get-EntraLifecyclePolicyGroup.ps1 | 0 .../Get-EntraNamedLocationPolicy.ps1 | 0 .../Get-EntraObjectByObjectId.ps1 | 0 .../Get-EntraPermissionGrantConditionSet.ps1 | 0 .../Get-EntraPermissionGrantPolicy.ps1 | 0 .../Get-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignedTo.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...Get-EntraServicePrincipalCreatedObject.ps1 | 0 ...Get-EntraServicePrincipalKeyCredential.ps1 | 0 .../Get-EntraServicePrincipalMembership.ps1 | 0 ...aServicePrincipalOAuth2PermissionGrant.ps1 | 0 .../Get-EntraServicePrincipalOwnedObject.ps1 | 0 .../Get-EntraServicePrincipalOwner.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../customizations/Get-EntraSubscribedSku.ps1 | 0 .../customizations/Get-EntraTenantDetail.ps1 | 0 .../Get-EntraTrustedCertificateAuthority.ps1 | 0 .../Entra/customizations/Get-EntraUser.ps1 | 0 .../Get-EntraUserAppRoleAssignment.ps1 | 0 .../Get-EntraUserCreatedObject.ps1 | 0 .../Get-EntraUserDirectReport.ps1 | 0 .../customizations/Get-EntraUserExtension.ps1 | 0 .../Get-EntraUserLicenseDetail.ps1 | 0 .../customizations/Get-EntraUserManager.ps1 | 0 .../Get-EntraUserMembership.ps1 | 0 .../Get-EntraUserOAuth2PermissionGrant.ps1 | 0 .../Get-EntraUserOwnedDevice.ps1 | 0 .../Get-EntraUserOwnedObject.ps1 | 0 .../Get-EntraUserRegisteredDevice.ps1 | 0 .../Get-EntraUserThumbnailPhoto.ps1 | 0 .../customizations/New-EntraApplication.ps1 | 0 .../New-EntraApplicationExtensionProperty.ps1 | 0 .../New-EntraApplicationKeyCredential.ps1 | 0 .../New-EntraApplicationPassword.ps1 | 0 ...New-EntraApplicationPasswordCredential.ps1 | 0 .../New-EntraConditionalAccessPolicy.ps1 | 0 .../New-EntraDirectoryRoleAssignment.ps1 | 0 .../New-EntraDirectoryRoleDefinition.ps1 | 0 .../Entra/customizations/New-EntraDomain.ps1 | 0 .../New-EntraGroupAppRoleAssignment.ps1 | 0 .../New-EntraIdentityProvider.ps1 | 0 .../customizations/New-EntraInvitation.ps1 | 0 .../New-EntraNamedLocationPolicy.ps1 | 0 .../New-EntraPermissionGrantConditionSet.ps1 | 0 .../New-EntraPermissionGrantPolicy.ps1 | 0 .../New-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../New-EntraTrustedCertificateAuthority.ps1 | 0 .../Entra/customizations/New-EntraUser.ps1 | 0 .../New-EntraUserAppRoleAssignment.ps1 | 0 .../Entra/customizations/README.md | 0 .../Remove-EntraAdministrativeUnit.ps1 | 0 .../Remove-EntraAdministrativeUnitMember.ps1 | 0 .../Remove-EntraApplicationKeyCredential.ps1 | 0 .../Remove-EntraApplicationOwner.ps1 | 0 ...ove-EntraApplicationPasswordCredential.ps1 | 0 ...move-EntraApplicationVerifiedPublisher.ps1 | 0 .../Remove-EntraConditionalAccessPolicy.ps1 | 0 .../Remove-EntraDeletedApplication.ps1 | 0 .../Remove-EntraDeletedDirectoryObject.ps1 | 0 .../Remove-EntraDeviceRegisteredOwner.ps1 | 0 .../Remove-EntraDeviceRegisteredUser.ps1 | 0 .../Remove-EntraDirectoryRoleAssignment.ps1 | 0 .../Remove-EntraDirectoryRoleDefinition.ps1 | 0 .../Remove-EntraDirectoryRoleMember.ps1 | 0 .../customizations/Remove-EntraDomain.ps1 | 0 .../Remove-EntraGroupAppRoleAssignment.ps1 | 0 .../Remove-EntraGroupMember.ps1 | 0 .../customizations/Remove-EntraGroupOwner.ps1 | 0 .../Remove-EntraLifecyclePolicyGroup.ps1 | 0 .../Remove-EntraNamedLocationPolicy.ps1 | 0 ...emove-EntraPermissionGrantConditionSet.ps1 | 0 .../Remove-EntraPermissionGrantPolicy.ps1 | 0 .../Remove-EntraScopedRoleMembership.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...ove-EntraServicePrincipalKeyCredential.ps1 | 0 .../Remove-EntraServicePrincipalOwner.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 ...emove-EntraTrustedCertificateAuthority.ps1 | 0 .../Remove-EntraUserAppRoleAssignment.ps1 | 0 .../Remove-EntraUserManager.ps1 | 0 .../Reset-EntraLifeCycleGroup.ps1 | 0 .../Restore-EntraDeletedApplication.ps1 | 0 ...evoke-EntraSignedInUserAllRefreshToken.ps1 | 0 .../Revoke-EntraUserAllRefreshToken.ps1 | 0 .../Select-EntraGroupIdsContactIsMemberOf.ps1 | 0 .../Select-EntraGroupIdsGroupIsMemberOf.ps1 | 0 ...ntraGroupIdsServicePrincipalIsMemberOf.ps1 | 0 .../Select-EntraGroupIdsUserIsMemberOf.ps1 | 0 .../customizations/Set-EntraApplication.ps1 | 0 .../Set-EntraApplicationLogo.ps1 | 0 .../Set-EntraAuthorizationPolicy.ps1 | 0 .../Set-EntraConditionalAccessPolicy.ps1 | 0 .../Entra/customizations/Set-EntraDevice.ps1 | 0 .../Set-EntraDirectoryRoleDefinition.ps1 | 0 .../Entra/customizations/Set-EntraDomain.ps1 | 0 .../Set-EntraIdentityProvider.ps1 | 0 .../Set-EntraNamedLocationPolicy.ps1 | 0 .../Set-EntraPermissionGrantConditionSet.ps1 | 0 .../Set-EntraPermissionGrantPolicy.ps1 | 0 .../customizations/Set-EntraTenantDetail.ps1 | 0 .../Set-EntraTrustedCertificateAuthority.ps1 | 0 .../Entra/customizations/Set-EntraUser.ps1 | 0 .../customizations/Set-EntraUserExtension.ps1 | 0 .../customizations/Set-EntraUserLicense.ps1 | 0 .../customizations/Set-EntraUserManager.ps1 | 0 .../customizations/Set-EntraUserPassword.ps1 | 0 .../Set-EntraUserThumbnailPhoto.ps1 | 0 .../Entra/customizations/Types.ps1 | 0 .../Update-EntraSignedInUserPassword.ps1 | 0 .../Confirm-EntraBetaDomain.ps1 | 0 .../AdditionalFunctions/Connect-Entra.ps1 | 0 .../AdditionalFunctions/Disconnect-Entra.ps1 | 0 ...able-EntraBetaGlobalSecureAccessTenant.ps1 | 0 .../Get-EntraBetaAccountSku.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 ...Get-EntraBetaApplicationProxyConnector.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 ...aApplicationProxyConnectorGroupMembers.ps1 | 0 ...aBetaApplicationProxyConnectorMemberOf.ps1 | 0 .../Get-EntraBetaDirSyncConfiguration.ps1 | 0 .../Get-EntraBetaDirSyncFeature.ps1 | 0 ...ctoryObjectOnPremisesProvisioningError.ps1 | 0 .../Get-EntraBetaDomainFederationSettings.ps1 | 0 .../Get-EntraBetaFederationProperty.ps1 | 0 ...ntraBetaGlobalSecureAccessTenantStatus.ps1 | 0 .../Get-EntraBetaPartnerInformation.ps1 | 0 .../Get-EntraBetaPasswordPolicy.ps1 | 0 .../Get-EntraBetaPrivateAccessApplication.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 .../Get-EntraBetaUserAuthenticationMethod.ps1 | 0 ...EntraBetaUserAuthenticationRequirement.ps1 | 0 .../AdditionalFunctions/Get-EntraContext.ps1 | 0 ...w-EntraBetaApplicationProxyApplication.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 0 .../New-EntraBetaOauth2PermissionGrant.ps1 | 0 .../New-EntraBetaPrivateAccessApplication.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 .../EntraBeta/AdditionalFunctions/README.md | 0 ...licationProxyApplicationConnectorGroup.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 ...traBetaStrongAuthenticationMethodByUpn.ps1 | 0 ...estore-EntraBetaDeletedDirectoryObject.ps1 | 0 ...t-EntraBetaApplicationProxyApplication.ps1 | 0 ...licationProxyApplicationConnectorGroup.ps1 | 0 ...pplicationProxyApplicationSingleSignOn.ps1 | 0 ...Set-EntraBetaApplicationProxyConnector.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 .../Set-EntraBetaDirSyncConfiguration.ps1 | 0 .../Set-EntraBetaDirSyncEnabled.ps1 | 0 .../Set-EntraBetaDirSyncFeature.ps1 | 0 .../Set-EntraBetaDomainFederationSettings.ps1 | 0 .../Set-EntraBetaPartnerInformation.ps1 | 0 .../Set-EntraBetaServicePrincipal.ps1 | 0 .../AdditionalFunctions/Test-EntraScript.ps1 | 0 .../Update-EntraBetaOauth2PermissionGrant.ps1 | 0 ...EntraBetaUserAuthenticationRequirement.ps1 | 0 .../Update-EntraBetaUserFromFederated.ps1 | 1 + .../EntraBeta/config/ModuleMetadata.json | 0 .../EntraBeta/config/ModuleSettings.json | 0 .../EntraBeta/config/dependencyMapping.json | 3 +- .../EntraBeta/config/moduleMapping.json | 16 + .../Add-EntraBetaAdministrativeUnitMember.ps1 | 0 .../Add-EntraBetaApplicationOwner.ps1 | 0 .../Add-EntraBetaApplicationPolicy.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Add-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Add-EntraBetaDeviceRegisteredUser.ps1 | 0 .../Add-EntraBetaDirectoryRoleMember.ps1 | 0 ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../Add-EntraBetaGroupMember.ps1 | 0 .../Add-EntraBetaGroupOwner.ps1 | 0 .../Add-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Add-EntraBetaScopedRoleMembership.ps1 | 0 .../Add-EntraBetaServicePrincipalOwner.ps1 | 0 .../Add-EntraBetaServicePrincipalPolicy.ps1 | 0 .../EntraBeta/customizations/Generic.ps1 | 0 .../Get-EntraBetaApplication.ps1 | 0 .../Get-EntraBetaApplicationKeyCredential.ps1 | 0 .../Get-EntraBetaApplicationLogo.ps1 | 0 .../Get-EntraBetaApplicationOwner.ps1 | 0 .../Get-EntraBetaApplicationPolicy.ps1 | 0 ...t-EntraBetaApplicationProxyApplication.ps1 | 0 ...raBetaApplicationSignInDetailedSummary.ps1 | 0 .../Get-EntraBetaApplicationSignInSummary.ps1 | 0 .../Get-EntraBetaApplicationTemplate.ps1 | 0 .../Get-EntraBetaAttributeSet.ps1 | 0 .../Get-EntraBetaAuditDirectoryLog.ps1 | 0 .../Get-EntraBetaAuditSignInLog.ps1 | 0 .../Get-EntraBetaAuthorizationPolicy.ps1 | 0 .../Get-EntraBetaConditionalAccessPolicy.ps1 | 0 .../customizations/Get-EntraBetaContact.ps1 | 0 .../Get-EntraBetaContactDirectReport.ps1 | 0 .../Get-EntraBetaContactMembership.ps1 | 0 ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Get-EntraBetaDeletedApplication.ps1 | 0 .../Get-EntraBetaDeletedDirectoryObject.ps1 | 0 .../Get-EntraBetaDeletedGroup.ps1 | 0 .../customizations/Get-EntraBetaDevice.ps1 | 0 .../Get-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Get-EntraBetaDeviceRegisteredUser.ps1 | 0 .../Get-EntraBetaDirectoryRoleAssignment.ps1 | 0 .../Get-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../Get-EntraBetaDirectoryRoleMember.ps1 | 0 .../Get-EntraBetaDirectorySettingTemplate.ps1 | 0 .../customizations/Get-EntraBetaDomain.ps1 | 0 .../Get-EntraBetaDomainNameReference.ps1 | 0 ...raBetaDomainServiceConfigurationRecord.ps1 | 0 ...t-EntraBetaDomainVerificationDnsRecord.ps1 | 0 .../Get-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../customizations/Get-EntraBetaGroup.ps1 | 0 .../Get-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../Get-EntraBetaGroupMember.ps1 | 0 .../Get-EntraBetaGroupOwner.ps1 | 0 .../Get-EntraBetaIdentityProvider.ps1 | 0 .../Get-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Get-EntraBetaNamedLocationPolicy.ps1 | 0 .../Get-EntraBetaObjectByObjectId.ps1 | 0 .../Get-EntraBetaObjectSetting.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 ...t-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Get-EntraBetaPermissionGrantPolicy.ps1 | 0 .../customizations/Get-EntraBetaPolicy.ps1 | 0 .../Get-EntraBetaPolicyAppliedObject.ps1 | 0 .../Get-EntraBetaPrivilegedResource.ps1 | 0 .../Get-EntraBetaPrivilegedRoleDefinition.ps1 | 0 .../Get-EntraBetaPrivilegedRoleSetting.ps1 | 0 .../Get-EntraBetaScopedRoleMembership.ps1 | 0 .../Get-EntraBetaServicePrincipal.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignedTo.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...EntraBetaServicePrincipalCreatedObject.ps1 | 0 ...EntraBetaServicePrincipalKeyCredential.ps1 | 0 ...et-EntraBetaServicePrincipalMembership.ps1 | 0 ...aServicePrincipalOAuth2PermissionGrant.ps1 | 0 ...t-EntraBetaServicePrincipalOwnedObject.ps1 | 0 .../Get-EntraBetaServicePrincipalOwner.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 .../Get-EntraBetaServicePrincipalPolicy.ps1 | 0 .../Get-EntraBetaSubscribedSku.ps1 | 0 .../Get-EntraBetaTenantDetail.ps1 | 0 .../Get-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...t-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../customizations/Get-EntraBetaUser.ps1 | 0 .../Get-EntraBetaUserAppRoleAssignment.ps1 | 0 .../Get-EntraBetaUserCreatedObject.ps1 | 0 .../Get-EntraBetaUserDirectReport.ps1 | 0 .../Get-EntraBetaUserExtension.ps1 | 0 .../Get-EntraBetaUserLicenseDetail.ps1 | 0 .../Get-EntraBetaUserManager.ps1 | 0 .../Get-EntraBetaUserMembership.ps1 | 0 ...Get-EntraBetaUserOAuth2PermissionGrant.ps1 | 0 .../Get-EntraBetaUserOwnedDevice.ps1 | 0 .../Get-EntraBetaUserOwnedObject.ps1 | 0 .../Get-EntraBetaUserRegisteredDevice.ps1 | 0 .../Get-EntraBetaUserThumbnailPhoto.ps1 | 0 .../New-EntraBetaAdministrativeUnit.ps1 | 0 .../New-EntraBetaAdministrativeUnitMember.ps1 | 0 .../New-EntraBetaApplication.ps1 | 0 ...-EntraBetaApplicationExtensionProperty.ps1 | 0 ...BetaApplicationFromApplicationTemplate.ps1 | 0 .../New-EntraBetaApplicationKeyCredential.ps1 | 0 .../New-EntraBetaApplicationPassword.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 .../New-EntraBetaAttributeSet.ps1 | 0 .../New-EntraBetaConditionalAccessPolicy.ps1 | 0 ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 .../New-EntraBetaDirectoryRoleAssignment.ps1 | 0 .../New-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../New-EntraBetaDirectorySetting.ps1 | 0 .../customizations/New-EntraBetaDomain.ps1 | 0 .../New-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../New-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../New-EntraBetaIdentityProvider.ps1 | 0 .../New-EntraBetaInvitation.ps1 | 0 .../New-EntraBetaNamedLocationPolicy.ps1 | 0 .../New-EntraBetaObjectSetting.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 ...w-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../New-EntraBetaPermissionGrantPolicy.ps1 | 0 .../customizations/New-EntraBetaPolicy.ps1 | 0 .../New-EntraBetaServicePrincipal.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 .../New-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...w-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../customizations/New-EntraBetaUser.ps1 | 0 .../New-EntraBetaUserAppRoleAssignment.ps1 | 0 ...move-EntraBetaAdministrativeUnitMember.ps1 | 0 ...move-EntraBetaApplicationKeyCredential.ps1 | 0 .../Remove-EntraBetaApplicationOwner.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 .../Remove-EntraBetaApplicationPolicy.ps1 | 0 ...e-EntraBetaApplicationProxyApplication.ps1 | 0 ...-EntraBetaApplicationVerifiedPublisher.ps1 | 0 ...emove-EntraBetaConditionalAccessPolicy.ps1 | 0 .../Remove-EntraBetaDeletedApplication.ps1 | 0 ...Remove-EntraBetaDeletedDirectoryObject.ps1 | 0 .../Remove-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Remove-EntraBetaDeviceRegisteredUser.ps1 | 0 ...emove-EntraBetaDirectoryRoleAssignment.ps1 | 0 ...emove-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../Remove-EntraBetaDirectoryRoleMember.ps1 | 0 .../customizations/Remove-EntraBetaDomain.ps1 | 0 .../Remove-EntraBetaFeatureRolloutPolicy.ps1 | 0 ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 0 ...Remove-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../Remove-EntraBetaGroupMember.ps1 | 0 .../Remove-EntraBetaGroupOwner.ps1 | 0 .../Remove-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Remove-EntraBetaNamedLocationPolicy.ps1 | 0 .../Remove-EntraBetaObjectSetting.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 ...e-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Remove-EntraBetaPermissionGrantPolicy.ps1 | 0 .../customizations/Remove-EntraBetaPolicy.ps1 | 0 .../Remove-EntraBetaScopedRoleMembership.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 .../Remove-EntraBetaServicePrincipalOwner.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 ...Remove-EntraBetaServicePrincipalPolicy.ps1 | 0 ...e-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../Remove-EntraBetaUserAppRoleAssignment.ps1 | 0 .../Remove-EntraBetaUserManager.ps1 | 0 .../Reset-EntraBetaLifeCycleGroup.ps1 | 0 .../Restore-EntraBetaDeletedApplication.ps1 | 0 ...e-EntraBetaSignedInUserAllRefreshToken.ps1 | 0 .../Revoke-EntraBetaUserAllRefreshToken.ps1 | 0 ...ect-EntraBetaGroupIdsContactIsMemberOf.ps1 | 0 ...elect-EntraBetaGroupIdsGroupIsMemberOf.ps1 | 0 ...BetaGroupIdsServicePrincipalIsMemberOf.ps1 | 0 ...Select-EntraBetaGroupIdsUserIsMemberOf.ps1 | 0 .../Set-EntraBetaAdministrativeUnit.ps1 | 0 .../Set-EntraBetaApplication.ps1 | 0 .../Set-EntraBetaApplicationLogo.ps1 | 0 .../Set-EntraBetaAttributeSet.ps1 | 0 .../Set-EntraBetaAuthorizationPolicy.ps1 | 0 .../Set-EntraBetaConditionalAccessPolicy.ps1 | 0 ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../customizations/Set-EntraBetaDevice.ps1 | 0 .../Set-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../Set-EntraBetaDirectorySetting.ps1 | 0 .../customizations/Set-EntraBetaDomain.ps1 | 0 .../Set-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../Set-EntraBetaIdentityProvider.ps1 | 0 .../Set-EntraBetaNamedLocationPolicy.ps1 | 0 .../Set-EntraBetaObjectSetting.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 ...t-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Set-EntraBetaPermissionGrantPolicy.ps1 | 0 .../customizations/Set-EntraBetaPolicy.ps1 | 0 .../Set-EntraBetaPrivilegedRoleSetting.ps1 | 0 .../Set-EntraBetaTenantDetail.ps1 | 0 .../Set-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...t-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../customizations/Set-EntraBetaUser.ps1 | 0 .../Set-EntraBetaUserLicense.ps1 | 0 .../Set-EntraBetaUserManager.ps1 | 0 .../Set-EntraBetaUserPassword.ps1 | 0 .../Set-EntraBetaUserThumbnailPhoto.ps1 | 0 .../EntraBeta/customizations/Types.ps1 | 0 .../Update-EntraBetaSignedInUserPassword.ps1 | 0 {module => module_legacy}/breadcrumb/toc.yml | 0 {module => module_legacy}/docfx.json | 0 .../Add-EntraBetaAdministrativeUnitMember.md | 0 .../Add-EntraBetaApplicationOwner.md | 0 .../Add-EntraBetaApplicationPolicy.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Add-EntraBetaDeviceRegisteredOwner.md | 0 .../Add-EntraBetaDeviceRegisteredUser.md | 0 .../Add-EntraBetaDirectoryRoleMember.md | 0 ...BetaFeatureRolloutPolicyDirectoryObject.md | 0 .../Add-EntraBetaGroupMember.md | 0 .../Add-EntraBetaGroupOwner.md | 0 .../Add-EntraBetaLifecyclePolicyGroup.md | 0 .../Add-EntraBetaScopedRoleMembership.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 .../Add-EntraBetaServicePrincipalOwner.md | 0 .../Add-EntraBetaServicePrincipalPolicy.md | 0 .../Confirm-EntraBetaDomain.md | 0 .../Connect-Entra.md | 0 .../Disconnect-Entra.md | 0 .../Enable-EntraAzureADAlias.md | 0 .../Enable-EntraBetaDirectoryRole.md | 0 .../Get-EntraBetaAccountSku.md | 0 .../Get-EntraBetaAdministrativeUnit.md | 0 .../Get-EntraBetaAdministrativeUnitMember.md | 0 .../Get-EntraBetaApplication.md | 0 ...t-EntraBetaApplicationExtensionProperty.md | 0 .../Get-EntraBetaApplicationKeyCredential.md | 0 .../Get-EntraBetaApplicationLogo.md | 0 .../Get-EntraBetaApplicationOwner.md | 0 ...-EntraBetaApplicationPasswordCredential.md | 0 .../Get-EntraBetaApplicationPolicy.md | 0 ...et-EntraBetaApplicationProxyApplication.md | 0 ...plicationProxyApplicationConnectorGroup.md | 0 .../Get-EntraBetaApplicationProxyConnector.md | 0 ...EntraBetaApplicationProxyConnectorGroup.md | 0 ...taApplicationProxyConnectorGroupMembers.md | 0 ...raBetaApplicationProxyConnectorMemberOf.md | 0 ...Get-EntraBetaApplicationServiceEndpoint.md | 0 ...traBetaApplicationSignInDetailedSummary.md | 0 .../Get-EntraBetaApplicationSignInSummary.md | 0 .../Get-EntraBetaApplicationTemplate.md | 0 .../Get-EntraBetaAttributeSet.md | 0 .../Get-EntraBetaAuditDirectoryLog.md | 0 .../Get-EntraBetaAuditSignInLog.md | 0 .../Get-EntraBetaAuthorizationPolicy.md | 0 .../Get-EntraBetaConditionalAccessPolicy.md | 0 .../Get-EntraBetaContact.md | 0 .../Get-EntraBetaContactDirectReport.md | 0 .../Get-EntraBetaContactManager.md | 0 .../Get-EntraBetaContactMembership.md | 0 .../Get-EntraBetaContract.md | 0 ...raBetaCustomSecurityAttributeDefinition.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Get-EntraBetaDeletedApplication.md | 0 .../Get-EntraBetaDeletedDirectoryObject.md | 0 .../Get-EntraBetaDeletedGroup.md | 0 .../Get-EntraBetaDevice.md | 0 .../Get-EntraBetaDeviceRegisteredOwner.md | 0 .../Get-EntraBetaDeviceRegisteredUser.md | 0 .../Get-EntraBetaDirSyncConfiguration.md | 0 .../Get-EntraBetaDirSyncFeature.md | 0 ...ectoryObjectOnPremisesProvisioningError.md | 0 .../Get-EntraBetaDirectoryRole.md | 0 .../Get-EntraBetaDirectoryRoleAssignment.md | 0 .../Get-EntraBetaDirectoryRoleDefinition.md | 0 .../Get-EntraBetaDirectoryRoleMember.md | 0 .../Get-EntraBetaDirectoryRoleTemplate.md | 0 .../Get-EntraBetaDirectorySetting.md | 0 .../Get-EntraBetaDirectorySettingTemplate.md | 0 .../Get-EntraBetaDomain.md | 0 .../Get-EntraBetaDomainFederationSettings.md | 0 .../Get-EntraBetaDomainNameReference.md | 0 ...traBetaDomainServiceConfigurationRecord.md | 0 ...et-EntraBetaDomainVerificationDnsRecord.md | 0 .../Get-EntraBetaFeatureRolloutPolicy.md | 0 .../Get-EntraBetaFederationProperty.md | 0 .../Get-EntraBetaGroup.md | 0 .../Get-EntraBetaGroupAppRoleAssignment.md | 0 .../Get-EntraBetaGroupLifecyclePolicy.md | 0 .../Get-EntraBetaGroupMember.md | 0 .../Get-EntraBetaGroupOwner.md | 0 .../Get-EntraBetaGroupPermissionGrant.md | 0 .../Get-EntraBetaIdentityProvider.md | 0 .../Get-EntraBetaLifecyclePolicyGroup.md | 0 .../Get-EntraBetaNamedLocationPolicy.md | 0 .../Get-EntraBetaOAuth2PermissionGrant.md | 0 .../Get-EntraBetaObjectByObjectId.md | 0 .../Get-EntraBetaObjectSetting.md | 0 .../Get-EntraBetaPartnerInformation.md | 0 .../Get-EntraBetaPasswordPolicy.md | 0 ...EntraBetaPasswordSingleSignOnCredential.md | 0 ...et-EntraBetaPermissionGrantConditionSet.md | 0 .../Get-EntraBetaPermissionGrantPolicy.md | 0 .../Get-EntraBetaPolicy.md | 0 .../Get-EntraBetaPolicyAppliedObject.md | 0 ...ntraBetaPrivateAccessApplicationSegment.md | 0 .../Get-EntraBetaPrivilegedResource.md | 0 .../Get-EntraBetaPrivilegedRole.md | 0 .../Get-EntraBetaPrivilegedRoleDefinition.md | 0 .../Get-EntraBetaPrivilegedRoleSetting.md | 0 .../Get-EntraBetaScopedRoleMembership.md | 0 .../Get-EntraBetaServicePrincipal.md | 0 ...raBetaServicePrincipalAppRoleAssignedTo.md | 0 ...raBetaServicePrincipalAppRoleAssignment.md | 0 ...-EntraBetaServicePrincipalCreatedObject.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 ...-EntraBetaServicePrincipalKeyCredential.md | 0 ...Get-EntraBetaServicePrincipalMembership.md | 0 ...taServicePrincipalOAuth2PermissionGrant.md | 0 ...et-EntraBetaServicePrincipalOwnedObject.md | 0 .../Get-EntraBetaServicePrincipalOwner.md | 0 ...aBetaServicePrincipalPasswordCredential.md | 0 .../Get-EntraBetaServicePrincipalPolicy.md | 0 .../Get-EntraBetaSubscribedSku.md | 0 .../Get-EntraBetaTenantDetail.md | 0 .../Get-EntraBetaTrustFrameworkPolicy.md | 0 ...et-EntraBetaTrustedCertificateAuthority.md | 0 .../Get-EntraBetaUser.md | 0 .../Get-EntraBetaUserAppRoleAssignment.md | 0 .../Get-EntraBetaUserCreatedObject.md | 0 .../Get-EntraBetaUserDirectReport.md | 0 .../Get-EntraBetaUserExtension.md | 0 .../Get-EntraBetaUserLicenseDetail.md | 0 .../Get-EntraBetaUserManager.md | 0 .../Get-EntraBetaUserMembership.md | 0 .../Get-EntraBetaUserOAuth2PermissionGrant.md | 0 .../Get-EntraBetaUserOwnedDevice.md | 0 .../Get-EntraBetaUserOwnedObject.md | 0 .../Get-EntraBetaUserRegisteredDevice.md | 0 .../Get-EntraBetaUserThumbnailPhoto.md | 0 .../Get-EntraContext.md | 0 .../New-EntraBetaAdministrativeUnit.md | 0 .../New-EntraBetaAdministrativeUnitMember.md | 0 .../New-EntraBetaApplication.md | 0 ...w-EntraBetaApplicationExtensionProperty.md | 0 ...aBetaApplicationFromApplicationTemplate.md | 0 .../New-EntraBetaApplicationKey.md | 0 .../New-EntraBetaApplicationKeyCredential.md | 0 .../New-EntraBetaApplicationPassword.md | 0 ...-EntraBetaApplicationPasswordCredential.md | 0 ...ew-EntraBetaApplicationProxyApplication.md | 0 ...EntraBetaApplicationProxyConnectorGroup.md | 0 .../New-EntraBetaAttributeSet.md | 0 .../New-EntraBetaConditionalAccessPolicy.md | 0 ...raBetaCustomSecurityAttributeDefinition.md | 0 .../New-EntraBetaDevice.md | 0 .../New-EntraBetaDirectoryRoleAssignment.md | 0 .../New-EntraBetaDirectoryRoleDefinition.md | 0 .../New-EntraBetaDirectorySetting.md | 0 .../New-EntraBetaDomain.md | 0 .../New-EntraBetaFeatureRolloutPolicy.md | 0 .../New-EntraBetaGroup.md | 0 .../New-EntraBetaGroupAppRoleAssignment.md | 0 .../New-EntraBetaGroupLifecyclePolicy.md | 0 .../New-EntraBetaIdentityProvider.md | 0 .../New-EntraBetaInvitation.md | 0 .../New-EntraBetaNamedLocationPolicy.md | 0 .../New-EntraBetaOauth2PermissionGrant.md | 0 .../New-EntraBetaObjectSetting.md | 0 ...EntraBetaPasswordSingleSignOnCredential.md | 0 ...ew-EntraBetaPermissionGrantConditionSet.md | 0 .../New-EntraBetaPermissionGrantPolicy.md | 0 .../New-EntraBetaPolicy.md | 0 ...ntraBetaPrivateAccessApplicationSegment.md | 0 .../New-EntraBetaPrivilegedRoleAssignment.md | 0 .../New-EntraBetaServicePrincipal.md | 0 ...raBetaServicePrincipalAppRoleAssignment.md | 0 ...aBetaServicePrincipalPasswordCredential.md | 0 .../New-EntraBetaTrustFrameworkPolicy.md | 0 ...ew-EntraBetaTrustedCertificateAuthority.md | 0 .../New-EntraBetaUser.md | 0 .../New-EntraBetaUserAppRoleAssignment.md | 0 .../Remove-EntraBetaAdministrativeUnit.md | 0 ...emove-EntraBetaAdministrativeUnitMember.md | 0 .../Remove-EntraBetaApplication.md | 0 ...e-EntraBetaApplicationExtensionProperty.md | 0 .../Remove-EntraBetaApplicationKey.md | 0 ...emove-EntraBetaApplicationKeyCredential.md | 0 .../Remove-EntraBetaApplicationOwner.md | 0 .../Remove-EntraBetaApplicationPassword.md | 0 ...-EntraBetaApplicationPasswordCredential.md | 0 .../Remove-EntraBetaApplicationPolicy.md | 0 ...ve-EntraBetaApplicationProxyApplication.md | 0 ...plicationProxyApplicationConnectorGroup.md | 0 ...EntraBetaApplicationProxyConnectorGroup.md | 0 ...e-EntraBetaApplicationVerifiedPublisher.md | 0 ...Remove-EntraBetaConditionalAccessPolicy.md | 0 .../Remove-EntraBetaContact.md | 0 .../Remove-EntraBetaDeletedApplication.md | 0 .../Remove-EntraBetaDeletedDirectoryObject.md | 0 .../Remove-EntraBetaDevice.md | 0 .../Remove-EntraBetaDeviceRegisteredOwner.md | 0 .../Remove-EntraBetaDeviceRegisteredUser.md | 0 ...Remove-EntraBetaDirectoryRoleAssignment.md | 0 ...Remove-EntraBetaDirectoryRoleDefinition.md | 0 .../Remove-EntraBetaDirectoryRoleMember.md | 0 .../Remove-EntraBetaDirectorySetting.md | 0 .../Remove-EntraBetaDomain.md | 0 .../Remove-EntraBetaFeatureRolloutPolicy.md | 0 ...BetaFeatureRolloutPolicyDirectoryObject.md | 0 .../Remove-EntraBetaGroup.md | 0 .../Remove-EntraBetaGroupAppRoleAssignment.md | 0 .../Remove-EntraBetaGroupLifecyclePolicy.md | 0 .../Remove-EntraBetaGroupMember.md | 0 .../Remove-EntraBetaGroupOwner.md | 0 .../Remove-EntraBetaIdentityProvider.md | 0 .../Remove-EntraBetaLifecyclePolicyGroup.md | 0 .../Remove-EntraBetaNamedLocationPolicy.md | 0 .../Remove-EntraBetaOAuth2PermissionGrant.md | 0 .../Remove-EntraBetaObjectSetting.md | 0 ...EntraBetaPasswordSingleSignOnCredential.md | 0 ...ve-EntraBetaPermissionGrantConditionSet.md | 0 .../Remove-EntraBetaPermissionGrantPolicy.md | 0 .../Remove-EntraBetaPolicy.md | 0 ...ntraBetaPrivateAccessApplicationSegment.md | 0 .../Remove-EntraBetaScopedRoleMembership.md | 0 .../Remove-EntraBetaServicePrincipal.md | 0 ...raBetaServicePrincipalAppRoleAssignment.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 .../Remove-EntraBetaServicePrincipalOwner.md | 0 ...aBetaServicePrincipalPasswordCredential.md | 0 .../Remove-EntraBetaServicePrincipalPolicy.md | 0 .../Remove-EntraBetaTrustFrameworkPolicy.md | 0 ...ve-EntraBetaTrustedCertificateAuthority.md | 0 .../Remove-EntraBetaUser.md | 0 .../Remove-EntraBetaUserAppRoleAssignment.md | 0 .../Remove-EntraBetaUserExtension.md | 0 .../Remove-EntraBetaUserManager.md | 0 .../Reset-EntraBetaLifeCycleGroup.md | 0 ...ntraBetaStrongAuthenticationMethodByUpn.md | 0 .../Restore-EntraBetaDeletedApplication.md | 0 ...Restore-EntraBetaDeletedDirectoryObject.md | 0 ...ke-EntraBetaSignedInUserAllRefreshToken.md | 0 .../Revoke-EntraBetaUserAllRefreshToken.md | 0 ...lect-EntraBetaGroupIdsContactIsMemberOf.md | 0 ...Select-EntraBetaGroupIdsGroupIsMemberOf.md | 0 ...aBetaGroupIdsServicePrincipalIsMemberOf.md | 0 .../Select-EntraBetaGroupIdsUserIsMemberOf.md | 0 .../Set-EntraBetaAdministrativeUnit.md | 0 .../Set-EntraBetaApplication.md | 0 .../Set-EntraBetaApplicationLogo.md | 0 ...et-EntraBetaApplicationProxyApplication.md | 0 ...plicationProxyApplicationConnectorGroup.md | 0 ...ApplicationProxyApplicationSingleSignOn.md | 0 .../Set-EntraBetaApplicationProxyConnector.md | 0 ...EntraBetaApplicationProxyConnectorGroup.md | 0 ...t-EntraBetaApplicationVerifiedPublisher.md | 0 .../Set-EntraBetaAttributeSet.md | 0 .../Set-EntraBetaAuthorizationPolicy.md | 0 .../Set-EntraBetaConditionalAccessPolicy.md | 0 ...raBetaCustomSecurityAttributeDefinition.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Set-EntraBetaDevice.md | 0 .../Set-EntraBetaDirSyncConfiguration.md | 0 .../Set-EntraBetaDirSyncEnabled.md | 0 .../Set-EntraBetaDirSyncFeature.md | 0 .../Set-EntraBetaDirectoryRoleDefinition.md | 0 .../Set-EntraBetaDirectorySetting.md | 0 .../Set-EntraBetaDomain.md | 0 .../Set-EntraBetaDomainFederationSettings.md | 0 .../Set-EntraBetaFeatureRolloutPolicy.md | 0 .../Set-EntraBetaGroup.md | 0 .../Set-EntraBetaGroupLifecyclePolicy.md | 0 .../Set-EntraBetaIdentityProvider.md | 0 .../Set-EntraBetaNamedLocationPolicy.md | 0 .../Set-EntraBetaObjectSetting.md | 0 .../Set-EntraBetaPartnerInformation.md | 0 ...EntraBetaPasswordSingleSignOnCredential.md | 0 ...et-EntraBetaPermissionGrantConditionSet.md | 0 .../Set-EntraBetaPermissionGrantPolicy.md | 0 .../Set-EntraBetaPolicy.md | 0 ...ntraBetaPrivilegedRoleAssignmentRequest.md | 0 .../Set-EntraBetaPrivilegedRoleSetting.md | 0 .../Set-EntraBetaServicePrincipal.md | 0 .../Set-EntraBetaTenantDetail.md | 0 .../Set-EntraBetaTrustFrameworkPolicy.md | 0 ...et-EntraBetaTrustedCertificateAuthority.md | 0 .../Set-EntraBetaUser.md | 0 .../Set-EntraBetaUserExtension.md | 0 .../Set-EntraBetaUserLicense.md | 0 .../Set-EntraBetaUserManager.md | 0 .../Set-EntraBetaUserPassword.md | 0 .../Set-EntraBetaUserThumbnailPhoto.md | 0 .../Test-EntraScript.md | 0 .../Update-EntraBetaSignedInUserPassword.md | 0 .../Update-EntraBetaUserFromFederated.md | 0 .../docs/entra-powershell-beta/index.md | 0 .../docs/entra-powershell-beta/toc.yml | 0 .../Add-EntraAdministrativeUnitMember.md | 0 .../Add-EntraApplicationOwner.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Add-EntraDeviceRegisteredOwner.md | 0 .../Add-EntraDeviceRegisteredUser.md | 0 .../Add-EntraDirectoryRoleMember.md | 0 .../Add-EntraEnvironment.md | 0 .../Add-EntraGroupMember.md | 0 .../Add-EntraGroupOwner.md | 0 .../Add-EntraLifecyclePolicyGroup.md | 0 .../Add-EntraScopedRoleMembership.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 .../Add-EntraServicePrincipalOwner.md | 0 .../Confirm-EntraDomain.md | 0 .../Microsoft.Graph.Entra}/Connect-Entra.md | 0 .../Disconnect-Entra.md | 0 .../Enable-EntraAzureADAlias.md | 0 .../Enable-EntraDirectoryRole.md | 0 .../Find-EntraPermission.md | 0 .../Get-CrossCloudVerificationCode.md | 0 .../Get-EntraAccountSku.md | 0 .../Get-EntraAdministrativeUnit.md | 0 .../Get-EntraAdministrativeUnitMember.md | 0 .../Get-EntraApplication.md | 0 .../Get-EntraApplicationExtensionProperty.md | 0 .../Get-EntraApplicationKeyCredential.md | 0 .../Get-EntraApplicationLogo.md | 0 .../Get-EntraApplicationOwner.md | 0 .../Get-EntraApplicationPasswordCredential.md | 0 .../Get-EntraApplicationServiceEndpoint.md | 0 .../Get-EntraApplicationTemplate.md | 0 .../Get-EntraAttributeSet.md | 0 .../Get-EntraAuditDirectoryLog.md | 0 .../Get-EntraAuditSignInLog.md | 0 .../Get-EntraAuthorizationPolicy.md | 0 .../Get-EntraConditionalAccessPolicy.md | 0 .../Get-EntraContact.md | 0 .../Get-EntraContactDirectReport.md | 0 .../Get-EntraContactManager.md | 0 .../Get-EntraContactMembership.md | 0 .../Get-EntraContactThumbnailPhoto.md | 0 .../Get-EntraContext.md | 0 .../Get-EntraContract.md | 0 ...-EntraCustomSecurityAttributeDefinition.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Get-EntraDeletedApplication.md | 0 .../Get-EntraDeletedDirectoryObject.md | 0 .../Get-EntraDeletedGroup.md | 0 .../Microsoft.Graph.Entra}/Get-EntraDevice.md | 0 .../Get-EntraDeviceRegisteredOwner.md | 0 .../Get-EntraDeviceRegisteredUser.md | 0 .../Get-EntraDirSyncConfiguration.md | 0 .../Get-EntraDirSyncFeature.md | 0 ...ectoryObjectOnPremisesProvisioningError.md | 0 .../Get-EntraDirectoryRole.md | 0 .../Get-EntraDirectoryRoleAssignment.md | 0 .../Get-EntraDirectoryRoleDefinition.md | 0 .../Get-EntraDirectoryRoleMember.md | 0 .../Get-EntraDirectoryRoleTemplate.md | 0 .../Microsoft.Graph.Entra}/Get-EntraDomain.md | 0 .../Get-EntraDomainFederationSettings.md | 0 .../Get-EntraDomainNameReference.md | 0 ...t-EntraDomainServiceConfigurationRecord.md | 0 .../Get-EntraDomainVerificationDnsRecord.md | 0 .../Get-EntraEnvironment.md | 0 .../Get-EntraExtensionProperty.md | 0 .../Get-EntraFeatureRolloutPolicy.md | 0 .../Get-EntraFederationProperty.md | 0 .../Microsoft.Graph.Entra}/Get-EntraGroup.md | 0 .../Get-EntraGroupAppRoleAssignment.md | 0 .../Get-EntraGroupLifecyclePolicy.md | 0 .../Get-EntraGroupMember.md | 0 .../Get-EntraGroupOwner.md | 0 .../Get-EntraGroupPermissionGrant.md | 0 .../Get-EntraIdentityProvider.md | 0 .../Get-EntraLifecyclePolicyGroup.md | 0 .../Get-EntraNamedLocationPolicy.md | 0 .../Get-EntraOAuth2PermissionGrant.md | 0 .../Get-EntraObjectByObjectId.md | 0 .../Get-EntraObjectSetting.md | 0 .../Get-EntraPartnerInformation.md | 0 .../Get-EntraPasswordPolicy.md | 0 .../Get-EntraPermissionGrantConditionSet.md | 0 .../Get-EntraPermissionGrantPolicy.md | 0 .../Microsoft.Graph.Entra}/Get-EntraPolicy.md | 0 .../Get-EntraScopedRoleMembership.md | 0 .../Get-EntraServicePrincipal.md | 0 ...-EntraServicePrincipalAppRoleAssignedTo.md | 0 ...-EntraServicePrincipalAppRoleAssignment.md | 0 .../Get-EntraServicePrincipalCreatedObject.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 .../Get-EntraServicePrincipalKeyCredential.md | 0 .../Get-EntraServicePrincipalMembership.md | 0 ...raServicePrincipalOAuth2PermissionGrant.md | 0 .../Get-EntraServicePrincipalOwnedObject.md | 0 .../Get-EntraServicePrincipalOwner.md | 0 ...EntraServicePrincipalPasswordCredential.md | 0 .../Get-EntraSubscribedSku.md | 0 .../Get-EntraTenantDetail.md | 0 .../Get-EntraTrustedCertificateAuthority.md | 0 .../Microsoft.Graph.Entra}/Get-EntraUser.md | 0 .../Get-EntraUserAppRoleAssignment.md | 0 .../Get-EntraUserCreatedObject.md | 0 .../Get-EntraUserDirectReport.md | 0 .../Get-EntraUserExtension.md | 0 .../Get-EntraUserLicenseDetail.md | 0 .../Get-EntraUserManager.md | 0 .../Get-EntraUserMembership.md | 0 .../Get-EntraUserOAuth2PermissionGrant.md | 0 .../Get-EntraUserOwnedDevice.md | 0 .../Get-EntraUserOwnedObject.md | 0 .../Get-EntraUserRegisteredDevice.md | 0 .../Get-EntraUserThumbnailPhoto.md | 0 .../New-EntraAdministrativeUnit.md | 0 .../New-EntraApplication.md | 0 .../New-EntraApplicationExtensionProperty.md | 0 ...EntraApplicationFromApplicationTemplate.md | 0 .../New-EntraApplicationKey.md | 0 .../New-EntraApplicationKeyCredential.md | 0 .../New-EntraApplicationPassword.md | 0 .../New-EntraApplicationPasswordCredential.md | 0 .../New-EntraAttributeSet.md | 0 .../New-EntraConditionalAccessPolicy.md | 0 ...-EntraCustomSecurityAttributeDefinition.md | 0 .../Microsoft.Graph.Entra}/New-EntraDevice.md | 0 .../New-EntraDirectoryRoleAssignment.md | 0 .../New-EntraDirectoryRoleDefinition.md | 0 .../Microsoft.Graph.Entra}/New-EntraDomain.md | 0 .../New-EntraFeatureRolloutPolicy.md | 0 .../Microsoft.Graph.Entra}/New-EntraGroup.md | 0 .../New-EntraGroupAppRoleAssignment.md | 0 .../New-EntraGroupLifecyclePolicy.md | 0 .../New-EntraIdentityProvider.md | 0 .../New-EntraInvitation.md | 0 .../New-EntraNamedLocationPolicy.md | 0 .../New-EntraOauth2PermissionGrant.md | 0 .../New-EntraPermissionGrantConditionSet.md | 0 .../New-EntraPermissionGrantPolicy.md | 0 .../Microsoft.Graph.Entra}/New-EntraPolicy.md | 0 .../New-EntraServicePrincipal.md | 0 ...-EntraServicePrincipalAppRoleAssignment.md | 0 .../New-EntraServicePrincipalKeyCredential.md | 0 ...EntraServicePrincipalPasswordCredential.md | 0 .../New-EntraTrustedCertificateAuthority.md | 0 .../Microsoft.Graph.Entra}/New-EntraUser.md | 0 .../New-EntraUserAppRoleAssignment.md | 0 .../Remove-EntraAdministrativeUnit.md | 0 .../Remove-EntraAdministrativeUnitMember.md | 0 .../Remove-EntraApplication.md | 0 ...emove-EntraApplicationExtensionProperty.md | 0 .../Remove-EntraApplicationKey.md | 0 .../Remove-EntraApplicationKeyCredential.md | 0 .../Remove-EntraApplicationOwner.md | 0 .../Remove-EntraApplicationPassword.md | 0 ...move-EntraApplicationPasswordCredential.md | 0 ...emove-EntraApplicationVerifiedPublisher.md | 0 .../Remove-EntraConditionalAccessPolicy.md | 0 .../Remove-EntraContact.md | 0 .../Remove-EntraDeletedApplication.md | 0 .../Remove-EntraDeletedDirectoryObject.md | 0 .../Remove-EntraDevice.md | 0 .../Remove-EntraDeviceRegisteredOwner.md | 0 .../Remove-EntraDeviceRegisteredUser.md | 0 .../Remove-EntraDirectoryRoleAssignment.md | 0 .../Remove-EntraDirectoryRoleDefinition.md | 0 .../Remove-EntraDirectoryRoleMember.md | 0 .../Remove-EntraDomain.md | 0 .../Remove-EntraExternalDomainFederation.md | 0 .../Remove-EntraFeatureRolloutPolicy.md | 0 ...ntraFeatureRolloutPolicyDirectoryObject.md | 0 .../Remove-EntraGroup.md | 0 .../Remove-EntraGroupAppRoleAssignment.md | 0 .../Remove-EntraGroupLifecyclePolicy.md | 0 .../Remove-EntraGroupMember.md | 0 .../Remove-EntraGroupOwner.md | 0 .../Remove-EntraIdentityProvider.md | 0 .../Remove-EntraLifecyclePolicyGroup.md | 0 .../Remove-EntraNamedLocationPolicy.md | 0 .../Remove-EntraOAuth2PermissionGrant.md | 0 ...Remove-EntraPermissionGrantConditionSet.md | 0 .../Remove-EntraPermissionGrantPolicy.md | 0 .../Remove-EntraPolicy.md | 0 .../Remove-EntraScopedRoleMembership.md | 0 .../Remove-EntraServicePrincipal.md | 0 ...-EntraServicePrincipalAppRoleAssignment.md | 0 ...ncipalDelegatedPermissionClassification.md | 0 ...move-EntraServicePrincipalKeyCredential.md | 0 .../Remove-EntraServicePrincipalOwner.md | 0 ...EntraServicePrincipalPasswordCredential.md | 0 ...Remove-EntraTrustedCertificateAuthority.md | 0 .../Remove-EntraUser.md | 0 .../Remove-EntraUserAppRoleAssignment.md | 0 .../Remove-EntraUserExtension.md | 0 .../Remove-EntraUserManager.md | 0 .../Reset-EntraLifeCycleGroup.md | 0 ...et-EntraStrongAuthenticationMethodByUpn.md | 0 .../Restore-EntraDeletedApplication.md | 0 .../Restore-EntraDeletedDirectoryObject.md | 0 ...Revoke-EntraSignedInUserAllRefreshToken.md | 0 .../Revoke-EntraUserAllRefreshToken.md | 0 .../Select-EntraGroupIdsContactIsMemberOf.md | 0 .../Select-EntraGroupIdsGroupIsMemberOf.md | 0 ...EntraGroupIdsServicePrincipalIsMemberOf.md | 0 .../Select-EntraGroupIdsUserIsMemberOf.md | 0 .../Set-EntraAdministrativeUnit.md | 0 .../Set-EntraApplication.md | 0 .../Set-EntraApplicationLogo.md | 0 .../Set-EntraApplicationVerifiedPublisher.md | 0 .../Set-EntraAttributeSet.md | 0 .../Set-EntraAuthorizationPolicy.md | 0 .../Set-EntraConditionalAccessPolicy.md | 0 ...-EntraCustomSecurityAttributeDefinition.md | 0 ...SecurityAttributeDefinitionAllowedValue.md | 0 .../Microsoft.Graph.Entra}/Set-EntraDevice.md | 0 .../Set-EntraDirSyncConfiguration.md | 0 .../Set-EntraDirSyncEnabled.md | 0 .../Set-EntraDirSyncFeature.md | 0 .../Set-EntraDirectoryRoleDefinition.md | 0 .../Microsoft.Graph.Entra}/Set-EntraDomain.md | 0 .../Set-EntraDomainFederationSettings.md | 0 .../Set-EntraFeatureRolloutPolicy.md | 0 .../Microsoft.Graph.Entra}/Set-EntraGroup.md | 0 .../Set-EntraGroupLifecyclePolicy.md | 0 .../Set-EntraIdentityProvider.md | 0 .../Set-EntraNamedLocationPolicy.md | 0 .../Set-EntraPartnerInformation.md | 0 .../Set-EntraPermissionGrantConditionSet.md | 0 .../Set-EntraPermissionGrantPolicy.md | 0 .../Microsoft.Graph.Entra}/Set-EntraPolicy.md | 0 .../Set-EntraServicePrincipal.md | 0 .../Set-EntraTenantDetail.md | 0 .../Set-EntraTrustedCertificateAuthority.md | 0 .../Microsoft.Graph.Entra}/Set-EntraUser.md | 0 .../Set-EntraUserExtension.md | 0 .../Set-EntraUserLicense.md | 0 .../Set-EntraUserManager.md | 0 .../Set-EntraUserPassword.md | 0 .../Set-EntraUserThumbnailPhoto.md | 0 .../Microsoft.Graph.Entra/Test-EntraScript.md | 0 .../Update-EntraSignedInUserPassword.md | 0 .../Update-EntraUserFromFederated.md | 0 .../docs/entra-powershell-v1.0/index.md | 0 .../docs/entra-powershell-v1.0/toc.yml | 0 ...ntraBetaPrivilegedRoleAssignmentRequest.md | 0 .../Get-EntraApplicationProxyApplication.md | 0 ...plicationProxyApplicationConnectorGroup.md | 0 .../Get-EntraApplicationProxyConnector.md | 0 ...Get-EntraApplicationProxyConnectorGroup.md | 0 ...traApplicationProxyConnectorGroupMember.md | 0 ...raApplicationProxyConnectorGroupMembers.md | 0 ...-EntraApplicationProxyConnectorMemberOf.md | 0 .../New-EntraApplicationProxyApplication.md | 0 ...New-EntraApplicationProxyConnectorGroup.md | 0 ...Remove-EntraApplicationProxyApplication.md | 0 ...plicationProxyApplicationConnectorGroup.md | 0 ...ove-EntraApplicationProxyConnectorGroup.md | 0 .../Set-EntraApplicationProxyApplication.md | 0 ...ProxyApplicationCustomDomainCertificate.md | 0 ...ApplicationProxyApplicationSingleSignOn.md | 0 .../Set-EntraApplicationProxyConnector.md | 0 ...Set-EntraApplicationProxyConnectorGroup.md | 0 .../mapping/monikerMapping.json | 0 src/EntraModuleBuilder.ps1 | 14 +- src/EntraModuleSplitter.ps1 | 20 +- {testVNext => test}/Common-Functions.ps1 | 0 .../Add-EntraApplicationOwner.Tests.ps1 | 0 ...elegatedPermissionClassification.Tests.ps1 | 0 .../Add-EntraServicePrincipalOwner.Tests.ps1 | 0 .../Get-EntraApplication.Tests.ps1 | 0 ...ntraApplicationExtensionProperty.Tests.ps1 | 0 ...et-EntraApplicationKeyCredential.Tests.ps1 | 0 .../Get-EntraApplicationLogo.Tests.ps1 | 0 .../Get-EntraApplicationModule.Tests.ps1 | 0 .../Get-EntraApplicationOwner.Tests.ps1 | 0 ...traApplicationPasswordCredential.Tests.ps1 | 0 .../Get-EntraApplicationTemplate.Tests.ps1 | 0 .../Get-EntraDeletedApplication.Tests.ps1 | 0 .../Get-EntraServicePrincipal.Tests.ps1 | 0 ...ervicePrincipalAppRoleAssignedTo.Tests.ps1 | 0 ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 0 ...elegatedPermissionClassification.Tests.ps1 | 0 ...traServicePrincipalKeyCredential.Tests.ps1 | 0 ...-EntraServicePrincipalMembership.Tests.ps1 | 0 ...cePrincipalOAuth2PermissionGrant.Tests.ps1 | 0 ...EntraServicePrincipalOwnedObject.Tests.ps1 | 0 .../Get-EntraServicePrincipalOwner.Tests.ps1 | 0 ...rvicePrincipalPasswordCredential.Tests.ps1 | 0 .../Entra/Applications/Invalid.Tests.ps1 | 0 .../Entra/Applications/Module.Tests.ps1 | 0 .../New-EntraApplication.Tests.ps1 | 0 ...ntraApplicationExtensionProperty.Tests.ps1 | 0 ...plicationFromApplicationTemplate.Tests.ps1 | 0 .../New-EntraApplicationPassword.Tests.ps1 | 0 ...traApplicationPasswordCredential.Tests.ps1 | 0 .../New-EntraServicePrincipal.Tests.ps1 | 0 ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 0 ...rvicePrincipalPasswordCredential.Tests.ps1 | 0 .../Remove-EntraApplication.Tests.ps1 | 0 ...ntraApplicationExtensionProperty.Tests.ps1 | 0 .../Remove-EntraApplicationOwner.Tests.ps1 | 0 .../Remove-EntraApplicationPassword.Tests.ps1 | 0 ...traApplicationPasswordCredential.Tests.ps1 | 0 .../Remove-EntraDeletedApplication.Tests.ps1 | 0 ...move-EntraDeletedDirectoryObject.Tests.ps1 | 0 .../Remove-EntraServicePrincipal.Tests.ps1 | 0 ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 0 ...elegatedPermissionClassification.Tests.ps1 | 0 ...emove-EntraServicePrincipalOwner.Tests.ps1 | 0 ...rvicePrincipalPasswordCredential.Tests.ps1 | 0 .../Restore-EntraDeletedApplication.Tests.ps1 | 0 ...oupIdsServicePrincipalIsMemberOf.Tests.ps1 | 0 .../Set-EntraApplication.Tests.ps1 | 0 .../Set-EntraApplicationLogo.Tests.ps1 | 0 .../Set-EntraServicePrincipal.Tests.ps1 | 0 .../Entra/Applications/Valid.Tests.ps1 | 0 .../Authentication/Connect-Entra.Tests.ps1 | 0 .../Authentication/Disconnect-Entra.Tests.ps1 | 0 .../Entra/Authentication/Invalid.Tests.ps1 | 0 .../Entra/Authentication/Module.Tests.ps1 | 0 ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 0 ...EntraSignedInUserAllRefreshToken.Tests.ps1 | 0 .../Revoke-EntraUserAllRefreshToken.Tests.ps1 | 0 .../Entra/Authentication/Valid.Tests.ps1 | 0 ...dd-EntraAdministrativeUnitMember.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../Add-EntraDeviceRegisteredOwner.Tests.ps1 | 0 .../Add-EntraDeviceRegisteredUser.Tests.ps1 | 0 .../Add-EntraDirectoryRoleMember.Tests.ps1 | 0 .../Add-EntraScopedRoleMembership.Tests.ps1 | 0 .../Enable-EntraDirectoryRole.Tests.ps1 | 0 .../Get-EntraAccountSku.Tests.ps1 | 0 .../Get-EntraAdministrativeUnit.Tests.ps1 | 0 ...et-EntraAdministrativeUnitMember.Tests.ps1 | 0 .../Get-EntraAttributeSet.Tests.ps1 | 0 .../Get-EntraContact.Tests.ps1 | 0 .../Get-EntraContactMembership.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../Get-EntraDeletedDirectoryObject.Tests.ps1 | 0 .../Get-EntraDevice.Tests.ps1 | 0 .../Get-EntraDeviceRegisteredOwner.Tests.ps1 | 0 .../Get-EntraDeviceRegisteredUser.Tests.ps1 | 0 .../Get-EntraDirSyncConfiguration.Tests.ps1 | 0 .../Get-EntraDirSyncFeature.Tests.ps1 | 0 ...bjectOnPremisesProvisioningError.Tests.ps1 | 0 .../Get-EntraDirectoryRole.Tests.ps1 | 0 .../Get-EntraDirectoryRoleMember.Tests.ps1 | 0 .../Get-EntraDirectoryRoleTemplate.Tests.ps1 | 0 .../Get-EntraDomain.Tests.ps1 | 0 ...et-EntraDomainFederationSettings.Tests.ps1 | 0 .../Get-EntraDomainNameReference.Tests.ps1 | 0 ...DomainServiceConfigurationRecord.Tests.ps1 | 0 ...EntraDomainVerificationDnsRecord.Tests.ps1 | 0 .../Get-EntraFederationProperty.Tests.ps1 | 0 .../Get-EntraObjectByObjectId.Tests.ps1 | 0 .../Get-EntraPasswordPolicy.Tests.ps1 | 0 .../Get-EntraScopedRoleMembership.Tests.ps1 | 0 .../Get-EntraSubscribedSku.Tests.ps1 | 0 .../Get-EntraTenantDetail.Tests.ps1 | 0 .../DirectoryManagement/Invalid.Tests.ps1 | 0 .../DirectoryManagement/Module.Tests.ps1 | 0 .../New-EntraAdministrativeUnit.Tests.ps1 | 0 .../New-EntraAttributeSet.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 .../New-EntraDomain.Tests.ps1 | 0 .../Remove-EntraAdministrativeUnit.Tests.ps1 | 0 ...ve-EntraAdministrativeUnitMember.Tests.ps1 | 0 .../Remove-EntraDevice.Tests.ps1 | 0 ...emove-EntraDeviceRegisteredOwner.Tests.ps1 | 0 ...Remove-EntraDeviceRegisteredUser.Tests.ps1 | 0 .../Remove-EntraDirectoryRoleMember.Tests.ps1 | 0 .../Remove-EntraDomain.Tests.ps1 | 0 ...Remove-EntraScopedRoleMembership.Tests.ps1 | 0 ...tore-EntraDeletedDirectoryObject.Tests.ps1 | 0 .../Set-EntraAdministrativeUnit.Tests.ps1 | 0 .../Set-EntraAttributeSet.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../Set-EntraDevice.Tests.ps1 | 0 .../Set-EntraDirSyncConfiguration.Tests.ps1 | 0 .../Set-EntraDirSyncEnabled.Tests.ps1 | 0 .../Set-EntraDirSyncFeature.Tests.ps1 | 0 .../Set-EntraDomain.Tests.ps1 | 0 ...et-EntraDomainFederationSettings.Tests.ps1 | 0 .../Set-EntraPartnerInformation.Tests.ps1 | 0 .../Set-EntraTenantDetail.Tests.ps1 | 0 .../Entra/DirectoryManagement/Valid.Tests.ps1 | 0 {testVNext => test}/Entra/Entra.Tests.ps1 | 4 +- test/{module => }/Entra/EntraCmdletsMap.ps1 | 0 ...Get-EntraDirectoryRoleAssignment.Tests.ps1 | 0 ...Get-EntraDirectoryRoleDefinition.Tests.ps1 | 0 .../Entra/Governance/Invalid.Tests.ps1 | 0 .../Entra/Governance/Module.Tests.ps1 | 0 ...New-EntraDirectoryRoleAssignment.Tests.ps1 | 0 ...New-EntraDirectoryRoleDefinition.Tests.ps1 | 0 ...ove-EntraDirectoryRoleAssignment.Tests.ps1 | 0 ...ove-EntraDirectoryRoleDefinition.Tests.ps1 | 0 ...Set-EntraDirectoryRoleDefinition.Tests.ps1 | 0 .../Entra/Governance/Valid.Tests.ps1 | 0 .../Groups/Add-EntraGroupMember.Tests.ps1 | 0 .../Groups/Add-EntraGroupOwner.Tests.ps1 | 0 .../Add-EntraLifecyclePolicyGroup.Tests.ps1 | 0 .../Groups/Get-EntraDeletedGroup.Tests.ps1 | 0 .../Entra/Groups/Get-EntraGroup.Tests.ps1 | 0 .../Get-EntraGroupAppRoleAssignment.Tests.ps1 | 0 .../Get-EntraGroupLifecyclePolicy.Tests.ps1 | 0 .../Groups/Get-EntraGroupMember.Tests.ps1 | 0 .../Groups/Get-EntraGroupOwner.Tests.ps1 | 0 .../Get-EntraLifecyclePolicyGroup.Tests.ps1 | 0 .../Groups/Get-EntraObjectSetting.Tests.ps1 | 0 .../Entra/Groups/Invalid.Tests.ps1 | 0 .../Entra/Groups/Module.Tests.ps1 | 0 .../Entra/Groups/New-EntraGroup.Tests.ps1 | 0 .../New-EntraGroupAppRoleAssignment.Tests.ps1 | 0 .../New-EntraGroupLifecyclePolicy.Tests.ps1 | 0 .../Entra/Groups/Remove-EntraGroup.Tests.ps1 | 0 ...move-EntraGroupAppRoleAssignment.Tests.ps1 | 0 ...Remove-EntraGroupLifecyclePolicy.Tests.ps1 | 0 .../Groups/Remove-EntraGroupMember.Tests.ps1 | 0 .../Groups/Remove-EntraGroupOwner.Tests.ps1 | 0 ...Remove-EntraLifecyclePolicyGroup.Tests.ps1 | 0 .../Reset-EntraLifeCycleGroup.Tests.ps1 | 0 ...t-EntraGroupIdsContactIsMemberOf.Tests.ps1 | 0 ...ect-EntraGroupIdsGroupIsMemberOf.Tests.ps1 | 0 ...lect-EntraGroupIdsUserIsMemberOf.Tests.ps1 | 0 .../Entra/Groups/Set-EntraGroup.Tests.ps1 | 0 .../Set-EntraGroupLifecyclePolicy.Tests.ps1 | 0 .../Entra/Groups/Valid.Tests.ps1 | 0 .../Entra/New-EntraInvitation.Tests.ps1 | 0 .../Get-EntraAuditDirectoryLog.Tests.ps1 | 0 .../Reports/Get-EntraAuditSignInLog.Tests.ps1 | 0 .../Entra/Reports/Invalid.Tests.ps1 | 0 .../Entra/Reports/Module.Tests.ps1 | 0 .../Entra/Reports/Valid.Tests.ps1 | 0 .../Get-EntraAuthorizationPolicy.Tests.ps1 | 0 ...Get-EntraConditionalAccessPolicy.Tests.ps1 | 0 .../Get-EntraFeatureRolloutPolicy.Tests.ps1 | 0 .../Get-EntraIdentityProvider.Tests.ps1 | 0 .../Get-EntraOAuth2PermissionGrant.Tests.ps1 | 0 ...EntraPermissionGrantConditionSet.Tests.ps1 | 0 .../Get-EntraPermissionGrantPolicy.Tests.ps1 | 0 .../Entra/SignIns/Get-EntraPolicy.Tests.ps1 | 0 ...EntraTrustedCertificateAuthority.Tests.ps1 | 0 .../Entra/SignIns/Invalid.Tests.ps1 | 0 .../Entra/SignIns/Module.Tests.ps1 | 0 ...New-EntraConditionalAccessPolicy.Tests.ps1 | 0 .../New-EntraFeatureRolloutPolicy.Tests.ps1 | 0 .../New-EntraIdentityProvider.Tests.ps1 | 0 .../New-EntraNamedLocationPolicy.Tests.ps1 | 0 .../New-EntraOauth2PermissionGrant.Tests.ps1 | 0 ...EntraPermissionGrantConditionSet.Tests.ps1 | 0 .../New-EntraPermissionGrantPolicy.Tests.ps1 | 0 .../Entra/SignIns/New-EntraPolicy.Tests.ps1 | 0 ...EntraTrustedCertificateAuthority.Tests.ps1 | 0 ...Remove-EntraFeatureRolloutPolicy.Tests.ps1 | 0 ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 0 .../Remove-EntraIdentityProvider.Tests.ps1 | 0 .../Remove-EntraNamedLocationPolicy.Tests.ps1 | 0 ...emove-EntraOAuth2PermissionGrant.Tests.ps1 | 0 ...EntraPermissionGrantConditionSet.Tests.ps1 | 0 ...emove-EntraPermissionGrantPolicy.Tests.ps1 | 0 .../SignIns/Remove-EntraPolicy.Tests.ps1 | 0 ...EntraTrustedCertificateAuthority.Tests.ps1 | 0 .../Set-EntraAuthorizationPolicy.Tests.ps1 | 0 ...Set-EntraConditionalAccessPolicy.Tests.ps1 | 0 .../Set-EntraFeatureRolloutPolicy.Tests.ps1 | 0 .../Set-EntraNamedLocationPolicy.Tests.ps1 | 0 ...EntraPermissionGrantConditionSet.Tests.ps1 | 0 .../Set-EntraPermissionGrantPolicy.Tests.ps1 | 0 .../Entra/SignIns/Set-EntraPolicy.Tests.ps1 | 0 ...EntraTrustedCertificateAuthority.Tests.ps1 | 0 .../Entra/SignIns/Valid.Tests.ps1 | 0 .../Entra/Users/Get-EntraUser.Tests.ps1 | 0 .../Get-EntraUserAppRoleAssignment.Tests.ps1 | 0 .../Get-EntraUserCreatedObject.Tests.ps1 | 0 .../Users/Get-EntraUserDirectReport.Tests.ps1 | 0 .../Users/Get-EntraUserExtension.Tests.ps1 | 0 .../Get-EntraUserLicenseDetail.Tests.ps1 | 0 .../Users/Get-EntraUserManager.Tests.ps1 | 0 .../Users/Get-EntraUserMembership.Tests.ps1 | 0 ...t-EntraUserOAuth2PermissionGrant.Tests.ps1 | 0 .../Users/Get-EntraUserOwnedDevice.Tests.ps1 | 0 .../Users/Get-EntraUserOwnedObject.Tests.ps1 | 0 .../Get-EntraUserRegisteredDevice.Tests.ps1 | 0 .../Entra/Users/Invalid.Tests.ps1 | 0 .../Entra/Users/Module.Tests.ps1 | 0 .../Entra/Users/New-EntraUser.Tests.ps1 | 0 .../New-EntraUserAppRoleAssignment.Tests.ps1 | 0 .../Entra/Users/Remove-EntraUser.Tests.ps1 | 0 ...emove-EntraUserAppRoleAssignment.Tests.ps1 | 0 .../Users/Remove-EntraUserManager.Tests.ps1 | 0 .../Entra/Users/Set-EntraUser.Tests.ps1 | 0 .../Users/Set-EntraUserLicense.Tests.ps1 | 0 .../Users/Set-EntraUserManager.Tests.ps1 | 0 .../Users/Set-EntraUserPassword.Tests.ps1 | 0 .../Set-EntraUserThumbnailPhoto.Tests.ps1 | 0 ...Update-EntraSignedInUserPassword.Tests.ps1 | 0 .../Update-EntraUserFromFederated.Tests.ps1 | 0 .../Entra/Users/Valid.Tests.ps1 | 0 .../Add-EntraBetaApplicationPolicy.Tests.ps1 | 0 .../Get-EntraBetaApplication.Tests.ps1 | 0 .../Get-EntraBetaApplicationLogo.Tests.ps1 | 0 ...etaApplicationPasswordCredential.Tests.ps1 | 0 .../Get-EntraBetaApplicationPolicy.Tests.ps1 | 0 ...Get-EntraBetaApplicationTemplate.Tests.ps1 | 0 ...taPasswordSingleSignOnCredential.Tests.ps1 | 0 .../Get-EntraBetaServicePrincipal.Tests.ps1 | 0 ...aBetaServicePrincipalOwnedObject.Tests.ps1 | 0 .../New-EntraBetaApplication.Tests.ps1 | 0 ...taPasswordSingleSignOnCredential.Tests.ps1 | 0 .../Remove-EntraBetaApplication.Tests.ps1 | 0 ...emove-EntraBetaApplicationPolicy.Tests.ps1 | 0 ...taPasswordSingleSignOnCredential.Tests.ps1 | 0 .../Set-EntraBetaApplication.Tests.ps1 | 0 .../Set-EntraBetaApplicationLogo.Tests.ps1 | 0 ...taPasswordSingleSignOnCredential.Tests.ps1 | 0 .../Set-EntraBetaServicePrincipal.Tests.ps1 | 0 ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 0 ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 ...d-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 0 ...dd-EntraBetaDeviceRegisteredUser.Tests.ps1 | 0 ...dd-EntraBetaScopedRoleMembership.Tests.ps1 | 0 .../Confirm-EntraBetaDomain.Tests.ps1 | 0 .../Get-EntraBetaAccountSku.Tests.ps1 | 0 .../Get-EntraBetaAdministrativeUnit.Tests.ps1 | 0 ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 0 .../Get-EntraBetaAttributeSet.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../Get-EntraBetaDevice.Tests.ps1 | 0 ...t-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 0 ...et-EntraBetaDeviceRegisteredUser.Tests.ps1 | 0 ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 0 .../Get-EntraBetaDirSyncFeature.Tests.ps1 | 0 ...bjectOnPremisesProvisioningError.Tests.ps1 | 0 .../Get-EntraBetaDirectorySetting.Tests.ps1 | 0 ...ntraBetaDirectorySettingTemplate.Tests.ps1 | 0 ...ntraBetaDomainFederationSettings.Tests.ps1 | 0 .../Get-EntraBetaFederationProperty.Tests.ps1 | 0 .../Get-EntraBetaPasswordPolicy.Tests.ps1 | 0 ...et-EntraBetaScopedRoleMembership.Tests.ps1 | 0 .../New-EntraBetaAdministrativeUnit.Tests.ps1 | 0 ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 0 .../New-EntraBetaAttributeSet.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 .../New-EntraBetaDirectorySetting.Tests.ps1 | 0 ...move-EntraBetaAdministrativeUnit.Tests.ps1 | 0 ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 0 .../Remove-EntraBetaDevice.Tests.ps1 | 0 ...e-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 0 ...ve-EntraBetaDeviceRegisteredUser.Tests.ps1 | 0 ...Remove-EntraBetaDirectorySetting.Tests.ps1 | 0 ...ve-EntraBetaScopedRoleMembership.Tests.ps1 | 0 .../Set-EntraBetaAdministrativeUnit.Tests.ps1 | 0 .../Set-EntraBetaAttributeSet.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../Set-EntraBetaDevice.Tests.ps1 | 0 ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 0 .../Set-EntraBetaDirSyncEnabled.Tests.ps1 | 0 .../Set-EntraBetaDirSyncFeature.Tests.ps1 | 0 .../Set-EntraBetaDirectorySetting.Tests.ps1 | 0 ...ntraBetaDomainFederationSettings.Tests.ps1 | 0 .../Set-EntraBetaPartnerInformation.Tests.ps1 | 0 .../EntraBeta/EntraBeta.Tests.ps1 | 4 +- .../EntraBeta/General.Tests.ps1 | 0 .../Get-EntraBetaPrivilegedResource.Tests.ps1 | 0 ...ntraBetaPrivilegedRoleDefinition.Tests.ps1 | 0 ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 0 ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 0 .../Groups/Add-EntraBetaGroupMember.Tests.ps1 | 0 .../Groups/Add-EntraBetaGroupOwner.Tests.ps1 | 0 .../Get-EntraBetaDeletedGroup.Tests.ps1 | 0 .../Groups/Get-EntraBetaGroup.Tests.ps1 | 0 ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 0 ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 0 .../Groups/Get-EntraBetaGroupMember.Tests.ps1 | 0 .../Groups/Get-EntraBetaGroupOwner.Tests.ps1 | 0 .../Get-EntraBetaObjectSetting.Tests.ps1 | 0 .../Groups/New-EntraBetaGroup.Tests.ps1 | 0 ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 0 .../New-EntraBetaObjectSetting.Tests.ps1 | 0 .../Groups/Remove-EntraBetaGroup.Tests.ps1 | 0 ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 0 ...ve-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 0 .../Remove-EntraBetaGroupMember.Tests.ps1 | 0 .../Remove-EntraBetaGroupOwner.Tests.ps1 | 0 .../Remove-EntraBetaObjectSetting.Tests.ps1 | 0 .../Groups/Set-EntraBetaGroup.Tests.ps1 | 0 ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 0 .../Set-EntraBetaObjectSetting.Tests.ps1 | 0 ...ApplicationSignInDetailedSummary.Tests.ps1 | 0 ...ntraBetaApplicationSignInSummary.Tests.ps1 | 0 .../Get-EntraBetaAuditDirectoryLog.Tests.ps1 | 0 .../Get-EntraBetaAuditSignInLog.Tests.ps1 | 0 ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 0 ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 0 ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 0 ...t-EntraBetaPermissionGrantPolicy.Tests.ps1 | 0 .../SignIns/Get-EntraBetaPolicy.Tests.ps1 | 0 ...Get-EntraBetaPolicyAppliedObject.Tests.ps1 | 0 ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 0 ...ew-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 0 ...w-EntraBetaOauth2PermissionGrant.Tests.ps1 | 0 ...ve-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 0 ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 0 .../SignIns/Remove-EntraBetaPolicy.Tests.ps1 | 0 ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 0 ...ve-EntraBetaTrustFrameworkPolicy.Tests.ps1 | 0 ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 0 .../SignIns/Set-EntraBetaPolicy.Tests.ps1 | 0 .../Users/Get-EntraBetaUser.Tests.ps1 | 0 .../Get-EntraBetaUserExtension.Tests.ps1 | 0 .../Get-EntraBetaUserLicenseDetail.Tests.ps1 | 0 .../Users/Get-EntraBetaUserManager.Tests.ps1 | 0 .../Get-EntraBetaUserMembership.Tests.ps1 | 0 .../Get-EntraBetaUserOwnedDevice.Tests.ps1 | 0 ...et-EntraBetaUserRegisteredDevice.Tests.ps1 | 0 .../Users/New-EntraBetaUser.Tests.ps1 | 0 .../Users/Remove-EntraBetaUser.Tests.ps1 | 0 .../Remove-EntraBetaUserManager.Tests.ps1 | 0 .../Users/Set-EntraBetaUser.Tests.ps1 | 0 .../Users/Set-EntraBetaUserManager.Tests.ps1 | 0 ...te-EntraBetaSignedInUserPassword.Tests.ps1 | 0 ...pdate-EntraBetaUserFromFederated.Tests.ps1 | 0 {test => test_legacy}/Customizations.Test.ps1 | 0 .../module/Common-Functions.ps1 | 0 ...dd-EntraAdministrativeUnitMember.Tests.ps1 | 0 .../Entra/Add-EntraApplicationOwner.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../Add-EntraDeviceRegisteredOwner.Tests.ps1 | 0 .../Add-EntraDeviceRegisteredUser.Tests.ps1 | 0 .../Add-EntraDirectoryRoleMember.Tests.ps1 | 0 .../Entra/Add-EntraGroupMember.Tests.ps1 | 0 .../Entra/Add-EntraGroupOwner.Tests.ps1 | 0 .../Add-EntraLifecyclePolicyGroup.Tests.ps1 | 0 .../Add-EntraScopedRoleMembership.Tests.ps1 | 0 ...elegatedPermissionClassification.Tests.ps1 | 0 .../Add-EntraServicePrincipalOwner.Tests.ps1 | 0 .../module/Entra/AddtionalFunctions.Tests.ps1 | 0 .../module/Entra/Common-Parameter.Tests.ps1 | 0 .../module/Entra/Connect-Entra.Tests.ps1 | 0 .../module/Entra/Customizations.Tests.ps1 | 0 .../module/Entra/Disconnect-Entra.Tests.ps1 | 0 .../Entra/Enable-EntraDirectoryRole.Tests.ps1 | 0 .../module/Entra/Entra.Tests.ps1 | 2 +- .../module}/Entra/EntraCmdletsMap.ps1 | 0 .../module/Entra/General.Tests.ps1 | 0 .../Entra/Get-EntraAccountSku.Tests.ps1 | 0 .../Get-EntraAdministrativeUnit.Tests.ps1 | 0 ...et-EntraAdministrativeUnitMember.Tests.ps1 | 0 .../Entra/Get-EntraApplication.Tests.ps1 | 0 ...ntraApplicationExtensionProperty.Tests.ps1 | 0 ...et-EntraApplicationKeyCredential.Tests.ps1 | 0 .../Entra/Get-EntraApplicationLogo.Tests.ps1 | 0 .../Get-EntraApplicationModule.Tests.ps1 | 0 .../Entra/Get-EntraApplicationOwner.Tests.ps1 | 0 ...traApplicationPasswordCredential.Tests.ps1 | 0 .../Get-EntraApplicationTemplate.Tests.ps1 | 0 .../Entra/Get-EntraAttributeSet.Tests.ps1 | 0 .../Get-EntraAuditDirectoryLog.Tests.ps1 | 0 .../Entra/Get-EntraAuditSignInLog.Tests.ps1 | 0 .../Get-EntraAuthorizationPolicy.Tests.ps1 | 0 ...Get-EntraConditionalAccessPolicy.Tests.ps1 | 0 .../module/Entra/Get-EntraContact.Tests.ps1 | 0 .../Get-EntraContactMembership.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../Get-EntraDeletedApplication.Tests.ps1 | 0 .../Get-EntraDeletedDirectoryObject.Tests.ps1 | 0 .../Entra/Get-EntraDeletedGroup.Tests.ps1 | 0 .../module/Entra/Get-EntraDevice.Tests.ps1 | 0 .../Get-EntraDeviceRegisteredOwner.Tests.ps1 | 0 .../Get-EntraDeviceRegisteredUser.Tests.ps1 | 0 .../Get-EntraDirSyncConfiguration.Tests.ps1 | 0 .../Entra/Get-EntraDirSyncFeatures.Tests.ps1 | 0 ...bjectOnPremisesProvisioningError.Tests.ps1 | 0 .../Entra/Get-EntraDirectoryRole.Tests.ps1 | 0 ...Get-EntraDirectoryRoleAssignment.Tests.ps1 | 0 ...Get-EntraDirectoryRoleDefinition.Tests.ps1 | 0 .../Get-EntraDirectoryRoleMember.Tests.ps1 | 0 .../Get-EntraDirectoryRoleTemplate.Tests.ps1 | 0 .../module/Entra/Get-EntraDomain.Tests.ps1 | 0 ...et-EntraDomainFederationSettings.Tests.ps1 | 0 .../Get-EntraDomainNameReference.Tests.ps1 | 0 ...DomainServiceConfigurationRecord.Tests.ps1 | 0 ...EntraDomainVerificationDnsRecord.Tests.ps1 | 0 .../Get-EntraFeatureRolloutPolicy.Tests.ps1 | 0 .../Get-EntraFederationProperty.Tests.ps1 | 0 .../module/Entra/Get-EntraGroup.Tests.ps1 | 0 .../Get-EntraGroupAppRoleAssignment.Tests.ps1 | 0 .../Get-EntraGroupLifecyclePolicy.Tests.ps1 | 0 .../Entra/Get-EntraGroupMember.Tests.ps1 | 0 .../Entra/Get-EntraGroupOwner.Tests.ps1 | 0 .../Entra/Get-EntraIdentityProvider.Tests.ps1 | 0 .../Get-EntraLifecyclePolicyGroup.Tests.ps1 | 0 .../Get-EntraOAuth2PermissionGrant.Tests.ps1 | 0 .../Entra/Get-EntraObjectByObjectId.Tests.ps1 | 0 .../Entra/Get-EntraObjectSetting.Tests.ps1 | 0 .../Entra/Get-EntraPasswordPolicy.Tests.ps1 | 0 ...EntraPermissionGrantConditionSet.Tests.ps1 | 0 .../Get-EntraPermissionGrantPolicy.Tests.ps1 | 0 .../module/Entra/Get-EntraPolicy.Tests.ps1 | 0 .../Get-EntraScopedRoleMembership.Tests.ps1 | 0 .../Entra/Get-EntraServicePrincipal.Tests.ps1 | 0 ...ervicePrincipalAppRoleAssignedTo.Tests.ps1 | 0 ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 0 ...elegatedPermissionClassification.Tests.ps1 | 0 ...traServicePrincipalKeyCredential.Tests.ps1 | 0 ...-EntraServicePrincipalMembership.Tests.ps1 | 0 ...cePrincipalOAuth2PermissionGrant.tests.ps1 | 0 ...EntraServicePrincipalOwnedObject.Tests.ps1 | 0 .../Get-EntraServicePrincipalOwner.Tests.ps1 | 0 ...rvicePrincipalPasswordCredential.Tests.ps1 | 0 .../Entra/Get-EntraSubscribedSku.Tests.ps1 | 0 .../Entra/Get-EntraTenantDetail.Tests.ps1 | 0 ...EntraTrustedCertificateAuthority.Tests.ps1 | 0 .../module/Entra/Get-EntraUser.Tests.ps1 | 0 .../Get-EntraUserAppRoleAssignment.Tests.ps1 | 0 ...et-EntraUserAuthenticationMethod.Tests.ps1 | 0 .../Get-EntraUserCreatedObject.Tests.ps1 | 0 .../Entra/Get-EntraUserDirectReport.Tests.ps1 | 0 .../Entra/Get-EntraUserExtension.Tests.ps1 | 0 .../Get-EntraUserLicenseDetail.Tests.ps1 | 0 .../Entra/Get-EntraUserManager.Tests.ps1 | 0 .../Entra/Get-EntraUserMembership.Tests.ps1 | 0 ...t-EntraUserOAuth2PermissionGrant.Tests.ps1 | 0 .../Entra/Get-EntraUserOwnedDevice.Tests.ps1 | 0 .../Entra/Get-EntraUserOwnedObject.Tests.ps1 | 0 .../Get-EntraUserRegisteredDevice.Tests.ps1 | 0 .../module/Entra/Invalid.Tests.ps1 | 0 .../module/Entra/Module.Tests.ps1 | 0 .../New-EntraAdministrativeUnit.Tests.ps1 | 0 .../Entra/New-EntraApplication.Tests.ps1 | 0 ...ntraApplicationExtensionProperty.Tests.ps1 | 0 ...plicationFromApplicationTemplate.Tests.ps1 | 0 .../New-EntraApplicationPassword.Tests.ps1 | 0 ...traApplicationPasswordCredential.Tests.ps1 | 0 .../Entra/New-EntraAttributeSet.Tests.ps1 | 0 ...New-EntraConditionalAccessPolicy.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...New-EntraDirectoryRoleAssignment.Tests.ps1 | 0 ...New-EntraDirectoryRoleDefinition.Tests.ps1 | 0 .../module/Entra/New-EntraDomain.Tests.ps1 | 0 .../New-EntraFeatureRolloutPolicy.Tests.ps1 | 0 .../module/Entra/New-EntraGroup.Tests.ps1 | 0 .../New-EntraGroupAppRoleAssignment.Tests.ps1 | 0 .../New-EntraGroupLifecyclePolicy.Tests.ps1 | 0 .../Entra/New-EntraIdentityProvider.Tests.ps1 | 0 .../Entra/New-EntraInvitation.Tests.ps1 | 0 .../New-EntraNamedLocationPolicy.Tests.ps1 | 0 .../New-EntraOauth2PermissionGrant.Tests.ps1 | 0 ...EntraPermissionGrantConditionSet.Tests.ps1 | 0 .../New-EntraPermissionGrantPolicy.Tests.ps1 | 0 .../module/Entra/New-EntraPolicy.Tests.ps1 | 0 .../Entra/New-EntraServicePrincipal.Tests.ps1 | 0 ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 0 ...rvicePrincipalPasswordCredential.Tests.ps1 | 0 ...EntraTrustedCertificateAuthority.Tests.ps1 | 0 .../module/Entra/New-EntraUser.Tests.ps1 | 0 .../New-EntraUserAppRoleAssignment.Tests.ps1 | 0 .../Remove-EntraAdministrativeUnit.Tests.ps1 | 0 ...ve-EntraAdministrativeUnitMember.Tests.ps1 | 0 .../Entra/Remove-EntraApplication.Tests.ps1 | 0 ...ntraApplicationExtensionProperty.Tests.ps1 | 2 +- .../Remove-EntraApplicationOwner.Tests.ps1 | 0 .../Remove-EntraApplicationPassword.Tests.ps1 | 0 ...traApplicationPasswordCredential.Tests.ps1 | 0 .../Remove-EntraDeletedApplication.Tests.ps1 | 0 ...move-EntraDeletedDirectoryObject.Tests.ps1 | 0 .../module/Entra/Remove-EntraDevice.Tests.ps1 | 0 ...emove-EntraDeviceRegisteredOwner.Tests.ps1 | 2 +- ...Remove-EntraDeviceRegisteredUser.Tests.ps1 | 2 +- ...ove-EntraDirectoryRoleAssignment.Tests.ps1 | 0 ...ove-EntraDirectoryRoleDefinition.Tests.ps1 | 0 .../Remove-EntraDirectoryRoleMember.Tests.ps1 | 0 .../module/Entra/Remove-EntraDomain.Tests.ps1 | 0 ...Remove-EntraFeatureRolloutPolicy.Tests.ps1 | 0 ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 0 .../module/Entra/Remove-EntraGroup.Tests.ps1 | 0 ...move-EntraGroupAppRoleAssignment.Tests.ps1 | 2 +- ...Remove-EntraGroupLifecyclePolicy.Tests.ps1 | 0 .../Entra/Remove-EntraGroupMember.Tests.ps1 | 0 .../Entra/Remove-EntraGroupOwner.Tests.ps1 | 0 .../Remove-EntraIdentityProvider.Tests.ps1 | 0 ...Remove-EntraLifecyclePolicyGroup.Tests.ps1 | 0 .../Remove-EntraNamedLocationPolicy.Tests.ps1 | 2 +- ...emove-EntraOAuth2PermissionGrant.Tests.ps1 | 2 +- ...EntraPermissionGrantConditionSet.Tests.ps1 | 0 ...emove-EntraPermissionGrantPolicy.Tests.ps1 | 2 +- .../module/Entra/Remove-EntraPolicy.Tests.ps1 | 0 ...Remove-EntraScopedRoleMembership.Tests.ps1 | 0 .../Remove-EntraServicePrincipal.Tests.ps1 | 0 ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 0 ...elegatedPermissionClassification.Tests.ps1 | 0 ...emove-EntraServicePrincipalOwner.Tests.ps1 | 0 ...rvicePrincipalPasswordCredential.Tests.ps1 | 0 ...EntraTrustedCertificateAuthority.Tests.ps1 | 0 .../module/Entra/Remove-EntraUser.Tests.ps1 | 0 ...emove-EntraUserAppRoleAssignment.Tests.ps1 | 0 .../Entra/Remove-EntraUserManager.Tests.ps1 | 0 .../Entra/Reset-EntraLifeCycleGroup.Tests.ps1 | 0 ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 0 .../Restore-EntraDeletedApplication.Tests.ps1 | 0 ...tore-EntraDeletedDirectoryObject.Tests.ps1 | 0 ...EntraSignedInUserAllRefreshToken.Tests.ps1 | 0 .../Revoke-EntraUserAllRefreshToken.Tests.ps1 | 0 ...t-EntraGroupIdsContactIsMemberOf.Tests.ps1 | 0 ...ect-EntraGroupIdsGroupIsMemberOf.Tests.ps1 | 0 ...oupIdsServicePrincipalIsMemberOf.Tests.ps1 | 0 ...lect-EntraGroupIdsUserIsMemberOf.Tests.ps1 | 0 .../Set-EntraAdministrativeUnit.Tests.ps1 | 0 .../Entra/Set-EntraApplication.Tests.ps1 | 0 .../Entra/Set-EntraApplicationLogo.Tests.ps1 | 0 .../Entra/Set-EntraAttributeSet.Tests.ps1 | 0 .../Set-EntraAuthorizationPolicy.Tests.ps1 | 0 ...Set-EntraConditionalAccessPolicy.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../module/Entra/Set-EntraDevice.Tests.ps1 | 0 .../Set-EntraDirSyncConfiguration.Tests.ps1 | 0 .../Entra/Set-EntraDirSyncEnabled.Tests.ps1 | 0 .../Entra/Set-EntraDirSyncFeature.Tests.ps1 | 0 ...Set-EntraDirectoryRoleDefinition.Tests.ps1 | 0 .../module/Entra/Set-EntraDomain.Tests.ps1 | 0 ...et-EntraDomainFederationSettings.Tests.ps1 | 0 .../Set-EntraFeatureRolloutPolicy.Tests.ps1 | 0 .../module/Entra/Set-EntraGroup.Tests.ps1 | 0 .../Set-EntraGroupLifecyclePolicy.Tests.ps1 | 0 .../Set-EntraNamedLocationPolicy.Tests.ps1 | 0 .../Set-EntraPartnerInformation.Tests.ps1 | 0 ...EntraPermissionGrantConditionSet.Tests.ps1 | 0 .../Set-EntraPermissionGrantPolicy.Tests.ps1 | 0 .../module/Entra/Set-EntraPolicy.Tests.ps1 | 0 .../Entra/Set-EntraServicePrincipal.Tests.ps1 | 0 .../Entra/Set-EntraTenantDetail.Tests.ps1 | 0 ...EntraTrustedCertificateAuthority.Tests.ps1 | 0 .../module/Entra/Set-EntraUser.Tests.ps1 | 0 .../Entra/Set-EntraUserLicense.Tests.ps1 | 0 .../Entra/Set-EntraUserManager.Tests.ps1 | 0 .../Entra/Set-EntraUserPassword.Tests.ps1 | 4 + .../Set-EntraUserThumbnailPhoto.Tests.ps1 | 0 ...pdate-EntraOauth2PermissionGrant.Tests.ps1 | 0 ...Update-EntraSignedInUserPassword.Tests.ps1 | 3 + .../Update-EntraUserFromFederated.Tests.ps1 | 0 .../module/Entra/Valid.Tests.ps1 | 0 ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 0 .../Add-EntraBetaApplicationPolicy.Tests.ps1 | 0 ...d-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 0 ...dd-EntraBetaDeviceRegisteredUser.Tests.ps1 | 0 ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 0 .../Add-EntraBetaGroupMember.Tests.ps1 | 0 .../Add-EntraBetaGroupOwner.Tests.ps1 | 0 ...dd-EntraBetaScopedRoleMembership.Tests.ps1 | 0 ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../EntraBeta/AddtionalFunctions.Tests.ps1 | 0 .../Confirm-EntraBetaDomain.Tests.ps1 | 0 .../module/EntraBeta/Customizations.Tests.ps1 | 0 .../module/EntraBeta/EntraBeta.Tests.ps1 | 2 +- .../module/EntraBeta/General.Tests.ps1 | 0 .../Get-EntraBetaAccountSku.Tests.ps1 | 0 .../Get-EntraBetaAdministrativeUnit.Tests.ps1 | 0 ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 0 .../Get-EntraBetaApplication.Tests.ps1 | 0 .../Get-EntraBetaApplicationLogo.Tests.ps1 | 0 ...etaApplicationPasswordCredential.Tests.ps1 | 0 .../Get-EntraBetaApplicationPolicy.Tests.ps1 | 0 ...ApplicationSignInDetailedSummary.Tests.ps1 | 0 ...ntraBetaApplicationSignInSummary.Tests.ps1 | 0 ...Get-EntraBetaApplicationTemplate.Tests.ps1 | 0 .../Get-EntraBetaAttributeSet.Tests.ps1 | 0 .../Get-EntraBetaAuditDirectoryLog.Tests.ps1 | 0 .../Get-EntraBetaAuditSignInLog.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../Get-EntraBetaDeletedGroup.Tests.ps1 | 0 .../EntraBeta/Get-EntraBetaDevice.Tests.ps1 | 0 ...t-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 0 ...et-EntraBetaDeviceRegisteredUser.Tests.ps1 | 0 ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 0 .../Get-EntraBetaDirSyncFeature.Tests.ps1 | 0 ...bjectOnPremisesProvisioningError.Tests.ps1 | 0 .../Get-EntraBetaDirectorySetting.Tests.ps1 | 0 ...ntraBetaDirectorySettingTemplate.Tests.ps1 | 0 ...ntraBetaDomainFederationSettings.Tests.ps1 | 0 ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 0 .../Get-EntraBetaFederationProperty.Tests.ps1 | 0 .../EntraBeta/Get-EntraBetaGroup.Tests.ps1 | 0 ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 0 ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 0 .../Get-EntraBetaGroupMember.Tests.ps1 | 0 .../Get-EntraBetaGroupOwner.Tests.ps1 | 0 .../Get-EntraBetaObjectSetting.Tests.ps1 | 0 .../Get-EntraBetaPasswordPolicy.Tests.ps1 | 0 ...taPasswordSingleSignOnCredential.Tests.ps1 | 0 ...t-EntraBetaPermissionGrantPolicy.Tests.ps1 | 0 .../EntraBeta/Get-EntraBetaPolicy.Tests.ps1 | 0 ...Get-EntraBetaPolicyAppliedObject.Tests.ps1 | 0 .../Get-EntraBetaPrivilegedResource.Tests.ps1 | 0 ...ntraBetaPrivilegedRoleDefinition.Tests.ps1 | 0 ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 0 ...et-EntraBetaScopedRoleMembership.Tests.ps1 | 0 .../Get-EntraBetaServicePrincipal.Tests.ps1 | 0 ...aBetaServicePrincipalOwnedObject.Tests.ps1 | 0 ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 0 .../EntraBeta/Get-EntraBetaUser.Tests.ps1 | 0 ...ntraBetaUserAuthenticationMethod.Tests.ps1 | 0 ...etaUserAuthenticationRequirement.Tests.ps1 | 0 .../Get-EntraBetaUserExtension.Tests.ps1 | 0 .../Get-EntraBetaUserLicenseDetail.Tests.ps1 | 0 .../Get-EntraBetaUserManager.Tests.ps1 | 0 .../Get-EntraBetaUserMembership.Tests.ps1 | 0 .../Get-EntraBetaUserOwnedDevice.Tests.ps1 | 0 ...et-EntraBetaUserRegisteredDevice.Tests.ps1 | 0 .../New-EntraBetaAdministrativeUnit.Tests.ps1 | 0 ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 0 .../New-EntraBetaApplication.Tests.ps1 | 0 .../New-EntraBetaAttributeSet.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 .../New-EntraBetaDirectorySetting.Tests.ps1 | 0 ...ew-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 0 .../EntraBeta/New-EntraBetaGroup.Tests.ps1 | 0 ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 0 ...w-EntraBetaOauth2PermissionGrant.Tests.ps1 | 0 .../New-EntraBetaObjectSetting.Tests.ps1 | 0 ...taPasswordSingleSignOnCredential.Tests.ps1 | 0 .../EntraBeta/New-EntraBetaUser.Tests.ps1 | 0 ...move-EntraBetaAdministrativeUnit.Tests.ps1 | 0 ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 0 .../Remove-EntraBetaApplication.Tests.ps1 | 0 ...emove-EntraBetaApplicationPolicy.Tests.ps1 | 0 .../Remove-EntraBetaDevice.Tests.ps1 | 0 ...e-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 2 +- ...ve-EntraBetaDeviceRegisteredUser.Tests.ps1 | 2 +- ...Remove-EntraBetaDirectorySetting.Tests.ps1 | 0 ...ve-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 0 ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 0 .../EntraBeta/Remove-EntraBetaGroup.Tests.ps1 | 0 ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 2 +- ...ve-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 0 .../Remove-EntraBetaGroupMember.Tests.ps1 | 0 .../Remove-EntraBetaGroupOwner.Tests.ps1 | 0 .../Remove-EntraBetaObjectSetting.Tests.ps1 | 0 ...taPasswordSingleSignOnCredential.Tests.ps1 | 0 .../Remove-EntraBetaPolicy.Tests.ps1 | 0 ...ve-EntraBetaScopedRoleMembership.Tests.ps1 | 0 ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 0 ...ve-EntraBetaTrustFrameworkPolicy.Tests.ps1 | 0 .../EntraBeta/Remove-EntraBetaUser.Tests.ps1 | 0 .../Remove-EntraBetaUserManager.Tests.ps1 | 0 ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 0 .../Set-EntraBetaAdministrativeUnit.Tests.ps1 | 0 .../Set-EntraBetaApplication.Tests.ps1 | 0 .../Set-EntraBetaApplicationLogo.Tests.ps1 | 0 .../Set-EntraBetaAttributeSet.Tests.ps1 | 0 ...ustomSecurityAttributeDefinition.Tests.ps1 | 0 ...yAttributeDefinitionAllowedValue.Tests.ps1 | 0 .../EntraBeta/Set-EntraBetaDevice.Tests.ps1 | 0 ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 0 .../Set-EntraBetaDirSyncEnabled.Tests.ps1 | 0 .../Set-EntraBetaDirSyncFeature.Tests.ps1 | 0 .../Set-EntraBetaDirectorySetting.Tests.ps1 | 0 ...ntraBetaDomainFederationSettings.Tests.ps1 | 0 ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 0 .../EntraBeta/Set-EntraBetaGroup.Tests.ps1 | 0 ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 0 .../Set-EntraBetaObjectSetting.Tests.ps1 | 0 .../Set-EntraBetaPartnerInformation.Tests.ps1 | 0 ...taPasswordSingleSignOnCredential.Tests.ps1 | 0 .../EntraBeta/Set-EntraBetaPolicy.Tests.ps1 | 0 ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 0 .../Set-EntraBetaServicePrincipal.Tests.ps1 | 0 .../EntraBeta/Set-EntraBetaUser.Tests.ps1 | 0 .../Set-EntraBetaUserManager.Tests.ps1 | 0 ...e-EntraBetaOauth2PermissionGrant.Tests.ps1 | 0 ...te-EntraBetaSignedInUserPassword.Tests.ps1 | 3 + ...etaUserAuthenticationRequirement.Tests.ps1 | 0 ...pdate-EntraBetaUserFromFederated.Tests.ps1 | 0 2871 files changed, 669 insertions(+), 487 deletions(-) create mode 100644 .azure-pipelines/generation-templates/generate_adapter-legacy.yml delete mode 100644 .configCredScanSuppressions.json rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 (100%) rename {moduleVNext => module}/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 (100%) rename {moduleVNext => module}/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 (100%) rename {moduleVNext => module}/Entra/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/Entra/UnMappedFiles/New-EntraInvitation.ps1 (100%) rename {moduleVNext => module}/Entra/UnMappedFiles/Test-EntraScript.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 (100%) rename {moduleVNext => module}/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 (100%) rename {moduleVNext => module}/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 (100%) rename {moduleVNext => module}/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Add-EntraBetaApplicationOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Add-EntraBetaApplicationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Add-EntraBetaServicePrincipalOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Enable-EntraBetaGlobalSecureAccessTenant.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationExtensionProperty.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationKeyCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationLogo.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationPasswordCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationProxyApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationProxyConnector.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationProxyConnectorGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationProxyConnectorGroupMembers.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationProxyConnectorMemberOf.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationServiceEndpoint.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaApplicationTemplate.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaDeletedApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaGlobalSecureAccessTenantStatus.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaPasswordSingleSignOnCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaPrivateAccessApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipal.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalAppRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalCreatedObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalKeyCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalMembership.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalOwnedObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaServicePrincipalPasswordCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaUserAuthenticationMethod.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Get-EntraBetaUserAuthenticationRequirement.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplicationExtensionProperty.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplicationFromApplicationTemplate.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplicationKey.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplicationKeyCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplicationPassword.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplicationPasswordCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplicationProxyApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaApplicationProxyConnectorGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaPasswordSingleSignOnCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaPrivateAccessApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaServicePrincipal.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaServicePrincipalAppRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/New-EntraBetaServicePrincipalPasswordCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationExtensionProperty.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationKey.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationKeyCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationPassword.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationPasswordCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationProxyApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationProxyConnectorGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaApplicationVerifiedPublisher.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaDeletedApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaDeletedDirectoryObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaPasswordSingleSignOnCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaServicePrincipal.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaServicePrincipalAppRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaServicePrincipalOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Remove-EntraBetaServicePrincipalPasswordCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Restore-EntraBetaDeletedApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaApplicationLogo.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaApplicationProxyApplication.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaApplicationProxyConnector.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaApplicationProxyConnectorGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaApplicationVerifiedPublisher.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaPasswordSingleSignOnCredential.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Set-EntraBetaServicePrincipal.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Update-EntraBetaOauth2PermissionGrant.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Applications}/Update-EntraBetaUserAuthenticationRequirement.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Authentication}/Connect-Entra.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Authentication}/Disconnect-Entra.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Authentication}/Get-EntraContext.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Authentication}/Reset-EntraBetaStrongAuthenticationMethodByUpn.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Authentication}/Revoke-EntraBetaSignedInUserAllRefreshToken.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Authentication}/Revoke-EntraBetaUserAllRefreshToken.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Add-EntraBetaAdministrativeUnitMember.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Add-EntraBetaDeviceRegisteredOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Add-EntraBetaDeviceRegisteredUser.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Add-EntraBetaDirectoryRoleMember.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Add-EntraBetaScopedRoleMembership.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Confirm-EntraBetaDomain.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Enable-EntraBetaDirectoryRole.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaAccountSku.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaAdministrativeUnit.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaAdministrativeUnitMember.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaAttributeSet.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaContact.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaContactDirectReport.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaContactManager.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaContactMembership.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaContract.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaCustomSecurityAttributeDefinition.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDeletedDirectoryObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDevice.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDeviceRegisteredOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDeviceRegisteredUser.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDirSyncConfiguration.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDirSyncFeature.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDirectoryRole.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDirectoryRoleMember.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDirectoryRoleTemplate.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDirectorySetting.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDirectorySettingTemplate.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDomain.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDomainFederationSettings.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDomainNameReference.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDomainServiceConfigurationRecord.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaDomainVerificationDnsRecord.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaFederationProperty.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaPartnerInformation.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaPasswordPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaScopedRoleMembership.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaSubscribedSku.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Get-EntraBetaTenantDetail.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/New-EntraBetaAdministrativeUnit.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/New-EntraBetaAdministrativeUnitMember.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/New-EntraBetaAttributeSet.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/New-EntraBetaCustomSecurityAttributeDefinition.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/New-EntraBetaDevice.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/New-EntraBetaDirectorySetting.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/New-EntraBetaDomain.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaAdministrativeUnit.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaAdministrativeUnitMember.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaContact.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaDevice.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaDeviceRegisteredOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaDeviceRegisteredUser.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaDirectoryRoleMember.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaDirectorySetting.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaDomain.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Remove-EntraBetaScopedRoleMembership.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Restore-EntraBetaDeletedDirectoryObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaAdministrativeUnit.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaAttributeSet.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaCustomSecurityAttributeDefinition.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaDevice.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaDirSyncConfiguration.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaDirSyncEnabled.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaDirSyncFeature.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaDirectorySetting.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaDomain.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaDomainFederationSettings.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaPartnerInformation.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => DirectoryManagement}/Set-EntraBetaTenantDetail.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Get-EntraBetaDirectoryRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Get-EntraBetaDirectoryRoleDefinition.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Get-EntraBetaPrivilegedResource.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Get-EntraBetaPrivilegedRole.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Get-EntraBetaPrivilegedRoleDefinition.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Get-EntraBetaPrivilegedRoleSetting.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/New-EntraBetaDirectoryRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/New-EntraBetaDirectoryRoleDefinition.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/New-EntraBetaPrivilegedRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Remove-EntraBetaDirectoryRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Remove-EntraBetaDirectoryRoleDefinition.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Set-EntraBetaDirectoryRoleDefinition.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Set-EntraBetaPrivilegedRoleAssignmentRequest.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Governance}/Set-EntraBetaPrivilegedRoleSetting.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Groups}/Get-EntraBetaGroupPermissionGrant.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Groups}/Get-EntraBetaObjectByObjectId.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Groups}/New-EntraBetaGroup.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Groups}/Remove-EntraBetaObjectSetting.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Groups}/Set-EntraBetaObjectSetting.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => NetworkAccess}/Get-EntraBetaPrivateAccessApplicationSegment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => NetworkAccess}/New-EntraBetaPrivateAccessApplicationSegment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => NetworkAccess}/Remove-EntraBetaPrivateAccessApplicationSegment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Reports}/Get-EntraBetaApplicationSignInDetailedSummary.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Reports}/Get-EntraBetaApplicationSignInSummary.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Reports}/Get-EntraBetaAuditDirectoryLog.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Reports}/Get-EntraBetaAuditSignInLog.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Add-EntraBetaServicePrincipalPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaAuthorizationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaConditionalAccessPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaFeatureRolloutPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaIdentityProvider.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaNamedLocationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaOAuth2PermissionGrant.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaPermissionGrantConditionSet.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaPermissionGrantPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaPolicyAppliedObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaServicePrincipalPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaTrustFrameworkPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Get-EntraBetaTrustedCertificateAuthority.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaConditionalAccessPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaFeatureRolloutPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaIdentityProvider.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaInvitation.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaNamedLocationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaOauth2PermissionGrant.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaPermissionGrantConditionSet.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaPermissionGrantPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaTrustFrameworkPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/New-EntraBetaTrustedCertificateAuthority.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaConditionalAccessPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaFeatureRolloutPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaIdentityProvider.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaNamedLocationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaOAuth2PermissionGrant.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaPermissionGrantConditionSet.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaPermissionGrantPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaServicePrincipalPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaTrustFrameworkPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Remove-EntraBetaTrustedCertificateAuthority.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaAuthorizationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaConditionalAccessPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaFeatureRolloutPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaIdentityProvider.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaNamedLocationPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaPermissionGrantConditionSet.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaPermissionGrantPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaTrustFrameworkPolicy.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => SignIns}/Set-EntraBetaTrustedCertificateAuthority.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserAppRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserCreatedObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserDirectReport.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserExtension.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserLicenseDetail.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserManager.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserMembership.md (100%) rename {moduleVNext => module}/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserOwnedDevice.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserOwnedObject.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserRegisteredDevice.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Get-EntraBetaUserThumbnailPhoto.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/New-EntraBetaUser.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/New-EntraBetaUserAppRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Remove-EntraBetaUser.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Remove-EntraBetaUserAppRoleAssignment.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Remove-EntraBetaUserExtension.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Remove-EntraBetaUserManager.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Set-EntraBetaUser.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Set-EntraBetaUserExtension.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Set-EntraBetaUserLicense.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Set-EntraBetaUserManager.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Set-EntraBetaUserPassword.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Set-EntraBetaUserThumbnailPhoto.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Update-EntraBetaSignedInUserPassword.md (100%) rename module/docs/entra-powershell-beta/{Microsoft.Graph.Entra.Beta => Users}/Update-EntraBetaUserFromFederated.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Add-EntraApplicationOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Add-EntraServicePrincipalDelegatedPermissionClassification.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Add-EntraServicePrincipalOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraApplication.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraApplicationExtensionProperty.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraApplicationKeyCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraApplicationLogo.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraApplicationOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraApplicationPasswordCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraApplicationServiceEndpoint.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraApplicationTemplate.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraDeletedApplication.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipal.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalAppRoleAssignedTo.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalCreatedObject.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalDelegatedPermissionClassification.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalKeyCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalMembership.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalOAuth2PermissionGrant.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalOwnedObject.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Get-EntraServicePrincipalPasswordCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraApplication.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraApplicationExtensionProperty.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraApplicationFromApplicationTemplate.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraApplicationKey.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraApplicationKeyCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraApplicationPassword.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraApplicationPasswordCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraServicePrincipal.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraServicePrincipalAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraServicePrincipalKeyCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/New-EntraServicePrincipalPasswordCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraApplication.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraApplicationExtensionProperty.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraApplicationKey.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraApplicationKeyCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraApplicationOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraApplicationPassword.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraApplicationPasswordCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraApplicationVerifiedPublisher.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraDeletedApplication.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraDeletedDirectoryObject.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraServicePrincipal.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraServicePrincipalAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraServicePrincipalDelegatedPermissionClassification.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraServicePrincipalKeyCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraServicePrincipalOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Remove-EntraServicePrincipalPasswordCredential.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Restore-EntraDeletedApplication.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Select-EntraGroupIdsServicePrincipalIsMemberOf.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Set-EntraApplication.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Set-EntraApplicationLogo.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Set-EntraApplicationVerifiedPublisher.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Applications}/Set-EntraServicePrincipal.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Add-EntraEnvironment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Connect-Entra.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Disconnect-Entra.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Find-EntraPermission.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Get-EntraContext.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Get-EntraEnvironment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Reset-EntraStrongAuthenticationMethodByUpn.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Revoke-EntraSignedInUserAllRefreshToken.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Authentication}/Revoke-EntraUserAllRefreshToken.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Add-EntraAdministrativeUnitMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Add-EntraDeviceRegisteredOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Add-EntraDeviceRegisteredUser.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Add-EntraDirectoryRoleMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Add-EntraScopedRoleMembership.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Confirm-EntraDomain.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Enable-EntraDirectoryRole.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-CrossCloudVerificationCode.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraAccountSku.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraAdministrativeUnit.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraAdministrativeUnitMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraAttributeSet.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraContact.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraContactDirectReport.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraContactManager.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraContactMembership.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraContactThumbnailPhoto.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraContract.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraCustomSecurityAttributeDefinition.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDeletedDirectoryObject.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDevice.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDeviceRegisteredOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDeviceRegisteredUser.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDirSyncConfiguration.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDirSyncFeature.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDirectoryObjectOnPremisesProvisioningError.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDirectoryRole.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDirectoryRoleMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDirectoryRoleTemplate.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDomain.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDomainFederationSettings.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDomainNameReference.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDomainServiceConfigurationRecord.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraDomainVerificationDnsRecord.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraExtensionProperty.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraFederationProperty.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraObjectByObjectId.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraPartnerInformation.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraPasswordPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraScopedRoleMembership.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraSubscribedSku.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraTenantDetail.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Get-EntraUserAuthenticationMethod.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/New-EntraAdministrativeUnit.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/New-EntraAttributeSet.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/New-EntraCustomSecurityAttributeDefinition.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/New-EntraDevice.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/New-EntraDomain.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraAdministrativeUnit.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraAdministrativeUnitMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraContact.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraDevice.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraDeviceRegisteredOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraDeviceRegisteredUser.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraDirectoryRoleMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraDomain.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraExternalDomainFederation.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Remove-EntraScopedRoleMembership.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Restore-EntraDeletedDirectoryObject.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraAdministrativeUnit.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraAttributeSet.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraCustomSecurityAttributeDefinition.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraDevice.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraDirSyncConfiguration.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraDirSyncEnabled.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraDirSyncFeature.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraDomain.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraDomainFederationSettings.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraPartnerInformation.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Set-EntraTenantDetail.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => DirectoryManagement}/Update-EntraOauth2PermissionGrant.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Governance}/Get-EntraDirectoryRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Governance}/Get-EntraDirectoryRoleDefinition.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Governance}/New-EntraDirectoryRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Governance}/New-EntraDirectoryRoleDefinition.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Governance}/Remove-EntraDirectoryRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Governance}/Remove-EntraDirectoryRoleDefinition.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Governance}/Set-EntraDirectoryRoleDefinition.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Add-EntraGroupMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Add-EntraGroupOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Add-EntraLifecyclePolicyGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraDeletedGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraGroupAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraGroupLifecyclePolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraGroupMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraGroupOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraGroupPermissionGrant.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraLifecyclePolicyGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Get-EntraObjectSetting.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/New-EntraGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/New-EntraGroupAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/New-EntraGroupLifecyclePolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Remove-EntraGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Remove-EntraGroupAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Remove-EntraGroupLifecyclePolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Remove-EntraGroupMember.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Remove-EntraGroupOwner.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Remove-EntraLifecyclePolicyGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Reset-EntraLifeCycleGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Select-EntraGroupIdsContactIsMemberOf.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Select-EntraGroupIdsGroupIsMemberOf.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Select-EntraGroupIdsUserIsMemberOf.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Set-EntraGroup.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Groups}/Set-EntraGroupLifecyclePolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Reports}/Get-EntraAuditDirectoryLog.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Reports}/Get-EntraAuditSignInLog.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraAuthorizationPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraConditionalAccessPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraFeatureRolloutPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraIdentityProvider.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraNamedLocationPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraOAuth2PermissionGrant.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraPermissionGrantConditionSet.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraPermissionGrantPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Get-EntraTrustedCertificateAuthority.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraConditionalAccessPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraFeatureRolloutPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraIdentityProvider.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraNamedLocationPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraOauth2PermissionGrant.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraPermissionGrantConditionSet.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraPermissionGrantPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/New-EntraTrustedCertificateAuthority.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraConditionalAccessPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraFeatureRolloutPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraFeatureRolloutPolicyDirectoryObject.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraIdentityProvider.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraNamedLocationPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraOAuth2PermissionGrant.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraPermissionGrantConditionSet.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraPermissionGrantPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Remove-EntraTrustedCertificateAuthority.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraAuthorizationPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraConditionalAccessPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraFeatureRolloutPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraIdentityProvider.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraNamedLocationPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraPermissionGrantConditionSet.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraPermissionGrantPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraPolicy.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => SignIns}/Set-EntraTrustedCertificateAuthority.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUser.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserCreatedObject.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserDirectReport.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserExtension.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserLicenseDetail.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserManager.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserMembership.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserOAuth2PermissionGrant.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserOwnedDevice.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserOwnedObject.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserRegisteredDevice.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Get-EntraUserThumbnailPhoto.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/New-EntraUser.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/New-EntraUserAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Remove-EntraUser.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Remove-EntraUserAppRoleAssignment.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Remove-EntraUserExtension.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Remove-EntraUserManager.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Set-EntraUser.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Set-EntraUserExtension.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Set-EntraUserLicense.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Set-EntraUserManager.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Set-EntraUserPassword.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Set-EntraUserThumbnailPhoto.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Update-EntraSignedInUserPassword.md (100%) rename module/docs/entra-powershell-v1.0/{Microsoft.Graph.Entra => Users}/Update-EntraUserFromFederated.md (100%) delete mode 100644 moduleVNext/EntraBeta/config/moduleMapping.json rename {module => module_legacy}/.sourcemap-maml-0.json (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Add-EntraAdministrativeUnitMember.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Add-EntraEnvironment.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Add-EntraScopedRoleMembership.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Connect-Entra.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Disconnect-Entra.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Find-EntraPermission.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraAccountSku.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraApplicationTemplate.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraAuthorizationPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraContext.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraDirSyncConfiguration.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraDirSyncFeature.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraDomainFederationSettings.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraEnvironment.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraFederationProperty.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraPartnerInformation.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraPasswordPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraScopedRoleMembership.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Get-EntraUserAuthenticationMethod.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/New-EntraAdministrativeUnit.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/New-EntraApplicationFromApplicationTemplate.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/New-EntraAttributeSet.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/New-EntraCustomHeaders.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/New-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/New-EntraFeatureRolloutPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/New-EntraOauth2PermissionGrant.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/New-EntraPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/README.md (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnit.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnitMember.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Remove-EntraScopedRoleMembership.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Reset-EntraStrongAuthenticationMethodByUpn.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Restore-EntraDeletedDirectoryObject.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraAdministrativeUnit.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraAttributeSet.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraDirSyncConfiguration.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraDirSyncEnabled.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraDirSyncFeature.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraDomainFederationSettings.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraFeatureRolloutPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraPartnerInformation.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Set-EntraServicePrincipal.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Test-EntraScript.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Update-EntraOAuth2PermissionGrant.ps1 (100%) rename {module => module_legacy}/Entra/AdditionalFunctions/Update-EntraUserFromFederated.ps1 (96%) rename {moduleVNext => module_legacy}/Entra/config/ModuleMetadata.json (100%) rename {moduleVNext => module_legacy}/Entra/config/ModuleSettings.json (100%) rename {moduleVNext => module_legacy}/Entra/config/dependencyMapping.json (100%) rename {moduleVNext => module_legacy}/Entra/config/moduleMapping.json (100%) rename {module => module_legacy}/Entra/customizations/Add-EntraApplicationOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Add-EntraDeviceRegisteredOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Add-EntraDeviceRegisteredUser.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Add-EntraDirectoryRoleMember.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Add-EntraGroupMember.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Add-EntraGroupOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Add-EntraLifecyclePolicyGroup.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Add-EntraServicePrincipalOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Confirm-EntraDomain.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Generic.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraApplication.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraApplicationKeyCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraApplicationLogo.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraApplicationOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraApplicationPasswordCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraApplicationServiceEndpoint.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraConditionalAccessPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraContact.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraContactDirectReport.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraContactMembership.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDeletedApplication.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDeletedDirectoryObject.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDeletedGroup.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDevice.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDeviceRegisteredOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDeviceRegisteredUser.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDirectoryRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDirectoryRoleDefinition.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDirectoryRoleMember.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDomain.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDomainNameReference.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDomainServiceConfigurationRecord.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraDomainVerificationDnsRecord.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraExtensionProperty.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraGroup.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraGroupAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraGroupMember.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraGroupOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraIdentityProvider.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraLifecyclePolicyGroup.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraNamedLocationPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraObjectByObjectId.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraPermissionGrantConditionSet.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraPermissionGrantPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipal.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalCreatedObject.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalKeyCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalMembership.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalOwnedObject.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraSubscribedSku.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraTenantDetail.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraTrustedCertificateAuthority.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUser.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserCreatedObject.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserDirectReport.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserExtension.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserLicenseDetail.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserManager.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserMembership.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserOAuth2PermissionGrant.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserOwnedDevice.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserOwnedObject.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserRegisteredDevice.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Get-EntraUserThumbnailPhoto.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraApplication.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraApplicationExtensionProperty.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraApplicationKeyCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraApplicationPassword.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraApplicationPasswordCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraConditionalAccessPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraDirectoryRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraDirectoryRoleDefinition.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraDomain.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraGroupAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraIdentityProvider.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraInvitation.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraNamedLocationPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraPermissionGrantConditionSet.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraPermissionGrantPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraServicePrincipal.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraTrustedCertificateAuthority.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraUser.ps1 (100%) rename {module => module_legacy}/Entra/customizations/New-EntraUserAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/README.md (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraAdministrativeUnit.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraAdministrativeUnitMember.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraApplicationKeyCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraApplicationOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraApplicationPasswordCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraApplicationVerifiedPublisher.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraConditionalAccessPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraDeletedApplication.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraDeletedDirectoryObject.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraDeviceRegisteredOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraDeviceRegisteredUser.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraDirectoryRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraDirectoryRoleDefinition.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraDirectoryRoleMember.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraDomain.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraGroupAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraGroupMember.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraGroupOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraLifecyclePolicyGroup.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraNamedLocationPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraPermissionGrantConditionSet.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraPermissionGrantPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraScopedRoleMembership.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraServicePrincipalKeyCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraServicePrincipalOwner.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraServicePrincipalPasswordCredential.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraTrustedCertificateAuthority.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraUserAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Remove-EntraUserManager.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Reset-EntraLifeCycleGroup.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Restore-EntraDeletedApplication.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Revoke-EntraSignedInUserAllRefreshToken.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Revoke-EntraUserAllRefreshToken.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Select-EntraGroupIdsContactIsMemberOf.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Select-EntraGroupIdsGroupIsMemberOf.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Select-EntraGroupIdsUserIsMemberOf.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraApplication.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraApplicationLogo.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraAuthorizationPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraConditionalAccessPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraDevice.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraDirectoryRoleDefinition.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraDomain.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraIdentityProvider.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraNamedLocationPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraPermissionGrantConditionSet.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraPermissionGrantPolicy.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraTenantDetail.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraTrustedCertificateAuthority.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraUser.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraUserExtension.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraUserLicense.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraUserManager.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraUserPassword.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Set-EntraUserThumbnailPhoto.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Types.ps1 (100%) rename {module => module_legacy}/Entra/customizations/Update-EntraSignedInUserPassword.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Confirm-EntraBetaDomain.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Connect-Entra.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Disconnect-Entra.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Enable-EntraBetaGlobalSecureAccessTenant.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaAccountSku.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnector.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncConfiguration.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncFeature.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaDomainFederationSettings.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaFederationProperty.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaPartnerInformation.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaPasswordPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationMethod.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationRequirement.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Get-EntraContext.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/New-EntraBetaCustomHeaders.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/New-EntraBetaOauth2PermissionGrant.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/README.md (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Restore-EntraBetaDeletedDirectoryObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnector.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncConfiguration.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncEnabled.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncFeature.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaDomainFederationSettings.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaPartnerInformation.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Set-EntraBetaServicePrincipal.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Test-EntraScript.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Update-EntraBetaOauth2PermissionGrant.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Update-EntraBetaUserAuthenticationRequirement.ps1 (100%) rename {module => module_legacy}/EntraBeta/AdditionalFunctions/Update-EntraBetaUserFromFederated.ps1 (96%) rename {moduleVNext => module_legacy}/EntraBeta/config/ModuleMetadata.json (100%) rename {moduleVNext => module_legacy}/EntraBeta/config/ModuleSettings.json (100%) rename {moduleVNext => module_legacy}/EntraBeta/config/dependencyMapping.json (88%) create mode 100644 module_legacy/EntraBeta/config/moduleMapping.json rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaAdministrativeUnitMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaApplicationOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaApplicationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredUser.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaDirectoryRoleMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaGroupMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaGroupOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaScopedRoleMembership.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaServicePrincipalOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Add-EntraBetaServicePrincipalPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Generic.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplicationKeyCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplicationLogo.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplicationOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplicationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplicationProxyApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplicationSignInDetailedSummary.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplicationSignInSummary.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaApplicationTemplate.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaAttributeSet.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaAuditDirectoryLog.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaAuditSignInLog.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaAuthorizationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaConditionalAccessPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaContact.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaContactDirectReport.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaContactMembership.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDeletedApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDeletedDirectoryObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDeletedGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDevice.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredUser.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDirectoryRoleMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDirectorySettingTemplate.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDomain.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDomainNameReference.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDomainServiceConfigurationRecord.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaDomainVerificationDnsRecord.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaGroupMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaGroupOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaIdentityProvider.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaNamedLocationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaObjectByObjectId.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaObjectSetting.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaPermissionGrantPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaPolicyAppliedObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaPrivilegedResource.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleDefinition.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleSetting.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaScopedRoleMembership.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipal.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalCreatedObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalKeyCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalMembership.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwnedObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaServicePrincipalPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaSubscribedSku.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaTenantDetail.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUser.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserCreatedObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserDirectReport.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserExtension.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserLicenseDetail.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserManager.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserMembership.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserOAuth2PermissionGrant.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserOwnedDevice.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserOwnedObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserRegisteredDevice.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Get-EntraBetaUserThumbnailPhoto.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaAdministrativeUnit.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaAdministrativeUnitMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaApplicationExtensionProperty.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaApplicationFromApplicationTemplate.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaApplicationKeyCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaApplicationPassword.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaApplicationPasswordCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaAttributeSet.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaConditionalAccessPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaDirectorySetting.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaDomain.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaIdentityProvider.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaInvitation.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaNamedLocationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaObjectSetting.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaPermissionGrantPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaServicePrincipal.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaUser.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/New-EntraBetaUserAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaAdministrativeUnitMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaApplicationKeyCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaApplicationOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaApplicationPasswordCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaApplicationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaApplicationProxyApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaApplicationVerifiedPublisher.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaConditionalAccessPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaDeletedApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaDeletedDirectoryObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredUser.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaDomain.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaGroupMember.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaGroupOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaNamedLocationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaObjectSetting.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaPermissionGrantPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaScopedRoleMembership.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaServicePrincipalOwner.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaUserAppRoleAssignment.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Remove-EntraBetaUserManager.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Reset-EntraBetaLifeCycleGroup.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Restore-EntraBetaDeletedApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Revoke-EntraBetaUserAllRefreshToken.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaAdministrativeUnit.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaApplication.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaApplicationLogo.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaAttributeSet.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaAuthorizationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaConditionalAccessPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaDevice.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaDirectorySetting.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaDomain.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaIdentityProvider.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaNamedLocationPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaObjectSetting.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaPermissionGrantPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaPrivilegedRoleSetting.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaTenantDetail.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaUser.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaUserLicense.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaUserManager.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaUserPassword.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Set-EntraBetaUserThumbnailPhoto.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Types.ps1 (100%) rename {module => module_legacy}/EntraBeta/customizations/Update-EntraBetaSignedInUserPassword.ps1 (100%) rename {module => module_legacy}/breadcrumb/toc.yml (100%) rename {module => module_legacy}/docfx.json (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaAdministrativeUnitMember.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaApplicationOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaApplicationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaDeviceRegisteredOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaDeviceRegisteredUser.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaDirectoryRoleMember.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupMember.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupOwner.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaScopedRoleMembership.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaServicePrincipalOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Add-EntraBetaServicePrincipalPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Confirm-EntraBetaDomain.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Authentication => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Connect-Entra.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Authentication => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Disconnect-Entra.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraAzureADAlias.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Enable-EntraBetaDirectoryRole.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaAccountSku.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaAdministrativeUnit.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaAdministrativeUnitMember.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationExtensionProperty.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationLogo.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationProxyApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationProxyConnector.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationProxyConnectorGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationProxyConnectorGroupMembers.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationProxyConnectorMemberOf.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationServiceEndpoint.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Reports => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationSignInDetailedSummary.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Reports => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationSignInSummary.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaApplicationTemplate.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaAttributeSet.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Reports => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaAuditDirectoryLog.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Reports => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaAuditSignInLog.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaAuthorizationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaConditionalAccessPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaContact.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaContactDirectReport.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaContactManager.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaContactMembership.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaContract.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaCustomSecurityAttributeDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDeletedApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDeletedDirectoryObject.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDevice.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDeviceRegisteredOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDeviceRegisteredUser.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirSyncConfiguration.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirSyncFeature.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirectoryRole.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirectoryRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirectoryRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirectoryRoleMember.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirectoryRoleTemplate.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirectorySetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDirectorySettingTemplate.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDomain.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDomainFederationSettings.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDomainNameReference.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDomainServiceConfigurationRecord.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaDomainVerificationDnsRecord.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaFeatureRolloutPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaFederationProperty.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroup.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupMember.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Groups => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaGroupPermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaIdentityProvider.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaNamedLocationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaOAuth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Groups => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaObjectByObjectId.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectSetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPartnerInformation.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPasswordPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPasswordSingleSignOnCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPermissionGrantConditionSet.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPermissionGrantPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPolicyAppliedObject.md (100%) rename {moduleVNext/docs/entra-powershell-beta/NetworkAccess => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPrivateAccessApplicationSegment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPrivilegedResource.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPrivilegedRole.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPrivilegedRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaPrivilegedRoleSetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaScopedRoleMembership.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipal.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalCreatedObject.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalMembership.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalOwnedObject.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaServicePrincipalPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaSubscribedSku.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaTenantDetail.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaTrustFrameworkPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaTrustedCertificateAuthority.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserCreatedObject.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserDirectReport.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserExtension.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserLicenseDetail.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserManager.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserMembership.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserOwnedDevice.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserOwnedObject.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserRegisteredDevice.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraBetaUserThumbnailPhoto.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Authentication => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Get-EntraContext.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaAdministrativeUnit.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaAdministrativeUnitMember.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplicationExtensionProperty.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplicationFromApplicationTemplate.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplicationKey.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplicationKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplicationPassword.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplicationPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplicationProxyApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaApplicationProxyConnectorGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaAttributeSet.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaConditionalAccessPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaCustomSecurityAttributeDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaDevice.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaDirectoryRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaDirectoryRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaDirectorySetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaDomain.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaFeatureRolloutPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Groups => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaGroup.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupAppRoleAssignment.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupLifecyclePolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaIdentityProvider.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaInvitation.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaNamedLocationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaOauth2PermissionGrant.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaObjectSetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaPasswordSingleSignOnCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaPermissionGrantConditionSet.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaPermissionGrantPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/NetworkAccess => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaPrivateAccessApplicationSegment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaPrivilegedRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaServicePrincipal.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaServicePrincipalAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaServicePrincipalPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaTrustFrameworkPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaTrustedCertificateAuthority.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaUser.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/New-EntraBetaUserAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaAdministrativeUnit.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaAdministrativeUnitMember.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationExtensionProperty.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationKey.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationPassword.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationProxyApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationProxyConnectorGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaApplicationVerifiedPublisher.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaConditionalAccessPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaContact.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDeletedApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDeletedDirectoryObject.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDevice.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDeviceRegisteredOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDeviceRegisteredUser.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDirectoryRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDirectoryRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDirectoryRoleMember.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDirectorySetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaDomain.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaFeatureRolloutPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroup.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupMember.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaIdentityProvider.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaNamedLocationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaOAuth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Groups => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaObjectSetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaPasswordSingleSignOnCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaPermissionGrantConditionSet.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaPermissionGrantPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/NetworkAccess => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaPrivateAccessApplicationSegment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaScopedRoleMembership.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaServicePrincipal.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaServicePrincipalAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaServicePrincipalOwner.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaServicePrincipalPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaServicePrincipalPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaTrustFrameworkPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaTrustedCertificateAuthority.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaUser.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaUserAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaUserExtension.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Remove-EntraBetaUserManager.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaLifeCycleGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Authentication => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Reset-EntraBetaStrongAuthenticationMethodByUpn.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Restore-EntraBetaDeletedApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Restore-EntraBetaDeletedDirectoryObject.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Authentication => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Revoke-EntraBetaSignedInUserAllRefreshToken.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Authentication => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Revoke-EntraBetaUserAllRefreshToken.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaAdministrativeUnit.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaApplicationLogo.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaApplicationProxyApplication.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaApplicationProxyConnector.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaApplicationProxyConnectorGroup.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaApplicationVerifiedPublisher.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaAttributeSet.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaAuthorizationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaConditionalAccessPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaCustomSecurityAttributeDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaDevice.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaDirSyncConfiguration.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaDirSyncEnabled.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaDirSyncFeature.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaDirectoryRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaDirectorySetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaDomain.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaDomainFederationSettings.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaFeatureRolloutPolicy.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroup.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaIdentityProvider.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaNamedLocationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Groups => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaObjectSetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaPartnerInformation.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaPasswordSingleSignOnCredential.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaPermissionGrantConditionSet.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaPermissionGrantPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaPrivilegedRoleAssignmentRequest.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Governance => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaPrivilegedRoleSetting.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Applications => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaServicePrincipal.md (100%) rename {moduleVNext/docs/entra-powershell-beta/DirectoryManagement => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaTenantDetail.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaTrustFrameworkPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-beta/SignIns => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaTrustedCertificateAuthority.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaUser.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaUserExtension.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaUserLicense.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaUserManager.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaUserPassword.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Set-EntraBetaUserThumbnailPhoto.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Test-EntraScript.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Update-EntraBetaSignedInUserPassword.md (100%) rename {moduleVNext/docs/entra-powershell-beta/Users => module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta}/Update-EntraBetaUserFromFederated.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/index.md (100%) rename {module => module_legacy}/docs/entra-powershell-beta/toc.yml (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraAdministrativeUnitMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraApplicationOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraDeviceRegisteredOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraDeviceRegisteredUser.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraDirectoryRoleMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraEnvironment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraGroupMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraGroupOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraLifecyclePolicyGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraScopedRoleMembership.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraServicePrincipalDelegatedPermissionClassification.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Add-EntraServicePrincipalOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Confirm-EntraDomain.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Connect-Entra.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Disconnect-Entra.md (100%) rename {module => module_legacy}/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Enable-EntraDirectoryRole.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Find-EntraPermission.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-CrossCloudVerificationCode.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraAccountSku.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraAdministrativeUnit.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraAdministrativeUnitMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraApplication.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraApplicationExtensionProperty.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraApplicationKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraApplicationLogo.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraApplicationOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraApplicationPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraApplicationServiceEndpoint.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraApplicationTemplate.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraAttributeSet.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Reports => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraAuditDirectoryLog.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Reports => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraAuditSignInLog.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraAuthorizationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraConditionalAccessPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraContact.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraContactDirectReport.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraContactManager.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraContactMembership.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraContactThumbnailPhoto.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraContext.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraContract.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraCustomSecurityAttributeDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDeletedApplication.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDeletedDirectoryObject.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDeletedGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDevice.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDeviceRegisteredOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDeviceRegisteredUser.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDirSyncConfiguration.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDirSyncFeature.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDirectoryObjectOnPremisesProvisioningError.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDirectoryRole.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Governance => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDirectoryRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Governance => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDirectoryRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDirectoryRoleMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDirectoryRoleTemplate.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDomain.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDomainFederationSettings.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDomainNameReference.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDomainServiceConfigurationRecord.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraDomainVerificationDnsRecord.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraEnvironment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraExtensionProperty.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraFeatureRolloutPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraFederationProperty.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraGroupAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraGroupLifecyclePolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraGroupMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraGroupOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraGroupPermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraIdentityProvider.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraLifecyclePolicyGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraNamedLocationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraOAuth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraObjectByObjectId.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraObjectSetting.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraPartnerInformation.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraPasswordPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraPermissionGrantConditionSet.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraPermissionGrantPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraScopedRoleMembership.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipal.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalAppRoleAssignedTo.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalCreatedObject.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalDelegatedPermissionClassification.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalMembership.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalOAuth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalOwnedObject.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraServicePrincipalPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraSubscribedSku.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraTenantDetail.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraTrustedCertificateAuthority.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUser.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserCreatedObject.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserDirectReport.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserExtension.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserLicenseDetail.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserManager.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserMembership.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserOAuth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserOwnedDevice.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserOwnedObject.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserRegisteredDevice.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Get-EntraUserThumbnailPhoto.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraAdministrativeUnit.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraApplication.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraApplicationExtensionProperty.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraApplicationFromApplicationTemplate.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraApplicationKey.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraApplicationKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraApplicationPassword.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraApplicationPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraAttributeSet.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraConditionalAccessPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraCustomSecurityAttributeDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraDevice.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Governance => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraDirectoryRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Governance => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraDirectoryRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraDomain.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraFeatureRolloutPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraGroupAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraGroupLifecyclePolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraIdentityProvider.md (100%) rename {module => module_legacy}/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraInvitation.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraNamedLocationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraOauth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraPermissionGrantConditionSet.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraPermissionGrantPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraServicePrincipal.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraServicePrincipalAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraServicePrincipalKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraServicePrincipalPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraTrustedCertificateAuthority.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraUser.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/New-EntraUserAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraAdministrativeUnit.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraAdministrativeUnitMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraApplication.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraApplicationExtensionProperty.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraApplicationKey.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraApplicationKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraApplicationOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraApplicationPassword.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraApplicationPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraApplicationVerifiedPublisher.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraConditionalAccessPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraContact.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDeletedApplication.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDeletedDirectoryObject.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDevice.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDeviceRegisteredOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDeviceRegisteredUser.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Governance => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDirectoryRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Governance => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDirectoryRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDirectoryRoleMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraDomain.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraExternalDomainFederation.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraFeatureRolloutPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraFeatureRolloutPolicyDirectoryObject.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraGroupAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraGroupLifecyclePolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraGroupMember.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraGroupOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraIdentityProvider.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraLifecyclePolicyGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraNamedLocationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraOAuth2PermissionGrant.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraPermissionGrantConditionSet.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraPermissionGrantPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraScopedRoleMembership.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraServicePrincipal.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraServicePrincipalAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraServicePrincipalDelegatedPermissionClassification.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraServicePrincipalKeyCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraServicePrincipalOwner.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraServicePrincipalPasswordCredential.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraTrustedCertificateAuthority.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraUser.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraUserAppRoleAssignment.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraUserExtension.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Remove-EntraUserManager.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Reset-EntraLifeCycleGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Reset-EntraStrongAuthenticationMethodByUpn.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Restore-EntraDeletedApplication.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Restore-EntraDeletedDirectoryObject.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Revoke-EntraSignedInUserAllRefreshToken.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Authentication => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Revoke-EntraUserAllRefreshToken.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Select-EntraGroupIdsContactIsMemberOf.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Select-EntraGroupIdsGroupIsMemberOf.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Select-EntraGroupIdsServicePrincipalIsMemberOf.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Select-EntraGroupIdsUserIsMemberOf.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraAdministrativeUnit.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraApplication.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraApplicationLogo.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraApplicationVerifiedPublisher.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraAttributeSet.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraAuthorizationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraConditionalAccessPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraCustomSecurityAttributeDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraDevice.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraDirSyncConfiguration.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraDirSyncEnabled.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraDirSyncFeature.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Governance => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraDirectoryRoleDefinition.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraDomain.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraDomainFederationSettings.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraFeatureRolloutPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraGroup.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Groups => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraGroupLifecyclePolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraIdentityProvider.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraNamedLocationPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraPartnerInformation.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraPermissionGrantConditionSet.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraPermissionGrantPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraPolicy.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Applications => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraServicePrincipal.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraTenantDetail.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/SignIns => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraTrustedCertificateAuthority.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraUser.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraUserExtension.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraUserLicense.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraUserManager.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraUserPassword.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Set-EntraUserThumbnailPhoto.md (100%) rename {module => module_legacy}/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Test-EntraScript.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Update-EntraSignedInUserPassword.md (100%) rename {moduleVNext/docs/entra-powershell-v1.0/Users => module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra}/Update-EntraUserFromFederated.md (100%) rename {module => module_legacy}/docs/entra-powershell-v1.0/index.md (100%) rename {module => module_legacy}/docs/entra-powershell-v1.0/toc.yml (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleAssignmentRequest.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplication.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplicationConnectorGroup.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnector.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroup.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMember.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMembers.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorMemberOf.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyApplication.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyConnectorGroup.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplication.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplicationConnectorGroup.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyConnectorGroup.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplication.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationCustomDomainCertificate.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationSingleSignOn.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnector.md (100%) rename {module => module_legacy}/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnectorGroup.md (100%) rename {module => module_legacy}/mapping/monikerMapping.json (100%) rename {testVNext => test}/Common-Functions.ps1 (100%) rename {testVNext => test}/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraApplication.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Invalid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Module.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/New-EntraApplication.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraApplication.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Set-EntraApplication.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 (100%) rename {testVNext => test}/Entra/Applications/Valid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Authentication/Connect-Entra.Tests.ps1 (100%) rename {testVNext => test}/Entra/Authentication/Disconnect-Entra.Tests.ps1 (100%) rename {testVNext => test}/Entra/Authentication/Invalid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Authentication/Module.Tests.ps1 (100%) rename {testVNext => test}/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 (100%) rename {testVNext => test}/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 (100%) rename {testVNext => test}/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 (100%) rename {testVNext => test}/Entra/Authentication/Valid.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Invalid.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Module.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 (100%) rename {testVNext => test}/Entra/DirectoryManagement/Valid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Entra.Tests.ps1 (92%) rename test/{module => }/Entra/EntraCmdletsMap.ps1 (100%) rename {testVNext => test}/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/Invalid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/Module.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 (100%) rename {testVNext => test}/Entra/Governance/Valid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Add-EntraGroupMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Get-EntraGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Get-EntraGroupMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Invalid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Module.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/New-EntraGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Remove-EntraGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Set-EntraGroup.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/Groups/Valid.Tests.ps1 (100%) rename {testVNext => test}/Entra/New-EntraInvitation.Tests.ps1 (100%) rename {testVNext => test}/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 (100%) rename {testVNext => test}/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 (100%) rename {testVNext => test}/Entra/Reports/Invalid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Reports/Module.Tests.ps1 (100%) rename {testVNext => test}/Entra/Reports/Valid.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Invalid.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Module.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Set-EntraPolicy.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 (100%) rename {testVNext => test}/Entra/SignIns/Valid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUser.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserExtension.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserManager.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserMembership.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Invalid.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Module.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/New-EntraUser.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Remove-EntraUser.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Remove-EntraUserManager.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Set-EntraUser.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Set-EntraUserLicense.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Set-EntraUserManager.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Set-EntraUserPassword.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 (100%) rename {testVNext => test}/Entra/Users/Valid.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/EntraBeta.Tests.ps1 (92%) rename {testVNext => test}/EntraBeta/General.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 (100%) rename {testVNext => test}/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 (100%) rename {test => test_legacy}/Customizations.Test.ps1 (100%) rename {test => test_legacy}/module/Common-Functions.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraAdministrativeUnitMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraApplicationOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraDeviceRegisteredOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraDeviceRegisteredUser.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraDirectoryRoleMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraGroupMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraGroupOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraLifecyclePolicyGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraScopedRoleMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Add-EntraServicePrincipalOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/AddtionalFunctions.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Common-Parameter.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Connect-Entra.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Customizations.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Disconnect-Entra.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Enable-EntraDirectoryRole.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Entra.Tests.ps1 (93%) rename {testVNext => test_legacy/module}/Entra/EntraCmdletsMap.ps1 (100%) rename {test => test_legacy}/module/Entra/General.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraAccountSku.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraAdministrativeUnit.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraAdministrativeUnitMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraApplicationExtensionProperty.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraApplicationKeyCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraApplicationLogo.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraApplicationModule.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraApplicationOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraApplicationPasswordCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraApplicationTemplate.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraAttributeSet.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraAuditDirectoryLog.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraAuditSignInLog.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraAuthorizationPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraConditionalAccessPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraContact.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraContactMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDeletedApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDeletedDirectoryObject.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDeletedGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDeviceRegisteredOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDeviceRegisteredUser.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDirSyncConfiguration.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDirSyncFeatures.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDirectoryRole.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDirectoryRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDirectoryRoleDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDirectoryRoleMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDirectoryRoleTemplate.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDomain.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDomainFederationSettings.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDomainNameReference.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraDomainVerificationDnsRecord.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraFeatureRolloutPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraFederationProperty.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraGroupAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraGroupLifecyclePolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraGroupMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraGroupOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraIdentityProvider.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraLifecyclePolicyGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraOAuth2PermissionGrant.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraObjectByObjectId.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraObjectSetting.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraPasswordPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraPermissionGrantConditionSet.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraPermissionGrantPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraScopedRoleMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipal.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalKeyCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalOwnedObject.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraSubscribedSku.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraTenantDetail.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraTrustedCertificateAuthority.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUser.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserAuthenticationMethod.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserCreatedObject.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserDirectReport.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserExtension.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserLicenseDetail.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserManager.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserOwnedDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserOwnedObject.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Get-EntraUserRegisteredDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Invalid.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Module.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraAdministrativeUnit.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraApplicationExtensionProperty.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraApplicationFromApplicationTemplate.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraApplicationPassword.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraApplicationPasswordCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraAttributeSet.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraConditionalAccessPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraDirectoryRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraDirectoryRoleDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraDomain.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraFeatureRolloutPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraGroupAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraGroupLifecyclePolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraIdentityProvider.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraInvitation.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraNamedLocationPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraOauth2PermissionGrant.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraPermissionGrantConditionSet.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraPermissionGrantPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraServicePrincipal.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraServicePrincipalPasswordCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraTrustedCertificateAuthority.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraUser.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/New-EntraUserAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraAdministrativeUnit.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraAdministrativeUnitMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraApplicationExtensionProperty.Tests.ps1 (98%) rename {test => test_legacy}/module/Entra/Remove-EntraApplicationOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraApplicationPassword.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraApplicationPasswordCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraDeletedApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraDeletedDirectoryObject.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraDeviceRegisteredOwner.Tests.ps1 (98%) rename {test => test_legacy}/module/Entra/Remove-EntraDeviceRegisteredUser.Tests.ps1 (98%) rename {test => test_legacy}/module/Entra/Remove-EntraDirectoryRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraDirectoryRoleDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraDirectoryRoleMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraDomain.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraFeatureRolloutPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraGroupAppRoleAssignment.Tests.ps1 (98%) rename {test => test_legacy}/module/Entra/Remove-EntraGroupLifecyclePolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraGroupMember.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraGroupOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraIdentityProvider.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraLifecyclePolicyGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraNamedLocationPolicy.Tests.ps1 (97%) rename {test => test_legacy}/module/Entra/Remove-EntraOAuth2PermissionGrant.Tests.ps1 (97%) rename {test => test_legacy}/module/Entra/Remove-EntraPermissionGrantConditionSet.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraPermissionGrantPolicy.Tests.ps1 (97%) rename {test => test_legacy}/module/Entra/Remove-EntraPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraScopedRoleMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraServicePrincipal.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraServicePrincipalOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraTrustedCertificateAuthority.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraUser.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraUserAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Remove-EntraUserManager.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Reset-EntraLifeCycleGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Restore-EntraDeletedApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Restore-EntraDeletedDirectoryObject.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Revoke-EntraUserAllRefreshToken.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraAdministrativeUnit.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraApplicationLogo.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraAttributeSet.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraAuthorizationPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraConditionalAccessPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraDirSyncConfiguration.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraDirSyncEnabled.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraDirSyncFeature.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraDirectoryRoleDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraDomain.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraDomainFederationSettings.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraFeatureRolloutPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraGroupLifecyclePolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraNamedLocationPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraPartnerInformation.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraPermissionGrantConditionSet.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraPermissionGrantPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraServicePrincipal.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraTenantDetail.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraTrustedCertificateAuthority.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraUser.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraUserLicense.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraUserManager.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Set-EntraUserPassword.Tests.ps1 (98%) rename {test => test_legacy}/module/Entra/Set-EntraUserThumbnailPhoto.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Update-EntraOauth2PermissionGrant.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Update-EntraSignedInUserPassword.Tests.ps1 (96%) rename {test => test_legacy}/module/Entra/Update-EntraUserFromFederated.Tests.ps1 (100%) rename {test => test_legacy}/module/Entra/Valid.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaApplicationPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaGroupMember.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaGroupOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaScopedRoleMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/AddtionalFunctions.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Confirm-EntraBetaDomain.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Customizations.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/EntraBeta.Tests.ps1 (92%) rename {test => test_legacy}/module/EntraBeta/General.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaAccountSku.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaAdministrativeUnit.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaApplicationLogo.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaApplicationPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaApplicationSignInSummary.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaApplicationTemplate.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaAttributeSet.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaAuditDirectoryLog.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaAuditSignInLog.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDeletedGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDirSyncConfiguration.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDirSyncFeature.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDirectorySetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaDomainFederationSettings.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaFederationProperty.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaGroupMember.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaGroupOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaObjectSetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaPasswordPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaPolicyAppliedObject.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaPrivilegedResource.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaScopedRoleMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaServicePrincipal.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUser.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUserAuthenticationMethod.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUserAuthenticationRequirement.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUserExtension.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUserLicenseDetail.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUserManager.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUserMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUserOwnedDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Get-EntraBetaUserRegisteredDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaAdministrativeUnit.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaAdministrativeUnitMember.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaAttributeSet.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaDirectorySetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaOauth2PermissionGrant.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaObjectSetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/New-EntraBetaUser.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaAdministrativeUnit.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaApplicationPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 (98%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 (98%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaDirectorySetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 (98%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaGroupMember.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaGroupOwner.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaObjectSetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaScopedRoleMembership.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaUser.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Remove-EntraBetaUserManager.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaAdministrativeUnit.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaApplication.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaApplicationLogo.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaAttributeSet.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaDevice.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaDirSyncConfiguration.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaDirSyncEnabled.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaDirSyncFeature.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaDirectorySetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaDomainFederationSettings.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaGroup.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaObjectSetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaPartnerInformation.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaPolicy.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaServicePrincipal.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaUser.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Set-EntraBetaUserManager.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Update-EntraBetaOauth2PermissionGrant.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Update-EntraBetaSignedInUserPassword.Tests.ps1 (97%) rename {test => test_legacy}/module/EntraBeta/Update-EntraBetaUserAuthenticationRequirement.Tests.ps1 (100%) rename {test => test_legacy}/module/EntraBeta/Update-EntraBetaUserFromFederated.Tests.ps1 (100%) diff --git a/.azure-pipelines/generation-templates/generate_adapter-1es.yml b/.azure-pipelines/generation-templates/generate_adapter-1es.yml index 51680a631d..c135f17715 100644 --- a/.azure-pipelines/generation-templates/generate_adapter-1es.yml +++ b/.azure-pipelines/generation-templates/generate_adapter-1es.yml @@ -36,20 +36,14 @@ steps: targetType: inline script: Install-Module PlatyPS -scope currentuser -Force pwsh: true -- task: powershell@2 - displayName: 'Create Module Help Files Entra' - inputs: - targetType: inline - script: | - Import-Module PlatyPS - . ./build/common-functions.ps1 - Create-ModuleHelp -Module Entra - pwsh: true # - task: powershell@2 -# displayName: 'Build Entra' +# displayName: 'Create Module Help Files Entra' # inputs: # targetType: inline -# script: ./build/Create-CompatModule.ps1 -Module Entra -Verbose +# script: | +# Import-Module PlatyPS +# . ./build/common-functions.ps1 +# Create-ModuleHelp -Module Entra # pwsh: true - task: powershell@2 displayName: '[Modularization ] Build Entra' @@ -117,22 +111,14 @@ steps: script: | ./build/Install-Dependencies.ps1 -ModuleName EntraBeta -Verbose pwsh: true -- task: powershell@2 - displayName: 'Create Module Help Files EntraBeta' - inputs: - targetType: inline - script: | - Import-Module PlatyPS - . ./build/common-functions.ps1 - Create-ModuleHelp -Module EntraBeta - pwsh: true # - task: powershell@2 -# displayName: 'Build EntraBeta' +# displayName: 'Create Module Help Files EntraBeta' # inputs: # targetType: inline # script: | -# $MaximumFunctionCount=32768 -# ./build/Create-CompatModule.ps1 -Module EntraBeta -Verbose +# Import-Module PlatyPS +# . ./build/common-functions.ps1 +# Create-ModuleHelp -Module EntraBeta # pwsh: true - task: powershell@2 displayName: '[Modularization ] Build EntraBeta' @@ -191,39 +177,13 @@ steps: targetType: inline script: Install-Module Pester -scope currentuser -SkipPublisherCheck -Force pwsh: true -# - task: powershell@2 -# displayName: 'Run tests Entra' -# inputs: -# targetType: inline -# pwsh: true -# script: | -# cd test/module/entra -# Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml -# - task: PublishTestResults@2 -# inputs: -# testResultsFormat: NUnit -# testResultsFiles: "./test/results/pester-test-results-ad.xml" -# failTaskOnFailedTests: true -# - task: powershell@2 -# displayName: 'Run tests EntraBeta' -# inputs: -# targetType: inline -# pwsh: true -# script: | -# cd test/module/entrabeta -# Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml -# - task: PublishTestResults@2 -# inputs: -# testResultsFormat: NUnit -# testResultsFiles: "./test/results/pester-test-results-preview.xml" -# failTaskOnFailedTests: true - task: powershell@2 - displayName: '[Modularization] Run tests Entra' + displayName: 'Run tests Entra' inputs: targetType: inline pwsh: true script: | - cd testVNext/Entra + cd test/Entra Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml - task: PublishTestResults@2 inputs: @@ -231,12 +191,12 @@ steps: testResultsFiles: "./test/results/pester-test-results-ad.xml" failTaskOnFailedTests: true - task: powershell@2 - displayName: '[Modularization] Run tests Entra Beta' + displayName: 'Run tests Entra Beta' inputs: targetType: inline pwsh: true script: | - cd testVNext/EntraBeta + cd test/EntraBeta Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml - task: PublishTestResults@2 inputs: diff --git a/.azure-pipelines/generation-templates/generate_adapter-legacy.yml b/.azure-pipelines/generation-templates/generate_adapter-legacy.yml new file mode 100644 index 0000000000..43bdec1d2c --- /dev/null +++ b/.azure-pipelines/generation-templates/generate_adapter-legacy.yml @@ -0,0 +1,253 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +# https://aka.ms/yaml + +parameters: + - name: Sign + type: boolean + default: false + - name: Integration + type: boolean + default: false + +steps: +- task: powershell@2 + displayName: 'Show current PowerShell version information' + inputs: + targetType: inline + script: 'echo $PSVersionTable' + pwsh: false +- task: powershell@2 + displayName: 'Set maximum function count' + inputs: + targetType: inline + script: '$MaximumFunctionCount=32768' + pwsh: false +- task: powershell@2 + displayName: 'Install Dependencies Entra' + inputs: + targetType: inline + script: | + ./build/Install-Dependencies.ps1 -ModuleName Entra -Verbose + pwsh: false +- task: powershell@2 + displayName: 'Install PlatyPS' + inputs: + targetType: inline + script: Install-Module PlatyPS -scope currentuser -Force + pwsh: false +- task: powershell@2 + displayName: 'Create Module Help Files Entra' + inputs: + targetType: inline + script: | + Import-Module PlatyPS + . ./build/common-functions.ps1 + Create-ModuleHelp -Module Entra + pwsh: false +- task: powershell@2 + displayName: 'Build Entra' + inputs: + targetType: inline + script: ./build/Create-CompatModule.ps1 -Module Entra -Verbose + pwsh: false +- ${{ if eq(parameters.Sign, true) }}: + - template: ../common-templates/esrp/codesign.yml + parameters: + FolderPath: "bin" + Pattern: "*.psm1, *.psd1, *.format.ps1xml, *.ps1" + - task: PowerShell@2 + displayName: "Validate Authenticode Signature" + inputs: + targetType: "inline" + pwsh: true + script: | + $ModulePsd1 = "bin/Microsoft.Graph.Entra.psd1" + $ModulePsm1 = "bin/Microsoft.Graph.Entra.psm1" + ($ModulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" + ($ModulePsm1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" +- task: powershell@2 + displayName: 'Create Module Files Entra' + inputs: + targetType: inline + script: | + . ./build/common-functions.ps1 + Create-ModuleFolder + pwsh: false +- task: PublishBuildArtifacts@1 + displayName: 'Publish Module Files Entra' + inputs: + ArtifactName: 'Module Files' + PathtoPublish: 'bin' +- task: powershell@2 + displayName: 'Register Local Gallery' + inputs: + targetType: inline + script: | + . ./build/common-functions.ps1 + Register-LocalGallery -Path $(Build.ArtifactStagingDirectory) + pwsh: false +- task: powershell@2 + displayName: 'Publish to Local Gallery Entra' + inputs: + targetType: inline + script: ./build/Publish-LocalCompatModule.ps1 -Install + pwsh: false +- task: PublishBuildArtifacts@1 + displayName: 'Publish Module Nuget File Entra' + inputs: + ArtifactName: 'Module Nuget' + PathtoPublish: '$(Build.ArtifactStagingDirectory)' +- task: powershell@2 + displayName: 'Remove Build Folders' + inputs: + targetType: inline + script: | + . ./build/common-functions.ps1 + Remove-BuildDirectories + pwsh: false +- task: powershell@2 + displayName: 'Install Dependencies EntraBeta' + inputs: + targetType: inline + script: | + ./build/Install-Dependencies.ps1 -ModuleName EntraBeta -Verbose + pwsh: false +- task: powershell@2 + displayName: 'Create Module Help Files EntraBeta' + inputs: + targetType: inline + script: | + Import-Module PlatyPS + . ./build/common-functions.ps1 + Create-ModuleHelp -Module EntraBeta + pwsh: false +- task: powershell@2 + displayName: 'Build EntraBeta' + inputs: + targetType: inline + script: | + $MaximumFunctionCount=32768 + ./build/Create-CompatModule.ps1 -Module EntraBeta -Verbose + pwsh: false +- ${{ if eq(parameters.Sign, true) }}: + - template: ../common-templates/esrp/codesign.yml + parameters: + FolderPath: "bin" + Pattern: "*.psm1, *.psd1, *.format.ps1xml, *.ps1" + - task: PowerShell@2 + displayName: "Validate Authenticode Signature" + inputs: + targetType: "inline" + pwsh: true + script: | + $ModulePsd1 = "bin/Microsoft.Graph.Entra.Beta.psd1" + $ModulePsm1 = "bin/Microsoft.Graph.Entra.Beta.psm1" + ($ModulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" + ($ModulePsm1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" +- task: powershell@2 + displayName: 'Create Module Files EntraBeta' + inputs: + targetType: inline + script: | + . ./build/common-functions.ps1 + Create-ModuleFolder + pwsh: false +- task: PublishBuildArtifacts@1 + displayName: 'Publish Module Files EntraBeta' + inputs: + ArtifactName: 'Module Files' + PathtoPublish: 'bin' +- task: powershell@2 + displayName: 'Publish to Local Gallery EntraBeta' + inputs: + targetType: inline + script: ./build/Publish-LocalCompatModule.ps1 -Install + pwsh: false +- task: PublishBuildArtifacts@1 + displayName: 'Publish Module Nuget File EntraBeta' + inputs: + ArtifactName: 'Module Nuget' + PathtoPublish: '$(Build.ArtifactStagingDirectory)' +- task: powershell@2 + displayName: 'Remove Build Folders' + inputs: + targetType: inline + script: | + . ./build/common-functions.ps1 + Remove-BuildDirectories + pwsh: false +- task: powershell@2 + displayName: 'Install Pester' + inputs: + targetType: inline + script: Install-Module Pester -scope currentuser -SkipPublisherCheck -Force + pwsh: false +- task: powershell@2 + displayName: 'Run tests Entra' + inputs: + targetType: inline + pwsh: true + script: | + cd test/module/entra + Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml +- task: PublishTestResults@2 + inputs: + testResultsFormat: NUnit + testResultsFiles: "./test/results/pester-test-results-ad.xml" + failTaskOnFailedTests: true +- task: powershell@2 + displayName: 'Run tests EntraBeta' + inputs: + targetType: inline + pwsh: true + script: | + cd test/module/entrabeta + Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml +- task: PublishTestResults@2 + inputs: + testResultsFormat: NUnit + testResultsFiles: "./test/results/pester-test-results-preview.xml" + failTaskOnFailedTests: true +- ${{ if eq(parameters.Integration, true) }}: + - task: powershell@2 + displayName: 'Run Entra integration tests' + inputs: + targetType: inline + pwsh: true + script: | + cd test/module/Integration/Entra + Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml + - task: PublishTestResults@2 + inputs: + testResultsFormat: NUnit + testResultsFiles: "./test/results/pester-test-results-preview.xml" + failTaskOnFailedTests: true + - task: powershell@2 + displayName: 'Run EntraBeta integration tests' + inputs: + targetType: inline + pwsh: true + script: | + cd test/module/Integration/EntraBeta + Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml + - task: PublishTestResults@2 + inputs: + testResultsFormat: NUnit + testResultsFiles: "./test/results/pester-test-results-preview.xml" + failTaskOnFailedTests: true +- task: powershell@2 + displayName: 'Remove Local Gallery' + inputs: + targetType: inline + script: | + . ./build/common-functions.ps1 + Unregister-LocalGallery + pwsh: false +- task: PSScriptAnalyzer@1 + displayName: 'Run PSScriptAnalyzer' + inputs: + Path: '$(Build.SourcesDirectory)' + Settings: required + IgnorePattern: .gdn + Recurse: true \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/generate_adapter.yml b/.azure-pipelines/generation-templates/generate_adapter.yml index 0cc75ef8a4..87360d0d1d 100644 --- a/.azure-pipelines/generation-templates/generate_adapter.yml +++ b/.azure-pipelines/generation-templates/generate_adapter.yml @@ -36,25 +36,17 @@ steps: targetType: inline script: Install-Module PlatyPS -scope currentuser -Force pwsh: true -- task: powershell@2 - displayName: 'Create Module Help Files Entra' - inputs: - targetType: inline - script: | - Import-Module PlatyPS - . ./build/common-functions.ps1 - Create-ModuleHelp -Module Entra - pwsh: true # - task: powershell@2 -# displayName: 'Build Entra' +# displayName: 'Create Module Help Files Entra' # inputs: # targetType: inline # script: | -# $MaximumFunctionCount=32768 -# ./build/Create-CompatModule.ps1 -Module Entra -Verbose +# Import-Module PlatyPS +# . ./build/common-functions.ps1 +# Create-ModuleHelp -Module Entra # pwsh: true - task: powershell@2 - displayName: '[Modularization ] Build Entra' + displayName: 'Build Entra' inputs: targetType: inline script: | @@ -123,25 +115,17 @@ steps: script: | ./build/Install-Dependencies.ps1 -ModuleName EntraBeta -Verbose pwsh: true -- task: powershell@2 - displayName: 'Create Module Help Files EntraBeta' - inputs: - targetType: inline - script: | - Import-Module PlatyPS - . ./build/common-functions.ps1 - Create-ModuleHelp -Module EntraBeta - pwsh: true # - task: powershell@2 -# displayName: 'Build EntraBeta' +# displayName: 'Create Module Help Files EntraBeta' # inputs: # targetType: inline # script: | -# $MaximumFunctionCount=32768 -# ./build/Create-CompatModule.ps1 -Module EntraBeta -Verbose +# Import-Module PlatyPS +# . ./build/common-functions.ps1 +# Create-ModuleHelp -Module EntraBeta # pwsh: true - task: powershell@2 - displayName: '[Modularization ] Build EntraBeta' + displayName: 'Build EntraBeta' inputs: targetType: inline script: | @@ -201,39 +185,13 @@ steps: targetType: inline script: Install-Module Pester -scope currentuser -SkipPublisherCheck -Force pwsh: true -# - task: powershell@2 -# displayName: 'Run tests Entra' -# inputs: -# targetType: inline -# pwsh: true -# script: | -# cd test/module/entra -# Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml -# - task: PublishTestResults@2 -# inputs: -# testResultsFormat: NUnit -# testResultsFiles: "./test/results/pester-test-results-ad.xml" -# failTaskOnFailedTests: true -# - task: powershell@2 -# displayName: 'Run tests EntraBeta' -# inputs: -# targetType: inline -# pwsh: true -# script: | -# cd test/module/entrabeta -# Invoke-Pester -OutputFile "./test/results/pester-test-results-preview.xml" -OutputFormat NUnitXml -# - task: PublishTestResults@2 -# inputs: -# testResultsFormat: NUnit -# testResultsFiles: "./test/results/pester-test-results-preview.xml" -# failTaskOnFailedTests: true - task: powershell@2 - displayName: '[Modularization] Run tests Entra' + displayName: 'Run tests Entra' inputs: targetType: inline pwsh: true script: | - cd testVNext/Entra + cd test/Entra Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml - task: PublishTestResults@2 inputs: @@ -241,12 +199,12 @@ steps: testResultsFiles: "./test/results/pester-test-results-ad.xml" failTaskOnFailedTests: true - task: powershell@2 - displayName: '[Modularization] Run tests Entra Beta' + displayName: 'Run tests Entra Beta' inputs: targetType: inline pwsh: true script: | - cd testVNext/EntraBeta + cd test/EntraBeta Invoke-Pester -OutputFile "./test/results/pester-test-results-ad.xml" -OutputFormat NUnitXml - task: PublishTestResults@2 inputs: diff --git a/.config/CredScanSuppressions.json b/.config/CredScanSuppressions.json index 9ce47d809b..112d3a3d82 100644 --- a/.config/CredScanSuppressions.json +++ b/.config/CredScanSuppressions.json @@ -2,43 +2,43 @@ "tool": "Credential Scanner", "suppressions": [ { - "file": "test\\module\\Entra\\Update-EntraSignedInUserPassword.Tests.ps1", + "file": "test_legacy\\module\\Entra\\Update-EntraSignedInUserPassword.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "test\\module\\Entra\\Update-EntraUserFromFederated.Tests.ps1", + "file": "test_legacy\\module\\Entra\\Update-EntraUserFromFederated.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "test\\module\\EntraBeta\\Update-EntraBetaSignedInUserPassword.Tests.ps1", + "file": "test_legacy\\module\\EntraBeta\\Update-EntraBetaSignedInUserPassword.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "test\\module\\EntraBeta\\Update-EntraBetaUserFromFederated.Tests.ps1", + "file": "test_legacy\\module\\EntraBeta\\Update-EntraBetaUserFromFederated.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "testVNext\\Entra\\Users\\Update-EntraSignedInUserPassword.Tests.ps1", + "file": "test\\Entra\\Users\\Update-EntraSignedInUserPassword.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "testVNext\\Entra\\Users\\Update-EntraUserFromFederated.Tests.ps1", + "file": "test\\Entra\\Users\\Update-EntraUserFromFederated.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "testVNext\\EntraBeta\\Users\\Update-EntraBetaSignedInUserPassword.Tests.ps1", + "file": "test\\EntraBeta\\Users\\Update-EntraBetaSignedInUserPassword.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "testVNext\\EntraBeta\\Users\\Update-EntraBetaUserFromFederated.Tests.ps1", + "file": "test\\EntraBeta\\Users\\Update-EntraBetaUserFromFederated.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "test\\module\\Entra\\New-EntraUser.Tests.ps1", + "file": "test_legacy\\module\\Entra\\New-EntraUser.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." }, { - "file": "testVNext\\Entra\\Users\\New-EntraUser.Tests.ps1", + "file": "test\\Entra\\Users\\New-EntraUser.Tests.ps1", "_justification": "Unit test file has a sample Password used in mocking." } ] diff --git a/.configCredScanSuppressions.json b/.configCredScanSuppressions.json deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/build/Create-ModuleMapping.ps1 b/build/Create-ModuleMapping.ps1 index 4abfe06b92..b0c849f613 100644 --- a/build/Create-ModuleMapping.ps1 +++ b/build/Create-ModuleMapping.ps1 @@ -14,12 +14,12 @@ function Get-DirectoryFileMap { # Determine the root directory and the output based on the Source parameter switch ($Source) { 'Entra' { - $RootDirectory = "../module/Entra/Microsoft.Graph.Entra/" - $OutputDirectory = '../module/Entra/config/' + $RootDirectory = "../module_legacy/Entra/Microsoft.Graph.Entra/" + $OutputDirectory = '../module_legacy/Entra/config/' } 'EntraBeta' { - $RootDirectory = "../module/EntraBeta/Microsoft.Graph.Entra.Beta/" - $OutputDirectory = "../module/EntraBeta/config/" + $RootDirectory = "../module_legacy/EntraBeta/Microsoft.Graph.Entra.Beta/" + $OutputDirectory = "../module_legacy/EntraBeta/config/" } default { Log-Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." 'Error' diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index cfbdc5802a..0e48944e37 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -5,7 +5,7 @@ #This function copies the docs using the moduleMapping.json into their submodule directories # i.e. For each entry, it will use the Key(cmdlet name) and map it to the Value(A subdirectory created in the respective docs directory) -. ./common-functions.ps1 +. (Join-Path $psscriptroot "/common-functions.ps1") function Split-Docs { @@ -17,14 +17,14 @@ function Split-Docs { # Determine source directories and mapping file paths based on the Source parameter switch ($Module) { 'Entra' { - $DocsSourceDirectory = "../module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" - $MappingFilePath = '../moduleVNext/Entra/config/moduleMapping.json' - $OutputDirectory='../moduleVNext/docs/entra-powershell-v1.0' + $DocsSourceDirectory = "../module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" + $MappingFilePath = '../module/Entra/config/moduleMapping.json' + $OutputDirectory='../module/docs/entra-powershell-v1.0' } 'EntraBeta' { - $DocsSourceDirectory = "../module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" - $MappingFilePath = "../moduleVNext/EntraBeta/config/moduleMapping.json" - $OutputDirectory="../moduleVNext/docs/entra-powershell-beta" + $DocsSourceDirectory = "../module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" + $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" + $OutputDirectory="../module/docs/entra-powershell-beta" } default { Log-Message -Message "[Split-Docs]: Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' diff --git a/build/Split-EntraModule.ps1 b/build/Split-EntraModule.ps1 index 2f010ba248..e1c21b47d4 100644 --- a/build/Split-EntraModule.ps1 +++ b/build/Split-EntraModule.ps1 @@ -7,8 +7,10 @@ param ( ) # Import the necessary scripts -. ..\src\EntraModuleSplitter.ps1 -. .\Split-Docs +. (Join-Path $psscriptroot "/common-functions.ps1") +. (Join-Path $psscriptroot "../src/EntraModuleSplitter.ps1") + + @@ -16,6 +18,3 @@ param ( $entraModuleSplitter = [EntraModuleSplitter]::new() $entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument $entraModuleSplitter.ProcessEntraAzureADAliases($Module) - -./Split-Docs.ps1 -Module $Module -./Split-Tests.ps1 -Module $Module \ No newline at end of file diff --git a/build/Split-Tests.ps1 b/build/Split-Tests.ps1 index 65a47774bc..914a065e89 100644 --- a/build/Split-Tests.ps1 +++ b/build/Split-Tests.ps1 @@ -18,15 +18,15 @@ function Split-Tests { switch ($Module) { 'Entra' { - $TestSourceDirectory = "../test/module/Entra" - $MappingFilePath = '../moduleVNext/Entra/config/moduleMapping.json' - $OutputDirectory = '../testVNext/Entra' + $TestSourceDirectory = "../test_legacy/module/Entra" + $MappingFilePath = '../module/Entra/config/moduleMapping.json' + $OutputDirectory = '../test/Entra' $modulePrefix = 'Microsoft.Graph.Entra' } 'EntraBeta' { - $TestSourceDirectory = "../test/module/EntraBeta" - $MappingFilePath = "../moduleVNext/EntraBeta/config/moduleMapping.json" - $OutputDirectory = "../testVNext/EntraBeta" + $TestSourceDirectory = "../test_legacy/module/EntraBeta" + $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" + $OutputDirectory = "../test/EntraBeta" $modulePrefix = 'Microsoft.Graph.Entra.Beta' } default { diff --git a/build/Update-CommonFunctionsImport.ps1 b/build/Update-CommonFunctionsImport.ps1 index d9f028b2d9..42ba66133e 100644 --- a/build/Update-CommonFunctionsImport.ps1 +++ b/build/Update-CommonFunctionsImport.ps1 @@ -10,9 +10,9 @@ function Update-CommonFunctionsImport { ) $rootPath = if ($Module -eq 'Entra') { - "../testVNext/Entra" + "../test/Entra" } else { - "../testVNext/EntraBeta" + "../test/EntraBeta" } # Get all .Tests.ps1 files in the specified directory and its subdirectories diff --git a/build/build.config.psd1 b/build/build.config.psd1 index 779d82f18d..bf2b1eca2d 100644 --- a/build/build.config.psd1 +++ b/build/build.config.psd1 @@ -1,6 +1,6 @@ @{ ModuleOutputSubdirectoryName = 'modules' - ModuleSubdirectoryName = 'module' + ModuleSubdirectoryName = 'module_legacy' OutputPath = 'bin' CustomizationPath = 'customizations' docsPath = 'docs' diff --git a/build/common-functions.ps1 b/build/common-functions.ps1 index 11f691650d..c0628404f7 100644 --- a/build/common-functions.ps1 +++ b/build/common-functions.ps1 @@ -217,12 +217,12 @@ function Get-CustomizationFiles { $path = Split-Path -Parent $psscriptroot if ( -not $Directory ) { - $path = Join-Path $path 'module' + $path = Join-Path $path 'module_legacy' $path = Join-Path $path $Module $path = Join-Path $path (Get-ConfigValue -Name CustomizationPath) } else { - $path = Join-Path $path 'module' + $path = Join-Path $path 'module_legacy' $path = Join-Path $path $Module $path = Join-Path $path $Directory } diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 rename to module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 rename to module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 rename to module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 b/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 rename to module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 rename to module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 rename to module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 rename to module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 rename to module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 b/module/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 rename to module/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 diff --git a/moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 b/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 similarity index 100% rename from moduleVNext/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 rename to module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 diff --git a/moduleVNext/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 b/module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 similarity index 100% rename from moduleVNext/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 rename to module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 diff --git a/moduleVNext/Entra/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 b/module/Entra/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/Entra/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/Entra/UnMappedFiles/New-EntraInvitation.ps1 b/module/Entra/UnMappedFiles/New-EntraInvitation.ps1 similarity index 100% rename from moduleVNext/Entra/UnMappedFiles/New-EntraInvitation.ps1 rename to module/Entra/UnMappedFiles/New-EntraInvitation.ps1 diff --git a/moduleVNext/Entra/UnMappedFiles/Test-EntraScript.ps1 b/module/Entra/UnMappedFiles/Test-EntraScript.ps1 similarity index 100% rename from moduleVNext/Entra/UnMappedFiles/Test-EntraScript.ps1 rename to module/Entra/UnMappedFiles/Test-EntraScript.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 diff --git a/moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 similarity index 100% rename from moduleVNext/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 rename to module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 diff --git a/moduleVNext/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 b/module/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 similarity index 100% rename from moduleVNext/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 rename to module/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 diff --git a/moduleVNext/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 b/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 similarity index 100% rename from moduleVNext/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 rename to module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 diff --git a/module/EntraBeta/config/dependencyMapping.json b/module/EntraBeta/config/dependencyMapping.json index ada536d812..495961f1c6 100644 --- a/module/EntraBeta/config/dependencyMapping.json +++ b/module/EntraBeta/config/dependencyMapping.json @@ -6,6 +6,5 @@ "Microsoft.Graph.Entra.Beta.Governance":["Microsoft.Graph.Beta.Identity.Governance"], "Microsoft.Graph.Entra.Beta.SignIns":["Microsoft.Graph.Beta.Identity.SignIns"], "Microsoft.Graph.Entra.Beta.Applications":["Microsoft.Graph.Beta.Applications"], - "Microsoft.Graph.Entra.Beta.Reports":["Microsoft.Graph.Beta.Reports"], - "Microsoft.Graph.Entra.Beta.Invitations":["Microsoft.Graph.Beta.Identity.SignIns"] + "Microsoft.Graph.Entra.Beta.Reports":["Microsoft.Graph.Beta.Reports"] } \ No newline at end of file diff --git a/module/EntraBeta/config/moduleMapping.json b/module/EntraBeta/config/moduleMapping.json index 9ba9b07aac..08c26090d7 100644 --- a/module/EntraBeta/config/moduleMapping.json +++ b/module/EntraBeta/config/moduleMapping.json @@ -1,16 +1,291 @@ { - "Authentication":"", - "Directory":"", - "Application":"", - "ApplicationProxy":"", - "User":"", - "Group":"", - "ServicePrincipal":"", - "AdministrativeUnit":"", - "Contact":"", - "Domain":"", - "Permission":"", - "Device":"", - "Policy":"", - "CertificateAuthority":"" + "Get-EntraBetaUser": "Users", + "Set-EntraBetaUser": "Users", + "New-EntraBetaUser": "Users", + "Remove-EntraBetaUser": "Users", + "Get-EntraBetaUserAppRoleAssignment": "Users", + "Get-EntraBetaUserCreatedObject": "Users", + "Get-EntraBetaUserDirectReport": "Users", + "Get-EntraBetaUserExtension": "Users", + "Get-EntraBetaUserLicenseDetail": "Users", + "Get-EntraBetaUserManager": "Users", + "Get-EntraBetaUserMembership": "Users", + "Get-EntraBetaUserOAuth2PermissionGrant": "Users", + "Get-EntraBetaUserOwnedDevice": "Users", + "Get-EntraBetaUserOwnedObject": "Users", + "Get-EntraBetaUserRegisteredDevice": "Users", + "Get-EntraBetaUserThumbnailPhoto": "Users", + "New-EntraBetaUserAppRoleAssignment": "Users", + "Remove-EntraBetaUserAppRoleAssignment": "Users", + "Remove-EntraBetaUserExtension": "Users", + "Remove-EntraBetaUserManager": "Users", + "Reset-EntraBetaStrongAuthenticationMethodByUpn": "Authentication", + "Set-EntraBetaUserExtension": "Users", + "Set-EntraBetaUserLicense": "Users", + "Set-EntraBetaUserManager": "Users", + "Set-EntraBetaUserPassword": "Users", + "Set-EntraBetaUserThumbnailPhoto": "Users", + "Update-EntraBetaSignedInUserPassword": "Users", + "Get-EntraBetaGroup": "Groups", + "New-EntraBetaGroup": "Groups", + "Set-EntraBetaGroup": "Groups", + "Remove-EntraBetaGroup": "Groups", + "Get-EntraBetaGroupMember": "Groups", + "Get-EntraBetaGroupOwner": "Groups", + "Add-EntraBetaGroupMember": "Groups", + "Add-EntraBetaGroupOwner": "Groups", + "Add-EntraBetaLifecyclePolicyGroup": "Groups", + "Get-EntraBetaDeletedGroup": "Groups", + "Get-EntraBetaGroupAppRoleAssignment": "Groups", + "Get-EntraBetaGroupLifecyclePolicy": "Groups", + "Get-EntraBetaGroupPermissionGrant": "Groups", + "Get-EntraBetaLifecyclePolicyGroup": "Groups", + "New-EntraBetaGroupAppRoleAssignment": "Groups", + "New-EntraBetaGroupLifecyclePolicy": "Groups", + "Remove-EntraBetaGroupAppRoleAssignment": "Groups", + "Remove-EntraBetaGroupLifecyclePolicy": "Groups", + "Remove-EntraBetaGroupMember": "Groups", + "Remove-EntraBetaGroupOwner": "Groups", + "Remove-EntraBetaLifecyclePolicyGroup": "Groups", + "Reset-EntraBetaLifeCycleGroup": "Groups", + "Select-EntraBetaGroupIdsContactIsMemberOf": "Groups", + "Select-EntraBetaGroupIdsGroupIsMemberOf": "Groups", + "Select-EntraBetaGroupIdsUserIsMemberOf": "Groups", + "Set-EntraBetaGroupLifecyclePolicy": "Groups", + "Get-EntraBetaDevice": "DirectoryManagement", + "Remove-EntraBetaDevice": "DirectoryManagement", + "Add-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", + "Add-EntraBetaDeviceRegisteredUser": "DirectoryManagement", + "Get-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", + "Get-EntraBetaDeviceRegisteredUser": "DirectoryManagement", + "Set-EntraBetaDevice": "DirectoryManagement", + "New-EntraBetaDevice": "DirectoryManagement", + "Remove-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", + "Remove-EntraBetaDeviceRegisteredUser": "DirectoryManagement", + "Get-EntraBetaApplication": "Applications", + "Set-EntraBetaApplication": "Applications", + "New-EntraBetaApplication": "Applications", + "Remove-EntraBetaApplication": "Applications", + "Get-EntraBetaServicePrincipal": "Applications", + "Add-EntraBetaApplicationOwner": "Applications", + "Add-EntraBetaApplicationPolicy": "Applications", + "Add-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", + "Add-EntraBetaServicePrincipalOwner": "Applications", + "Add-EntraBetaServicePrincipalPolicy": "SignIns", + "Get-EntraBetaApplicationExtensionProperty": "Applications", + "Get-EntraBetaApplicationKeyCredential": "Applications", + "Get-EntraBetaApplicationLogo": "Applications", + "Get-EntraBetaApplicationOwner": "Applications", + "Get-EntraBetaApplicationPolicy": "Applications", + "Get-EntraBetaApplicationPasswordCredential": "Applications", + "Get-EntraBetaApplicationServiceEndpoint": "Applications", + "Get-EntraBetaDeletedApplication": "Applications", + "Get-EntraBetaApplicationTemplate": "Applications", + "Get-EntraBetaServicePrincipalCreatedObject": "Applications", + "Get-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", + "Get-EntraBetaServicePrincipalKeyCredential": "Applications", + "Get-EntraBetaServicePrincipalMembership": "Applications", + "Get-EntraBetaServicePrincipalOAuth2PermissionGrant": "Applications", + "Get-EntraBetaServicePrincipalOwnedObject": "Applications", + "Get-EntraBetaServicePrincipalOwner": "Applications", + "Get-EntraBetaServicePrincipalPasswordCredential": "Applications", + "New-EntraBetaApplicationFromApplicationTemplate": "Applications", + "New-EntraBetaApplicationExtensionProperty": "Applications", + "New-EntraBetaApplicationKey": "Applications", + "New-EntraBetaApplicationKeyCredential": "Applications", + "New-EntraBetaApplicationPassword": "Applications", + "New-EntraBetaApplicationPasswordCredential": "Applications", + "New-EntraBetaServicePrincipal": "Applications", + "New-EntraBetaServicePrincipalPasswordCredential": "Applications", + "Remove-EntraBetaApplicationExtensionProperty": "Applications", + "Remove-EntraBetaApplicationKey": "Applications", + "Remove-EntraBetaApplicationKeyCredential": "Applications", + "Remove-EntraBetaApplicationOwner": "Applications", + "Remove-EntraBetaApplicationPassword": "Applications", + "Remove-EntraBetaApplicationPasswordCredential": "Applications", + "Remove-EntraBetaApplicationPolicy": "Applications", + "Remove-EntraBetaApplicationVerifiedPublisher": "Applications", + "Remove-EntraBetaDeletedApplication": "Applications", + "Remove-EntraBetaDeletedDirectoryObject": "Applications", + "Remove-EntraBetaServicePrincipal": "Applications", + "Remove-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", + "Remove-EntraBetaServicePrincipalOwner": "Applications", + "Remove-EntraBetaServicePrincipalPolicy": "SignIns", + "Remove-EntraBetaServicePrincipalPasswordCredential": "Applications", + "Restore-EntraBetaDeletedApplication": "Applications", + "Select-EntraBetaGroupIdsServicePrincipalIsMemberOf": "Applications", + "Set-EntraBetaApplicationLogo": "Applications", + "Set-EntraBetaApplicationVerifiedPublisher": "Applications", + "Set-EntraBetaServicePrincipal": "Applications", + "Revoke-EntraBetaSignedInUserAllRefreshToken": "Authentication", + "Revoke-EntraBetaUserAllRefreshToken": "Authentication", + "Disconnect-Entra": "Authentication", + "Get-EntraContext": "Authentication", + "Connect-Entra": "Authentication", + "Get-EntraBetaTenantDetail": "DirectoryManagement", + "Set-EntraBetaTenantDetail": "DirectoryManagement", + "Add-EntraBetaDirectoryRoleMember": "DirectoryManagement", + "Enable-EntraBetaDirectoryRole": "DirectoryManagement", + "Get-EntraBetaDeletedDirectoryObject": "DirectoryManagement", + "Get-EntraBetaDirectoryRole": "DirectoryManagement", + "Get-EntraBetaDirectoryRoleMember": "DirectoryManagement", + "Get-EntraBetaDirectoryRoleTemplate": "DirectoryManagement", + "Get-EntraBetaDirSyncConfiguration": "DirectoryManagement", + "Get-EntraBetaDirSyncFeature": "DirectoryManagement", + "Set-EntraBetaDirSyncEnabled": "DirectoryManagement", + "Get-EntraBetaHasObjectsWithDirSyncProvisioningError": "DirectoryManagement", + "Get-EntraBetaDirectorySettingTemplate": "DirectoryManagement", + "Get-EntraBetaDirectorySetting": "DirectoryManagement", + "New-EntraBetaDirectorySetting": "DirectoryManagement", + "Remove-EntraBetaDirectoryRoleMember": "DirectoryManagement", + "Remove-EntraBetaDirectorySetting": "DirectoryManagement", + "Restore-EntraBetaDeletedDirectoryObject": "DirectoryManagement", + "Set-EntraBetaDirectorySetting": "DirectoryManagement", + "Set-EntraBetaDirSyncConfiguration": "DirectoryManagement", + "Set-EntraBetaDirSyncFeature": "DirectoryManagement", + "Get-EntraBetaDomain": "DirectoryManagement", + "Get-EntraBetaDomainFederationSettings": "DirectoryManagement", + "Get-EntraBetaDomainNameReference": "DirectoryManagement", + "Get-EntraBetaDomainServiceConfigurationRecord": "DirectoryManagement", + "Get-EntraBetaDomainVerificationDnsRecord": "DirectoryManagement", + "New-EntraBetaDomain": "DirectoryManagement", + "Remove-EntraBetaDomain": "DirectoryManagement", + "Set-EntraBetaDomain": "DirectoryManagement", + "Set-EntraBetaDomainFederationSettings": "DirectoryManagement", + "Get-EntraBetaNamedLocationPolicy": "SignIns", + "Get-EntraBetaFeatureRolloutPolicy": "SignIns", + "Get-EntraBetaPolicy": "SignIns", + "Get-EntraBetaPermissionGrantConditionSet": "SignIns", + "Get-EntraBetaPermissionGrantPolicy": "SignIns", + "Get-EntraBetaPolicyAppliedObject": "SignIns", + "Get-EntraBetaPasswordPolicy": "DirectoryManagement", + "New-EntraBetaNamedLocationPolicy": "SignIns", + "New-EntraBetaFeatureRolloutPolicy": "SignIns", + "New-EntraBetaPermissionGrantConditionSet": "SignIns", + "New-EntraBetaPermissionGrantPolicy": "SignIns", + "New-EntraBetaPolicy": "SignIns", + "Remove-EntraBetaNamedLocationPolicy": "SignIns", + "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject": "SignIns", + "Remove-EntraBetaPermissionGrantConditionSet": "SignIns", + "Remove-EntraBetaPermissionGrantPolicy": "SignIns", + "Remove-EntraBetaPolicy": "SignIns", + "Set-EntraBetaNamedLocationPolicy": "SignIns", + "Set-EntraBetaPermissionGrantConditionSet": "SignIns", + "Set-EntraBetaPermissionGrantPolicy": "SignIns", + "Set-EntraBetaFeatureRolloutPolicy": "SignIns", + "Set-EntraBetaPolicy": "SignIns", + "Set-EntraBetaAuthorizationPolicy": "SignIns", + "Get-EntraBetaAuthorizationPolicy": "SignIns", + "Get-EntraBetaOAuth2PermissionGrant": "SignIns", + "New-EntraBetaOauth2PermissionGrant": "SignIns", + "Remove-EntraBetaOAuth2PermissionGrant": "SignIns", + "Get-EntraBetaApplicationSignInSummary": "Reports", + "Get-EntraBetaApplicationSignInDetailedSummary": "Reports", + "Get-EntraBetaPrivilegedRoleSetting": "Governance", + "Get-EntraBetaPrivilegedRoleDefinition": "Governance", + "Get-EntraBetaPrivilegedRoleAssignmentRequest": "Governance", + "Get-EntraBetaPrivilegedRole": "Governance", + "Get-EntraBetaPrivilegedResource": "Governance", + "New-EntraBetaPrivilegedRoleAssignment": "Governance", + "Set-EntraBetaPrivilegedRoleAssignmentRequest": "Governance", + "Set-EntraBetaPrivilegedRoleSetting": "Governance", + "Get-EntraBetaAccountSku": "DirectoryManagement", + "Get-EntraBetaFederationProperty": "DirectoryManagement", + "Enable-EntraAzureADAlias": "Migration", + "Test-EntraScript": "Migration", + "Get-EntraBetaAttributeSet": "DirectoryManagement", + "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Get-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", + "New-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", + "Set-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", + "Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Get-EntraBetaContact": "DirectoryManagement", + "Get-EntraBetaContactDirectReport": "DirectoryManagement", + "Get-EntraBetaContactManager": "DirectoryManagement", + "Get-EntraBetaContactMembership": "DirectoryManagement", + "Get-EntraBetaContactThumbnailPhoto": "xxxxxxxxxxxxxxxx", + "Remove-EntraBetaContact": "DirectoryManagement", + "Get-EntraBetaContract": "DirectoryManagement", + "Get-EntraBetaTrustedCertificateAuthority": "SignIns", + "New-EntraBetaTrustedCertificateAuthority": "SignIns", + "Remove-EntraBetaTrustedCertificateAuthority": "SignIns", + "Set-EntraBetaTrustedCertificateAuthority": "SignIns", + "Get-EntraBetaTrustFrameworkPolicy": "SignIns", + "New-EntraBetaTrustFrameworkPolicy": "SignIns", + "Remove-EntraBetaTrustFrameworkPolicy": "SignIns", + "Set-EntraBetaTrustFrameworkPolicy": "SignIns", + "Get-EntraBetaIdentityProvider": "SignIns", + "New-EntraBetaIdentityProvider": "SignIns", + "Remove-EntraBetaIdentityProvider": "SignIns", + "Set-EntraBetaIdentityProvider": "SignIns", + "Get-EntraBetaPartnerInformation": "DirectoryManagement", + "Set-EntraBetaPartnerInformation": "DirectoryManagement", + "Add-EntraBetaAdministrativeUnitMember": "DirectoryManagement", + "Get-EntraBetaAdministrativeUnit": "DirectoryManagement", + "Get-EntraBetaAdministrativeUnitMember": "DirectoryManagement", + "New-EntraBetaAdministrativeUnitMember": "DirectoryManagement", + "New-EntraBetaAdministrativeUnit": "DirectoryManagement", + "Remove-EntraBetaAdministrativeUnit": "DirectoryManagement", + "Remove-EntraBetaAdministrativeUnitMember": "DirectoryManagement", + "Set-EntraBetaAdministrativeUnit": "DirectoryManagement", + "Get-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", + "New-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", + "Remove-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", + "Set-EntraBetaPasswordSingleSignOnCredential": "Applications", + "Get-EntraBetaPasswordSingleSignOnCredential": "Applications", + "New-EntraBetaPasswordSingleSignOnCredential": "Applications", + "Remove-EntraBetaPasswordSingleSignOnCredential": "Applications", + "Get-EntraBetaApplicationProxyApplication": "Applications", + "New-EntraBetaApplicationProxyApplication": "Applications", + "Remove-EntraBetaApplicationProxyApplication": "Applications", + "Set-EntraBetaApplicationProxyApplication": "Applications", + "Set-EntraBetaApplicationProxyApplicationSingleSignOn": "Applications", + "Set-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", + "Get-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", + "Get-EntraBetaApplicationProxyConnector": "Applications", + "Get-EntraBetaApplicationProxyConnectorGroup": "Applications", + "Get-EntraBetaApplicationProxyConnectorGroupMembers": "Applications", + "Get-EntraBetaApplicationProxyConnectorMemberOf": "Applications", + "New-EntraBetaApplicationProxyConnectorGroup": "Applications", + "Remove-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", + "Remove-EntraBetaApplicationProxyConnectorGroup": "Applications", + "Set-EntraBetaApplicationProxyConnector": "Applications", + "Set-EntraBetaApplicationProxyConnectorGroup": "Applications", + "Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", + "Add-EntraBetaFeatureRolloutPolicyDirectoryObject": "SignIns", + "Add-EntraBetaScopedRoleMembership": "DirectoryManagement", + "Confirm-EntraBetaDomain": "DirectoryManagement", + "Get-EntraBetaConditionalAccessPolicy": "SignIns", + "Get-EntraBetaObjectByObjectId": "Groups", + "Get-EntraBetaObjectSetting": "Groups", + "Get-EntraBetaScopedRoleMembership": "DirectoryManagement", + "Get-EntraBetaServicePrincipalPolicy": "SignIns", + "Get-EntraBetaSubscribedSku": "DirectoryManagement", + "Get-EntraUnsupportedCommand": "Migration", + "New-EntraBetaAttributeSet": "DirectoryManagement", + "New-EntraBetaConditionalAccessPolicy": "SignIns", + "New-EntraBetaInvitation": "SignIns", + "New-EntraBetaObjectSetting": "Groups", + "Remove-EntraBetaConditionalAccessPolicy": "SignIns", + "Remove-EntraBetaFeatureRolloutPolicy": "SignIns", + "Remove-EntraBetaObjectSetting": "Groups", + "Remove-EntraBetaScopedRoleMembership": "DirectoryManagement", + "Set-EntraBetaAttributeSet": "DirectoryManagement", + "Set-EntraBetaConditionalAccessPolicy": "SignIns", + "Set-EntraBetaObjectSetting": "Groups", + "Get-EntraBetaAuditDirectoryLog": "Reports", + "Get-EntraBetaAuditSignInLog": "Reports", + "Get-EntraBetaDirectoryObjectOnPremisesProvisioningError": "DirectoryManagement", + "Get-EntraBetaDirectoryRoleAssignment": "Governance", + "Get-EntraBetaDirectoryRoleDefinition": "Governance", + "Get-EntraBetaServicePrincipalAppRoleAssignedTo": "Applications", + "Get-EntraBetaServicePrincipalAppRoleAssignment": "Applications", + "New-EntraBetaDirectoryRoleAssignment": "Governance", + "New-EntraBetaDirectoryRoleDefinition": "Governance", + "New-EntraBetaServicePrincipalAppRoleAssignment": "Applications", + "Remove-EntraBetaDirectoryRoleAssignment": "Governance", + "Remove-EntraBetaDirectoryRoleDefinition": "Governance", + "Remove-EntraBetaServicePrincipalAppRoleAssignment": "Applications", + "Set-EntraBetaDirectoryRoleDefinition": "Governance", + "Update-EntraBetaUserFromFederated": "Users" } \ No newline at end of file diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationOwner.md rename to module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationPolicy.md rename to module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md rename to module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalOwner.md rename to module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md b/module/docs/entra-powershell-beta/Applications/Enable-EntraBetaGlobalSecureAccessTenant.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md rename to module/docs/entra-powershell-beta/Applications/Enable-EntraBetaGlobalSecureAccessTenant.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplication.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationExtensionProperty.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationKeyCredential.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationLogo.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationLogo.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationOwner.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPasswordCredential.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPolicy.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplication.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnector.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnector.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroup.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroupMembers.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroupMembers.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorMemberOf.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorMemberOf.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationTemplate.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationTemplate.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedApplication.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaGlobalSecureAccessTenantStatus.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaGlobalSecureAccessTenantStatus.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordSingleSignOnCredential.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPrivateAccessApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaPrivateAccessApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipal.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalCreatedObject.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalCreatedObject.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalKeyCredential.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalMembership.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalMembership.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwnedObject.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwnedObject.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwner.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPasswordCredential.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationMethod.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationMethod.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationMethod.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationMethod.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationRequirement.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement.md rename to module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationRequirement.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplication.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationExtensionProperty.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationFromApplicationTemplate.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKey.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKey.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKeyCredential.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPassword.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPassword.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPasswordCredential.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyApplication.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyConnectorGroup.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPasswordSingleSignOnCredential.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaPrivateAccessApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaPrivateAccessApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipal.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalPasswordCredential.md rename to module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplication.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationExtensionProperty.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKey.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKey.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKeyCredential.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationOwner.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPassword.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPassword.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPasswordCredential.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPolicy.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplication.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyConnectorGroup.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationVerifiedPublisher.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationVerifiedPublisher.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedApplication.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedDirectoryObject.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPasswordSingleSignOnCredential.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipal.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalOwner.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPasswordCredential.md rename to module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedApplication.md rename to module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md rename to module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplication.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationLogo.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationLogo.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplication.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnector.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnector.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnectorGroup.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationVerifiedPublisher.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationVerifiedPublisher.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPasswordSingleSignOnCredential.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaServicePrincipal.md rename to module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaOauth2PermissionGrant.md b/module/docs/entra-powershell-beta/Applications/Update-EntraBetaOauth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaOauth2PermissionGrant.md rename to module/docs/entra-powershell-beta/Applications/Update-EntraBetaOauth2PermissionGrant.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement.md b/module/docs/entra-powershell-beta/Applications/Update-EntraBetaUserAuthenticationRequirement.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement.md rename to module/docs/entra-powershell-beta/Applications/Update-EntraBetaUserAuthenticationRequirement.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Connect-Entra.md b/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Connect-Entra.md rename to module/docs/entra-powershell-beta/Authentication/Connect-Entra.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Disconnect-Entra.md b/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Disconnect-Entra.md rename to module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraContext.md b/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraContext.md rename to module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaStrongAuthenticationMethodByUpn.md rename to module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaSignedInUserAllRefreshToken.md rename to module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaUserAllRefreshToken.md b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaUserAllRefreshToken.md rename to module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaAdministrativeUnitMember.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredOwner.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredUser.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDirectoryRoleMember.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Confirm-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Confirm-EntraBetaDomain.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaDirectoryRole.md b/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaDirectoryRole.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAccountSku.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAccountSku.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnit.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnitMember.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAttributeSet.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContact.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContact.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactDirectReport.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactDirectReport.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactManager.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactManager.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactMembership.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContract.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContract.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinition.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedDirectoryObject.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDevice.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredOwner.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredUser.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncConfiguration.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncConfiguration.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncFeature.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncFeature.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRole.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRole.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleMember.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleTemplate.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleTemplate.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySetting.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySettingTemplate.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySettingTemplate.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomain.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainFederationSettings.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainFederationSettings.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainNameReference.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainNameReference.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainServiceConfigurationRecord.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainVerificationDnsRecord.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainVerificationDnsRecord.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaFederationProperty.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaFederationProperty.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPartnerInformation.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPartnerInformation.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordPolicy.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordPolicy.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaScopedRoleMembership.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaSubscribedSku.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaSubscribedSku.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTenantDetail.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTenantDetail.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnit.md rename to module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnitMember.md rename to module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAttributeSet.md rename to module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaCustomSecurityAttributeDefinition.md rename to module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDevice.md rename to module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectorySetting.md rename to module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDomain.md rename to module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnit.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnitMember.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaContact.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaContact.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDevice.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredOwner.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredUser.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleMember.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectorySetting.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDomain.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaScopedRoleMembership.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedDirectoryObject.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAdministrativeUnit.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAttributeSet.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinition.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDevice.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncConfiguration.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncConfiguration.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncEnabled.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncEnabled.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncFeature.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncFeature.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectorySetting.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomain.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomainFederationSettings.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomainFederationSettings.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPartnerInformation.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPartnerInformation.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTenantDetail.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTenantDetail.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleAssignment.md rename to module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleDefinition.md rename to module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedResource.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedResource.md rename to module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRole.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRole.md rename to module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleDefinition.md rename to module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleSetting.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleSetting.md rename to module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleAssignment.md rename to module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleDefinition.md rename to module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment.md rename to module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleAssignment.md rename to module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleDefinition.md rename to module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectoryRoleDefinition.md rename to module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest.md rename to module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleSetting.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleSetting.md rename to module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md rename to module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md rename to module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md rename to module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupPermissionGrant.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupPermissionGrant.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectByObjectId.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectByObjectId.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md rename to module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroup.md rename to module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md rename to module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md rename to module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md rename to module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md rename to module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md rename to module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md rename to module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md rename to module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaObjectSetting.md rename to module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md b/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md rename to module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md rename to module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md rename to module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md rename to module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md rename to module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md rename to module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaObjectSetting.md rename to module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md rename to module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md rename to module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md rename to module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInDetailedSummary.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInDetailedSummary.md rename to module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInSummary.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInSummary.md rename to module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditDirectoryLog.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditDirectoryLog.md rename to module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditSignInLog.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditSignInLog.md rename to module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md rename to module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuthorizationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuthorizationPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaConditionalAccessPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaFeatureRolloutPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaIdentityProvider.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaNamedLocationPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaOAuth2PermissionGrant.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantConditionSet.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicyAppliedObject.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicyAppliedObject.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustedCertificateAuthority.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaConditionalAccessPolicy.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaFeatureRolloutPolicy.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaIdentityProvider.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaInvitation.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaInvitation.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaNamedLocationPolicy.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaOauth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaOauth2PermissionGrant.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantConditionSet.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantPolicy.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPolicy.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustFrameworkPolicy.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustedCertificateAuthority.md rename to module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaConditionalAccessPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaIdentityProvider.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaNamedLocationPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaOAuth2PermissionGrant.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantConditionSet.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustFrameworkPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustedCertificateAuthority.md rename to module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAuthorizationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAuthorizationPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaConditionalAccessPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaFeatureRolloutPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaIdentityProvider.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaNamedLocationPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantConditionSet.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustFrameworkPolicy.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustedCertificateAuthority.md rename to module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserCreatedObject.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserCreatedObject.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserDirectReport.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserDirectReport.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserExtension.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserLicenseDetail.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserLicenseDetail.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserManager.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserMembership.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserMembership.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedDevice.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedDevice.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedObject.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedObject.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserRegisteredDevice.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserRegisteredDevice.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserThumbnailPhoto.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserThumbnailPhoto.md rename to module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaUser.md rename to module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaUserAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUser.md rename to module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserAppRoleAssignment.md rename to module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserExtension.md rename to module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserManager.md rename to module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUser.md rename to module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserExtension.md rename to module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserLicense.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserLicense.md rename to module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserManager.md rename to module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserPassword.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserPassword.md rename to module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserThumbnailPhoto.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserThumbnailPhoto.md rename to module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaSignedInUserPassword.md b/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaSignedInUserPassword.md rename to module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserFromFederated.md b/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserFromFederated.md rename to module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraApplicationOwner.md rename to module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.md rename to module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner.md rename to module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplication.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationLogo.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationOwner.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationTemplate.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedApplication.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipal.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential.md rename to module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplication.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationKey.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationPassword.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipal.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential.md rename to module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplication.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationKey.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationOwner.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationPassword.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeletedApplication.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipal.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential.md rename to module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Restore-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Restore-EntraDeletedApplication.md rename to module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.md rename to module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplication.md rename to module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplicationLogo.md rename to module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher.md rename to module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraServicePrincipal.md rename to module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraEnvironment.md rename to module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Connect-Entra.md b/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Connect-Entra.md rename to module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Disconnect-Entra.md b/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Disconnect-Entra.md rename to module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Find-EntraPermission.md b/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Find-EntraPermission.md rename to module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContext.md b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContext.md rename to module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraEnvironment.md rename to module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn.md rename to module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken.md rename to module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken.md rename to module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Confirm-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Confirm-EntraDomain.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraDirectoryRole.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAccountSku.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAccountSku.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAttributeSet.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContact.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContact.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactDirectReport.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactDirectReport.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactManager.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactManager.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactMembership.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContract.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContract.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDevice.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirSyncFeature.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRole.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomain.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainNameReference.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainNameReference.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraExtensionProperty.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraExtensionProperty.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraFederationProperty.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraFederationProperty.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraObjectByObjectId.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraObjectByObjectId.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPartnerInformation.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPasswordPolicy.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPasswordPolicy.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraSubscribedSku.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraSubscribedSku.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraTenantDetail.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAuthenticationMethod.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraUserAuthenticationMethod.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAuthenticationMethod.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraUserAuthenticationMethod.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraAdministrativeUnit.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraAttributeSet.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDevice.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDomain.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraContact.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraContact.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDevice.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDomain.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAttributeSet.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDevice.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncFeature.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDomain.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPartnerInformation.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraTenantDetail.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Update-EntraOauth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraOauth2PermissionGrant.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Update-EntraOauth2PermissionGrant.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition.md rename to module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition.md rename to module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition.md rename to module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition.md rename to module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraGroupMember.md rename to module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraGroupOwner.md rename to module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup.md rename to module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedGroup.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroup.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupMember.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupOwner.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraObjectSetting.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraObjectSetting.md rename to module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroup.md rename to module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy.md rename to module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroup.md rename to module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy.md rename to module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupMember.md rename to module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupOwner.md rename to module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup.md rename to module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup.md b/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup.md rename to module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf.md rename to module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf.md rename to module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf.md rename to module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraGroup.md rename to module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy.md rename to module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md rename to module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md rename to module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraIdentityProvider.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraIdentityProvider.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority.md rename to module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraIdentityProvider.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority.md rename to module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraIdentityProvider.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPolicy.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority.md rename to module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUser.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserCreatedObject.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserCreatedObject.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserDirectReport.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserDirectReport.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserExtension.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserManager.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserMembership.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserMembership.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOwnedObject.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOwnedObject.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto.md rename to module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraUser.md rename to module/docs/entra-powershell-v1.0/Users/New-EntraUser.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUser.md rename to module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment.md rename to module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserExtension.md rename to module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserManager.md rename to module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUser.md rename to module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserExtension.md rename to module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserLicense.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserLicense.md rename to module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserManager.md rename to module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserPassword.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserPassword.md rename to module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto.md rename to module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword.md b/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword.md rename to module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraUserFromFederated.md b/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraUserFromFederated.md rename to module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md diff --git a/moduleVNext/EntraBeta/config/moduleMapping.json b/moduleVNext/EntraBeta/config/moduleMapping.json deleted file mode 100644 index 08c26090d7..0000000000 --- a/moduleVNext/EntraBeta/config/moduleMapping.json +++ /dev/null @@ -1,291 +0,0 @@ -{ - "Get-EntraBetaUser": "Users", - "Set-EntraBetaUser": "Users", - "New-EntraBetaUser": "Users", - "Remove-EntraBetaUser": "Users", - "Get-EntraBetaUserAppRoleAssignment": "Users", - "Get-EntraBetaUserCreatedObject": "Users", - "Get-EntraBetaUserDirectReport": "Users", - "Get-EntraBetaUserExtension": "Users", - "Get-EntraBetaUserLicenseDetail": "Users", - "Get-EntraBetaUserManager": "Users", - "Get-EntraBetaUserMembership": "Users", - "Get-EntraBetaUserOAuth2PermissionGrant": "Users", - "Get-EntraBetaUserOwnedDevice": "Users", - "Get-EntraBetaUserOwnedObject": "Users", - "Get-EntraBetaUserRegisteredDevice": "Users", - "Get-EntraBetaUserThumbnailPhoto": "Users", - "New-EntraBetaUserAppRoleAssignment": "Users", - "Remove-EntraBetaUserAppRoleAssignment": "Users", - "Remove-EntraBetaUserExtension": "Users", - "Remove-EntraBetaUserManager": "Users", - "Reset-EntraBetaStrongAuthenticationMethodByUpn": "Authentication", - "Set-EntraBetaUserExtension": "Users", - "Set-EntraBetaUserLicense": "Users", - "Set-EntraBetaUserManager": "Users", - "Set-EntraBetaUserPassword": "Users", - "Set-EntraBetaUserThumbnailPhoto": "Users", - "Update-EntraBetaSignedInUserPassword": "Users", - "Get-EntraBetaGroup": "Groups", - "New-EntraBetaGroup": "Groups", - "Set-EntraBetaGroup": "Groups", - "Remove-EntraBetaGroup": "Groups", - "Get-EntraBetaGroupMember": "Groups", - "Get-EntraBetaGroupOwner": "Groups", - "Add-EntraBetaGroupMember": "Groups", - "Add-EntraBetaGroupOwner": "Groups", - "Add-EntraBetaLifecyclePolicyGroup": "Groups", - "Get-EntraBetaDeletedGroup": "Groups", - "Get-EntraBetaGroupAppRoleAssignment": "Groups", - "Get-EntraBetaGroupLifecyclePolicy": "Groups", - "Get-EntraBetaGroupPermissionGrant": "Groups", - "Get-EntraBetaLifecyclePolicyGroup": "Groups", - "New-EntraBetaGroupAppRoleAssignment": "Groups", - "New-EntraBetaGroupLifecyclePolicy": "Groups", - "Remove-EntraBetaGroupAppRoleAssignment": "Groups", - "Remove-EntraBetaGroupLifecyclePolicy": "Groups", - "Remove-EntraBetaGroupMember": "Groups", - "Remove-EntraBetaGroupOwner": "Groups", - "Remove-EntraBetaLifecyclePolicyGroup": "Groups", - "Reset-EntraBetaLifeCycleGroup": "Groups", - "Select-EntraBetaGroupIdsContactIsMemberOf": "Groups", - "Select-EntraBetaGroupIdsGroupIsMemberOf": "Groups", - "Select-EntraBetaGroupIdsUserIsMemberOf": "Groups", - "Set-EntraBetaGroupLifecyclePolicy": "Groups", - "Get-EntraBetaDevice": "DirectoryManagement", - "Remove-EntraBetaDevice": "DirectoryManagement", - "Add-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", - "Add-EntraBetaDeviceRegisteredUser": "DirectoryManagement", - "Get-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", - "Get-EntraBetaDeviceRegisteredUser": "DirectoryManagement", - "Set-EntraBetaDevice": "DirectoryManagement", - "New-EntraBetaDevice": "DirectoryManagement", - "Remove-EntraBetaDeviceRegisteredOwner": "DirectoryManagement", - "Remove-EntraBetaDeviceRegisteredUser": "DirectoryManagement", - "Get-EntraBetaApplication": "Applications", - "Set-EntraBetaApplication": "Applications", - "New-EntraBetaApplication": "Applications", - "Remove-EntraBetaApplication": "Applications", - "Get-EntraBetaServicePrincipal": "Applications", - "Add-EntraBetaApplicationOwner": "Applications", - "Add-EntraBetaApplicationPolicy": "Applications", - "Add-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", - "Add-EntraBetaServicePrincipalOwner": "Applications", - "Add-EntraBetaServicePrincipalPolicy": "SignIns", - "Get-EntraBetaApplicationExtensionProperty": "Applications", - "Get-EntraBetaApplicationKeyCredential": "Applications", - "Get-EntraBetaApplicationLogo": "Applications", - "Get-EntraBetaApplicationOwner": "Applications", - "Get-EntraBetaApplicationPolicy": "Applications", - "Get-EntraBetaApplicationPasswordCredential": "Applications", - "Get-EntraBetaApplicationServiceEndpoint": "Applications", - "Get-EntraBetaDeletedApplication": "Applications", - "Get-EntraBetaApplicationTemplate": "Applications", - "Get-EntraBetaServicePrincipalCreatedObject": "Applications", - "Get-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", - "Get-EntraBetaServicePrincipalKeyCredential": "Applications", - "Get-EntraBetaServicePrincipalMembership": "Applications", - "Get-EntraBetaServicePrincipalOAuth2PermissionGrant": "Applications", - "Get-EntraBetaServicePrincipalOwnedObject": "Applications", - "Get-EntraBetaServicePrincipalOwner": "Applications", - "Get-EntraBetaServicePrincipalPasswordCredential": "Applications", - "New-EntraBetaApplicationFromApplicationTemplate": "Applications", - "New-EntraBetaApplicationExtensionProperty": "Applications", - "New-EntraBetaApplicationKey": "Applications", - "New-EntraBetaApplicationKeyCredential": "Applications", - "New-EntraBetaApplicationPassword": "Applications", - "New-EntraBetaApplicationPasswordCredential": "Applications", - "New-EntraBetaServicePrincipal": "Applications", - "New-EntraBetaServicePrincipalPasswordCredential": "Applications", - "Remove-EntraBetaApplicationExtensionProperty": "Applications", - "Remove-EntraBetaApplicationKey": "Applications", - "Remove-EntraBetaApplicationKeyCredential": "Applications", - "Remove-EntraBetaApplicationOwner": "Applications", - "Remove-EntraBetaApplicationPassword": "Applications", - "Remove-EntraBetaApplicationPasswordCredential": "Applications", - "Remove-EntraBetaApplicationPolicy": "Applications", - "Remove-EntraBetaApplicationVerifiedPublisher": "Applications", - "Remove-EntraBetaDeletedApplication": "Applications", - "Remove-EntraBetaDeletedDirectoryObject": "Applications", - "Remove-EntraBetaServicePrincipal": "Applications", - "Remove-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", - "Remove-EntraBetaServicePrincipalOwner": "Applications", - "Remove-EntraBetaServicePrincipalPolicy": "SignIns", - "Remove-EntraBetaServicePrincipalPasswordCredential": "Applications", - "Restore-EntraBetaDeletedApplication": "Applications", - "Select-EntraBetaGroupIdsServicePrincipalIsMemberOf": "Applications", - "Set-EntraBetaApplicationLogo": "Applications", - "Set-EntraBetaApplicationVerifiedPublisher": "Applications", - "Set-EntraBetaServicePrincipal": "Applications", - "Revoke-EntraBetaSignedInUserAllRefreshToken": "Authentication", - "Revoke-EntraBetaUserAllRefreshToken": "Authentication", - "Disconnect-Entra": "Authentication", - "Get-EntraContext": "Authentication", - "Connect-Entra": "Authentication", - "Get-EntraBetaTenantDetail": "DirectoryManagement", - "Set-EntraBetaTenantDetail": "DirectoryManagement", - "Add-EntraBetaDirectoryRoleMember": "DirectoryManagement", - "Enable-EntraBetaDirectoryRole": "DirectoryManagement", - "Get-EntraBetaDeletedDirectoryObject": "DirectoryManagement", - "Get-EntraBetaDirectoryRole": "DirectoryManagement", - "Get-EntraBetaDirectoryRoleMember": "DirectoryManagement", - "Get-EntraBetaDirectoryRoleTemplate": "DirectoryManagement", - "Get-EntraBetaDirSyncConfiguration": "DirectoryManagement", - "Get-EntraBetaDirSyncFeature": "DirectoryManagement", - "Set-EntraBetaDirSyncEnabled": "DirectoryManagement", - "Get-EntraBetaHasObjectsWithDirSyncProvisioningError": "DirectoryManagement", - "Get-EntraBetaDirectorySettingTemplate": "DirectoryManagement", - "Get-EntraBetaDirectorySetting": "DirectoryManagement", - "New-EntraBetaDirectorySetting": "DirectoryManagement", - "Remove-EntraBetaDirectoryRoleMember": "DirectoryManagement", - "Remove-EntraBetaDirectorySetting": "DirectoryManagement", - "Restore-EntraBetaDeletedDirectoryObject": "DirectoryManagement", - "Set-EntraBetaDirectorySetting": "DirectoryManagement", - "Set-EntraBetaDirSyncConfiguration": "DirectoryManagement", - "Set-EntraBetaDirSyncFeature": "DirectoryManagement", - "Get-EntraBetaDomain": "DirectoryManagement", - "Get-EntraBetaDomainFederationSettings": "DirectoryManagement", - "Get-EntraBetaDomainNameReference": "DirectoryManagement", - "Get-EntraBetaDomainServiceConfigurationRecord": "DirectoryManagement", - "Get-EntraBetaDomainVerificationDnsRecord": "DirectoryManagement", - "New-EntraBetaDomain": "DirectoryManagement", - "Remove-EntraBetaDomain": "DirectoryManagement", - "Set-EntraBetaDomain": "DirectoryManagement", - "Set-EntraBetaDomainFederationSettings": "DirectoryManagement", - "Get-EntraBetaNamedLocationPolicy": "SignIns", - "Get-EntraBetaFeatureRolloutPolicy": "SignIns", - "Get-EntraBetaPolicy": "SignIns", - "Get-EntraBetaPermissionGrantConditionSet": "SignIns", - "Get-EntraBetaPermissionGrantPolicy": "SignIns", - "Get-EntraBetaPolicyAppliedObject": "SignIns", - "Get-EntraBetaPasswordPolicy": "DirectoryManagement", - "New-EntraBetaNamedLocationPolicy": "SignIns", - "New-EntraBetaFeatureRolloutPolicy": "SignIns", - "New-EntraBetaPermissionGrantConditionSet": "SignIns", - "New-EntraBetaPermissionGrantPolicy": "SignIns", - "New-EntraBetaPolicy": "SignIns", - "Remove-EntraBetaNamedLocationPolicy": "SignIns", - "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject": "SignIns", - "Remove-EntraBetaPermissionGrantConditionSet": "SignIns", - "Remove-EntraBetaPermissionGrantPolicy": "SignIns", - "Remove-EntraBetaPolicy": "SignIns", - "Set-EntraBetaNamedLocationPolicy": "SignIns", - "Set-EntraBetaPermissionGrantConditionSet": "SignIns", - "Set-EntraBetaPermissionGrantPolicy": "SignIns", - "Set-EntraBetaFeatureRolloutPolicy": "SignIns", - "Set-EntraBetaPolicy": "SignIns", - "Set-EntraBetaAuthorizationPolicy": "SignIns", - "Get-EntraBetaAuthorizationPolicy": "SignIns", - "Get-EntraBetaOAuth2PermissionGrant": "SignIns", - "New-EntraBetaOauth2PermissionGrant": "SignIns", - "Remove-EntraBetaOAuth2PermissionGrant": "SignIns", - "Get-EntraBetaApplicationSignInSummary": "Reports", - "Get-EntraBetaApplicationSignInDetailedSummary": "Reports", - "Get-EntraBetaPrivilegedRoleSetting": "Governance", - "Get-EntraBetaPrivilegedRoleDefinition": "Governance", - "Get-EntraBetaPrivilegedRoleAssignmentRequest": "Governance", - "Get-EntraBetaPrivilegedRole": "Governance", - "Get-EntraBetaPrivilegedResource": "Governance", - "New-EntraBetaPrivilegedRoleAssignment": "Governance", - "Set-EntraBetaPrivilegedRoleAssignmentRequest": "Governance", - "Set-EntraBetaPrivilegedRoleSetting": "Governance", - "Get-EntraBetaAccountSku": "DirectoryManagement", - "Get-EntraBetaFederationProperty": "DirectoryManagement", - "Enable-EntraAzureADAlias": "Migration", - "Test-EntraScript": "Migration", - "Get-EntraBetaAttributeSet": "DirectoryManagement", - "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", - "Get-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", - "New-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", - "Set-EntraBetaCustomSecurityAttributeDefinition": "DirectoryManagement", - "Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", - "Get-EntraBetaContact": "DirectoryManagement", - "Get-EntraBetaContactDirectReport": "DirectoryManagement", - "Get-EntraBetaContactManager": "DirectoryManagement", - "Get-EntraBetaContactMembership": "DirectoryManagement", - "Get-EntraBetaContactThumbnailPhoto": "xxxxxxxxxxxxxxxx", - "Remove-EntraBetaContact": "DirectoryManagement", - "Get-EntraBetaContract": "DirectoryManagement", - "Get-EntraBetaTrustedCertificateAuthority": "SignIns", - "New-EntraBetaTrustedCertificateAuthority": "SignIns", - "Remove-EntraBetaTrustedCertificateAuthority": "SignIns", - "Set-EntraBetaTrustedCertificateAuthority": "SignIns", - "Get-EntraBetaTrustFrameworkPolicy": "SignIns", - "New-EntraBetaTrustFrameworkPolicy": "SignIns", - "Remove-EntraBetaTrustFrameworkPolicy": "SignIns", - "Set-EntraBetaTrustFrameworkPolicy": "SignIns", - "Get-EntraBetaIdentityProvider": "SignIns", - "New-EntraBetaIdentityProvider": "SignIns", - "Remove-EntraBetaIdentityProvider": "SignIns", - "Set-EntraBetaIdentityProvider": "SignIns", - "Get-EntraBetaPartnerInformation": "DirectoryManagement", - "Set-EntraBetaPartnerInformation": "DirectoryManagement", - "Add-EntraBetaAdministrativeUnitMember": "DirectoryManagement", - "Get-EntraBetaAdministrativeUnit": "DirectoryManagement", - "Get-EntraBetaAdministrativeUnitMember": "DirectoryManagement", - "New-EntraBetaAdministrativeUnitMember": "DirectoryManagement", - "New-EntraBetaAdministrativeUnit": "DirectoryManagement", - "Remove-EntraBetaAdministrativeUnit": "DirectoryManagement", - "Remove-EntraBetaAdministrativeUnitMember": "DirectoryManagement", - "Set-EntraBetaAdministrativeUnit": "DirectoryManagement", - "Get-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", - "New-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", - "Remove-EntraBetaPrivateAccessApplicationSegment": "NetworkAccess", - "Set-EntraBetaPasswordSingleSignOnCredential": "Applications", - "Get-EntraBetaPasswordSingleSignOnCredential": "Applications", - "New-EntraBetaPasswordSingleSignOnCredential": "Applications", - "Remove-EntraBetaPasswordSingleSignOnCredential": "Applications", - "Get-EntraBetaApplicationProxyApplication": "Applications", - "New-EntraBetaApplicationProxyApplication": "Applications", - "Remove-EntraBetaApplicationProxyApplication": "Applications", - "Set-EntraBetaApplicationProxyApplication": "Applications", - "Set-EntraBetaApplicationProxyApplicationSingleSignOn": "Applications", - "Set-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", - "Get-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", - "Get-EntraBetaApplicationProxyConnector": "Applications", - "Get-EntraBetaApplicationProxyConnectorGroup": "Applications", - "Get-EntraBetaApplicationProxyConnectorGroupMembers": "Applications", - "Get-EntraBetaApplicationProxyConnectorMemberOf": "Applications", - "New-EntraBetaApplicationProxyConnectorGroup": "Applications", - "Remove-EntraBetaApplicationProxyApplicationConnectorGroup": "Applications", - "Remove-EntraBetaApplicationProxyConnectorGroup": "Applications", - "Set-EntraBetaApplicationProxyConnector": "Applications", - "Set-EntraBetaApplicationProxyConnectorGroup": "Applications", - "Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue": "DirectoryManagement", - "Add-EntraBetaFeatureRolloutPolicyDirectoryObject": "SignIns", - "Add-EntraBetaScopedRoleMembership": "DirectoryManagement", - "Confirm-EntraBetaDomain": "DirectoryManagement", - "Get-EntraBetaConditionalAccessPolicy": "SignIns", - "Get-EntraBetaObjectByObjectId": "Groups", - "Get-EntraBetaObjectSetting": "Groups", - "Get-EntraBetaScopedRoleMembership": "DirectoryManagement", - "Get-EntraBetaServicePrincipalPolicy": "SignIns", - "Get-EntraBetaSubscribedSku": "DirectoryManagement", - "Get-EntraUnsupportedCommand": "Migration", - "New-EntraBetaAttributeSet": "DirectoryManagement", - "New-EntraBetaConditionalAccessPolicy": "SignIns", - "New-EntraBetaInvitation": "SignIns", - "New-EntraBetaObjectSetting": "Groups", - "Remove-EntraBetaConditionalAccessPolicy": "SignIns", - "Remove-EntraBetaFeatureRolloutPolicy": "SignIns", - "Remove-EntraBetaObjectSetting": "Groups", - "Remove-EntraBetaScopedRoleMembership": "DirectoryManagement", - "Set-EntraBetaAttributeSet": "DirectoryManagement", - "Set-EntraBetaConditionalAccessPolicy": "SignIns", - "Set-EntraBetaObjectSetting": "Groups", - "Get-EntraBetaAuditDirectoryLog": "Reports", - "Get-EntraBetaAuditSignInLog": "Reports", - "Get-EntraBetaDirectoryObjectOnPremisesProvisioningError": "DirectoryManagement", - "Get-EntraBetaDirectoryRoleAssignment": "Governance", - "Get-EntraBetaDirectoryRoleDefinition": "Governance", - "Get-EntraBetaServicePrincipalAppRoleAssignedTo": "Applications", - "Get-EntraBetaServicePrincipalAppRoleAssignment": "Applications", - "New-EntraBetaDirectoryRoleAssignment": "Governance", - "New-EntraBetaDirectoryRoleDefinition": "Governance", - "New-EntraBetaServicePrincipalAppRoleAssignment": "Applications", - "Remove-EntraBetaDirectoryRoleAssignment": "Governance", - "Remove-EntraBetaDirectoryRoleDefinition": "Governance", - "Remove-EntraBetaServicePrincipalAppRoleAssignment": "Applications", - "Set-EntraBetaDirectoryRoleDefinition": "Governance", - "Update-EntraBetaUserFromFederated": "Users" -} \ No newline at end of file diff --git a/module/.sourcemap-maml-0.json b/module_legacy/.sourcemap-maml-0.json similarity index 100% rename from module/.sourcemap-maml-0.json rename to module_legacy/.sourcemap-maml-0.json diff --git a/module/Entra/AdditionalFunctions/Add-EntraAdministrativeUnitMember.ps1 b/module_legacy/Entra/AdditionalFunctions/Add-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Add-EntraAdministrativeUnitMember.ps1 rename to module_legacy/Entra/AdditionalFunctions/Add-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/AdditionalFunctions/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module_legacy/Entra/AdditionalFunctions/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module_legacy/Entra/AdditionalFunctions/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/AdditionalFunctions/Add-EntraEnvironment.ps1 b/module_legacy/Entra/AdditionalFunctions/Add-EntraEnvironment.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Add-EntraEnvironment.ps1 rename to module_legacy/Entra/AdditionalFunctions/Add-EntraEnvironment.ps1 diff --git a/module/Entra/AdditionalFunctions/Add-EntraScopedRoleMembership.ps1 b/module_legacy/Entra/AdditionalFunctions/Add-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Add-EntraScopedRoleMembership.ps1 rename to module_legacy/Entra/AdditionalFunctions/Add-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/AdditionalFunctions/Connect-Entra.ps1 b/module_legacy/Entra/AdditionalFunctions/Connect-Entra.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Connect-Entra.ps1 rename to module_legacy/Entra/AdditionalFunctions/Connect-Entra.ps1 diff --git a/module/Entra/AdditionalFunctions/Disconnect-Entra.ps1 b/module_legacy/Entra/AdditionalFunctions/Disconnect-Entra.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Disconnect-Entra.ps1 rename to module_legacy/Entra/AdditionalFunctions/Disconnect-Entra.ps1 diff --git a/module/Entra/AdditionalFunctions/Find-EntraPermission.ps1 b/module_legacy/Entra/AdditionalFunctions/Find-EntraPermission.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Find-EntraPermission.ps1 rename to module_legacy/Entra/AdditionalFunctions/Find-EntraPermission.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraAccountSku.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAccountSku.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraAccountSku.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraAccountSku.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraApplicationTemplate.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraApplicationTemplate.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraApplicationTemplate.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraApplicationTemplate.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraAuthorizationPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAuthorizationPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraAuthorizationPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraAuthorizationPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraContext.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraContext.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraContext.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraContext.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraDirSyncConfiguration.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraDirSyncConfiguration.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraDirSyncConfiguration.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraDirSyncConfiguration.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraDirSyncFeature.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraDirSyncFeature.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraDirSyncFeature.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraDirSyncFeature.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraDomainFederationSettings.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraDomainFederationSettings.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraDomainFederationSettings.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraDomainFederationSettings.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraEnvironment.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraEnvironment.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraEnvironment.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraEnvironment.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraFederationProperty.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraFederationProperty.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraFederationProperty.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraFederationProperty.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraPartnerInformation.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraPartnerInformation.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraPartnerInformation.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraPartnerInformation.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraPasswordPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraPasswordPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraPasswordPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraPasswordPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraScopedRoleMembership.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraScopedRoleMembership.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/AdditionalFunctions/Get-EntraUserAuthenticationMethod.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraUserAuthenticationMethod.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Get-EntraUserAuthenticationMethod.ps1 rename to module_legacy/Entra/AdditionalFunctions/Get-EntraUserAuthenticationMethod.ps1 diff --git a/module/Entra/AdditionalFunctions/New-EntraAdministrativeUnit.ps1 b/module_legacy/Entra/AdditionalFunctions/New-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/New-EntraAdministrativeUnit.ps1 rename to module_legacy/Entra/AdditionalFunctions/New-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/AdditionalFunctions/New-EntraApplicationFromApplicationTemplate.ps1 b/module_legacy/Entra/AdditionalFunctions/New-EntraApplicationFromApplicationTemplate.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/New-EntraApplicationFromApplicationTemplate.ps1 rename to module_legacy/Entra/AdditionalFunctions/New-EntraApplicationFromApplicationTemplate.ps1 diff --git a/module/Entra/AdditionalFunctions/New-EntraAttributeSet.ps1 b/module_legacy/Entra/AdditionalFunctions/New-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/New-EntraAttributeSet.ps1 rename to module_legacy/Entra/AdditionalFunctions/New-EntraAttributeSet.ps1 diff --git a/module/Entra/AdditionalFunctions/New-EntraCustomHeaders.ps1 b/module_legacy/Entra/AdditionalFunctions/New-EntraCustomHeaders.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/New-EntraCustomHeaders.ps1 rename to module_legacy/Entra/AdditionalFunctions/New-EntraCustomHeaders.ps1 diff --git a/module/Entra/AdditionalFunctions/New-EntraCustomSecurityAttributeDefinition.ps1 b/module_legacy/Entra/AdditionalFunctions/New-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/New-EntraCustomSecurityAttributeDefinition.ps1 rename to module_legacy/Entra/AdditionalFunctions/New-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/AdditionalFunctions/New-EntraFeatureRolloutPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/New-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/New-EntraFeatureRolloutPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/New-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/New-EntraOauth2PermissionGrant.ps1 b/module_legacy/Entra/AdditionalFunctions/New-EntraOauth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/New-EntraOauth2PermissionGrant.ps1 rename to module_legacy/Entra/AdditionalFunctions/New-EntraOauth2PermissionGrant.ps1 diff --git a/module/Entra/AdditionalFunctions/New-EntraPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/New-EntraPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/New-EntraPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/New-EntraPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/README.md b/module_legacy/Entra/AdditionalFunctions/README.md similarity index 100% rename from module/Entra/AdditionalFunctions/README.md rename to module_legacy/Entra/AdditionalFunctions/README.md diff --git a/module/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnit.ps1 b/module_legacy/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnit.ps1 rename to module_legacy/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnitMember.ps1 b/module_legacy/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnitMember.ps1 rename to module_legacy/Entra/AdditionalFunctions/Remove-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 b/module_legacy/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 rename to module_legacy/Entra/AdditionalFunctions/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/module/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/Remove-EntraScopedRoleMembership.ps1 b/module_legacy/Entra/AdditionalFunctions/Remove-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Remove-EntraScopedRoleMembership.ps1 rename to module_legacy/Entra/AdditionalFunctions/Remove-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/AdditionalFunctions/Reset-EntraStrongAuthenticationMethodByUpn.ps1 b/module_legacy/Entra/AdditionalFunctions/Reset-EntraStrongAuthenticationMethodByUpn.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Reset-EntraStrongAuthenticationMethodByUpn.ps1 rename to module_legacy/Entra/AdditionalFunctions/Reset-EntraStrongAuthenticationMethodByUpn.ps1 diff --git a/module/Entra/AdditionalFunctions/Restore-EntraDeletedDirectoryObject.ps1 b/module_legacy/Entra/AdditionalFunctions/Restore-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Restore-EntraDeletedDirectoryObject.ps1 rename to module_legacy/Entra/AdditionalFunctions/Restore-EntraDeletedDirectoryObject.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraAdministrativeUnit.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraAdministrativeUnit.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraAttributeSet.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraAttributeSet.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraAttributeSet.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinition.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinition.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraDirSyncConfiguration.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraDirSyncConfiguration.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraDirSyncConfiguration.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraDirSyncConfiguration.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraDirSyncEnabled.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraDirSyncEnabled.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraDirSyncEnabled.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraDirSyncEnabled.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraDirSyncFeature.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraDirSyncFeature.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraDirSyncFeature.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraDirSyncFeature.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraDomainFederationSettings.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraDomainFederationSettings.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraDomainFederationSettings.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraDomainFederationSettings.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraFeatureRolloutPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraFeatureRolloutPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraPartnerInformation.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraPartnerInformation.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraPartnerInformation.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraPartnerInformation.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 diff --git a/module/Entra/AdditionalFunctions/Set-EntraServicePrincipal.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Set-EntraServicePrincipal.ps1 rename to module_legacy/Entra/AdditionalFunctions/Set-EntraServicePrincipal.ps1 diff --git a/module/Entra/AdditionalFunctions/Test-EntraScript.ps1 b/module_legacy/Entra/AdditionalFunctions/Test-EntraScript.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Test-EntraScript.ps1 rename to module_legacy/Entra/AdditionalFunctions/Test-EntraScript.ps1 diff --git a/module/Entra/AdditionalFunctions/Update-EntraOAuth2PermissionGrant.ps1 b/module_legacy/Entra/AdditionalFunctions/Update-EntraOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/AdditionalFunctions/Update-EntraOAuth2PermissionGrant.ps1 rename to module_legacy/Entra/AdditionalFunctions/Update-EntraOAuth2PermissionGrant.ps1 diff --git a/module/Entra/AdditionalFunctions/Update-EntraUserFromFederated.ps1 b/module_legacy/Entra/AdditionalFunctions/Update-EntraUserFromFederated.ps1 similarity index 96% rename from module/Entra/AdditionalFunctions/Update-EntraUserFromFederated.ps1 rename to module_legacy/Entra/AdditionalFunctions/Update-EntraUserFromFederated.ps1 index 2fc79e92ac..5ea9649c87 100644 --- a/module/Entra/AdditionalFunctions/Update-EntraUserFromFederated.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Update-EntraUserFromFederated.ps1 @@ -3,6 +3,7 @@ # ------------------------------------------------------------------------------ function Update-EntraUserFromFederated { + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope="Function", Target="*")] [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserPrincipalName, diff --git a/moduleVNext/Entra/config/ModuleMetadata.json b/module_legacy/Entra/config/ModuleMetadata.json similarity index 100% rename from moduleVNext/Entra/config/ModuleMetadata.json rename to module_legacy/Entra/config/ModuleMetadata.json diff --git a/moduleVNext/Entra/config/ModuleSettings.json b/module_legacy/Entra/config/ModuleSettings.json similarity index 100% rename from moduleVNext/Entra/config/ModuleSettings.json rename to module_legacy/Entra/config/ModuleSettings.json diff --git a/moduleVNext/Entra/config/dependencyMapping.json b/module_legacy/Entra/config/dependencyMapping.json similarity index 100% rename from moduleVNext/Entra/config/dependencyMapping.json rename to module_legacy/Entra/config/dependencyMapping.json diff --git a/moduleVNext/Entra/config/moduleMapping.json b/module_legacy/Entra/config/moduleMapping.json similarity index 100% rename from moduleVNext/Entra/config/moduleMapping.json rename to module_legacy/Entra/config/moduleMapping.json diff --git a/module/Entra/customizations/Add-EntraApplicationOwner.ps1 b/module_legacy/Entra/customizations/Add-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/customizations/Add-EntraApplicationOwner.ps1 rename to module_legacy/Entra/customizations/Add-EntraApplicationOwner.ps1 diff --git a/module/Entra/customizations/Add-EntraDeviceRegisteredOwner.ps1 b/module_legacy/Entra/customizations/Add-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/customizations/Add-EntraDeviceRegisteredOwner.ps1 rename to module_legacy/Entra/customizations/Add-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/customizations/Add-EntraDeviceRegisteredUser.ps1 b/module_legacy/Entra/customizations/Add-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/customizations/Add-EntraDeviceRegisteredUser.ps1 rename to module_legacy/Entra/customizations/Add-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/customizations/Add-EntraDirectoryRoleMember.ps1 b/module_legacy/Entra/customizations/Add-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/customizations/Add-EntraDirectoryRoleMember.ps1 rename to module_legacy/Entra/customizations/Add-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/customizations/Add-EntraGroupMember.ps1 b/module_legacy/Entra/customizations/Add-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/customizations/Add-EntraGroupMember.ps1 rename to module_legacy/Entra/customizations/Add-EntraGroupMember.ps1 diff --git a/module/Entra/customizations/Add-EntraGroupOwner.ps1 b/module_legacy/Entra/customizations/Add-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/customizations/Add-EntraGroupOwner.ps1 rename to module_legacy/Entra/customizations/Add-EntraGroupOwner.ps1 diff --git a/module/Entra/customizations/Add-EntraLifecyclePolicyGroup.ps1 b/module_legacy/Entra/customizations/Add-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/customizations/Add-EntraLifecyclePolicyGroup.ps1 rename to module_legacy/Entra/customizations/Add-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/customizations/Add-EntraServicePrincipalOwner.ps1 b/module_legacy/Entra/customizations/Add-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/customizations/Add-EntraServicePrincipalOwner.ps1 rename to module_legacy/Entra/customizations/Add-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/customizations/Confirm-EntraDomain.ps1 b/module_legacy/Entra/customizations/Confirm-EntraDomain.ps1 similarity index 100% rename from module/Entra/customizations/Confirm-EntraDomain.ps1 rename to module_legacy/Entra/customizations/Confirm-EntraDomain.ps1 diff --git a/module/Entra/customizations/Generic.ps1 b/module_legacy/Entra/customizations/Generic.ps1 similarity index 100% rename from module/Entra/customizations/Generic.ps1 rename to module_legacy/Entra/customizations/Generic.ps1 diff --git a/module/Entra/customizations/Get-EntraApplication.ps1 b/module_legacy/Entra/customizations/Get-EntraApplication.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraApplication.ps1 rename to module_legacy/Entra/customizations/Get-EntraApplication.ps1 diff --git a/module/Entra/customizations/Get-EntraApplicationKeyCredential.ps1 b/module_legacy/Entra/customizations/Get-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraApplicationKeyCredential.ps1 rename to module_legacy/Entra/customizations/Get-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/customizations/Get-EntraApplicationLogo.ps1 b/module_legacy/Entra/customizations/Get-EntraApplicationLogo.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraApplicationLogo.ps1 rename to module_legacy/Entra/customizations/Get-EntraApplicationLogo.ps1 diff --git a/module/Entra/customizations/Get-EntraApplicationOwner.ps1 b/module_legacy/Entra/customizations/Get-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraApplicationOwner.ps1 rename to module_legacy/Entra/customizations/Get-EntraApplicationOwner.ps1 diff --git a/module/Entra/customizations/Get-EntraApplicationPasswordCredential.ps1 b/module_legacy/Entra/customizations/Get-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraApplicationPasswordCredential.ps1 rename to module_legacy/Entra/customizations/Get-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/customizations/Get-EntraApplicationServiceEndpoint.ps1 b/module_legacy/Entra/customizations/Get-EntraApplicationServiceEndpoint.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraApplicationServiceEndpoint.ps1 rename to module_legacy/Entra/customizations/Get-EntraApplicationServiceEndpoint.ps1 diff --git a/module/Entra/customizations/Get-EntraConditionalAccessPolicy.ps1 b/module_legacy/Entra/customizations/Get-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraConditionalAccessPolicy.ps1 rename to module_legacy/Entra/customizations/Get-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/customizations/Get-EntraContact.ps1 b/module_legacy/Entra/customizations/Get-EntraContact.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraContact.ps1 rename to module_legacy/Entra/customizations/Get-EntraContact.ps1 diff --git a/module/Entra/customizations/Get-EntraContactDirectReport.ps1 b/module_legacy/Entra/customizations/Get-EntraContactDirectReport.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraContactDirectReport.ps1 rename to module_legacy/Entra/customizations/Get-EntraContactDirectReport.ps1 diff --git a/module/Entra/customizations/Get-EntraContactMembership.ps1 b/module_legacy/Entra/customizations/Get-EntraContactMembership.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraContactMembership.ps1 rename to module_legacy/Entra/customizations/Get-EntraContactMembership.ps1 diff --git a/module/Entra/customizations/Get-EntraDeletedApplication.ps1 b/module_legacy/Entra/customizations/Get-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDeletedApplication.ps1 rename to module_legacy/Entra/customizations/Get-EntraDeletedApplication.ps1 diff --git a/module/Entra/customizations/Get-EntraDeletedDirectoryObject.ps1 b/module_legacy/Entra/customizations/Get-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDeletedDirectoryObject.ps1 rename to module_legacy/Entra/customizations/Get-EntraDeletedDirectoryObject.ps1 diff --git a/module/Entra/customizations/Get-EntraDeletedGroup.ps1 b/module_legacy/Entra/customizations/Get-EntraDeletedGroup.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDeletedGroup.ps1 rename to module_legacy/Entra/customizations/Get-EntraDeletedGroup.ps1 diff --git a/module/Entra/customizations/Get-EntraDevice.ps1 b/module_legacy/Entra/customizations/Get-EntraDevice.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDevice.ps1 rename to module_legacy/Entra/customizations/Get-EntraDevice.ps1 diff --git a/module/Entra/customizations/Get-EntraDeviceRegisteredOwner.ps1 b/module_legacy/Entra/customizations/Get-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDeviceRegisteredOwner.ps1 rename to module_legacy/Entra/customizations/Get-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/customizations/Get-EntraDeviceRegisteredUser.ps1 b/module_legacy/Entra/customizations/Get-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDeviceRegisteredUser.ps1 rename to module_legacy/Entra/customizations/Get-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/customizations/Get-EntraDirectoryRoleAssignment.ps1 b/module_legacy/Entra/customizations/Get-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDirectoryRoleAssignment.ps1 rename to module_legacy/Entra/customizations/Get-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/customizations/Get-EntraDirectoryRoleDefinition.ps1 b/module_legacy/Entra/customizations/Get-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDirectoryRoleDefinition.ps1 rename to module_legacy/Entra/customizations/Get-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/customizations/Get-EntraDirectoryRoleMember.ps1 b/module_legacy/Entra/customizations/Get-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDirectoryRoleMember.ps1 rename to module_legacy/Entra/customizations/Get-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/customizations/Get-EntraDomain.ps1 b/module_legacy/Entra/customizations/Get-EntraDomain.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDomain.ps1 rename to module_legacy/Entra/customizations/Get-EntraDomain.ps1 diff --git a/module/Entra/customizations/Get-EntraDomainNameReference.ps1 b/module_legacy/Entra/customizations/Get-EntraDomainNameReference.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDomainNameReference.ps1 rename to module_legacy/Entra/customizations/Get-EntraDomainNameReference.ps1 diff --git a/module/Entra/customizations/Get-EntraDomainServiceConfigurationRecord.ps1 b/module_legacy/Entra/customizations/Get-EntraDomainServiceConfigurationRecord.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDomainServiceConfigurationRecord.ps1 rename to module_legacy/Entra/customizations/Get-EntraDomainServiceConfigurationRecord.ps1 diff --git a/module/Entra/customizations/Get-EntraDomainVerificationDnsRecord.ps1 b/module_legacy/Entra/customizations/Get-EntraDomainVerificationDnsRecord.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraDomainVerificationDnsRecord.ps1 rename to module_legacy/Entra/customizations/Get-EntraDomainVerificationDnsRecord.ps1 diff --git a/module/Entra/customizations/Get-EntraExtensionProperty.ps1 b/module_legacy/Entra/customizations/Get-EntraExtensionProperty.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraExtensionProperty.ps1 rename to module_legacy/Entra/customizations/Get-EntraExtensionProperty.ps1 diff --git a/module/Entra/customizations/Get-EntraGroup.ps1 b/module_legacy/Entra/customizations/Get-EntraGroup.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraGroup.ps1 rename to module_legacy/Entra/customizations/Get-EntraGroup.ps1 diff --git a/module/Entra/customizations/Get-EntraGroupAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/Get-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraGroupAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/Get-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/Get-EntraGroupMember.ps1 b/module_legacy/Entra/customizations/Get-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraGroupMember.ps1 rename to module_legacy/Entra/customizations/Get-EntraGroupMember.ps1 diff --git a/module/Entra/customizations/Get-EntraGroupOwner.ps1 b/module_legacy/Entra/customizations/Get-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraGroupOwner.ps1 rename to module_legacy/Entra/customizations/Get-EntraGroupOwner.ps1 diff --git a/module/Entra/customizations/Get-EntraIdentityProvider.ps1 b/module_legacy/Entra/customizations/Get-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraIdentityProvider.ps1 rename to module_legacy/Entra/customizations/Get-EntraIdentityProvider.ps1 diff --git a/module/Entra/customizations/Get-EntraLifecyclePolicyGroup.ps1 b/module_legacy/Entra/customizations/Get-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraLifecyclePolicyGroup.ps1 rename to module_legacy/Entra/customizations/Get-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/customizations/Get-EntraNamedLocationPolicy.ps1 b/module_legacy/Entra/customizations/Get-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraNamedLocationPolicy.ps1 rename to module_legacy/Entra/customizations/Get-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/customizations/Get-EntraObjectByObjectId.ps1 b/module_legacy/Entra/customizations/Get-EntraObjectByObjectId.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraObjectByObjectId.ps1 rename to module_legacy/Entra/customizations/Get-EntraObjectByObjectId.ps1 diff --git a/module/Entra/customizations/Get-EntraPermissionGrantConditionSet.ps1 b/module_legacy/Entra/customizations/Get-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraPermissionGrantConditionSet.ps1 rename to module_legacy/Entra/customizations/Get-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/customizations/Get-EntraPermissionGrantPolicy.ps1 b/module_legacy/Entra/customizations/Get-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraPermissionGrantPolicy.ps1 rename to module_legacy/Entra/customizations/Get-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipal.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipal.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipal.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalCreatedObject.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalCreatedObject.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalCreatedObject.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalCreatedObject.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalKeyCredential.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalKeyCredential.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalKeyCredential.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalKeyCredential.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalMembership.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalMembership.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalMembership.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalMembership.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalOwnedObject.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalOwnedObject.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalOwnedObject.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalOwnedObject.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalOwner.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalOwner.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/customizations/Get-EntraServicePrincipalPasswordCredential.ps1 b/module_legacy/Entra/customizations/Get-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraServicePrincipalPasswordCredential.ps1 rename to module_legacy/Entra/customizations/Get-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/customizations/Get-EntraSubscribedSku.ps1 b/module_legacy/Entra/customizations/Get-EntraSubscribedSku.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraSubscribedSku.ps1 rename to module_legacy/Entra/customizations/Get-EntraSubscribedSku.ps1 diff --git a/module/Entra/customizations/Get-EntraTenantDetail.ps1 b/module_legacy/Entra/customizations/Get-EntraTenantDetail.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraTenantDetail.ps1 rename to module_legacy/Entra/customizations/Get-EntraTenantDetail.ps1 diff --git a/module/Entra/customizations/Get-EntraTrustedCertificateAuthority.ps1 b/module_legacy/Entra/customizations/Get-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraTrustedCertificateAuthority.ps1 rename to module_legacy/Entra/customizations/Get-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/customizations/Get-EntraUser.ps1 b/module_legacy/Entra/customizations/Get-EntraUser.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUser.ps1 rename to module_legacy/Entra/customizations/Get-EntraUser.ps1 diff --git a/module/Entra/customizations/Get-EntraUserAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/Get-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/Get-EntraUserCreatedObject.ps1 b/module_legacy/Entra/customizations/Get-EntraUserCreatedObject.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserCreatedObject.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserCreatedObject.ps1 diff --git a/module/Entra/customizations/Get-EntraUserDirectReport.ps1 b/module_legacy/Entra/customizations/Get-EntraUserDirectReport.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserDirectReport.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserDirectReport.ps1 diff --git a/module/Entra/customizations/Get-EntraUserExtension.ps1 b/module_legacy/Entra/customizations/Get-EntraUserExtension.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserExtension.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserExtension.ps1 diff --git a/module/Entra/customizations/Get-EntraUserLicenseDetail.ps1 b/module_legacy/Entra/customizations/Get-EntraUserLicenseDetail.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserLicenseDetail.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserLicenseDetail.ps1 diff --git a/module/Entra/customizations/Get-EntraUserManager.ps1 b/module_legacy/Entra/customizations/Get-EntraUserManager.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserManager.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserManager.ps1 diff --git a/module/Entra/customizations/Get-EntraUserMembership.ps1 b/module_legacy/Entra/customizations/Get-EntraUserMembership.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserMembership.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserMembership.ps1 diff --git a/module/Entra/customizations/Get-EntraUserOAuth2PermissionGrant.ps1 b/module_legacy/Entra/customizations/Get-EntraUserOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserOAuth2PermissionGrant.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserOAuth2PermissionGrant.ps1 diff --git a/module/Entra/customizations/Get-EntraUserOwnedDevice.ps1 b/module_legacy/Entra/customizations/Get-EntraUserOwnedDevice.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserOwnedDevice.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserOwnedDevice.ps1 diff --git a/module/Entra/customizations/Get-EntraUserOwnedObject.ps1 b/module_legacy/Entra/customizations/Get-EntraUserOwnedObject.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserOwnedObject.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserOwnedObject.ps1 diff --git a/module/Entra/customizations/Get-EntraUserRegisteredDevice.ps1 b/module_legacy/Entra/customizations/Get-EntraUserRegisteredDevice.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserRegisteredDevice.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserRegisteredDevice.ps1 diff --git a/module/Entra/customizations/Get-EntraUserThumbnailPhoto.ps1 b/module_legacy/Entra/customizations/Get-EntraUserThumbnailPhoto.ps1 similarity index 100% rename from module/Entra/customizations/Get-EntraUserThumbnailPhoto.ps1 rename to module_legacy/Entra/customizations/Get-EntraUserThumbnailPhoto.ps1 diff --git a/module/Entra/customizations/New-EntraApplication.ps1 b/module_legacy/Entra/customizations/New-EntraApplication.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraApplication.ps1 rename to module_legacy/Entra/customizations/New-EntraApplication.ps1 diff --git a/module/Entra/customizations/New-EntraApplicationExtensionProperty.ps1 b/module_legacy/Entra/customizations/New-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraApplicationExtensionProperty.ps1 rename to module_legacy/Entra/customizations/New-EntraApplicationExtensionProperty.ps1 diff --git a/module/Entra/customizations/New-EntraApplicationKeyCredential.ps1 b/module_legacy/Entra/customizations/New-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraApplicationKeyCredential.ps1 rename to module_legacy/Entra/customizations/New-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/customizations/New-EntraApplicationPassword.ps1 b/module_legacy/Entra/customizations/New-EntraApplicationPassword.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraApplicationPassword.ps1 rename to module_legacy/Entra/customizations/New-EntraApplicationPassword.ps1 diff --git a/module/Entra/customizations/New-EntraApplicationPasswordCredential.ps1 b/module_legacy/Entra/customizations/New-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraApplicationPasswordCredential.ps1 rename to module_legacy/Entra/customizations/New-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/customizations/New-EntraConditionalAccessPolicy.ps1 b/module_legacy/Entra/customizations/New-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraConditionalAccessPolicy.ps1 rename to module_legacy/Entra/customizations/New-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/customizations/New-EntraDirectoryRoleAssignment.ps1 b/module_legacy/Entra/customizations/New-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraDirectoryRoleAssignment.ps1 rename to module_legacy/Entra/customizations/New-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/customizations/New-EntraDirectoryRoleDefinition.ps1 b/module_legacy/Entra/customizations/New-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraDirectoryRoleDefinition.ps1 rename to module_legacy/Entra/customizations/New-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/customizations/New-EntraDomain.ps1 b/module_legacy/Entra/customizations/New-EntraDomain.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraDomain.ps1 rename to module_legacy/Entra/customizations/New-EntraDomain.ps1 diff --git a/module/Entra/customizations/New-EntraGroupAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/New-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraGroupAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/New-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/New-EntraIdentityProvider.ps1 b/module_legacy/Entra/customizations/New-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraIdentityProvider.ps1 rename to module_legacy/Entra/customizations/New-EntraIdentityProvider.ps1 diff --git a/module/Entra/customizations/New-EntraInvitation.ps1 b/module_legacy/Entra/customizations/New-EntraInvitation.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraInvitation.ps1 rename to module_legacy/Entra/customizations/New-EntraInvitation.ps1 diff --git a/module/Entra/customizations/New-EntraNamedLocationPolicy.ps1 b/module_legacy/Entra/customizations/New-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraNamedLocationPolicy.ps1 rename to module_legacy/Entra/customizations/New-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/customizations/New-EntraPermissionGrantConditionSet.ps1 b/module_legacy/Entra/customizations/New-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraPermissionGrantConditionSet.ps1 rename to module_legacy/Entra/customizations/New-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/customizations/New-EntraPermissionGrantPolicy.ps1 b/module_legacy/Entra/customizations/New-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraPermissionGrantPolicy.ps1 rename to module_legacy/Entra/customizations/New-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/customizations/New-EntraServicePrincipal.ps1 b/module_legacy/Entra/customizations/New-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraServicePrincipal.ps1 rename to module_legacy/Entra/customizations/New-EntraServicePrincipal.ps1 diff --git a/module/Entra/customizations/New-EntraServicePrincipalAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/New-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraServicePrincipalAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/New-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/New-EntraServicePrincipalPasswordCredential.ps1 b/module_legacy/Entra/customizations/New-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraServicePrincipalPasswordCredential.ps1 rename to module_legacy/Entra/customizations/New-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/customizations/New-EntraTrustedCertificateAuthority.ps1 b/module_legacy/Entra/customizations/New-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraTrustedCertificateAuthority.ps1 rename to module_legacy/Entra/customizations/New-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/customizations/New-EntraUser.ps1 b/module_legacy/Entra/customizations/New-EntraUser.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraUser.ps1 rename to module_legacy/Entra/customizations/New-EntraUser.ps1 diff --git a/module/Entra/customizations/New-EntraUserAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/New-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/New-EntraUserAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/New-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/README.md b/module_legacy/Entra/customizations/README.md similarity index 100% rename from module/Entra/customizations/README.md rename to module_legacy/Entra/customizations/README.md diff --git a/module/Entra/customizations/Remove-EntraAdministrativeUnit.ps1 b/module_legacy/Entra/customizations/Remove-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraAdministrativeUnit.ps1 rename to module_legacy/Entra/customizations/Remove-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/customizations/Remove-EntraAdministrativeUnitMember.ps1 b/module_legacy/Entra/customizations/Remove-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraAdministrativeUnitMember.ps1 rename to module_legacy/Entra/customizations/Remove-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/customizations/Remove-EntraApplicationKeyCredential.ps1 b/module_legacy/Entra/customizations/Remove-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraApplicationKeyCredential.ps1 rename to module_legacy/Entra/customizations/Remove-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/customizations/Remove-EntraApplicationOwner.ps1 b/module_legacy/Entra/customizations/Remove-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraApplicationOwner.ps1 rename to module_legacy/Entra/customizations/Remove-EntraApplicationOwner.ps1 diff --git a/module/Entra/customizations/Remove-EntraApplicationPasswordCredential.ps1 b/module_legacy/Entra/customizations/Remove-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraApplicationPasswordCredential.ps1 rename to module_legacy/Entra/customizations/Remove-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/customizations/Remove-EntraApplicationVerifiedPublisher.ps1 b/module_legacy/Entra/customizations/Remove-EntraApplicationVerifiedPublisher.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraApplicationVerifiedPublisher.ps1 rename to module_legacy/Entra/customizations/Remove-EntraApplicationVerifiedPublisher.ps1 diff --git a/module/Entra/customizations/Remove-EntraConditionalAccessPolicy.ps1 b/module_legacy/Entra/customizations/Remove-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraConditionalAccessPolicy.ps1 rename to module_legacy/Entra/customizations/Remove-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/customizations/Remove-EntraDeletedApplication.ps1 b/module_legacy/Entra/customizations/Remove-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraDeletedApplication.ps1 rename to module_legacy/Entra/customizations/Remove-EntraDeletedApplication.ps1 diff --git a/module/Entra/customizations/Remove-EntraDeletedDirectoryObject.ps1 b/module_legacy/Entra/customizations/Remove-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraDeletedDirectoryObject.ps1 rename to module_legacy/Entra/customizations/Remove-EntraDeletedDirectoryObject.ps1 diff --git a/module/Entra/customizations/Remove-EntraDeviceRegisteredOwner.ps1 b/module_legacy/Entra/customizations/Remove-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraDeviceRegisteredOwner.ps1 rename to module_legacy/Entra/customizations/Remove-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/customizations/Remove-EntraDeviceRegisteredUser.ps1 b/module_legacy/Entra/customizations/Remove-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraDeviceRegisteredUser.ps1 rename to module_legacy/Entra/customizations/Remove-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/customizations/Remove-EntraDirectoryRoleAssignment.ps1 b/module_legacy/Entra/customizations/Remove-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraDirectoryRoleAssignment.ps1 rename to module_legacy/Entra/customizations/Remove-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/customizations/Remove-EntraDirectoryRoleDefinition.ps1 b/module_legacy/Entra/customizations/Remove-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraDirectoryRoleDefinition.ps1 rename to module_legacy/Entra/customizations/Remove-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/customizations/Remove-EntraDirectoryRoleMember.ps1 b/module_legacy/Entra/customizations/Remove-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraDirectoryRoleMember.ps1 rename to module_legacy/Entra/customizations/Remove-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/customizations/Remove-EntraDomain.ps1 b/module_legacy/Entra/customizations/Remove-EntraDomain.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraDomain.ps1 rename to module_legacy/Entra/customizations/Remove-EntraDomain.ps1 diff --git a/module/Entra/customizations/Remove-EntraGroupAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/Remove-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraGroupAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/Remove-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/Remove-EntraGroupMember.ps1 b/module_legacy/Entra/customizations/Remove-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraGroupMember.ps1 rename to module_legacy/Entra/customizations/Remove-EntraGroupMember.ps1 diff --git a/module/Entra/customizations/Remove-EntraGroupOwner.ps1 b/module_legacy/Entra/customizations/Remove-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraGroupOwner.ps1 rename to module_legacy/Entra/customizations/Remove-EntraGroupOwner.ps1 diff --git a/module/Entra/customizations/Remove-EntraLifecyclePolicyGroup.ps1 b/module_legacy/Entra/customizations/Remove-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraLifecyclePolicyGroup.ps1 rename to module_legacy/Entra/customizations/Remove-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/customizations/Remove-EntraNamedLocationPolicy.ps1 b/module_legacy/Entra/customizations/Remove-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraNamedLocationPolicy.ps1 rename to module_legacy/Entra/customizations/Remove-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/customizations/Remove-EntraPermissionGrantConditionSet.ps1 b/module_legacy/Entra/customizations/Remove-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraPermissionGrantConditionSet.ps1 rename to module_legacy/Entra/customizations/Remove-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/customizations/Remove-EntraPermissionGrantPolicy.ps1 b/module_legacy/Entra/customizations/Remove-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraPermissionGrantPolicy.ps1 rename to module_legacy/Entra/customizations/Remove-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/customizations/Remove-EntraScopedRoleMembership.ps1 b/module_legacy/Entra/customizations/Remove-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraScopedRoleMembership.ps1 rename to module_legacy/Entra/customizations/Remove-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/customizations/Remove-EntraServicePrincipalAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/Remove-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraServicePrincipalAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/Remove-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module_legacy/Entra/customizations/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to module_legacy/Entra/customizations/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/Entra/customizations/Remove-EntraServicePrincipalKeyCredential.ps1 b/module_legacy/Entra/customizations/Remove-EntraServicePrincipalKeyCredential.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraServicePrincipalKeyCredential.ps1 rename to module_legacy/Entra/customizations/Remove-EntraServicePrincipalKeyCredential.ps1 diff --git a/module/Entra/customizations/Remove-EntraServicePrincipalOwner.ps1 b/module_legacy/Entra/customizations/Remove-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraServicePrincipalOwner.ps1 rename to module_legacy/Entra/customizations/Remove-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/customizations/Remove-EntraServicePrincipalPasswordCredential.ps1 b/module_legacy/Entra/customizations/Remove-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraServicePrincipalPasswordCredential.ps1 rename to module_legacy/Entra/customizations/Remove-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/customizations/Remove-EntraTrustedCertificateAuthority.ps1 b/module_legacy/Entra/customizations/Remove-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraTrustedCertificateAuthority.ps1 rename to module_legacy/Entra/customizations/Remove-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/customizations/Remove-EntraUserAppRoleAssignment.ps1 b/module_legacy/Entra/customizations/Remove-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraUserAppRoleAssignment.ps1 rename to module_legacy/Entra/customizations/Remove-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/customizations/Remove-EntraUserManager.ps1 b/module_legacy/Entra/customizations/Remove-EntraUserManager.ps1 similarity index 100% rename from module/Entra/customizations/Remove-EntraUserManager.ps1 rename to module_legacy/Entra/customizations/Remove-EntraUserManager.ps1 diff --git a/module/Entra/customizations/Reset-EntraLifeCycleGroup.ps1 b/module_legacy/Entra/customizations/Reset-EntraLifeCycleGroup.ps1 similarity index 100% rename from module/Entra/customizations/Reset-EntraLifeCycleGroup.ps1 rename to module_legacy/Entra/customizations/Reset-EntraLifeCycleGroup.ps1 diff --git a/module/Entra/customizations/Restore-EntraDeletedApplication.ps1 b/module_legacy/Entra/customizations/Restore-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/customizations/Restore-EntraDeletedApplication.ps1 rename to module_legacy/Entra/customizations/Restore-EntraDeletedApplication.ps1 diff --git a/module/Entra/customizations/Revoke-EntraSignedInUserAllRefreshToken.ps1 b/module_legacy/Entra/customizations/Revoke-EntraSignedInUserAllRefreshToken.ps1 similarity index 100% rename from module/Entra/customizations/Revoke-EntraSignedInUserAllRefreshToken.ps1 rename to module_legacy/Entra/customizations/Revoke-EntraSignedInUserAllRefreshToken.ps1 diff --git a/module/Entra/customizations/Revoke-EntraUserAllRefreshToken.ps1 b/module_legacy/Entra/customizations/Revoke-EntraUserAllRefreshToken.ps1 similarity index 100% rename from module/Entra/customizations/Revoke-EntraUserAllRefreshToken.ps1 rename to module_legacy/Entra/customizations/Revoke-EntraUserAllRefreshToken.ps1 diff --git a/module/Entra/customizations/Select-EntraGroupIdsContactIsMemberOf.ps1 b/module_legacy/Entra/customizations/Select-EntraGroupIdsContactIsMemberOf.ps1 similarity index 100% rename from module/Entra/customizations/Select-EntraGroupIdsContactIsMemberOf.ps1 rename to module_legacy/Entra/customizations/Select-EntraGroupIdsContactIsMemberOf.ps1 diff --git a/module/Entra/customizations/Select-EntraGroupIdsGroupIsMemberOf.ps1 b/module_legacy/Entra/customizations/Select-EntraGroupIdsGroupIsMemberOf.ps1 similarity index 100% rename from module/Entra/customizations/Select-EntraGroupIdsGroupIsMemberOf.ps1 rename to module_legacy/Entra/customizations/Select-EntraGroupIdsGroupIsMemberOf.ps1 diff --git a/module/Entra/customizations/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 b/module_legacy/Entra/customizations/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 similarity index 100% rename from module/Entra/customizations/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 rename to module_legacy/Entra/customizations/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 diff --git a/module/Entra/customizations/Select-EntraGroupIdsUserIsMemberOf.ps1 b/module_legacy/Entra/customizations/Select-EntraGroupIdsUserIsMemberOf.ps1 similarity index 100% rename from module/Entra/customizations/Select-EntraGroupIdsUserIsMemberOf.ps1 rename to module_legacy/Entra/customizations/Select-EntraGroupIdsUserIsMemberOf.ps1 diff --git a/module/Entra/customizations/Set-EntraApplication.ps1 b/module_legacy/Entra/customizations/Set-EntraApplication.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraApplication.ps1 rename to module_legacy/Entra/customizations/Set-EntraApplication.ps1 diff --git a/module/Entra/customizations/Set-EntraApplicationLogo.ps1 b/module_legacy/Entra/customizations/Set-EntraApplicationLogo.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraApplicationLogo.ps1 rename to module_legacy/Entra/customizations/Set-EntraApplicationLogo.ps1 diff --git a/module/Entra/customizations/Set-EntraAuthorizationPolicy.ps1 b/module_legacy/Entra/customizations/Set-EntraAuthorizationPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraAuthorizationPolicy.ps1 rename to module_legacy/Entra/customizations/Set-EntraAuthorizationPolicy.ps1 diff --git a/module/Entra/customizations/Set-EntraConditionalAccessPolicy.ps1 b/module_legacy/Entra/customizations/Set-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraConditionalAccessPolicy.ps1 rename to module_legacy/Entra/customizations/Set-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/customizations/Set-EntraDevice.ps1 b/module_legacy/Entra/customizations/Set-EntraDevice.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraDevice.ps1 rename to module_legacy/Entra/customizations/Set-EntraDevice.ps1 diff --git a/module/Entra/customizations/Set-EntraDirectoryRoleDefinition.ps1 b/module_legacy/Entra/customizations/Set-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraDirectoryRoleDefinition.ps1 rename to module_legacy/Entra/customizations/Set-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/customizations/Set-EntraDomain.ps1 b/module_legacy/Entra/customizations/Set-EntraDomain.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraDomain.ps1 rename to module_legacy/Entra/customizations/Set-EntraDomain.ps1 diff --git a/module/Entra/customizations/Set-EntraIdentityProvider.ps1 b/module_legacy/Entra/customizations/Set-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraIdentityProvider.ps1 rename to module_legacy/Entra/customizations/Set-EntraIdentityProvider.ps1 diff --git a/module/Entra/customizations/Set-EntraNamedLocationPolicy.ps1 b/module_legacy/Entra/customizations/Set-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraNamedLocationPolicy.ps1 rename to module_legacy/Entra/customizations/Set-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/customizations/Set-EntraPermissionGrantConditionSet.ps1 b/module_legacy/Entra/customizations/Set-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraPermissionGrantConditionSet.ps1 rename to module_legacy/Entra/customizations/Set-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/customizations/Set-EntraPermissionGrantPolicy.ps1 b/module_legacy/Entra/customizations/Set-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraPermissionGrantPolicy.ps1 rename to module_legacy/Entra/customizations/Set-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/customizations/Set-EntraTenantDetail.ps1 b/module_legacy/Entra/customizations/Set-EntraTenantDetail.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraTenantDetail.ps1 rename to module_legacy/Entra/customizations/Set-EntraTenantDetail.ps1 diff --git a/module/Entra/customizations/Set-EntraTrustedCertificateAuthority.ps1 b/module_legacy/Entra/customizations/Set-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraTrustedCertificateAuthority.ps1 rename to module_legacy/Entra/customizations/Set-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/customizations/Set-EntraUser.ps1 b/module_legacy/Entra/customizations/Set-EntraUser.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraUser.ps1 rename to module_legacy/Entra/customizations/Set-EntraUser.ps1 diff --git a/module/Entra/customizations/Set-EntraUserExtension.ps1 b/module_legacy/Entra/customizations/Set-EntraUserExtension.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraUserExtension.ps1 rename to module_legacy/Entra/customizations/Set-EntraUserExtension.ps1 diff --git a/module/Entra/customizations/Set-EntraUserLicense.ps1 b/module_legacy/Entra/customizations/Set-EntraUserLicense.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraUserLicense.ps1 rename to module_legacy/Entra/customizations/Set-EntraUserLicense.ps1 diff --git a/module/Entra/customizations/Set-EntraUserManager.ps1 b/module_legacy/Entra/customizations/Set-EntraUserManager.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraUserManager.ps1 rename to module_legacy/Entra/customizations/Set-EntraUserManager.ps1 diff --git a/module/Entra/customizations/Set-EntraUserPassword.ps1 b/module_legacy/Entra/customizations/Set-EntraUserPassword.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraUserPassword.ps1 rename to module_legacy/Entra/customizations/Set-EntraUserPassword.ps1 diff --git a/module/Entra/customizations/Set-EntraUserThumbnailPhoto.ps1 b/module_legacy/Entra/customizations/Set-EntraUserThumbnailPhoto.ps1 similarity index 100% rename from module/Entra/customizations/Set-EntraUserThumbnailPhoto.ps1 rename to module_legacy/Entra/customizations/Set-EntraUserThumbnailPhoto.ps1 diff --git a/module/Entra/customizations/Types.ps1 b/module_legacy/Entra/customizations/Types.ps1 similarity index 100% rename from module/Entra/customizations/Types.ps1 rename to module_legacy/Entra/customizations/Types.ps1 diff --git a/module/Entra/customizations/Update-EntraSignedInUserPassword.ps1 b/module_legacy/Entra/customizations/Update-EntraSignedInUserPassword.ps1 similarity index 100% rename from module/Entra/customizations/Update-EntraSignedInUserPassword.ps1 rename to module_legacy/Entra/customizations/Update-EntraSignedInUserPassword.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Confirm-EntraBetaDomain.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Confirm-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Confirm-EntraBetaDomain.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Confirm-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Connect-Entra.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Connect-Entra.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Connect-Entra.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Connect-Entra.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Disconnect-Entra.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Disconnect-Entra.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Disconnect-Entra.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Disconnect-Entra.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Enable-EntraBetaGlobalSecureAccessTenant.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Enable-EntraBetaGlobalSecureAccessTenant.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Enable-EntraBetaGlobalSecureAccessTenant.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Enable-EntraBetaGlobalSecureAccessTenant.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaAccountSku.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaAccountSku.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaAccountSku.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaAccountSku.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnector.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnector.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnector.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnector.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroup.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncConfiguration.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncConfiguration.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncConfiguration.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncConfiguration.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncFeature.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncFeature.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncFeature.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirSyncFeature.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaDomainFederationSettings.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDomainFederationSettings.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaDomainFederationSettings.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDomainFederationSettings.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaFederationProperty.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaFederationProperty.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaFederationProperty.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaFederationProperty.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaPartnerInformation.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaPartnerInformation.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaPartnerInformation.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaPartnerInformation.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaPasswordPolicy.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaPasswordPolicy.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaPasswordPolicy.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaPasswordPolicy.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplication.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplication.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplication.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplication.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplicationSegment.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationMethod.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationMethod.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationMethod.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationMethod.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationRequirement.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationRequirement.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationRequirement.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaUserAuthenticationRequirement.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Get-EntraContext.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraContext.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Get-EntraContext.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Get-EntraContext.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyApplication.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyApplication.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyApplication.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyConnectorGroup.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/New-EntraBetaCustomHeaders.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaCustomHeaders.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/New-EntraBetaCustomHeaders.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaCustomHeaders.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/New-EntraBetaOauth2PermissionGrant.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaOauth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/New-EntraBetaOauth2PermissionGrant.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaOauth2PermissionGrant.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplication.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplication.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplication.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplication.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplicationSegment.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/New-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/README.md b/module_legacy/EntraBeta/AdditionalFunctions/README.md similarity index 100% rename from module/EntraBeta/AdditionalFunctions/README.md rename to module_legacy/EntraBeta/AdditionalFunctions/README.md diff --git a/module/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Restore-EntraBetaDeletedDirectoryObject.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Restore-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Restore-EntraBetaDeletedDirectoryObject.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Restore-EntraBetaDeletedDirectoryObject.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplication.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplication.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplication.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnector.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnector.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnector.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnector.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnectorGroup.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncConfiguration.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncConfiguration.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncConfiguration.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncConfiguration.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncEnabled.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncEnabled.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncEnabled.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncEnabled.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncFeature.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncFeature.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncFeature.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaDirSyncFeature.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaDomainFederationSettings.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaDomainFederationSettings.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaDomainFederationSettings.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaDomainFederationSettings.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaPartnerInformation.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaPartnerInformation.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaPartnerInformation.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaPartnerInformation.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Set-EntraBetaServicePrincipal.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaServicePrincipal.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Set-EntraBetaServicePrincipal.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Set-EntraBetaServicePrincipal.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Test-EntraScript.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Test-EntraScript.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Test-EntraScript.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Test-EntraScript.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Update-EntraBetaOauth2PermissionGrant.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Update-EntraBetaOauth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Update-EntraBetaOauth2PermissionGrant.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Update-EntraBetaOauth2PermissionGrant.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Update-EntraBetaUserAuthenticationRequirement.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Update-EntraBetaUserAuthenticationRequirement.ps1 similarity index 100% rename from module/EntraBeta/AdditionalFunctions/Update-EntraBetaUserAuthenticationRequirement.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Update-EntraBetaUserAuthenticationRequirement.ps1 diff --git a/module/EntraBeta/AdditionalFunctions/Update-EntraBetaUserFromFederated.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Update-EntraBetaUserFromFederated.ps1 similarity index 96% rename from module/EntraBeta/AdditionalFunctions/Update-EntraBetaUserFromFederated.ps1 rename to module_legacy/EntraBeta/AdditionalFunctions/Update-EntraBetaUserFromFederated.ps1 index 09b03f7d9e..b38a700051 100644 --- a/module/EntraBeta/AdditionalFunctions/Update-EntraBetaUserFromFederated.ps1 +++ b/module_legacy/EntraBeta/AdditionalFunctions/Update-EntraBetaUserFromFederated.ps1 @@ -3,6 +3,7 @@ # ------------------------------------------------------------------------------ function Update-EntraBetaUserFromFederated { + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope="Function", Target="*")] [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $UserPrincipalName, diff --git a/moduleVNext/EntraBeta/config/ModuleMetadata.json b/module_legacy/EntraBeta/config/ModuleMetadata.json similarity index 100% rename from moduleVNext/EntraBeta/config/ModuleMetadata.json rename to module_legacy/EntraBeta/config/ModuleMetadata.json diff --git a/moduleVNext/EntraBeta/config/ModuleSettings.json b/module_legacy/EntraBeta/config/ModuleSettings.json similarity index 100% rename from moduleVNext/EntraBeta/config/ModuleSettings.json rename to module_legacy/EntraBeta/config/ModuleSettings.json diff --git a/moduleVNext/EntraBeta/config/dependencyMapping.json b/module_legacy/EntraBeta/config/dependencyMapping.json similarity index 88% rename from moduleVNext/EntraBeta/config/dependencyMapping.json rename to module_legacy/EntraBeta/config/dependencyMapping.json index 495961f1c6..ada536d812 100644 --- a/moduleVNext/EntraBeta/config/dependencyMapping.json +++ b/module_legacy/EntraBeta/config/dependencyMapping.json @@ -6,5 +6,6 @@ "Microsoft.Graph.Entra.Beta.Governance":["Microsoft.Graph.Beta.Identity.Governance"], "Microsoft.Graph.Entra.Beta.SignIns":["Microsoft.Graph.Beta.Identity.SignIns"], "Microsoft.Graph.Entra.Beta.Applications":["Microsoft.Graph.Beta.Applications"], - "Microsoft.Graph.Entra.Beta.Reports":["Microsoft.Graph.Beta.Reports"] + "Microsoft.Graph.Entra.Beta.Reports":["Microsoft.Graph.Beta.Reports"], + "Microsoft.Graph.Entra.Beta.Invitations":["Microsoft.Graph.Beta.Identity.SignIns"] } \ No newline at end of file diff --git a/module_legacy/EntraBeta/config/moduleMapping.json b/module_legacy/EntraBeta/config/moduleMapping.json new file mode 100644 index 0000000000..9ba9b07aac --- /dev/null +++ b/module_legacy/EntraBeta/config/moduleMapping.json @@ -0,0 +1,16 @@ +{ + "Authentication":"", + "Directory":"", + "Application":"", + "ApplicationProxy":"", + "User":"", + "Group":"", + "ServicePrincipal":"", + "AdministrativeUnit":"", + "Contact":"", + "Domain":"", + "Permission":"", + "Device":"", + "Policy":"", + "CertificateAuthority":"" +} \ No newline at end of file diff --git a/module/EntraBeta/customizations/Add-EntraBetaAdministrativeUnitMember.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaAdministrativeUnitMember.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaAdministrativeUnitMember.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaApplicationOwner.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaApplicationOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaApplicationOwner.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaApplicationOwner.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaApplicationPolicy.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaApplicationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaApplicationPolicy.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredOwner.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredOwner.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredUser.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredUser.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaDeviceRegisteredUser.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaDirectoryRoleMember.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaDirectoryRoleMember.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaDirectoryRoleMember.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaGroupMember.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaGroupMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaGroupMember.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaGroupMember.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaGroupOwner.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaGroupOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaGroupOwner.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaGroupOwner.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaLifecyclePolicyGroup.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaLifecyclePolicyGroup.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaScopedRoleMembership.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaScopedRoleMembership.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaScopedRoleMembership.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaServicePrincipalOwner.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaServicePrincipalOwner.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaServicePrincipalOwner.ps1 diff --git a/module/EntraBeta/customizations/Add-EntraBetaServicePrincipalPolicy.ps1 b/module_legacy/EntraBeta/customizations/Add-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Add-EntraBetaServicePrincipalPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Add-EntraBetaServicePrincipalPolicy.ps1 diff --git a/module/EntraBeta/customizations/Generic.ps1 b/module_legacy/EntraBeta/customizations/Generic.ps1 similarity index 100% rename from module/EntraBeta/customizations/Generic.ps1 rename to module_legacy/EntraBeta/customizations/Generic.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplication.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplication.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplication.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplication.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplicationKeyCredential.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplicationKeyCredential.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationKeyCredential.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplicationLogo.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationLogo.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplicationLogo.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationLogo.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplicationOwner.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplicationOwner.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationOwner.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplicationPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplicationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplicationProxyApplication.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplicationProxyApplication.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationProxyApplication.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplicationSignInDetailedSummary.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationSignInDetailedSummary.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplicationSignInDetailedSummary.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationSignInDetailedSummary.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplicationSignInSummary.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationSignInSummary.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplicationSignInSummary.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationSignInSummary.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaApplicationTemplate.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationTemplate.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaApplicationTemplate.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaApplicationTemplate.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaAttributeSet.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaAttributeSet.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaAttributeSet.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaAttributeSet.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaAuditDirectoryLog.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaAuditDirectoryLog.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaAuditDirectoryLog.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaAuditDirectoryLog.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaAuditSignInLog.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaAuditSignInLog.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaAuditSignInLog.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaAuditSignInLog.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaAuthorizationPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaAuthorizationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaAuthorizationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaAuthorizationPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaConditionalAccessPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaConditionalAccessPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaConditionalAccessPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaContact.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaContact.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaContact.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaContact.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaContactDirectReport.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaContactDirectReport.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaContactDirectReport.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaContactDirectReport.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaContactMembership.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaContactMembership.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaContactMembership.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaContactMembership.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDeletedApplication.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDeletedApplication.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDeletedApplication.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDeletedApplication.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDeletedDirectoryObject.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDeletedDirectoryObject.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDeletedDirectoryObject.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDeletedGroup.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDeletedGroup.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDeletedGroup.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDeletedGroup.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDevice.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDevice.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDevice.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDevice.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredOwner.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredOwner.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredUser.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredUser.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDeviceRegisteredUser.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDirectoryRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDirectoryRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDirectoryRoleDefinition.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDirectoryRoleDefinition.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDirectoryRoleMember.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDirectoryRoleMember.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDirectoryRoleMember.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDirectorySettingTemplate.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDirectorySettingTemplate.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDirectorySettingTemplate.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDirectorySettingTemplate.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDomain.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDomain.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDomainNameReference.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDomainNameReference.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDomainNameReference.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDomainNameReference.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDomainServiceConfigurationRecord.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDomainServiceConfigurationRecord.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDomainServiceConfigurationRecord.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDomainServiceConfigurationRecord.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaDomainVerificationDnsRecord.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaDomainVerificationDnsRecord.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaDomainVerificationDnsRecord.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaDomainVerificationDnsRecord.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaFeatureRolloutPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaFeatureRolloutPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaGroup.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaGroup.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaGroup.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaGroup.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaGroupAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaGroupAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaGroupMember.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaGroupMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaGroupMember.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaGroupMember.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaGroupOwner.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaGroupOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaGroupOwner.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaGroupOwner.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaIdentityProvider.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaIdentityProvider.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaIdentityProvider.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaIdentityProvider.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaLifecyclePolicyGroup.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaLifecyclePolicyGroup.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaNamedLocationPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaNamedLocationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaNamedLocationPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaObjectByObjectId.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaObjectByObjectId.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaObjectByObjectId.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaObjectByObjectId.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaObjectSetting.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaObjectSetting.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaObjectSetting.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaObjectSetting.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaPasswordSingleSignOnCredential.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaPermissionGrantConditionSet.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaPermissionGrantConditionSet.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaPermissionGrantPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaPermissionGrantPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaPermissionGrantPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaPolicyAppliedObject.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaPolicyAppliedObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaPolicyAppliedObject.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaPolicyAppliedObject.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaPrivilegedResource.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaPrivilegedResource.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaPrivilegedResource.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaPrivilegedResource.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleDefinition.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleDefinition.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleDefinition.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleSetting.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleSetting.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleSetting.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaPrivilegedRoleSetting.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaScopedRoleMembership.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaScopedRoleMembership.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaScopedRoleMembership.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipal.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipal.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipal.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipal.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalCreatedObject.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalCreatedObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalCreatedObject.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalCreatedObject.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalKeyCredential.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalKeyCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalKeyCredential.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalKeyCredential.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalMembership.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalMembership.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalMembership.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalMembership.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwnedObject.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwnedObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwnedObject.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwnedObject.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwner.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwner.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalOwner.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalPasswordCredential.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaServicePrincipalPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaServicePrincipalPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaServicePrincipalPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaSubscribedSku.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaSubscribedSku.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaSubscribedSku.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaSubscribedSku.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaTenantDetail.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaTenantDetail.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaTenantDetail.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaTenantDetail.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaTrustFrameworkPolicy.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaTrustFrameworkPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaTrustedCertificateAuthority.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaTrustedCertificateAuthority.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUser.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUser.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUser.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUser.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserCreatedObject.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserCreatedObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserCreatedObject.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserCreatedObject.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserDirectReport.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserDirectReport.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserDirectReport.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserDirectReport.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserExtension.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserExtension.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserExtension.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserExtension.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserLicenseDetail.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserLicenseDetail.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserLicenseDetail.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserLicenseDetail.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserManager.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserManager.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserManager.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserManager.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserMembership.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserMembership.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserMembership.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserMembership.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserOAuth2PermissionGrant.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserOAuth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserOAuth2PermissionGrant.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserOAuth2PermissionGrant.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserOwnedDevice.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserOwnedDevice.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserOwnedDevice.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserOwnedDevice.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserOwnedObject.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserOwnedObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserOwnedObject.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserOwnedObject.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserRegisteredDevice.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserRegisteredDevice.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserRegisteredDevice.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserRegisteredDevice.ps1 diff --git a/module/EntraBeta/customizations/Get-EntraBetaUserThumbnailPhoto.ps1 b/module_legacy/EntraBeta/customizations/Get-EntraBetaUserThumbnailPhoto.ps1 similarity index 100% rename from module/EntraBeta/customizations/Get-EntraBetaUserThumbnailPhoto.ps1 rename to module_legacy/EntraBeta/customizations/Get-EntraBetaUserThumbnailPhoto.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaAdministrativeUnit.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaAdministrativeUnit.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaAdministrativeUnit.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaAdministrativeUnitMember.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaAdministrativeUnitMember.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaAdministrativeUnitMember.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaApplication.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaApplication.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaApplication.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaApplication.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaApplicationExtensionProperty.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaApplicationExtensionProperty.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaApplicationExtensionProperty.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaApplicationExtensionProperty.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaApplicationFromApplicationTemplate.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaApplicationFromApplicationTemplate.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaApplicationFromApplicationTemplate.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaApplicationFromApplicationTemplate.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaApplicationKeyCredential.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaApplicationKeyCredential.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaApplicationKeyCredential.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaApplicationPassword.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaApplicationPassword.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaApplicationPassword.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaApplicationPassword.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaApplicationPasswordCredential.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaApplicationPasswordCredential.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaApplicationPasswordCredential.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaAttributeSet.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaAttributeSet.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaAttributeSet.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaAttributeSet.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaConditionalAccessPolicy.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaConditionalAccessPolicy.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaConditionalAccessPolicy.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaDirectoryRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaDirectoryRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaDirectoryRoleDefinition.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaDirectoryRoleDefinition.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaDirectorySetting.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaDirectorySetting.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaDirectorySetting.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaDirectorySetting.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaDomain.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaDomain.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaFeatureRolloutPolicy.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaFeatureRolloutPolicy.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaGroupAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaGroupAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaIdentityProvider.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaIdentityProvider.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaIdentityProvider.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaIdentityProvider.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaInvitation.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaInvitation.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaInvitation.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaInvitation.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaNamedLocationPolicy.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaNamedLocationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaNamedLocationPolicy.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaObjectSetting.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaObjectSetting.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaObjectSetting.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaObjectSetting.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaPasswordSingleSignOnCredential.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaPermissionGrantConditionSet.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaPermissionGrantConditionSet.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaPermissionGrantPolicy.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaPermissionGrantPolicy.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaPermissionGrantPolicy.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaPolicy.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaPolicy.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaPolicy.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaServicePrincipal.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaServicePrincipal.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaServicePrincipal.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaServicePrincipal.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaServicePrincipalPasswordCredential.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaTrustFrameworkPolicy.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaTrustFrameworkPolicy.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaTrustedCertificateAuthority.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaTrustedCertificateAuthority.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaUser.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaUser.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaUser.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaUser.ps1 diff --git a/module/EntraBeta/customizations/New-EntraBetaUserAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/New-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/New-EntraBetaUserAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/New-EntraBetaUserAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaAdministrativeUnitMember.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaAdministrativeUnitMember.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaAdministrativeUnitMember.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaApplicationKeyCredential.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaApplicationKeyCredential.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationKeyCredential.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaApplicationOwner.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaApplicationOwner.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationOwner.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaApplicationPasswordCredential.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaApplicationPasswordCredential.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationPasswordCredential.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaApplicationPolicy.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaApplicationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationPolicy.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaApplicationProxyApplication.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaApplicationProxyApplication.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationProxyApplication.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaApplicationVerifiedPublisher.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationVerifiedPublisher.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaApplicationVerifiedPublisher.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaApplicationVerifiedPublisher.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaConditionalAccessPolicy.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaConditionalAccessPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaConditionalAccessPolicy.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaDeletedApplication.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaDeletedApplication.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaDeletedApplication.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaDeletedApplication.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaDeletedDirectoryObject.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaDeletedDirectoryObject.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaDeletedDirectoryObject.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredOwner.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredOwner.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredUser.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredUser.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaDeviceRegisteredUser.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleDefinition.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleDefinition.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleMember.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleMember.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaDirectoryRoleMember.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaDomain.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaDomain.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicy.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaGroupAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaGroupAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaGroupMember.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaGroupMember.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaGroupMember.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaGroupMember.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaGroupOwner.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaGroupOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaGroupOwner.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaGroupOwner.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaLifecyclePolicyGroup.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaLifecyclePolicyGroup.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaNamedLocationPolicy.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaNamedLocationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaNamedLocationPolicy.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaObjectSetting.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaObjectSetting.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaObjectSetting.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaObjectSetting.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaPermissionGrantConditionSet.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaPermissionGrantConditionSet.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaPermissionGrantPolicy.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaPermissionGrantPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaPermissionGrantPolicy.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaPolicy.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaPolicy.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaScopedRoleMembership.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaScopedRoleMembership.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaScopedRoleMembership.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalOwner.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalOwner.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalOwner.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPolicy.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaServicePrincipalPolicy.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaTrustedCertificateAuthority.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaTrustedCertificateAuthority.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaUserAppRoleAssignment.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaUserAppRoleAssignment.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaUserAppRoleAssignment.ps1 diff --git a/module/EntraBeta/customizations/Remove-EntraBetaUserManager.ps1 b/module_legacy/EntraBeta/customizations/Remove-EntraBetaUserManager.ps1 similarity index 100% rename from module/EntraBeta/customizations/Remove-EntraBetaUserManager.ps1 rename to module_legacy/EntraBeta/customizations/Remove-EntraBetaUserManager.ps1 diff --git a/module/EntraBeta/customizations/Reset-EntraBetaLifeCycleGroup.ps1 b/module_legacy/EntraBeta/customizations/Reset-EntraBetaLifeCycleGroup.ps1 similarity index 100% rename from module/EntraBeta/customizations/Reset-EntraBetaLifeCycleGroup.ps1 rename to module_legacy/EntraBeta/customizations/Reset-EntraBetaLifeCycleGroup.ps1 diff --git a/module/EntraBeta/customizations/Restore-EntraBetaDeletedApplication.ps1 b/module_legacy/EntraBeta/customizations/Restore-EntraBetaDeletedApplication.ps1 similarity index 100% rename from module/EntraBeta/customizations/Restore-EntraBetaDeletedApplication.ps1 rename to module_legacy/EntraBeta/customizations/Restore-EntraBetaDeletedApplication.ps1 diff --git a/module/EntraBeta/customizations/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 b/module_legacy/EntraBeta/customizations/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 similarity index 100% rename from module/EntraBeta/customizations/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 rename to module_legacy/EntraBeta/customizations/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 diff --git a/module/EntraBeta/customizations/Revoke-EntraBetaUserAllRefreshToken.ps1 b/module_legacy/EntraBeta/customizations/Revoke-EntraBetaUserAllRefreshToken.ps1 similarity index 100% rename from module/EntraBeta/customizations/Revoke-EntraBetaUserAllRefreshToken.ps1 rename to module_legacy/EntraBeta/customizations/Revoke-EntraBetaUserAllRefreshToken.ps1 diff --git a/module/EntraBeta/customizations/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 b/module_legacy/EntraBeta/customizations/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 similarity index 100% rename from module/EntraBeta/customizations/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 rename to module_legacy/EntraBeta/customizations/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 diff --git a/module/EntraBeta/customizations/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 b/module_legacy/EntraBeta/customizations/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 similarity index 100% rename from module/EntraBeta/customizations/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 rename to module_legacy/EntraBeta/customizations/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 diff --git a/module/EntraBeta/customizations/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 b/module_legacy/EntraBeta/customizations/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 similarity index 100% rename from module/EntraBeta/customizations/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 rename to module_legacy/EntraBeta/customizations/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 diff --git a/module/EntraBeta/customizations/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 b/module_legacy/EntraBeta/customizations/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 similarity index 100% rename from module/EntraBeta/customizations/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 rename to module_legacy/EntraBeta/customizations/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaAdministrativeUnit.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaAdministrativeUnit.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaAdministrativeUnit.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaApplication.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaApplication.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaApplication.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaApplication.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaApplicationLogo.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaApplicationLogo.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaApplicationLogo.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaApplicationLogo.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaAttributeSet.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaAttributeSet.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaAttributeSet.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaAttributeSet.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaAuthorizationPolicy.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaAuthorizationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaAuthorizationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaAuthorizationPolicy.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaConditionalAccessPolicy.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaConditionalAccessPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaConditionalAccessPolicy.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaDevice.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaDevice.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaDevice.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaDevice.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaDirectoryRoleDefinition.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaDirectoryRoleDefinition.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaDirectorySetting.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaDirectorySetting.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaDirectorySetting.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaDirectorySetting.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaDomain.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaDomain.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaFeatureRolloutPolicy.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaFeatureRolloutPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaIdentityProvider.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaIdentityProvider.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaIdentityProvider.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaIdentityProvider.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaNamedLocationPolicy.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaNamedLocationPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaNamedLocationPolicy.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaObjectSetting.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaObjectSetting.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaObjectSetting.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaObjectSetting.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaPasswordSingleSignOnCredential.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaPermissionGrantConditionSet.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaPermissionGrantConditionSet.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaPermissionGrantPolicy.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaPermissionGrantPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaPermissionGrantPolicy.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaPolicy.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaPolicy.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaPrivilegedRoleSetting.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaPrivilegedRoleSetting.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaPrivilegedRoleSetting.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaPrivilegedRoleSetting.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaTenantDetail.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaTenantDetail.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaTenantDetail.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaTenantDetail.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaTrustFrameworkPolicy.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaTrustFrameworkPolicy.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaTrustedCertificateAuthority.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaTrustedCertificateAuthority.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaUser.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaUser.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaUser.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaUser.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaUserLicense.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaUserLicense.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaUserLicense.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaUserLicense.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaUserManager.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaUserManager.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaUserManager.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaUserManager.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaUserPassword.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaUserPassword.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaUserPassword.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaUserPassword.ps1 diff --git a/module/EntraBeta/customizations/Set-EntraBetaUserThumbnailPhoto.ps1 b/module_legacy/EntraBeta/customizations/Set-EntraBetaUserThumbnailPhoto.ps1 similarity index 100% rename from module/EntraBeta/customizations/Set-EntraBetaUserThumbnailPhoto.ps1 rename to module_legacy/EntraBeta/customizations/Set-EntraBetaUserThumbnailPhoto.ps1 diff --git a/module/EntraBeta/customizations/Types.ps1 b/module_legacy/EntraBeta/customizations/Types.ps1 similarity index 100% rename from module/EntraBeta/customizations/Types.ps1 rename to module_legacy/EntraBeta/customizations/Types.ps1 diff --git a/module/EntraBeta/customizations/Update-EntraBetaSignedInUserPassword.ps1 b/module_legacy/EntraBeta/customizations/Update-EntraBetaSignedInUserPassword.ps1 similarity index 100% rename from module/EntraBeta/customizations/Update-EntraBetaSignedInUserPassword.ps1 rename to module_legacy/EntraBeta/customizations/Update-EntraBetaSignedInUserPassword.ps1 diff --git a/module/breadcrumb/toc.yml b/module_legacy/breadcrumb/toc.yml similarity index 100% rename from module/breadcrumb/toc.yml rename to module_legacy/breadcrumb/toc.yml diff --git a/module/docfx.json b/module_legacy/docfx.json similarity index 100% rename from module/docfx.json rename to module_legacy/docfx.json diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaAdministrativeUnitMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaAdministrativeUnitMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredUser.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDirectoryRoleMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaDirectoryRoleMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupOwner.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Confirm-EntraBetaDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Confirm-EntraBetaDomain.md diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Connect-Entra.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Connect-Entra.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Authentication/Connect-Entra.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Connect-Entra.md diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Disconnect-Entra.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Disconnect-Entra.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraAzureADAlias.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraAzureADAlias.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraAzureADAlias.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraAzureADAlias.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaDirectoryRole.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaDirectoryRole.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAccountSku.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAccountSku.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnit.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnit.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnitMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnitMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationExtensionProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationExtensionProperty.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationLogo.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationLogo.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnector.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnector.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroupMembers.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroupMembers.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint.md diff --git a/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInDetailedSummary.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInDetailedSummary.md diff --git a/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInSummary.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInSummary.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationTemplate.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationTemplate.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAttributeSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAttributeSet.md diff --git a/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditDirectoryLog.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditDirectoryLog.md diff --git a/moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditSignInLog.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditSignInLog.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuthorizationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuthorizationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaConditionalAccessPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaConditionalAccessPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContact.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContact.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactDirectReport.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactDirectReport.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactManager.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactManager.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactMembership.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContract.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaContract.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinition.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDevice.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredUser.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncConfiguration.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncConfiguration.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncFeature.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncFeature.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRole.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRole.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleTemplate.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleTemplate.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySettingTemplate.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySettingTemplate.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomain.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainFederationSettings.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainFederationSettings.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainNameReference.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainNameReference.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainServiceConfigurationRecord.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainServiceConfigurationRecord.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainVerificationDnsRecord.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainVerificationDnsRecord.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaFeatureRolloutPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaFeatureRolloutPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaFederationProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaFederationProperty.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupPermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupPermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaIdentityProvider.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaIdentityProvider.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaNamedLocationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaNamedLocationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaOAuth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaOAuth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectByObjectId.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectByObjectId.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectSetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectSetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectSetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPartnerInformation.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPartnerInformation.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordSingleSignOnCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordSingleSignOnCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantConditionSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantConditionSet.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicyAppliedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicyAppliedObject.md diff --git a/moduleVNext/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedResource.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedResource.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRole.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRole.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleSetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaScopedRoleMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaScopedRoleMembership.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipal.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipal.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalCreatedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalCreatedObject.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalMembership.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwnedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwnedObject.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaSubscribedSku.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaSubscribedSku.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTenantDetail.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTenantDetail.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustedCertificateAuthority.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustedCertificateAuthority.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserCreatedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserCreatedObject.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserDirectReport.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserDirectReport.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserExtension.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserExtension.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserLicenseDetail.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserLicenseDetail.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserManager.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserManager.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserMembership.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedDevice.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedObject.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserRegisteredDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserRegisteredDevice.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserThumbnailPhoto.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserThumbnailPhoto.md diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Get-EntraContext.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraContext.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Authentication/Get-EntraContext.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraContext.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnit.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnit.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnitMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnitMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationExtensionProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationExtensionProperty.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationFromApplicationTemplate.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationFromApplicationTemplate.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKey.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKey.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPassword.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPassword.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyConnectorGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyConnectorGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAttributeSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaAttributeSet.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaConditionalAccessPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaConditionalAccessPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaCustomSecurityAttributeDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaCustomSecurityAttributeDefinition.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDevice.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectorySetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectorySetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaDomain.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaFeatureRolloutPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaFeatureRolloutPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupLifecyclePolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupLifecyclePolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupLifecyclePolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaIdentityProvider.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaIdentityProvider.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaInvitation.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaInvitation.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaNamedLocationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaNamedLocationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaOauth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaOauth2PermissionGrant.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaObjectSetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaObjectSetting.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaObjectSetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaObjectSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPasswordSingleSignOnCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPasswordSingleSignOnCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantConditionSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantConditionSet.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipal.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipal.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustFrameworkPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustFrameworkPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustedCertificateAuthority.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustedCertificateAuthority.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUser.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUser.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaUser.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaUserAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaUserAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnit.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnit.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnitMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnitMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationExtensionProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationExtensionProperty.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKey.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKey.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPassword.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPassword.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyConnectorGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyConnectorGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationVerifiedPublisher.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationVerifiedPublisher.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaConditionalAccessPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaConditionalAccessPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaContact.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaContact.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedDirectoryObject.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDevice.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredUser.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleMember.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectorySetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectorySetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDomain.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupMember.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupMember.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupMember.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupMember.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupOwner.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaIdentityProvider.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaIdentityProvider.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaNamedLocationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaNamedLocationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaOAuth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaOAuth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaObjectSetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaObjectSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPasswordSingleSignOnCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPasswordSingleSignOnCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantConditionSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantConditionSet.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaScopedRoleMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaScopedRoleMembership.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipal.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipal.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalOwner.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustFrameworkPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustFrameworkPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustedCertificateAuthority.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustedCertificateAuthority.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUser.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserExtension.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserExtension.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserManager.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserManager.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaLifeCycleGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaLifeCycleGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaLifeCycleGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaLifeCycleGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaStrongAuthenticationMethodByUpn.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Reset-EntraBetaStrongAuthenticationMethodByUpn.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedDirectoryObject.md diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaSignedInUserAllRefreshToken.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaSignedInUserAllRefreshToken.md diff --git a/moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaUserAllRefreshToken.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaUserAllRefreshToken.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAdministrativeUnit.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAdministrativeUnit.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationLogo.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationLogo.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplication.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnector.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnector.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnectorGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnectorGroup.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationVerifiedPublisher.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationVerifiedPublisher.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAttributeSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAttributeSet.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAuthorizationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaAuthorizationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaConditionalAccessPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaConditionalAccessPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinition.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDevice.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncConfiguration.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncConfiguration.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncEnabled.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncEnabled.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncFeature.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncFeature.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectoryRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectoryRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectorySetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectorySetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomain.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomainFederationSettings.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomainFederationSettings.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaFeatureRolloutPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaFeatureRolloutPolicy.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroup.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroup.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroup.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroup.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaIdentityProvider.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaIdentityProvider.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaNamedLocationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaNamedLocationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaObjectSetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaObjectSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPartnerInformation.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPartnerInformation.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPasswordSingleSignOnCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPasswordSingleSignOnCredential.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantConditionSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantConditionSet.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest.md diff --git a/moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleSetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleSetting.md diff --git a/moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaServicePrincipal.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaServicePrincipal.md diff --git a/moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTenantDetail.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTenantDetail.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustFrameworkPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustFrameworkPolicy.md diff --git a/moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustedCertificateAuthority.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustedCertificateAuthority.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUser.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserExtension.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserExtension.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserLicense.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserLicense.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserManager.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserManager.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserPassword.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserPassword.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserThumbnailPhoto.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserThumbnailPhoto.md diff --git a/module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Test-EntraScript.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Test-EntraScript.md similarity index 100% rename from module/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Test-EntraScript.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Test-EntraScript.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaSignedInUserPassword.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaSignedInUserPassword.md diff --git a/moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserFromFederated.md similarity index 100% rename from moduleVNext/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md rename to module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserFromFederated.md diff --git a/module/docs/entra-powershell-beta/index.md b/module_legacy/docs/entra-powershell-beta/index.md similarity index 100% rename from module/docs/entra-powershell-beta/index.md rename to module_legacy/docs/entra-powershell-beta/index.md diff --git a/module/docs/entra-powershell-beta/toc.yml b/module_legacy/docs/entra-powershell-beta/toc.yml similarity index 100% rename from module/docs/entra-powershell-beta/toc.yml rename to module_legacy/docs/entra-powershell-beta/toc.yml diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraApplicationOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraApplicationOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraEnvironment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraEnvironment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraGroupMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraGroupMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraGroupOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraGroupOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Confirm-EntraDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Confirm-EntraDomain.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Connect-Entra.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Connect-Entra.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Disconnect-Entra.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Disconnect-Entra.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraDirectoryRole.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Enable-EntraDirectoryRole.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Find-EntraPermission.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Find-EntraPermission.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAccountSku.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAccountSku.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplication.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationLogo.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationLogo.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationTemplate.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraApplicationTemplate.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAttributeSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAttributeSet.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContact.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContact.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactDirectReport.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactDirectReport.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactManager.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactManager.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactMembership.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContext.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContext.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContract.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraContract.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedApplication.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeletedGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDevice.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirSyncFeature.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirSyncFeature.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRole.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRole.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomain.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainNameReference.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainNameReference.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraEnvironment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraEnvironment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraExtensionProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraExtensionProperty.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraFederationProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraFederationProperty.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraIdentityProvider.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraIdentityProvider.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraObjectByObjectId.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraObjectByObjectId.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraObjectSetting.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraObjectSetting.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPartnerInformation.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPartnerInformation.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPasswordPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPasswordPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipal.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipal.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraSubscribedSku.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraSubscribedSku.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraTenantDetail.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraTenantDetail.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUser.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUser.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUser.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserCreatedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserCreatedObject.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserDirectReport.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserDirectReport.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserExtension.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserExtension.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserManager.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserManager.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserMembership.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOwnedObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserOwnedObject.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraAdministrativeUnit.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraAdministrativeUnit.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplication.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationKey.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationKey.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationPassword.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationPassword.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraAttributeSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraAttributeSet.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDevice.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraDomain.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraIdentityProvider.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraIdentityProvider.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraInvitation.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraInvitation.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraInvitation.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraInvitation.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipal.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipal.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUser.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUser.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraUser.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplication.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationKey.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationKey.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationPassword.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationPassword.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraContact.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraContact.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeletedApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeletedApplication.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDevice.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraDomain.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupMember.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupMember.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraGroupOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraIdentityProvider.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraIdentityProvider.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipal.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipal.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUser.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserExtension.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserExtension.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserManager.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Remove-EntraUserManager.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Restore-EntraDeletedApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Restore-EntraDeletedApplication.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplication.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplication.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplicationLogo.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplicationLogo.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAttributeSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAttributeSet.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDevice.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDevice.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncFeature.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirSyncFeature.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDomain.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDomain.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraGroup.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraGroup.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraIdentityProvider.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraIdentityProvider.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPartnerInformation.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPartnerInformation.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPolicy.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPolicy.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraServicePrincipal.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraServicePrincipal.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraTenantDetail.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraTenantDetail.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUser.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUser.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUser.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUser.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserExtension.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserExtension.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserLicense.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserLicense.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserManager.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserManager.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserPassword.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserPassword.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto.md diff --git a/module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Test-EntraScript.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Test-EntraScript.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Test-EntraScript.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Test-EntraScript.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword.md diff --git a/moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraUserFromFederated.md similarity index 100% rename from moduleVNext/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md rename to module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraUserFromFederated.md diff --git a/module/docs/entra-powershell-v1.0/index.md b/module_legacy/docs/entra-powershell-v1.0/index.md similarity index 100% rename from module/docs/entra-powershell-v1.0/index.md rename to module_legacy/docs/entra-powershell-v1.0/index.md diff --git a/module/docs/entra-powershell-v1.0/toc.yml b/module_legacy/docs/entra-powershell-v1.0/toc.yml similarity index 100% rename from module/docs/entra-powershell-v1.0/toc.yml rename to module_legacy/docs/entra-powershell-v1.0/toc.yml diff --git a/module/docs/future/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleAssignmentRequest.md b/module_legacy/docs/future/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleAssignmentRequest.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleAssignmentRequest.md rename to module_legacy/docs/future/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleAssignmentRequest.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplication.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplication.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplication.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplication.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplicationConnectorGroup.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplicationConnectorGroup.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplicationConnectorGroup.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyApplicationConnectorGroup.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnector.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnector.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnector.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnector.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroup.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroup.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroup.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroup.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMember.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMember.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMember.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMember.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMembers.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMembers.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMembers.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorGroupMembers.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorMemberOf.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorMemberOf.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorMemberOf.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Get-EntraApplicationProxyConnectorMemberOf.md diff --git a/module/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyApplication.md b/module_legacy/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyApplication.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyApplication.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyApplication.md diff --git a/module/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyConnectorGroup.md b/module_legacy/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyConnectorGroup.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyConnectorGroup.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/New-EntraApplicationProxyConnectorGroup.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplication.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplication.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplication.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplication.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplicationConnectorGroup.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplicationConnectorGroup.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplicationConnectorGroup.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyApplicationConnectorGroup.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyConnectorGroup.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyConnectorGroup.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyConnectorGroup.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Remove-EntraApplicationProxyConnectorGroup.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplication.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplication.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplication.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplication.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationCustomDomainCertificate.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationCustomDomainCertificate.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationCustomDomainCertificate.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationCustomDomainCertificate.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationSingleSignOn.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationSingleSignOn.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationSingleSignOn.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyApplicationSingleSignOn.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnector.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnector.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnector.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnector.md diff --git a/module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnectorGroup.md b/module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnectorGroup.md similarity index 100% rename from module/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnectorGroup.md rename to module_legacy/docs/future/Microsoft.Graph.Entra/Set-EntraApplicationProxyConnectorGroup.md diff --git a/module/mapping/monikerMapping.json b/module_legacy/mapping/monikerMapping.json similarity index 100% rename from module/mapping/monikerMapping.json rename to module_legacy/mapping/monikerMapping.json diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 51a6f86faa..c8de778133 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -22,7 +22,7 @@ Set-StrictMode -Version 5 $this.OutputDirectory = (Join-Path $PSScriptRoot '../bin/') $this.TypeDefsDirectory=(Join-Path $PSScriptRoot "../build/TypeDefs.txt") - $this.BaseDocsPath=(Join-Path $PSScriptRoot '../moduleVNext/docs/') + $this.BaseDocsPath=(Join-Path $PSScriptRoot '../module/docs/') } @@ -125,9 +125,9 @@ Set-StrictMode -Version 5 [void] CreateSubModuleFile([string]$Module, [string]$typedefsFilePath=$this.TypeDefsDirectory) { # Determine the output path based on the module $startDirectory = if ($Module -eq "Entra") { - (Join-Path $PSScriptRoot "..\moduleVNext\Entra\Microsoft.Graph.Entra") + (Join-Path $PSScriptRoot "..\module\Entra\Microsoft.Graph.Entra") } else { - (Join-Path $PSScriptRoot "..\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta") + (Join-Path $PSScriptRoot "..\module\EntraBeta\Microsoft.Graph.Entra.Beta") } Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." @@ -293,9 +293,9 @@ foreach (`$subModule in `$subModules) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - (Join-Path $PSScriptRoot "../moduleVNext/Entra") + (Join-Path $PSScriptRoot "../module/Entra") } else { - (Join-Path $PSScriptRoot "../moduleVNext/EntraBeta") + (Join-Path $PSScriptRoot "../module/EntraBeta") } $moduleName=if($Module -eq 'Entra'){ @@ -390,9 +390,9 @@ $($requiredModulesEntries -join ",`n") [void] CreateModuleManifest($module) { # Update paths specific to this sub-directory $rootPath=if ($Module -eq "Entra") { - (Join-Path $PSScriptRoot "../moduleVNext/Entra") + (Join-Path $PSScriptRoot "../module/Entra") } else { - (Join-Path $PSScriptRoot "../moduleVNext/EntraBeta") + (Join-Path $PSScriptRoot "../module/EntraBeta") } $moduleBasePath =if ($Module -eq "Entra") { (Join-Path $rootPath "/Microsoft.Graph.Entra") diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 4b3d31c1c6..8995fac7a1 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -. ../build/common-functions.ps1 +. (Join-Path $PSScriptRoot "../build/common-functions.ps1") # This class splits the larger Microsoft.Graph.Entra.psm1 or Microsoft.Graph.Entra.Beta.psm1 into separate files and also constructrs the submodule directories class EntraModuleSplitter { [string]$Header @@ -25,17 +25,17 @@ class EntraModuleSplitter { [string] GetModuleFilePath([string]$source) { if ($source -eq 'Entra') { - return "..\bin\Microsoft.Graph.Entra.psm1" + return (Join-Path $PSScriptRoot "..\bin\Microsoft.Graph.Entra.psm1") } else { - return "..\bin\Microsoft.Graph.Entra.Beta.psm1" + return (Join-Path $PSScriptRoot "..\bin\Microsoft.Graph.Entra.Beta.psm1") } } [string] GetOutputDirectory([string]$source) { if ($source -eq 'Entra') { - return "..\moduleVNext\Entra\" + return (Join-Path $PSScriptRoot "..\module\Entra\") } else { - return "..\moduleVNext\EntraBeta\" + return (Join-Path $PSScriptRoot "..\module\EntraBeta\") } } @@ -142,9 +142,9 @@ class EntraModuleSplitter { [void] SplitEntraModule([string]$Module = 'Entra') { $JsonFilePath=if($Module -eq 'Entra'){ - '../moduleVNext/Entra/config/moduleMapping.json' + (Join-Path $PSScriptRoot '../module/Entra/config/moduleMapping.json') }else{ - '../moduleVNext/EntraBeta/config/moduleMapping.json' + (Join-Path $PSScriptRoot '../module/EntraBeta/config/moduleMapping.json') } # Determine file paths and output directories $psm1FilePath = $this.GetModuleFilePath($Module) @@ -157,7 +157,7 @@ class EntraModuleSplitter { $jsonContent = $this.ReadJsonFile($JsonFilePath) $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1FilePath) $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName - Log-Message "ModuleOutputDirectry $moduleOutputDirectory" -Level 'ERROR' + $this.CreateOutputDirectory($moduleOutputDirectory) Log-Message 'PSM1 Path $psm1FilePath' -Level 'WARNING' @@ -256,9 +256,9 @@ class EntraModuleSplitter { [string[]] GetModuleDirectories([string]$Module) { $startDirectory = if ($Module -eq 'EntraBeta') { - "..\moduleVNext\EntraBeta\Microsoft.Graph.Entra.Beta\" + (Join-Path $PSScriptRoot "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\") } else { - "..\moduleVNext\Entra\Microsoft.Graph.Entra\" + (Join-Path $PSScriptRoot "..\module\Entra\Microsoft.Graph.Entra\") } $aliasFileName = if ($Module -eq 'EntraBeta') { diff --git a/testVNext/Common-Functions.ps1 b/test/Common-Functions.ps1 similarity index 100% rename from testVNext/Common-Functions.ps1 rename to test/Common-Functions.ps1 diff --git a/testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 b/test/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 rename to test/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 diff --git a/testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 rename to test/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 diff --git a/testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 b/test/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 rename to test/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 b/test/Entra/Applications/Get-EntraApplication.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraApplication.Tests.ps1 rename to test/Entra/Applications/Get-EntraApplication.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 rename to test/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 rename to test/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 rename to test/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 rename to test/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 rename to test/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 rename to test/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 rename to test/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 b/test/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 rename to test/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 diff --git a/testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 rename to test/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 diff --git a/testVNext/Entra/Applications/Invalid.Tests.ps1 b/test/Entra/Applications/Invalid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Invalid.Tests.ps1 rename to test/Entra/Applications/Invalid.Tests.ps1 diff --git a/testVNext/Entra/Applications/Module.Tests.ps1 b/test/Entra/Applications/Module.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Module.Tests.ps1 rename to test/Entra/Applications/Module.Tests.ps1 diff --git a/testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 b/test/Entra/Applications/New-EntraApplication.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/New-EntraApplication.Tests.ps1 rename to test/Entra/Applications/New-EntraApplication.Tests.ps1 diff --git a/testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 b/test/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 rename to test/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 diff --git a/testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 b/test/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 rename to test/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 diff --git a/testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 b/test/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 rename to test/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 diff --git a/testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 b/test/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 rename to test/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 b/test/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 rename to test/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 rename to test/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 rename to test/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplication.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraApplication.Tests.ps1 rename to test/Entra/Applications/Remove-EntraApplication.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 rename to test/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 rename to test/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 rename to test/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 rename to test/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 b/test/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 rename to test/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 b/test/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 rename to test/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 rename to test/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 rename to test/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 rename to test/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 rename to test/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 diff --git a/testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 rename to test/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 diff --git a/testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 b/test/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 rename to test/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 diff --git a/testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 b/test/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 rename to test/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 diff --git a/testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 b/test/Entra/Applications/Set-EntraApplication.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Set-EntraApplication.Tests.ps1 rename to test/Entra/Applications/Set-EntraApplication.Tests.ps1 diff --git a/testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 b/test/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 rename to test/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 diff --git a/testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 b/test/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 rename to test/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 diff --git a/testVNext/Entra/Applications/Valid.Tests.ps1 b/test/Entra/Applications/Valid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Applications/Valid.Tests.ps1 rename to test/Entra/Applications/Valid.Tests.ps1 diff --git a/testVNext/Entra/Authentication/Connect-Entra.Tests.ps1 b/test/Entra/Authentication/Connect-Entra.Tests.ps1 similarity index 100% rename from testVNext/Entra/Authentication/Connect-Entra.Tests.ps1 rename to test/Entra/Authentication/Connect-Entra.Tests.ps1 diff --git a/testVNext/Entra/Authentication/Disconnect-Entra.Tests.ps1 b/test/Entra/Authentication/Disconnect-Entra.Tests.ps1 similarity index 100% rename from testVNext/Entra/Authentication/Disconnect-Entra.Tests.ps1 rename to test/Entra/Authentication/Disconnect-Entra.Tests.ps1 diff --git a/testVNext/Entra/Authentication/Invalid.Tests.ps1 b/test/Entra/Authentication/Invalid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Authentication/Invalid.Tests.ps1 rename to test/Entra/Authentication/Invalid.Tests.ps1 diff --git a/testVNext/Entra/Authentication/Module.Tests.ps1 b/test/Entra/Authentication/Module.Tests.ps1 similarity index 100% rename from testVNext/Entra/Authentication/Module.Tests.ps1 rename to test/Entra/Authentication/Module.Tests.ps1 diff --git a/testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 b/test/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 similarity index 100% rename from testVNext/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 rename to test/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 diff --git a/testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 b/test/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 similarity index 100% rename from testVNext/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 rename to test/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 diff --git a/testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 b/test/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 similarity index 100% rename from testVNext/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 rename to test/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 diff --git a/testVNext/Entra/Authentication/Valid.Tests.ps1 b/test/Entra/Authentication/Valid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Authentication/Valid.Tests.ps1 rename to test/Entra/Authentication/Valid.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 rename to test/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 rename to test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 rename to test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 rename to test/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 rename to test/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 b/test/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 rename to test/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 rename to test/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 b/test/Entra/DirectoryManagement/Invalid.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Invalid.Tests.ps1 rename to test/Entra/DirectoryManagement/Invalid.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Module.Tests.ps1 b/test/Entra/DirectoryManagement/Module.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Module.Tests.ps1 rename to test/Entra/DirectoryManagement/Module.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 b/test/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 rename to test/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 b/test/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 rename to test/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 rename to test/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 b/test/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 rename to test/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 rename to test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 rename to test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 rename to test/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 rename to test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 rename to test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 rename to test/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 rename to test/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 rename to test/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 b/test/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 rename to test/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 rename to test/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 diff --git a/testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 b/test/Entra/DirectoryManagement/Valid.Tests.ps1 similarity index 100% rename from testVNext/Entra/DirectoryManagement/Valid.Tests.ps1 rename to test/Entra/DirectoryManagement/Valid.Tests.ps1 diff --git a/testVNext/Entra/Entra.Tests.ps1 b/test/Entra/Entra.Tests.ps1 similarity index 92% rename from testVNext/Entra/Entra.Tests.ps1 rename to test/Entra/Entra.Tests.ps1 index db2f146455..6a50d48cd7 100644 --- a/testVNext/Entra/Entra.Tests.ps1 +++ b/test/Entra/Entra.Tests.ps1 @@ -30,9 +30,9 @@ if($null -eq (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ Import-Module Pester #$psmPath = (Get-Module Microsoft.Graph.Entra.Applications).Path -$ps1FilesPath = join-path $psscriptroot "..\..\moduleVNext\Entra\Microsoft.Graph.Entra" +$ps1FilesPath = join-path $psscriptroot "..\..\module\Entra\Microsoft.Graph.Entra" $testReportPath = join-path $psscriptroot "..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\testVNext\Entra\*\*.Tests.ps1" +$mockScriptsPath = join-path $psscriptroot "..\..\test\Entra\*\*.Tests.ps1" $testOutputFile = "$testReportPath\TestResults.xml" if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} diff --git a/test/module/Entra/EntraCmdletsMap.ps1 b/test/Entra/EntraCmdletsMap.ps1 similarity index 100% rename from test/module/Entra/EntraCmdletsMap.ps1 rename to test/Entra/EntraCmdletsMap.ps1 diff --git a/testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 b/test/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 rename to test/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 b/test/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 rename to test/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/testVNext/Entra/Governance/Invalid.Tests.ps1 b/test/Entra/Governance/Invalid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/Invalid.Tests.ps1 rename to test/Entra/Governance/Invalid.Tests.ps1 diff --git a/testVNext/Entra/Governance/Module.Tests.ps1 b/test/Entra/Governance/Module.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/Module.Tests.ps1 rename to test/Entra/Governance/Module.Tests.ps1 diff --git a/testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 b/test/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 rename to test/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 b/test/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 rename to test/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 b/test/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 rename to test/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 b/test/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 rename to test/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 b/test/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 rename to test/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/testVNext/Entra/Governance/Valid.Tests.ps1 b/test/Entra/Governance/Valid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Governance/Valid.Tests.ps1 rename to test/Entra/Governance/Valid.Tests.ps1 diff --git a/testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 b/test/Entra/Groups/Add-EntraGroupMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Add-EntraGroupMember.Tests.ps1 rename to test/Entra/Groups/Add-EntraGroupMember.Tests.ps1 diff --git a/testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 b/test/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 rename to test/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 diff --git a/testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 b/test/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 rename to test/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 b/test/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 rename to test/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 b/test/Entra/Groups/Get-EntraGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Get-EntraGroup.Tests.ps1 rename to test/Entra/Groups/Get-EntraGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 b/test/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 rename to test/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 b/test/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 rename to test/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 diff --git a/testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 b/test/Entra/Groups/Get-EntraGroupMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Get-EntraGroupMember.Tests.ps1 rename to test/Entra/Groups/Get-EntraGroupMember.Tests.ps1 diff --git a/testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 b/test/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 rename to test/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 diff --git a/testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 b/test/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 rename to test/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 b/test/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 rename to test/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 diff --git a/testVNext/Entra/Groups/Invalid.Tests.ps1 b/test/Entra/Groups/Invalid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Invalid.Tests.ps1 rename to test/Entra/Groups/Invalid.Tests.ps1 diff --git a/testVNext/Entra/Groups/Module.Tests.ps1 b/test/Entra/Groups/Module.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Module.Tests.ps1 rename to test/Entra/Groups/Module.Tests.ps1 diff --git a/testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 b/test/Entra/Groups/New-EntraGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/New-EntraGroup.Tests.ps1 rename to test/Entra/Groups/New-EntraGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 b/test/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 rename to test/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 b/test/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 rename to test/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 diff --git a/testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Remove-EntraGroup.Tests.ps1 rename to test/Entra/Groups/Remove-EntraGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 rename to test/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 rename to test/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 diff --git a/testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 rename to test/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 diff --git a/testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 rename to test/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 diff --git a/testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 b/test/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 rename to test/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 b/test/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 rename to test/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 b/test/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 rename to test/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 b/test/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 rename to test/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 diff --git a/testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 b/test/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 rename to test/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 diff --git a/testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 b/test/Entra/Groups/Set-EntraGroup.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Set-EntraGroup.Tests.ps1 rename to test/Entra/Groups/Set-EntraGroup.Tests.ps1 diff --git a/testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 b/test/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 rename to test/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 diff --git a/testVNext/Entra/Groups/Valid.Tests.ps1 b/test/Entra/Groups/Valid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Groups/Valid.Tests.ps1 rename to test/Entra/Groups/Valid.Tests.ps1 diff --git a/testVNext/Entra/New-EntraInvitation.Tests.ps1 b/test/Entra/New-EntraInvitation.Tests.ps1 similarity index 100% rename from testVNext/Entra/New-EntraInvitation.Tests.ps1 rename to test/Entra/New-EntraInvitation.Tests.ps1 diff --git a/testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 b/test/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 similarity index 100% rename from testVNext/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 rename to test/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 diff --git a/testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 b/test/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 similarity index 100% rename from testVNext/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 rename to test/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 diff --git a/testVNext/Entra/Reports/Invalid.Tests.ps1 b/test/Entra/Reports/Invalid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Reports/Invalid.Tests.ps1 rename to test/Entra/Reports/Invalid.Tests.ps1 diff --git a/testVNext/Entra/Reports/Module.Tests.ps1 b/test/Entra/Reports/Module.Tests.ps1 similarity index 100% rename from testVNext/Entra/Reports/Module.Tests.ps1 rename to test/Entra/Reports/Module.Tests.ps1 diff --git a/testVNext/Entra/Reports/Valid.Tests.ps1 b/test/Entra/Reports/Valid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Reports/Valid.Tests.ps1 rename to test/Entra/Reports/Valid.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 rename to test/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 rename to test/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 rename to test/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 b/test/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 rename to test/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 b/test/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 rename to test/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 b/test/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 rename to test/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 rename to test/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraPolicy.Tests.ps1 rename to test/Entra/SignIns/Get-EntraPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 b/test/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 rename to test/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Invalid.Tests.ps1 b/test/Entra/SignIns/Invalid.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Invalid.Tests.ps1 rename to test/Entra/SignIns/Invalid.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Module.Tests.ps1 b/test/Entra/SignIns/Module.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Module.Tests.ps1 rename to test/Entra/SignIns/Module.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 rename to test/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 rename to test/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 b/test/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 rename to test/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 rename to test/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 b/test/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 rename to test/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 b/test/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 rename to test/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 rename to test/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraPolicy.Tests.ps1 rename to test/Entra/SignIns/New-EntraPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 b/test/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 rename to test/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 b/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 b/test/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 b/test/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 b/test/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 b/test/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 b/test/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 b/test/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 b/test/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 rename to test/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 rename to test/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 rename to test/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 rename to test/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 rename to test/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 b/test/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 rename to test/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 rename to test/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraPolicy.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Set-EntraPolicy.Tests.ps1 rename to test/Entra/SignIns/Set-EntraPolicy.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 b/test/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 rename to test/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 diff --git a/testVNext/Entra/SignIns/Valid.Tests.ps1 b/test/Entra/SignIns/Valid.Tests.ps1 similarity index 100% rename from testVNext/Entra/SignIns/Valid.Tests.ps1 rename to test/Entra/SignIns/Valid.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUser.Tests.ps1 b/test/Entra/Users/Get-EntraUser.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUser.Tests.ps1 rename to test/Entra/Users/Get-EntraUser.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 b/test/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 rename to test/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 b/test/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 rename to test/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 b/test/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 rename to test/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 b/test/Entra/Users/Get-EntraUserExtension.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserExtension.Tests.ps1 rename to test/Entra/Users/Get-EntraUserExtension.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 b/test/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 rename to test/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 b/test/Entra/Users/Get-EntraUserManager.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserManager.Tests.ps1 rename to test/Entra/Users/Get-EntraUserManager.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 b/test/Entra/Users/Get-EntraUserMembership.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserMembership.Tests.ps1 rename to test/Entra/Users/Get-EntraUserMembership.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 b/test/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 rename to test/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 b/test/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 rename to test/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 b/test/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 rename to test/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 diff --git a/testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 b/test/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 rename to test/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 diff --git a/testVNext/Entra/Users/Invalid.Tests.ps1 b/test/Entra/Users/Invalid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Invalid.Tests.ps1 rename to test/Entra/Users/Invalid.Tests.ps1 diff --git a/testVNext/Entra/Users/Module.Tests.ps1 b/test/Entra/Users/Module.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Module.Tests.ps1 rename to test/Entra/Users/Module.Tests.ps1 diff --git a/testVNext/Entra/Users/New-EntraUser.Tests.ps1 b/test/Entra/Users/New-EntraUser.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/New-EntraUser.Tests.ps1 rename to test/Entra/Users/New-EntraUser.Tests.ps1 diff --git a/testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 b/test/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 rename to test/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 b/test/Entra/Users/Remove-EntraUser.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Remove-EntraUser.Tests.ps1 rename to test/Entra/Users/Remove-EntraUser.Tests.ps1 diff --git a/testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 b/test/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 rename to test/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 diff --git a/testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 b/test/Entra/Users/Remove-EntraUserManager.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Remove-EntraUserManager.Tests.ps1 rename to test/Entra/Users/Remove-EntraUserManager.Tests.ps1 diff --git a/testVNext/Entra/Users/Set-EntraUser.Tests.ps1 b/test/Entra/Users/Set-EntraUser.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Set-EntraUser.Tests.ps1 rename to test/Entra/Users/Set-EntraUser.Tests.ps1 diff --git a/testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 b/test/Entra/Users/Set-EntraUserLicense.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Set-EntraUserLicense.Tests.ps1 rename to test/Entra/Users/Set-EntraUserLicense.Tests.ps1 diff --git a/testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 b/test/Entra/Users/Set-EntraUserManager.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Set-EntraUserManager.Tests.ps1 rename to test/Entra/Users/Set-EntraUserManager.Tests.ps1 diff --git a/testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 b/test/Entra/Users/Set-EntraUserPassword.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Set-EntraUserPassword.Tests.ps1 rename to test/Entra/Users/Set-EntraUserPassword.Tests.ps1 diff --git a/testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 b/test/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 rename to test/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 diff --git a/testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 b/test/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 rename to test/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 diff --git a/testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 b/test/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 rename to test/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 diff --git a/testVNext/Entra/Users/Valid.Tests.ps1 b/test/Entra/Users/Valid.Tests.ps1 similarity index 100% rename from testVNext/Entra/Users/Valid.Tests.ps1 rename to test/Entra/Users/Valid.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 b/test/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 rename to test/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 rename to test/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 rename to test/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 rename to test/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 rename to test/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 rename to test/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 rename to test/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 rename to test/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 rename to test/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 b/test/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 rename to test/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 rename to test/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 b/test/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 rename to test/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 b/test/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 rename to test/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 rename to test/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 b/test/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 rename to test/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 b/test/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 rename to test/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 rename to test/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 diff --git a/testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 b/test/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 rename to test/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 diff --git a/testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 b/test/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 rename to test/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 diff --git a/testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 rename to test/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 diff --git a/testVNext/EntraBeta/EntraBeta.Tests.ps1 b/test/EntraBeta/EntraBeta.Tests.ps1 similarity index 92% rename from testVNext/EntraBeta/EntraBeta.Tests.ps1 rename to test/EntraBeta/EntraBeta.Tests.ps1 index ec17be3e87..fc24f16ec5 100644 --- a/testVNext/EntraBeta/EntraBeta.Tests.ps1 +++ b/test/EntraBeta/EntraBeta.Tests.ps1 @@ -30,9 +30,9 @@ if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns)){ Import-Module Pester #$psmPath = (Get-Module Microsoft.Graph.Entra.Beta).Path -$ps1FilesPath = join-path $psscriptroot "..\..\moduleVNext\EntraBeta\Microsoft.Graph.Entra" +$ps1FilesPath = join-path $psscriptroot "..\..\module\EntraBeta\Microsoft.Graph.Entra" $testReportPath = join-path $psscriptroot "..\..\TestReport\EntraBeta" -$mockScriptsPath = join-path $psscriptroot "..\..\testVNext\EntraBeta\*\*.Tests.ps1" +$mockScriptsPath = join-path $psscriptroot "..\..\test\EntraBeta\*\*.Tests.ps1" $testOutputFile = "$testReportPath\TestResults.xml" if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} diff --git a/testVNext/EntraBeta/General.Tests.ps1 b/test/EntraBeta/General.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/General.Tests.ps1 rename to test/EntraBeta/General.Tests.ps1 diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 rename to test/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 rename to test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 diff --git a/testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 rename to test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 diff --git a/testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/test/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 rename to test/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 b/test/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 rename to test/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 b/test/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 rename to test/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 rename to test/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 rename to test/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 rename to test/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 rename to test/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 rename to test/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 rename to test/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 rename to test/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 b/test/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 rename to test/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 rename to test/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 b/test/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 rename to test/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 rename to test/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 rename to test/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 rename to test/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 rename to test/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 rename to test/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 rename to test/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 b/test/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 rename to test/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 rename to test/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 b/test/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 rename to test/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 b/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 rename to test/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 b/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 rename to test/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 b/test/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 rename to test/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 diff --git a/testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 b/test/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 rename to test/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 rename to test/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 rename to test/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 b/test/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 rename to test/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 rename to test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 rename to test/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 rename to test/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 rename to test/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 rename to test/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 rename to test/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 rename to test/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 rename to test/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 rename to test/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 b/test/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 rename to test/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 b/test/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 rename to test/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 b/test/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 rename to test/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 b/test/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 rename to test/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 b/test/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 rename to test/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 b/test/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 rename to test/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 diff --git a/testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 b/test/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 similarity index 100% rename from testVNext/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 rename to test/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 diff --git a/test/Customizations.Test.ps1 b/test_legacy/Customizations.Test.ps1 similarity index 100% rename from test/Customizations.Test.ps1 rename to test_legacy/Customizations.Test.ps1 diff --git a/test/module/Common-Functions.ps1 b/test_legacy/module/Common-Functions.ps1 similarity index 100% rename from test/module/Common-Functions.ps1 rename to test_legacy/module/Common-Functions.ps1 diff --git a/test/module/Entra/Add-EntraAdministrativeUnitMember.Tests.ps1 b/test_legacy/module/Entra/Add-EntraAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraAdministrativeUnitMember.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraAdministrativeUnitMember.Tests.ps1 diff --git a/test/module/Entra/Add-EntraApplicationOwner.Tests.ps1 b/test_legacy/module/Entra/Add-EntraApplicationOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraApplicationOwner.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraApplicationOwner.Tests.ps1 diff --git a/test/module/Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test_legacy/module/Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/test/module/Entra/Add-EntraDeviceRegisteredOwner.Tests.ps1 b/test_legacy/module/Entra/Add-EntraDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraDeviceRegisteredOwner.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraDeviceRegisteredOwner.Tests.ps1 diff --git a/test/module/Entra/Add-EntraDeviceRegisteredUser.Tests.ps1 b/test_legacy/module/Entra/Add-EntraDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraDeviceRegisteredUser.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraDeviceRegisteredUser.Tests.ps1 diff --git a/test/module/Entra/Add-EntraDirectoryRoleMember.Tests.ps1 b/test_legacy/module/Entra/Add-EntraDirectoryRoleMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraDirectoryRoleMember.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraDirectoryRoleMember.Tests.ps1 diff --git a/test/module/Entra/Add-EntraGroupMember.Tests.ps1 b/test_legacy/module/Entra/Add-EntraGroupMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraGroupMember.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraGroupMember.Tests.ps1 diff --git a/test/module/Entra/Add-EntraGroupOwner.Tests.ps1 b/test_legacy/module/Entra/Add-EntraGroupOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraGroupOwner.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraGroupOwner.Tests.ps1 diff --git a/test/module/Entra/Add-EntraLifecyclePolicyGroup.Tests.ps1 b/test_legacy/module/Entra/Add-EntraLifecyclePolicyGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraLifecyclePolicyGroup.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraLifecyclePolicyGroup.Tests.ps1 diff --git a/test/module/Entra/Add-EntraScopedRoleMembership.Tests.ps1 b/test_legacy/module/Entra/Add-EntraScopedRoleMembership.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraScopedRoleMembership.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraScopedRoleMembership.Tests.ps1 diff --git a/test/module/Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test_legacy/module/Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 diff --git a/test/module/Entra/Add-EntraServicePrincipalOwner.Tests.ps1 b/test_legacy/module/Entra/Add-EntraServicePrincipalOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Add-EntraServicePrincipalOwner.Tests.ps1 rename to test_legacy/module/Entra/Add-EntraServicePrincipalOwner.Tests.ps1 diff --git a/test/module/Entra/AddtionalFunctions.Tests.ps1 b/test_legacy/module/Entra/AddtionalFunctions.Tests.ps1 similarity index 100% rename from test/module/Entra/AddtionalFunctions.Tests.ps1 rename to test_legacy/module/Entra/AddtionalFunctions.Tests.ps1 diff --git a/test/module/Entra/Common-Parameter.Tests.ps1 b/test_legacy/module/Entra/Common-Parameter.Tests.ps1 similarity index 100% rename from test/module/Entra/Common-Parameter.Tests.ps1 rename to test_legacy/module/Entra/Common-Parameter.Tests.ps1 diff --git a/test/module/Entra/Connect-Entra.Tests.ps1 b/test_legacy/module/Entra/Connect-Entra.Tests.ps1 similarity index 100% rename from test/module/Entra/Connect-Entra.Tests.ps1 rename to test_legacy/module/Entra/Connect-Entra.Tests.ps1 diff --git a/test/module/Entra/Customizations.Tests.ps1 b/test_legacy/module/Entra/Customizations.Tests.ps1 similarity index 100% rename from test/module/Entra/Customizations.Tests.ps1 rename to test_legacy/module/Entra/Customizations.Tests.ps1 diff --git a/test/module/Entra/Disconnect-Entra.Tests.ps1 b/test_legacy/module/Entra/Disconnect-Entra.Tests.ps1 similarity index 100% rename from test/module/Entra/Disconnect-Entra.Tests.ps1 rename to test_legacy/module/Entra/Disconnect-Entra.Tests.ps1 diff --git a/test/module/Entra/Enable-EntraDirectoryRole.Tests.ps1 b/test_legacy/module/Entra/Enable-EntraDirectoryRole.Tests.ps1 similarity index 100% rename from test/module/Entra/Enable-EntraDirectoryRole.Tests.ps1 rename to test_legacy/module/Entra/Enable-EntraDirectoryRole.Tests.ps1 diff --git a/test/module/Entra/Entra.Tests.ps1 b/test_legacy/module/Entra/Entra.Tests.ps1 similarity index 93% rename from test/module/Entra/Entra.Tests.ps1 rename to test_legacy/module/Entra/Entra.Tests.ps1 index e6b0c31795..e2b5d9d70a 100644 --- a/test/module/Entra/Entra.Tests.ps1 +++ b/test_legacy/module/Entra/Entra.Tests.ps1 @@ -10,7 +10,7 @@ Import-Module Pester $psmPath = (Get-Module Microsoft.Graph.Entra).Path $testReportPath = join-path $psscriptroot "..\..\..\TestReport\Entra" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\Entra\*.Tests.ps1" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test_legacy\module\Entra\*.Tests.ps1" $testOutputFile = "$testReportPath\TestResults.xml" if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} diff --git a/testVNext/Entra/EntraCmdletsMap.ps1 b/test_legacy/module/Entra/EntraCmdletsMap.ps1 similarity index 100% rename from testVNext/Entra/EntraCmdletsMap.ps1 rename to test_legacy/module/Entra/EntraCmdletsMap.ps1 diff --git a/test/module/Entra/General.Tests.ps1 b/test_legacy/module/Entra/General.Tests.ps1 similarity index 100% rename from test/module/Entra/General.Tests.ps1 rename to test_legacy/module/Entra/General.Tests.ps1 diff --git a/test/module/Entra/Get-EntraAccountSku.Tests.ps1 b/test_legacy/module/Entra/Get-EntraAccountSku.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraAccountSku.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraAccountSku.Tests.ps1 diff --git a/test/module/Entra/Get-EntraAdministrativeUnit.Tests.ps1 b/test_legacy/module/Entra/Get-EntraAdministrativeUnit.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraAdministrativeUnit.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraAdministrativeUnit.Tests.ps1 diff --git a/test/module/Entra/Get-EntraAdministrativeUnitMember.Tests.ps1 b/test_legacy/module/Entra/Get-EntraAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraAdministrativeUnitMember.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraAdministrativeUnitMember.Tests.ps1 diff --git a/test/module/Entra/Get-EntraApplication.Tests.ps1 b/test_legacy/module/Entra/Get-EntraApplication.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraApplication.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraApplication.Tests.ps1 diff --git a/test/module/Entra/Get-EntraApplicationExtensionProperty.Tests.ps1 b/test_legacy/module/Entra/Get-EntraApplicationExtensionProperty.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraApplicationExtensionProperty.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraApplicationExtensionProperty.Tests.ps1 diff --git a/test/module/Entra/Get-EntraApplicationKeyCredential.Tests.ps1 b/test_legacy/module/Entra/Get-EntraApplicationKeyCredential.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraApplicationKeyCredential.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraApplicationKeyCredential.Tests.ps1 diff --git a/test/module/Entra/Get-EntraApplicationLogo.Tests.ps1 b/test_legacy/module/Entra/Get-EntraApplicationLogo.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraApplicationLogo.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraApplicationLogo.Tests.ps1 diff --git a/test/module/Entra/Get-EntraApplicationModule.Tests.ps1 b/test_legacy/module/Entra/Get-EntraApplicationModule.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraApplicationModule.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraApplicationModule.Tests.ps1 diff --git a/test/module/Entra/Get-EntraApplicationOwner.Tests.ps1 b/test_legacy/module/Entra/Get-EntraApplicationOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraApplicationOwner.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraApplicationOwner.Tests.ps1 diff --git a/test/module/Entra/Get-EntraApplicationPasswordCredential.Tests.ps1 b/test_legacy/module/Entra/Get-EntraApplicationPasswordCredential.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraApplicationPasswordCredential.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraApplicationPasswordCredential.Tests.ps1 diff --git a/test/module/Entra/Get-EntraApplicationTemplate.Tests.ps1 b/test_legacy/module/Entra/Get-EntraApplicationTemplate.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraApplicationTemplate.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraApplicationTemplate.Tests.ps1 diff --git a/test/module/Entra/Get-EntraAttributeSet.Tests.ps1 b/test_legacy/module/Entra/Get-EntraAttributeSet.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraAttributeSet.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraAttributeSet.Tests.ps1 diff --git a/test/module/Entra/Get-EntraAuditDirectoryLog.Tests.ps1 b/test_legacy/module/Entra/Get-EntraAuditDirectoryLog.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraAuditDirectoryLog.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraAuditDirectoryLog.Tests.ps1 diff --git a/test/module/Entra/Get-EntraAuditSignInLog.Tests.ps1 b/test_legacy/module/Entra/Get-EntraAuditSignInLog.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraAuditSignInLog.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraAuditSignInLog.Tests.ps1 diff --git a/test/module/Entra/Get-EntraAuthorizationPolicy.Tests.ps1 b/test_legacy/module/Entra/Get-EntraAuthorizationPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraAuthorizationPolicy.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraAuthorizationPolicy.Tests.ps1 diff --git a/test/module/Entra/Get-EntraConditionalAccessPolicy.Tests.ps1 b/test_legacy/module/Entra/Get-EntraConditionalAccessPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraConditionalAccessPolicy.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraConditionalAccessPolicy.Tests.ps1 diff --git a/test/module/Entra/Get-EntraContact.Tests.ps1 b/test_legacy/module/Entra/Get-EntraContact.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraContact.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraContact.Tests.ps1 diff --git a/test/module/Entra/Get-EntraContactMembership.Tests.ps1 b/test_legacy/module/Entra/Get-EntraContactMembership.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraContactMembership.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraContactMembership.Tests.ps1 diff --git a/test/module/Entra/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test_legacy/module/Entra/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/test/module/Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test_legacy/module/Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDeletedApplication.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDeletedApplication.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDeletedApplication.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDeletedApplication.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDeletedDirectoryObject.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDeletedDirectoryObject.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDeletedDirectoryObject.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDeletedDirectoryObject.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDeletedGroup.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDeletedGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDeletedGroup.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDeletedGroup.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDevice.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDevice.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDevice.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDevice.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDeviceRegisteredOwner.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDeviceRegisteredOwner.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDeviceRegisteredOwner.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDeviceRegisteredUser.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDeviceRegisteredUser.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDeviceRegisteredUser.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDirSyncConfiguration.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDirSyncConfiguration.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDirSyncConfiguration.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDirSyncConfiguration.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDirSyncFeatures.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDirSyncFeatures.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDirSyncFeatures.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDirSyncFeatures.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDirectoryRole.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDirectoryRole.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDirectoryRole.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDirectoryRole.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDirectoryRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDirectoryRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDirectoryRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDirectoryRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDirectoryRoleDefinition.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDirectoryRoleDefinition.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDirectoryRoleMember.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDirectoryRoleMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDirectoryRoleMember.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDirectoryRoleMember.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDirectoryRoleTemplate.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDirectoryRoleTemplate.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDirectoryRoleTemplate.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDirectoryRoleTemplate.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDomain.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDomain.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDomain.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDomain.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDomainFederationSettings.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDomainFederationSettings.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDomainFederationSettings.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDomainFederationSettings.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDomainNameReference.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDomainNameReference.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDomainNameReference.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDomainNameReference.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 diff --git a/test/module/Entra/Get-EntraDomainVerificationDnsRecord.Tests.ps1 b/test_legacy/module/Entra/Get-EntraDomainVerificationDnsRecord.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraDomainVerificationDnsRecord.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraDomainVerificationDnsRecord.Tests.ps1 diff --git a/test/module/Entra/Get-EntraFeatureRolloutPolicy.Tests.ps1 b/test_legacy/module/Entra/Get-EntraFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraFeatureRolloutPolicy.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraFeatureRolloutPolicy.Tests.ps1 diff --git a/test/module/Entra/Get-EntraFederationProperty.Tests.ps1 b/test_legacy/module/Entra/Get-EntraFederationProperty.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraFederationProperty.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraFederationProperty.Tests.ps1 diff --git a/test/module/Entra/Get-EntraGroup.Tests.ps1 b/test_legacy/module/Entra/Get-EntraGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraGroup.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraGroup.Tests.ps1 diff --git a/test/module/Entra/Get-EntraGroupAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/Get-EntraGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraGroupAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraGroupAppRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/Get-EntraGroupLifecyclePolicy.Tests.ps1 b/test_legacy/module/Entra/Get-EntraGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraGroupLifecyclePolicy.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraGroupLifecyclePolicy.Tests.ps1 diff --git a/test/module/Entra/Get-EntraGroupMember.Tests.ps1 b/test_legacy/module/Entra/Get-EntraGroupMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraGroupMember.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraGroupMember.Tests.ps1 diff --git a/test/module/Entra/Get-EntraGroupOwner.Tests.ps1 b/test_legacy/module/Entra/Get-EntraGroupOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraGroupOwner.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraGroupOwner.Tests.ps1 diff --git a/test/module/Entra/Get-EntraIdentityProvider.Tests.ps1 b/test_legacy/module/Entra/Get-EntraIdentityProvider.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraIdentityProvider.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraIdentityProvider.Tests.ps1 diff --git a/test/module/Entra/Get-EntraLifecyclePolicyGroup.Tests.ps1 b/test_legacy/module/Entra/Get-EntraLifecyclePolicyGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraLifecyclePolicyGroup.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraLifecyclePolicyGroup.Tests.ps1 diff --git a/test/module/Entra/Get-EntraOAuth2PermissionGrant.Tests.ps1 b/test_legacy/module/Entra/Get-EntraOAuth2PermissionGrant.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraOAuth2PermissionGrant.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraOAuth2PermissionGrant.Tests.ps1 diff --git a/test/module/Entra/Get-EntraObjectByObjectId.Tests.ps1 b/test_legacy/module/Entra/Get-EntraObjectByObjectId.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraObjectByObjectId.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraObjectByObjectId.Tests.ps1 diff --git a/test/module/Entra/Get-EntraObjectSetting.Tests.ps1 b/test_legacy/module/Entra/Get-EntraObjectSetting.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraObjectSetting.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraObjectSetting.Tests.ps1 diff --git a/test/module/Entra/Get-EntraPasswordPolicy.Tests.ps1 b/test_legacy/module/Entra/Get-EntraPasswordPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraPasswordPolicy.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraPasswordPolicy.Tests.ps1 diff --git a/test/module/Entra/Get-EntraPermissionGrantConditionSet.Tests.ps1 b/test_legacy/module/Entra/Get-EntraPermissionGrantConditionSet.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraPermissionGrantConditionSet.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraPermissionGrantConditionSet.Tests.ps1 diff --git a/test/module/Entra/Get-EntraPermissionGrantPolicy.Tests.ps1 b/test_legacy/module/Entra/Get-EntraPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraPermissionGrantPolicy.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraPermissionGrantPolicy.Tests.ps1 diff --git a/test/module/Entra/Get-EntraPolicy.Tests.ps1 b/test_legacy/module/Entra/Get-EntraPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraPolicy.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraPolicy.Tests.ps1 diff --git a/test/module/Entra/Get-EntraScopedRoleMembership.Tests.ps1 b/test_legacy/module/Entra/Get-EntraScopedRoleMembership.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraScopedRoleMembership.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraScopedRoleMembership.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipal.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipal.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipal.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipal.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalKeyCredential.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalKeyCredential.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalKeyCredential.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalKeyCredential.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalMembership.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalMembership.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalMembership.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalMembership.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalOAuth2PermissionGrant.tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalOwnedObject.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalOwnedObject.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalOwnedObject.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalOwnedObject.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalOwner.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalOwner.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalOwner.Tests.ps1 diff --git a/test/module/Entra/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test_legacy/module/Entra/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 diff --git a/test/module/Entra/Get-EntraSubscribedSku.Tests.ps1 b/test_legacy/module/Entra/Get-EntraSubscribedSku.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraSubscribedSku.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraSubscribedSku.Tests.ps1 diff --git a/test/module/Entra/Get-EntraTenantDetail.Tests.ps1 b/test_legacy/module/Entra/Get-EntraTenantDetail.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraTenantDetail.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraTenantDetail.Tests.ps1 diff --git a/test/module/Entra/Get-EntraTrustedCertificateAuthority.Tests.ps1 b/test_legacy/module/Entra/Get-EntraTrustedCertificateAuthority.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraTrustedCertificateAuthority.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraTrustedCertificateAuthority.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUser.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUser.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUser.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUser.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserAppRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserAuthenticationMethod.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserAuthenticationMethod.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserAuthenticationMethod.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserAuthenticationMethod.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserCreatedObject.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserCreatedObject.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserCreatedObject.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserCreatedObject.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserDirectReport.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserDirectReport.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserDirectReport.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserDirectReport.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserExtension.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserExtension.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserExtension.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserExtension.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserLicenseDetail.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserLicenseDetail.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserLicenseDetail.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserLicenseDetail.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserManager.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserManager.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserManager.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserManager.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserMembership.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserMembership.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserMembership.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserMembership.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserOwnedDevice.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserOwnedDevice.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserOwnedDevice.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserOwnedDevice.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserOwnedObject.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserOwnedObject.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserOwnedObject.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserOwnedObject.Tests.ps1 diff --git a/test/module/Entra/Get-EntraUserRegisteredDevice.Tests.ps1 b/test_legacy/module/Entra/Get-EntraUserRegisteredDevice.Tests.ps1 similarity index 100% rename from test/module/Entra/Get-EntraUserRegisteredDevice.Tests.ps1 rename to test_legacy/module/Entra/Get-EntraUserRegisteredDevice.Tests.ps1 diff --git a/test/module/Entra/Invalid.Tests.ps1 b/test_legacy/module/Entra/Invalid.Tests.ps1 similarity index 100% rename from test/module/Entra/Invalid.Tests.ps1 rename to test_legacy/module/Entra/Invalid.Tests.ps1 diff --git a/test/module/Entra/Module.Tests.ps1 b/test_legacy/module/Entra/Module.Tests.ps1 similarity index 100% rename from test/module/Entra/Module.Tests.ps1 rename to test_legacy/module/Entra/Module.Tests.ps1 diff --git a/test/module/Entra/New-EntraAdministrativeUnit.Tests.ps1 b/test_legacy/module/Entra/New-EntraAdministrativeUnit.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraAdministrativeUnit.Tests.ps1 rename to test_legacy/module/Entra/New-EntraAdministrativeUnit.Tests.ps1 diff --git a/test/module/Entra/New-EntraApplication.Tests.ps1 b/test_legacy/module/Entra/New-EntraApplication.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraApplication.Tests.ps1 rename to test_legacy/module/Entra/New-EntraApplication.Tests.ps1 diff --git a/test/module/Entra/New-EntraApplicationExtensionProperty.Tests.ps1 b/test_legacy/module/Entra/New-EntraApplicationExtensionProperty.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraApplicationExtensionProperty.Tests.ps1 rename to test_legacy/module/Entra/New-EntraApplicationExtensionProperty.Tests.ps1 diff --git a/test/module/Entra/New-EntraApplicationFromApplicationTemplate.Tests.ps1 b/test_legacy/module/Entra/New-EntraApplicationFromApplicationTemplate.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraApplicationFromApplicationTemplate.Tests.ps1 rename to test_legacy/module/Entra/New-EntraApplicationFromApplicationTemplate.Tests.ps1 diff --git a/test/module/Entra/New-EntraApplicationPassword.Tests.ps1 b/test_legacy/module/Entra/New-EntraApplicationPassword.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraApplicationPassword.Tests.ps1 rename to test_legacy/module/Entra/New-EntraApplicationPassword.Tests.ps1 diff --git a/test/module/Entra/New-EntraApplicationPasswordCredential.Tests.ps1 b/test_legacy/module/Entra/New-EntraApplicationPasswordCredential.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraApplicationPasswordCredential.Tests.ps1 rename to test_legacy/module/Entra/New-EntraApplicationPasswordCredential.Tests.ps1 diff --git a/test/module/Entra/New-EntraAttributeSet.Tests.ps1 b/test_legacy/module/Entra/New-EntraAttributeSet.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraAttributeSet.Tests.ps1 rename to test_legacy/module/Entra/New-EntraAttributeSet.Tests.ps1 diff --git a/test/module/Entra/New-EntraConditionalAccessPolicy.Tests.ps1 b/test_legacy/module/Entra/New-EntraConditionalAccessPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraConditionalAccessPolicy.Tests.ps1 rename to test_legacy/module/Entra/New-EntraConditionalAccessPolicy.Tests.ps1 diff --git a/test/module/Entra/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test_legacy/module/Entra/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 rename to test_legacy/module/Entra/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/test/module/Entra/New-EntraDirectoryRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/New-EntraDirectoryRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraDirectoryRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/New-EntraDirectoryRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/New-EntraDirectoryRoleDefinition.Tests.ps1 b/test_legacy/module/Entra/New-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraDirectoryRoleDefinition.Tests.ps1 rename to test_legacy/module/Entra/New-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/test/module/Entra/New-EntraDomain.Tests.ps1 b/test_legacy/module/Entra/New-EntraDomain.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraDomain.Tests.ps1 rename to test_legacy/module/Entra/New-EntraDomain.Tests.ps1 diff --git a/test/module/Entra/New-EntraFeatureRolloutPolicy.Tests.ps1 b/test_legacy/module/Entra/New-EntraFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraFeatureRolloutPolicy.Tests.ps1 rename to test_legacy/module/Entra/New-EntraFeatureRolloutPolicy.Tests.ps1 diff --git a/test/module/Entra/New-EntraGroup.Tests.ps1 b/test_legacy/module/Entra/New-EntraGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraGroup.Tests.ps1 rename to test_legacy/module/Entra/New-EntraGroup.Tests.ps1 diff --git a/test/module/Entra/New-EntraGroupAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/New-EntraGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraGroupAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/New-EntraGroupAppRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/New-EntraGroupLifecyclePolicy.Tests.ps1 b/test_legacy/module/Entra/New-EntraGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraGroupLifecyclePolicy.Tests.ps1 rename to test_legacy/module/Entra/New-EntraGroupLifecyclePolicy.Tests.ps1 diff --git a/test/module/Entra/New-EntraIdentityProvider.Tests.ps1 b/test_legacy/module/Entra/New-EntraIdentityProvider.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraIdentityProvider.Tests.ps1 rename to test_legacy/module/Entra/New-EntraIdentityProvider.Tests.ps1 diff --git a/test/module/Entra/New-EntraInvitation.Tests.ps1 b/test_legacy/module/Entra/New-EntraInvitation.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraInvitation.Tests.ps1 rename to test_legacy/module/Entra/New-EntraInvitation.Tests.ps1 diff --git a/test/module/Entra/New-EntraNamedLocationPolicy.Tests.ps1 b/test_legacy/module/Entra/New-EntraNamedLocationPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraNamedLocationPolicy.Tests.ps1 rename to test_legacy/module/Entra/New-EntraNamedLocationPolicy.Tests.ps1 diff --git a/test/module/Entra/New-EntraOauth2PermissionGrant.Tests.ps1 b/test_legacy/module/Entra/New-EntraOauth2PermissionGrant.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraOauth2PermissionGrant.Tests.ps1 rename to test_legacy/module/Entra/New-EntraOauth2PermissionGrant.Tests.ps1 diff --git a/test/module/Entra/New-EntraPermissionGrantConditionSet.Tests.ps1 b/test_legacy/module/Entra/New-EntraPermissionGrantConditionSet.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraPermissionGrantConditionSet.Tests.ps1 rename to test_legacy/module/Entra/New-EntraPermissionGrantConditionSet.Tests.ps1 diff --git a/test/module/Entra/New-EntraPermissionGrantPolicy.Tests.ps1 b/test_legacy/module/Entra/New-EntraPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraPermissionGrantPolicy.Tests.ps1 rename to test_legacy/module/Entra/New-EntraPermissionGrantPolicy.Tests.ps1 diff --git a/test/module/Entra/New-EntraPolicy.Tests.ps1 b/test_legacy/module/Entra/New-EntraPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraPolicy.Tests.ps1 rename to test_legacy/module/Entra/New-EntraPolicy.Tests.ps1 diff --git a/test/module/Entra/New-EntraServicePrincipal.Tests.ps1 b/test_legacy/module/Entra/New-EntraServicePrincipal.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraServicePrincipal.Tests.ps1 rename to test_legacy/module/Entra/New-EntraServicePrincipal.Tests.ps1 diff --git a/test/module/Entra/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/New-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test_legacy/module/Entra/New-EntraServicePrincipalPasswordCredential.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraServicePrincipalPasswordCredential.Tests.ps1 rename to test_legacy/module/Entra/New-EntraServicePrincipalPasswordCredential.Tests.ps1 diff --git a/test/module/Entra/New-EntraTrustedCertificateAuthority.Tests.ps1 b/test_legacy/module/Entra/New-EntraTrustedCertificateAuthority.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraTrustedCertificateAuthority.Tests.ps1 rename to test_legacy/module/Entra/New-EntraTrustedCertificateAuthority.Tests.ps1 diff --git a/test/module/Entra/New-EntraUser.Tests.ps1 b/test_legacy/module/Entra/New-EntraUser.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraUser.Tests.ps1 rename to test_legacy/module/Entra/New-EntraUser.Tests.ps1 diff --git a/test/module/Entra/New-EntraUserAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/New-EntraUserAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/New-EntraUserAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/New-EntraUserAppRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraAdministrativeUnit.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraAdministrativeUnit.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraAdministrativeUnit.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraAdministrativeUnit.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraAdministrativeUnitMember.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraAdministrativeUnitMember.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraAdministrativeUnitMember.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraApplication.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraApplication.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraApplication.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraApplication.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraApplicationExtensionProperty.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraApplicationExtensionProperty.Tests.ps1 similarity index 98% rename from test/module/Entra/Remove-EntraApplicationExtensionProperty.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraApplicationExtensionProperty.Tests.ps1 index 6e6e9e2169..2ff6c55dcb 100644 --- a/test/module/Entra/Remove-EntraApplicationExtensionProperty.Tests.ps1 +++ b/test_legacy/module/Entra/Remove-EntraApplicationExtensionProperty.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ Import-Module Microsoft.Graph.Entra } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {} -ModuleName Microsoft.Graph.Entra } diff --git a/test/module/Entra/Remove-EntraApplicationOwner.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraApplicationOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraApplicationOwner.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraApplicationOwner.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraApplicationPassword.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraApplicationPassword.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraApplicationPassword.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraApplicationPassword.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraApplicationPasswordCredential.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraApplicationPasswordCredential.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraApplicationPasswordCredential.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraApplicationPasswordCredential.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraDeletedApplication.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDeletedApplication.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraDeletedApplication.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDeletedApplication.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraDeletedDirectoryObject.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDeletedDirectoryObject.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraDeletedDirectoryObject.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDeletedDirectoryObject.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraDevice.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDevice.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraDevice.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDevice.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraDeviceRegisteredOwner.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDeviceRegisteredOwner.Tests.ps1 similarity index 98% rename from test/module/Entra/Remove-EntraDeviceRegisteredOwner.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDeviceRegisteredOwner.Tests.ps1 index 3e7a531075..2fe3c1906e 100644 --- a/test/module/Entra/Remove-EntraDeviceRegisteredOwner.Tests.ps1 +++ b/test_legacy/module/Entra/Remove-EntraDeviceRegisteredOwner.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { #Import-Module .\bin\Microsoft.Graph.Entra.psm1 -Force Import-Module Microsoft.Graph.Entra } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra } diff --git a/test/module/Entra/Remove-EntraDeviceRegisteredUser.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDeviceRegisteredUser.Tests.ps1 similarity index 98% rename from test/module/Entra/Remove-EntraDeviceRegisteredUser.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDeviceRegisteredUser.Tests.ps1 index b2f4e8fa4c..f51479316b 100644 --- a/test/module/Entra/Remove-EntraDeviceRegisteredUser.Tests.ps1 +++ b/test_legacy/module/Entra/Remove-EntraDeviceRegisteredUser.Tests.ps1 @@ -6,7 +6,7 @@ BeforeAll { #Import-Module .\bin\Microsoft.Graph.Entra.psm1 -Force Import-Module Microsoft.Graph.Entra } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra } diff --git a/test/module/Entra/Remove-EntraDirectoryRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDirectoryRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraDirectoryRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDirectoryRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraDirectoryRoleDefinition.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraDirectoryRoleDefinition.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraDirectoryRoleMember.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDirectoryRoleMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraDirectoryRoleMember.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDirectoryRoleMember.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraDomain.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraDomain.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraDomain.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraDomain.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraFeatureRolloutPolicy.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraFeatureRolloutPolicy.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraFeatureRolloutPolicy.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraGroup.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraGroup.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraGroup.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraGroupAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraGroupAppRoleAssignment.Tests.ps1 similarity index 98% rename from test/module/Entra/Remove-EntraGroupAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraGroupAppRoleAssignment.Tests.ps1 index ae40a78f57..975098981a 100644 --- a/test/module/Entra/Remove-EntraGroupAppRoleAssignment.Tests.ps1 +++ b/test_legacy/module/Entra/Remove-EntraGroupAppRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ Import-Module Microsoft.Graph.Entra } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra } diff --git a/test/module/Entra/Remove-EntraGroupLifecyclePolicy.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraGroupLifecyclePolicy.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraGroupLifecyclePolicy.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraGroupMember.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraGroupMember.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraGroupMember.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraGroupMember.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraGroupOwner.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraGroupOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraGroupOwner.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraGroupOwner.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraIdentityProvider.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraIdentityProvider.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraIdentityProvider.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraIdentityProvider.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraLifecyclePolicyGroup.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraLifecyclePolicyGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraLifecyclePolicyGroup.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraLifecyclePolicyGroup.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraNamedLocationPolicy.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraNamedLocationPolicy.Tests.ps1 similarity index 97% rename from test/module/Entra/Remove-EntraNamedLocationPolicy.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraNamedLocationPolicy.Tests.ps1 index f4e169c200..5a32484567 100644 --- a/test/module/Entra/Remove-EntraNamedLocationPolicy.Tests.ps1 +++ b/test_legacy/module/Entra/Remove-EntraNamedLocationPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ Import-Module Microsoft.Graph.Entra } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra } diff --git a/test/module/Entra/Remove-EntraOAuth2PermissionGrant.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraOAuth2PermissionGrant.Tests.ps1 similarity index 97% rename from test/module/Entra/Remove-EntraOAuth2PermissionGrant.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraOAuth2PermissionGrant.Tests.ps1 index de2afed6a9..38c1f5a61b 100644 --- a/test/module/Entra/Remove-EntraOAuth2PermissionGrant.Tests.ps1 +++ b/test_legacy/module/Entra/Remove-EntraOAuth2PermissionGrant.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ Import-Module Microsoft.Graph.Entra } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {} -ModuleName Microsoft.Graph.Entra } diff --git a/test/module/Entra/Remove-EntraPermissionGrantConditionSet.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraPermissionGrantConditionSet.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraPermissionGrantConditionSet.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraPermissionGrantConditionSet.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraPermissionGrantPolicy.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraPermissionGrantPolicy.Tests.ps1 similarity index 97% rename from test/module/Entra/Remove-EntraPermissionGrantPolicy.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraPermissionGrantPolicy.Tests.ps1 index 09ea4413ef..2c5b7c0381 100644 --- a/test/module/Entra/Remove-EntraPermissionGrantPolicy.Tests.ps1 +++ b/test_legacy/module/Entra/Remove-EntraPermissionGrantPolicy.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ Import-Module Microsoft.Graph.Entra } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra } diff --git a/test/module/Entra/Remove-EntraPolicy.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraPolicy.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraPolicy.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraScopedRoleMembership.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraScopedRoleMembership.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraScopedRoleMembership.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraScopedRoleMembership.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraServicePrincipal.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraServicePrincipal.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraServicePrincipal.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraServicePrincipal.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraServicePrincipalOwner.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraServicePrincipalOwner.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraServicePrincipalOwner.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraServicePrincipalOwner.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraTrustedCertificateAuthority.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraTrustedCertificateAuthority.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraTrustedCertificateAuthority.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraTrustedCertificateAuthority.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraUser.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraUser.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraUser.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraUser.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraUserAppRoleAssignment.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraUserAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraUserAppRoleAssignment.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraUserAppRoleAssignment.Tests.ps1 diff --git a/test/module/Entra/Remove-EntraUserManager.Tests.ps1 b/test_legacy/module/Entra/Remove-EntraUserManager.Tests.ps1 similarity index 100% rename from test/module/Entra/Remove-EntraUserManager.Tests.ps1 rename to test_legacy/module/Entra/Remove-EntraUserManager.Tests.ps1 diff --git a/test/module/Entra/Reset-EntraLifeCycleGroup.Tests.ps1 b/test_legacy/module/Entra/Reset-EntraLifeCycleGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/Reset-EntraLifeCycleGroup.Tests.ps1 rename to test_legacy/module/Entra/Reset-EntraLifeCycleGroup.Tests.ps1 diff --git a/test/module/Entra/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 b/test_legacy/module/Entra/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 similarity index 100% rename from test/module/Entra/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 rename to test_legacy/module/Entra/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 diff --git a/test/module/Entra/Restore-EntraDeletedApplication.Tests.ps1 b/test_legacy/module/Entra/Restore-EntraDeletedApplication.Tests.ps1 similarity index 100% rename from test/module/Entra/Restore-EntraDeletedApplication.Tests.ps1 rename to test_legacy/module/Entra/Restore-EntraDeletedApplication.Tests.ps1 diff --git a/test/module/Entra/Restore-EntraDeletedDirectoryObject.Tests.ps1 b/test_legacy/module/Entra/Restore-EntraDeletedDirectoryObject.Tests.ps1 similarity index 100% rename from test/module/Entra/Restore-EntraDeletedDirectoryObject.Tests.ps1 rename to test_legacy/module/Entra/Restore-EntraDeletedDirectoryObject.Tests.ps1 diff --git a/test/module/Entra/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 b/test_legacy/module/Entra/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 similarity index 100% rename from test/module/Entra/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 rename to test_legacy/module/Entra/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 diff --git a/test/module/Entra/Revoke-EntraUserAllRefreshToken.Tests.ps1 b/test_legacy/module/Entra/Revoke-EntraUserAllRefreshToken.Tests.ps1 similarity index 100% rename from test/module/Entra/Revoke-EntraUserAllRefreshToken.Tests.ps1 rename to test_legacy/module/Entra/Revoke-EntraUserAllRefreshToken.Tests.ps1 diff --git a/test/module/Entra/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 b/test_legacy/module/Entra/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 similarity index 100% rename from test/module/Entra/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 rename to test_legacy/module/Entra/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 diff --git a/test/module/Entra/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 b/test_legacy/module/Entra/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 similarity index 100% rename from test/module/Entra/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 rename to test_legacy/module/Entra/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 diff --git a/test/module/Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 b/test_legacy/module/Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 similarity index 100% rename from test/module/Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 rename to test_legacy/module/Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 diff --git a/test/module/Entra/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 b/test_legacy/module/Entra/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 similarity index 100% rename from test/module/Entra/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 rename to test_legacy/module/Entra/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 diff --git a/test/module/Entra/Set-EntraAdministrativeUnit.Tests.ps1 b/test_legacy/module/Entra/Set-EntraAdministrativeUnit.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraAdministrativeUnit.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraAdministrativeUnit.Tests.ps1 diff --git a/test/module/Entra/Set-EntraApplication.Tests.ps1 b/test_legacy/module/Entra/Set-EntraApplication.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraApplication.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraApplication.Tests.ps1 diff --git a/test/module/Entra/Set-EntraApplicationLogo.Tests.ps1 b/test_legacy/module/Entra/Set-EntraApplicationLogo.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraApplicationLogo.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraApplicationLogo.Tests.ps1 diff --git a/test/module/Entra/Set-EntraAttributeSet.Tests.ps1 b/test_legacy/module/Entra/Set-EntraAttributeSet.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraAttributeSet.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraAttributeSet.Tests.ps1 diff --git a/test/module/Entra/Set-EntraAuthorizationPolicy.Tests.ps1 b/test_legacy/module/Entra/Set-EntraAuthorizationPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraAuthorizationPolicy.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraAuthorizationPolicy.Tests.ps1 diff --git a/test/module/Entra/Set-EntraConditionalAccessPolicy.Tests.ps1 b/test_legacy/module/Entra/Set-EntraConditionalAccessPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraConditionalAccessPolicy.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraConditionalAccessPolicy.Tests.ps1 diff --git a/test/module/Entra/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test_legacy/module/Entra/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/test/module/Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test_legacy/module/Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/test/module/Entra/Set-EntraDevice.Tests.ps1 b/test_legacy/module/Entra/Set-EntraDevice.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraDevice.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraDevice.Tests.ps1 diff --git a/test/module/Entra/Set-EntraDirSyncConfiguration.Tests.ps1 b/test_legacy/module/Entra/Set-EntraDirSyncConfiguration.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraDirSyncConfiguration.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraDirSyncConfiguration.Tests.ps1 diff --git a/test/module/Entra/Set-EntraDirSyncEnabled.Tests.ps1 b/test_legacy/module/Entra/Set-EntraDirSyncEnabled.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraDirSyncEnabled.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraDirSyncEnabled.Tests.ps1 diff --git a/test/module/Entra/Set-EntraDirSyncFeature.Tests.ps1 b/test_legacy/module/Entra/Set-EntraDirSyncFeature.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraDirSyncFeature.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraDirSyncFeature.Tests.ps1 diff --git a/test/module/Entra/Set-EntraDirectoryRoleDefinition.Tests.ps1 b/test_legacy/module/Entra/Set-EntraDirectoryRoleDefinition.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraDirectoryRoleDefinition.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraDirectoryRoleDefinition.Tests.ps1 diff --git a/test/module/Entra/Set-EntraDomain.Tests.ps1 b/test_legacy/module/Entra/Set-EntraDomain.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraDomain.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraDomain.Tests.ps1 diff --git a/test/module/Entra/Set-EntraDomainFederationSettings.Tests.ps1 b/test_legacy/module/Entra/Set-EntraDomainFederationSettings.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraDomainFederationSettings.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraDomainFederationSettings.Tests.ps1 diff --git a/test/module/Entra/Set-EntraFeatureRolloutPolicy.Tests.ps1 b/test_legacy/module/Entra/Set-EntraFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraFeatureRolloutPolicy.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraFeatureRolloutPolicy.Tests.ps1 diff --git a/test/module/Entra/Set-EntraGroup.Tests.ps1 b/test_legacy/module/Entra/Set-EntraGroup.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraGroup.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraGroup.Tests.ps1 diff --git a/test/module/Entra/Set-EntraGroupLifecyclePolicy.Tests.ps1 b/test_legacy/module/Entra/Set-EntraGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraGroupLifecyclePolicy.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraGroupLifecyclePolicy.Tests.ps1 diff --git a/test/module/Entra/Set-EntraNamedLocationPolicy.Tests.ps1 b/test_legacy/module/Entra/Set-EntraNamedLocationPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraNamedLocationPolicy.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraNamedLocationPolicy.Tests.ps1 diff --git a/test/module/Entra/Set-EntraPartnerInformation.Tests.ps1 b/test_legacy/module/Entra/Set-EntraPartnerInformation.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraPartnerInformation.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraPartnerInformation.Tests.ps1 diff --git a/test/module/Entra/Set-EntraPermissionGrantConditionSet.Tests.ps1 b/test_legacy/module/Entra/Set-EntraPermissionGrantConditionSet.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraPermissionGrantConditionSet.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraPermissionGrantConditionSet.Tests.ps1 diff --git a/test/module/Entra/Set-EntraPermissionGrantPolicy.Tests.ps1 b/test_legacy/module/Entra/Set-EntraPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraPermissionGrantPolicy.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraPermissionGrantPolicy.Tests.ps1 diff --git a/test/module/Entra/Set-EntraPolicy.Tests.ps1 b/test_legacy/module/Entra/Set-EntraPolicy.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraPolicy.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraPolicy.Tests.ps1 diff --git a/test/module/Entra/Set-EntraServicePrincipal.Tests.ps1 b/test_legacy/module/Entra/Set-EntraServicePrincipal.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraServicePrincipal.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraServicePrincipal.Tests.ps1 diff --git a/test/module/Entra/Set-EntraTenantDetail.Tests.ps1 b/test_legacy/module/Entra/Set-EntraTenantDetail.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraTenantDetail.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraTenantDetail.Tests.ps1 diff --git a/test/module/Entra/Set-EntraTrustedCertificateAuthority.Tests.ps1 b/test_legacy/module/Entra/Set-EntraTrustedCertificateAuthority.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraTrustedCertificateAuthority.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraTrustedCertificateAuthority.Tests.ps1 diff --git a/test/module/Entra/Set-EntraUser.Tests.ps1 b/test_legacy/module/Entra/Set-EntraUser.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraUser.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraUser.Tests.ps1 diff --git a/test/module/Entra/Set-EntraUserLicense.Tests.ps1 b/test_legacy/module/Entra/Set-EntraUserLicense.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraUserLicense.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraUserLicense.Tests.ps1 diff --git a/test/module/Entra/Set-EntraUserManager.Tests.ps1 b/test_legacy/module/Entra/Set-EntraUserManager.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraUserManager.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraUserManager.Tests.ps1 diff --git a/test/module/Entra/Set-EntraUserPassword.Tests.ps1 b/test_legacy/module/Entra/Set-EntraUserPassword.Tests.ps1 similarity index 98% rename from test/module/Entra/Set-EntraUserPassword.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraUserPassword.Tests.ps1 index 82c1185d76..13c4054758 100644 --- a/test/module/Entra/Set-EntraUserPassword.Tests.ps1 +++ b/test_legacy/module/Entra/Set-EntraUserPassword.Tests.ps1 @@ -1,6 +1,10 @@ # ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] +param() + BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ Import-Module Microsoft.Graph.Entra diff --git a/test/module/Entra/Set-EntraUserThumbnailPhoto.Tests.ps1 b/test_legacy/module/Entra/Set-EntraUserThumbnailPhoto.Tests.ps1 similarity index 100% rename from test/module/Entra/Set-EntraUserThumbnailPhoto.Tests.ps1 rename to test_legacy/module/Entra/Set-EntraUserThumbnailPhoto.Tests.ps1 diff --git a/test/module/Entra/Update-EntraOauth2PermissionGrant.Tests.ps1 b/test_legacy/module/Entra/Update-EntraOauth2PermissionGrant.Tests.ps1 similarity index 100% rename from test/module/Entra/Update-EntraOauth2PermissionGrant.Tests.ps1 rename to test_legacy/module/Entra/Update-EntraOauth2PermissionGrant.Tests.ps1 diff --git a/test/module/Entra/Update-EntraSignedInUserPassword.Tests.ps1 b/test_legacy/module/Entra/Update-EntraSignedInUserPassword.Tests.ps1 similarity index 96% rename from test/module/Entra/Update-EntraSignedInUserPassword.Tests.ps1 rename to test_legacy/module/Entra/Update-EntraSignedInUserPassword.Tests.ps1 index 51095c4de5..0b35b6ac3b 100644 --- a/test/module/Entra/Update-EntraSignedInUserPassword.Tests.ps1 +++ b/test_legacy/module/Entra/Update-EntraSignedInUserPassword.Tests.ps1 @@ -2,6 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] +param() + BeforeAll{ if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ Import-Module Microsoft.Graph.Entra diff --git a/test/module/Entra/Update-EntraUserFromFederated.Tests.ps1 b/test_legacy/module/Entra/Update-EntraUserFromFederated.Tests.ps1 similarity index 100% rename from test/module/Entra/Update-EntraUserFromFederated.Tests.ps1 rename to test_legacy/module/Entra/Update-EntraUserFromFederated.Tests.ps1 diff --git a/test/module/Entra/Valid.Tests.ps1 b/test_legacy/module/Entra/Valid.Tests.ps1 similarity index 100% rename from test/module/Entra/Valid.Tests.ps1 rename to test_legacy/module/Entra/Valid.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaApplicationPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaApplicationPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaApplicationPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaApplicationPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaGroupMember.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaGroupMember.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaGroupMember.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaGroupMember.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaGroupOwner.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaGroupOwner.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaGroupOwner.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaGroupOwner.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaScopedRoleMembership.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaScopedRoleMembership.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaScopedRoleMembership.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaScopedRoleMembership.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test_legacy/module/EntraBeta/Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test_legacy/module/EntraBeta/Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/test/module/EntraBeta/AddtionalFunctions.Tests.ps1 b/test_legacy/module/EntraBeta/AddtionalFunctions.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/AddtionalFunctions.Tests.ps1 rename to test_legacy/module/EntraBeta/AddtionalFunctions.Tests.ps1 diff --git a/test/module/EntraBeta/Confirm-EntraBetaDomain.Tests.ps1 b/test_legacy/module/EntraBeta/Confirm-EntraBetaDomain.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Confirm-EntraBetaDomain.Tests.ps1 rename to test_legacy/module/EntraBeta/Confirm-EntraBetaDomain.Tests.ps1 diff --git a/test/module/EntraBeta/Customizations.Tests.ps1 b/test_legacy/module/EntraBeta/Customizations.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Customizations.Tests.ps1 rename to test_legacy/module/EntraBeta/Customizations.Tests.ps1 diff --git a/test/module/EntraBeta/EntraBeta.Tests.ps1 b/test_legacy/module/EntraBeta/EntraBeta.Tests.ps1 similarity index 92% rename from test/module/EntraBeta/EntraBeta.Tests.ps1 rename to test_legacy/module/EntraBeta/EntraBeta.Tests.ps1 index 1f1342c757..c01aa088cc 100644 --- a/test/module/EntraBeta/EntraBeta.Tests.ps1 +++ b/test_legacy/module/EntraBeta/EntraBeta.Tests.ps1 @@ -10,7 +10,7 @@ Import-Module Pester $psmPath = (Get-Module Microsoft.Graph.Entra.Beta).Path $testReportPath = join-path $psscriptroot "..\..\..\TestReport\EntraBeta" -$mockScriptsPath = join-path $psscriptroot "..\..\..\test\module\EntraBeta\*.Tests.ps1" +$mockScriptsPath = join-path $psscriptroot "..\..\..\test_legacy\module\EntraBeta\*.Tests.ps1" $testOutputFile = "$testReportPath\TestResults.xml" if (!(test-path -path $testReportPath)) {new-item -path $testReportPath -itemtype directory} diff --git a/test/module/EntraBeta/General.Tests.ps1 b/test_legacy/module/EntraBeta/General.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/General.Tests.ps1 rename to test_legacy/module/EntraBeta/General.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaAccountSku.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaAccountSku.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaAccountSku.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaAccountSku.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaAdministrativeUnit.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaAdministrativeUnit.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaAdministrativeUnit.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaAdministrativeUnit.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaApplication.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaApplication.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaApplication.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaApplication.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaApplicationLogo.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaApplicationLogo.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaApplicationLogo.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaApplicationLogo.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaApplicationPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaApplicationPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaApplicationPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaApplicationPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaApplicationSignInSummary.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaApplicationSignInSummary.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaApplicationSignInSummary.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaApplicationSignInSummary.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaApplicationTemplate.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaApplicationTemplate.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaApplicationTemplate.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaApplicationTemplate.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaAttributeSet.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaAttributeSet.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaAttributeSet.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaAttributeSet.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaAuditDirectoryLog.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaAuditDirectoryLog.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaAuditDirectoryLog.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaAuditDirectoryLog.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaAuditSignInLog.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaAuditSignInLog.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaAuditSignInLog.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaAuditSignInLog.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDeletedGroup.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDeletedGroup.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDeletedGroup.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDeletedGroup.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDevice.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDevice.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDevice.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDevice.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDirSyncConfiguration.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDirSyncConfiguration.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDirSyncConfiguration.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDirSyncConfiguration.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDirSyncFeature.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDirSyncFeature.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDirSyncFeature.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDirSyncFeature.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDirectorySetting.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDirectorySetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDirectorySetting.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDirectorySetting.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaDomainFederationSettings.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaDomainFederationSettings.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaDomainFederationSettings.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaDomainFederationSettings.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaFederationProperty.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaFederationProperty.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaFederationProperty.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaFederationProperty.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaGroup.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaGroup.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaGroup.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaGroup.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaGroupMember.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaGroupMember.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaGroupMember.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaGroupMember.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaGroupOwner.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaGroupOwner.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaGroupOwner.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaGroupOwner.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaObjectSetting.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaObjectSetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaObjectSetting.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaObjectSetting.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaPasswordPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaPasswordPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaPasswordPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaPasswordPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaPolicyAppliedObject.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaPolicyAppliedObject.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaPolicyAppliedObject.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaPolicyAppliedObject.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaPrivilegedResource.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaPrivilegedResource.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaPrivilegedResource.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaPrivilegedResource.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaScopedRoleMembership.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaScopedRoleMembership.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaScopedRoleMembership.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaScopedRoleMembership.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaServicePrincipal.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaServicePrincipal.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaServicePrincipal.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaServicePrincipal.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUser.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUser.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUser.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUser.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUserAuthenticationMethod.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUserAuthenticationMethod.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUserAuthenticationMethod.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUserAuthenticationMethod.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUserAuthenticationRequirement.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUserAuthenticationRequirement.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUserAuthenticationRequirement.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUserAuthenticationRequirement.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUserExtension.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUserExtension.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUserExtension.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUserExtension.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUserLicenseDetail.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUserLicenseDetail.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUserLicenseDetail.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUserLicenseDetail.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUserManager.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUserManager.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUserManager.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUserManager.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUserMembership.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUserMembership.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUserMembership.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUserMembership.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUserOwnedDevice.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUserOwnedDevice.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUserOwnedDevice.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUserOwnedDevice.Tests.ps1 diff --git a/test/module/EntraBeta/Get-EntraBetaUserRegisteredDevice.Tests.ps1 b/test_legacy/module/EntraBeta/Get-EntraBetaUserRegisteredDevice.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Get-EntraBetaUserRegisteredDevice.Tests.ps1 rename to test_legacy/module/EntraBeta/Get-EntraBetaUserRegisteredDevice.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaAdministrativeUnit.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaAdministrativeUnit.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaAdministrativeUnit.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaAdministrativeUnit.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaAdministrativeUnitMember.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaAdministrativeUnitMember.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaApplication.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaApplication.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaApplication.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaApplication.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaAttributeSet.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaAttributeSet.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaAttributeSet.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaAttributeSet.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaDirectorySetting.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaDirectorySetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaDirectorySetting.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaDirectorySetting.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaGroup.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaGroup.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaGroup.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaGroup.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaOauth2PermissionGrant.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaOauth2PermissionGrant.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaOauth2PermissionGrant.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaOauth2PermissionGrant.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaObjectSetting.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaObjectSetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaObjectSetting.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaObjectSetting.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 diff --git a/test/module/EntraBeta/New-EntraBetaUser.Tests.ps1 b/test_legacy/module/EntraBeta/New-EntraBetaUser.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/New-EntraBetaUser.Tests.ps1 rename to test_legacy/module/EntraBeta/New-EntraBetaUser.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaAdministrativeUnit.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaAdministrativeUnit.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaAdministrativeUnit.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaAdministrativeUnit.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaApplication.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaApplication.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaApplication.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaApplication.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaApplicationPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaApplicationPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaApplicationPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaApplicationPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaDevice.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaDevice.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaDevice.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaDevice.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 similarity index 98% rename from test/module/EntraBeta/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 index 86f912b287..adb4445832 100644 --- a/test/module/EntraBeta/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 +++ b/test_legacy/module/EntraBeta/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta } diff --git a/test/module/EntraBeta/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 similarity index 98% rename from test/module/EntraBeta/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 index 3fa83d4e0f..732f52617d 100644 --- a/test/module/EntraBeta/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 +++ b/test_legacy/module/EntraBeta/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta } diff --git a/test/module/EntraBeta/Remove-EntraBetaDirectorySetting.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaDirectorySetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaDirectorySetting.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaDirectorySetting.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaGroup.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaGroup.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaGroup.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaGroup.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 similarity index 98% rename from test/module/EntraBeta/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 index 56e3f79727..dfbf768f05 100644 --- a/test/module/EntraBeta/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 +++ b/test_legacy/module/EntraBeta/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -5,7 +5,7 @@ BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta } - Import-Module .\test\module\Common-Functions.ps1 -Force + Import-Module .\test_legacy\module\Common-Functions.ps1 -Force Mock -CommandName Remove-MgBetaGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta } diff --git a/test/module/EntraBeta/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaGroupMember.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaGroupMember.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaGroupMember.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaGroupMember.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaGroupOwner.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaGroupOwner.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaGroupOwner.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaGroupOwner.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaObjectSetting.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaObjectSetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaObjectSetting.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaObjectSetting.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaScopedRoleMembership.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaScopedRoleMembership.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaScopedRoleMembership.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaScopedRoleMembership.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaUser.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaUser.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaUser.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaUser.Tests.ps1 diff --git a/test/module/EntraBeta/Remove-EntraBetaUserManager.Tests.ps1 b/test_legacy/module/EntraBeta/Remove-EntraBetaUserManager.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Remove-EntraBetaUserManager.Tests.ps1 rename to test_legacy/module/EntraBeta/Remove-EntraBetaUserManager.Tests.ps1 diff --git a/test/module/EntraBeta/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 b/test_legacy/module/EntraBeta/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 rename to test_legacy/module/EntraBeta/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaAdministrativeUnit.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaAdministrativeUnit.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaAdministrativeUnit.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaAdministrativeUnit.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaApplication.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaApplication.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaApplication.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaApplication.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaApplicationLogo.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaApplicationLogo.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaApplicationLogo.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaApplicationLogo.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaAttributeSet.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaAttributeSet.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaAttributeSet.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaAttributeSet.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaDevice.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaDevice.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaDevice.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaDevice.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaDirSyncConfiguration.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaDirSyncConfiguration.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaDirSyncConfiguration.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaDirSyncConfiguration.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaDirSyncEnabled.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaDirSyncEnabled.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaDirSyncEnabled.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaDirSyncEnabled.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaDirSyncFeature.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaDirSyncFeature.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaDirSyncFeature.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaDirSyncFeature.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaDirectorySetting.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaDirectorySetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaDirectorySetting.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaDirectorySetting.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaDomainFederationSettings.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaDomainFederationSettings.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaDomainFederationSettings.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaDomainFederationSettings.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaGroup.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaGroup.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaGroup.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaGroup.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaObjectSetting.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaObjectSetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaObjectSetting.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaObjectSetting.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaPartnerInformation.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaPartnerInformation.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaPartnerInformation.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaPartnerInformation.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaPolicy.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaPolicy.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaPolicy.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaPolicy.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaServicePrincipal.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaServicePrincipal.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaServicePrincipal.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaServicePrincipal.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaUser.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaUser.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaUser.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaUser.Tests.ps1 diff --git a/test/module/EntraBeta/Set-EntraBetaUserManager.Tests.ps1 b/test_legacy/module/EntraBeta/Set-EntraBetaUserManager.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Set-EntraBetaUserManager.Tests.ps1 rename to test_legacy/module/EntraBeta/Set-EntraBetaUserManager.Tests.ps1 diff --git a/test/module/EntraBeta/Update-EntraBetaOauth2PermissionGrant.Tests.ps1 b/test_legacy/module/EntraBeta/Update-EntraBetaOauth2PermissionGrant.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Update-EntraBetaOauth2PermissionGrant.Tests.ps1 rename to test_legacy/module/EntraBeta/Update-EntraBetaOauth2PermissionGrant.Tests.ps1 diff --git a/test/module/EntraBeta/Update-EntraBetaSignedInUserPassword.Tests.ps1 b/test_legacy/module/EntraBeta/Update-EntraBetaSignedInUserPassword.Tests.ps1 similarity index 97% rename from test/module/EntraBeta/Update-EntraBetaSignedInUserPassword.Tests.ps1 rename to test_legacy/module/EntraBeta/Update-EntraBetaSignedInUserPassword.Tests.ps1 index 7fcc32e0e0..3def6c7581 100644 --- a/test/module/EntraBeta/Update-EntraBetaSignedInUserPassword.Tests.ps1 +++ b/test_legacy/module/EntraBeta/Update-EntraBetaSignedInUserPassword.Tests.ps1 @@ -2,6 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")] +param() + BeforeAll { if((Get-Module -Name Microsoft.Graph.Entra.Beta) -eq $null){ Import-Module Microsoft.Graph.Entra.Beta diff --git a/test/module/EntraBeta/Update-EntraBetaUserAuthenticationRequirement.Tests.ps1 b/test_legacy/module/EntraBeta/Update-EntraBetaUserAuthenticationRequirement.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Update-EntraBetaUserAuthenticationRequirement.Tests.ps1 rename to test_legacy/module/EntraBeta/Update-EntraBetaUserAuthenticationRequirement.Tests.ps1 diff --git a/test/module/EntraBeta/Update-EntraBetaUserFromFederated.Tests.ps1 b/test_legacy/module/EntraBeta/Update-EntraBetaUserFromFederated.Tests.ps1 similarity index 100% rename from test/module/EntraBeta/Update-EntraBetaUserFromFederated.Tests.ps1 rename to test_legacy/module/EntraBeta/Update-EntraBetaUserFromFederated.Tests.ps1 From 0fff351944f3a4d47b699c6997a407d95bf93ad4 Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Thu, 21 Nov 2024 15:06:08 +0300 Subject: [PATCH 112/124] Rename module (#1223) --- .../1es-entra-powershell-ci-build.yml | 4 +- .../1es-entra-powershell-release.yml | 5 ++ .azure-pipelines/ci-build.yml | 4 +- .azure-pipelines/entra-powershell-release.yml | 4 +- .../generation-templates/generate_adapter.yml | 8 +-- build/Publish-LocalCompatModule.ps1 | 8 +-- build/Split-Tests.ps1 | 4 +- build/VNext-Build.md | 6 +- build/ValidateAuthenticodeSignature.ps1 | 2 +- build/common-functions.ps1 | 6 +- .../cmdlet-reference-example-beta.md | 8 +-- .../cmdlet-reference-example.md | 8 +-- .../cmdlet-reference-template.md | 6 +- .../Add-EntraApplicationOwner.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 .../Add-EntraServicePrincipalOwner.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Applications/Get-EntraApplication.ps1 | 0 .../Get-EntraApplicationExtensionProperty.ps1 | 0 .../Get-EntraApplicationKeyCredential.ps1 | 0 .../Applications/Get-EntraApplicationLogo.ps1 | 0 .../Get-EntraApplicationOwner.ps1 | 0 ...Get-EntraApplicationPasswordCredential.ps1 | 0 .../Get-EntraApplicationServiceEndpoint.ps1 | 0 .../Get-EntraApplicationTemplate.ps1 | 0 .../Get-EntraDeletedApplication.ps1 | 0 .../Get-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignedTo.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...Get-EntraServicePrincipalCreatedObject.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...Get-EntraServicePrincipalKeyCredential.ps1 | 0 .../Get-EntraServicePrincipalMembership.ps1 | 0 ...aServicePrincipalOAuth2PermissionGrant.ps1 | 0 .../Get-EntraServicePrincipalOwnedObject.ps1 | 0 .../Get-EntraServicePrincipalOwner.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Applications/New-EntraApplication.ps1 | 0 .../New-EntraApplicationExtensionProperty.ps1 | 0 ...ntraApplicationFromApplicationTemplate.ps1 | 0 .../Applications/New-EntraApplicationKey.ps1 | 0 .../New-EntraApplicationKeyCredential.ps1 | 0 .../New-EntraApplicationPassword.ps1 | 0 ...New-EntraApplicationPasswordCredential.ps1 | 0 .../Applications}/New-EntraCustomHeaders.ps1 | 2 +- .../New-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Applications/Remove-EntraApplication.ps1 | 0 ...move-EntraApplicationExtensionProperty.ps1 | 0 .../Remove-EntraApplicationKey.ps1 | 0 .../Remove-EntraApplicationKeyCredential.ps1 | 0 .../Remove-EntraApplicationOwner.ps1 | 0 .../Remove-EntraApplicationPassword.ps1 | 0 ...ove-EntraApplicationPasswordCredential.ps1 | 0 ...move-EntraApplicationVerifiedPublisher.ps1 | 0 .../Remove-EntraDeletedApplication.ps1 | 0 .../Remove-EntraDeletedDirectoryObject.ps1 | 0 .../Remove-EntraServicePrincipal.ps1 | 0 ...EntraServicePrincipalAppRoleAssignment.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...ove-EntraServicePrincipalKeyCredential.ps1 | 0 .../Remove-EntraServicePrincipalOwner.ps1 | 0 ...ntraServicePrincipalPasswordCredential.ps1 | 0 .../Restore-EntraDeletedApplication.ps1 | 0 ...ntraGroupIdsServicePrincipalIsMemberOf.ps1 | 0 .../Applications/Set-EntraApplication.ps1 | 0 .../Applications/Set-EntraApplicationLogo.ps1 | 0 .../Set-EntraApplicationVerifiedPublisher.ps1 | 0 .../Set-EntraServicePrincipal.ps1 | 0 .../Authentication/Add-EntraEnvironment.ps1 | 0 .../Authentication/Connect-Entra.ps1 | 0 .../Authentication/Disconnect-Entra.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Authentication/Find-EntraPermission.ps1 | 0 .../Authentication/Get-EntraContext.ps1 | 0 .../Authentication/Get-EntraEnvironment.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Authentication/New-EntraCustomHeaders.ps1 | 31 ++++++++ ...t-EntraStrongAuthenticationMethodByUpn.ps1 | 0 ...evoke-EntraSignedInUserAllRefreshToken.ps1 | 0 .../Revoke-EntraUserAllRefreshToken.ps1 | 0 .../Add-EntraAdministrativeUnitMember.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Add-EntraDeviceRegisteredOwner.ps1 | 0 .../Add-EntraDeviceRegisteredUser.ps1 | 0 .../Add-EntraDirectoryRoleMember.ps1 | 0 .../Add-EntraScopedRoleMembership.ps1 | 0 .../Confirm-EntraDomain.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Enable-EntraDirectoryRole.ps1 | 0 .../Get-EntraAccountSku.ps1 | 0 .../Get-EntraAdministrativeUnit.ps1 | 0 .../Get-EntraAdministrativeUnitMember.ps1 | 0 .../Get-EntraAttributeSet.ps1 | 0 .../DirectoryManagement/Get-EntraContact.ps1 | 0 .../Get-EntraContactDirectReport.ps1 | 0 .../Get-EntraContactManager.ps1 | 0 .../Get-EntraContactMembership.ps1 | 0 .../DirectoryManagement/Get-EntraContract.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Get-EntraDeletedDirectoryObject.ps1 | 0 .../DirectoryManagement/Get-EntraDevice.ps1 | 0 .../Get-EntraDeviceRegisteredOwner.ps1 | 0 .../Get-EntraDeviceRegisteredUser.ps1 | 0 .../Get-EntraDirSyncConfiguration.ps1 | 0 ...ctoryObjectOnPremisesProvisioningError.ps1 | 0 .../Get-EntraDirectoryRole.ps1 | 0 .../Get-EntraDirectoryRoleMember.ps1 | 0 .../Get-EntraDirectoryRoleTemplate.ps1 | 0 .../DirectoryManagement/Get-EntraDomain.ps1 | 0 .../Get-EntraDomainFederationSettings.ps1 | 0 .../Get-EntraDomainNameReference.ps1 | 0 ...-EntraDomainServiceConfigurationRecord.ps1 | 0 .../Get-EntraDomainVerificationDnsRecord.ps1 | 0 .../Get-EntraExtensionProperty.ps1 | 0 .../Get-EntraFederationProperty.ps1 | 0 .../Get-EntraObjectByObjectId.ps1 | 0 .../Get-EntraPartnerInformation.ps1 | 0 .../Get-EntraPasswordPolicy.ps1 | 0 .../Get-EntraScopedRoleMembership.ps1 | 0 .../Get-EntraSubscribedSku.ps1 | 0 .../Get-EntraTenantDetail.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraAdministrativeUnit.ps1 | 0 .../New-EntraAttributeSet.ps1 | 0 .../New-EntraCustomHeaders.ps1 | 2 +- ...EntraCustomSecurityAttributeDefinition.ps1 | 0 .../DirectoryManagement/New-EntraDevice.ps1 | 0 .../DirectoryManagement/New-EntraDomain.ps1 | 0 .../Remove-EntraAdministrativeUnit.ps1 | 0 .../Remove-EntraAdministrativeUnitMember.ps1 | 0 .../Remove-EntraContact.ps1 | 0 .../Remove-EntraDevice.ps1 | 0 .../Remove-EntraDeviceRegisteredOwner.ps1 | 0 .../Remove-EntraDeviceRegisteredUser.ps1 | 0 .../Remove-EntraDirectoryRoleMember.ps1 | 0 .../Remove-EntraDomain.ps1 | 0 .../Remove-EntraScopedRoleMembership.ps1 | 0 .../Restore-EntraDeletedDirectoryObject.ps1 | 0 .../Set-EntraAdministrativeUnit.ps1 | 0 .../Set-EntraAttributeSet.ps1 | 0 ...EntraCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../DirectoryManagement/Set-EntraDevice.ps1 | 0 .../Set-EntraDirSyncConfiguration.ps1 | 0 .../Set-EntraDirSyncEnabled.ps1 | 0 .../Set-EntraDirSyncFeature.ps1 | 0 .../DirectoryManagement/Set-EntraDomain.ps1 | 0 .../Set-EntraDomainFederationSettings.ps1 | 0 .../Set-EntraPartnerInformation.ps1 | 0 .../Set-EntraTenantDetail.ps1 | 0 .../Enable-EntraAzureADAlias.ps1 | 0 .../Governance/Enable-EntraAzureADAliases.ps1 | 0 .../Get-EntraDirectoryRoleAssignment.ps1 | 0 .../Get-EntraDirectoryRoleDefinition.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Governance}/New-EntraCustomHeaders.ps1 | 2 +- .../New-EntraDirectoryRoleAssignment.ps1 | 0 .../New-EntraDirectoryRoleDefinition.ps1 | 0 .../Remove-EntraDirectoryRoleAssignment.ps1 | 0 .../Remove-EntraDirectoryRoleDefinition.ps1 | 0 .../Set-EntraDirectoryRoleDefinition.ps1 | 0 .../Groups/Add-EntraGroupMember.ps1 | 0 .../Groups/Add-EntraGroupOwner.ps1 | 0 .../Groups/Add-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Enable-EntraAzureADAliases.ps1 | 0 .../Groups/Get-EntraDeletedGroup.ps1 | 0 .../Groups/Get-EntraGroup.ps1 | 0 .../Get-EntraGroupAppRoleAssignment.ps1 | 0 .../Groups/Get-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Get-EntraGroupMember.ps1 | 0 .../Groups/Get-EntraGroupOwner.ps1 | 0 .../Groups/Get-EntraGroupPermissionGrant.ps1 | 0 .../Groups/Get-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Get-EntraObjectSetting.ps1 | 0 .../Groups/Get-EntraUnsupportedCommand.ps1 | 0 .../Groups}/New-EntraCustomHeaders.ps1 | 2 +- .../Groups/New-EntraGroup.ps1 | 0 .../New-EntraGroupAppRoleAssignment.ps1 | 0 .../Groups/New-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Remove-EntraGroup.ps1 | 0 .../Remove-EntraGroupAppRoleAssignment.ps1 | 0 .../Remove-EntraGroupLifecyclePolicy.ps1 | 0 .../Groups/Remove-EntraGroupMember.ps1 | 0 .../Groups/Remove-EntraGroupOwner.ps1 | 0 .../Remove-EntraLifecyclePolicyGroup.ps1 | 0 .../Groups/Reset-EntraLifeCycleGroup.ps1 | 0 .../Select-EntraGroupIdsContactIsMemberOf.ps1 | 0 .../Select-EntraGroupIdsGroupIsMemberOf.ps1 | 0 .../Select-EntraGroupIdsUserIsMemberOf.ps1 | 0 .../Groups/Set-EntraGroup.ps1 | 0 .../Groups/Set-EntraGroupLifecyclePolicy.ps1 | 0 .../Reports/Enable-EntraAzureADAliases.ps1 | 0 .../Reports/Get-EntraAuditDirectoryLog.ps1 | 0 .../Reports/Get-EntraAuditSignInLog.ps1 | 0 .../Reports/Get-EntraUnsupportedCommand.ps1 | 0 .../Reports/New-EntraCustomHeaders.ps1 | 2 +- .../SignIns/Enable-EntraAzureADAliases.ps1 | 0 .../SignIns/Get-EntraAuthorizationPolicy.ps1 | 0 .../Get-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/Get-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/Get-EntraIdentityProvider.ps1 | 0 .../SignIns/Get-EntraNamedLocationPolicy.ps1 | 0 .../Get-EntraOAuth2PermissionGrant.ps1 | 0 .../Get-EntraPermissionGrantConditionSet.ps1 | 0 .../Get-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Get-EntraPolicy.ps1 | 0 .../Get-EntraTrustedCertificateAuthority.ps1 | 0 .../SignIns/Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/New-EntraCustomHeaders.ps1 | 31 ++++++++ .../SignIns/New-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/New-EntraIdentityProvider.ps1 | 0 .../SignIns/New-EntraNamedLocationPolicy.ps1 | 0 .../New-EntraOauth2PermissionGrant.ps1 | 0 .../New-EntraPermissionGrantConditionSet.ps1 | 0 .../New-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/New-EntraPolicy.ps1 | 0 .../New-EntraTrustedCertificateAuthority.ps1 | 0 .../Remove-EntraConditionalAccessPolicy.ps1 | 0 .../Remove-EntraFeatureRolloutPolicy.ps1 | 0 ...traFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../SignIns/Remove-EntraIdentityProvider.ps1 | 0 .../Remove-EntraNamedLocationPolicy.ps1 | 0 .../Remove-EntraOAuth2PermissionGrant.ps1 | 0 ...emove-EntraPermissionGrantConditionSet.ps1 | 0 .../Remove-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Remove-EntraPolicy.ps1 | 0 ...emove-EntraTrustedCertificateAuthority.ps1 | 0 .../SignIns/Set-EntraAuthorizationPolicy.ps1 | 0 .../Set-EntraConditionalAccessPolicy.ps1 | 0 .../SignIns/Set-EntraFeatureRolloutPolicy.ps1 | 0 .../SignIns/Set-EntraIdentityProvider.ps1 | 0 .../SignIns/Set-EntraNamedLocationPolicy.ps1 | 0 .../Set-EntraPermissionGrantConditionSet.ps1 | 0 .../Set-EntraPermissionGrantPolicy.ps1 | 0 .../SignIns/Set-EntraPolicy.ps1 | 0 .../Set-EntraTrustedCertificateAuthority.ps1 | 0 .../UnMappedAliases.psd1 | 0 .../Users/Enable-EntraAzureADAliases.ps1 | 0 .../Users/Get-EntraUnsupportedCommand.ps1 | 0 .../Users/Get-EntraUser.ps1 | 0 .../Users/Get-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Get-EntraUserCreatedObject.ps1 | 0 .../Users/Get-EntraUserDirectReport.ps1 | 0 .../Users/Get-EntraUserExtension.ps1 | 0 .../Users/Get-EntraUserLicenseDetail.ps1 | 0 .../Users/Get-EntraUserManager.ps1 | 0 .../Users/Get-EntraUserMembership.ps1 | 0 .../Get-EntraUserOAuth2PermissionGrant.ps1 | 0 .../Users/Get-EntraUserOwnedDevice.ps1 | 0 .../Users/Get-EntraUserOwnedObject.ps1 | 0 .../Users/Get-EntraUserRegisteredDevice.ps1 | 0 .../Users/Get-EntraUserThumbnailPhoto.ps1 | 0 .../Users/New-EntraCustomHeaders.ps1 | 31 ++++++++ .../Users/New-EntraUser.ps1 | 0 .../Users/New-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraUser.ps1 | 0 .../Remove-EntraUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraUserExtension.ps1 | 0 .../Users/Remove-EntraUserManager.ps1 | 0 .../Users/Set-EntraUser.ps1 | 0 .../Users/Set-EntraUserExtension.ps1 | 0 .../Users/Set-EntraUserLicense.ps1 | 0 .../Users/Set-EntraUserManager.ps1 | 0 .../Users/Set-EntraUserPassword.ps1 | 0 .../Users/Set-EntraUserThumbnailPhoto.ps1 | 0 .../Update-EntraSignedInUserPassword.ps1 | 0 .../Users/Update-EntraUserFromFederated.ps1 | 0 .../Authentication/New-EntraCustomHeaders.ps1 | 31 -------- .../New-EntraCustomHeaders.ps1 | 31 -------- .../Governance/New-EntraCustomHeaders.ps1 | 31 -------- .../Entra/UnMappedFiles/Test-EntraScript.ps1 | 14 ++-- module/Entra/config/ModuleSettings.json | 2 +- module/Entra/config/dependencyMapping.json | 16 ++--- .../Add-EntraBetaApplicationOwner.ps1 | 0 .../Add-EntraBetaApplicationPolicy.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 .../Add-EntraBetaServicePrincipalOwner.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Applications/Get-EntraBetaApplication.ps1 | 0 ...-EntraBetaApplicationExtensionProperty.ps1 | 0 .../Get-EntraBetaApplicationKeyCredential.ps1 | 0 .../Get-EntraBetaApplicationLogo.ps1 | 0 .../Get-EntraBetaApplicationOwner.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 .../Get-EntraBetaApplicationPolicy.ps1 | 0 ...t-EntraBetaApplicationProxyApplication.ps1 | 0 ...Get-EntraBetaApplicationProxyConnector.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 ...aApplicationProxyConnectorGroupMembers.ps1 | 0 ...aBetaApplicationProxyConnectorMemberOf.ps1 | 0 .../Get-EntraBetaApplicationTemplate.ps1 | 0 .../Get-EntraBetaDeletedApplication.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 .../Get-EntraBetaServicePrincipal.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignedTo.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...EntraBetaServicePrincipalCreatedObject.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 ...EntraBetaServicePrincipalKeyCredential.ps1 | 0 ...et-EntraBetaServicePrincipalMembership.ps1 | 0 ...aServicePrincipalOAuth2PermissionGrant.ps1 | 0 ...t-EntraBetaServicePrincipalOwnedObject.ps1 | 0 .../Get-EntraBetaServicePrincipalOwner.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../Applications/New-EntraBetaApplication.ps1 | 0 ...-EntraBetaApplicationExtensionProperty.ps1 | 0 ...BetaApplicationFromApplicationTemplate.ps1 | 0 .../New-EntraBetaApplicationKey.ps1 | 0 .../New-EntraBetaApplicationKeyCredential.ps1 | 0 .../New-EntraBetaApplicationPassword.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 ...w-EntraBetaApplicationProxyApplication.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 2 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 .../New-EntraBetaServicePrincipal.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 .../Remove-EntraBetaApplication.ps1 | 0 ...-EntraBetaApplicationExtensionProperty.ps1 | 0 .../Remove-EntraBetaApplicationKey.ps1 | 0 ...move-EntraBetaApplicationKeyCredential.ps1 | 0 .../Remove-EntraBetaApplicationOwner.ps1 | 0 .../Remove-EntraBetaApplicationPassword.ps1 | 0 ...EntraBetaApplicationPasswordCredential.ps1 | 0 .../Remove-EntraBetaApplicationPolicy.ps1 | 0 ...e-EntraBetaApplicationProxyApplication.ps1 | 0 ...licationProxyApplicationConnectorGroup.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 ...-EntraBetaApplicationVerifiedPublisher.ps1 | 0 .../Remove-EntraBetaDeletedApplication.ps1 | 0 ...Remove-EntraBetaDeletedDirectoryObject.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 .../Remove-EntraBetaServicePrincipal.ps1 | 0 ...aBetaServicePrincipalAppRoleAssignment.ps1 | 0 ...cipalDelegatedPermissionClassification.ps1 | 0 .../Remove-EntraBetaServicePrincipalOwner.ps1 | 0 ...BetaServicePrincipalPasswordCredential.ps1 | 0 .../Restore-EntraBetaDeletedApplication.ps1 | 0 ...BetaGroupIdsServicePrincipalIsMemberOf.ps1 | 0 .../Applications/Set-EntraBetaApplication.ps1 | 0 .../Set-EntraBetaApplicationLogo.ps1 | 0 ...t-EntraBetaApplicationProxyApplication.ps1 | 0 ...licationProxyApplicationConnectorGroup.ps1 | 0 ...pplicationProxyApplicationSingleSignOn.ps1 | 0 ...Set-EntraBetaApplicationProxyConnector.ps1 | 0 ...ntraBetaApplicationProxyConnectorGroup.ps1 | 0 ...-EntraBetaApplicationVerifiedPublisher.ps1 | 0 ...ntraBetaPasswordSingleSignOnCredential.ps1 | 0 .../Set-EntraBetaServicePrincipal.ps1 | 0 .../Authentication/Connect-Entra.ps1 | 0 .../Authentication/Disconnect-Entra.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Authentication/Get-EntraContext.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 29 ++++++++ ...traBetaStrongAuthenticationMethodByUpn.ps1 | 0 ...e-EntraBetaSignedInUserAllRefreshToken.ps1 | 0 .../Revoke-EntraBetaUserAllRefreshToken.ps1 | 0 .../Add-EntraBetaAdministrativeUnitMember.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Add-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Add-EntraBetaDeviceRegisteredUser.ps1 | 0 .../Add-EntraBetaDirectoryRoleMember.ps1 | 0 .../Add-EntraBetaScopedRoleMembership.ps1 | 0 .../Confirm-EntraBetaDomain.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 .../Enable-EntraBetaDirectoryRole.ps1 | 0 .../Get-EntraBetaAccountSku.ps1 | 0 .../Get-EntraBetaAdministrativeUnit.ps1 | 0 .../Get-EntraBetaAdministrativeUnitMember.ps1 | 0 .../Get-EntraBetaAttributeSet.ps1 | 0 .../Get-EntraBetaContact.ps1 | 0 .../Get-EntraBetaContactDirectReport.ps1 | 0 .../Get-EntraBetaContactManager.ps1 | 0 .../Get-EntraBetaContactMembership.ps1 | 0 .../Get-EntraBetaContract.ps1 | 0 ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Get-EntraBetaDeletedDirectoryObject.ps1 | 0 .../Get-EntraBetaDevice.ps1 | 0 .../Get-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Get-EntraBetaDeviceRegisteredUser.ps1 | 0 .../Get-EntraBetaDirSyncConfiguration.ps1 | 0 .../Get-EntraBetaDirSyncfeature.ps1 | 0 ...ctoryObjectOnPremisesProvisioningError.ps1 | 0 .../Get-EntraBetaDirectoryRole.ps1 | 0 .../Get-EntraBetaDirectoryRoleMember.ps1 | 0 .../Get-EntraBetaDirectoryRoleTemplate.ps1 | 0 .../Get-EntraBetaDirectorySetting.ps1 | 0 .../Get-EntraBetaDirectorySettingTemplate.ps1 | 0 .../Get-EntraBetaDomain.ps1 | 0 .../Get-EntraBetaDomainFederationSettings.ps1 | 0 .../Get-EntraBetaDomainNameReference.ps1 | 0 ...raBetaDomainServiceConfigurationRecord.ps1 | 0 ...t-EntraBetaDomainVerificationDnsRecord.ps1 | 0 .../Get-EntraBetaFederationProperty.ps1 | 0 .../Get-EntraBetaPartnerInformation.ps1 | 0 .../Get-EntraBetaPasswordPolicy.ps1 | 0 .../Get-EntraBetaScopedRoleMembership.ps1 | 0 .../Get-EntraBetaSubscribedSku.ps1 | 0 .../Get-EntraBetaTenantDetail.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaAdministrativeUnit.ps1 | 0 .../New-EntraBetaAdministrativeUnitMember.ps1 | 0 .../New-EntraBetaAttributeSet.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 2 +- ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 .../New-EntraBetaDevice.ps1 | 0 .../New-EntraBetaDirectorySetting.ps1 | 0 .../New-EntraBetaDomain.ps1 | 0 .../Remove-EntraBetaAdministrativeUnit.ps1 | 0 ...move-EntraBetaAdministrativeUnitMember.ps1 | 0 .../Remove-EntraBetaContact.ps1 | 0 .../Remove-EntraBetaDevice.ps1 | 0 .../Remove-EntraBetaDeviceRegisteredOwner.ps1 | 0 .../Remove-EntraBetaDeviceRegisteredUser.ps1 | 0 .../Remove-EntraBetaDirectoryRoleMember.ps1 | 0 .../Remove-EntraBetaDirectorySetting.ps1 | 0 .../Remove-EntraBetaDomain.ps1 | 0 .../Remove-EntraBetaScopedRoleMembership.ps1 | 0 ...estore-EntraBetaDeletedDirectoryObject.ps1 | 0 .../Set-EntraBetaAdministrativeUnit.ps1 | 0 .../Set-EntraBetaAttributeSet.ps1 | 0 ...aBetaCustomSecurityAttributeDefinition.ps1 | 0 ...ecurityAttributeDefinitionAllowedValue.ps1 | 0 .../Set-EntraBetaDevice.ps1 | 0 .../Set-EntraBetaDirSyncConfiguration.ps1 | 0 .../Set-EntraBetaDirSyncEnabled.ps1 | 0 .../Set-EntraBetaDirSyncFeature.ps1 | 0 .../Set-EntraBetaDirectorySetting.ps1 | 0 .../Set-EntraBetaDomain.ps1 | 0 .../Set-EntraBetaDomainFederationSettings.ps1 | 0 .../Set-EntraBetaPartnerInformation.ps1 | 0 .../Set-EntraBetaTenantDetail.ps1 | 0 .../Enable-EntraBetaAzureADAlias.ps1 | 0 .../Governance/Enable-EntraAzureADAliases.ps1 | 0 .../Get-EntraBetaDirectoryRoleAssignment.ps1 | 0 .../Get-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../Get-EntraBetaPrivilegedResource.ps1 | 0 .../Get-EntraBetaPrivilegedRole.ps1 | 0 ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 0 .../Get-EntraBetaPrivilegedRoleDefinition.ps1 | 0 .../Get-EntraBetaPrivilegedRoleSetting.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 2 +- .../New-EntraBetaDirectoryRoleAssignment.ps1 | 0 .../New-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../New-EntraBetaPrivilegedRoleAssignment.ps1 | 0 ...emove-EntraBetaDirectoryRoleAssignment.ps1 | 0 ...emove-EntraBetaDirectoryRoleDefinition.ps1 | 0 .../Set-EntraBetaDirectoryRoleDefinition.ps1 | 0 ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 0 .../Set-EntraBetaPrivilegedRoleSetting.ps1 | 0 .../Groups/Add-EntraBetaGroupMember.ps1 | 0 .../Groups/Add-EntraBetaGroupOwner.ps1 | 0 .../Add-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Groups/Enable-EntraAzureADAliases.ps1 | 0 .../Groups/Get-EntraBetaDeletedGroup.ps1 | 0 .../Groups/Get-EntraBetaGroup.ps1 | 0 .../Get-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../Get-EntraBetaGroupLifecyclePolicy.ps1 | 0 .../Groups/Get-EntraBetaGroupMember.ps1 | 0 .../Groups/Get-EntraBetaGroupOwner.ps1 | 0 .../Get-EntraBetaGroupPermissionGrant.ps1 | 0 .../Get-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Groups/Get-EntraBetaObjectByObjectId.ps1 | 0 .../Groups/Get-EntraBetaObjectSetting.ps1 | 0 .../Groups/Get-EntraUnsupportedCommand.ps1 | 0 .../Groups}/New-EntraBetaCustomHeaders.ps1 | 2 +- .../Groups/New-EntraBetaGroup.ps1 | 0 .../New-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../New-EntraBetaGroupLifecyclePolicy.ps1 | 0 .../Groups/New-EntraBetaObjectSetting.ps1 | 0 .../Groups/Remove-EntraBetaGroup.ps1 | 0 ...Remove-EntraBetaGroupAppRoleAssignment.ps1 | 0 .../Remove-EntraBetaGroupLifecyclePolicy.ps1 | 0 .../Groups/Remove-EntraBetaGroupMember.ps1 | 0 .../Groups/Remove-EntraBetaGroupOwner.ps1 | 0 .../Remove-EntraBetaLifecyclePolicyGroup.ps1 | 0 .../Groups/Remove-EntraBetaObjectSetting.ps1 | 0 .../Groups/Reset-EntraBetaLifeCycleGroup.ps1 | 0 ...ect-EntraBetaGroupIdsContactIsMemberOf.ps1 | 0 ...elect-EntraBetaGroupIdsGroupIsMemberOf.ps1 | 0 ...Select-EntraBetaGroupIdsUserIsMemberOf.ps1 | 0 .../Groups/Set-EntraBetaGroup.ps1 | 0 .../Set-EntraBetaGroupLifecyclePolicy.ps1 | 0 .../Groups/Set-EntraBetaObjectSetting.ps1 | 0 .../Enable-EntraAzureADAliases.ps1 | 0 ...able-EntraBetaGlobalSecureAccessTenant.ps1 | 0 ...ntraBetaGlobalSecureAccessTenantStatus.ps1 | 0 .../Get-EntraBetaPrivateAccessApplication.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 2 +- .../New-EntraBetaPrivateAccessApplication.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 ...traBetaPrivateAccessApplicationSegment.ps1 | 0 .../Reports/Enable-EntraAzureADAliases.ps1 | 0 ...raBetaApplicationSignInDetailedSummary.ps1 | 0 .../Get-EntraBetaApplicationSignInSummary.ps1 | 0 .../Get-EntraBetaAuditDirectoryLog.ps1 | 0 .../Reports/Get-EntraBetaAuditSignInLog.ps1 | 0 .../Reports/Get-EntraUnsupportedCommand.ps1 | 0 .../Reports/New-EntraBetaCustomHeaders.ps1 | 29 ++++++++ ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../Add-EntraBetaServicePrincipalPolicy.ps1 | 0 .../SignIns/Enable-EntraAzureADAliases.ps1 | 0 .../Get-EntraBetaAuthorizationPolicy.ps1 | 0 .../Get-EntraBetaConditionalAccessPolicy.ps1 | 0 .../Get-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../SignIns/Get-EntraBetaIdentityProvider.ps1 | 0 .../Get-EntraBetaNamedLocationPolicy.ps1 | 0 .../Get-EntraBetaOAuth2PermissionGrant.ps1 | 0 ...t-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Get-EntraBetaPermissionGrantPolicy.ps1 | 0 .../SignIns/Get-EntraBetaPolicy.ps1 | 0 .../Get-EntraBetaPolicyAppliedObject.ps1 | 0 .../Get-EntraBetaServicePrincipalPolicy.ps1 | 0 .../Get-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...t-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../SignIns/Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaConditionalAccessPolicy.ps1 | 0 .../SignIns/New-EntraBetaCustomHeaders.ps1 | 29 ++++++++ .../New-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../SignIns/New-EntraBetaIdentityProvider.ps1 | 0 .../SignIns/New-EntraBetaInvitation.ps1 | 0 .../New-EntraBetaNamedLocationPolicy.ps1 | 0 .../New-EntraBetaOauth2PermissionGrant.ps1 | 0 ...w-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../New-EntraBetaPermissionGrantPolicy.ps1 | 0 .../SignIns/New-EntraBetaPolicy.ps1 | 0 .../New-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...w-EntraBetaTrustedCertificateAuthority.ps1 | 0 ...emove-EntraBetaConditionalAccessPolicy.ps1 | 0 .../Remove-EntraBetaFeatureRolloutPolicy.ps1 | 0 ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 0 .../Remove-EntraBetaIdentityProvider.ps1 | 0 .../Remove-EntraBetaNamedLocationPolicy.ps1 | 0 .../Remove-EntraBetaOAuth2PermissionGrant.ps1 | 0 ...e-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Remove-EntraBetaPermissionGrantPolicy.ps1 | 0 .../SignIns/Remove-EntraBetaPolicy.ps1 | 0 ...Remove-EntraBetaServicePrincipalPolicy.ps1 | 0 .../Remove-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...e-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../Set-EntraBetaAuthorizationPolicy.ps1 | 0 .../Set-EntraBetaConditionalAccessPolicy.ps1 | 0 .../Set-EntraBetaFeatureRolloutPolicy.ps1 | 0 .../SignIns/Set-EntraBetaIdentityProvider.ps1 | 0 .../Set-EntraBetaNamedLocationPolicy.ps1 | 0 ...t-EntraBetaPermissionGrantConditionSet.ps1 | 0 .../Set-EntraBetaPermissionGrantPolicy.ps1 | 0 .../SignIns/Set-EntraBetaPolicy.ps1 | 0 .../Set-EntraBetaTrustFrameworkPolicy.ps1 | 0 ...t-EntraBetaTrustedCertificateAuthority.ps1 | 0 .../Users/Enable-EntraAzureADAliases.ps1 | 0 .../Users/Get-EntraBetaUser.ps1 | 0 .../Get-EntraBetaUserAppRoleAssignment.ps1 | 0 .../Users/Get-EntraBetaUserCreatedObject.ps1 | 0 .../Users/Get-EntraBetaUserDirectReport.ps1 | 0 .../Users/Get-EntraBetaUserExtension.ps1 | 0 .../Users/Get-EntraBetaUserLicenseDetail.ps1 | 0 .../Users/Get-EntraBetaUserManager.ps1 | 0 .../Users/Get-EntraBetaUserMembership.ps1 | 0 ...Get-EntraBetaUserOAuth2PermissionGrant.ps1 | 0 .../Users/Get-EntraBetaUserOwnedDevice.ps1 | 0 .../Users/Get-EntraBetaUserOwnedObject.ps1 | 0 .../Get-EntraBetaUserRegisteredDevice.ps1 | 0 .../Users/Get-EntraBetaUserThumbnailPhoto.ps1 | 0 .../Users/Get-EntraUnsupportedCommand.ps1 | 0 .../Users/New-EntraBetaCustomHeaders.ps1 | 29 ++++++++ .../Users/New-EntraBetaUser.ps1 | 0 .../New-EntraBetaUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraBetaUser.ps1 | 0 .../Remove-EntraBetaUserAppRoleAssignment.ps1 | 0 .../Users/Remove-EntraBetaUserExtension.ps1 | 0 .../Users/Remove-EntraBetaUserManager.ps1 | 0 .../Users/Set-EntraBetaUser.ps1 | 0 .../Users/Set-EntraBetaUserExtension.ps1 | 0 .../Users/Set-EntraBetaUserLicense.ps1 | 0 .../Users/Set-EntraBetaUserManager.ps1 | 0 .../Users/Set-EntraBetaUserPassword.ps1 | 0 .../Users/Set-EntraBetaUserThumbnailPhoto.ps1 | 0 .../Update-EntraBetaSignedInUserPassword.ps1 | 0 .../Update-EntraBetaUserFromFederated.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 29 -------- .../New-EntraBetaCustomHeaders.ps1 | 29 -------- .../Governance/New-EntraBetaCustomHeaders.ps1 | 29 -------- .../New-EntraBetaCustomHeaders.ps1 | 29 -------- .../UnMappedFiles/Test-EntraScript.ps1 | 14 ++-- module/EntraBeta/config/ModuleSettings.json | 2 +- .../EntraBeta/config/dependencyMapping.json | 16 ++--- .../Add-EntraBetaApplicationOwner.md | 6 +- .../Add-EntraBetaApplicationPolicy.md | 6 +- ...ncipalDelegatedPermissionClassification.md | 6 +- .../Add-EntraBetaServicePrincipalOwner.md | 6 +- .../Applications/Get-EntraBetaApplication.md | 6 +- ...t-EntraBetaApplicationExtensionProperty.md | 6 +- .../Get-EntraBetaApplicationKeyCredential.md | 6 +- .../Get-EntraBetaApplicationLogo.md | 6 +- .../Get-EntraBetaApplicationOwner.md | 6 +- ...-EntraBetaApplicationPasswordCredential.md | 6 +- .../Get-EntraBetaApplicationPolicy.md | 6 +- ...et-EntraBetaApplicationProxyApplication.md | 6 +- ...plicationProxyApplicationConnectorGroup.md | 6 +- .../Get-EntraBetaApplicationProxyConnector.md | 6 +- ...EntraBetaApplicationProxyConnectorGroup.md | 6 +- ...taApplicationProxyConnectorGroupMembers.md | 6 +- ...raBetaApplicationProxyConnectorMemberOf.md | 6 +- ...Get-EntraBetaApplicationServiceEndpoint.md | 4 +- .../Get-EntraBetaApplicationTemplate.md | 6 +- .../Get-EntraBetaDeletedApplication.md | 6 +- ...EntraBetaPasswordSingleSignOnCredential.md | 6 +- .../Get-EntraBetaServicePrincipal.md | 6 +- ...raBetaServicePrincipalAppRoleAssignedTo.md | 6 +- ...raBetaServicePrincipalAppRoleAssignment.md | 6 +- ...-EntraBetaServicePrincipalCreatedObject.md | 6 +- ...ncipalDelegatedPermissionClassification.md | 6 +- ...-EntraBetaServicePrincipalKeyCredential.md | 6 +- ...Get-EntraBetaServicePrincipalMembership.md | 6 +- ...taServicePrincipalOAuth2PermissionGrant.md | 6 +- ...et-EntraBetaServicePrincipalOwnedObject.md | 6 +- .../Get-EntraBetaServicePrincipalOwner.md | 6 +- ...aBetaServicePrincipalPasswordCredential.md | 6 +- .../Applications/New-EntraBetaApplication.md | 6 +- ...w-EntraBetaApplicationExtensionProperty.md | 6 +- ...aBetaApplicationFromApplicationTemplate.md | 6 +- .../New-EntraBetaApplicationKey.md | 6 +- .../New-EntraBetaApplicationKeyCredential.md | 6 +- .../New-EntraBetaApplicationPassword.md | 6 +- ...-EntraBetaApplicationPasswordCredential.md | 6 +- ...ew-EntraBetaApplicationProxyApplication.md | 6 +- ...EntraBetaApplicationProxyConnectorGroup.md | 6 +- ...EntraBetaPasswordSingleSignOnCredential.md | 6 +- .../New-EntraBetaServicePrincipal.md | 6 +- ...raBetaServicePrincipalAppRoleAssignment.md | 6 +- ...aBetaServicePrincipalPasswordCredential.md | 6 +- .../Remove-EntraBetaApplication.md | 6 +- ...e-EntraBetaApplicationExtensionProperty.md | 6 +- .../Remove-EntraBetaApplicationKey.md | 6 +- ...emove-EntraBetaApplicationKeyCredential.md | 6 +- .../Remove-EntraBetaApplicationOwner.md | 6 +- .../Remove-EntraBetaApplicationPassword.md | 6 +- ...-EntraBetaApplicationPasswordCredential.md | 6 +- .../Remove-EntraBetaApplicationPolicy.md | 6 +- ...ve-EntraBetaApplicationProxyApplication.md | 6 +- ...plicationProxyApplicationConnectorGroup.md | 6 +- ...EntraBetaApplicationProxyConnectorGroup.md | 6 +- ...e-EntraBetaApplicationVerifiedPublisher.md | 6 +- .../Remove-EntraBetaDeletedApplication.md | 6 +- .../Remove-EntraBetaDeletedDirectoryObject.md | 6 +- ...EntraBetaPasswordSingleSignOnCredential.md | 6 +- .../Remove-EntraBetaServicePrincipal.md | 6 +- ...raBetaServicePrincipalAppRoleAssignment.md | 6 +- ...ncipalDelegatedPermissionClassification.md | 6 +- .../Remove-EntraBetaServicePrincipalOwner.md | 6 +- ...aBetaServicePrincipalPasswordCredential.md | 6 +- .../Restore-EntraBetaDeletedApplication.md | 6 +- ...aBetaGroupIdsServicePrincipalIsMemberOf.md | 6 +- .../Applications/Set-EntraBetaApplication.md | 6 +- .../Set-EntraBetaApplicationLogo.md | 6 +- ...et-EntraBetaApplicationProxyApplication.md | 6 +- ...plicationProxyApplicationConnectorGroup.md | 6 +- ...ApplicationProxyApplicationSingleSignOn.md | 6 +- .../Set-EntraBetaApplicationProxyConnector.md | 6 +- ...EntraBetaApplicationProxyConnectorGroup.md | 6 +- ...t-EntraBetaApplicationVerifiedPublisher.md | 6 +- ...EntraBetaPasswordSingleSignOnCredential.md | 6 +- .../Set-EntraBetaServicePrincipal.md | 6 +- .../Authentication/Connect-Entra.md | 8 +-- .../Authentication/Disconnect-Entra.md | 6 +- .../Authentication/Get-EntraContext.md | 6 +- ...ntraBetaStrongAuthenticationMethodByUpn.md | 6 +- ...ke-EntraBetaSignedInUserAllRefreshToken.md | 6 +- .../Revoke-EntraBetaUserAllRefreshToken.md | 6 +- .../Add-EntraBetaAdministrativeUnitMember.md | 6 +- ...SecurityAttributeDefinitionAllowedValue.md | 6 +- .../Add-EntraBetaDeviceRegisteredOwner.md | 6 +- .../Add-EntraBetaDeviceRegisteredUser.md | 6 +- .../Add-EntraBetaDirectoryRoleMember.md | 6 +- .../Add-EntraBetaScopedRoleMembership.md | 6 +- .../Confirm-EntraBetaDomain.md | 6 +- .../Enable-EntraBetaDirectoryRole.md | 6 +- .../Get-EntraBetaAccountSku.md | 6 +- .../Get-EntraBetaAdministrativeUnit.md | 6 +- .../Get-EntraBetaAdministrativeUnitMember.md | 6 +- .../Get-EntraBetaAttributeSet.md | 6 +- .../Get-EntraBetaContact.md | 6 +- .../Get-EntraBetaContactDirectReport.md | 6 +- .../Get-EntraBetaContactManager.md | 6 +- .../Get-EntraBetaContactMembership.md | 6 +- .../Get-EntraBetaContract.md | 6 +- ...raBetaCustomSecurityAttributeDefinition.md | 6 +- ...SecurityAttributeDefinitionAllowedValue.md | 6 +- .../Get-EntraBetaDeletedDirectoryObject.md | 6 +- .../Get-EntraBetaDevice.md | 6 +- .../Get-EntraBetaDeviceRegisteredOwner.md | 6 +- .../Get-EntraBetaDeviceRegisteredUser.md | 6 +- .../Get-EntraBetaDirSyncConfiguration.md | 6 +- .../Get-EntraBetaDirSyncFeature.md | 6 +- ...ectoryObjectOnPremisesProvisioningError.md | 6 +- .../Get-EntraBetaDirectoryRole.md | 6 +- .../Get-EntraBetaDirectoryRoleMember.md | 6 +- .../Get-EntraBetaDirectoryRoleTemplate.md | 6 +- .../Get-EntraBetaDirectorySetting.md | 6 +- .../Get-EntraBetaDirectorySettingTemplate.md | 6 +- .../Get-EntraBetaDomain.md | 6 +- .../Get-EntraBetaDomainFederationSettings.md | 6 +- .../Get-EntraBetaDomainNameReference.md | 6 +- ...traBetaDomainServiceConfigurationRecord.md | 6 +- ...et-EntraBetaDomainVerificationDnsRecord.md | 6 +- .../Get-EntraBetaFederationProperty.md | 6 +- .../Get-EntraBetaPartnerInformation.md | 6 +- .../Get-EntraBetaPasswordPolicy.md | 6 +- .../Get-EntraBetaScopedRoleMembership.md | 6 +- .../Get-EntraBetaSubscribedSku.md | 6 +- .../Get-EntraBetaTenantDetail.md | 6 +- .../New-EntraBetaAdministrativeUnit.md | 6 +- .../New-EntraBetaAdministrativeUnitMember.md | 6 +- .../New-EntraBetaAttributeSet.md | 6 +- ...raBetaCustomSecurityAttributeDefinition.md | 6 +- .../New-EntraBetaDevice.md | 6 +- .../New-EntraBetaDirectorySetting.md | 6 +- .../New-EntraBetaDomain.md | 6 +- .../Remove-EntraBetaAdministrativeUnit.md | 6 +- ...emove-EntraBetaAdministrativeUnitMember.md | 6 +- .../Remove-EntraBetaContact.md | 6 +- .../Remove-EntraBetaDevice.md | 6 +- .../Remove-EntraBetaDeviceRegisteredOwner.md | 6 +- .../Remove-EntraBetaDeviceRegisteredUser.md | 6 +- .../Remove-EntraBetaDirectoryRoleMember.md | 6 +- .../Remove-EntraBetaDirectorySetting.md | 6 +- .../Remove-EntraBetaDomain.md | 6 +- .../Remove-EntraBetaScopedRoleMembership.md | 6 +- ...Restore-EntraBetaDeletedDirectoryObject.md | 6 +- .../Set-EntraBetaAdministrativeUnit.md | 6 +- .../Set-EntraBetaAttributeSet.md | 6 +- ...raBetaCustomSecurityAttributeDefinition.md | 6 +- ...SecurityAttributeDefinitionAllowedValue.md | 6 +- .../Set-EntraBetaDevice.md | 6 +- .../Set-EntraBetaDirSyncConfiguration.md | 6 +- .../Set-EntraBetaDirSyncEnabled.md | 6 +- .../Set-EntraBetaDirSyncFeature.md | 6 +- .../Set-EntraBetaDirectorySetting.md | 6 +- .../Set-EntraBetaDomain.md | 6 +- .../Set-EntraBetaDomainFederationSettings.md | 6 +- .../Set-EntraBetaPartnerInformation.md | 6 +- .../Set-EntraBetaTenantDetail.md | 6 +- .../Get-EntraBetaDirectoryRoleAssignment.md | 6 +- .../Get-EntraBetaDirectoryRoleDefinition.md | 6 +- .../Get-EntraBetaPrivilegedResource.md | 6 +- .../Governance/Get-EntraBetaPrivilegedRole.md | 6 +- .../Get-EntraBetaPrivilegedRoleDefinition.md | 6 +- .../Get-EntraBetaPrivilegedRoleSetting.md | 6 +- .../New-EntraBetaDirectoryRoleAssignment.md | 6 +- .../New-EntraBetaDirectoryRoleDefinition.md | 6 +- .../New-EntraBetaPrivilegedRoleAssignment.md | 6 +- ...Remove-EntraBetaDirectoryRoleAssignment.md | 6 +- ...Remove-EntraBetaDirectoryRoleDefinition.md | 6 +- .../Set-EntraBetaDirectoryRoleDefinition.md | 6 +- ...ntraBetaPrivilegedRoleAssignmentRequest.md | 6 +- .../Set-EntraBetaPrivilegedRoleSetting.md | 6 +- .../Groups/Add-EntraBetaGroupMember.md | 6 +- .../Groups/Add-EntraBetaGroupOwner.md | 6 +- .../Add-EntraBetaLifecyclePolicyGroup.md | 6 +- .../Groups/Get-EntraBetaDeletedGroup.md | 6 +- .../Groups/Get-EntraBetaGroup.md | 6 +- .../Get-EntraBetaGroupAppRoleAssignment.md | 6 +- .../Get-EntraBetaGroupLifecyclePolicy.md | 6 +- .../Groups/Get-EntraBetaGroupMember.md | 6 +- .../Groups/Get-EntraBetaGroupOwner.md | 6 +- .../Get-EntraBetaGroupPermissionGrant.md | 6 +- .../Get-EntraBetaLifecyclePolicyGroup.md | 6 +- .../Groups/Get-EntraBetaObjectByObjectId.md | 6 +- .../Groups/Get-EntraBetaObjectSetting.md | 6 +- .../Groups/New-EntraBetaGroup.md | 6 +- .../New-EntraBetaGroupAppRoleAssignment.md | 6 +- .../New-EntraBetaGroupLifecyclePolicy.md | 6 +- .../Groups/New-EntraBetaObjectSetting.md | 6 +- .../Groups/Remove-EntraBetaGroup.md | 6 +- .../Remove-EntraBetaGroupAppRoleAssignment.md | 6 +- .../Remove-EntraBetaGroupLifecyclePolicy.md | 6 +- .../Groups/Remove-EntraBetaGroupMember.md | 6 +- .../Groups/Remove-EntraBetaGroupOwner.md | 6 +- .../Remove-EntraBetaLifecyclePolicyGroup.md | 6 +- .../Groups/Remove-EntraBetaObjectSetting.md | 6 +- .../Groups/Reset-EntraBetaLifeCycleGroup.md | 6 +- ...lect-EntraBetaGroupIdsContactIsMemberOf.md | 6 +- ...Select-EntraBetaGroupIdsGroupIsMemberOf.md | 6 +- .../Select-EntraBetaGroupIdsUserIsMemberOf.md | 6 +- .../Groups/Set-EntraBetaGroup.md | 6 +- .../Set-EntraBetaGroupLifecyclePolicy.md | 6 +- .../Groups/Set-EntraBetaObjectSetting.md | 6 +- ...ntraBetaPrivateAccessApplicationSegment.md | 6 ++ ...ntraBetaPrivateAccessApplicationSegment.md | 6 ++ ...ntraBetaPrivateAccessApplicationSegment.md | 6 ++ ...traBetaApplicationSignInDetailedSummary.md | 6 +- .../Get-EntraBetaApplicationSignInSummary.md | 6 +- .../Reports/Get-EntraBetaAuditDirectoryLog.md | 6 +- .../Reports/Get-EntraBetaAuditSignInLog.md | 6 +- ...BetaFeatureRolloutPolicyDirectoryObject.md | 6 +- .../Add-EntraBetaServicePrincipalPolicy.md | 6 +- .../Get-EntraBetaAuthorizationPolicy.md | 6 +- .../Get-EntraBetaConditionalAccessPolicy.md | 6 +- .../Get-EntraBetaFeatureRolloutPolicy.md | 6 +- .../SignIns/Get-EntraBetaIdentityProvider.md | 6 +- .../Get-EntraBetaNamedLocationPolicy.md | 6 +- .../Get-EntraBetaOAuth2PermissionGrant.md | 6 +- ...et-EntraBetaPermissionGrantConditionSet.md | 6 +- .../Get-EntraBetaPermissionGrantPolicy.md | 6 +- .../SignIns/Get-EntraBetaPolicy.md | 6 +- .../Get-EntraBetaPolicyAppliedObject.md | 6 +- .../Get-EntraBetaServicePrincipalPolicy.md | 6 +- .../Get-EntraBetaTrustFrameworkPolicy.md | 6 +- ...et-EntraBetaTrustedCertificateAuthority.md | 6 +- .../New-EntraBetaConditionalAccessPolicy.md | 6 +- .../New-EntraBetaFeatureRolloutPolicy.md | 6 +- .../SignIns/New-EntraBetaIdentityProvider.md | 6 +- .../SignIns/New-EntraBetaInvitation.md | 6 +- .../New-EntraBetaNamedLocationPolicy.md | 6 +- .../New-EntraBetaOauth2PermissionGrant.md | 6 +- ...ew-EntraBetaPermissionGrantConditionSet.md | 6 +- .../New-EntraBetaPermissionGrantPolicy.md | 6 +- .../SignIns/New-EntraBetaPolicy.md | 6 +- .../New-EntraBetaTrustFrameworkPolicy.md | 6 +- ...ew-EntraBetaTrustedCertificateAuthority.md | 6 +- ...Remove-EntraBetaConditionalAccessPolicy.md | 6 +- .../Remove-EntraBetaFeatureRolloutPolicy.md | 6 +- ...BetaFeatureRolloutPolicyDirectoryObject.md | 6 +- .../Remove-EntraBetaIdentityProvider.md | 6 +- .../Remove-EntraBetaNamedLocationPolicy.md | 6 +- .../Remove-EntraBetaOAuth2PermissionGrant.md | 6 +- ...ve-EntraBetaPermissionGrantConditionSet.md | 6 +- .../Remove-EntraBetaPermissionGrantPolicy.md | 6 +- .../SignIns/Remove-EntraBetaPolicy.md | 6 +- .../Remove-EntraBetaServicePrincipalPolicy.md | 6 +- .../Remove-EntraBetaTrustFrameworkPolicy.md | 6 +- ...ve-EntraBetaTrustedCertificateAuthority.md | 6 +- .../Set-EntraBetaAuthorizationPolicy.md | 6 +- .../Set-EntraBetaConditionalAccessPolicy.md | 6 +- .../Set-EntraBetaFeatureRolloutPolicy.md | 6 +- .../SignIns/Set-EntraBetaIdentityProvider.md | 6 +- .../Set-EntraBetaNamedLocationPolicy.md | 6 +- ...et-EntraBetaPermissionGrantConditionSet.md | 6 +- .../Set-EntraBetaPermissionGrantPolicy.md | 6 +- .../SignIns/Set-EntraBetaPolicy.md | 6 +- .../Set-EntraBetaTrustFrameworkPolicy.md | 6 +- ...et-EntraBetaTrustedCertificateAuthority.md | 6 +- .../Users/Get-EntraBetaUser.md | 6 +- .../Get-EntraBetaUserAppRoleAssignment.md | 6 +- .../Users/Get-EntraBetaUserCreatedObject.md | 6 +- .../Users/Get-EntraBetaUserDirectReport.md | 6 +- .../Users/Get-EntraBetaUserExtension.md | 6 +- .../Users/Get-EntraBetaUserLicenseDetail.md | 6 +- .../Users/Get-EntraBetaUserManager.md | 6 +- .../Users/Get-EntraBetaUserMembership.md | 6 +- .../Get-EntraBetaUserOAuth2PermissionGrant.md | 6 +- .../Users/Get-EntraBetaUserOwnedDevice.md | 6 +- .../Users/Get-EntraBetaUserOwnedObject.md | 6 +- .../Get-EntraBetaUserRegisteredDevice.md | 6 +- .../Users/Get-EntraBetaUserThumbnailPhoto.md | 6 +- .../Users/New-EntraBetaUser.md | 6 +- .../New-EntraBetaUserAppRoleAssignment.md | 6 +- .../Users/Remove-EntraBetaUser.md | 6 +- .../Remove-EntraBetaUserAppRoleAssignment.md | 6 +- .../Users/Remove-EntraBetaUserExtension.md | 6 +- .../Users/Remove-EntraBetaUserManager.md | 6 +- .../Users/Set-EntraBetaUser.md | 6 +- .../Users/Set-EntraBetaUserExtension.md | 6 +- .../Users/Set-EntraBetaUserLicense.md | 6 +- .../Users/Set-EntraBetaUserManager.md | 6 +- .../Users/Set-EntraBetaUserPassword.md | 6 +- .../Users/Set-EntraBetaUserThumbnailPhoto.md | 6 +- .../Update-EntraBetaSignedInUserPassword.md | 6 +- .../Update-EntraBetaUserFromFederated.md | 6 +- .../Applications/Add-EntraApplicationOwner.md | 6 +- ...ncipalDelegatedPermissionClassification.md | 6 +- .../Add-EntraServicePrincipalOwner.md | 6 +- .../Applications/Get-EntraApplication.md | 6 +- .../Get-EntraApplicationExtensionProperty.md | 6 +- .../Get-EntraApplicationKeyCredential.md | 6 +- .../Applications/Get-EntraApplicationLogo.md | 6 +- .../Applications/Get-EntraApplicationOwner.md | 6 +- .../Get-EntraApplicationPasswordCredential.md | 6 +- .../Get-EntraApplicationServiceEndpoint.md | 6 +- .../Get-EntraApplicationTemplate.md | 6 +- .../Get-EntraDeletedApplication.md | 6 +- .../Applications/Get-EntraServicePrincipal.md | 6 +- ...-EntraServicePrincipalAppRoleAssignedTo.md | 6 +- ...-EntraServicePrincipalAppRoleAssignment.md | 6 +- .../Get-EntraServicePrincipalCreatedObject.md | 6 +- ...ncipalDelegatedPermissionClassification.md | 6 +- .../Get-EntraServicePrincipalKeyCredential.md | 6 +- .../Get-EntraServicePrincipalMembership.md | 6 +- ...raServicePrincipalOAuth2PermissionGrant.md | 6 +- .../Get-EntraServicePrincipalOwnedObject.md | 6 +- .../Get-EntraServicePrincipalOwner.md | 6 +- ...EntraServicePrincipalPasswordCredential.md | 6 +- .../Applications/New-EntraApplication.md | 6 +- .../New-EntraApplicationExtensionProperty.md | 6 +- ...EntraApplicationFromApplicationTemplate.md | 6 +- .../Applications/New-EntraApplicationKey.md | 6 +- .../New-EntraApplicationKeyCredential.md | 6 +- .../New-EntraApplicationPassword.md | 6 +- .../New-EntraApplicationPasswordCredential.md | 6 +- .../Applications/New-EntraServicePrincipal.md | 6 +- ...-EntraServicePrincipalAppRoleAssignment.md | 6 +- .../New-EntraServicePrincipalKeyCredential.md | 6 +- ...EntraServicePrincipalPasswordCredential.md | 6 +- .../Applications/Remove-EntraApplication.md | 6 +- ...emove-EntraApplicationExtensionProperty.md | 6 +- .../Remove-EntraApplicationKey.md | 6 +- .../Remove-EntraApplicationKeyCredential.md | 6 +- .../Remove-EntraApplicationOwner.md | 6 +- .../Remove-EntraApplicationPassword.md | 6 +- ...move-EntraApplicationPasswordCredential.md | 6 +- ...emove-EntraApplicationVerifiedPublisher.md | 6 +- .../Remove-EntraDeletedApplication.md | 6 +- .../Remove-EntraDeletedDirectoryObject.md | 6 +- .../Remove-EntraServicePrincipal.md | 6 +- ...-EntraServicePrincipalAppRoleAssignment.md | 6 +- ...ncipalDelegatedPermissionClassification.md | 6 +- ...move-EntraServicePrincipalKeyCredential.md | 6 +- .../Remove-EntraServicePrincipalOwner.md | 6 +- ...EntraServicePrincipalPasswordCredential.md | 6 +- .../Restore-EntraDeletedApplication.md | 6 +- ...EntraGroupIdsServicePrincipalIsMemberOf.md | 6 +- .../Applications/Set-EntraApplication.md | 6 +- .../Applications/Set-EntraApplicationLogo.md | 6 +- .../Set-EntraApplicationVerifiedPublisher.md | 6 +- .../Applications/Set-EntraServicePrincipal.md | 6 +- .../Authentication/Add-EntraEnvironment.md | 6 +- .../Authentication/Connect-Entra.md | 8 +-- .../Authentication/Disconnect-Entra.md | 6 +- .../Authentication/Find-EntraPermission.md | 6 +- .../Authentication/Get-EntraContext.md | 6 +- .../Authentication/Get-EntraEnvironment.md | 6 +- ...et-EntraStrongAuthenticationMethodByUpn.md | 6 +- ...Revoke-EntraSignedInUserAllRefreshToken.md | 6 +- .../Revoke-EntraUserAllRefreshToken.md | 6 +- .../Add-EntraAdministrativeUnitMember.md | 6 +- ...SecurityAttributeDefinitionAllowedValue.md | 6 +- .../Add-EntraDeviceRegisteredOwner.md | 6 +- .../Add-EntraDeviceRegisteredUser.md | 6 +- .../Add-EntraDirectoryRoleMember.md | 6 +- .../Add-EntraScopedRoleMembership.md | 6 +- .../Confirm-EntraDomain.md | 6 +- .../Enable-EntraDirectoryRole.md | 6 +- .../Get-CrossCloudVerificationCode.md | 6 +- .../Get-EntraAccountSku.md | 6 +- .../Get-EntraAdministrativeUnit.md | 6 +- .../Get-EntraAdministrativeUnitMember.md | 6 +- .../Get-EntraAttributeSet.md | 6 +- .../DirectoryManagement/Get-EntraContact.md | 6 +- .../Get-EntraContactDirectReport.md | 6 +- .../Get-EntraContactManager.md | 6 +- .../Get-EntraContactMembership.md | 6 +- .../Get-EntraContactThumbnailPhoto.md | 6 +- .../DirectoryManagement/Get-EntraContract.md | 6 +- ...-EntraCustomSecurityAttributeDefinition.md | 6 +- ...SecurityAttributeDefinitionAllowedValue.md | 6 +- .../Get-EntraDeletedDirectoryObject.md | 6 +- .../DirectoryManagement/Get-EntraDevice.md | 6 +- .../Get-EntraDeviceRegisteredOwner.md | 6 +- .../Get-EntraDeviceRegisteredUser.md | 6 +- .../Get-EntraDirSyncConfiguration.md | 6 +- .../Get-EntraDirSyncFeature.md | 6 +- ...ectoryObjectOnPremisesProvisioningError.md | 6 +- .../Get-EntraDirectoryRole.md | 6 +- .../Get-EntraDirectoryRoleMember.md | 6 +- .../Get-EntraDirectoryRoleTemplate.md | 6 +- .../DirectoryManagement/Get-EntraDomain.md | 6 +- .../Get-EntraDomainFederationSettings.md | 6 +- .../Get-EntraDomainNameReference.md | 6 +- ...t-EntraDomainServiceConfigurationRecord.md | 6 +- .../Get-EntraDomainVerificationDnsRecord.md | 6 +- .../Get-EntraExtensionProperty.md | 6 +- .../Get-EntraFederationProperty.md | 6 +- .../Get-EntraObjectByObjectId.md | 6 +- .../Get-EntraPartnerInformation.md | 6 +- .../Get-EntraPasswordPolicy.md | 6 +- .../Get-EntraScopedRoleMembership.md | 6 +- .../Get-EntraSubscribedSku.md | 6 +- .../Get-EntraTenantDetail.md | 6 +- .../New-EntraAdministrativeUnit.md | 6 +- .../New-EntraAttributeSet.md | 6 +- ...-EntraCustomSecurityAttributeDefinition.md | 6 +- .../DirectoryManagement/New-EntraDevice.md | 6 +- .../DirectoryManagement/New-EntraDomain.md | 6 +- .../Remove-EntraAdministrativeUnit.md | 6 +- .../Remove-EntraAdministrativeUnitMember.md | 6 +- .../Remove-EntraContact.md | 6 +- .../DirectoryManagement/Remove-EntraDevice.md | 6 +- .../Remove-EntraDeviceRegisteredOwner.md | 6 +- .../Remove-EntraDeviceRegisteredUser.md | 6 +- .../Remove-EntraDirectoryRoleMember.md | 6 +- .../DirectoryManagement/Remove-EntraDomain.md | 6 +- .../Remove-EntraExternalDomainFederation.md | 6 +- .../Remove-EntraScopedRoleMembership.md | 6 +- .../Restore-EntraDeletedDirectoryObject.md | 6 +- .../Set-EntraAdministrativeUnit.md | 6 +- .../Set-EntraAttributeSet.md | 6 +- ...-EntraCustomSecurityAttributeDefinition.md | 6 +- ...SecurityAttributeDefinitionAllowedValue.md | 6 +- .../DirectoryManagement/Set-EntraDevice.md | 6 +- .../Set-EntraDirSyncConfiguration.md | 6 +- .../Set-EntraDirSyncEnabled.md | 6 +- .../Set-EntraDirSyncFeature.md | 6 +- .../DirectoryManagement/Set-EntraDomain.md | 6 +- .../Set-EntraDomainFederationSettings.md | 6 +- .../Set-EntraPartnerInformation.md | 6 +- .../Set-EntraTenantDetail.md | 6 +- .../Get-EntraDirectoryRoleAssignment.md | 6 +- .../Get-EntraDirectoryRoleDefinition.md | 6 +- .../New-EntraDirectoryRoleAssignment.md | 6 +- .../New-EntraDirectoryRoleDefinition.md | 6 +- .../Remove-EntraDirectoryRoleAssignment.md | 6 +- .../Remove-EntraDirectoryRoleDefinition.md | 6 +- .../Set-EntraDirectoryRoleDefinition.md | 6 +- .../Groups/Add-EntraGroupMember.md | 6 +- .../Groups/Add-EntraGroupOwner.md | 6 +- .../Groups/Add-EntraLifecyclePolicyGroup.md | 6 +- .../Groups/Get-EntraDeletedGroup.md | 6 +- .../Groups/Get-EntraGroup.md | 6 +- .../Groups/Get-EntraGroupAppRoleAssignment.md | 6 +- .../Groups/Get-EntraGroupLifecyclePolicy.md | 6 +- .../Groups/Get-EntraGroupMember.md | 6 +- .../Groups/Get-EntraGroupOwner.md | 6 +- .../Groups/Get-EntraGroupPermissionGrant.md | 6 +- .../Groups/Get-EntraLifecyclePolicyGroup.md | 6 +- .../Groups/Get-EntraObjectSetting.md | 6 +- .../Groups/New-EntraGroup.md | 6 +- .../Groups/New-EntraGroupAppRoleAssignment.md | 6 +- .../Groups/New-EntraGroupLifecyclePolicy.md | 6 +- .../Groups/Remove-EntraGroup.md | 6 +- .../Remove-EntraGroupAppRoleAssignment.md | 6 +- .../Remove-EntraGroupLifecyclePolicy.md | 6 +- .../Groups/Remove-EntraGroupMember.md | 6 +- .../Groups/Remove-EntraGroupOwner.md | 6 +- .../Remove-EntraLifecyclePolicyGroup.md | 6 +- .../Groups/Reset-EntraLifeCycleGroup.md | 6 +- .../Select-EntraGroupIdsContactIsMemberOf.md | 6 +- .../Select-EntraGroupIdsGroupIsMemberOf.md | 6 +- .../Select-EntraGroupIdsUserIsMemberOf.md | 6 +- .../Groups/Set-EntraGroup.md | 6 +- .../Groups/Set-EntraGroupLifecyclePolicy.md | 6 +- .../Reports/Get-EntraAuditDirectoryLog.md | 4 +- .../Reports/Get-EntraAuditSignInLog.md | 4 +- .../SignIns/Get-EntraAuthorizationPolicy.md | 6 +- .../Get-EntraConditionalAccessPolicy.md | 6 +- .../SignIns/Get-EntraFeatureRolloutPolicy.md | 6 +- .../SignIns/Get-EntraIdentityProvider.md | 6 +- .../SignIns/Get-EntraNamedLocationPolicy.md | 6 +- .../SignIns/Get-EntraOAuth2PermissionGrant.md | 6 +- .../Get-EntraPermissionGrantConditionSet.md | 6 +- .../SignIns/Get-EntraPermissionGrantPolicy.md | 6 +- .../SignIns/Get-EntraPolicy.md | 6 +- .../Get-EntraTrustedCertificateAuthority.md | 6 +- .../New-EntraConditionalAccessPolicy.md | 6 +- .../SignIns/New-EntraFeatureRolloutPolicy.md | 6 +- .../SignIns/New-EntraIdentityProvider.md | 6 +- .../SignIns/New-EntraNamedLocationPolicy.md | 6 +- .../SignIns/New-EntraOauth2PermissionGrant.md | 6 +- .../New-EntraPermissionGrantConditionSet.md | 6 +- .../SignIns/New-EntraPermissionGrantPolicy.md | 6 +- .../SignIns/New-EntraPolicy.md | 6 +- .../New-EntraTrustedCertificateAuthority.md | 6 +- .../Remove-EntraConditionalAccessPolicy.md | 6 +- .../Remove-EntraFeatureRolloutPolicy.md | 6 +- ...ntraFeatureRolloutPolicyDirectoryObject.md | 6 +- .../SignIns/Remove-EntraIdentityProvider.md | 6 +- .../Remove-EntraNamedLocationPolicy.md | 6 +- .../Remove-EntraOAuth2PermissionGrant.md | 6 +- ...Remove-EntraPermissionGrantConditionSet.md | 6 +- .../Remove-EntraPermissionGrantPolicy.md | 6 +- .../SignIns/Remove-EntraPolicy.md | 6 +- ...Remove-EntraTrustedCertificateAuthority.md | 6 +- .../SignIns/Set-EntraAuthorizationPolicy.md | 6 +- .../Set-EntraConditionalAccessPolicy.md | 6 +- .../SignIns/Set-EntraFeatureRolloutPolicy.md | 6 +- .../SignIns/Set-EntraIdentityProvider.md | 6 +- .../SignIns/Set-EntraNamedLocationPolicy.md | 6 +- .../Set-EntraPermissionGrantConditionSet.md | 6 +- .../SignIns/Set-EntraPermissionGrantPolicy.md | 6 +- .../SignIns/Set-EntraPolicy.md | 4 +- .../Set-EntraTrustedCertificateAuthority.md | 6 +- .../Users/Get-EntraUser.md | 6 +- .../Users/Get-EntraUserAppRoleAssignment.md | 6 +- .../Users/Get-EntraUserCreatedObject.md | 6 +- .../Users/Get-EntraUserDirectReport.md | 6 +- .../Users/Get-EntraUserExtension.md | 6 +- .../Users/Get-EntraUserLicenseDetail.md | 6 +- .../Users/Get-EntraUserManager.md | 6 +- .../Users/Get-EntraUserMembership.md | 6 +- .../Get-EntraUserOAuth2PermissionGrant.md | 6 +- .../Users/Get-EntraUserOwnedDevice.md | 6 +- .../Users/Get-EntraUserOwnedObject.md | 6 +- .../Users/Get-EntraUserRegisteredDevice.md | 6 +- .../Users/Get-EntraUserThumbnailPhoto.md | 6 +- .../Users/New-EntraUser.md | 6 +- .../Users/New-EntraUserAppRoleAssignment.md | 6 +- .../Users/Remove-EntraUser.md | 6 +- .../Remove-EntraUserAppRoleAssignment.md | 6 +- .../Users/Remove-EntraUserExtension.md | 6 +- .../Users/Remove-EntraUserManager.md | 6 +- .../Users/Set-EntraUser.md | 6 +- .../Users/Set-EntraUserExtension.md | 6 +- .../Users/Set-EntraUserLicense.md | 6 +- .../Users/Set-EntraUserManager.md | 6 +- .../Users/Set-EntraUserPassword.md | 6 +- .../Users/Set-EntraUserThumbnailPhoto.md | 6 +- .../Users/Update-EntraSignedInUserPassword.md | 6 +- .../Users/Update-EntraUserFromFederated.md | 6 +- ...rt-apps-with-expiring-secrets-modified.ps1 | 2 +- src/CompatibilityAdapterBuilder.ps1 | 6 +- src/EntraModuleBuilder.ps1 | 44 ++++++------ src/EntraModuleSplitter.ps1 | 10 +-- test/Common-Functions.ps1 | 72 +++++++++---------- .../Add-EntraApplicationOwner.Tests.ps1 | 12 ++-- ...elegatedPermissionClassification.Tests.ps1 | 10 +-- .../Add-EntraServicePrincipalOwner.Tests.ps1 | 16 ++--- .../Get-EntraApplication.Tests.ps1 | 22 +++--- ...ntraApplicationExtensionProperty.Tests.ps1 | 14 ++-- ...et-EntraApplicationKeyCredential.Tests.ps1 | 10 +-- .../Get-EntraApplicationLogo.Tests.ps1 | 12 ++-- .../Get-EntraApplicationModule.Tests.ps1 | 6 +- .../Get-EntraApplicationOwner.Tests.ps1 | 10 +-- ...traApplicationPasswordCredential.Tests.ps1 | 12 ++-- .../Get-EntraApplicationTemplate.Tests.ps1 | 16 ++--- .../Get-EntraDeletedApplication.Tests.ps1 | 18 ++--- .../Get-EntraServicePrincipal.Tests.ps1 | 22 +++--- ...ervicePrincipalAppRoleAssignedTo.Tests.ps1 | 18 ++--- ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 18 ++--- ...elegatedPermissionClassification.Tests.ps1 | 12 ++-- ...traServicePrincipalKeyCredential.Tests.ps1 | 12 ++-- ...-EntraServicePrincipalMembership.Tests.ps1 | 18 ++--- ...cePrincipalOAuth2PermissionGrant.Tests.ps1 | 18 ++--- ...EntraServicePrincipalOwnedObject.Tests.ps1 | 16 ++--- .../Get-EntraServicePrincipalOwner.Tests.ps1 | 18 ++--- ...rvicePrincipalPasswordCredential.Tests.ps1 | 12 ++-- test/Entra/Applications/Invalid.Tests.ps1 | 20 +++--- test/Entra/Applications/Module.Tests.ps1 | 18 ++--- .../New-EntraApplication.Tests.ps1 | 10 +-- ...ntraApplicationExtensionProperty.Tests.ps1 | 12 ++-- ...plicationFromApplicationTemplate.Tests.ps1 | 8 +-- .../New-EntraApplicationPassword.Tests.ps1 | 10 +-- ...traApplicationPasswordCredential.Tests.ps1 | 10 +-- .../New-EntraServicePrincipal.Tests.ps1 | 10 +-- ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 10 +-- ...rvicePrincipalPasswordCredential.Tests.ps1 | 12 ++-- .../Remove-EntraApplication.Tests.ps1 | 14 ++-- ...ntraApplicationExtensionProperty.Tests.ps1 | 14 ++-- .../Remove-EntraApplicationOwner.Tests.ps1 | 16 ++--- .../Remove-EntraApplicationPassword.Tests.ps1 | 12 ++-- ...traApplicationPasswordCredential.Tests.ps1 | 14 ++-- .../Remove-EntraDeletedApplication.Tests.ps1 | 12 ++-- ...move-EntraDeletedDirectoryObject.Tests.ps1 | 12 ++-- .../Remove-EntraServicePrincipal.Tests.ps1 | 14 ++-- ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 14 ++-- ...elegatedPermissionClassification.Tests.ps1 | 12 ++-- ...emove-EntraServicePrincipalOwner.Tests.ps1 | 16 ++--- ...rvicePrincipalPasswordCredential.Tests.ps1 | 14 ++-- .../Restore-EntraDeletedApplication.Tests.ps1 | 10 +-- ...oupIdsServicePrincipalIsMemberOf.Tests.ps1 | 10 +-- .../Set-EntraApplication.Tests.ps1 | 14 ++-- .../Set-EntraApplicationLogo.Tests.ps1 | 12 ++-- .../Set-EntraServicePrincipal.Tests.ps1 | 18 ++--- test/Entra/Applications/Valid.Tests.ps1 | 22 +++--- .../Authentication/Connect-Entra.Tests.ps1 | 14 ++-- .../Authentication/Disconnect-Entra.Tests.ps1 | 8 +-- test/Entra/Authentication/Invalid.Tests.ps1 | 20 +++--- test/Entra/Authentication/Module.Tests.ps1 | 18 ++--- ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 12 ++-- ...EntraSignedInUserAllRefreshToken.Tests.ps1 | 10 +-- .../Revoke-EntraUserAllRefreshToken.Tests.ps1 | 14 ++-- test/Entra/Authentication/Valid.Tests.ps1 | 22 +++--- ...dd-EntraAdministrativeUnitMember.Tests.ps1 | 12 ++-- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 10 +-- .../Add-EntraDeviceRegisteredOwner.Tests.ps1 | 18 ++--- .../Add-EntraDeviceRegisteredUser.Tests.ps1 | 18 ++--- .../Add-EntraDirectoryRoleMember.Tests.ps1 | 16 ++--- .../Add-EntraScopedRoleMembership.Tests.ps1 | 10 +-- .../Enable-EntraDirectoryRole.Tests.ps1 | 10 +-- .../Get-EntraAccountSku.Tests.ps1 | 10 +-- .../Get-EntraAdministrativeUnit.Tests.ps1 | 16 ++--- ...et-EntraAdministrativeUnitMember.Tests.ps1 | 14 ++-- .../Get-EntraAttributeSet.Tests.ps1 | 14 ++-- .../Get-EntraContact.Tests.ps1 | 20 +++--- .../Get-EntraContactMembership.Tests.ps1 | 18 ++--- ...ustomSecurityAttributeDefinition.Tests.ps1 | 12 ++-- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 14 ++-- .../Get-EntraDeletedDirectoryObject.Tests.ps1 | 10 +-- .../Get-EntraDevice.Tests.ps1 | 22 +++--- .../Get-EntraDeviceRegisteredOwner.Tests.ps1 | 18 ++--- .../Get-EntraDeviceRegisteredUser.Tests.ps1 | 16 ++--- .../Get-EntraDirSyncConfiguration.Tests.ps1 | 10 +-- .../Get-EntraDirSyncFeature.Tests.ps1 | 12 ++-- ...bjectOnPremisesProvisioningError.Tests.ps1 | 12 ++-- .../Get-EntraDirectoryRole.Tests.ps1 | 16 ++--- .../Get-EntraDirectoryRoleMember.Tests.ps1 | 14 ++-- .../Get-EntraDirectoryRoleTemplate.Tests.ps1 | 12 ++-- .../Get-EntraDomain.Tests.ps1 | 16 ++--- ...et-EntraDomainFederationSettings.Tests.ps1 | 10 +-- .../Get-EntraDomainNameReference.Tests.ps1 | 12 ++-- ...DomainServiceConfigurationRecord.Tests.ps1 | 16 ++--- ...EntraDomainVerificationDnsRecord.Tests.ps1 | 16 ++--- .../Get-EntraFederationProperty.Tests.ps1 | 12 ++-- .../Get-EntraObjectByObjectId.Tests.ps1 | 14 ++-- .../Get-EntraPasswordPolicy.Tests.ps1 | 10 +-- .../Get-EntraScopedRoleMembership.Tests.ps1 | 12 ++-- .../Get-EntraSubscribedSku.Tests.ps1 | 16 ++--- .../Get-EntraTenantDetail.Tests.ps1 | 14 ++-- .../DirectoryManagement/Invalid.Tests.ps1 | 20 +++--- .../DirectoryManagement/Module.Tests.ps1 | 18 ++--- .../New-EntraAdministrativeUnit.Tests.ps1 | 10 +-- .../New-EntraAttributeSet.Tests.ps1 | 12 ++-- ...ustomSecurityAttributeDefinition.Tests.ps1 | 10 +-- .../New-EntraDomain.Tests.ps1 | 10 +-- .../Remove-EntraAdministrativeUnit.Tests.ps1 | 10 +-- ...ve-EntraAdministrativeUnitMember.Tests.ps1 | 12 ++-- .../Remove-EntraDevice.Tests.ps1 | 14 ++-- ...emove-EntraDeviceRegisteredOwner.Tests.ps1 | 18 ++--- ...Remove-EntraDeviceRegisteredUser.Tests.ps1 | 18 ++--- .../Remove-EntraDirectoryRoleMember.Tests.ps1 | 16 ++--- .../Remove-EntraDomain.Tests.ps1 | 12 ++-- ...Remove-EntraScopedRoleMembership.Tests.ps1 | 12 ++-- ...tore-EntraDeletedDirectoryObject.Tests.ps1 | 12 ++-- .../Set-EntraAdministrativeUnit.Tests.ps1 | 12 ++-- .../Set-EntraAttributeSet.Tests.ps1 | 12 ++-- ...ustomSecurityAttributeDefinition.Tests.ps1 | 10 +-- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 10 +-- .../Set-EntraDevice.Tests.ps1 | 14 ++-- .../Set-EntraDirSyncConfiguration.Tests.ps1 | 12 ++-- .../Set-EntraDirSyncEnabled.Tests.ps1 | 10 +-- .../Set-EntraDirSyncFeature.Tests.ps1 | 12 ++-- .../Set-EntraDomain.Tests.ps1 | 12 ++-- ...et-EntraDomainFederationSettings.Tests.ps1 | 14 ++-- .../Set-EntraPartnerInformation.Tests.ps1 | 12 ++-- .../Set-EntraTenantDetail.Tests.ps1 | 12 ++-- .../Entra/DirectoryManagement/Valid.Tests.ps1 | 22 +++--- test/Entra/Entra.Tests.ps1 | 36 +++++----- ...Get-EntraDirectoryRoleAssignment.Tests.ps1 | 20 +++--- ...Get-EntraDirectoryRoleDefinition.Tests.ps1 | 22 +++--- test/Entra/Governance/Invalid.Tests.ps1 | 20 +++--- test/Entra/Governance/Module.Tests.ps1 | 18 ++--- ...New-EntraDirectoryRoleAssignment.Tests.ps1 | 10 +-- ...New-EntraDirectoryRoleDefinition.Tests.ps1 | 10 +-- ...ove-EntraDirectoryRoleAssignment.Tests.ps1 | 14 ++-- ...ove-EntraDirectoryRoleDefinition.Tests.ps1 | 14 ++-- ...Set-EntraDirectoryRoleDefinition.Tests.ps1 | 14 ++-- test/Entra/Governance/Valid.Tests.ps1 | 22 +++--- .../Groups/Add-EntraGroupMember.Tests.ps1 | 14 ++-- .../Groups/Add-EntraGroupOwner.Tests.ps1 | 12 ++-- .../Add-EntraLifecyclePolicyGroup.Tests.ps1 | 12 ++-- .../Groups/Get-EntraDeletedGroup.Tests.ps1 | 22 +++--- test/Entra/Groups/Get-EntraGroup.Tests.ps1 | 18 ++--- .../Get-EntraGroupAppRoleAssignment.Tests.ps1 | 18 ++--- .../Get-EntraGroupLifecyclePolicy.Tests.ps1 | 14 ++-- .../Groups/Get-EntraGroupMember.Tests.ps1 | 16 ++--- .../Groups/Get-EntraGroupOwner.Tests.ps1 | 18 ++--- .../Get-EntraLifecyclePolicyGroup.Tests.ps1 | 14 ++-- .../Groups/Get-EntraObjectSetting.Tests.ps1 | 14 ++-- test/Entra/Groups/Invalid.Tests.ps1 | 20 +++--- test/Entra/Groups/Module.Tests.ps1 | 18 ++--- test/Entra/Groups/New-EntraGroup.Tests.ps1 | 10 +-- .../New-EntraGroupAppRoleAssignment.Tests.ps1 | 12 ++-- .../New-EntraGroupLifecyclePolicy.Tests.ps1 | 10 +-- test/Entra/Groups/Remove-EntraGroup.Tests.ps1 | 14 ++-- ...move-EntraGroupAppRoleAssignment.Tests.ps1 | 14 ++-- ...Remove-EntraGroupLifecyclePolicy.Tests.ps1 | 14 ++-- .../Groups/Remove-EntraGroupMember.Tests.ps1 | 12 ++-- .../Groups/Remove-EntraGroupOwner.Tests.ps1 | 12 ++-- ...Remove-EntraLifecyclePolicyGroup.Tests.ps1 | 12 ++-- .../Reset-EntraLifeCycleGroup.Tests.ps1 | 12 ++-- ...t-EntraGroupIdsContactIsMemberOf.Tests.ps1 | 10 +-- ...ect-EntraGroupIdsGroupIsMemberOf.Tests.ps1 | 12 ++-- ...lect-EntraGroupIdsUserIsMemberOf.Tests.ps1 | 10 +-- test/Entra/Groups/Set-EntraGroup.Tests.ps1 | 14 ++-- .../Set-EntraGroupLifecyclePolicy.Tests.ps1 | 10 +-- test/Entra/Groups/Valid.Tests.ps1 | 22 +++--- test/Entra/New-EntraInvitation.Tests.ps1 | 10 +-- .../Get-EntraAuditDirectoryLog.Tests.ps1 | 18 ++--- .../Reports/Get-EntraAuditSignInLog.Tests.ps1 | 20 +++--- test/Entra/Reports/Invalid.Tests.ps1 | 20 +++--- test/Entra/Reports/Module.Tests.ps1 | 18 ++--- test/Entra/Reports/Valid.Tests.ps1 | 22 +++--- .../Get-EntraAuthorizationPolicy.Tests.ps1 | 14 ++-- ...Get-EntraConditionalAccessPolicy.Tests.ps1 | 12 ++-- .../Get-EntraFeatureRolloutPolicy.Tests.ps1 | 16 ++--- .../Get-EntraIdentityProvider.Tests.ps1 | 14 ++-- .../Get-EntraOAuth2PermissionGrant.Tests.ps1 | 16 ++--- ...EntraPermissionGrantConditionSet.Tests.ps1 | 16 ++--- .../Get-EntraPermissionGrantPolicy.Tests.ps1 | 12 ++-- test/Entra/SignIns/Get-EntraPolicy.Tests.ps1 | 14 ++-- ...EntraTrustedCertificateAuthority.Tests.ps1 | 14 ++-- test/Entra/SignIns/Invalid.Tests.ps1 | 20 +++--- test/Entra/SignIns/Module.Tests.ps1 | 18 ++--- ...New-EntraConditionalAccessPolicy.Tests.ps1 | 14 ++-- .../New-EntraFeatureRolloutPolicy.Tests.ps1 | 10 +-- .../New-EntraIdentityProvider.Tests.ps1 | 10 +-- .../New-EntraNamedLocationPolicy.Tests.ps1 | 12 ++-- .../New-EntraOauth2PermissionGrant.Tests.ps1 | 10 +-- ...EntraPermissionGrantConditionSet.Tests.ps1 | 14 ++-- .../New-EntraPermissionGrantPolicy.Tests.ps1 | 10 +-- test/Entra/SignIns/New-EntraPolicy.Tests.ps1 | 10 +-- ...EntraTrustedCertificateAuthority.Tests.ps1 | 14 ++-- ...Remove-EntraFeatureRolloutPolicy.Tests.ps1 | 10 +-- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 10 +-- .../Remove-EntraIdentityProvider.Tests.ps1 | 14 ++-- .../Remove-EntraNamedLocationPolicy.Tests.ps1 | 12 ++-- ...emove-EntraOAuth2PermissionGrant.Tests.ps1 | 12 ++-- ...EntraPermissionGrantConditionSet.Tests.ps1 | 18 ++--- ...emove-EntraPermissionGrantPolicy.Tests.ps1 | 12 ++-- .../SignIns/Remove-EntraPolicy.Tests.ps1 | 10 +-- ...EntraTrustedCertificateAuthority.Tests.ps1 | 14 ++-- .../Set-EntraAuthorizationPolicy.Tests.ps1 | 10 +-- ...Set-EntraConditionalAccessPolicy.Tests.ps1 | 20 +++--- .../Set-EntraFeatureRolloutPolicy.Tests.ps1 | 10 +-- .../Set-EntraNamedLocationPolicy.Tests.ps1 | 14 ++-- ...EntraPermissionGrantConditionSet.Tests.ps1 | 22 +++--- .../Set-EntraPermissionGrantPolicy.Tests.ps1 | 10 +-- test/Entra/SignIns/Set-EntraPolicy.Tests.ps1 | 10 +-- ...EntraTrustedCertificateAuthority.Tests.ps1 | 14 ++-- test/Entra/SignIns/Valid.Tests.ps1 | 22 +++--- test/Entra/Users/Get-EntraUser.Tests.ps1 | 22 +++--- .../Get-EntraUserAppRoleAssignment.Tests.ps1 | 16 ++--- .../Get-EntraUserCreatedObject.Tests.ps1 | 18 ++--- .../Users/Get-EntraUserDirectReport.Tests.ps1 | 18 ++--- .../Users/Get-EntraUserExtension.Tests.ps1 | 14 ++-- .../Get-EntraUserLicenseDetail.Tests.ps1 | 14 ++-- .../Users/Get-EntraUserManager.Tests.ps1 | 14 ++-- .../Users/Get-EntraUserMembership.Tests.ps1 | 18 ++--- ...t-EntraUserOAuth2PermissionGrant.Tests.ps1 | 18 ++--- .../Users/Get-EntraUserOwnedDevice.Tests.ps1 | 16 ++--- .../Users/Get-EntraUserOwnedObject.Tests.ps1 | 18 ++--- .../Get-EntraUserRegisteredDevice.Tests.ps1 | 18 ++--- test/Entra/Users/Invalid.Tests.ps1 | 20 +++--- test/Entra/Users/Module.Tests.ps1 | 18 ++--- test/Entra/Users/New-EntraUser.Tests.ps1 | 10 +-- .../New-EntraUserAppRoleAssignment.Tests.ps1 | 12 ++-- test/Entra/Users/Remove-EntraUser.Tests.ps1 | 14 ++-- ...emove-EntraUserAppRoleAssignment.Tests.ps1 | 12 ++-- .../Users/Remove-EntraUserManager.Tests.ps1 | 14 ++-- test/Entra/Users/Set-EntraUser.Tests.ps1 | 16 ++--- .../Users/Set-EntraUserLicense.Tests.ps1 | 10 +-- .../Users/Set-EntraUserManager.Tests.ps1 | 14 ++-- .../Users/Set-EntraUserPassword.Tests.ps1 | 14 ++-- .../Set-EntraUserThumbnailPhoto.Tests.ps1 | 16 ++--- ...Update-EntraSignedInUserPassword.Tests.ps1 | 10 +-- .../Update-EntraUserFromFederated.Tests.ps1 | 14 ++-- test/Entra/Users/Valid.Tests.ps1 | 22 +++--- .../Add-EntraBetaApplicationPolicy.Tests.ps1 | 10 +-- .../Get-EntraBetaApplication.Tests.ps1 | 24 +++---- .../Get-EntraBetaApplicationLogo.Tests.ps1 | 10 +-- ...etaApplicationPasswordCredential.Tests.ps1 | 12 ++-- .../Get-EntraBetaApplicationPolicy.Tests.ps1 | 10 +-- ...Get-EntraBetaApplicationTemplate.Tests.ps1 | 16 ++--- ...taPasswordSingleSignOnCredential.Tests.ps1 | 14 ++-- .../Get-EntraBetaServicePrincipal.Tests.ps1 | 30 ++++---- ...aBetaServicePrincipalOwnedObject.Tests.ps1 | 20 +++--- .../New-EntraBetaApplication.Tests.ps1 | 10 +-- ...taPasswordSingleSignOnCredential.Tests.ps1 | 14 ++-- .../Remove-EntraBetaApplication.Tests.ps1 | 14 ++-- ...emove-EntraBetaApplicationPolicy.Tests.ps1 | 10 +-- ...taPasswordSingleSignOnCredential.Tests.ps1 | 14 ++-- .../Set-EntraBetaApplication.Tests.ps1 | 14 ++-- .../Set-EntraBetaApplicationLogo.Tests.ps1 | 10 +-- ...taPasswordSingleSignOnCredential.Tests.ps1 | 14 ++-- .../Set-EntraBetaServicePrincipal.Tests.ps1 | 12 ++-- ...aStrongAuthenticationMethodByUpn.Tests.ps1 | 12 ++-- ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 14 ++-- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 10 +-- ...d-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 18 ++--- ...dd-EntraBetaDeviceRegisteredUser.Tests.ps1 | 18 ++--- ...dd-EntraBetaScopedRoleMembership.Tests.ps1 | 12 ++-- .../Confirm-EntraBetaDomain.Tests.ps1 | 10 +-- .../Get-EntraBetaAccountSku.Tests.ps1 | 10 +-- .../Get-EntraBetaAdministrativeUnit.Tests.ps1 | 20 +++--- ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 18 ++--- .../Get-EntraBetaAttributeSet.Tests.ps1 | 14 ++-- ...ustomSecurityAttributeDefinition.Tests.ps1 | 12 ++-- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 20 +++--- .../Get-EntraBetaDevice.Tests.ps1 | 22 +++--- ...t-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 18 ++--- ...et-EntraBetaDeviceRegisteredUser.Tests.ps1 | 16 ++--- ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 10 +-- .../Get-EntraBetaDirSyncFeature.Tests.ps1 | 14 ++-- ...bjectOnPremisesProvisioningError.Tests.ps1 | 12 ++-- .../Get-EntraBetaDirectorySetting.Tests.ps1 | 16 ++--- ...ntraBetaDirectorySettingTemplate.Tests.ps1 | 14 ++-- ...ntraBetaDomainFederationSettings.Tests.ps1 | 12 ++-- .../Get-EntraBetaFederationProperty.Tests.ps1 | 12 ++-- .../Get-EntraBetaPasswordPolicy.Tests.ps1 | 10 +-- ...et-EntraBetaScopedRoleMembership.Tests.ps1 | 14 ++-- .../New-EntraBetaAdministrativeUnit.Tests.ps1 | 10 +-- ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 12 ++-- .../New-EntraBetaAttributeSet.Tests.ps1 | 12 ++-- ...ustomSecurityAttributeDefinition.Tests.ps1 | 10 +-- .../New-EntraBetaDirectorySetting.Tests.ps1 | 12 ++-- ...move-EntraBetaAdministrativeUnit.Tests.ps1 | 14 ++-- ...ntraBetaAdministrativeUnitMember.Tests.ps1 | 12 ++-- .../Remove-EntraBetaDevice.Tests.ps1 | 14 ++-- ...e-EntraBetaDeviceRegisteredOwner.Tests.ps1 | 16 ++--- ...ve-EntraBetaDeviceRegisteredUser.Tests.ps1 | 16 ++--- ...Remove-EntraBetaDirectorySetting.Tests.ps1 | 12 ++-- ...ve-EntraBetaScopedRoleMembership.Tests.ps1 | 14 ++-- .../Set-EntraBetaAdministrativeUnit.Tests.ps1 | 12 ++-- .../Set-EntraBetaAttributeSet.Tests.ps1 | 14 ++-- ...ustomSecurityAttributeDefinition.Tests.ps1 | 12 ++-- ...yAttributeDefinitionAllowedValue.Tests.ps1 | 12 ++-- .../Set-EntraBetaDevice.Tests.ps1 | 14 ++-- ...et-EntraBetaDirSyncConfiguration.Tests.ps1 | 12 ++-- .../Set-EntraBetaDirSyncEnabled.Tests.ps1 | 12 ++-- .../Set-EntraBetaDirSyncFeature.Tests.ps1 | 12 ++-- .../Set-EntraBetaDirectorySetting.Tests.ps1 | 18 ++--- ...ntraBetaDomainFederationSettings.Tests.ps1 | 14 ++-- .../Set-EntraBetaPartnerInformation.Tests.ps1 | 12 ++-- test/EntraBeta/EntraBeta.Tests.ps1 | 36 +++++----- test/EntraBeta/General.Tests.ps1 | 10 +-- .../Get-EntraBetaPrivilegedResource.Tests.ps1 | 22 +++--- ...ntraBetaPrivilegedRoleDefinition.Tests.ps1 | 16 ++--- ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 16 ++--- ...t-EntraBetaPrivilegedRoleSetting.Tests.ps1 | 22 +++--- .../Groups/Add-EntraBetaGroupMember.Tests.ps1 | 14 ++-- .../Groups/Add-EntraBetaGroupOwner.Tests.ps1 | 16 ++--- .../Get-EntraBetaDeletedGroup.Tests.ps1 | 22 +++--- .../Groups/Get-EntraBetaGroup.Tests.ps1 | 22 +++--- ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 18 ++--- ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 14 ++-- .../Groups/Get-EntraBetaGroupMember.Tests.ps1 | 16 ++--- .../Groups/Get-EntraBetaGroupOwner.Tests.ps1 | 18 ++--- .../Get-EntraBetaObjectSetting.Tests.ps1 | 14 ++-- .../Groups/New-EntraBetaGroup.Tests.ps1 | 10 +-- ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 12 ++-- .../New-EntraBetaObjectSetting.Tests.ps1 | 16 ++--- .../Groups/Remove-EntraBetaGroup.Tests.ps1 | 14 ++-- ...-EntraBetaGroupAppRoleAssignment.Tests.ps1 | 14 ++-- ...ve-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 14 ++-- .../Remove-EntraBetaGroupMember.Tests.ps1 | 12 ++-- .../Remove-EntraBetaGroupOwner.Tests.ps1 | 14 ++-- .../Remove-EntraBetaObjectSetting.Tests.ps1 | 10 +-- .../Groups/Set-EntraBetaGroup.Tests.ps1 | 14 ++-- ...et-EntraBetaGroupLifecyclePolicy.Tests.ps1 | 10 +-- .../Set-EntraBetaObjectSetting.Tests.ps1 | 16 ++--- ...ApplicationSignInDetailedSummary.Tests.ps1 | 12 ++-- ...ntraBetaApplicationSignInSummary.Tests.ps1 | 14 ++-- .../Get-EntraBetaAuditDirectoryLog.Tests.ps1 | 20 +++--- .../Get-EntraBetaAuditSignInLog.Tests.ps1 | 26 +++---- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 14 ++-- ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 10 +-- ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 16 ++--- ...t-EntraBetaPermissionGrantPolicy.Tests.ps1 | 12 ++-- .../SignIns/Get-EntraBetaPolicy.Tests.ps1 | 14 ++-- ...Get-EntraBetaPolicyAppliedObject.Tests.ps1 | 10 +-- ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 10 +-- ...ew-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 10 +-- ...w-EntraBetaOauth2PermissionGrant.Tests.ps1 | 10 +-- ...ve-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 12 ++-- ...tureRolloutPolicyDirectoryObject.Tests.ps1 | 14 ++-- .../SignIns/Remove-EntraBetaPolicy.Tests.ps1 | 10 +-- ...-EntraBetaServicePrincipalPolicy.Tests.ps1 | 10 +-- ...ve-EntraBetaTrustFrameworkPolicy.Tests.ps1 | 12 ++-- ...et-EntraBetaFeatureRolloutPolicy.Tests.ps1 | 12 ++-- .../SignIns/Set-EntraBetaPolicy.Tests.ps1 | 14 ++-- .../Users/Get-EntraBetaUser.Tests.ps1 | 24 +++---- .../Get-EntraBetaUserExtension.Tests.ps1 | 14 ++-- .../Get-EntraBetaUserLicenseDetail.Tests.ps1 | 12 ++-- .../Users/Get-EntraBetaUserManager.Tests.ps1 | 10 +-- .../Get-EntraBetaUserMembership.Tests.ps1 | 18 ++--- .../Get-EntraBetaUserOwnedDevice.Tests.ps1 | 16 ++--- ...et-EntraBetaUserRegisteredDevice.Tests.ps1 | 16 ++--- .../Users/New-EntraBetaUser.Tests.ps1 | 10 +-- .../Users/Remove-EntraBetaUser.Tests.ps1 | 14 ++-- .../Remove-EntraBetaUserManager.Tests.ps1 | 14 ++-- .../Users/Set-EntraBetaUser.Tests.ps1 | 14 ++-- .../Users/Set-EntraBetaUserManager.Tests.ps1 | 14 ++-- ...te-EntraBetaSignedInUserPassword.Tests.ps1 | 10 +-- ...pdate-EntraBetaUserFromFederated.Tests.ps1 | 14 ++-- 1485 files changed, 4497 insertions(+), 4474 deletions(-) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Add-EntraApplicationOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Add-EntraServicePrincipalOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Enable-EntraAzureADAliases.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraApplication.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraApplicationExtensionProperty.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraApplicationKeyCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraApplicationLogo.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraApplicationOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraApplicationPasswordCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraApplicationServiceEndpoint.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraApplicationTemplate.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraDeletedApplication.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipal.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalCreatedObject.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalKeyCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalMembership.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalOwnedObject.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Get-EntraUnsupportedCommand.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraApplication.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraApplicationExtensionProperty.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraApplicationFromApplicationTemplate.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraApplicationKey.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraApplicationKeyCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraApplicationPassword.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraApplicationPasswordCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra/Groups => Microsoft.Entra/Applications}/New-EntraCustomHeaders.ps1 (95%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraServicePrincipal.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/New-EntraServicePrincipalPasswordCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraApplication.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraApplicationExtensionProperty.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraApplicationKey.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraApplicationKeyCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraApplicationOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraApplicationPassword.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraApplicationPasswordCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraDeletedApplication.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraDeletedDirectoryObject.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraServicePrincipal.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraServicePrincipalOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Restore-EntraDeletedApplication.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Set-EntraApplication.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Set-EntraApplicationLogo.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Set-EntraApplicationVerifiedPublisher.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Applications/Set-EntraServicePrincipal.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Add-EntraEnvironment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Connect-Entra.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Disconnect-Entra.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Enable-EntraAzureADAliases.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Find-EntraPermission.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Get-EntraContext.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Get-EntraEnvironment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Get-EntraUnsupportedCommand.ps1 (100%) create mode 100644 module/Entra/Microsoft.Entra/Authentication/New-EntraCustomHeaders.ps1 rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Authentication/Revoke-EntraUserAllRefreshToken.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Confirm-EntraDomain.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Enable-EntraAzureADAliases.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Enable-EntraDirectoryRole.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraAccountSku.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraAttributeSet.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraContact.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraContactDirectReport.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraContactManager.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraContactMembership.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraContract.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDevice.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDirectoryRole.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDomain.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDomainNameReference.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraExtensionProperty.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraFederationProperty.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraObjectByObjectId.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraPartnerInformation.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraPasswordPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraSubscribedSku.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraTenantDetail.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/New-EntraAdministrativeUnit.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/New-EntraAttributeSet.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra/Applications => Microsoft.Entra/DirectoryManagement}/New-EntraCustomHeaders.ps1 (91%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/New-EntraDevice.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/New-EntraDomain.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraContact.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraDevice.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraDomain.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraAttributeSet.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraDevice.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraDirSyncFeature.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraDomain.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraPartnerInformation.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/DirectoryManagement/Set-EntraTenantDetail.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Enable-EntraAzureADAlias.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/Enable-EntraAzureADAliases.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/Get-EntraDirectoryRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/Get-EntraDirectoryRoleDefinition.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/Get-EntraUnsupportedCommand.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra/Users => Microsoft.Entra/Governance}/New-EntraCustomHeaders.ps1 (92%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/New-EntraDirectoryRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/New-EntraDirectoryRoleDefinition.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/Remove-EntraDirectoryRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/Remove-EntraDirectoryRoleDefinition.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Governance/Set-EntraDirectoryRoleDefinition.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Add-EntraGroupMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Add-EntraGroupOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Add-EntraLifecyclePolicyGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Enable-EntraAzureADAliases.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraDeletedGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraGroupAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraGroupLifecyclePolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraGroupMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraGroupOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraGroupPermissionGrant.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraLifecyclePolicyGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraObjectSetting.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Get-EntraUnsupportedCommand.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra/SignIns => Microsoft.Entra/Groups}/New-EntraCustomHeaders.ps1 (92%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/New-EntraGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/New-EntraGroupAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/New-EntraGroupLifecyclePolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Remove-EntraGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Remove-EntraGroupAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Remove-EntraGroupLifecyclePolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Remove-EntraGroupMember.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Remove-EntraGroupOwner.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Remove-EntraLifecyclePolicyGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Reset-EntraLifeCycleGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Set-EntraGroup.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Groups/Set-EntraGroupLifecyclePolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Reports/Enable-EntraAzureADAliases.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Reports/Get-EntraAuditDirectoryLog.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Reports/Get-EntraAuditSignInLog.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Reports/Get-EntraUnsupportedCommand.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Reports/New-EntraCustomHeaders.ps1 (92%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Enable-EntraAzureADAliases.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraAuthorizationPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraConditionalAccessPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraFeatureRolloutPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraIdentityProvider.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraNamedLocationPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraOAuth2PermissionGrant.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraPermissionGrantConditionSet.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraPermissionGrantPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraTrustedCertificateAuthority.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Get-EntraUnsupportedCommand.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraConditionalAccessPolicy.ps1 (100%) create mode 100644 module/Entra/Microsoft.Entra/SignIns/New-EntraCustomHeaders.ps1 rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraFeatureRolloutPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraIdentityProvider.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraNamedLocationPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraOauth2PermissionGrant.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraPermissionGrantConditionSet.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraPermissionGrantPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/New-EntraTrustedCertificateAuthority.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraConditionalAccessPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraIdentityProvider.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraNamedLocationPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraPermissionGrantPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraAuthorizationPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraConditionalAccessPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraFeatureRolloutPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraIdentityProvider.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraNamedLocationPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraPermissionGrantConditionSet.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraPermissionGrantPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraPolicy.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/SignIns/Set-EntraTrustedCertificateAuthority.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/UnMappedAliases.psd1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Enable-EntraAzureADAliases.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUnsupportedCommand.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUser.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserCreatedObject.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserDirectReport.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserExtension.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserLicenseDetail.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserManager.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserMembership.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserOAuth2PermissionGrant.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserOwnedDevice.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserOwnedObject.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserRegisteredDevice.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Get-EntraUserThumbnailPhoto.ps1 (100%) create mode 100644 module/Entra/Microsoft.Entra/Users/New-EntraCustomHeaders.ps1 rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/New-EntraUser.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/New-EntraUserAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Remove-EntraUser.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Remove-EntraUserAppRoleAssignment.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Remove-EntraUserExtension.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Remove-EntraUserManager.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Set-EntraUser.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Set-EntraUserExtension.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Set-EntraUserLicense.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Set-EntraUserManager.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Set-EntraUserPassword.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Set-EntraUserThumbnailPhoto.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Update-EntraSignedInUserPassword.ps1 (100%) rename module/Entra/{Microsoft.Graph.Entra => Microsoft.Entra}/Users/Update-EntraUserFromFederated.ps1 (100%) delete mode 100644 module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 delete mode 100644 module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 delete mode 100644 module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Add-EntraBetaApplicationOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Add-EntraBetaApplicationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Add-EntraBetaServicePrincipalOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationKeyCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationLogo.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationProxyApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationProxyConnector.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaApplicationTemplate.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaDeletedApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipal.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalMembership.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Get-EntraUnsupportedCommand.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplicationExtensionProperty.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplicationKey.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplicationKeyCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplicationPassword.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplicationPasswordCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplicationProxyApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta/Groups => Microsoft.Entra.Beta/Applications}/New-EntraBetaCustomHeaders.ps1 (95%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaServicePrincipal.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationKey.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationPassword.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaDeletedApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaServicePrincipal.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Restore-EntraBetaDeletedApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaApplicationLogo.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaApplicationProxyApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaApplicationProxyConnector.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Applications/Set-EntraBetaServicePrincipal.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Authentication/Connect-Entra.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Authentication/Disconnect-Entra.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Authentication/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Authentication/Get-EntraContext.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Authentication/Get-EntraUnsupportedCommand.ps1 (100%) create mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Confirm-EntraBetaDomain.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaAccountSku.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaContact.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaContactManager.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaContactMembership.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaContract.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDevice.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDomain.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/New-EntraBetaAttributeSet.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta/Applications => Microsoft.Entra.Beta/DirectoryManagement}/New-EntraBetaCustomHeaders.ps1 (91%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/New-EntraBetaDevice.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/New-EntraBetaDomain.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaContact.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaDevice.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaDomain.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaDevice.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaDomain.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Enable-EntraBetaAzureADAlias.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Get-EntraBetaPrivilegedResource.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Get-EntraBetaPrivilegedRole.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Get-EntraUnsupportedCommand.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta/Users => Microsoft.Entra.Beta/Governance}/New-EntraBetaCustomHeaders.ps1 (92%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Add-EntraBetaGroupMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Add-EntraBetaGroupOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaDeletedGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaGroupMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaGroupOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaGroupPermissionGrant.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaObjectByObjectId.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraBetaObjectSetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Get-EntraUnsupportedCommand.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta/SignIns => Microsoft.Entra.Beta/Groups}/New-EntraBetaCustomHeaders.ps1 (91%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/New-EntraBetaGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/New-EntraBetaObjectSetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Remove-EntraBetaGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Remove-EntraBetaGroupMember.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Remove-EntraBetaGroupOwner.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Remove-EntraBetaObjectSetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Reset-EntraBetaLifeCycleGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Set-EntraBetaGroup.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Groups/Set-EntraBetaObjectSetting.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/Get-EntraUnsupportedCommand.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta/Reports => Microsoft.Entra.Beta/NetworkAccess}/New-EntraBetaCustomHeaders.ps1 (91%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Reports/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Reports/Get-EntraBetaApplicationSignInSummary.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Reports/Get-EntraBetaAuditDirectoryLog.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Reports/Get-EntraBetaAuditSignInLog.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Reports/Get-EntraUnsupportedCommand.ps1 (100%) create mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaIdentityProvider.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Get-EntraUnsupportedCommand.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 (100%) create mode 100644 module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaIdentityProvider.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaInvitation.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaNamedLocationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaIdentityProvider.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaIdentityProvider.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Enable-EntraAzureADAliases.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUser.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserCreatedObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserDirectReport.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserExtension.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserLicenseDetail.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserManager.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserMembership.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserOwnedDevice.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserOwnedObject.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserRegisteredDevice.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraBetaUserThumbnailPhoto.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Get-EntraUnsupportedCommand.ps1 (100%) create mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/New-EntraBetaUser.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/New-EntraBetaUserAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Remove-EntraBetaUser.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Remove-EntraBetaUserExtension.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Remove-EntraBetaUserManager.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Set-EntraBetaUser.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Set-EntraBetaUserExtension.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Set-EntraBetaUserLicense.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Set-EntraBetaUserManager.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Set-EntraBetaUserPassword.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Set-EntraBetaUserThumbnailPhoto.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Update-EntraBetaSignedInUserPassword.ps1 (100%) rename module/EntraBeta/{Microsoft.Graph.Entra.Beta => Microsoft.Entra.Beta}/Users/Update-EntraBetaUserFromFederated.ps1 (100%) delete mode 100644 module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 delete mode 100644 module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 delete mode 100644 module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 delete mode 100644 module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 diff --git a/.azure-pipelines/1es-entra-powershell-ci-build.yml b/.azure-pipelines/1es-entra-powershell-ci-build.yml index d43b9004ae..f7ea158529 100644 --- a/.azure-pipelines/1es-entra-powershell-ci-build.yml +++ b/.azure-pipelines/1es-entra-powershell-ci-build.yml @@ -58,7 +58,7 @@ extends: - template: .azure-pipelines/common-templates/esrp/codesign-nuget-migrate.yml@self parameters: FolderPath: "$(Build.ArtifactStagingDirectory)" - Pattern: "Microsoft.Graph.Entra.*.nupkg" + Pattern: "Microsoft.Entra.*.nupkg" - task: 1ES.PublishBuildArtifacts@1 displayName: Publish Module Artifacts inputs: @@ -68,7 +68,7 @@ extends: displayName: Publish NuGet to preview feed inputs: useDotNetTask: false - packagesToPush: $(Build.ArtifactStagingDirectory)/**/Microsoft.Graph.Entra.*.nupkg + packagesToPush: $(Build.ArtifactStagingDirectory)/**/Microsoft.Entra.*.nupkg packageParentPath: '$(Build.ArtifactStagingDirectory)' publishVstsFeed: $(PROJECT_NAME)/$(PREVIEW_FEED_NAME) nuGetFeedType: internal diff --git a/.azure-pipelines/1es-entra-powershell-release.yml b/.azure-pipelines/1es-entra-powershell-release.yml index 9a4310e7b8..30b8a094d2 100644 --- a/.azure-pipelines/1es-entra-powershell-release.yml +++ b/.azure-pipelines/1es-entra-powershell-release.yml @@ -58,7 +58,12 @@ extends: displayName: Publish Nuget package inputs: useDotNetTask: false +<<<<<<< HEAD packagesToPush: '$(System.ArtifactsDirectory)/drop/Microsoft.Graph.Entra*.nupkg' packageParentPath: '$(System.ArtifactsDirectory)' +======= + packagesToPush: '$(Pipeline.Workspace)/drop/Microsoft.Entra*.nupkg' + packageParentPath: '$(Pipeline.Workspace)/drop' +>>>>>>> e6ba625db (Rename module (#1223)) nuGetFeedType: external publishFeedCredentials: EntraPowerShell_PSGallery diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 0a24db784a..b1db0112b2 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -41,7 +41,7 @@ jobs: - template: ./common-templates/esrp/codesign-nuget.yml parameters: FolderPath: "$(Build.ArtifactStagingDirectory)" - Pattern: "Microsoft.Graph.Entra.*.nupkg" + Pattern: "Microsoft.Entra.*.nupkg" - task: PublishBuildArtifacts@1 displayName: Publish Module Artifacts @@ -54,7 +54,7 @@ jobs: displayName: Publish NuGet to preview feed inputs: command: push - packagesToPush: $(Build.ArtifactStagingDirectory)/**/Microsoft.Graph.Entra.*.nupkg + packagesToPush: $(Build.ArtifactStagingDirectory)/**/Microsoft.Entra.*.nupkg publishVstsFeed: $(PROJECT_NAME)/$(PREVIEW_FEED_NAME) allowPackageConflicts: true diff --git a/.azure-pipelines/entra-powershell-release.yml b/.azure-pipelines/entra-powershell-release.yml index 16068e8343..e34aa0b66a 100644 --- a/.azure-pipelines/entra-powershell-release.yml +++ b/.azure-pipelines/entra-powershell-release.yml @@ -40,7 +40,7 @@ stages: inputs: targetType: inline script: | - Publish-Module -NuGetApiKey $env:NuGetApiKey -Path $(Build.ArtifactStagingDirectory)/modules/Microsoft.Graph.Entra -Verbose - Publish-Module -NuGetApiKey $env:NuGetApiKey -Path $(Build.ArtifactStagingDirectory)/modules/Microsoft.Graph.Entra.Beta -Verbose + Publish-Module -NuGetApiKey $env:NuGetApiKey -Path $(Build.ArtifactStagingDirectory)/modules/Microsoft.Entra -Verbose + Publish-Module -NuGetApiKey $env:NuGetApiKey -Path $(Build.ArtifactStagingDirectory)/modules/Microsoft.Entra.Beta -Verbose pwsh: false dependsOn: Release_Approval \ No newline at end of file diff --git a/.azure-pipelines/generation-templates/generate_adapter.yml b/.azure-pipelines/generation-templates/generate_adapter.yml index 87360d0d1d..c4bb9c254e 100644 --- a/.azure-pipelines/generation-templates/generate_adapter.yml +++ b/.azure-pipelines/generation-templates/generate_adapter.yml @@ -64,8 +64,8 @@ steps: targetType: "inline" pwsh: true script: | - $ModulePsd1 = "bin/Microsoft.Graph.Entra.psd1" - $ModulePsm1 = "bin/Microsoft.Graph.Entra.psm1" + $ModulePsd1 = "bin/Microsoft.Entra.psd1" + $ModulePsm1 = "bin/Microsoft.Entra.psm1" ($ModulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" ($ModulePsm1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" - task: powershell@2 @@ -143,8 +143,8 @@ steps: targetType: "inline" pwsh: true script: | - $ModulePsd1 = "bin/Microsoft.Graph.Entra.Beta.psd1" - $ModulePsm1 = "bin/Microsoft.Graph.Entra.Beta.psm1" + $ModulePsd1 = "bin/Microsoft.Entra.Beta.psd1" + $ModulePsm1 = "bin/Microsoft.Entra.Beta.psm1" ($ModulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" ($ModulePsm1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" - task: powershell@2 diff --git a/build/Publish-LocalCompatModule.ps1 b/build/Publish-LocalCompatModule.ps1 index 89a28e6903..284af0af67 100644 --- a/build/Publish-LocalCompatModule.ps1 +++ b/build/Publish-LocalCompatModule.ps1 @@ -22,7 +22,7 @@ else{ $fullModuleNames += $modName } -if($fullModuleName -like 'Microsoft.Graph.Entra.Beta*'){ +if($fullModuleName -like 'Microsoft.Entra.Beta*'){ $moduleName = 'EntraBeta' } else{ @@ -44,7 +44,7 @@ foreach ($destinationModuleName in $content.destinationModuleName){ } foreach($module in $fullModuleNames){ - if(($module -eq 'Microsoft.Graph.Entra') -or ($module -eq 'Microsoft.Graph.Entra.Beta')){ + if(($module -eq 'Microsoft.Entra') -or ($module -eq 'Microsoft.Entra.Beta')){ continue } $modulePath = Join-Path (Get-ModuleBasePath) (Get-ConfigValue -Name ModuleOutputSubdirectoryName) @@ -60,10 +60,10 @@ foreach($module in $fullModuleNames){ } if($moduleName -eq 'Entra'){ - $module = 'Microsoft.Graph.Entra' + $module = 'Microsoft.Entra' } else{ - $module = 'Microsoft.Graph.Entra.Beta' + $module = 'Microsoft.Entra.Beta' } $modulePath = Join-Path (Get-ModuleBasePath) (Get-ConfigValue -Name ModuleOutputSubdirectoryName) diff --git a/build/Split-Tests.ps1 b/build/Split-Tests.ps1 index 914a065e89..53d0073b34 100644 --- a/build/Split-Tests.ps1 +++ b/build/Split-Tests.ps1 @@ -21,13 +21,13 @@ function Split-Tests { $TestSourceDirectory = "../test_legacy/module/Entra" $MappingFilePath = '../module/Entra/config/moduleMapping.json' $OutputDirectory = '../test/Entra' - $modulePrefix = 'Microsoft.Graph.Entra' + $modulePrefix = 'Microsoft.Entra' } 'EntraBeta' { $TestSourceDirectory = "../test_legacy/module/EntraBeta" $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" $OutputDirectory = "../test/EntraBeta" - $modulePrefix = 'Microsoft.Graph.Entra.Beta' + $modulePrefix = 'Microsoft.Entra.Beta' } default { Log-Message -Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' diff --git a/build/VNext-Build.md b/build/VNext-Build.md index f1b24eecfc..b43065a2fb 100644 --- a/build/VNext-Build.md +++ b/build/VNext-Build.md @@ -84,16 +84,16 @@ The generated modules are in the output folder `./bin` SubModule in this case is the name of the specific sub-module you want to use. They are: `Authentication,Users,DirectoryManagement, Groups, Applications,Governance,SignIns and Reports` -In order to import it, you need to run `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` +In order to import it, you need to run `Import-Module .\bin\Microsoft.Entra.psd1 -Force` -Alternatively, import the root module(that encompases and includes all the sub-modules and their help and dependencies) `Import-Module .\bin\Microsoft.Graph.Entra.psd1 -Force` +Alternatively, import the root module(that encompases and includes all the sub-modules and their help and dependencies) `Import-Module .\bin\Microsoft.Entra.psd1 -Force` ## Usage Import the module and test the generated commands. ```powershell -Import-Module .\bin\Microsoft.Graph.Entra..psd1 -Force +Import-Module .\bin\Microsoft.Entra..psd1 -Force Connect-MgGraph -Scopes "User.Read.All" Get-EntraUser -Top 10 ``` diff --git a/build/ValidateAuthenticodeSignature.ps1 b/build/ValidateAuthenticodeSignature.ps1 index a75010abd9..02207f4bd6 100644 --- a/build/ValidateAuthenticodeSignature.ps1 +++ b/build/ValidateAuthenticodeSignature.ps1 @@ -13,7 +13,7 @@ foreach($moduleName in $moduleNames){ $modulePsd1 = $modulePath + ".psd1" ($modulePsd1 | Get-AuthenticodeSignature).Status | Should -Be "Valid" - if(($moduleName -eq 'Microsoft.Graph.Entra') -or ($moduleName -eq 'Microsoft.Graph.Entra.Beta')){ + if(($moduleName -eq 'Microsoft.Entra') -or ($moduleName -eq 'Microsoft.Entra.Beta')){ continue } $modulePsm1 = $modulePath + ".psm1" diff --git a/build/common-functions.ps1 b/build/common-functions.ps1 index c0628404f7..d41d79c661 100644 --- a/build/common-functions.ps1 +++ b/build/common-functions.ps1 @@ -28,8 +28,8 @@ function Get-ModuleBasePath { } function Get-ModuleVersion { - # Added -ErrorAction SilentlyContinue due to validation failure on Microsoft.Graph.Entra RequiredModules - # The RequiredModules are the Microsoft.Graph.Entra.* sub-modules + # Added -ErrorAction SilentlyContinue due to validation failure on Microsoft.Entra RequiredModules + # The RequiredModules are the Microsoft.Entra.* sub-modules (Get-ModuleManifestFile).FullName | Test-ModuleManifest -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version } @@ -167,7 +167,7 @@ function Create-ModuleFolder { $destinationFileList = @() $moduleFiles = @() - if(($module -eq 'Microsoft.Graph.Entra') -or ($module -eq 'Microsoft.Graph.Entra.Beta')){ + if(($module -eq 'Microsoft.Entra') -or ($module -eq 'Microsoft.Entra.Beta')){ $moduleFiles += Get-ModuleFiles | Where { $_ -like "*$module.psd1" } $moduleFiles += Get-ModuleFiles | Where { $_ -like "*$module.psm1" } } diff --git a/development-docs/cmdlet-references-documentation/cmdlet-reference-example-beta.md b/development-docs/cmdlet-references-documentation/cmdlet-reference-example-beta.md index 4e02548e76..290be8e4f2 100644 --- a/development-docs/cmdlet-references-documentation/cmdlet-reference-example-beta.md +++ b/development-docs/cmdlet-references-documentation/cmdlet-reference-example-beta.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUser schema: 2.0.0 --- @@ -20,7 +20,7 @@ schema: 2.0.0 Reference -Module: **Microsoft.Graph.Entra.Beta** +Module: **Microsoft.Entra.Beta** ## Synopsis diff --git a/development-docs/cmdlet-references-documentation/cmdlet-reference-example.md b/development-docs/cmdlet-references-documentation/cmdlet-reference-example.md index 9e7ce94640..22e8dcac27 100644 --- a/development-docs/cmdlet-references-documentation/cmdlet-reference-example.md +++ b/development-docs/cmdlet-references-documentation/cmdlet-reference-example.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUser +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUser schema: 2.0.0 --- @@ -20,7 +20,7 @@ schema: 2.0.0 Reference -Module: **Microsoft.Graph.Entra** +Module: **Microsoft.Entra** ## Synopsis diff --git a/development-docs/cmdlet-references-documentation/cmdlet-reference-template.md b/development-docs/cmdlet-references-documentation/cmdlet-reference-template.md index bb7298141f..fc7ed97e0e 100644 --- a/development-docs/cmdlet-references-documentation/cmdlet-reference-template.md +++ b/development-docs/cmdlet-references-documentation/cmdlet-reference-template.md @@ -10,9 +10,9 @@ manager: CelesteDG author: msewaweru ms.reviewer: stevemutungi -external help file: Microsoft.Graph.Entra-Help.xml //use `Microsoft.Graph.Entra.Beta-Help.xml` for beta commands -Module Name: Microsoft.Graph.Entra //use `Microsoft.Graph.Entra.Beta` for beta commands -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/ //use `https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/` for beta commands +external help file: Microsoft.Entra-Help.xml //use `Microsoft.Entra.Beta-Help.xml` for beta commands +Module Name: Microsoft.Entra //use `Microsoft.Entra.Beta` for beta commands +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/ //use `https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/` for beta commands schema: 2.0.0 --- diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Entra/Applications/Add-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraApplicationOwner.ps1 rename to module/Entra/Microsoft.Entra/Applications/Add-EntraApplicationOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 rename to module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Applications/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Entra/Applications/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplication.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationLogo.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationLogo.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationLogo.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationOwner.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationTemplate.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraApplicationTemplate.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationTemplate.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraDeletedApplication.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraDeletedApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipal.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipal.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Entra/Applications/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplication.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraApplicationFromApplicationTemplate.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKey.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKey.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKey.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationKeyCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationPassword.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPassword.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraApplicationPassword.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraCustomHeaders.ps1 similarity index 95% rename from module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraCustomHeaders.ps1 index 163a20e10d..263b4de063 100644 --- a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraCustomHeaders.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra.Groups | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Entra.Applications | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipal.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipal.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplication.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKey.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKey.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKey.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationOwner.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPassword.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPassword.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPassword.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedApplication.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraDeletedApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraDeletedDirectoryObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipal.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipal.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 rename to module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Restore-EntraDeletedApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Restore-EntraDeletedApplication.ps1 rename to module/Entra/Microsoft.Entra/Applications/Restore-EntraDeletedApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 b/module/Entra/Microsoft.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 rename to module/Entra/Microsoft.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Set-EntraApplication.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplication.ps1 rename to module/Entra/Microsoft.Entra/Applications/Set-EntraApplication.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 b/module/Entra/Microsoft.Entra/Applications/Set-EntraApplicationLogo.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationLogo.ps1 rename to module/Entra/Microsoft.Entra/Applications/Set-EntraApplicationLogo.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 rename to module/Entra/Microsoft.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Entra/Applications/Set-EntraServicePrincipal.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Applications/Set-EntraServicePrincipal.ps1 rename to module/Entra/Microsoft.Entra/Applications/Set-EntraServicePrincipal.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 b/module/Entra/Microsoft.Entra/Authentication/Add-EntraEnvironment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Add-EntraEnvironment.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Add-EntraEnvironment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 b/module/Entra/Microsoft.Entra/Authentication/Connect-Entra.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Connect-Entra.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Connect-Entra.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 b/module/Entra/Microsoft.Entra/Authentication/Disconnect-Entra.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Disconnect-Entra.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Disconnect-Entra.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Authentication/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 b/module/Entra/Microsoft.Entra/Authentication/Find-EntraPermission.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Find-EntraPermission.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Find-EntraPermission.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 b/module/Entra/Microsoft.Entra/Authentication/Get-EntraContext.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraContext.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Get-EntraContext.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 b/module/Entra/Microsoft.Entra/Authentication/Get-EntraEnvironment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraEnvironment.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Get-EntraEnvironment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Entra/Authentication/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/Authentication/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..db9a73434b --- /dev/null +++ b/module/Entra/Microsoft.Entra/Authentication/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Entra.Authentication | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 b/module/Entra/Microsoft.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 b/module/Entra/Microsoft.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 b/module/Entra/Microsoft.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 rename to module/Entra/Microsoft.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraAccountSku.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraAttributeSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContact.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContact.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContact.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactManager.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactManager.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactManager.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContract.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraContract.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContract.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDevice.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomain.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainFederationSettings.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainNameReference.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraFederationProperty.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraPartnerInformation.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraPasswordPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraSubscribedSku.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraTenantDetail.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraAttributeSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 similarity index 91% rename from module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 index 1556f5af5a..3594a208f6 100644 --- a/module/Entra/Microsoft.Graph.Entra/Applications/New-EntraCustomHeaders.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra.Applications | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Entra.DirectoryManagement | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDevice.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraDomain.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraContact.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraContact.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraContact.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDevice.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraDomain.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraAttributeSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDevice.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDirSyncEnabled.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDirSyncFeature.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDomain.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomain.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDomain.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDomainFederationSettings.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraPartnerInformation.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 b/module/Entra/Microsoft.Entra/Enable-EntraAzureADAlias.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Enable-EntraAzureADAlias.ps1 rename to module/Entra/Microsoft.Entra/Enable-EntraAzureADAlias.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Governance/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Entra/Governance/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 rename to module/Entra/Microsoft.Entra/Governance/Get-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Entra/Governance/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Entra/Governance/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/Governance/New-EntraCustomHeaders.ps1 similarity index 92% rename from module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Entra/Governance/New-EntraCustomHeaders.ps1 index 218f1b70d4..e8c74abe06 100644 --- a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraCustomHeaders.ps1 +++ b/module/Entra/Microsoft.Entra/Governance/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra.Users | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Entra.Governance | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 rename to module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 rename to module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 rename to module/Entra/Microsoft.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 b/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupMember.ps1 rename to module/Entra/Microsoft.Entra/Groups/Add-EntraGroupMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraGroupOwner.ps1 rename to module/Entra/Microsoft.Entra/Groups/Add-EntraGroupOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Groups/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Entra/Groups/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraDeletedGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraDeletedGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraDeletedGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupMember.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraGroupMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupOwner.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraGroupOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraObjectSetting.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraObjectSetting.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraObjectSetting.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Entra/Groups/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/Groups/New-EntraCustomHeaders.ps1 similarity index 92% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Entra/Groups/New-EntraCustomHeaders.ps1 index 8e156df31d..2026850d4b 100644 --- a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraCustomHeaders.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra.SignIns | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Entra.Groups | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/New-EntraGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/New-EntraGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 rename to module/Entra/Microsoft.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/Remove-EntraGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 rename to module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupMember.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupMember.ps1 rename to module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupMember.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupOwner.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraGroupOwner.ps1 rename to module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupOwner.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 rename to module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 rename to module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 rename to module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Set-EntraGroup.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroup.ps1 rename to module/Entra/Microsoft.Entra/Groups/Set-EntraGroup.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 rename to module/Entra/Microsoft.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Reports/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Entra/Reports/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 b/module/Entra/Microsoft.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 rename to module/Entra/Microsoft.Entra/Reports/Get-EntraAuditDirectoryLog.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 b/module/Entra/Microsoft.Entra/Reports/Get-EntraAuditSignInLog.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraAuditSignInLog.ps1 rename to module/Entra/Microsoft.Entra/Reports/Get-EntraAuditSignInLog.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Entra/Reports/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Reports/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Entra/Reports/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/Reports/New-EntraCustomHeaders.ps1 similarity index 92% rename from module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 rename to module/Entra/Microsoft.Entra/Reports/New-EntraCustomHeaders.ps1 index 5c3697e6b1..82fbc5069b 100644 --- a/module/Entra/Microsoft.Graph.Entra/Reports/New-EntraCustomHeaders.ps1 +++ b/module/Entra/Microsoft.Entra/Reports/New-EntraCustomHeaders.ps1 @@ -21,7 +21,7 @@ function New-EntraCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra.Reports | Select-Object version).Version.ToString() + $entraVersion = (Get-Module Microsoft.Entra.Reports | Select-Object version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/SignIns/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraIdentityProvider.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraIdentityProvider.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..88a73b1e0a --- /dev/null +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Entra.SignIns | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraIdentityProvider.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraIdentityProvider.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraIdentityProvider.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraIdentityProvider.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Remove-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraIdentityProvider.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraIdentityProvider.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraIdentityProvider.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPolicy.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraPolicy.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraPolicy.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 rename to module/Entra/Microsoft.Entra/SignIns/Set-EntraTrustedCertificateAuthority.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 b/module/Entra/Microsoft.Entra/UnMappedAliases.psd1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/UnMappedAliases.psd1 rename to module/Entra/Microsoft.Entra/UnMappedAliases.psd1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Users/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Enable-EntraAzureADAliases.ps1 rename to module/Entra/Microsoft.Entra/Users/Enable-EntraAzureADAliases.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUnsupportedCommand.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUnsupportedCommand.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUser.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserCreatedObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserCreatedObject.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserCreatedObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserDirectReport.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserDirectReport.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserDirectReport.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserExtension.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserExtension.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserExtension.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserLicenseDetail.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserLicenseDetail.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserLicenseDetail.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserManager.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserManager.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserManager.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserMembership.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserMembership.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserMembership.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserOwnedDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedDevice.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserOwnedDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserOwnedObject.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserOwnedObject.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserOwnedObject.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserRegisteredDevice.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserRegisteredDevice.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserRegisteredDevice.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 rename to module/Entra/Microsoft.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 diff --git a/module/Entra/Microsoft.Entra/Users/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/Users/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..1e1e56600b --- /dev/null +++ b/module/Entra/Microsoft.Entra/Users/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Entra.Users | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 b/module/Entra/Microsoft.Entra/Users/New-EntraUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/New-EntraUser.ps1 rename to module/Entra/Microsoft.Entra/Users/New-EntraUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Users/New-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/New-EntraUserAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Users/New-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 b/module/Entra/Microsoft.Entra/Users/Remove-EntraUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUser.ps1 rename to module/Entra/Microsoft.Entra/Users/Remove-EntraUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 rename to module/Entra/Microsoft.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserExtension.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserExtension.ps1 rename to module/Entra/Microsoft.Entra/Users/Remove-EntraUserExtension.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserManager.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Remove-EntraUserManager.ps1 rename to module/Entra/Microsoft.Entra/Users/Remove-EntraUserManager.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUser.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUser.ps1 rename to module/Entra/Microsoft.Entra/Users/Set-EntraUser.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUserExtension.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserExtension.ps1 rename to module/Entra/Microsoft.Entra/Users/Set-EntraUserExtension.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUserLicense.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserLicense.ps1 rename to module/Entra/Microsoft.Entra/Users/Set-EntraUserLicense.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUserManager.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserManager.ps1 rename to module/Entra/Microsoft.Entra/Users/Set-EntraUserManager.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUserPassword.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserPassword.ps1 rename to module/Entra/Microsoft.Entra/Users/Set-EntraUserPassword.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 rename to module/Entra/Microsoft.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 b/module/Entra/Microsoft.Entra/Users/Update-EntraSignedInUserPassword.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Update-EntraSignedInUserPassword.ps1 rename to module/Entra/Microsoft.Entra/Users/Update-EntraSignedInUserPassword.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 b/module/Entra/Microsoft.Entra/Users/Update-EntraUserFromFederated.ps1 similarity index 100% rename from module/Entra/Microsoft.Graph.Entra/Users/Update-EntraUserFromFederated.ps1 rename to module/Entra/Microsoft.Entra/Users/Update-EntraUserFromFederated.ps1 diff --git a/module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 deleted file mode 100644 index 0db9ea99a6..0000000000 --- a/module/Entra/Microsoft.Graph.Entra/Authentication/New-EntraCustomHeaders.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .PARAMETER Command - The command that is being executed. - .EXAMPLE - New-EntraCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra.Authentication | Select-Object version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 deleted file mode 100644 index 0ad43653ad..0000000000 --- a/module/Entra/Microsoft.Graph.Entra/DirectoryManagement/New-EntraCustomHeaders.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .PARAMETER Command - The command that is being executed. - .EXAMPLE - New-EntraCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra.DirectoryManagement | Select-Object version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 deleted file mode 100644 index 4199d746c9..0000000000 --- a/module/Entra/Microsoft.Graph.Entra/Governance/New-EntraCustomHeaders.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .PARAMETER Command - The command that is being executed. - .EXAMPLE - New-EntraCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-Module Microsoft.Graph.Entra.Governance | Select-Object version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/module/Entra/UnMappedFiles/Test-EntraScript.ps1 b/module/Entra/UnMappedFiles/Test-EntraScript.ps1 index f75a033826..202f799cb1 100644 --- a/module/Entra/UnMappedFiles/Test-EntraScript.ps1 +++ b/module/Entra/UnMappedFiles/Test-EntraScript.ps1 @@ -5,10 +5,10 @@ function Test-EntraScript { <# .SYNOPSIS - Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Entra. .DESCRIPTION - Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Entra. .PARAMETER Path Path to the script file(s) to scan. @@ -19,17 +19,17 @@ function Test-EntraScript { Used when scanning code that has no file representation (e.g. straight from a repository). .PARAMETER Quiet - Only return $true or $false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($false) + Only return $true or $false, based on whether the script could run under Microsoft.Entra ($true) or not ($false) .EXAMPLE PS C:\> Test-EntraScript -Path .\usercreation.ps1 -Quiet - Returns whether the script "usercreation.ps1" could run under Microsoft.Graph.Entra + Returns whether the script "usercreation.ps1" could run under Microsoft.Entra .EXAMPLE PS C:\> Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript - Returns a list of all scripts that would not run under the Microsoft.Graph.Entra module, listing each issue with line and code. + Returns a list of all scripts that would not run under the Microsoft.Entra module, listing each issue with line and code. #> [CmdletBinding()] param ( @@ -79,7 +79,7 @@ function Test-EntraScript { foreach ($command in $allCommands) { if ($command.CommandElements[0].Value -notin $ForbiddenCommands) { continue } $findings += [PSCustomObject]@{ - PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' + PSTypeName = 'Microsoft.Entra.CommandRequirement' Name = $Name Line = $command.Extent.StartLineNumber Type = 'UnsupportedCommand' @@ -90,7 +90,7 @@ function Test-EntraScript { foreach ($requiredCommand in $RequiredCommands) { if ($requiredCommand -notin $allCommandNames) { continue } $findings += [PSCustomObject]@{ - PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' + PSTypeName = 'Microsoft.Entra.CommandRequirement' Name = $Name Line = -1 Type = 'RequiredCommandMissing' diff --git a/module/Entra/config/ModuleSettings.json b/module/Entra/config/ModuleSettings.json index 6863871d5c..fde6b47a2c 100644 --- a/module/Entra/config/ModuleSettings.json +++ b/module/Entra/config/ModuleSettings.json @@ -1,6 +1,6 @@ { "sourceModule" : "AzureAD", - "moduleName" : "Microsoft.Graph.Entra", + "moduleName" : "Microsoft.Entra", "newPrefix" : "Entra", "typePrefix" : "Microsoft.Open.", "destinationModuleName" : [ diff --git a/module/Entra/config/dependencyMapping.json b/module/Entra/config/dependencyMapping.json index 8be7e5e2e4..67a83565bb 100644 --- a/module/Entra/config/dependencyMapping.json +++ b/module/Entra/config/dependencyMapping.json @@ -1,10 +1,10 @@ { - "Microsoft.Graph.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], - "Microsoft.Graph.Entra.Authentication":["Microsoft.Graph.Authentication"], - "Microsoft.Graph.Entra.Groups":["Microsoft.Graph.Groups"], - "Microsoft.Graph.Entra.DirectoryManagement":["Microsoft.Graph.Identity.DirectoryManagement"], - "Microsoft.Graph.Entra.Governance":["Microsoft.Graph.Identity.Governance"], - "Microsoft.Graph.Entra.SignIns":["Microsoft.Graph.Identity.SignIns"], - "Microsoft.Graph.Entra.Applications":["Microsoft.Graph.Applications"], - "Microsoft.Graph.Entra.Reports":["Microsoft.Graph.Reports"] + "Microsoft.Entra.Users":["Microsoft.Graph.Users","Microsoft.Graph.Users.Actions","Microsoft.Graph.Users.Functions"], + "Microsoft.Entra.Authentication":["Microsoft.Graph.Authentication"], + "Microsoft.Entra.Groups":["Microsoft.Graph.Groups"], + "Microsoft.Entra.DirectoryManagement":["Microsoft.Graph.Identity.DirectoryManagement"], + "Microsoft.Entra.Governance":["Microsoft.Graph.Identity.Governance"], + "Microsoft.Entra.SignIns":["Microsoft.Graph.Identity.SignIns"], + "Microsoft.Entra.Applications":["Microsoft.Graph.Applications"], + "Microsoft.Entra.Reports":["Microsoft.Graph.Reports"] } \ No newline at end of file diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationKeyCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationLogo.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationPasswordCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnector.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationTemplate.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaDeletedApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationPasswordCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationProxyApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 similarity index 95% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 index ac596542b5..b224ae323b 100644 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Groups | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Entra.Beta.Applications | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaDeletedDirectoryObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationLogo.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnector.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaServicePrincipal.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Connect-Entra.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Connect-Entra.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Authentication/Connect-Entra.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Disconnect-Entra.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Disconnect-Entra.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Authentication/Disconnect-Entra.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Get-EntraContext.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraContext.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Authentication/Get-EntraContext.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..fe1c62162f --- /dev/null +++ b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Entra.Beta.Authentication | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Confirm-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAccountSku.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContact.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirSyncfeature.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainNameReference.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaFederationProperty.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaPartnerInformation.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaSubscribedSku.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaTenantDetail.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAttributeSet.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 similarity index 91% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 index b4eea56ed8..968e8dcf24 100644 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Applications/New-EntraBetaCustomHeaders.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Applications | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Entra.Beta.DirectoryManagement | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaAttributeSet.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDevice.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaPartnerInformation.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleSetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 similarity index 92% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 index b403d3a712..b63d90b492 100644 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Users | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Entra.Beta.Governance | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaDeletedGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 similarity index 91% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 index 4ffe593717..0cf7666180 100644 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.SignIns | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Entra.Beta.Groups | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 similarity index 91% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 index cfa34c26e5..ebc0e8bd3e 100644 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 @@ -19,7 +19,7 @@ function New-EntraBetaCustomHeaders { ) $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Reports | select version).Version.ToString() + $entraVersion = (Get-module Microsoft.Entra.Beta.NetworkAccess | select version).Version.ToString() $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' $customHeaders["User-Agent"] = $userAgentHeaderValue diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraBetaApplicationSignInSummary.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraBetaAuditDirectoryLog.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraBetaAuditSignInLog.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..fc00a44a59 --- /dev/null +++ b/module/EntraBeta/Microsoft.Entra.Beta/Reports/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Entra.Beta.Reports | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaAuthorizationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaNamedLocationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPolicyAppliedObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaServicePrincipalPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..119fb85faa --- /dev/null +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Entra.Beta.SignIns | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaIdentityProvider.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaOauth2PermissionGrant.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaIdentityProvider.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUser.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUser.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUser.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserCreatedObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserDirectReport.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserExtension.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserManager.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOwnedDevice.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOwnedObject.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserRegisteredDevice.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..a9731d8029 --- /dev/null +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Entra.Beta.Users | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUser.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUser.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUser.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUser.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUser.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUser.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUser.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUser.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUser.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaSignedInUserPassword.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Graph.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/Users/Update-EntraBetaUserFromFederated.ps1 diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 deleted file mode 100644 index 81f47023ec..0000000000 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Authentication/New-EntraBetaCustomHeaders.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraBetaCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .EXAMPLE - New-EntraBetaCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Authentication | select version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 deleted file mode 100644 index 13c5cca04a..0000000000 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/DirectoryManagement/New-EntraBetaCustomHeaders.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraBetaCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .EXAMPLE - New-EntraBetaCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.DirectoryManagement | select version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 deleted file mode 100644 index 153948c902..0000000000 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/Governance/New-EntraBetaCustomHeaders.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraBetaCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .EXAMPLE - New-EntraBetaCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Governance | select version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 deleted file mode 100644 index dfff098b9c..0000000000 --- a/module/EntraBeta/Microsoft.Graph.Entra.Beta/NetworkAccess/New-EntraBetaCustomHeaders.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function New-EntraBetaCustomHeaders { - <# - .SYNOPSIS - Creates a custom header for use in telemetry. - .DESCRIPTION - The custom header created is a User-Agent with header value " EntraPowershell/ " - .EXAMPLE - New-EntraBetaCustomHeaders -Command Get-EntraUser - #> - [CmdletBinding()] - param ( - [Parameter(Mandatory = $true)] - [string] - $Command - ) - - $psVersion = $global:PSVersionTable.PSVersion - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.NetworkAccess | select version).Version.ToString() - $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" - $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' - $customHeaders["User-Agent"] = $userAgentHeaderValue - - $customHeaders -}# ------------------------------------------------------------------------------ - diff --git a/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 b/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 index b9bd962b8d..01f34853c0 100644 --- a/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 +++ b/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 @@ -5,10 +5,10 @@ function Test-EntraScript { <# .SYNOPSIS - Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Entra. .DESCRIPTION - Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Entra. .PARAMETER Path Path to the script file(s) to scan. @@ -19,17 +19,17 @@ function Test-EntraScript { Used when scanning code that has no file representation (e.g. straight from a repository). .PARAMETER Quiet - Only return $true or $false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($false) + Only return $true or $false, based on whether the script could run under Microsoft.Entra ($true) or not ($false) .EXAMPLE PS C:\> Test-EntraScript -Path .\usercreation.ps1 -Quiet - Returns whether the script "usercreation.ps1" could run under Microsoft.Graph.Entra + Returns whether the script "usercreation.ps1" could run under Microsoft.Entra .EXAMPLE PS C:\> Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript - Returns a list of all scripts that would not run under the Microsoft.Graph.Entra module, listing each issue with line and code. + Returns a list of all scripts that would not run under the Microsoft.Entra module, listing each issue with line and code. #> [CmdletBinding()] param ( @@ -79,7 +79,7 @@ function Test-EntraScript { foreach ($command in $allCommands) { if ($command.CommandElements[0].Value -notin $ForbiddenCommands) { continue } $findings += [PSCustomObject]@{ - PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' + PSTypeName = 'Microsoft.Entra.CommandRequirement' Name = $Name Line = $command.Extent.StartLineNumber Type = 'UnsupportedCommand' @@ -90,7 +90,7 @@ function Test-EntraScript { foreach ($requiredCommand in $RequiredCommands) { if ($requiredCommand -notin $allCommandNames) { continue } $findings += [PSCustomObject]@{ - PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' + PSTypeName = 'Microsoft.Entra.CommandRequirement' Name = $Name Line = -1 Type = 'RequiredCommandMissing' diff --git a/module/EntraBeta/config/ModuleSettings.json b/module/EntraBeta/config/ModuleSettings.json index 16ef03892a..fab5528226 100644 --- a/module/EntraBeta/config/ModuleSettings.json +++ b/module/EntraBeta/config/ModuleSettings.json @@ -1,6 +1,6 @@ { "sourceModule" : "AzureADPreview", - "moduleName" : "Microsoft.Graph.Entra.Beta", + "moduleName" : "Microsoft.Entra.Beta", "newPrefix" : "EntraBeta", "typePrefix" : "Microsoft.Open.", "destinationModuleName" : [ diff --git a/module/EntraBeta/config/dependencyMapping.json b/module/EntraBeta/config/dependencyMapping.json index 495961f1c6..aff4ed3b10 100644 --- a/module/EntraBeta/config/dependencyMapping.json +++ b/module/EntraBeta/config/dependencyMapping.json @@ -1,10 +1,10 @@ { - "Microsoft.Graph.Entra.Beta.Users":["Microsoft.Graph.Beta.Users","Microsoft.Graph.Beta.Users.Actions","Microsoft.Graph.Beta.Users.Functions"], - "Microsoft.Graph.Entra.Beta.Authentication":["Microsoft.Graph.Authentication"], - "Microsoft.Graph.Entra.Beta.Groups":["Microsoft.Graph.Beta.Groups"], - "Microsoft.Graph.Entra.Beta.DirectoryManagement":["Microsoft.Graph.Beta.Identity.DirectoryManagement"], - "Microsoft.Graph.Entra.Beta.Governance":["Microsoft.Graph.Beta.Identity.Governance"], - "Microsoft.Graph.Entra.Beta.SignIns":["Microsoft.Graph.Beta.Identity.SignIns"], - "Microsoft.Graph.Entra.Beta.Applications":["Microsoft.Graph.Beta.Applications"], - "Microsoft.Graph.Entra.Beta.Reports":["Microsoft.Graph.Beta.Reports"] + "Microsoft.Entra.Beta.Users":["Microsoft.Graph.Beta.Users","Microsoft.Graph.Beta.Users.Actions","Microsoft.Graph.Beta.Users.Functions"], + "Microsoft.Entra.Beta.Authentication":["Microsoft.Graph.Authentication"], + "Microsoft.Entra.Beta.Groups":["Microsoft.Graph.Beta.Groups"], + "Microsoft.Entra.Beta.DirectoryManagement":["Microsoft.Graph.Beta.Identity.DirectoryManagement"], + "Microsoft.Entra.Beta.Governance":["Microsoft.Graph.Beta.Identity.Governance"], + "Microsoft.Entra.Beta.SignIns":["Microsoft.Graph.Beta.Identity.SignIns"], + "Microsoft.Entra.Beta.Applications":["Microsoft.Graph.Beta.Applications"], + "Microsoft.Entra.Beta.Reports":["Microsoft.Graph.Beta.Reports"] } \ No newline at end of file diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md index a6b3b5b985..6a8b962dd6 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaApplicationOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md index b1c2ceca46..bb7e0585ac 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaApplicationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaApplicationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md index eea6410d22..2d39ad7f23 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md index 25221afebe..522cbb16d6 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaServicePrincipalOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md index a3180d32b2..c4e4139a41 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md index d07a50c3b0..f140f901e4 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationExtensionProperty +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationExtensionProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md index 56dd2bf1d4..e79ef0d5c0 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationKeyCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md index d2c340f3ca..20aa5d9ede 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationLogo +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationLogo schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md index 8bb543918f..e0883d9d87 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md index cd452a7e84..5fbfbc3409 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPasswordCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md index 3e62e3c910..1e9795745a 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md index ffb5c9f3fc..90732d9049 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md index 18e007ab0a..0dcf88fd66 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyApplicationConnectorGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyApplicationConnectorGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md index 1574737eaa..5b6871e09c 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnector +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyConnector schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md index e2b8198783..bd00f0b1c3 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md index 78f7b49454..8be04f9aeb 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroupMembers +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroupMembers schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md index 43828f604a..a080d1ba8c 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationProxyConnectorMemberOf +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyConnectorMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md index f3375abde2..1b86f94050 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md @@ -8,8 +8,8 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md index 338a3a62c5..e9da11e240 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationTemplate +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationTemplate schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md index 845a5f156b..6ea89d018d 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeletedApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md index 754c422b0c..f42a529398 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordSingleSignOnCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPasswordSingleSignOnCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md index 343367b0be..8f59e4e105 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipal +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipal schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md index d7e4e453af..d203f8d9ef 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignedTo +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignedTo schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md index aafe07b5b5..b99d59efbf 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md index 177f252ae7..1db2e1e933 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalCreatedObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalCreatedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md index 32b1c755a7..71431612e7 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalDelegatedPermissionClassification +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalDelegatedPermissionClassification schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md index bea64708bb..d0e4235397 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalKeyCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md index 9940d963bc..9896c8fe5b 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalMembership +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md index aa97bae640..37b4cd3bf7 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOAuth2PermissionGrant +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalOAuth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md index 50001b6ad5..7776848a87 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwnedObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalOwnedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md index 1bbb4094b9..f4079b75bb 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md index 495788d078..609ce47a6f 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPasswordCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md index 7e7f35be9b..ecc23fe69e 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md index 0b0394e5f6..480fd7f3b5 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationExtensionProperty +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationExtensionProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md index 97e05ad89c..53fe641539 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md @@ -11,9 +11,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationFromApplicationTemplate +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationFromApplicationTemplate schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md index f8a2435c71..5579a018fa 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKey +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationKey schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md index eeadb007c7..4a7aa7ceab 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationKeyCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md index 2e7e9cb4b9..7d16d52e9d 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPassword +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationPassword schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md index 53f8cd9886..7c0eeff651 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationPasswordCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md index bf5e5e9ad2..228d00e8a6 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationProxyApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md index 4af35dd3ed..38abcdcaf2 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaApplicationProxyConnectorGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationProxyConnectorGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md index 3bb500e063..30cc3aeb7c 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPasswordSingleSignOnCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPasswordSingleSignOnCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md index a8b77df288..b63c5d2399 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipal +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaServicePrincipal schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md index b69f1f5ed2..e343ea2d82 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaServicePrincipalAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md index ca656bfb08..6ca35e677b 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaServicePrincipalPasswordCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaServicePrincipalPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md index 37770322af..84f5328cf5 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md index 5983dff994..87fb4d2151 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationExtensionProperty +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationExtensionProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md index 5e0d442a7d..c7e8034273 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKey +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationKey schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md index 95dc3c5435..140618b8e2 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationKeyCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md index daa12be0c4..879bf8086b 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md index 7e6b560acb..6b7b8ad3ed 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPassword +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationPassword schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md index 591f43afc8..e2bb538ca6 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPasswordCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md index b7339ab656..4d4f5e3531 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md index eaf60210ad..179ce03a8a 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationProxyApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md index 7afb0887c5..cd013abedd 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyApplicationConnectorGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationProxyApplicationConnectorGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md index dfb7d8ba78..311cddf449 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationProxyConnectorGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationProxyConnectorGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md index e13292eb59..23803b42d7 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaApplicationVerifiedPublisher +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationVerifiedPublisher schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md index e802683448..132606613e 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDeletedApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md index 53604c5f7c..01b319cee7 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeletedDirectoryObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDeletedDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md index 05abdc0f98..604606939b 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPasswordSingleSignOnCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPasswordSingleSignOnCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md index 361d8dfa18..ec0c8a41ae 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipal +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipal schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md index 7544b102a2..6e00094b98 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md index a82ee36d44..989d7ce940 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md index 4f43f5cf75..44f34cc5f6 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md index 99980f5ec1..05f5121eeb 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPasswordCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md index ac138ace93..a15140726f 100644 --- a/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Restore-EntraBetaDeletedApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md index cc4f5fa713..fa0f9b9d5d 100644 --- a/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md +++ b/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md index 5dc53fcabf..f55f3ee0b5 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md index 39c31f8e71..cff6a52c83 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationLogo +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationLogo schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md index 868618781a..52c904783b 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplication +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md index eb9f64870e..f116fd531a 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationConnectorGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyApplicationConnectorGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md index 64d49c582d..4e87ebd36d 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyApplicationSingleSignOn +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyApplicationSingleSignOn schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md index da217b338a..5044f2396a 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnector +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyConnector schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md index e9fb443977..6df4bb154c 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationProxyConnectorGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyConnectorGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md index 4e5d3e16c6..f39a7ff1be 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaApplicationVerifiedPublisher +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationVerifiedPublisher schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md index 7f415034aa..27e95975f6 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPasswordSingleSignOnCredential +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPasswordSingleSignOnCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md index 33be8158fd..ff47c609e7 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaServicePrincipal +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaServicePrincipal schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md b/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md index 458ca255e5..7f23bc912a 100644 --- a/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md +++ b/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi254 manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Connect-Entra +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Connect-Entra schema: 2.0.0 --- @@ -255,7 +255,7 @@ Welcome to Microsoft Graph! To connect as a different identity other than CurrentUser, specify the ContextScope parameter with the value Process. -For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/microsoft.graph.entra/get-entracontext) command. +For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/Microsoft.Entra/get-entracontext) command. ### Example 12: Connecting to an environment or cloud diff --git a/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md b/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md index 7a912e4703..7c82182864 100644 --- a/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md +++ b/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Disconnect-Entra +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Disconnect-Entra schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md b/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md index bdbde6bc49..df4cb64a5a 100644 --- a/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md +++ b/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutung manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraContext +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraContext schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md index 486c68592f..f56a6a935e 100644 --- a/module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md +++ b/module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Reset-EntraBetaStrongAuthenticationMethodByUpn +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Reset-EntraBetaStrongAuthenticationMethodByUpn schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md index 5a488cd475..fb853cc108 100644 --- a/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md +++ b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaSignedInUserAllRefreshToken +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Revoke-EntraBetaSignedInUserAllRefreshToken schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md index de158edf7a..abf537e4e3 100644 --- a/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md +++ b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Revoke-EntraBetaUserAllRefreshToken +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Revoke-EntraBetaUserAllRefreshToken schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md index de07afde7d..07ca83b651 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaAdministrativeUnitMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaAdministrativeUnitMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md index d0b190699a..885ed7921a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md index 2cf35cf043..8853e65002 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaDeviceRegisteredOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md index d70008ee95..89d1a138d8 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaDeviceRegisteredUser +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaDeviceRegisteredUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md index d986bf15ae..a4dd895c3b 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaDirectoryRoleMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaDirectoryRoleMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md index aa2665af87..8d5c440187 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaScopedRoleMembership +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaScopedRoleMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md index 2fdea2ba2b..c12cfb2196 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Confirm-EntraBetaDomain +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Confirm-EntraBetaDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md b/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md index 875a7fa397..1f9c09b5fb 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Enable-EntraBetaDirectoryRole +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Enable-EntraBetaDirectoryRole schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md index 4df777d0c0..0443834e3c 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAccountSku +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAccountSku schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md index 817e2eb72d..8e04422b9e 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnit +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAdministrativeUnit schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md index a9c6f76f5c..d142051923 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAdministrativeUnitMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAdministrativeUnitMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md index 412910296b..4b85fb91a9 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAttributeSet +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAttributeSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md index 46b58633ae..3d97e81ab6 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContact +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContact schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md index 5e48603c8c..b6acf266f7 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactDirectReport +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContactDirectReport schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md index e9a8ad5c51..30afe35d99 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactManager +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContactManager schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md index 4172e7400d..2810451cbe 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContactMembership +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContactMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md index 5b8fd137a4..21b6db02ef 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaContract +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContract schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md index 2bd7b458b2..b74983089b 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinition +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md index 8ff736d7b5..11005110ab 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md index faaa9d2a72..9b01319ecf 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedDirectoryObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeletedDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md index 9f42545918..362e8c7500 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDevice +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md index 393ec542f5..3fa856ea60 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeviceRegisteredOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md index 72c34dc82c..75d17a7f7c 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeviceRegisteredUser +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeviceRegisteredUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md index 4783228b6f..f91f37634b 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncConfiguration +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirSyncConfiguration schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md index 448a6fb350..b5ba61223a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirSyncFeature +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirSyncFeature schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md index 6e6f6ce7a1..6737ae6c9a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md index 5af437ed03..89c7bc7a73 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRole +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRole schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md index f496561acb..f2753755f5 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRoleMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md index 5b7642dae8..fc2fb12162 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleTemplate +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRoleTemplate schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md index e2990e320c..30361cb019 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectorySetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md index 2540f6c868..f52e58b67a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectorySettingTemplate +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectorySettingTemplate schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md index 14b0cbf026..0170f577ec 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomain +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md index 21b5dafd20..bfc0b67afc 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainFederationSettings +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomainFederationSettings schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md index 42f2182448..dd00238852 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainNameReference +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomainNameReference schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md index e72564c81f..0bf38733c9 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainServiceConfigurationRecord +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomainServiceConfigurationRecord schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md index 2b6f7e6a83..b8f58afd74 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDomainVerificationDnsRecord +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomainVerificationDnsRecord schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md index 5957d75842..9ec4143e37 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaFederationProperty +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaFederationProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md index 67383951eb..0bcf8af5f7 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPartnerInformation +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPartnerInformation schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md index 7a7e1206d5..825909f966 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPasswordPolicy +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPasswordPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md index 7512efebe2..4c858bd38a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaScopedRoleMembership +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaScopedRoleMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md index 962647218f..3f90118380 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaSubscribedSku +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaSubscribedSku schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md index c734cc69ec..8fdbc31b5e 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaTenantDetail +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaTenantDetail schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md index 5e1f652075..bd46d1aa12 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnit +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaAdministrativeUnit schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md index d51300c90d..0eb553db0f 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaAdministrativeUnitMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaAdministrativeUnitMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md index 75d651c677..163ce8ca95 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaAttributeSet +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaAttributeSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md index 58137e5762..9f67102685 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaCustomSecurityAttributeDefinition +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaCustomSecurityAttributeDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md index 87385aaabd..3411f6ec43 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDevice +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md index 655d6cbb35..b9b3ae2dc3 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectorySetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDirectorySetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md index 37c21d5621..05cf883f64 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDomain +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md index a797e423b9..1257754d3f 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnit +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaAdministrativeUnit schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md index c330ad1f72..c0097244f5 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaAdministrativeUnitMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaAdministrativeUnitMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md index c0d57d834b..ff723391c9 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaContact +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaContact schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md index c8ff0fee95..57e89b5a37 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDevice +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md index 36e98b9802..8328b37ab0 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDeviceRegisteredOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md index 13e371247f..9cbc75c92b 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDeviceRegisteredUser +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDeviceRegisteredUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md index 55b9f017f1..77f0e02a35 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDirectoryRoleMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md index 0f083c3d45..4ec63058a3 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectorySetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDirectorySetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md index 8dcd7c00af..4ecf201171 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDomain +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md index 99075c6517..44ff6e6aae 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaScopedRoleMembership +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaScopedRoleMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md index 1546af94e2..6093e8b3bd 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Restore-EntraBetaDeletedDirectoryObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Restore-EntraBetaDeletedDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md index 4f4809f235..bd45669142 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaAdministrativeUnit +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaAdministrativeUnit schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md index 132fada2b4..b16d966239 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaAttributeSet +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaAttributeSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md index 6b94b8162a..6b3757c9f4 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinition +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md index db66e41029..01e97eb51d 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md index 7b3848a67a..bff3a5c143 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDevice +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md index 4d4047ebbb..a50f202a95 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncConfiguration +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirSyncConfiguration schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md index 1265b09a65..0a1ccaa802 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncEnabled +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirSyncEnabled schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md index b7356226de..09ce43b37d 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirSyncFeature +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirSyncFeature schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md index ab313299d3..4a5df53ed9 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectorySetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirectorySetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md index 42ae00e12d..45988f67f5 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomain +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md index 4a724198a9..8d7ba0612f 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDomainFederationSettings +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDomainFederationSettings schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md index fa862a55f4..91c05e2a8c 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPartnerInformation +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPartnerInformation schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md index f44ba0e4e0..6306f730e4 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaTenantDetail +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaTenantDetail schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md index 9e7e5f3043..9479c7d7e9 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleAssignment +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md index c7542f8ba8..c284b0d438 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDirectoryRoleDefinition +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md index 3e2683d024..ab414b9e7e 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedResource +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedResource schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md index bc7ee1e4ab..f06ae96aba 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md @@ -1,7 +1,7 @@ --- -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRole +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedRole schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md index 09e4cfb524..4c14a1c6c9 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleDefinition +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md index 4d2cf8a3ea..1de19d43d4 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivilegedRoleSetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedRoleSetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md index c0285dab6c..49c7a03f9e 100644 --- a/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDirectoryRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md index b344455318..c17f7cb695 100644 --- a/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaDirectoryRoleDefinition +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDirectoryRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md index cff73b12f8..1f9588ae8d 100644 --- a/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md @@ -1,7 +1,7 @@ --- -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md index 837399cee9..54700d7471 100644 --- a/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleAssignment +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDirectoryRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md index dd80d087e7..28b0bcb570 100644 --- a/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaDirectoryRoleDefinition +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDirectoryRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md index 46e1974f67..a2e6ba4db1 100644 --- a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaDirectoryRoleDefinition +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirectoryRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md index c3935e9a12..1188d8079c 100644 --- a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md +++ b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md @@ -1,7 +1,7 @@ --- -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md index 016902c994..748b51fbe1 100644 --- a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md +++ b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPrivilegedRoleSetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPrivilegedRoleSetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md index 8655442be0..14b20fe2cc 100644 --- a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md +++ b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaGroupMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md index ac5dd56bc5..6f41645714 100644 --- a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md +++ b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaGroupOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaGroupOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md index 9719953274..2d22f95f7d 100644 --- a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md index a3f211b9be..86b2078a04 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaDeletedGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeletedGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md index 5e8b59d8b3..405e421cc1 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md index f45016c3dc..b899f27cfe 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md index 41cf726454..9431995c28 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md index 765718a58d..07d1fff0cc 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md index 6ec3ae132b..a605674ccb 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md index c2aad52242..1eee40e0ae 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGroupPermissionGrant +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupPermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md index f74aea62f4..35f8772d66 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md index 02f4f6f8a1..6ebe106017 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectByObjectId +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaObjectByObjectId schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md index dd9410048d..3575baffca 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaObjectSetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaObjectSetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md index ce14bcc3ca..7aa5102131 100644 --- a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md +++ b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md index 8b29ba07af..192b281170 100644 --- a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaGroupAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md index c180d47dab..5dad10235f 100644 --- a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaGroupLifecyclePolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaGroupLifecyclePolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md index 38c17267a8..f624b43f0a 100644 --- a/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md +++ b/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaObjectSetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaObjectSetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md index 7cdc734688..fcbba57c1c 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md index 1c6da70c1e..06d5e14af6 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md @@ -7,9 +7,9 @@ ms.date: 07/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md index 84e28c3023..b06ac0ce84 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md index a35dad8769..6aa0fd01f6 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupMember +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroupMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md index 9210f823ab..9caf80d73a 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaGroupOwner +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroupOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md index b1228086b3..bb7d6f6c06 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md index 4fd1e39bcc..b81bbbde0a 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaObjectSetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaObjectSetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md b/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md index 3acc20dfd8..b56d5c8f1f 100644 --- a/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Reset-EntraBetaLifeCycleGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Reset-EntraBetaLifeCycleGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md index 2a4522dea7..2d935e3e22 100644 --- a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md +++ b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md index 09b212d532..d63dabfd53 100644 --- a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md +++ b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md index 1528f1302c..ea47c72454 100644 --- a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md +++ b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md index d301fc4428..a1eed3c9a1 100644 --- a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroup +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md index eb0bfeb0ee..e9067dafc3 100644 --- a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md index a9ab01b28c..181ba882d1 100644 --- a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md +++ b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaObjectSetting +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaObjectSetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md index a4a56e0752..a8e50bd826 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md @@ -7,9 +7,15 @@ ms.date: 06/26/2024 ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG +<<<<<<< HEAD author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta +======= +author: andres-canello +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +>>>>>>> e6ba625db (Rename module (#1223)) online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md index fd98e1a018..4ca7f11fc0 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md @@ -7,9 +7,15 @@ ms.date: 07/18/2024 ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG +<<<<<<< HEAD author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta +======= +author: andres-canello +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +>>>>>>> e6ba625db (Rename module (#1223)) online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md index e74c8e9db1..4f2270bbc0 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md @@ -7,9 +7,15 @@ ms.date: 07/18/2024 ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG +<<<<<<< HEAD author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta +======= +author: andres-canello +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +>>>>>>> e6ba625db (Rename module (#1223)) online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md index 8964120d49..27751d2b7a 100644 --- a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md +++ b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInDetailedSummary +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationSignInDetailedSummary schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md index a1c3cfc27f..c468f67a39 100644 --- a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md +++ b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationSignInSummary +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationSignInSummary schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md index 2443efe016..9d3cb06d39 100644 --- a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md +++ b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditDirectoryLog +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAuditDirectoryLog schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md index 1730056572..5413f125de 100644 --- a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md +++ b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuditSignInLog +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAuditSignInLog schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md index e5b502700a..57f8d907a6 100644 --- a/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md +++ b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md index 7d3654ef17..b4c2216864 100644 --- a/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Add-EntraBetaServicePrincipalPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaServicePrincipalPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md index e4e637feae..d9ba259e52 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaAuthorizationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAuthorizationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md index f67b82e7a8..8a3afea146 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaConditionalAccessPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaConditionalAccessPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md index 7ed0fce4e7..b548efc464 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaFeatureRolloutPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaFeatureRolloutPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md index 291932b8fb..895a3c5ea9 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaIdentityProvider +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaIdentityProvider schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md index f8f37121cf..a3976a0b84 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaNamedLocationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaNamedLocationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md index 4212c9ca29..0e4ea31669 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaOAuth2PermissionGrant +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaOAuth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md index 9329218395..9f7fac6507 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantConditionSet +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPermissionGrantConditionSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md index 8de32974f7..02f2e7ad24 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPermissionGrantPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPermissionGrantPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md index 0b31518df9..ebb89eb711 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md index dead6eaaf3..d3a0233543 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPolicyAppliedObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPolicyAppliedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md index 6fdd9cb6b9..6c97472cae 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaServicePrincipalPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md index 5e485bf9bd..6547c95640 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md index 4400167c9e..8ab14f7b30 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaTrustedCertificateAuthority +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaTrustedCertificateAuthority schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md index 5be6dba1e2..81f22bb054 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaConditionalAccessPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaConditionalAccessPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md index 8ffa2667de..bfff6c5c4c 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaFeatureRolloutPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaFeatureRolloutPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md index e48d0af50c..9b807a5ec1 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaIdentityProvider +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaIdentityProvider schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md index 2697f37099..c1c0e65825 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaInvitation +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaInvitation schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md index b398e88e04..064c2849e6 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaNamedLocationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaNamedLocationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md index 067d0ed656..fec246fe16 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaOauth2PermissionGrant +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaOauth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md index 4481a92c1a..dfaac2ade3 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantConditionSet +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPermissionGrantConditionSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md index a1a8cfb28c..2abe978292 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPermissionGrantPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPermissionGrantPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md index 0095d0a20d..8704cfb5b6 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md index 151a8a191d..93a13d94c0 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustFrameworkPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaTrustFrameworkPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md index 4575760277..2bda7ea546 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaTrustedCertificateAuthority +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaTrustedCertificateAuthority schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md index 0b9512215f..8ee117fdd9 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaConditionalAccessPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaConditionalAccessPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md index 88216cf75c..5154df93ce 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md index 5544e51e31..69d8b2cdb2 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md index 421d42d510..8303e41499 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaIdentityProvider +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaIdentityProvider schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md index 1c157bb52c..2aeedd6e62 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaNamedLocationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaNamedLocationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md index c0bf03235f..fdf7951e30 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaOAuth2PermissionGrant +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaOAuth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md index 67231c7231..9e03832160 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantConditionSet +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPermissionGrantConditionSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md index a8e9c82223..f74b1a7488 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPermissionGrantPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPermissionGrantPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md index db67274db6..826ca4e6e0 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md index 8e42340663..e17504a700 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaServicePrincipalPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md index 0c0805d7fa..a1b627d105 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustFrameworkPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaTrustFrameworkPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md index cb5304e4f3..59bf1061e6 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaTrustedCertificateAuthority +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaTrustedCertificateAuthority schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md index 548a045da1..faec220da4 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaAuthorizationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaAuthorizationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md index e9b4dd49ce..c01a96f100 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaConditionalAccessPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaConditionalAccessPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md index add4c87988..450ae6d9f4 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaFeatureRolloutPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaFeatureRolloutPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md index 40ed98cacc..9a64fde4c8 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaIdentityProvider +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaIdentityProvider schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md index 5809a25048..707542fe8e 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaNamedLocationPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaNamedLocationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md index bdb370fbe5..aeab921b41 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantConditionSet +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPermissionGrantConditionSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md index 815918a017..84055128fe 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPermissionGrantPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPermissionGrantPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md index 6fbf91e046..c10a20a1d2 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md index 29b0953fb4..aa0cbfe203 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustFrameworkPolicy +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaTrustFrameworkPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md index a9e4e16df1..77a382a568 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaTrustedCertificateAuthority +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaTrustedCertificateAuthority schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md index 898d47ed32..516d312449 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUser +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md index d6f4832d48..b03d11125f 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md index 3e35c7cb2b..c948384f74 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserCreatedObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserCreatedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md index c392a9b9af..8f2b6c3f23 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserDirectReport +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserDirectReport schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md index 2774efafdd..427a3fcfda 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserExtension +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserExtension schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md index 41e037b00d..bb749f9f04 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserLicenseDetail +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserLicenseDetail schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md index 1bfd165f6c..6b9a772b7e 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserManager +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserManager schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md index 3cc00741bb..2f0e64f319 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserMembership +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md index 71433e5361..b6e6b4e51f 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md index 5ec1dd0fca..066155c610 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedDevice +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserOwnedDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md index 4fbb8e0495..a1ad55788f 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserOwnedObject +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserOwnedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md index 220fc07996..6391d94615 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserRegisteredDevice +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserRegisteredDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md index c5754b6c62..828275a0b7 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserThumbnailPhoto +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserThumbnailPhoto schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md index f696db96b9..75bb05486c 100644 --- a/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md +++ b/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaUser +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md index 380480df0a..5e9d2daf27 100644 --- a/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaUserAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaUserAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md index 360fc1395c..9947c13fed 100644 --- a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md +++ b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUser +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md index 8aeebe6f36..a2ed6ad699 100644 --- a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserAppRoleAssignment +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaUserAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md index aeec817a8d..4c2581c33b 100644 --- a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md +++ b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserExtension +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaUserExtension schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md index 728d68067c..eb9aaeb1f5 100644 --- a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md +++ b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaUserManager +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaUserManager schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md index 467d9f405c..955e655e70 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUser +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md index c232117708..ca212caa31 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserExtension +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserExtension schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md index 3b653a5d4d..48de0dbe48 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserLicense +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserLicense schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md index b7e37a4c68..a0f48aa49c 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserManager +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserManager schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md index 6f56024d9c..d9662f75f2 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserPassword +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserPassword schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md index 41b1886639..c5b1c21855 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Set-EntraBetaUserThumbnailPhoto +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserThumbnailPhoto schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md b/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md index c444c40a75..09833b0c5a 100644 --- a/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md +++ b/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Update-EntraBetaSignedInUserPassword +external help file: Microsoft.Entra.Beta-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Update-EntraBetaSignedInUserPassword schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md b/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md index ae4737fd5c..8a386e04ca 100644 --- a/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md +++ b/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserFromFederated +external help file: Microsoft.Entra.Beta-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Update-EntraBetaUserFromFederated schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md index ade1fccbd6..feb1b6b7e8 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraApplicationOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraApplicationOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md index 9cb637423c..e7a87c8752 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md index 28f741fc66..f7f1dcd0a3 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md @@ -8,9 +8,9 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraServicePrincipalOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraServicePrincipalOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md index d8cdda2c35..6e630401b5 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplication +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md index 54a338d235..e9e69715c1 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationExtensionProperty +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationExtensionProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md index 678d724f9c..ac6159d595 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationKeyCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md index 0fb6c15102..720ab68779 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationLogo +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationLogo schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md index d023a42ca0..0f97722400 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md index acc350cb4c..1dd794e120 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationPasswordCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md index d8db5c820a..c831c41867 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationServiceEndpoint +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationServiceEndpoint schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md index 3ad0d410fc..8efdc3291b 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraApplicationTemplate +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationTemplate schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md index 74cdce0fb3..32a06bf586 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedApplication +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeletedApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md index bda3b2f1d0..d4135e9d7d 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipal +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipal schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md index efcd5b2178..0067ebbe95 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignedTo +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalAppRoleAssignedTo schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md index 5f2ce83f4a..0b0120db56 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md index 73683275d2..5b2e578d4f 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalCreatedObject +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalCreatedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md index 7e95132340..dda70e78c7 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md index 82b772ea8f..da8e7c832f 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalKeyCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md index 111ed5bfd0..e671ffd490 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalMembership +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md index bbb20d7771..167fde1795 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md index 67ff6305ae..036c0a97ef 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwnedObject +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalOwnedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md index 388473b24d..66e684a96c 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md index 622b426ddf..bb6aa91ac2 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraServicePrincipalPasswordCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md index f8b75c0061..b5c030850e 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplication +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md index d5a7963dab..9764ac3e59 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationExtensionProperty +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationExtensionProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md index f914e54b02..678fa01be3 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md @@ -11,9 +11,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationFromApplicationTemplate +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationFromApplicationTemplate schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md index 16554da0aa..518da83efc 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKey +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationKey schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md index 5393cc9c4a..648bcf5c86 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationKeyCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md index 4308bdb774..ae8919ea7d 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPassword +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationPassword schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md index ee231bbc48..43c37cffea 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraApplicationPasswordCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md index de7042ce6a..7691b81767 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipal +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraServicePrincipal schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md index bc32d75ae9..d3d4d339d4 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraServicePrincipalAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md index 74a1a50f71..9a247d8433 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalKeyCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraServicePrincipalKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md index e5e3f7b995..b75a7e1d49 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraServicePrincipalPasswordCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraServicePrincipalPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md index 3aed2ac71f..dbad1279f5 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplication +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md index a3b219ae87..3f7d66ca2d 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationExtensionProperty +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationExtensionProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md index 6d6d8ff972..d313aa5257 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKey +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationKey schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md index f0a9b6ba1c..a8d7c54160 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationKeyCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md index 2e1f17bd71..7c8e22b3d6 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md index 931c26792e..0748c53f64 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPassword +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationPassword schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md index 12dc128443..423d09f419 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationPasswordCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md index acfa889658..f60afc20c0 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraApplicationVerifiedPublisher +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationVerifiedPublisher schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md index a8145c0e54..7906384863 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedApplication +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDeletedApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md index 441cdaf3ef..ab8f51e4e2 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeletedDirectoryObject +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDeletedDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md index a80f351c16..df78641520 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipal +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipal schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md index c4e23b2540..1a62f2b97a 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md index 1d04211cce..39ad2c6340 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md index 8e1ab52950..4e1aae3aa7 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalKeyCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalKeyCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md index 70a63fe009..3ce4d97e81 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md index 3de0f422a1..e0f439258c 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraServicePrincipalPasswordCredential +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalPasswordCredential schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md index a6bc86c07e..13b1ba3421 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedApplication +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Restore-EntraDeletedApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md index ba5d2d2e3a..9dd9c7e28b 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md index 03f10f4cce..ad09e51727 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplication +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md index d0a5dac0f9..bf6066ecd7 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md +++ b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationLogo +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraApplicationLogo schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md index 3f88a98947..128e732d62 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md +++ b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraApplicationVerifiedPublisher +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraApplicationVerifiedPublisher schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md index 1b8bf6e164..1937767bd9 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md +++ b/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraServicePrincipal +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraServicePrincipal schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md index 7b5c34637f..528e7519ee 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraEnvironment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraEnvironment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md b/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md index 1322d7b844..59ce3f06f3 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi254 manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Connect-Entra +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Connect-Entra schema: 2.0.0 --- @@ -255,7 +255,7 @@ Welcome to Microsoft Graph! To connect as a different identity other than CurrentUser, specify the ContextScope parameter with the value Process. -For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/microsoft.graph.entra/get-entracontext) command. +For more information on how to get the current context, see [Get-EntraContext](https://learn.microsoft.com/powershell/module/Microsoft.Entra/get-entracontext) command. ### Example 12: Connecting to an environment or cloud diff --git a/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md b/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md index 4cf9324306..572a2cec05 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Disconnect-Entra +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Disconnect-Entra schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md b/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md index 8ef326b326..caeeec6481 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Find-EntraPermission +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Find-EntraPermission schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md index 86085f8469..0c7678461d 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContext +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContext schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md index c5cf3a9139..50cb8dc428 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraEnvironment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraEnvironment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md index 2017e7aa8a..8ccb238d09 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraStrongAuthenticationMethodByUpn +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Reset-EntraStrongAuthenticationMethodByUpn schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md index 3a375cf615..f0132e7e37 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraSignedInUserAllRefreshToken +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Revoke-EntraSignedInUserAllRefreshToken schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md index 364ce1fa3a..9e3af6078d 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Revoke-EntraUserAllRefreshToken +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Revoke-EntraUserAllRefreshToken schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md index f7b908e12c..39645c5075 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraAdministrativeUnitMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraAdministrativeUnitMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md index 59f40bdbf9..263c22f3ed 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md index b0f4c794f1..3bf00230a0 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraDeviceRegisteredOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md index 354cbf34c6..9e66c78719 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDeviceRegisteredUser +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraDeviceRegisteredUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md index d163b40171..52d70a4525 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraDirectoryRoleMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraDirectoryRoleMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md index bba71d44a5..8de41bf3c4 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraScopedRoleMembership +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraScopedRoleMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md index da02de22be..4c128989a7 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Confirm-EntraDomain +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Confirm-EntraDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md index f1d4bcccd1..7bde93125c 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Enable-EntraDirectoryRole +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Enable-EntraDirectoryRole schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md index 9271fdef45..c37800183e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-CrossCloudVerificationCode +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-CrossCloudVerificationCode schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md index d6e6628eca..60d350db98 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAccountSku +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAccountSku schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md index 0c85fb6da1..dbeddaa348 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnit +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAdministrativeUnit schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md index f4232506c7..3b36c38c7a 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAdministrativeUnitMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAdministrativeUnitMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md index 7b235ab88d..fad801757b 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAttributeSet +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAttributeSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md index fb0bcb0cb5..ae39b96bfe 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContact +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContact schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md index 5ba96a392d..2bf23e2253 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactDirectReport +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContactDirectReport schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md index 9aba156048..840fe35d65 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactManager +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContactManager schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md index e09631eec8..4be93df4d0 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactMembership +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContactMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md index ab173d765b..30999dafa1 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContactThumbnailPhoto +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContactThumbnailPhoto schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md index b2b4820947..1fc817f53b 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraContract +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContract schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md index ec88ceccfd..8be18c9183 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinition +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraCustomSecurityAttributeDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md index e043e38f4b..16c8fcd586 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md index 099bb99475..f121127233 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedDirectoryObject +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeletedDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md index 9d6749d3d4..390fd74a7e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDevice +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md index 1149f5438e..e7fed412a2 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeviceRegisteredOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md index 810e5ec600..154ac0b9ca 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeviceRegisteredUser +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeviceRegisteredUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md index cd6d8ca440..cc591e94d1 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncConfiguration +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirSyncConfiguration schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md index 6ef66b16ba..e82f73167e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirSyncFeature +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirSyncFeature schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md index 4bbd98ed43..3dc4b2f2c8 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md index aac3e91b9d..028f9b4c1d 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRole +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRole schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md index 3238d3cb09..1d489b5640 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRoleMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md index 6ea213a233..b7cf7e366c 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleTemplate +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRoleTemplate schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md index 6a9d0258f3..b893987f1c 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomain +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md index 2381a779d4..9354b09a11 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainFederationSettings +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomainFederationSettings schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md index d6e7a88bf0..2875d4b638 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainNameReference +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomainNameReference schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md index df14887de6..324bec695e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainServiceConfigurationRecord +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomainServiceConfigurationRecord schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md index cd3821fc66..3eb648caf9 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDomainVerificationDnsRecord +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomainVerificationDnsRecord schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md index 0b48a4f8c1..c349a7d41f 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraExtensionProperty +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraExtensionProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md index 615248b150..f679036a4c 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFederationProperty +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraFederationProperty schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md index 813b97fb34..074b9af119 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectByObjectId +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraObjectByObjectId schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md index c2338d2a49..d9d5b732c8 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPartnerInformation +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPartnerInformation schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md index ea27374f11..5b66b53975 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPasswordPolicy +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPasswordPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md index 393349ba13..0ab26bbffc 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraScopedRoleMembership +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraScopedRoleMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md index bcf1591a2e..8e24d8ef29 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraSubscribedSku +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraSubscribedSku schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md index 7bf50037c6..f87b884182 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTenantDetail +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraTenantDetail schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md index 62b2ede469..98db6d4e38 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAdministrativeUnit +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraAdministrativeUnit schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md index 8a6f2ea0bf..c2222d8b03 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraAttributeSet +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraAttributeSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md index 6e1299f5b0..49de406a9e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraCustomSecurityAttributeDefinition +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraCustomSecurityAttributeDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md index d81f8e00ad..97c517fa89 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDevice +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md index bba50a37cd..da72e16050 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDomain +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md index 12485ddb51..651bc99720 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnit +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraAdministrativeUnit schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md index 27cd6c8ad2..c77c73c5a1 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraAdministrativeUnitMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraAdministrativeUnitMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md index 9d5b0e222a..3202c94671 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraContact +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraContact schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md index bacb0d4a0c..8920323b92 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDevice +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md index ec6b3a8a33..a4e92cb7fb 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDeviceRegisteredOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md index ec9ca2ff64..f6b3f4346f 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDeviceRegisteredUser +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDeviceRegisteredUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md index 4b888305c9..950cc71640 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDirectoryRoleMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md index cfd13d0926..a29b969d32 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDomain +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md index f0b6781699..31abd641aa 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md @@ -9,10 +9,10 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraExternalDomainFederation +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraExternalDomainFederation schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md index 194f322b7c..8304848936 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraScopedRoleMembership +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraScopedRoleMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md index ce69a357d3..15c9999d8e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Restore-EntraDeletedDirectoryObject +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Restore-EntraDeletedDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md index 4322f711fa..a524d142e9 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAdministrativeUnit +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraAdministrativeUnit schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md index 71c1d09ff0..a4ece0916a 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAttributeSet +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraAttributeSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md index d91b797cc7..7fab2faeb2 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinition +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraCustomSecurityAttributeDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md index a2b37457d9..8d53b7b119 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md index 2e21b12941..9a1c8cf54e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDevice +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md index 1226207ac6..053c6c5e47 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncConfiguration +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDirSyncConfiguration schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md index 75055a97f0..bfb236b909 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncEnabled +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDirSyncEnabled schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md index 7dcceca78b..8b9213d1af 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirSyncFeature +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDirSyncFeature schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md index d2000341f7..5df60e08f0 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomain +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDomain schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md index 21dbb0f668..54b068bbf8 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDomainFederationSettings +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDomainFederationSettings schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md index 1a4ad58b18..c8baf34f68 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPartnerInformation +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraPartnerInformation schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md index 24191c6eb6..a2d70b2894 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTenantDetail +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraTenantDetail schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md index 7c86ba6f95..3732e917c8 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md index 7fcd4cd5a8..e65da09fb1 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDirectoryRoleDefinition +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md index aae90daa6d..627c47ef93 100644 --- a/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraDirectoryRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md index d55868d7d6..306fb70603 100644 --- a/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraDirectoryRoleDefinition +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraDirectoryRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md index ba9841b7cd..46b8530f9f 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDirectoryRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md index d80058e54d..ae3d163375 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraDirectoryRoleDefinition +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDirectoryRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md index d00e0c6818..e4eaa62933 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraDirectoryRoleDefinition +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDirectoryRoleDefinition schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md index e1b21e4c97..67c21f8739 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md +++ b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraGroupMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md index 4a5865231f..ce0f079244 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md +++ b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraGroupOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraGroupOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md index 1e72083837..2855be163c 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Add-EntraLifecyclePolicyGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraLifecyclePolicyGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md index f6a4c492a1..5dc878de90 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraDeletedGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeletedGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md index ad0512439e..342a416eee 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md index 342f9d743d..556f16c85c 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md index ec61a0e1e7..cdebcfdc74 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupLifecyclePolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupLifecyclePolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md index ff3f1cfb0c..b8022f1cb8 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md index cdbfe48d7e..6a343f6d3e 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md index 51986bf57f..ff6566a4b0 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraGroupPermissionGrant +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupPermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md index db05f4a19e..3584a3d68b 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraLifecyclePolicyGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraLifecyclePolicyGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md index cea3e290c0..79b680ebee 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraObjectSetting +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraObjectSetting schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md index 22a87355e6..8f91df9e41 100644 --- a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md index 6519453fe3..4c1ba28162 100644 --- a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraGroupAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md index f9a711be83..6b84628b27 100644 --- a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraGroupLifecyclePolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraGroupLifecyclePolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md index 4870595bdb..dfc05d3d70 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md @@ -8,9 +8,9 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md index c76afdb8a1..eaf5c0b166 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md @@ -8,9 +8,9 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroupAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md index 57dfcbd331..5db5c62f32 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupLifecyclePolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroupLifecyclePolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md index fa26ce60cd..8e766e187c 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupMember +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroupMember schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md index 0a9c4aff2d..524185a241 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md @@ -8,9 +8,9 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraGroupOwner +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroupOwner schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md index 61ae6cc033..a771484b43 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraLifecyclePolicyGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraLifecyclePolicyGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md b/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md index c84a8d31ad..a84120036e 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Reset-EntraLifeCycleGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Reset-EntraLifeCycleGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md index 35a1f6c7e8..2101dd2643 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsContactIsMemberOf +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Select-EntraGroupIdsContactIsMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md index 17a5f36fb4..beca17f2ec 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsGroupIsMemberOf +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Select-EntraGroupIdsGroupIsMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md index b9e50aa590..de9d155c5a 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Select-EntraGroupIdsUserIsMemberOf +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Select-EntraGroupIdsUserIsMemberOf schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md index 89bea7d248..c208c4ff84 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroup +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraGroup schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md index f423e739d2..a6b05fe943 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraGroupLifecyclePolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraGroupLifecyclePolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md index 640ed63b0e..d4bf972511 100644 --- a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md +++ b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md @@ -10,8 +10,8 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md index 5f710b7c0d..6046458e32 100644 --- a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md +++ b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md @@ -10,8 +10,8 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md index c735ee4d6c..61a4932ca0 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md @@ -8,9 +8,9 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAuthorizationPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAuthorizationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md index 406c7ef223..a8cb85c366 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraConditionalAccessPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraConditionalAccessPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md index b4dd3a5fd2..adb662c76b 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraFeatureRolloutPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraFeatureRolloutPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md index 358563649f..e353ef3c72 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraIdentityProvider +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraIdentityProvider schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md index edab5a7bd4..14e54a9313 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraNamedLocationPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraNamedLocationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md index 7989dcceb3..025e4fd46f 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraOAuth2PermissionGrant +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraOAuth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md index 35e31777dd..04c45a1224 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantConditionSet +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPermissionGrantConditionSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md index 800032dcc0..abc5f5deca 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPermissionGrantPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPermissionGrantPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md index 77785c64c1..d107e2392b 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraPolicy +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md index a26bfd778e..4461ec632a 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraTrustedCertificateAuthority +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraTrustedCertificateAuthority schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md index 3b9cb44f36..8402f7ddc8 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraConditionalAccessPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraConditionalAccessPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md index e276f16fd8..3b45f1a832 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraFeatureRolloutPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraFeatureRolloutPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md index 5e6ce8b6b1..37f754f289 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraIdentityProvider +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraIdentityProvider schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md index 997bf4368b..48e797ee93 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraNamedLocationPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraNamedLocationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md index 38a98265c1..eb1d5c6f8d 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraOauth2PermissionGrant +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraOauth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md index 2f1cf9baf9..a0ae5e06a0 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantConditionSet +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraPermissionGrantConditionSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md index ef81f38eb6..3264f429a5 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPermissionGrantPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraPermissionGrantPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md index 1bbe623503..dcdff8c2c0 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md index ab18d1f589..6669c17e14 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraTrustedCertificateAuthority +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraTrustedCertificateAuthority schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md index f0703bac66..3f37198079 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraConditionalAccessPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraConditionalAccessPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md index 75ae9347b1..73e63963c9 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraBetaFeatureRolloutPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraBetaFeatureRolloutPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md index 03968e43e8..e9e4f0a135 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md index c1982b130d..0183415763 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraIdentityProvider +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraIdentityProvider schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md index 405c7db5f6..e403a5a1ec 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraNamedLocationPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraNamedLocationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md index ae6f1af933..055850c6fc 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraOAuth2PermissionGrant +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraOAuth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md index d46b6e072d..928234cf1f 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantConditionSet +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraPermissionGrantConditionSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md index bd9e0d012a..3b8e4b1e97 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPermissionGrantPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraPermissionGrantPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md index b35076fe82..7f5e0c6765 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md index dce8b479ed..2d75d66e5e 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraTrustedCertificateAuthority +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraTrustedCertificateAuthority schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md index f508974760..f7e63e9152 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraAuthorizationPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraAuthorizationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md index 1c140af2d6..bd5d2f4629 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraConditionalAccessPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraConditionalAccessPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md index 9f60eb62da..686af3f1fa 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraFeatureRolloutPolicy +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraFeatureRolloutPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md index 557f8d8cee..ab4c682ae3 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraIdentityProvider +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraIdentityProvider schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md index 4f55ee4639..66e07b3234 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraNamedLocationPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraNamedLocationPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md index 45e4ecc72a..068ccb090d 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantConditionSet +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraPermissionGrantConditionSet schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md index db649bc8da..0e0a66d20e 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPermissionGrantPolicy +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraPermissionGrantPolicy schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md index 9f5e238eb2..7924ee0ab3 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md @@ -9,8 +9,8 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md index cdfdb92eaf..86d8db25f8 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraTrustedCertificateAuthority +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraTrustedCertificateAuthority schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md index b0b93e6c34..d45ae636e4 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUser +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md index 5ad745b39b..814da9c346 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md index 56eb9c60b5..babb1127ae 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserCreatedObject +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserCreatedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md index 0a4ea05e0b..d52b434cb7 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserDirectReport +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserDirectReport schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md index 96b66cd878..dd51603f9a 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserExtension +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserExtension schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md index 6dbad40666..bd67233386 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserLicenseDetail +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserLicenseDetail schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md index a72d6f6ddb..d2aa60ada0 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserManager +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserManager schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md index 0f685737af..5cfaf9d375 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserMembership +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserMembership schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md index f09862a9c3..f131b430ab 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOAuth2PermissionGrant +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserOAuth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md index b6f4ade3c7..0b3f78e79e 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedDevice +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserOwnedDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md index cc4f9de59d..0e6a103b85 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserOwnedObject +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserOwnedObject schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md index c58d964a67..602ec8bab4 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserRegisteredDevice +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserRegisteredDevice schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md index 3514e4f4ac..3093fb0dc9 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserThumbnailPhoto +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserThumbnailPhoto schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md index 62a06bd347..63370de4f8 100644 --- a/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md +++ b/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md @@ -10,9 +10,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUser +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md index 3ede3eecff..6a74a16fbc 100644 --- a/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/New-EntraUserAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraUserAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md index 77c8786f2f..c06cf9902d 100644 --- a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md +++ b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUser +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md index 4a7f77cbf2..6601657b2e 100644 --- a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserAppRoleAssignment +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraUserAppRoleAssignment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md index 7e0aae2e20..78275af583 100644 --- a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md +++ b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserExtension +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraUserExtension schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md index 9d2fac8aa1..5defcf1283 100644 --- a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md +++ b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Remove-EntraUserManager +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraUserManager schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md index 16500c0669..8f319d1e9c 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUser +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUser schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md index 82ec532e91..7af45e1215 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserExtension +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserExtension schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md index ff516e1557..afd992d487 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserLicense +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserLicense schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md index f73f6beb1c..ee8a629278 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md @@ -8,9 +8,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserManager +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserManager schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md index 8c2db963bf..5fdebd108e 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserPassword +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserPassword schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md index 21eef3e9b1..f6e8118e9a 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraUserThumbnailPhoto +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserThumbnailPhoto schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md b/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md index 1959f83ffc..f32d94aac2 100644 --- a/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md +++ b/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraSignedInUserPassword +external help file: Microsoft.Entra-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Update-EntraSignedInUserPassword schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md b/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md index f300d9f135..b9e2134321 100644 --- a/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md +++ b/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraUserFromFederated +external help file: Microsoft.Entra-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Update-EntraUserFromFederated schema: 2.0.0 --- diff --git a/samples/export-apps-with-expiring-secrets-modified.ps1 b/samples/export-apps-with-expiring-secrets-modified.ps1 index e5da85f56a..d272966709 100644 --- a/samples/export-apps-with-expiring-secrets-modified.ps1 +++ b/samples/export-apps-with-expiring-secrets-modified.ps1 @@ -9,7 +9,7 @@ #The entire risk arising out of the use or performance of the sample and documentation remains with you. #In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the script be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample or documentation, even if Microsoft has been advised of the possibility of such damages. ################################################################################# -Import-Module Microsoft.Graph.Entra +Import-Module Microsoft.Entra Connect-MgGraph #Replaces Connect-AzureAD for auth Enable-EntraAzureADAlias #Activate aliasing diff --git a/src/CompatibilityAdapterBuilder.ps1 b/src/CompatibilityAdapterBuilder.ps1 index d47b584dc2..19b940bcbc 100644 --- a/src/CompatibilityAdapterBuilder.ps1 +++ b/src/CompatibilityAdapterBuilder.ps1 @@ -153,13 +153,13 @@ class CompatibilityAdapterBuilder { # Constructor that changes the output folder, load all the Required Modules and creates the output folder. CompatibilityAdapterBuilder() { - $this.BasePath = (join-path $PSScriptRoot '../module/Entra/') + $this.BasePath = (join-path $PSScriptRoot '../module_legacy/Entra/') $this.HelpFolder = (join-path $this.BasePath './help') $this.Configure((join-path $this.BasePath "/config/ModuleSettings.json")) } CompatibilityAdapterBuilder([string] $Module){ - $this.BasePath = (join-path $PSScriptRoot '../module/') + $this.BasePath = (join-path $PSScriptRoot '../module_legacy/') $this.BasePath = (join-path $this.BasePath $Module) $this.HelpFolder = (join-path $this.BasePath './help') $this.Configure((join-path $this.BasePath "/config/ModuleSettings.json")) @@ -168,7 +168,7 @@ class CompatibilityAdapterBuilder { CompatibilityAdapterBuilder([bool] $notRunningUT = $false){ if($notRunningUT) { - $this.BasePath = (join-path $PSScriptRoot '../module/Entra/') + $this.BasePath = (join-path $PSScriptRoot '../module_legacy/Entra/') $this.HelpFolder = (join-path $this.BasePath './help') $this.Configure((join-path $this.BasePath "/config/ModuleSettings.json")) } diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index c8de778133..17eec57c74 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -125,9 +125,9 @@ Set-StrictMode -Version 5 [void] CreateSubModuleFile([string]$Module, [string]$typedefsFilePath=$this.TypeDefsDirectory) { # Determine the output path based on the module $startDirectory = if ($Module -eq "Entra") { - (Join-Path $PSScriptRoot "..\module\Entra\Microsoft.Graph.Entra") + (Join-Path $PSScriptRoot "..\module\Entra\Microsoft.Entra") } else { - (Join-Path $PSScriptRoot "..\module\EntraBeta\Microsoft.Graph.Entra.Beta") + (Join-Path $PSScriptRoot "..\module\EntraBeta\Microsoft.Entra.Beta") } Log-Message "[EntraModuleBuilder] Starting CreateSubModuleFile script..." @@ -170,10 +170,10 @@ Set-StrictMode -Version 5 [string[]] GetSubModuleFiles([string] $Module, [string]$DirectoryPath) { # Check if the directory exists # Define the pattern for matching submodule files - $pattern = if ($module -like "Microsoft.Graph.Entra.Beta.*") { - "Microsoft.Graph.Entra.Beta.*.psm1" + $pattern = if ($module -like "Microsoft.Entra.Beta.*") { + "Microsoft.Entra.Beta.*.psm1" } else { - "Microsoft.Graph.Entra.*.psm1" + "Microsoft.Entra.*.psm1" } if (-Not (Test-Path -Path $DirectoryPath)) { @@ -197,10 +197,10 @@ Set-StrictMode -Version 5 [string[]] GetSubModuleFileNames([string] $Module, [string]$DirectoryPath) { # Check if the directory exists # Define the pattern for matching submodule files - $pattern = if ($module -like "Microsoft.Graph.Entra.Beta.*") { - "Microsoft.Graph.Entra.Beta.*.psd1" + $pattern = if ($module -like "Microsoft.Entra.Beta.*") { + "Microsoft.Entra.Beta.*.psd1" } else { - "Microsoft.Graph.Entra.*.psd1" + "Microsoft.Entra.*.psd1" } if (-Not (Test-Path -Path $DirectoryPath)) { @@ -227,9 +227,9 @@ Set-StrictMode -Version 5 [void] CreateRootModule([string] $Module) { # Determine the root module name based on the module type $rootModuleName = if ($Module -eq 'Entra') { - 'Microsoft.Graph.Entra.psm1' + 'Microsoft.Entra.psm1' } else { - 'Microsoft.Graph.Entra.Beta.psm1' + 'Microsoft.Entra.Beta.psm1' } # Get the list of submodules and exclude the root module @@ -299,9 +299,9 @@ foreach (`$subModule in `$subModules) { } $moduleName=if($Module -eq 'Entra'){ - 'Microsoft.Graph.Entra' + 'Microsoft.Entra' }else{ - 'Microsoft.Graph.Entra.Beta' + 'Microsoft.Entra.Beta' } $settingPath = Join-Path $rootPath -ChildPath "/config/ModuleMetadata.json" @@ -395,9 +395,9 @@ $($requiredModulesEntries -join ",`n") (Join-Path $PSScriptRoot "../module/EntraBeta") } $moduleBasePath =if ($Module -eq "Entra") { - (Join-Path $rootPath "/Microsoft.Graph.Entra") + (Join-Path $rootPath "/Microsoft.Entra") } else { - (Join-Path $rootPath "/Microsoft.Graph.Entra.Beta") + (Join-Path $rootPath "/Microsoft.Entra.Beta") } $subDirectories = Get-ChildItem -Path $moduleBasePath -Directory @@ -416,22 +416,22 @@ $($requiredModulesEntries -join ",`n") $moduleName = $subDir.Name $helpFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$moduleName-Help.xml" + "Microsoft.Entra.$moduleName-Help.xml" } else { - "Microsoft.Graph.Entra.Beta.$moduleName-Help.xml" + "Microsoft.Entra.Beta.$moduleName-Help.xml" } $manifestFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$moduleName.psd1" + "Microsoft.Entra.$moduleName.psd1" } else { - "Microsoft.Graph.Entra.Beta.$moduleName.psd1" + "Microsoft.Entra.Beta.$moduleName.psd1" } $moduleFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$moduleName.psm1" + "Microsoft.Entra.$moduleName.psm1" } else { - "Microsoft.Graph.Entra.Beta.$moduleName.psm1" + "Microsoft.Entra.Beta.$moduleName.psm1" } # Log the start of processing for this module @@ -589,9 +589,9 @@ $($requiredModulesEntries -join ",`n") } $helpFileName = if ($Module -eq "Entra") { - "Microsoft.Graph.Entra.$($subDirectory.Name)-Help.xml" + "Microsoft.Entra.$($subDirectory.Name)-Help.xml" } else { - "Microsoft.Graph.Entra.Beta.$($subDirectory.Name)-Help.xml" + "Microsoft.Entra.Beta.$($subDirectory.Name)-Help.xml" } $helpOutputFilePath = Join-Path -Path $this.OutputDirectory -ChildPath $helpFileName diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 8995fac7a1..2d604e00e1 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------ . (Join-Path $PSScriptRoot "../build/common-functions.ps1") -# This class splits the larger Microsoft.Graph.Entra.psm1 or Microsoft.Graph.Entra.Beta.psm1 into separate files and also constructrs the submodule directories +# This class splits the larger Microsoft.Entra.psm1 or Microsoft.Entra.Beta.psm1 into separate files and also constructrs the submodule directories class EntraModuleSplitter { [string]$Header @@ -166,7 +166,7 @@ class EntraModuleSplitter { # Get the function contents for both New-EntraCustomHeaders and Get-EntraUnsupportedCommand - $functionNames =if($moduleName -eq 'Microsoft.Graph.Entra'){ + $functionNames =if($moduleName -eq 'Microsoft.Entra'){ @("New-EntraCustomHeaders", "Get-EntraUnsupportedCommand") }else{ @("New-EntraBetaCustomHeaders","Get-EntraBetaUnsupportedCommand") @@ -175,7 +175,7 @@ class EntraModuleSplitter { $functionContents = $functions | Where-Object { $functionNames -contains $_.Name } # Initialize a variable to track if the specific function is processed - $specificFunctionName = if ($moduleName -eq "Microsoft.Graph.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAliases" } + $specificFunctionName = if ($moduleName -eq "Microsoft.Entra") { "Enable-EntraAzureADAlias" } else { "Enable-EntraBetaAzureADAliases" } foreach ($function in $functions) { $this.ProcessFunction($function, $specificFunctionName, $moduleOutputDirectory, $jsonContent, $this.Header, $unmappedDirectory) @@ -256,9 +256,9 @@ class EntraModuleSplitter { [string[]] GetModuleDirectories([string]$Module) { $startDirectory = if ($Module -eq 'EntraBeta') { - (Join-Path $PSScriptRoot "..\module\EntraBeta\Microsoft.Graph.Entra.Beta\") + (Join-Path $PSScriptRoot "..\module\EntraBeta\Microsoft.Entra.Beta\") } else { - (Join-Path $PSScriptRoot "..\module\Entra\Microsoft.Graph.Entra\") + (Join-Path $PSScriptRoot "..\module\Entra\Microsoft.Entra\") } $aliasFileName = if ($Module -eq 'EntraBeta') { diff --git a/test/Common-Functions.ps1 b/test/Common-Functions.ps1 index 2c5f6ee76a..d8b046f246 100644 --- a/test/Common-Functions.ps1 +++ b/test/Common-Functions.ps1 @@ -6,62 +6,62 @@ $psVersion = $global:PSVersionTable.PSVersion # Entra -if($null -ne (Get-Module -Name Microsoft.Graph.Entra)){ - $entraVersion = (Get-module Microsoft.Graph.Entra | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra)){ + $entraVersion = (Get-module Microsoft.Entra | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Applications)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Applications | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Applications)){ + $entraVersion = (Get-module Microsoft.Entra.Applications | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Authentication | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Authentication)){ + $entraVersion = (Get-module Microsoft.Entra.Authentication | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.DirectoryManagement | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.DirectoryManagement)){ + $entraVersion = (Get-module Microsoft.Entra.DirectoryManagement | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Governance)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Governance | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Governance)){ + $entraVersion = (Get-module Microsoft.Entra.Governance | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Users)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Users | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Users)){ + $entraVersion = (Get-module Microsoft.Entra.Users | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Groups)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Groups | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Groups)){ + $entraVersion = (Get-module Microsoft.Entra.Groups | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Reports)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Reports | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Reports)){ + $entraVersion = (Get-module Microsoft.Entra.Reports | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.SignIns | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.SignIns)){ + $entraVersion = (Get-module Microsoft.Entra.SignIns | select version).Version.ToString() } #EntraBeta -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta)){ + $entraVersion = (Get-module Microsoft.Entra.Beta | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Applications)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Applications | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta.Applications)){ + $entraVersion = (Get-module Microsoft.Entra.Beta.Applications | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Authentication)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Authentication | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta.Authentication)){ + $entraVersion = (Get-module Microsoft.Entra.Beta.Authentication | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.DirectoryManagement | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement)){ + $entraVersion = (Get-module Microsoft.Entra.Beta.DirectoryManagement | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Governance)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Governance | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta.Governance)){ + $entraVersion = (Get-module Microsoft.Entra.Beta.Governance | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Users)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Users | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta.Users)){ + $entraVersion = (Get-module Microsoft.Entra.Beta.Users | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Groups)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Groups | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta.Groups)){ + $entraVersion = (Get-module Microsoft.Entra.Beta.Groups | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.Reports)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.Reports | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta.Reports)){ + $entraVersion = (Get-module Microsoft.Entra.Beta.Reports | select version).Version.ToString() } -if($null -ne (Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns)){ - $entraVersion = (Get-module Microsoft.Graph.Entra.Beta.SignIns | select version).Version.ToString() +if($null -ne (Get-Module -Name Microsoft.Entra.Beta.SignIns)){ + $entraVersion = (Get-module Microsoft.Entra.Beta.SignIns | select version).Version.ToString() } diff --git a/test/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 b/test/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 index ba116e9a87..5735c7b14a 100644 --- a/test/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 +++ b/test/Entra/Applications/Add-EntraApplicationOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Add-EntraApplicationOwner" { @@ -16,13 +16,13 @@ Describe "Add-EntraApplicationOwner" { $result = Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when parameters are empty" { { Add-EntraApplicationOwner -ApplicationId "" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter*" } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName New-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -32,7 +32,7 @@ Describe "Add-EntraApplicationOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraApplicationOwner" Add-EntraApplicationOwner -ApplicationId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraApplicationOwner" - Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgApplicationOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 index de61d03e6b..a7000518ca 100644 --- a/test/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 +++ b/test/Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName New-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Add-EntraServicePrincipalDelegatedPermissionClassification"{ Context "Test for Add-EntraServicePrincipalDelegatedPermissionClassification" { @@ -33,7 +33,7 @@ Describe "Add-EntraServicePrincipalDelegatedPermissionClassification"{ $result.Classification | should -Be "low" $result.PermissionName | should -Be "access_microsoftstream_embed" - Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Entra.Applications -Times 1 } It "Result should Contain ObjectId" { $result = Add-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PermissionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Classification "low" -PermissionName "access_microsoftstream_embed" @@ -47,7 +47,7 @@ Describe "Add-EntraServicePrincipalDelegatedPermissionClassification"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraServicePrincipalDelegatedPermissionClassification" - Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 b/test/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 index 7f08bc7ef5..f4c7422524 100644 --- a/test/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 +++ b/test/Entra/Applications/Add-EntraServicePrincipalOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Add-EntraServicePrincipalOwner" { @@ -16,13 +16,13 @@ Describe "Add-EntraServicePrincipalOwner" { $result = Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Add-EntraServicePrincipalOwner -ObjectId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Add-EntraServicePrincipalOwner -ServicePrincipalId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -37,7 +37,7 @@ Describe "Add-EntraServicePrincipalOwner" { { Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -46,7 +46,7 @@ Describe "Add-EntraServicePrincipalOwner" { It "Should contain BodyParameter in parameters when passed RefObjectId to it" { Add-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $value = @{"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} - Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -59,7 +59,7 @@ Describe "Add-EntraServicePrincipalOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraServicePrincipalOwner" - Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraApplication.Tests.ps1 b/test/Entra/Applications/Get-EntraApplication.Tests.ps1 index 7558c2a297..6b8662807a 100644 --- a/test/Entra/Applications/Get-EntraApplication.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraApplication.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { - Import-Module Microsoft.Graph.Entra.Applications + if ((Get-Module -Name Microsoft.Entra.Applications) -eq $null) { + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1" ) -Force @@ -31,7 +31,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraApplication" { @@ -41,7 +41,7 @@ Describe "Get-EntraApplication" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is invalid" { { Get-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -53,7 +53,7 @@ Describe "Get-EntraApplication" { $result = Get-EntraApplication -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraApplication -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -75,21 +75,21 @@ Describe "Get-EntraApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return specific application by filter" { $result = Get-EntraApplication -Filter "DisplayName -eq 'Mock-App'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return top application" { $result = @(Get-EntraApplication -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Result should Contain ApplicationId" { $result = Get-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -113,7 +113,7 @@ Describe "Get-EntraApplication" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplication" - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -123,7 +123,7 @@ Describe "Get-EntraApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -147,7 +147,7 @@ Describe "Get-EntraApplication" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } } } diff --git a/test/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 index b4bff3d66e..1db8146725 100644 --- a/test/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraApplicationExtensionProperty.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraApplicationExtensionProperty" { @@ -28,13 +28,13 @@ BeforeAll { $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-1111-2222-3333-ccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Get-EntraApplicationExtensionProperty -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -53,7 +53,7 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.Name | Should -Be 'extension_222_324_NewAttribute' - Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -66,7 +66,7 @@ BeforeAll { $result = Get-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationExtensionProperty" - Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 index 2ca78d0fd4..d447c60e69 100644 --- a/test/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraApplicationKeyCredential.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -24,7 +24,7 @@ BeforeAll { } } - Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraApplicationKeyCredential" { @@ -32,7 +32,7 @@ BeforeAll { It "Should not return empty" { $result = Get-EntraApplicationKeyCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { { Get-EntraApplicationKeyCredential -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." @@ -42,7 +42,7 @@ BeforeAll { $result = Get-EntraApplicationKeyCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationKeyCredential" - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 index e3d1825f62..920de28784 100644 --- a/test/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraApplicationLogo.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -18,19 +18,19 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraApplicationLogo" { It "Should return empty" { $result = Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return empty" { $result = Get-EntraApplicationLogo -ObjectId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return empty when passed ileName parameter" { $result = Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FileName "image" @@ -59,7 +59,7 @@ Describe "Get-EntraApplicationLogo" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationLogo" Get-EntraApplicationLogo -ApplicationId "aaaaaaaa-1111-2222-3333-ccccccccccc" -FilePath "D:\image.jpg" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationLogo" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 index e2e9a23ede..1b0172f746 100644 --- a/test/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraApplicationModule.Tests.ps1 @@ -4,8 +4,8 @@ Describe "Get-EntraApplication" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } } @@ -18,7 +18,7 @@ Describe "Get-EntraApplication" { It "Should return a list of applications by default" { $GetAzureADApplication = Get-Command Get-EntraApplication - $GetAzureADApplication.ModuleName | Should -Be "Microsoft.Graph.Entra.Applications" + $GetAzureADApplication.ModuleName | Should -Be "Microsoft.Entra.Applications" $GetAzureADApplication.DefaultParameterSet | Should -Be "GetQuery" } diff --git a/test/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 index 97b32204da..9975177366 100644 --- a/test/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraApplicationOwner.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraApplicationOwner"{ @@ -37,7 +37,7 @@ Describe "Get-EntraApplicationOwner"{ $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Get-EntraApplicationOwner -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -64,7 +64,7 @@ Describe "Get-EntraApplicationOwner"{ $result = Get-EntraApplicationOwner -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationOwner" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 index af39808455..ff932bf47f 100644 --- a/test/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraApplicationPasswordCredential.Tests.ps1 @@ -1,6 +1,6 @@ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { } } - Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraApplicationPasswordCredential" { @@ -29,7 +29,7 @@ BeforeAll { It "Should not return empty" { $result = Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Get-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -45,7 +45,7 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Test" - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { @@ -57,7 +57,7 @@ BeforeAll { $result = Get-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraApplicationPasswordCredential" - Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 b/test/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 index fb26e2a765..3b8e9fefca 100644 --- a/test/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraApplicationTemplate.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { - Import-Module Microsoft.Graph.Entra.Applications + if ((Get-Module -Name Microsoft.Entra.Applications) -eq $null) { + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,14 +19,14 @@ BeforeAll{ "supportedProvisioningTypes" = @{} } - Mock -CommandName Invoke-GraphRequest -MockWith { $response } -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-GraphRequest -MockWith { $response } -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraApplicationTemplate tests"{ It "Should return specific application" { $result = Get-EntraApplicationTemplate -Id "aaaaaaaa-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('aaaaaaaa-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Id is empty" { { Get-EntraApplicationTemplate -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" @@ -40,7 +40,7 @@ Describe "Get-EntraApplicationTemplate tests"{ It "Should return all application templates" { $result = Get-EntraApplicationTemplate $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully without throwing an error " { # Disable confirmation prompts @@ -58,7 +58,7 @@ Describe "Get-EntraApplicationTemplate tests"{ It "Should return top ApplicationTemplate" { $result = Get-EntraApplicationTemplate -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Top is invalid" { { Get-EntraApplicationTemplate -Id "aaaaaaaa-1111-2222-3333-cccccccccccc" -Top XY } | Should -Throw "Cannot process argument transformation on parameter 'Top'*" @@ -66,7 +66,7 @@ Describe "Get-EntraApplicationTemplate tests"{ It "Should return all templates" { $result = Get-EntraApplicationTemplate -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraApplicationTemplate -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -82,7 +82,7 @@ Describe "Get-EntraApplicationTemplate tests"{ $result = Get-EntraApplicationTemplate -Filter "DisplayName eq 'test name'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'test name' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } } diff --git a/test/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 b/test/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 index ae9e470f91..8f2aa96e66 100644 --- a/test/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraDeletedApplication.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -48,7 +48,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryDeletedItemAsApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgDirectoryDeletedItemAsApplication -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraDeletedApplication" { @@ -56,7 +56,7 @@ Describe "Get-EntraDeletedApplication" { It "Should return all applications" { $result = Get-EntraDeletedApplication | ConvertTo-Json -Depth 5 | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when All is empty" { { Get-EntraDeletedApplication -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -69,20 +69,20 @@ Describe "Get-EntraDeletedApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-test-App' - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return specific application by filter" { $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-test-App' - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return top application" { $result = Get-EntraDeletedApplication -Top 1 | ConvertTo-Json -Depth 5 | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Result should Contain ObjectId" { $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json @@ -98,7 +98,7 @@ Describe "Get-EntraDeletedApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Mock-test-App" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { @@ -109,7 +109,7 @@ Describe "Get-EntraDeletedApplication" { $result = Get-EntraDeletedApplication -Filter "DisplayName -eq 'Mock-test-App'" | ConvertTo-Json -Depth 5 | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedApplication" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsApplication -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 index ac6584cda0..c9cd10c9df 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipal.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -71,7 +71,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipal" { @@ -81,7 +81,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { @@ -89,7 +89,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { @@ -104,7 +104,7 @@ Describe "Get-EntraServicePrincipal" { $result = Get-EntraServicePrincipal -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when All has an argument" { @@ -115,7 +115,7 @@ Describe "Get-EntraServicePrincipal" { $result = Get-EntraServicePrincipal -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when top is empty" { @@ -136,7 +136,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Windows Update for Business Deployment Service' - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when searchstring is empty" { @@ -148,7 +148,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Windows Update for Business Deployment Service' - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when filter is empty" { @@ -177,7 +177,7 @@ Describe "Get-EntraServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Windows Update for Business Deployment Service" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { @@ -191,7 +191,7 @@ Describe "Get-EntraServicePrincipal" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipal" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 index b32fcd41a1..8464c48601 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { @@ -33,14 +33,14 @@ Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { $result | Should -Not -BeNullOrEmpty $result.PrincipalId | should -Be '4d8fcb23-adc7-4d47-9328-2420eb1075ef' - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraServicePrincipalAppRoleAssignedTo -ObjectId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" $result | Should -Not -BeNullOrEmpty $result.PrincipalId | should -Be '4d8fcb23-adc7-4d47-9328-2420eb1075ef' - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -52,13 +52,13 @@ Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return top app role assignments " { $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Top is empty" { { Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -71,7 +71,7 @@ Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { $result.ObjectID | should -Be "I8uPTcetR02TKCQg6xB170ZWgaqJluBEqPHHxTxJ9Hs" } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" $params = Get-Parameters -data $result @@ -83,7 +83,7 @@ Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { $result= Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalAppRoleAssignedTo" - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 index 3cfbb77a63..5523e9f042 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServiceAppRoleAssigned" { @@ -33,14 +33,14 @@ Describe "Get-EntraServiceAppRoleAssigned" { $result | Should -Not -BeNullOrEmpty $result.ResourceId | should -Be '021510b7-e753-40aa-b668-29753295ca34' - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraServicePrincipalAppRoleAssignment -ObjectId "021510b7-e753-40aa-b668-29753295ca34" $result | Should -Not -BeNullOrEmpty $result.ResourceId | should -Be '021510b7-e753-40aa-b668-29753295ca34' - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -52,14 +52,14 @@ Describe "Get-EntraServiceAppRoleAssigned" { $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return top service principal application role assignment." { $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Top is empty" { { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -72,7 +72,7 @@ Describe "Get-EntraServiceAppRoleAssigned" { $result.ObjectId | should -Be "qjltmaz9l02qPcgftHNirITXiOnmHR5GmW_oEXl_ZL8" } It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { - Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" $params = Get-Parameters -data $result @@ -84,7 +84,7 @@ Describe "Get-EntraServiceAppRoleAssigned" { $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalAppRoleAssignment" - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 index 8dd8285fea..dc300cdd89 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { - Import-Module Microsoft.Graph.Entra.Applications + if ((Get-Module -Name Microsoft.Entra.Applications) -eq $null) { + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { @@ -29,7 +29,7 @@ Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "T2qU_E28O0GgkLLIYRPsTwE" - Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is invalid" { { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" @@ -61,7 +61,7 @@ Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { $result | Should -Not -BeNullOrEmpty $result.PermissionName | Should -Be 'LicenseManager.AccessAsUser' - Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -74,7 +74,7 @@ Describe "Get-EntraServicePrincipalDelegatedPermissionClassification" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalDelegatedPermissionClassification" - Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 index 44fba45b5c..db87531e35 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalKeyCredential.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalKeyCredential" { @@ -36,7 +36,7 @@ Describe "Get-EntraServicePrincipalKeyCredential" { $result | Should -Not -BeNullOrEmpty $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { @@ -45,7 +45,7 @@ Describe "Get-EntraServicePrincipalKeyCredential" { $result | Should -Not -BeNullOrEmpty $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { $errorActionPreference = "Stop" @@ -72,7 +72,7 @@ Describe "Get-EntraServicePrincipalKeyCredential" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalKeyCredential" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 index 732c95b702..0b6bb416a2 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalMembership.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -17,18 +17,18 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalTransitiveMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalTransitiveMemberOf -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalMembership"{ It "Result should not be empty" { $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Get-EntraServicePrincipalMembership -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalMembership -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." @@ -36,7 +36,7 @@ Describe "Get-EntraServicePrincipalMembership"{ It "Should return all applications" { $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -44,7 +44,7 @@ Describe "Get-EntraServicePrincipalMembership"{ It "Should return top application" { $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Entra.Applications -Times 1 } It "Result should Contain ServicePrincipalId" { $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -60,7 +60,7 @@ Describe "Get-EntraServicePrincipalMembership"{ $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -70,7 +70,7 @@ Describe "Get-EntraServicePrincipalMembership"{ $result = Get-EntraServicePrincipalMembership -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalMembership" - Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalTransitiveMemberOf -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 index 89ac33a018..97679db6a0 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,18 +21,18 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalOauth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalOauth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ It "Result should not be empty" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." @@ -40,7 +40,7 @@ Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ It "Should return all applications" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -48,7 +48,7 @@ Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ It "Should return top application" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Entra.Applications -Times 1 } It "Result should Contain ServicePrincipalId" { $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -64,7 +64,7 @@ Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'aaaaaaaa-0b0b-1c1c-2d2d-333333333333' - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -74,7 +74,7 @@ Describe "Get-EntraServicePrincipalOAuth2PermissionGrant"{ $result = Get-EntraServicePrincipalOAuth2PermissionGrant -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOAuth2PermissionGrant" - Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalOauth2PermissionGrant -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 index 0668c7984b..845c9c9d17 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalOwnedObject.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalOwnedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalOwnedObject -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalOwnedObject" { @@ -32,13 +32,13 @@ Describe "Get-EntraServicePrincipalOwnedObject" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('111cc9b5-fce9-485e-9566-c68debafac5f') - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return specific ServicePrincipalOwnedObject with Alias" { $result = Get-EntraServicePrincipalOwnedObject -ObjectId "2d028fff-7e65-4340-80ca-89be16dae0b3" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('111cc9b5-fce9-485e-9566-c68debafac5f') - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId'*" @@ -49,7 +49,7 @@ Describe "Get-EntraServicePrincipalOwnedObject" { It "Should return all Owned Objects" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -57,7 +57,7 @@ Describe "Get-EntraServicePrincipalOwnedObject" { It "Should return top Owned Object" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Applications -Times 1 } It "Result should Contain ServicePrincipalId" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" @@ -74,7 +74,7 @@ Describe "Get-EntraServicePrincipalOwnedObject" { $result = Get-EntraServicePrincipalOwnedObject -ServicePrincipalId "2d028fff-7e65-4340-80ca-89be16dae0b3" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOwnedObject" - Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 index a59e92908e..947b9b2ec1 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalOwner.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -41,18 +41,18 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalOwner -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalOwner -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalOwner"{ It "Result should not be empty" { $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Get-EntraServicePrincipalOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalOwner -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." @@ -60,7 +60,7 @@ Describe "Get-EntraServicePrincipalOwner"{ It "Should return all applications" { $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when All has an argument" { { Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -68,7 +68,7 @@ Describe "Get-EntraServicePrincipalOwner"{ It "Should return top application" { $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Entra.Applications -Times 1 } It "Result should Contain ServicePrincipalId" { $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -84,7 +84,7 @@ Describe "Get-EntraServicePrincipalOwner"{ $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Adams Smith' - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Property is empty" { { Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -94,7 +94,7 @@ Describe "Get-EntraServicePrincipalOwner"{ $result = Get-EntraServicePrincipalOwner -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalOwner" - Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalOwner -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 index c635adf919..3b87e32a67 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -27,7 +27,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalPasswordCredential" { @@ -38,7 +38,7 @@ Describe "Get-EntraServicePrincipalPasswordCredential" { $result | Should -Not -BeNullOrEmpty $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { @@ -47,7 +47,7 @@ Describe "Get-EntraServicePrincipalPasswordCredential" { $result | Should -Not -BeNullOrEmpty $result.KeyId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { @@ -75,7 +75,7 @@ Describe "Get-EntraServicePrincipalPasswordCredential" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalPasswordCredential" - Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Invalid.Tests.ps1 b/test/Entra/Applications/Invalid.Tests.ps1 index ef75d9bb5e..d737d81334 100644 --- a/test/Entra/Applications/Invalid.Tests.ps1 +++ b/test/Entra/Applications/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Applications)){ - Import-Module Microsoft.Graph.Entra.Applications +if($null -eq (Get-Module -Name Microsoft.Entra.Applications)){ + Import-Module Microsoft.Entra.Applications } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/test/Entra/Applications/Module.Tests.ps1 b/test/Entra/Applications/Module.Tests.ps1 index fb12f884f5..ad2aa26b52 100644 --- a/test/Entra/Applications/Module.Tests.ps1 +++ b/test/Entra/Applications/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra.Applications Module" { +Describe "Microsoft.Entra.Applications Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Applications + $PSModuleInfo = Get-Module Microsoft.Entra.Applications $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Applications + $PSModuleInfo = Get-Module Microsoft.Entra.Applications $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Applications - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Applications.psm1" + $PSModuleInfo = Get-Module Microsoft.Entra.Applications + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Entra.Applications.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Applications + $PSModuleInfo = Get-Module Microsoft.Entra.Applications $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra.Applications -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Entra.Applications -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/test/Entra/Applications/New-EntraApplication.Tests.ps1 b/test/Entra/Applications/New-EntraApplication.Tests.ps1 index ae7bbf9638..d26b450404 100644 --- a/test/Entra/Applications/New-EntraApplication.Tests.ps1 +++ b/test/Entra/Applications/New-EntraApplication.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -31,7 +31,7 @@ BeforeAll { ) } - Mock -CommandName New-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgApplication -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "New-EntraApplication"{ @@ -44,7 +44,7 @@ Describe "New-EntraApplication"{ $result.IsFallbackPublicClient | should -Be "True" $result.SignInAudience | should -Be "AzureADandPersonalMicrosoftAccount" - Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when DisplayName is empty" { { New-EntraApplication -DisplayName "" } | Should -Throw "Cannot bind argument to parameter 'DisplayName' because it is an empty string." @@ -54,7 +54,7 @@ Describe "New-EntraApplication"{ $result = New-EntraApplication -DisplayName "Mock-App" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplication" - Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 b/test/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 index 9f03f4d7dd..6e5decd1fb 100644 --- a/test/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 +++ b/test/Entra/Applications/New-EntraApplicationExtensionProperty.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName New-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgApplicationExtensionProperty -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "New-EntraApplicationExtensionProperty" { @@ -37,7 +37,7 @@ Context "Test for New-EntraApplicationExtensionProperty" { $result.TargetObjects | Should -Be "Application" $result.DataType | Should -Be "MockType" - Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return created MS application extension property with alias" { $result = New-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" @@ -47,7 +47,7 @@ Context "Test for New-EntraApplicationExtensionProperty" { $result.TargetObjects | Should -Be "Application" $result.DataType | Should -Be "MockType" - Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { New-EntraApplicationExtensionProperty -ApplicationId -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" @@ -78,7 +78,7 @@ Context "Test for New-EntraApplicationExtensionProperty" { $result = New-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -DataType "MockType" -Name "Mock-App" -TargetObjects "Application" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationExtensionProperty" - Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 b/test/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 index 26a53d1a24..2314bcaee6 100644 --- a/test/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 +++ b/test/Entra/Applications/New-EntraApplicationFromApplicationTemplate.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null) { - Import-Module Microsoft.Graph.Entra.Applications + if ((Get-Module -Name Microsoft.Entra.Applications) -eq $null) { + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -106,7 +106,7 @@ BeforeAll{ } } - Mock -CommandName Invoke-MgGraphRequest -MockWith { $response } -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-MgGraphRequest -MockWith { $response } -ModuleName Microsoft.Entra.Applications } Describe "New-EntraApplicationFromApplicationTemplateFromApplicationTemplate tests"{ It "Should return created Application with service principal"{ @@ -114,7 +114,7 @@ Describe "New-EntraApplicationFromApplicationTemplateFromApplicationTemplate tes $result | Should -Not -BeNullOrEmpty $result.application.applicationTemplateId | Should -Be "aaaaaaaa-1111-1111-1111-cccccccccccc" $result.servicePrincipal.applicationTemplateId | Should -Be "aaaaaaaa-1111-1111-1111-cccccccccccc" - Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Id is empty" { { New-EntraApplicationFromApplicationTemplate -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" diff --git a/test/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 b/test/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 index 082b6d4264..4675117edc 100644 --- a/test/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 +++ b/test/Entra/Applications/New-EntraApplicationPassword.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "New-EntraApplicationPassword"{ It "Should return created password credential"{ @@ -30,7 +30,7 @@ Describe "New-EntraApplicationPassword"{ $result | Should -Not -BeNullOrEmpty $result.KeyId | should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result.SecretText | Should -Be "wbBNW8kCuiPjNRg9NX98W_EaU6cqG" - Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { New-EntraApplicationPassword -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -69,7 +69,7 @@ Describe "New-EntraApplicationPassword"{ $result = New-EntraApplicationPassword -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PasswordCredential @{ displayname = "mypassword" } | ConvertTo-Json | ConvertFrom-Json $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationPassword" - Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 b/test/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 index 7b23264712..9553ed89c6 100644 --- a/test/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 +++ b/test/Entra/Applications/New-EntraApplicationPasswordCredential.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Add-MgApplicationPassword -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "New-EntraApplicationPasswordCredential"{ It "Should return created password credential"{ @@ -30,7 +30,7 @@ Describe "New-EntraApplicationPasswordCredential"{ $result | Should -Not -BeNullOrEmpty $result.KeyId | should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result.SecretText | Should -Be "wbBNW8kCuiPjNRg9NX98W_EaU6cqG" - Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { New-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -75,7 +75,7 @@ Describe "New-EntraApplicationPasswordCredential"{ $result = New-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraApplicationPasswordCredential" - Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Add-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 b/test/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 index 187f44fd68..624e8ad89f 100644 --- a/test/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 +++ b/test/Entra/Applications/New-EntraServicePrincipal.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -32,7 +32,7 @@ BeforeAll { ) } - Mock -CommandName New-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "New-EntraServicePrincipal"{ @@ -52,7 +52,7 @@ Describe "New-EntraServicePrincipal"{ $result.ServicePrincipalType | should -Be "Application" $result.ServicePrincipalNames | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when AppID is empty" { { New-EntraServicePrincipal -AppId } | Should -Throw "Missing an argument for parameter 'AppId'.*" @@ -98,7 +98,7 @@ Describe "New-EntraServicePrincipal"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipal" - Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 index e79970abea..9a1af8e20e 100644 --- a/test/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName New-MgServicePrincipalAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName New-MgServicePrincipalAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "New-EntraServicePrincipalAppRoleAssignment"{ @@ -33,7 +33,7 @@ Describe "New-EntraServicePrincipalAppRoleAssignment"{ $result.PrincipalDisplayName | should -Be "Mock-App" $result.PrincipalId | should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" - Should -Invoke -CommandName New-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName New-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { { New-EntraServicePrincipalAppRoleAssignment -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId'*" @@ -77,7 +77,7 @@ Describe "New-EntraServicePrincipalAppRoleAssignment"{ $result = New-EntraServicePrincipalAppRoleAssignment -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -Id "bbbb1b1b-cc2c-dd3d-ee4e-ffffff5f5f5f" -PrincipalId "aaaaaaaa-bbbb-cccc-1111-222222222222" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipalAppRoleAssignment" - Should -Invoke -CommandName New-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 index 8574c00e09..eab2ffe3cd 100644 --- a/test/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 +++ b/test/Entra/Applications/New-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Add-MgServicePrincipalPassword -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Add-MgServicePrincipalPassword -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "New-EntraServicePrincipalPasswordCredential"{ @@ -34,13 +34,13 @@ Describe "New-EntraServicePrincipalPasswordCredential"{ $result.StartDate | should -Be "16/09/2024 14:14:14" $result.EndDate | should -Be "16/12/2024 13:14:14" - Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = New-EntraServicePrincipalPasswordCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -StartDate "2024-09-16T14:14:14Z" -EndDate "2024-12-16T13:14:14Z" $result | Should -Not -Be NullOrEmpty - Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { {New-EntraServicePrincipalPasswordCredential -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -73,7 +73,7 @@ Describe "New-EntraServicePrincipalPasswordCredential"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraServicePrincipalPasswordCredential" - Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Add-MgServicePrincipalPassword -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraApplication.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplication.Tests.ps1 index 3bd14690c9..4dcc94e0b2 100644 --- a/test/Entra/Applications/Remove-EntraApplication.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraApplication.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplication -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraApplication" { @@ -17,13 +17,13 @@ Describe "Remove-EntraApplication" { $result = Remove-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is invalid" { { Remove-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Remove-EntraApplication" { { Remove-EntraApplication -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Remove-MgApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplication -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Remove-EntraApplication" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplication" Remove-EntraApplication -ApplicationId bbbbbbbb-1111-2222-3333-cccccccccccc - Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 index 5d7acf815b..30a31fe683 100644 --- a/test/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraApplicationExtensionProperty.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraApplicationExtensionProperty" { @@ -16,13 +16,13 @@ Describe "Remove-EntraApplicationExtensionProperty" { $result = Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraApplicationExtensionProperty -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Remove-EntraApplicationExtensionProperty -ApplicationId -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444"} | Should -Throw "Missing an argument for parameter 'ApplicationId'*" @@ -37,7 +37,7 @@ Describe "Remove-EntraApplicationExtensionProperty" { { Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "" } | Should -Throw "Cannot bind argument to parameter 'ExtensionPropertyId' because it is an empty string." } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationExtensionProperty -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraApplicationExtensionProperty -ApplicationId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ExtensionPropertyId "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraApplicationExtensionProperty" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationExtensionProperty" - Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplicationExtensionProperty -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 index 680110fffe..91737f6d45 100644 --- a/test/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraApplicationOwner.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraApplicationOwner"{ It "Should return empty object" { $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return empty object" { $result = Remove-EntraApplicationOwner -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Remove-EntraApplicationOwner -ApplicationId "" } @@ -28,13 +28,13 @@ Describe "Remove-EntraApplicationOwner"{ { Remove-EntraApplicationOwner -OwnerId "" } } It "Should contain ApplicationId in parameters" { - Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $params = Get-Parameters -data $result $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" } It "Should contain DirectoryObjectId in parameters" { - Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $params = Get-Parameters -data $result $params.DirectoryObjectId | Should -Be "bbbbbbbb-cccc-dddd-2222-333333333333" @@ -44,7 +44,7 @@ Describe "Remove-EntraApplicationOwner"{ $result = Remove-EntraApplicationOwner -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -OwnerId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationOwner" - Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplicationOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 index f076400ec3..2d6bbd7890 100644 --- a/test/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraApplicationPassword.Tests.ps1 @@ -2,19 +2,19 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraApplicationPassword"{ It "Should return empty object" { $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { { Remove-EntraApplicationPassword -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId'*" @@ -29,7 +29,7 @@ Describe "Remove-EntraApplicationPassword"{ { Remove-EntraApplicationPassword -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." } It "Should contain ApplicationId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $params = Get-Parameters -data $result $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" @@ -39,7 +39,7 @@ Describe "Remove-EntraApplicationPassword"{ $result = Remove-EntraApplicationPassword -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationPassword" - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 b/test/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 index ca15d59453..b991fab1b6 100644 --- a/test/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraApplicationPasswordCredential.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationPassword -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraApplicationPasswordCredential"{ It "Should return empty object" { $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraApplicationPasswordCredential -ObjectId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Remove-EntraApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -37,7 +37,7 @@ Describe "Remove-EntraApplicationPasswordCredential"{ { Remove-EntraApplicationPasswordCredential -DisplayName "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'." } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgApplicationPassword -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" $params = Get-Parameters -data $result $params.ApplicationId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" @@ -47,7 +47,7 @@ Describe "Remove-EntraApplicationPasswordCredential"{ $result = Remove-EntraApplicationPasswordCredential -ApplicationId "aaaaaaaa-bbbb-cccc-1111-222222222222" -KeyId "bbbbbbbb-cccc-dddd-2222-333333333333" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraApplicationPasswordCredential" - Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgApplicationPassword -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 b/test/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 index a45899aae0..e8b235d46b 100644 --- a/test/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraDeletedApplication.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraDeletedApplication" { @@ -16,7 +16,7 @@ Describe "Remove-EntraDeletedApplication" { $result = Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { @@ -28,7 +28,7 @@ Describe "Remove-EntraDeletedApplication" { } It "Should contain DirectoryObjectId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgDirectoryDeletedItem -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -39,7 +39,7 @@ Describe "Remove-EntraDeletedApplication" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedApplication" Remove-EntraDeletedApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedApplication" - Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDirectoryDeletedItem -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 b/test/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 index f946b44f8e..7612a86e4e 100644 --- a/test/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraDeletedDirectoryObject.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraDeletedDirectoryObject" { @@ -16,14 +16,14 @@ Describe "Remove-EntraDeletedDirectoryObject" { $result = Remove-EntraDeletedDirectoryObject -DirectoryObjectId "11112222-bbbb-3333-cccc-4444dddd5555" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDeletedDirectoryObject -Id "11112222-bbbb-3333-cccc-4444dddd5555" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when DirectoryObjectId is empty" { @@ -41,7 +41,7 @@ Describe "Remove-EntraDeletedDirectoryObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeletedDirectoryObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 index 97dd35444e..4c6ef33f18 100644 --- a/test/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraServicePrincipal.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipal -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipal -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraServicePrincipal" { Context "Test for Remove-EntraServicePrincipal" { It "Should return empty object" { $result = Remove-EntraServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Remove-EntraServicePrincipal -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Remove-EntraServicePrincipal -ServicePrincipalId }| Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -28,7 +28,7 @@ Describe "Remove-EntraServicePrincipal" { { Remove-EntraServicePrincipal -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string.*" } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName Remove-MgServicePrincipal -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipal -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Remove-EntraServicePrincipal" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipal" - Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipal -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 index e22ec6ea72..260e5d8c26 100644 --- a/test/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipalAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalAppRoleAssignment -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraServicePrincipalAppRoleAssignment" { Context "Test for Remove-EntraServicePrincipalAppRoleAssignment" { It "Should return empty ServicePrincipalId" { $result = Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraServicePrincipalAppRoleAssignment -ObjectId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { @@ -35,7 +35,7 @@ Describe "Remove-EntraServicePrincipalAppRoleAssignment" { { Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleAssignmentId' because it is an empty string.*" } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName Remove-MgServicePrincipalAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraServicePrincipalAppRoleAssignment" { It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalAppRoleAssignment" Remove-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "cc7fcc82-ac1b-4785-af47-2ca3b7052886" -AppRoleAssignmentId "gsx_zBushUevRyyjtwUohm_RMYjcGsJIjXwKOVMr3ww" - Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 index 01f1ca5b1b..d9363d0e26 100644 --- a/test/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { @@ -16,7 +16,7 @@ Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { $result = Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId -Id "00001111-aaaa-2222-bbbb-3333cccc4444" } | should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -31,7 +31,7 @@ Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { { Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "" } | should -Throw "Cannot bind argument to parameter 'Id'*" } It "Should contain DelegatedPermissionClassificationId in parameters when passed Id to it" { - Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraServicePrincipalDelegatedPermissionClassification -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Remove-EntraServicePrincipalDelegatedPermissionClassification" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalDelegatedPermissionClassification" - Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipalDelegatedPermissionClassification -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 index 598be8fdae..776f7bd05f 100644 --- a/test/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraServicePrincipalOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraServicePrincipalOwner" { @@ -15,12 +15,12 @@ Describe "Remove-EntraServicePrincipalOwner" { It "Should return empty object" { $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Remove-EntraServicePrincipalOwner -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Remove-EntraServicePrincipalOwner -ServicePrincipalId -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" }| Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -35,14 +35,14 @@ Describe "Remove-EntraServicePrincipalOwner" { { Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId ""} | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string." } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $params = Get-Parameters -data $result $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" } It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraServicePrincipalOwner -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccccc" -OwnerId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $params = Get-Parameters -data $result @@ -56,7 +56,7 @@ Describe "Remove-EntraServicePrincipalOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalOwner" - Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipalOwnerByRef -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 b/test/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 index 2df05c5100..07ebfbcea6 100644 --- a/test/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 +++ b/test/Entra/Applications/Remove-EntraServicePrincipalPasswordCredential.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Remove-EntraServicePrincipalPasswordCredential" { @@ -16,13 +16,13 @@ Describe "Remove-EntraServicePrincipalPasswordCredential" { $result = Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result = Remove-EntraServicePrincipalPasswordCredential -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" } | should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -37,7 +37,7 @@ Describe "Remove-EntraServicePrincipalPasswordCredential" { { Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId ""} | should -Throw "Cannot bind argument to parameter 'KeyId'*" } It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Remove-MgServicePrincipalPassword -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Remove-EntraServicePrincipalPasswordCredential -ServicePrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -KeyId "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraServicePrincipalPasswordCredential" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraServicePrincipalPasswordCredential" - Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgServicePrincipalPassword -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 b/test/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 index 8c8910817e..d0eb6de27d 100644 --- a/test/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 +++ b/test/Entra/Applications/Restore-EntraDeletedApplication.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -38,7 +38,7 @@ BeforeAll { ) } - Mock -CommandName Restore-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Restore-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Restore-EntraDeletedApplication" { Context "Restore-EntraDeletedApplication" { @@ -47,7 +47,7 @@ Context "Restore-EntraDeletedApplication" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ObjectId is empty" { { Restore-EntraDeletedApplication -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" @@ -87,7 +87,7 @@ Context "Restore-EntraDeletedApplication" { $result = Restore-EntraDeletedApplication -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedApplication" - Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Restore-MgDirectoryDeletedItem -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 b/test/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 index 1392bda50a..5704db60c2 100644 --- a/test/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 +++ b/test/Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -15,7 +15,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Get-MgServicePrincipalMemberOf -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Select-EntraGroupIdsServicePrincipalIsMemberOf" { @@ -26,7 +26,7 @@ Describe "Select-EntraGroupIdsServicePrincipalIsMemberOf" { $SPId = "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" $result = Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId $SPId -GroupIdsForMembershipCheck $Groups $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ObjectID parameter is empty" { { Select-EntraGroupIdsServicePrincipalIsMemberOf -ObjectId -GroupIdsForMembershipCheck "22cc22cc-dd33-ee44-ff55-66aa66aa66aa" } | Should -Throw "Missing an argument for parameter*" @@ -50,7 +50,7 @@ Describe "Select-EntraGroupIdsServicePrincipalIsMemberOf" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsServicePrincipalIsMemberOf" - Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalMemberOf -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Set-EntraApplication.Tests.ps1 b/test/Entra/Applications/Set-EntraApplication.Tests.ps1 index 3bb0806c6b..37f9259c7e 100644 --- a/test/Entra/Applications/Set-EntraApplication.Tests.ps1 +++ b/test/Entra/Applications/Set-EntraApplication.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Update-MgApplication -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Set-EntraApplication"{ @@ -17,13 +17,13 @@ Describe "Set-EntraApplication"{ $result = Set-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraApplication -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is invalid" { { Set-EntraApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Set-EntraApplication"{ { Set-EntraApplication -ApplicationId } | Should -Throw "Missing an argument for parameter 'ApplicationId'*" } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Update-MgApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Update-MgApplication -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Set-EntraApplication -ApplicationId bbbbbbbb-1111-2222-3333-cccccccccccc $result = Set-EntraApplication -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -46,7 +46,7 @@ Describe "Set-EntraApplication"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraApplication" - Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgApplication -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 b/test/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 index b8556d7520..1888c7ec47 100644 --- a/test/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 +++ b/test/Entra/Applications/Set-EntraApplicationLogo.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Set-EntraApplicationLogo"{ @@ -15,12 +15,12 @@ Describe "Set-EntraApplicationLogo"{ It "Should return empty object"{ $result = Set-EntraApplicationLogo -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" -FilePath "https://th.bing.com/th?q=Application+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return empty object with alias"{ $result = Set-EntraApplicationLogo -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -FilePath "https://th.bing.com/th?q=Application+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ApplicationId is empty" { @@ -39,7 +39,7 @@ Describe "Set-EntraApplicationLogo"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraApplicationLogo" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 b/test/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 index a4695d38ec..564be35281 100644 --- a/test/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 +++ b/test/Entra/Applications/Set-EntraServicePrincipal.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Applications + if((Get-Module -Name Microsoft.Entra.Applications) -eq $null){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Applications } Describe "Set-EntraServicePrincipal"{ @@ -17,25 +17,25 @@ Describe "Set-EntraServicePrincipal"{ $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -AccountEnabled $false -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -AppRoleAssignmentRequired $true -DisplayName "test11" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Tags $tags $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the parameter with Alias" { $result= Set-EntraServicePrincipal -ObjectId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -AccountEnabled $false -AppId "00001111-aaaa-2222-bbbb-3333cccc4444" -AppRoleAssignmentRequired $true -DisplayName "test11" -ServicePrincipalNames "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the LogoutUrl and ServicePrincipalType parameter" { $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -LogoutUrl 'https://securescore.office.com/SignOut' -ServicePrincipalType "Application" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the Homepage, ReplyUrls and AlternativeNames parameter" { $result= Set-EntraServicePrincipal -ServicePrincipalId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Homepage 'https://HomePageurlss.com' -ReplyUrls 'https://admin.microsoft1.com' -AlternativeNames "updatetest" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should update the KeyCredentials parameter" { $creds = New-Object Microsoft.Open.AzureAD.Model.KeyCredential @@ -49,7 +49,7 @@ Describe "Set-EntraServicePrincipal"{ $result= Set-EntraServicePrincipal -ServicePrincipalId 6aa187e3-bbbb-4748-a708-fc380aa9eb17 -KeyCredentials $creds $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Set-EntraServicePrincipal -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -67,7 +67,7 @@ Describe "Set-EntraServicePrincipal"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraServicePrincipal" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Valid.Tests.ps1 b/test/Entra/Applications/Valid.Tests.ps1 index fb28955ce8..cdc0871dfd 100644 --- a/test/Entra/Applications/Valid.Tests.ps1 +++ b/test/Entra/Applications/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Applications)){ - Import-Module Microsoft.Graph.Entra.Applications + if($null -eq (Get-Module -Name Microsoft.Entra.Applications)){ + Import-Module Microsoft.Entra.Applications } Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra.Applications + $module = Get-Module -Name Microsoft.Entra.Applications } Describe "Valid parameter Tests"{ @@ -27,16 +27,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Applications $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Applications $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Applications -Times 1 } } catch { @@ -65,16 +65,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Applications $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Applications -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Applications + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Applications $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Applications -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Applications -Times 1 } } catch { diff --git a/test/Entra/Authentication/Connect-Entra.Tests.ps1 b/test/Entra/Authentication/Connect-Entra.Tests.ps1 index cdab7faf95..a199e1aabc 100644 --- a/test/Entra/Authentication/Connect-Entra.Tests.ps1 +++ b/test/Entra/Authentication/Connect-Entra.Tests.ps1 @@ -3,11 +3,11 @@ # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ - Import-Module Microsoft.Graph.Entra.Authentication + if($null -eq (Get-Module -Name Microsoft.Entra.Authentication)){ + Import-Module Microsoft.Entra.Authentication } - Mock -CommandName Connect-MgGraph -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName Connect-MgGraph -MockWith {} -ModuleName Microsoft.Entra.Authentication $ConnectEntraCommand = Get-Command Connect-Entra } @@ -16,22 +16,22 @@ Describe "Connect-Entra Mock"{ It "should return empty object"{ $result = Connect-Entra -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -ApplicationId "00001111-aaaa-2222-bbbb-3333cccc4444" -CertificateThumbprint "0a0a0a0a-1111-bbbb-2222-3c3c3c3c3c3c" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should connect to specified environment"{ $result = Connect-Entra -Environment Global $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should connect to an environment as a different identity"{ $result = Connect-Entra -ContextScope "Process" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should allow for authentication using environment variables"{ $result = Connect-Entra -EnvironmentVariable $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Connect-MgGraph -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should return error when TenantId is null"{ { Connect-Entra -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" diff --git a/test/Entra/Authentication/Disconnect-Entra.Tests.ps1 b/test/Entra/Authentication/Disconnect-Entra.Tests.ps1 index 6fb54e374d..3d1da23bf3 100644 --- a/test/Entra/Authentication/Disconnect-Entra.Tests.ps1 +++ b/test/Entra/Authentication/Disconnect-Entra.Tests.ps1 @@ -3,11 +3,11 @@ # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ - Import-Module Microsoft.Graph.Entra.Authentication + if($null -eq (Get-Module -Name Microsoft.Entra.Authentication)){ + Import-Module Microsoft.Entra.Authentication } - Mock -CommandName Disconnect-MgGraph -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName Disconnect-MgGraph -MockWith {} -ModuleName Microsoft.Entra.Authentication $command = Get-Command Disconnect-Entra } @@ -16,7 +16,7 @@ Describe "Disconnect-Entra Mock"{ It "should return empty object"{ $result = Disconnect-Entra $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Disconnect-MgGraph -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Disconnect-MgGraph -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should return error when invalid parameter is provided"{ { Disconnect-MgGraph -DisplayName } | Should -Throw "A parameter cannot be found that matches parameter name 'DisplayName'*" diff --git a/test/Entra/Authentication/Invalid.Tests.ps1 b/test/Entra/Authentication/Invalid.Tests.ps1 index 0f0902f6ee..b6717b4b93 100644 --- a/test/Entra/Authentication/Invalid.Tests.ps1 +++ b/test/Entra/Authentication/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ - Import-Module Microsoft.Graph.Entra.Authentication +if($null -eq (Get-Module -Name Microsoft.Entra.Authentication)){ + Import-Module Microsoft.Entra.Authentication } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/test/Entra/Authentication/Module.Tests.ps1 b/test/Entra/Authentication/Module.Tests.ps1 index a0cf17d8d9..75f0f844b1 100644 --- a/test/Entra/Authentication/Module.Tests.ps1 +++ b/test/Entra/Authentication/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra.Authentication Module" { +Describe "Microsoft.Entra.Authentication Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null){ - Import-Module Microsoft.Graph.Entra.Authentication + if((Get-Module -Name Microsoft.Entra.Authentication) -eq $null){ + Import-Module Microsoft.Entra.Authentication } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Authentication + $PSModuleInfo = Get-Module Microsoft.Entra.Authentication $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Authentication + $PSModuleInfo = Get-Module Microsoft.Entra.Authentication $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Authentication - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Authentication.psm1" + $PSModuleInfo = Get-Module Microsoft.Entra.Authentication + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Entra.Authentication.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Authentication + $PSModuleInfo = Get-Module Microsoft.Entra.Authentication $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra.Authentication -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Entra.Authentication -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/test/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 b/test/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 index 9436cf2410..2a2d8d3dc1 100644 --- a/test/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 +++ b/test/Entra/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null){ - Import-Module Microsoft.Graph.Entra.Authentication + if((Get-Module -Name Microsoft.Entra.Authentication) -eq $null){ + Import-Module Microsoft.Entra.Authentication } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -17,7 +17,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgUserAuthenticationMethod -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName Get-MgUserAuthenticationMethod -MockWith {} -ModuleName Microsoft.Entra.Authentication } Describe "Reset-EntraStrongAuthenticationMethodByUpn" { @@ -26,7 +26,7 @@ Describe "Reset-EntraStrongAuthenticationMethodByUpn" { $result = Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should fail when UserPrincipalName is empty" { { Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName } | Should -Throw "Missing an argument for parameter 'UserPrincipalName'*" @@ -39,14 +39,14 @@ Describe "Reset-EntraStrongAuthenticationMethodByUpn" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Reset-EntraStrongAuthenticationMethodByUpn" Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' | Out-Null - Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Entra.Authentication -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } } It "Should contain 'User-Agent' header" { Reset-EntraStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' | Out-Null - Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserAuthenticationMethod -ModuleName Microsoft.Entra.Authentication -Times 1 -ParameterFilter { $userId | Should -Be 'Test_contoso@M365x99297270.onmicrosoft.com' $true } diff --git a/test/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 b/test/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 index e1bff23d70..e423c9cf2b 100644 --- a/test/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 +++ b/test/Entra/Authentication/Revoke-EntraSignedInUserAllRefreshToken.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null){ - Import-Module Microsoft.Graph.Entra.Authentication + if((Get-Module -Name Microsoft.Entra.Authentication) -eq $null){ + Import-Module Microsoft.Entra.Authentication } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -15,7 +15,7 @@ BeforeAll { } } } - Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Entra.Authentication } Describe "Revoke-EntraSignedInUserAllRefreshToken" { @@ -25,7 +25,7 @@ Describe "Revoke-EntraSignedInUserAllRefreshToken" { $result | Should -Not -BeNullOrEmpty $result | Should -Be $true - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should contain 'User-Agent' header" { @@ -35,7 +35,7 @@ Describe "Revoke-EntraSignedInUserAllRefreshToken" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Revoke-EntraSignedInUserAllRefreshToken" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Authentication -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 b/test/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 index a1b5135d22..cd7291e422 100644 --- a/test/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 +++ b/test/Entra/Authentication/Revoke-EntraUserAllRefreshToken.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Authentication) -eq $null) { - Import-Module Microsoft.Graph.Entra.Authentication + if ((Get-Module -Name Microsoft.Entra.Authentication) -eq $null) { + Import-Module Microsoft.Entra.Authentication } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Revoke-MgUserSignInSession -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName Revoke-MgUserSignInSession -MockWith {} -ModuleName Microsoft.Entra.Authentication } Describe "Revoke-EntraUserAllRefreshToken" { @@ -16,12 +16,12 @@ Describe "Revoke-EntraUserAllRefreshToken" { It "Should return empty object" { $result = Revoke-EntraUserAllRefreshToken -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should return empty object with alias" { $result = Revoke-EntraUserAllRefreshToken -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Entra.Authentication -Times 1 } It "Should fail when UserId is empty string" { { Revoke-EntraUserAllRefreshToken -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -30,7 +30,7 @@ Describe "Revoke-EntraUserAllRefreshToken" { { Revoke-EntraUserAllRefreshToken -UserId } | Should -Throw "Missing an argument for parameter*" } It "Should contain Id in parameters when passed UserId to it" { - Mock -CommandName Revoke-MgUserSignInSession -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName Revoke-MgUserSignInSession -MockWith { $args } -ModuleName Microsoft.Entra.Authentication $result = Revoke-EntraUserAllRefreshToken -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Revoke-EntraUserAllRefreshToken" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Revoke-EntraUserAllRefreshToken" - Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 -ParameterFilter { + Should -Invoke -CommandName Revoke-MgUserSignInSession -ModuleName Microsoft.Entra.Authentication -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Authentication/Valid.Tests.ps1 b/test/Entra/Authentication/Valid.Tests.ps1 index e4f6630faf..63fcb38bc0 100644 --- a/test/Entra/Authentication/Valid.Tests.ps1 +++ b/test/Entra/Authentication/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ - Import-Module Microsoft.Graph.Entra.Authentication + if($null -eq (Get-Module -Name Microsoft.Entra.Authentication)){ + Import-Module Microsoft.Entra.Authentication } Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra.Authentication + $module = Get-Module -Name Microsoft.Entra.Authentication } Describe "Valid parameter Tests"{ @@ -27,16 +27,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Authentication $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Authentication -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Authentication $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Authentication -Times 1 } } catch { @@ -65,16 +65,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Authentication $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Authentication -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Authentication + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Authentication $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Authentication -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Authentication -Times 1 } } catch { diff --git a/test/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 index a2bdba7d56..d6deb8022a 100644 --- a/test/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Add-EntraAdministrativeUnitMember.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Add-EntraAdministrativeUnitMember tests"{ It "Should return empty object"{ $result = Add-EntraAdministrativeUnitMember -AdministrativeUnitId "f306a126-cf2e-439d-b20f-95ce4bcb7ffa" -RefObjectId "d6873b36-81d6-4c5e-bec0-9e3ca2c86846" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return empty object with ObjectId"{ $result = Add-EntraAdministrativeUnitMember -ObjectId "f306a126-cf2e-439d-b20f-95ce4bcb7ffa" -RefObjectId "d6873b36-81d6-4c5e-bec0-9e3ca2c86846" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty"{ { Add-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -40,7 +40,7 @@ Describe "Add-EntraAdministrativeUnitMember tests"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraAdministrativeUnitMember" Add-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraAdministrativeUnitMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index fe584e5b7f..8780eb27cf 100644 --- a/test/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -15,7 +15,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Add-EntraCustomSecurityAttributeDefinitionAllowedValue" { @@ -26,7 +26,7 @@ Describe "Add-EntraCustomSecurityAttributeDefinitionAllowedValue" { $result.Id | should -Be "Apline" $result.IsActive | should -Be $true - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when CustomSecurityAttributeDefinitionId is empty" { { Add-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId } | Should -Throw "Missing an argument for parameter 'CustomSecurityAttributeDefinitionId'.*" @@ -50,7 +50,7 @@ Describe "Add-EntraCustomSecurityAttributeDefinitionAllowedValue" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraCustomSecurityAttributeDefinitionAllowedValue" Add-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' -IsActive $true $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraCustomSecurityAttributeDefinitionAllowedValue" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 index beb1229062..ea96da6cac 100644 --- a/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Add-EntraDeviceRegisteredOwner" { @@ -16,13 +16,13 @@ Describe "Add-EntraDeviceRegisteredOwner" { $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Add-EntraDeviceRegisteredOwner -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" @@ -37,19 +37,19 @@ Describe "Add-EntraDeviceRegisteredOwner" { { Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." } It "Should contain DeviceId in parameters when passed ObjectId to it" { - Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "412be9d1-1460-4061-8eed-cca203fcb215" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain BodyParameter in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement Add-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} - Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -62,7 +62,7 @@ Describe "Add-EntraDeviceRegisteredOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDeviceRegisteredOwner" - Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 index b9c24deef8..d45bf2b545 100644 --- a/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Add-EntraDeviceRegisteredUser" { @@ -16,7 +16,7 @@ Describe "Add-EntraDeviceRegisteredUser" { $result = Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Add-EntraDeviceRegisteredUser -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" @@ -34,22 +34,22 @@ Describe "Add-EntraDeviceRegisteredUser" { $result = Add-EntraDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should contain DeviceId in parameters when passed DeviceId to it" { - Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain BodyParameter in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement Add-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} - Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -62,7 +62,7 @@ Describe "Add-EntraDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDeviceRegisteredUser" - Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 index ad50e33894..58b5b01502 100644 --- a/test/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Add-EntraDirectoryRoleMember" { @@ -16,13 +16,13 @@ Describe "Add-EntraDirectoryRoleMember" { $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return empty object with alias" { $result = Add-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DirectoryRoleId is empty" { { Add-EntraDirectoryRoleMember -DirectoryRoleId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'.*" @@ -37,14 +37,14 @@ Describe "Add-EntraDirectoryRoleMember" { { Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." } It "Should contain DirectoryRoleId in parameters when passed ObjectId to it" { - Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DirectoryRoleId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain OdataId in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Add-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -58,7 +58,7 @@ Describe "Add-EntraDirectoryRoleMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraDirectoryRoleMember" - Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 b/test/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 index 0be93af496..3bf04ca2c3 100644 --- a/test/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Add-EntraScopedRoleMembership.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,20 +29,20 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Tests for Add-EntraScopedRoleMembership"{ It "Result should not be empty"{ $result = Add-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -RoleObjectId $roleObjId -RoleMemberInfo $RoleMember $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('NewDummyId') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Result should not be empty with ObjectId"{ $result = Add-EntraScopedRoleMembership -ObjectId $unitObjId -RoleObjectId $roleObjId -RoleMemberInfo $RoleMember $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('NewDummyId') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is invalid" { { Add-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" diff --git a/test/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 b/test/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 index 4c6f141989..1c8f22ec7e 100644 --- a/test/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Enable-EntraDirectoryRole.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgDirectoryRole -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDirectoryRole -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Enable-EntraDirectoryRole" { @@ -17,7 +17,7 @@ Describe "Enable-EntraDirectoryRole" { $result = Enable-EntraDirectoryRole -RoleTemplateId 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when RoleTemplateId is empty" { { Enable-EntraDirectoryRole -RoleTemplateId } | Should -Throw "Missing an argument for parameter 'RoleTemplateId'*" @@ -26,7 +26,7 @@ Describe "Enable-EntraDirectoryRole" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Enable-EntraDirectoryRole" Enable-EntraDirectoryRole -RoleTemplateId 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Enable-EntraDirectoryRole" - Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDirectoryRole -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 index fa4e6b3ebb..e264bdf4e5 100644 --- a/test/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraAccountSku.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraAccountSku" { @@ -36,7 +36,7 @@ Describe "Get-EntraAccountSku" { $result.AccountId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AppliesTo | should -Be "User" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraAccountSku -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -53,7 +53,7 @@ Describe "Get-EntraAccountSku" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAccountSku" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 index 86efb9ee10..5a1e1d15cc 100644 --- a/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnit.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,18 +21,18 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Tests for Get-EntraAdministrativeUnit"{ It "Result should not be empty"{ $result = Get-EntraAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Result should not be empty objectid"{ $result = Get-EntraAdministrativeUnit -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Get-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -59,20 +59,20 @@ Describe "Tests for Get-EntraAdministrativeUnit"{ $result = Get-EntraAdministrativeUnit -Filter "displayName -eq 'test111'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'test111' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return top AdministrativeUnit" { $result = @(Get-EntraAdministrativeUnit -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnit" $result = Get-EntraAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnit" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 index 019b916f77..e9898ffd2c 100644 --- a/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraAdministrativeUnitMember.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,18 +21,18 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Tests for Get-EntraAdministrativeUnitMember"{ It "Result should not be empty"{ $result = Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Result should not be empty objectId"{ $result = Get-EntraAdministrativeUnitMember -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Get-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -56,14 +56,14 @@ Describe "Tests for Get-EntraAdministrativeUnitMember"{ $result = @(Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnitMember" $result = Get-EntraAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAdministrativeUnitMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 index 360f30ff39..24531a1c1d 100644 --- a/test/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraAttributeSet.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -18,7 +18,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraAttributeSet" { @@ -28,21 +28,21 @@ Describe "Get-EntraAttributeSet" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific AttributeSet" { $result = Get-EntraAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific AttributeSet with alias" { $result = Get-EntraAttributeSet -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AttributeSetId is invalid" { { Get-EntraAttributeSet -AttributeSetId "" } | Should -Throw "Cannot bind argument to parameter 'AttributeSetId' because it is an empty string." @@ -54,7 +54,7 @@ Describe "Get-EntraAttributeSet" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAttributeSet" Get-EntraAttributeSet -AttributeSetId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Out-Null - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 index d495ae9c9c..71d98a1577 100644 --- a/test/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraContact.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -42,7 +42,7 @@ BeforeAll { } - Mock -CommandName Get-MgContact -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgContact -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraContact" { @@ -58,7 +58,7 @@ Describe "Get-EntraContact" { $result.Mobile | Should -BeNullOrEmpty $result.TelephoneNumber | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific Contact alias" { @@ -72,7 +72,7 @@ Describe "Get-EntraContact" { $result.Mobile | Should -BeNullOrEmpty $result.TelephoneNumber | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } @@ -88,7 +88,7 @@ Describe "Get-EntraContact" { $result = Get-EntraContact -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraContact -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -99,7 +99,7 @@ Describe "Get-EntraContact" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Bob Kelly (TAILSPIN)' - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when filter is empty" { @@ -110,7 +110,7 @@ Describe "Get-EntraContact" { $result = Get-EntraContact -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when top is empty" { @@ -136,7 +136,7 @@ Describe "Get-EntraContact" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Bob Kelly (TAILSPIN)' - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraContact -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -150,7 +150,7 @@ Describe "Get-EntraContact" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraContact" - Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgContact -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 index 76335f1c75..2dea60acfc 100644 --- a/test/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraContactMembership.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { } - Mock -CommandName Get-MgContactMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgContactMemberOf -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraContactMembership" { @@ -37,7 +37,7 @@ Describe "Get-EntraContactMembership" { $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' $result.DeletedDateTime | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific Contact Membership with alias" { @@ -46,7 +46,7 @@ Describe "Get-EntraContactMembership" { $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' $result.DeletedDateTime | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when OrgContactId is invalid" { @@ -57,7 +57,7 @@ Describe "Get-EntraContactMembership" { $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -67,7 +67,7 @@ Describe "Get-EntraContactMembership" { $result = Get-EntraContactMembership -OrgContactId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when top is empty" { @@ -94,7 +94,7 @@ Describe "Get-EntraContactMembership" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { @@ -109,7 +109,7 @@ Describe "Get-EntraContactMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraContactMembership" - Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgContactMemberOf -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 index a3c37188db..04ca60587e 100644 --- a/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraCustomSecurityAttributeDefinition" { @@ -35,7 +35,7 @@ Describe "Get-EntraCustomSecurityAttributeDefinition" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'Engineering_Project' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when ObjectId is empty" { { Get-EntraCustomSecurityAttributeDefinition -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -45,7 +45,7 @@ Describe "Get-EntraCustomSecurityAttributeDefinition" { } It "Should contain 'User-Agent' header" { Get-EntraCustomSecurityAttributeDefinition -Id Engineering_Project | Out-Null - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Uri | Should -Match 'Engineering_Project' $true } @@ -55,7 +55,7 @@ Describe "Get-EntraCustomSecurityAttributeDefinition" { $result = Get-EntraCustomSecurityAttributeDefinition -Id 'Engineering_Project' $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraCustomSecurityAttributeDefinition" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index 5892021c71..a937f8bb27 100644 --- a/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -16,7 +16,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraCustomSecurityAttributeDefinitionAllowedValue" { @@ -26,7 +26,7 @@ Describe "Get-EntraCustomSecurityAttributeDefinitionAllowedValue" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'Apline' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when CustomSecurityAttributeDefinitionId is invalid" { { Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'CustomSecurityAttributeDefinitionId' because it is an empty string." @@ -48,11 +48,11 @@ Describe "Get-EntraCustomSecurityAttributeDefinitionAllowedValue" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'Apline' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should contain params" { Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' | Out-Null - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Uri | Should -Match 'Engineering_Project' $Uri | Should -Match 'Apline' $true @@ -63,7 +63,7 @@ Describe "Get-EntraCustomSecurityAttributeDefinitionAllowedValue" { $result = Get-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId 'Engineering_Project' -Id 'Apline' $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraCustomSecurityAttributeDefinitionAllowedValue" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 index 0cc8be44cc..b23e4bdf3d 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -18,7 +18,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDirectoryDeletedItem -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDeletedDirectoryObject"{ @@ -49,7 +49,7 @@ Describe "Get-EntraDeletedDirectoryObject"{ $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { @@ -60,7 +60,7 @@ Describe "Get-EntraDeletedDirectoryObject"{ $result = Get-EntraDeletedDirectoryObject -DirectoryObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedDirectoryObject" - Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryDeletedItem -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 index 5ca2420a0e..65ee4b84d2 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDevice.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -45,7 +45,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDevice -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDevice" { @@ -55,13 +55,13 @@ Describe "Get-EntraDevice" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb') - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific device with Alias" { $result = Get-EntraDevice -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is invalid" { { Get-EntraDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." @@ -85,7 +85,7 @@ Describe "Get-EntraDevice" { $result = Get-EntraDevice -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when All has an argument" { { Get-EntraDevice -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -95,27 +95,27 @@ Describe "Get-EntraDevice" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific device by filter" { $result = Get-EntraDevice -Filter "DisplayName -eq 'Mock-Device'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return top device" { $result = Get-EntraDevice -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Property parameter should work" { $result = Get-EntraDevice -Property DisplayName $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDevice -Property DisplayName -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -134,7 +134,7 @@ Describe "Get-EntraDevice" { $result = Get-EntraDevice -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDevice" - Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 index 390fb15926..624b824374 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredOwner.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } @@ -40,14 +40,14 @@ Describe "Get-EntraDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific device registered owner with alias" { $result = Get-EntraDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Get-EntraDeviceRegisteredOwner -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" @@ -60,7 +60,7 @@ Describe "Get-EntraDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { @@ -71,7 +71,7 @@ Describe "Get-EntraDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when top is empty" { { Get-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -109,7 +109,7 @@ Describe "Get-EntraDeviceRegisteredOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredOwner" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -120,7 +120,7 @@ Describe "Get-EntraDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.mobilePhone | Should -Be '425-555-0100' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { diff --git a/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 index f71ea4f4e9..572b0d902c 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDeviceRegisteredUser.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } @@ -40,14 +40,14 @@ Describe "Get-EntraDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific device registered User with alias" { $result = Get-EntraDeviceRegisteredUser -ObjectId "8542ebd1-3d49-4073-9dce-30f197c67755" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Get-EntraDeviceRegisteredUser -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" @@ -60,7 +60,7 @@ Describe "Get-EntraDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return top device registered owner" { @@ -68,7 +68,7 @@ Describe "Get-EntraDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when top is empty" { { Get-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -115,7 +115,7 @@ Describe "Get-EntraDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeviceRegisteredUser" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 index b2a9a439e2..cac8651ff9 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDirSyncConfiguration.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -17,14 +17,14 @@ BeforeAll { } } } - Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDirSyncConfiguration" { Context "Test for Get-EntraDirSyncConfiguration" { It "Get irectory synchronization settings" { $result = Get-EntraDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraDirSyncConfiguration -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -46,7 +46,7 @@ Describe "Get-EntraDirSyncConfiguration" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncConfiguration" - Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 index 4fb4efac23..acf492e1c6 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDirSyncFeature.Tests.ps1 @@ -2,8 +2,8 @@ # # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # # ------------------------------------------------------------------------------ # BeforeAll { -# if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ -# Import-Module Microsoft.Graph.Entra.DirectoryManagement +# if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ +# Import-Module Microsoft.Entra.DirectoryManagement # } # Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -34,7 +34,7 @@ # } # ) # } -# Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement +# Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement # } # Describe "Get-EntraDirSyncFeature" { @@ -42,12 +42,12 @@ # It "Returns all the sync features" { # $result = Get-EntraDirSyncFeature # $result | Should -Not -BeNullOrEmpty -# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 +# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 # } # It "Returns specific sync feature" { # $result = Get-EntraDirSyncFeature -Feature PasswordSync # $result | Should -Not -BeNullOrEmpty -# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 +# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 # } # It "Should fail when TenantId is null" { # { Get-EntraDirSyncFeature -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -63,7 +63,7 @@ # $result = Get-EntraDirSyncFeature -Feature PasswordSync # $result | Should -Not -BeNullOrEmpty # $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirSyncFeature" -# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { +# Should -Invoke -CommandName Get-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { # $Headers.'User-Agent' | Should -Be $userAgentHeaderValue # $true # } diff --git a/test/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 index b6e8ad80b4..dc870a49c6 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDirectoryObjectOnPremisesProvisioningError" { @@ -15,12 +15,12 @@ Describe "Get-EntraDirectoryObjectOnPremisesProvisioningError" { It "Should return empty object" { $result = Get-EntraDirectoryObjectOnPremisesProvisioningError $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return empty object when TenantId is passed" { $result = Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId "0000aaaa-11bb-cccc-dd22-eeeeee333333" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when TenantId is null" { { Get-EntraDirectoryObjectOnPremisesProvisioningError -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -35,7 +35,7 @@ Describe "Get-EntraDirectoryObjectOnPremisesProvisioningError" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryObjectOnPremisesProvisioningError" Get-EntraDirectoryObjectOnPremisesProvisioningError $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryObjectOnPremisesProvisioningError" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 index 55b758e35b..39502fc722 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDirectoryRole.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryRole -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDirectoryRole -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDirectoryRole" { @@ -34,14 +34,14 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraDirectoryRole -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DirectoryRoleId is empty" { { Get-EntraDirectoryRole -DirectoryRoleId "" } | Should -Throw "Cannot bind argument to parameter 'DirectoryRoleId' because it is an empty string." @@ -51,7 +51,7 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Attribute Assignment Reader' - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Result should Contain DirectoryRoleId" { $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -67,7 +67,7 @@ BeforeAll { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Attribute Assignment Reader' - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -77,7 +77,7 @@ BeforeAll { $result = Get-EntraDirectoryRole -DirectoryRoleId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRole" - Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryRole -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 index 48cc479025..236049ce1e 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleMember.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -23,7 +23,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } @@ -34,14 +34,14 @@ Describe "EntraDirectoryRoleMember" { $result | Should -Not -BeNullOrEmpty $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific directory rolemember with alias" { $result = (Get-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb") | ConvertTo-json | ConvertFrom-json $result | Should -Not -BeNullOrEmpty $result.ObjectId | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DirectoryRoleId is empty" { { Get-EntraDirectoryRoleMember -DirectoryRoleId } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'*" @@ -69,7 +69,7 @@ Describe "EntraDirectoryRoleMember" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -82,7 +82,7 @@ Describe "EntraDirectoryRoleMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 index d4663ce81b..59b44b998f 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,7 +20,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryRoleTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDirectoryRoleTemplate -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDirectoryRoleTemplate" { @@ -31,7 +31,7 @@ Describe "Get-EntraDirectoryRoleTemplate" { $result.Id | should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.DisplayName | should -Be "Mock-App" - Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should be fail when provide non supported parameter" { { Get-EntraDirectoryRoleTemplate -Top 1} | should -Throw "A parameter cannot be found that matches parameter name 'Top'." @@ -41,7 +41,7 @@ Describe "Get-EntraDirectoryRoleTemplate" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRoleTemplate -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -53,7 +53,7 @@ Describe "Get-EntraDirectoryRoleTemplate" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleTemplate" - Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryRoleTemplate -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 index 711af48106..7a04fa1cf8 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDomain.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -34,7 +34,7 @@ $scriptblock = { } - Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDomain" { @@ -44,7 +44,7 @@ Describe "Get-EntraDomain" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'test.mail.onmicrosoft.com' - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { { Get-EntraDomain -Name "" } | Should -Throw "Cannot bind argument to parameter 'Name' because it is an empty string." @@ -53,13 +53,13 @@ Describe "Get-EntraDomain" { $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" $result.ObjectId | should -Be "test.mail.onmicrosoft.com" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Result should Contain Name" { $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" $result.Name | should -Be "test.mail.onmicrosoft.com" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should contain DomainId in parameters when passed Name to it" { $result = Get-EntraDomain -Name "test.mail.onmicrosoft.com" @@ -71,7 +71,7 @@ Describe "Get-EntraDomain" { $result | Should -Not -BeNullOrEmpty $result.AuthenticationType | Should -Be 'Managed' - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { {Get-EntraDomain -Name "test.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -82,7 +82,7 @@ Describe "Get-EntraDomain" { Get-EntraDomain -Name "test.mail.onmicrosoft.com" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomain" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 index e01b761ba0..b8eb3dcc61 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDomainFederationSettings.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDomainFederationSettings" { @@ -39,7 +39,7 @@ Describe "Get-EntraDomainFederationSettings" { $result | Should -Not -BeNullOrEmpty $result.FederationBrandName | Should -Be "Contoso" $result.ActiveLogOnUri | Should -Be "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" - Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when TenantId is null" { { Get-EntraDomainFederationSettings -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -61,7 +61,7 @@ Describe "Get-EntraDomainFederationSettings" { $result = Get-EntraDomainFederationSettings -DomainName "test.com" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainFederationSettings" - Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 index 6ea961d652..18f04d9417 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDomainNameReference.Tests.ps1 @@ -3,8 +3,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } @@ -40,7 +40,7 @@ Describe "Get-EntraDomainNameReference" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '22cc22cc-dd33-ee44-ff55-66aa66aa66aa' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { { Get-EntraDomainNameReference -Name } | Should -Throw "Missing an argument for parameter 'Name'*" @@ -73,7 +73,7 @@ Describe "Get-EntraDomainNameReference" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be '22cc22cc-dd33-ee44-ff55-66aa66aa66aa' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDomainNameReference -Name "M365x99297270.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -85,7 +85,7 @@ Describe "Get-EntraDomainNameReference" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainNameReference" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 index 3acbad54db..feda9f53fc 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ $scriptblock = { } - Mock -CommandName Get-MgDomainServiceConfigurationRecord -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDomainServiceConfigurationRecord -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDomainServiceConfigurationRecord" { @@ -38,7 +38,7 @@ Describe "Get-EntraDomainServiceConfigurationRecord" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '0000aaaa-11bb-cccc-dd22-eeeeee333333' - Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { @@ -51,13 +51,13 @@ Describe "Get-EntraDomainServiceConfigurationRecord" { $result = Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" $result.DnsRecordId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Result should Contain ObjectId" { $result = Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" $result.ObjectId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should contain DomainId in parameters when passed Name to it" { $result = Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" @@ -69,7 +69,7 @@ Describe "Get-EntraDomainServiceConfigurationRecord" { $result | Should -Not -BeNullOrEmpty $result.RecordType | Should -Be 'Mx' - Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { {Get-EntraDomainServiceConfigurationRecord -Name "test.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -81,7 +81,7 @@ Describe "Get-EntraDomainServiceConfigurationRecord" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainServiceConfigurationRecord" - Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomainServiceConfigurationRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 index 984f74e6f1..33f450ea45 100644 --- a/test/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ $scriptblock = { } - Mock -CommandName Get-MgDomainVerificationDnsRecord -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDomainVerificationDnsRecord -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraDomainVerificationDnsRecord" { @@ -38,7 +38,7 @@ Describe "Get-EntraDomainVerificationDnsRecord" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '0000aaaa-11bb-cccc-dd22-eeeeee333333' - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { @@ -51,13 +51,13 @@ Describe "Get-EntraDomainVerificationDnsRecord" { $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" $result.DnsRecordId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Result should Contain ObjectId" { $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" $result.ObjectId | should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should contain DomainId in parameters when passed Name to it" { $result = Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" @@ -69,7 +69,7 @@ Describe "Get-EntraDomainVerificationDnsRecord" { $result | Should -Not -BeNullOrEmpty $result.RecordType | Should -Be 'Txt' - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraDomainVerificationDnsRecord -Name "test.mail.onmicrosoft.com" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -81,7 +81,7 @@ Describe "Get-EntraDomainVerificationDnsRecord" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDomainVerificationDnsRecord" - Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomainVerificationDnsRecord -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 index 9aee14e4da..586551661e 100644 --- a/test/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraFederationProperty.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,7 +20,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraFederationProperty" { Context "Test for Get-EntraFederationProperty" { @@ -34,7 +34,7 @@ Describe "Get-EntraFederationProperty" { $result.PassiveSignInUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" $result.SignOutUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" - Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { {Get-EntraFederationProperty -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" @@ -45,7 +45,7 @@ Describe "Get-EntraFederationProperty" { } It "Should contain DomainId in parameters when DomainName to it" { - Mock -CommandName Get-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Get-EntraFederationProperty -DomainName "anmaji.myworkspace.contoso.com" $params = Get-Parameters -data $result $params.DomainId | Should -Be "anmaji.myworkspace.contoso.com" @@ -59,7 +59,7 @@ Describe "Get-EntraFederationProperty" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraFederationProperty" - Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomainFederationConfiguration -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 index 87feec0045..0281f09906 100644 --- a/test/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraObjectByObjectId.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -26,7 +26,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } @@ -40,7 +40,7 @@ Describe "Get-EntraObjectByObjectId" { $result.displayName | should -Be 'Mock-App' $result.userType | should -Be 'User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when ObjectId is empty" { { Get-EntraObjectByObjectId -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectIds'*" @@ -53,7 +53,7 @@ Describe "Get-EntraObjectByObjectId" { $result | Should -Not -BeNullOrEmpty $result.userType | should -Be 'User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when ObjectId is empty" { { Get-EntraObjectByObjectId -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Types } | Should -Throw "Missing an argument for parameter 'Types'*" @@ -69,7 +69,7 @@ Describe "Get-EntraObjectByObjectId" { $result | Should -Not -BeNullOrEmpty $result.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { @@ -83,7 +83,7 @@ Describe "Get-EntraObjectByObjectId" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraObjectByObjectId" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 index 4d3798ade3..175e77ed3c 100644 --- a/test/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraPasswordPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -17,7 +17,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDomain -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Get-EntraPasswordPolicy" { @@ -28,7 +28,7 @@ Describe "Get-EntraPasswordPolicy" { $result.NotificationDays.PasswordNotificationWindowInDays | Should -Be "14" $result.ValidityPeriod | Should -Be "2147483647" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { @@ -47,7 +47,7 @@ Describe "Get-EntraPasswordPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPasswordPolicy" - Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 index ae370cb0bd..c807ed65f5 100644 --- a/test/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraScopedRoleMembership.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Tests for Get-EntraScopedRoleMembership"{ It "Result should not be empty"{ @@ -37,7 +37,7 @@ Describe "Tests for Get-EntraScopedRoleMembership"{ $result.ObjectId | should -Be $scopedRoleMembershipId $result.AdministrativeUnitObjectId | should -Be $unitObjId $result.RoleObjectId | should -Be $roleObjId - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Result should not be empty with ObjectId"{ $result = Get-EntraScopedRoleMembership -ObjectId $unitObjId -ScopedRoleMembershipId $scopedRoleMembershipId @@ -45,7 +45,7 @@ Describe "Tests for Get-EntraScopedRoleMembership"{ $result.ObjectId | should -Be $scopedRoleMembershipId $result.AdministrativeUnitObjectId | should -Be $unitObjId $result.RoleObjectId | should -Be $roleObjId - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is invalid" { { Get-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -64,7 +64,7 @@ Describe "Tests for Get-EntraScopedRoleMembership"{ $result = Get-EntraScopedRoleMembership -AdministrativeUnitId $unitObjId -ScopedRoleMembershipId $scopedRoleMembershipId $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraScopedRoleMembership" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 index 67471ef5df..b4208d04b6 100644 --- a/test/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraSubscribedSku.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ $scriptblock = { } - Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } @@ -40,14 +40,14 @@ Describe "Get-EntraSubscribedSku" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific SubscribedSku with alias" { $result = Get-EntraSubscribedSku -ObjectId "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444_11112222-bbbb-3333-cccc-4444dddd5555" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when SubscribedSkuId empty" { { Get-EntraSubscribedSku -SubscribedSkuId } | Should -Throw "Missing an argument for parameter 'SubscribedSkuId'*" @@ -59,14 +59,14 @@ Describe "Get-EntraSubscribedSku" { $result = Get-EntraSubscribedSku $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Property parameter should work" { $result = Get-EntraSubscribedSku -Property AppliesTo $result | Should -Not -BeNullOrEmpty $result.AppliesTo | Should -Be 'User' - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraSubscribedSku -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -78,7 +78,7 @@ Describe "Get-EntraSubscribedSku" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraSubscribedSku" - Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgSubscribedSku -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 b/test/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 index 7dc35b5a63..c8a532e482 100644 --- a/test/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Get-EntraTenantDetail.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -34,7 +34,7 @@ $scriptblock = { } - Mock -CommandName Get-MgOrganization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgOrganization -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } @@ -44,7 +44,7 @@ Describe "Get-EntraTenantDetail" { $result = Get-EntraTenantDetail -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraTenantDetail -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -53,7 +53,7 @@ Describe "Get-EntraTenantDetail" { $result = Get-EntraTenantDetail -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Top is empty" { { Get-EntraTenantDetail -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -66,7 +66,7 @@ Describe "Get-EntraTenantDetail" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock App' - Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraTenantDetail -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -78,7 +78,7 @@ Describe "Get-EntraTenantDetail" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTenantDetail" - Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgOrganization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Invalid.Tests.ps1 b/test/Entra/DirectoryManagement/Invalid.Tests.ps1 index 9d6567d899..1aa7d8a7bc 100644 --- a/test/Entra/DirectoryManagement/Invalid.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement)){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement +if($null -eq (Get-Module -Name Microsoft.Entra.DirectoryManagement)){ + Import-Module Microsoft.Entra.DirectoryManagement } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/test/Entra/DirectoryManagement/Module.Tests.ps1 b/test/Entra/DirectoryManagement/Module.Tests.ps1 index 24e5e5254d..8d9b21d8d4 100644 --- a/test/Entra/DirectoryManagement/Module.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra.DirectoryManagement Module" { +Describe "Microsoft.Entra.DirectoryManagement Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.DirectoryManagement + $PSModuleInfo = Get-Module Microsoft.Entra.DirectoryManagement $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.DirectoryManagement + $PSModuleInfo = Get-Module Microsoft.Entra.DirectoryManagement $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.DirectoryManagement - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.DirectoryManagement.psm1" + $PSModuleInfo = Get-Module Microsoft.Entra.DirectoryManagement + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Entra.DirectoryManagement.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.DirectoryManagement + $PSModuleInfo = Get-Module Microsoft.Entra.DirectoryManagement $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra.DirectoryManagement -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Entra.DirectoryManagement -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/test/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 b/test/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 index 8fc7085775..e34a955f70 100644 --- a/test/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 +++ b/test/Entra/DirectoryManagement/New-EntraAdministrativeUnit.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll{ } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Tests for New-EntraAdministrativeUnit"{ It "Result should not be empty"{ @@ -29,7 +29,7 @@ Describe "Tests for New-EntraAdministrativeUnit"{ $result | Should -Not -BeNullOrEmpty $result.id | should -Be @('aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb') $result.displayName | Should -Be "DummyName" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DisplayName is empty" { { New-EntraAdministrativeUnit -DisplayName "" } | Should -Throw "Cannot bind argument to parameter 'DisplayName'*" @@ -45,7 +45,7 @@ Describe "Tests for New-EntraAdministrativeUnit"{ $result = New-EntraAdministrativeUnit -DisplayName "DummyName" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraAdministrativeUnit" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 b/test/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 index 151ea9cf42..bc1c14c1c8 100644 --- a/test/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 +++ b/test/Entra/DirectoryManagement/New-EntraAttributeSet.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "New-EntraAttributeSet" { @@ -31,7 +31,7 @@ Describe "New-EntraAttributeSet" { $result.MaxAttributesPerSet | should -Be 125 $result.Description | should -Be "CustomAttributeSet" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return created AttributeSet with alias" { $result = New-EntraAttributeSet -Id "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 @@ -40,7 +40,7 @@ Describe "New-EntraAttributeSet" { $result.MaxAttributesPerSet | should -Be 125 $result.Description | should -Be "CustomAttributeSet" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AttributeSetId parameter is invalid" { { New-EntraAttributeSet -AttributeSetId } | Should -Throw "Missing an argument for parameter 'AttributeSetId*" @@ -58,7 +58,7 @@ Describe "New-EntraAttributeSet" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraAttributeSet" New-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 | Out-Null - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 index 1056792593..e9cffcc98d 100644 --- a/test/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 +++ b/test/Entra/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "New-EntraCustomSecurityAttributeDefinition" { @@ -33,7 +33,7 @@ Describe "New-EntraCustomSecurityAttributeDefinition" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "Engineering_Project1234" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when attributeSet is empty" { { New-EntraCustomSecurityAttributeDefinition -attributeSet -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true } | Should -Throw "Missing an argument for parameter 'attributeSet'.*" @@ -83,7 +83,7 @@ Describe "New-EntraCustomSecurityAttributeDefinition" { $result = New-EntraCustomSecurityAttributeDefinition -attributeSet "Engineering" -description "Active projects for user" -isCollection $true -isSearchable $true -name "Project1234" -status "Available" -type "String" -usePreDefinedValuesOnly $true $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraCustomSecurityAttributeDefinition" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 b/test/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 index 8bc101403a..541e698648 100644 --- a/test/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 +++ b/test/Entra/DirectoryManagement/New-EntraDomain.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { ) } - Mock -CommandName New-MgDomain -MockWith $scriptBlock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName New-MgDomain -MockWith $scriptBlock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "New-EntraDomain" { @@ -39,7 +39,7 @@ Describe "New-EntraDomain" { $result.ObjectId | should -Be "lala.uk" $result.Name | should -Be "lala.uk" - Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Create a new Domain with a list of domain capabilities" { @@ -88,7 +88,7 @@ Describe "New-EntraDomain" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDomain" - Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 index 54abf08186..16ced2c97a 100644 --- a/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnit.Tests.ps1 @@ -2,19 +2,19 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Test for Remove-EntraAdministrativeUnit" { It "Should return empty object" { $result = Remove-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -32,7 +32,7 @@ Describe "Test for Remove-EntraAdministrativeUnit" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraAdministrativeUnit" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 index 624069e0f2..75906ea125 100644 --- a/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Remove-EntraAdministrativeUnitMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement $auId = "bbbbbbbb-1111-1111-1111-cccccccccccc" $memId = "bbbbbbbb-2222-2222-2222-cccccccccccc" @@ -17,12 +17,12 @@ Describe "Test for Remove-EntraAdministrativeUnitMember" { It "Should return empty object" { $result = Remove-EntraAdministrativeUnitMember -AdministrativeUnitId $auId -MemberId $memId $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return empty object with ObjectId" { $result = Remove-EntraAdministrativeUnitMember -ObjectId $auId -MemberId $memId $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraAdministrativeUnitMember -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -46,7 +46,7 @@ Describe "Test for Remove-EntraAdministrativeUnitMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraAdministrativeUnitMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 index c78c13796e..403229bfa7 100644 --- a/test/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Remove-EntraDevice.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDevice -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Remove-EntraDevice" { @@ -17,13 +17,13 @@ Describe "Remove-EntraDevice" { $result = Remove-EntraDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is invalid" { { Remove-EntraDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Remove-EntraDevice" { { Remove-EntraDevice -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" } It "Should contain DeviceId in parameters when passed DeviceId to it" { - Mock -CommandName Remove-MgDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDevice -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Remove-EntraDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraDevice" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDevice" - Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 index 9c70ddd44b..cd7d7a836d 100644 --- a/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - #Import-Module .\bin\Microsoft.Graph.Entra.DirectoryManagement.psm1 -Force - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + #Import-Module .\bin\Microsoft.Entra.DirectoryManagement.psm1 -Force + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Remove-EntraDeviceRegisteredOwner" { @@ -17,13 +17,13 @@ Describe "Remove-EntraDeviceRegisteredOwner" { $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Remove-EntraDeviceRegisteredOwner -DeviceId -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } @@ -38,14 +38,14 @@ Describe "Remove-EntraDeviceRegisteredOwner" { { Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "" | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string.*" } } It "Should contain DeviceId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Remove-EntraDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -59,7 +59,7 @@ Describe "Remove-EntraDeviceRegisteredOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeviceRegisteredOwner" - Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 index 162f668905..d4932d12e2 100644 --- a/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - #Import-Module .\bin\Microsoft.Graph.Entra.DirectoryManagement.psm1 -Force - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + #Import-Module .\bin\Microsoft.Entra.DirectoryManagement.psm1 -Force + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Remove-EntraDeviceRegisteredUser" { @@ -17,13 +17,13 @@ Describe "Remove-EntraDeviceRegisteredUser" { $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Remove-EntraDeviceRegisteredUser -DeviceId -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } @@ -38,14 +38,14 @@ Describe "Remove-EntraDeviceRegisteredUser" { { Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "" | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string.*" } } It "Should contain DeviceId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain DirectoryObjectId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Remove-EntraDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -59,7 +59,7 @@ Describe "Remove-EntraDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDeviceRegisteredUser" - Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 index 3b0ebcb558..a1a0e9ad74 100644 --- a/test/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Remove-EntraDirectoryRoleMember" { @@ -16,13 +16,13 @@ Describe "Remove-EntraDirectoryRoleMember" { $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraDirectoryRoleMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DirectoryRoleId is empty" { { Remove-EntraDirectoryRoleMember -DirectoryRoleId -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DirectoryRoleId'*" @@ -37,14 +37,14 @@ Describe "Remove-EntraDirectoryRoleMember" { { Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "" } | Should -Throw "Cannot bind argument to parameter 'MemberId' because it is an empty string." } It "Should contain DirectoryRoleId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DirectoryRoleId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain DirectoryObjectId in parameters when passed RefObjectId to it" { - Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDirectoryRoleMemberByRef -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Remove-EntraDirectoryRoleMember -DirectoryRoleId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -57,7 +57,7 @@ Describe "Remove-EntraDirectoryRoleMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleMember" - Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDirectoryRoleMemberByRef -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 index a14ef7328d..7f527e81d5 100644 --- a/test/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Remove-EntraDomain.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgDomain -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDomain -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Remove-EntraDomain" { @@ -16,7 +16,7 @@ Describe "Remove-EntraDomain" { $result = Remove-EntraDomain -Name "Contoso.com" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { @@ -28,7 +28,7 @@ Describe "Remove-EntraDomain" { } It "Should contain DomainId in parameters when passed Name to it" { - Mock -CommandName Remove-MgDomain -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Remove-MgDomain -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Remove-EntraDomain -Name "Contoso.com" $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Remove-EntraDomain" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDomain" - Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 b/test/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 index 31800cc995..6f59917f33 100644 --- a/test/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Remove-EntraScopedRoleMembership.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Test for Remove-EntraScopedRoleMembership" { It "Should return empty object" { $result = Remove-EntraScopedRoleMembership -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -ScopedRoleMembershipId bbbbbbbb-2222-2222-2222-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return empty object with ObjectId" { $result = Remove-EntraScopedRoleMembership -ObjectId bbbbbbbb-1111-1111-1111-cccccccccccc -ScopedRoleMembershipId bbbbbbbb-2222-2222-2222-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraScopedRoleMembership -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -43,7 +43,7 @@ Describe "Test for Remove-EntraScopedRoleMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraScopedRoleMembership" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 b/test/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 index a8c74dc31a..3b0e6522b2 100644 --- a/test/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Restore-EntraDeletedDirectoryObject" { Context "Restore-EntraDeletedDirectoryObject" { @@ -31,13 +31,13 @@ Describe "Restore-EntraDeletedDirectoryObject" { $result = Restore-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return specific MS deleted directory object with AutoReconcileProxyConflict" { $result = Restore-EntraDeletedDirectoryObject -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AutoReconcileProxyConflict $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { { Restore-EntraDeletedDirectoryObject -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -54,7 +54,7 @@ Describe "Restore-EntraDeletedDirectoryObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedDirectoryObject" Restore-EntraDeletedDirectoryObject -Id "11112222-bbbb-3333-cccc-4444dddd5555" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Restore-EntraDeletedDirectoryObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 index 5f63390768..46e95f388f 100644 --- a/test/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraAdministrativeUnit.Tests.ps1 @@ -2,24 +2,24 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Test for Set-EntraAdministrativeUnit" { It "Should return empty object" { $result = Set-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return empty object withObjectID" { $result = Set-EntraAdministrativeUnit -ObjectId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Set-EntraAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId'*" @@ -33,7 +33,7 @@ Describe "Test for Set-EntraAdministrativeUnit" { It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAdministrativeUnit" Set-EntraAdministrativeUnit -AdministrativeUnitId bbbbbbbb-1111-1111-1111-cccccccccccc -DisplayName "test" -Description "test" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 index 00f0c4fdd0..0da81020ce 100644 --- a/test/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraAttributeSet.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Set-EntraAttributeSet" { @@ -17,13 +17,13 @@ Describe "Set-EntraAttributeSet" { $result = Set-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should return created AttributeSet with alias" { $result = Set-EntraAttributeSet -Id "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AttributeSetId parameter is empty" { { Set-EntraAttributeSet -AttributeSetId } | Should -Throw "Missing an argument for parameter 'AttributeSetId*" @@ -41,7 +41,7 @@ Describe "Set-EntraAttributeSet" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAttributeSet" Set-EntraAttributeSet -AttributeSetId "NewCustomAttributeSet" -Description "CustomAttributeSet" -MaxAttributesPerSet 125 | Out-Null - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 index 50c707cdf5..55829b5a95 100644 --- a/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Test for Set-EntraCustomSecurityAttributeDefinition" { @@ -16,7 +16,7 @@ Describe "Test for Set-EntraCustomSecurityAttributeDefinition" { It "Should return empty object" { $result = Set-EntraCustomSecurityAttributeDefinition -Id "Demo12_ProjectDatevaluevaluevalue12test" -Description "Test desc" -UsePreDefinedValuesOnly $false -Status "Available" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when ID is empty" { { Set-EntraCustomSecurityAttributeDefinition -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" @@ -28,7 +28,7 @@ Describe "Test for Set-EntraCustomSecurityAttributeDefinition" { { Set-EntraCustomSecurityAttributeDefinition -xyz } | Should -Throw "A parameter cannot be found that matches parameter name 'xyz'*" } It "Should contain 'User-Agent' header" { - Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraCustomSecurityAttributeDefinition" $result = Set-EntraCustomSecurityAttributeDefinition -Id "Demo12_ProjectDatevaluevaluevalue12test" -Description "Test desc" -UsePreDefinedValuesOnly $false -Status "Available" $params = Get-Parameters -data $result diff --git a/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index 8af4d00301..9d95ded483 100644 --- a/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Test for Set-EntraCustomSecurityAttributeDefinitionAllowedValue" { @@ -16,7 +16,7 @@ Describe "Test for Set-EntraCustomSecurityAttributeDefinitionAllowedValue" { It "Should return empty object" { $result = Set-EntraCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId "Engineering_Project" -Id "Alpine" -IsActive $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when CustomSecurityAttributeDefinitionId is empty" { @@ -44,7 +44,7 @@ Describe "Test for Set-EntraCustomSecurityAttributeDefinitionAllowedValue" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraCustomSecurityAttributeDefinitionAllowedValue" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 index b5abc863b4..c5830c6ec3 100644 --- a/test/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraDevice.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgDevice -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Set-EntraDevice"{ @@ -17,13 +17,13 @@ Describe "Set-EntraDevice"{ $result = Set-EntraDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DeviceObjectId is invalid" { { Set-EntraDevice -DeviceObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceObjectId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Set-EntraDevice"{ { Set-EntraDevice -DeviceObjectId } | Should -Throw "Missing an argument for parameter 'DeviceObjectId'*" } It "Should contain DeviceId in parameters when passed DeviceObjectId to it" { - Mock -CommandName Update-MgDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgDevice -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Set-EntraDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Set-EntraDevice"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDevice" - Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDevice -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 index 6dc0fca714..180559e47f 100644 --- a/test/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraDirSyncConfiguration.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -14,16 +14,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement - Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Set-EntraDirSyncConfiguration" { Context "Test for Set-EntraDirSyncConfiguration" { It "Should Modifies the directory synchronization settings." { $result = Set-EntraDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when AccidentalDeletionThreshold is empty" { @@ -52,7 +52,7 @@ Describe "Set-EntraDirSyncConfiguration" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncConfiguration" - Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 index a79acb5bb2..c6da8a9095 100644 --- a/test/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraDirSyncEnabled.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Set-EntraDirSyncEnabled" { @@ -16,7 +16,7 @@ Describe "Set-EntraDirSyncEnabled" { It "Should return empty object" { $result = Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when EnableDirsync is empty" { @@ -41,7 +41,7 @@ Describe "Set-EntraDirSyncEnabled" { It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncEnabled" Set-EntraDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force | Out-Null - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 index 82211abc78..6d9823893b 100644 --- a/test/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraDirSyncFeature.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -14,16 +14,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement - Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Set-EntraDirSyncFeature" { Context "Test for Set-EntraDirSyncFeature" { It "Should sets identity synchronization features for a tenant." { $result = Set-EntraDirSyncFeature -Feature "BypassDirSyncOverrides" -Enabled $false -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Feature is empty" { @@ -60,7 +60,7 @@ Describe "Set-EntraDirSyncFeature" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirSyncFeature" - Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 index c5d6277150..13403cf9ff 100644 --- a/test/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraDomain.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgDomain -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgDomain -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Set-EntraDomain"{ @@ -17,7 +17,7 @@ Describe "Set-EntraDomain"{ $result = Set-EntraDomain -Name "test.mail.onmicrosoft.com" -IsDefault $True -SupportedServices @("OrgIdAuthentication") $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when Name is empty" { { Set-EntraDomain -Name } | Should -Throw "Missing an argument for parameter 'Name'*" @@ -40,7 +40,7 @@ Describe "Set-EntraDomain"{ } It "Should contain DomainId in parameters when passed Name to it" { - Mock -CommandName Update-MgDomain -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgDomain -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Set-EntraDomain -Name "test.mail.onmicrosoft.com" $params = Get-Parameters -data $result @@ -53,7 +53,7 @@ Describe "Set-EntraDomain"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDomain" - Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDomain -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 index 28e1ed12be..77e74d9e49 100644 --- a/test/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraDomainFederationSettings.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -29,16 +29,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Entra.DirectoryManagement - Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Set-EntraDomainFederationSettings" { Context "Test for Set-EntraDomainFederationSettings" { It "Should Updates settings for a federated domain." { $result = Set-EntraDomainFederationSettings -DomainName "contoso.com" -LogOffUri "https://adfs1.manan.lab/adfs/" -PassiveLogOnUri "https://adfs1.manan.lab/adfs/" -ActiveLogOnUri "https://adfs1.manan.lab/adfs/services/trust/2005/" -IssuerUri "http://adfs1.manan.lab/adfs/services/" -FederationBrandName "ADFS" -MetadataExchangeUri "https://adfs1.manan.lab/adfs/services/trust/" -PreferredAuthenticationProtocol "saml" -PromptLoginBehavior "nativeSupport" -SigningCertificate "Testcertificate" -NextSigningCertificate "Testcertificate" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { @@ -63,7 +63,7 @@ Describe "Set-EntraDomainFederationSettings" { {Set-EntraDomainFederationSettings -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" } It "Should contain DomainId in parameters when DomainName to it" { - Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Update-MgDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Entra.DirectoryManagement $result = Set-EntraDomainFederationSettings -DomainName "contoso.com" $params = Get-Parameters -data $result $a= $params | ConvertTo-json | ConvertFrom-Json @@ -76,7 +76,7 @@ Describe "Set-EntraDomainFederationSettings" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDomainFederationSettings" - Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgDomainFederationConfiguration -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 index 152d68323c..9d240ba932 100644 --- a/test/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraPartnerInformation.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -MockWith { + Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -MockWith { return @{ value = @( @{ @@ -23,10 +23,10 @@ BeforeAll { Describe "Set-EntraPartnerInformation" { Context "Test for Set-EntraPartnerInformation" { It "Should return empty object" { - Mock -CommandName Invoke-MgGraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-MgGraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement $result = Set-EntraPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when PartnerSupportUrl is empty" { { Set-EntraPartnerInformation -PartnerSupportUrl } | Should -Throw "Missing an argument for parameter 'PartnerSupportUrl'*" @@ -66,7 +66,7 @@ Describe "Set-EntraPartnerInformation" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPartnerInformation" - Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 b/test/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 index 07a69df178..72f18b8a59 100644 --- a/test/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Set-EntraTenantDetail.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.DirectoryManagement } $scriptblock = { @@ -12,8 +12,8 @@ BeforeAll { } } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Get-MgOrganization -MockWith {$scriptblock} -ModuleName Microsoft.Graph.Entra.DirectoryManagement - Mock -CommandName Update-MgOrganization -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Get-MgOrganization -MockWith {$scriptblock} -ModuleName Microsoft.Entra.DirectoryManagement + Mock -CommandName Update-MgOrganization -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement } Describe "Set-EntraTenantDetail" { @@ -21,7 +21,7 @@ Describe "Set-EntraTenantDetail" { It "Should return empty object" { $result = Set-EntraTenantDetail -MarketingNotificationEmails "amy@contoso.com","henry@contoso.com" -SecurityComplianceNotificationMails "john@contoso.com","mary@contoso.com" -SecurityComplianceNotificationPhones "1-555-625-9999", "1-555-233-5544" -TechnicalNotificationMails "peter@contoso.com" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } It "Should fail when MarketingNotificationEmails is empty" { { Set-EntraTenantDetail -MarketingNotificationEmails } | Should -Throw "Missing an argument for parameter 'MarketingNotificationEmails'.*" @@ -42,7 +42,7 @@ Describe "Set-EntraTenantDetail" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraTenantDetail" - Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgOrganization -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/DirectoryManagement/Valid.Tests.ps1 b/test/Entra/DirectoryManagement/Valid.Tests.ps1 index bad9e7540e..9794249ef3 100644 --- a/test/Entra/DirectoryManagement/Valid.Tests.ps1 +++ b/test/Entra/DirectoryManagement/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement)){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement + if($null -eq (Get-Module -Name Microsoft.Entra.DirectoryManagement)){ + Import-Module Microsoft.Entra.DirectoryManagement } Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement + $module = Get-Module -Name Microsoft.Entra.DirectoryManagement } Describe "Valid parameter Tests"{ @@ -27,16 +27,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } } catch { @@ -65,16 +65,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.DirectoryManagement + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.DirectoryManagement $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.DirectoryManagement -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.DirectoryManagement -Times 1 } } catch { diff --git a/test/Entra/Entra.Tests.ps1 b/test/Entra/Entra.Tests.ps1 index 6a50d48cd7..526322e432 100644 --- a/test/Entra/Entra.Tests.ps1 +++ b/test/Entra/Entra.Tests.ps1 @@ -2,35 +2,35 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Authentication)){ - Import-Module Microsoft.Graph.Entra.Authentication -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Authentication)){ + Import-Module Microsoft.Entra.Authentication -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Applications)){ - Import-Module Microsoft.Graph.Entra.Applications -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Applications)){ + Import-Module Microsoft.Entra.Applications -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.DirectoryManagement)){ - Import-Module Microsoft.Graph.Entra.DirectoryManagement -Force +if($null -eq (Get-Module -Name Microsoft.Entra.DirectoryManagement)){ + Import-Module Microsoft.Entra.DirectoryManagement -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ - Import-Module Microsoft.Graph.Entra.Governance -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Governance)){ + Import-Module Microsoft.Entra.Governance -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Users)){ - Import-Module Microsoft.Graph.Entra.Users -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Users)){ + Import-Module Microsoft.Entra.Users -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Groups)){ - Import-Module Microsoft.Graph.Entra.Groups -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Groups)){ + Import-Module Microsoft.Entra.Groups -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ - Import-Module Microsoft.Graph.Entra.Reports -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Reports)){ + Import-Module Microsoft.Entra.Reports -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ - Import-Module Microsoft.Graph.Entra.SignIns -Force +if($null -eq (Get-Module -Name Microsoft.Entra.SignIns)){ + Import-Module Microsoft.Entra.SignIns -Force } Import-Module Pester -#$psmPath = (Get-Module Microsoft.Graph.Entra.Applications).Path -$ps1FilesPath = join-path $psscriptroot "..\..\module\Entra\Microsoft.Graph.Entra" +#$psmPath = (Get-Module Microsoft.Entra.Applications).Path +$ps1FilesPath = join-path $psscriptroot "..\..\module\Entra\Microsoft.Entra" $testReportPath = join-path $psscriptroot "..\..\TestReport\Entra" $mockScriptsPath = join-path $psscriptroot "..\..\test\Entra\*\*.Tests.ps1" diff --git a/test/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 b/test/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 index 98a2326d26..de33a769a4 100644 --- a/test/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 +++ b/test/Entra/Governance/Get-EntraDirectoryRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance + if((Get-Module -Name Microsoft.Entra.Governance) -eq $null){ + Import-Module Microsoft.Entra.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Get-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Governance } Describe "Get-EntraDirectoryRoleAssignment" { @@ -35,13 +35,13 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result = Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when Get-EntraDirectoryRoleAssignment is empty" { { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" @@ -53,7 +53,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result = Get-EntraDirectoryRoleAssignment -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when All is invalid" { { Get-EntraDirectoryRoleAssignment -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -62,7 +62,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result = Get-EntraDirectoryRoleAssignment -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when Top is empty" { { Get-EntraDirectoryRoleAssignment -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -75,7 +75,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when filter is empty" { { Get-EntraDirectoryRoleAssignment -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -95,7 +95,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.PrincipalId | Should -Be 'aaaaaaaa-bbbb-cccc-1111-222222222222' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -107,7 +107,7 @@ Describe "Get-EntraDirectoryRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleAssignment" - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 b/test/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 index bef299fdeb..9d3c761729 100644 --- a/test/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 +++ b/test/Entra/Governance/Get-EntraDirectoryRoleDefinition.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance + if((Get-Module -Name Microsoft.Entra.Governance) -eq $null){ + Import-Module Microsoft.Entra.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Get-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Entra.Governance } Describe "Get-EntraDirectoryRoleDefinition" { @@ -40,7 +40,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result.DisplayName | Should -Be "Mock-App" $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should return specificrole Defination With Alias" { $result = Get-EntraDirectoryRoleDefinition -Id "0000aaaa-11bb-cccc-dd22-eeeeee333333" @@ -48,7 +48,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result.DisplayName | Should -Be "Mock-App" $result.Id | Should -Be "0000aaaa-11bb-cccc-dd22-eeeeee333333" - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when UnifiedRoleDefinitionId is empty" { { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" @@ -60,7 +60,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result = Get-EntraDirectoryRoleDefinition -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when All is invalid" { { Get-EntraDirectoryRoleDefinition -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -69,7 +69,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result = Get-EntraDirectoryRoleDefinition -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when Top is empty" { { Get-EntraDirectoryRoleDefinition -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -82,7 +82,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when String is empty" { { Get-EntraDirectoryRoleDefinition -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" @@ -92,7 +92,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when filter is empty" { { Get-EntraDirectoryRoleDefinition -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -111,7 +111,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when Property is empty" { { Get-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "0000aaaa-11bb-cccc-dd22-eeeeee333333" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -123,7 +123,7 @@ Describe "Get-EntraDirectoryRoleDefinition" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDirectoryRoleDefinition" - Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Governance/Invalid.Tests.ps1 b/test/Entra/Governance/Invalid.Tests.ps1 index eaf6386a58..f7d298be04 100644 --- a/test/Entra/Governance/Invalid.Tests.ps1 +++ b/test/Entra/Governance/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ - Import-Module Microsoft.Graph.Entra.Governance +if($null -eq (Get-Module -Name Microsoft.Entra.Governance)){ + Import-Module Microsoft.Entra.Governance } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/test/Entra/Governance/Module.Tests.ps1 b/test/Entra/Governance/Module.Tests.ps1 index fb06a10706..de5efa70a0 100644 --- a/test/Entra/Governance/Module.Tests.ps1 +++ b/test/Entra/Governance/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra.Governance Module" { +Describe "Microsoft.Entra.Governance Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance + if((Get-Module -Name Microsoft.Entra.Governance) -eq $null){ + Import-Module Microsoft.Entra.Governance } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Governance + $PSModuleInfo = Get-Module Microsoft.Entra.Governance $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Governance + $PSModuleInfo = Get-Module Microsoft.Entra.Governance $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Governance - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Governance.psm1" + $PSModuleInfo = Get-Module Microsoft.Entra.Governance + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Entra.Governance.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Governance + $PSModuleInfo = Get-Module Microsoft.Entra.Governance $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra.Governance -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Entra.Governance -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/test/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 b/test/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 index ca62493b3c..c582d31d96 100644 --- a/test/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 +++ b/test/Entra/Governance/New-EntraDirectoryRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance + if((Get-Module -Name Microsoft.Entra.Governance) -eq $null){ + Import-Module Microsoft.Entra.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { ) } - Mock -CommandName New-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName New-MgRoleManagementDirectoryRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Governance } Describe "New-EntraDirectoryRoleAssignment" { @@ -38,7 +38,7 @@ Context "Test for New-EntraDirectoryRoleAssignment" { $result.RoleDefinitionId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.DirectoryScopeId | Should -Be "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when PrincipalId is empty" { { New-EntraDirectoryRoleAssignment -PrincipalId -RoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectoryScopeId "/00aa00aa-bb11-cc22-dd33-44ee44ee44ee" } | Should -Throw "Missing an argument for parameter 'PrincipalId'*" @@ -66,7 +66,7 @@ Context "Test for New-EntraDirectoryRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleAssignment" - Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 b/test/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 index 7cd12e45aa..96e2e0bddf 100644 --- a/test/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 +++ b/test/Entra/Governance/New-EntraDirectoryRoleDefinition.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance + if((Get-Module -Name Microsoft.Entra.Governance) -eq $null){ + Import-Module Microsoft.Entra.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ BeforeAll { ) } - Mock -CommandName New-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName New-MgRoleManagementDirectoryRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Entra.Governance } Describe "New-EntraDirectoryRoleDefinition" { @@ -45,7 +45,7 @@ Describe "New-EntraDirectoryRoleDefinition" { $result.Version | Should -Be 2 - Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when RolePermissions is empty" { {New-EntraDirectoryRoleDefinition -RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 2} | Should -Throw "Missing an argument for parameter 'RolePermissions'*" @@ -105,7 +105,7 @@ Describe "New-EntraDirectoryRoleDefinition" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraDirectoryRoleDefinition" - Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 b/test/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 index 87f3ecd292..66a5b755e3 100644 --- a/test/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 +++ b/test/Entra/Governance/Remove-EntraDirectoryRoleAssignment.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance + if((Get-Module -Name Microsoft.Entra.Governance) -eq $null){ + Import-Module Microsoft.Entra.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {} -ModuleName Microsoft.Entra.Governance } Describe "Remove-EntraDirectoryRoleAssignment" { @@ -16,13 +16,13 @@ Describe "Remove-EntraDirectoryRoleAssignment" { $result = Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDirectoryRoleAssignment -Id "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when UnifiedRoleAssignmentId is empty" { { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleAssignmentId'*" @@ -31,7 +31,7 @@ Describe "Remove-EntraDirectoryRoleAssignment" { { Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleAssignmentId' because it is an empty string." } It "Should contain UnifiedRoleAssignmentId in parameters when passed Id to it" { - Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Governance $result = Remove-EntraDirectoryRoleAssignment -UnifiedRoleAssignmentId "Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Remove-EntraDirectoryRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleAssignment" - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleAssignment -ModuleName Microsoft.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 b/test/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 index 228d3ba693..556cdaf862 100644 --- a/test/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 +++ b/test/Entra/Governance/Remove-EntraDirectoryRoleDefinition.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance + if((Get-Module -Name Microsoft.Entra.Governance) -eq $null){ + Import-Module Microsoft.Entra.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Entra.Governance } Describe "Remove-EntraDirectoryRoleDefinition" { @@ -16,13 +16,13 @@ Describe "Remove-EntraDirectoryRoleDefinition" { $result = Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraDirectoryRoleDefinition -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when UnifiedRoleDefinitionId is empty" { { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" @@ -31,7 +31,7 @@ Describe "Remove-EntraDirectoryRoleDefinition" { { Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "" } | Should -Throw "Cannot bind argument to parameter 'UnifiedRoleDefinitionId' because it is an empty string*" } It "Should contain UnifiedRoleDefinitionId in parameters when passed Id to it" { - Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Entra.Governance $result = Remove-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Remove-EntraDirectoryRoleDefinition" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraDirectoryRoleDefinition" - Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 b/test/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 index e22a6dc8a8..5de325cbbb 100644 --- a/test/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 +++ b/test/Entra/Governance/Set-EntraDirectoryRoleDefinition.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Governance + if((Get-Module -Name Microsoft.Entra.Governance) -eq $null){ + Import-Module Microsoft.Entra.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {} -ModuleName Microsoft.Entra.Governance } Describe "Set-EntraDirectoryRoleDefinition" { @@ -18,7 +18,7 @@ Describe "Set-EntraDirectoryRoleDefinition" { $result = Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should execute successfully with Alias" { $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission @@ -26,7 +26,7 @@ Describe "Set-EntraDirectoryRoleDefinition" { $result = Set-EntraDirectoryRoleDefinition -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RolePermissions $RolePermissions -IsEnabled $false -DisplayName 'Mock-App' -ResourceScopes "/" -Description "Mock-App" -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" -Version 3 $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 } It "Should fail when UnifiedRoleDefinitionId is empty" { { Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId -DisplayName 'Mock-App' -TemplateId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } | Should -Throw "Missing an argument for parameter 'UnifiedRoleDefinitionId'*" @@ -68,7 +68,7 @@ Describe "Set-EntraDirectoryRoleDefinition" { {Set-EntraDirectoryRoleDefinition -UnifiedRoleDefinitionId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Version } | Should -Throw "Missing an argument for parameter 'Version'*" } It "Should contain UnifiedRoleDefinitionId in parameters when passed Id to it" { - Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Update-MgRoleManagementDirectoryRoleDefinition -MockWith {$args} -ModuleName Microsoft.Entra.Governance $RolePermissions = New-object Microsoft.Open.MSGraph.Model.RolePermission $RolePermissions.AllowedResourceActions = @("microsoft.directory/applications/basic/read") @@ -85,7 +85,7 @@ Describe "Set-EntraDirectoryRoleDefinition" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraDirectoryRoleDefinition" - Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Graph.Entra.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgRoleManagementDirectoryRoleDefinition -ModuleName Microsoft.Entra.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Governance/Valid.Tests.ps1 b/test/Entra/Governance/Valid.Tests.ps1 index cfd385b6f1..220bc37647 100644 --- a/test/Entra/Governance/Valid.Tests.ps1 +++ b/test/Entra/Governance/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Governance)){ - Import-Module Microsoft.Graph.Entra.Governance + if($null -eq (Get-Module -Name Microsoft.Entra.Governance)){ + Import-Module Microsoft.Entra.Governance } Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra.Governance + $module = Get-Module -Name Microsoft.Entra.Governance } Describe "Valid parameter Tests"{ @@ -27,16 +27,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Governance $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Governance -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Governance $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Governance -Times 1 } } catch { @@ -65,16 +65,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Governance $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Governance -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Governance + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Governance $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Governance -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Governance -Times 1 } } catch { diff --git a/test/Entra/Groups/Add-EntraGroupMember.Tests.ps1 b/test/Entra/Groups/Add-EntraGroupMember.Tests.ps1 index 9ad88c8664..a52dda0640 100644 --- a/test/Entra/Groups/Add-EntraGroupMember.Tests.ps1 +++ b/test/Entra/Groups/Add-EntraGroupMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgGroupMember -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName New-MgGroupMember -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Add-EntraGroupMember" { @@ -16,7 +16,7 @@ Describe "Add-EntraGroupMember" { $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Add-EntraGroupMember" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Add-EntraGroupMember" { } It "Should contain DirectoryObjectId in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName New-MgGroupMember -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Add-EntraGroupMember -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -58,7 +58,7 @@ Describe "Add-EntraGroupMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupMember" - Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroupMember -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 b/test/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 index 31d7ddd504..7e71b91534 100644 --- a/test/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 +++ b/test/Entra/Groups/Add-EntraGroupOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName New-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Add-EntraGroupOwner" { @@ -16,7 +16,7 @@ Describe "Add-EntraGroupOwner" { $result = Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Add-EntraGroupOwner" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName New-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName New-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -47,7 +47,7 @@ Describe "Add-EntraGroupOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupOwner" Add-EntraGroupOwner -GroupId "aaaaaaaa-1111-2222-3333-cccccccccccc" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraGroupOwner" - Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroupOwnerByRef -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 b/test/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 index 5370eb2848..33d6b91dce 100644 --- a/test/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 +++ b/test/Entra/Groups/Add-EntraLifecyclePolicyGroup.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Groups + if ((Get-Module -Name Microsoft.Entra.Groups) -eq $null) { + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -17,7 +17,7 @@ BeforeAll { ) } - Mock -CommandName Add-MgGroupToLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Add-MgGroupToLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Add-EntraLifecyclePolicyGroup" { @@ -27,14 +27,14 @@ Describe "Add-EntraLifecyclePolicyGroup" { $result | Should -Not -BeNullOrEmpty" $result.Value | should -Be "True" - Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should return created LifecyclePolicyGroup with alias" { $result = Add-EntraLifecyclePolicyGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff $result | Should -Not -BeNullOrEmpty" $result.Value | should -Be "True" - Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is invalid" { { Add-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "" -GroupId "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } | Should -Throw "Cannot bind argument to parameter 'GroupLifecyclePolicyId' because it is an empty string.*" @@ -55,7 +55,7 @@ Describe "Add-EntraLifecyclePolicyGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraLifecyclePolicyGroup" - Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Add-MgGroupToLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 b/test/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 index 0ddac6e107..aa86fc50c3 100644 --- a/test/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 +++ b/test/Entra/Groups/Get-EntraDeletedGroup.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgDirectoryDeletedItemAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgDirectoryDeletedItemAsGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Get-EntraDeletedGroup" { @@ -37,7 +37,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should return specific Deleted Group with alias" { $result = Get-EntraDeletedGroup -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -46,7 +46,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { { Get-EntraDeletedGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -58,7 +58,7 @@ Context "Test for Get-EntraDeletedGroup" { $result = Get-EntraDeletedGroup -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when All is invalid" { { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -70,7 +70,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Top is empty" { { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -85,7 +85,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when filter is empty" { { Get-EntraDeletedGroup -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -97,7 +97,7 @@ Context "Test for Get-EntraDeletedGroup" { $result.MailNickname | Should -Be "Demo-Mock-App" $result.DisplayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when searchstring is empty" { { Get-EntraDeletedGroup -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" @@ -107,7 +107,7 @@ Context "Test for Get-EntraDeletedGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Property is empty" { { Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -127,7 +127,7 @@ Context "Test for Get-EntraDeletedGroup" { $result = Get-EntraDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraDeletedGroup" - Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Get-EntraGroup.Tests.ps1 b/test/Entra/Groups/Get-EntraGroup.Tests.ps1 index e643ec070f..eb9a5f3ea4 100644 --- a/test/Entra/Groups/Get-EntraGroup.Tests.ps1 +++ b/test/Entra/Groups/Get-EntraGroup.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Get-EntraGroup" { @@ -32,7 +32,7 @@ Describe "Get-EntraGroup" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { { Get-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -53,7 +53,7 @@ Describe "Get-EntraGroup" { $result = Get-EntraGroup -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when All has an argument" { { Get-EntraGroup -All $true} | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -63,20 +63,20 @@ Describe "Get-EntraGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'demo' - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should return specific group by filter" { $result = Get-EntraGroup -Filter "DisplayName -eq 'demo'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'demo' - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should return top group" { $result = Get-EntraGroup -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Result should Contain ObjectId" { $result = Get-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -97,7 +97,7 @@ Describe "Get-EntraGroup" { $result = Get-EntraGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroup" - Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 b/test/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 index 1fbf2f27e8..7481d61ae9 100644 --- a/test/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Groups/Get-EntraGroupAppRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Get-EntraGroupAppRoleAssignment" { @@ -39,7 +39,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should return specific Group AppRole Assignment with alias" { $result = Get-EntraGroupAppRoleAssignment -objectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -50,7 +50,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when ObjectlId is empty" { { Get-EntraGroupAppRoleAssignment -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -67,7 +67,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when All is invalid" { { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -81,7 +81,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Top is empty" { { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -94,7 +94,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.PrincipalDisplayName | Should -Be 'Mock-Group' - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Property is empty" { { Get-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -116,7 +116,7 @@ Context "Test for Get-EntraGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupAppRoleAssignment" - Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 b/test/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 index 061882aaf7..3e280b8ec2 100644 --- a/test/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 +++ b/test/Entra/Groups/Get-EntraGroupLifecyclePolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Get-EntraGroupLifecyclePolicy" { @@ -32,7 +32,7 @@ Describe "Get-EntraGroupLifecyclePolicy" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraGroupLifecyclePolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" @@ -49,7 +49,7 @@ Describe "Get-EntraGroupLifecyclePolicy" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is empty" { @@ -71,7 +71,7 @@ Describe "Get-EntraGroupLifecyclePolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Property is empty" { @@ -86,7 +86,7 @@ Describe "Get-EntraGroupLifecyclePolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupLifecyclePolicy" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Get-EntraGroupMember.Tests.ps1 b/test/Entra/Groups/Get-EntraGroupMember.Tests.ps1 index c4ced384ca..30b72d4b56 100644 --- a/test/Entra/Groups/Get-EntraGroupMember.Tests.ps1 +++ b/test/Entra/Groups/Get-EntraGroupMember.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Groups + if ((Get-Module -Name Microsoft.Entra.Groups) -eq $null) { + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Get-EntraGroupMember" { @@ -31,7 +31,7 @@ Describe "Get-EntraGroupMember" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is invalid" { { Get-EntraGroupMember -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." @@ -52,7 +52,7 @@ Describe "Get-EntraGroupMember" { $result = Get-EntraGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when All has an argument" { @@ -63,7 +63,7 @@ Describe "Get-EntraGroupMember" { $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Property parameter should work" { @@ -71,7 +71,7 @@ Describe "Get-EntraGroupMember" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Property is empty" { @@ -86,7 +86,7 @@ Describe "Get-EntraGroupMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupMember" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 b/test/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 index f1b95bc9eb..48434a44dd 100644 --- a/test/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 +++ b/test/Entra/Groups/Get-EntraGroupOwner.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { ) } } - Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Entra.Groups } Describe "Get-EntraGroupOwner" { @@ -40,7 +40,7 @@ Describe "Get-EntraGroupOwner" { $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' $result.DeletedDateTime | should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Get a group owner by alias" { $result = Get-EntraGroupOwner -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -48,7 +48,7 @@ Describe "Get-EntraGroupOwner" { $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' $result.DeletedDateTime | should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -63,7 +63,7 @@ Describe "Get-EntraGroupOwner" { $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when All has an argument" { @@ -74,7 +74,7 @@ Describe "Get-EntraGroupOwner" { $result = Get-EntraGroupOwner -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 2 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when top is empty" { @@ -102,7 +102,7 @@ Describe "Get-EntraGroupOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Property is empty" { @@ -117,7 +117,7 @@ Describe "Get-EntraGroupOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraGroupOwner" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 b/test/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 index c64b13959b..a6b0766adc 100644 --- a/test/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 +++ b/test/Entra/Groups/Get-EntraLifecyclePolicyGroup.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgGroupLifecyclePolicyByGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgGroupLifecyclePolicyByGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Get-EntraLifecyclePolicyGroup" { @@ -33,7 +33,7 @@ Describe "Get-EntraLifecyclePolicyGroup" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Retrieve lifecycle policy object with alias" { @@ -45,7 +45,7 @@ Describe "Get-EntraLifecyclePolicyGroup" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -67,7 +67,7 @@ Describe "Get-EntraLifecyclePolicyGroup" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Property is empty" { @@ -82,7 +82,7 @@ Describe "Get-EntraLifecyclePolicyGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraLifecyclePolicyGroup" - Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroupLifecyclePolicyByGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 b/test/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 index 08c3b12e1c..d272e299d1 100644 --- a/test/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 +++ b/test/Entra/Groups/Get-EntraObjectSetting.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Groups + if ((Get-Module -Name Microsoft.Entra.Groups) -eq $null) { + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Get-EntraObjectSetting" { @@ -28,7 +28,7 @@ Describe "Get-EntraObjectSetting" { $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when TargetType is empty" { { Get-EntraObjectSetting -TargetType } | Should -Throw "Missing an argument for parameter 'TargetType'*" @@ -42,7 +42,7 @@ Describe "Get-EntraObjectSetting" { It "Should return all Object Setting" { $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when All has an argument" { { Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -51,7 +51,7 @@ Describe "Get-EntraObjectSetting" { $result = @(Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should contain ID in parameters when passed TargetType TargetObjectId to it" { $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -62,7 +62,7 @@ Describe "Get-EntraObjectSetting" { $result = Get-EntraObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraObjectSetting" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Invalid.Tests.ps1 b/test/Entra/Groups/Invalid.Tests.ps1 index d5a5c36d90..437a3a586e 100644 --- a/test/Entra/Groups/Invalid.Tests.ps1 +++ b/test/Entra/Groups/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Groups)){ - Import-Module Microsoft.Graph.Entra.Groups +if($null -eq (Get-Module -Name Microsoft.Entra.Groups)){ + Import-Module Microsoft.Entra.Groups } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/test/Entra/Groups/Module.Tests.ps1 b/test/Entra/Groups/Module.Tests.ps1 index e4ba28e9d8..b3e48403f2 100644 --- a/test/Entra/Groups/Module.Tests.ps1 +++ b/test/Entra/Groups/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra.Groups Module" { +Describe "Microsoft.Entra.Groups Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Groups + $PSModuleInfo = Get-Module Microsoft.Entra.Groups $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Groups + $PSModuleInfo = Get-Module Microsoft.Entra.Groups $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Groups - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Groups.psm1" + $PSModuleInfo = Get-Module Microsoft.Entra.Groups + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Entra.Groups.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Groups + $PSModuleInfo = Get-Module Microsoft.Entra.Groups $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra.Groups -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Entra.Groups -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/test/Entra/Groups/New-EntraGroup.Tests.ps1 b/test/Entra/Groups/New-EntraGroup.Tests.ps1 index aeffb5bdc9..ab9f60cc28 100644 --- a/test/Entra/Groups/New-EntraGroup.Tests.ps1 +++ b/test/Entra/Groups/New-EntraGroup.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Groups + if ((Get-Module -Name Microsoft.Entra.Groups) -eq $null) { + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName New-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName New-MgGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "New-EntraGroup" { @@ -36,7 +36,7 @@ Describe "New-EntraGroup" { $result.SecurityEnabled | should -Be "True" $result.Description | should -Be "test" - Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when parameters are invalid" { { New-EntraGroup -DisplayName "" -MailEnabled "" -SecurityEnabled "" -MailNickName "" -Description "" } | Should -Throw "Cannot bind argument to parameter*" @@ -53,7 +53,7 @@ Describe "New-EntraGroup" { $result = New-EntraGroup -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroup" - Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 b/test/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 index 021dbb5c95..01e0c44903 100644 --- a/test/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Groups/New-EntraGroupAppRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName New-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName New-MgGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "New-EntraGroupAppRoleAssignment" { @@ -39,7 +39,7 @@ Context "Test for New-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should return created Group AppRole Assignment with alias" { $result = New-EntraGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -50,7 +50,7 @@ Context "Test for New-EntraGroupAppRoleAssignment" { $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when ObjectlId is empty" { { New-EntraGroupAppRoleAssignment -GroupId -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -93,7 +93,7 @@ Context "Test for New-EntraGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroupAppRoleAssignment" - Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 b/test/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 index 03bd4e7b9f..0d4105900c 100644 --- a/test/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 +++ b/test/Entra/Groups/New-EntraGroupLifecyclePolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Groups + if ((Get-Module -Name Microsoft.Entra.Groups) -eq $null) { + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName New-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName New-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "New-EntraGroupLifecyclePolicy" { @@ -32,7 +32,7 @@ Describe "New-EntraGroupLifecyclePolicy" { $result.ManagedGroupTypes | should -Be "Selected" $result.AlternateNotificationEmails | should -Be "example@contoso.com" - Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupLifetimeInDays is invalid" { { New-EntraGroupLifecyclePolicy -GroupLifetimeInDays a -ManagedGroupTypes "Selected" -AlternateNotificationEmails "example@contoso.com" } | Should -Throw "Cannot process argument transformation on parameter 'GroupLifetimeInDays'.*" @@ -64,7 +64,7 @@ Describe "New-EntraGroupLifecyclePolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraGroupLifecyclePolicy" - Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Remove-EntraGroup.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroup.Tests.ps1 index 6428a80019..f9064dffc6 100644 --- a/test/Entra/Groups/Remove-EntraGroup.Tests.ps1 +++ b/test/Entra/Groups/Remove-EntraGroup.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroup -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Remove-EntraGroup" { @@ -17,13 +17,13 @@ Describe "Remove-EntraGroup" { $result = Remove-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraGroup -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is invalid" { { Remove-EntraGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Remove-EntraGroup" { { Remove-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroup -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Remove-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroup" - Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 index 2675331bdc..40db336ce0 100644 --- a/test/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Groups/Remove-EntraGroupAppRoleAssignment.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Remove-EntraGroupAppRoleAssignment" { @@ -16,13 +16,13 @@ Describe "Remove-EntraGroupAppRoleAssignment" { $result = Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should return empty object with Alias" { $result = Remove-EntraGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { { Remove-EntraGroupAppRoleAssignment -GroupId -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -37,7 +37,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { { Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleAssignmentId' because it is an empty string." } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Remove-EntraGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupAppRoleAssignment" - Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupAppRoleAssignment -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 index 43418b65d3..b7fdb69354 100644 --- a/test/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 +++ b/test/Entra/Groups/Remove-EntraGroupLifecyclePolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Remove-EntraGroupLifecyclePolicy" { @@ -16,13 +16,13 @@ Describe "Remove-EntraGroupLifecyclePolicy" { $result = Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraGroupLifecyclePolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is empty" { { Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId } | Should -Throw "Missing an argument for parameter 'GroupLifecyclePolicyId'*" @@ -33,7 +33,7 @@ Describe "Remove-EntraGroupLifecyclePolicy" { } It "Should contain GroupLifecyclePolicyId in parameters when passed GroupLifecyclePolicyId to it" { - Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupLifecyclePolicy -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Remove-EntraGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $params = Get-Parameters -data $result @@ -47,7 +47,7 @@ Describe "Remove-EntraGroupLifecyclePolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupLifecyclePolicy" - Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 index 511131eb27..0ec3c58073 100644 --- a/test/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 +++ b/test/Entra/Groups/Remove-EntraGroupMember.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroupMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupMemberByRef -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Remove-EntraGroupMember" { @@ -16,7 +16,7 @@ Describe "Remove-EntraGroupMember" { $result = Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Remove-EntraGroupMember" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgGroupMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupMemberByRef -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Remove-EntraGroupMember -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -MemberId "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraGroupMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupMember" - Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupMemberByRef -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 b/test/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 index e79061b99a..da390913d2 100644 --- a/test/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 +++ b/test/Entra/Groups/Remove-EntraGroupOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Remove-EntraGroupOwner" { @@ -16,7 +16,7 @@ Describe "Remove-EntraGroupOwner" { $result = Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Remove-EntraGroupOwner" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Remove-EntraGroupOwner -GroupId "11112222-bbbb-3333-cccc-4444dddd5555" -OwnerId "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraGroupOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraGroupOwner" - Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupOwnerByRef -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 b/test/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 index 72baf13dc4..f8e0cef30d 100644 --- a/test/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 +++ b/test/Entra/Groups/Remove-EntraLifecyclePolicyGroup.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -15,7 +15,7 @@ BeforeAll { } ) } - Mock -CommandName Remove-MgGroupFromLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Remove-MgGroupFromLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Remove-EntraLifecyclePolicyGroup" { @@ -24,14 +24,14 @@ Describe "Remove-EntraLifecyclePolicyGroup" { $result = Remove-EntraLifecyclePolicyGroup -GroupLifecyclePolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" $result.Value | Should -Be $true - Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should remove a group from a lifecycle policy with alias" { $result = Remove-EntraLifecyclePolicyGroup -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -GroupId "ccccdddd-2222-eeee-3333-ffff4444aaaa" $result.Value | Should -Be $true - Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is empty" { @@ -69,7 +69,7 @@ Describe "Remove-EntraLifecyclePolicyGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraLifecyclePolicyGroup" - Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgGroupFromLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 b/test/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 index b949aebfad..8fba530930 100644 --- a/test/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 +++ b/test/Entra/Groups/Reset-EntraLifeCycleGroup.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-MgRenewGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Invoke-MgRenewGroup -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Reset-EntraLifeCycleGroup" { @@ -16,7 +16,7 @@ Describe "Reset-EntraLifeCycleGroup" { $result = Reset-EntraLifeCycleGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when Id is empty" { @@ -28,7 +28,7 @@ Describe "Reset-EntraLifeCycleGroup" { } It "Should contain GroupId in parameters when passed Id to it" { - Mock -CommandName Invoke-MgRenewGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Invoke-MgRenewGroup -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Reset-EntraLifeCycleGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Reset-EntraLifeCycleGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Reset-EntraLifeCycleGroup" - Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-MgRenewGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 b/test/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 index 2d39ef4825..dc3ebd5c83 100644 --- a/test/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 +++ b/test/Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -15,7 +15,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgContactMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgContactMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Select-EntraGroupIdsContactIsMemberOf" { @@ -28,7 +28,7 @@ Describe "Select-EntraGroupIdsContactIsMemberOf" { $result | Should -Not -BeNullOrEmpty $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when ObjectId is missing" { @@ -63,7 +63,7 @@ Describe "Select-EntraGroupIdsContactIsMemberOf" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsContactIsMemberOf" - Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgContactMemberOfAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 b/test/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 index b154a818e3..7e47232655 100644 --- a/test/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 +++ b/test/Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,8 +29,8 @@ BeforeAll { } ) } - Mock -CommandName Get-MgGroupMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups - Mock -CommandName Get-MgGroup -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgGroupMemberOf -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups + Mock -CommandName Get-MgGroup -MockWith $scriptblock2 -ModuleName Microsoft.Entra.Groups } Describe "Select-EntraGroupIdsGroupIsMemberOf" { @@ -43,7 +43,7 @@ Describe "Select-EntraGroupIdsGroupIsMemberOf" { $result | Should -Not -BeNullOrEmpty $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when ObjectId is missing" { @@ -77,7 +77,7 @@ Describe "Select-EntraGroupIdsGroupIsMemberOf" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-EntraGroupIdsGroupIsMemberOf" - Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgGroupMemberOf -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 b/test/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 index cc296e5930..9b43b40d79 100644 --- a/test/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 +++ b/test/Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Groups + if ((Get-Module -Name Microsoft.Entra.Groups) -eq $null) { + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -16,7 +16,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgUserMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Get-MgUserMemberOfAsGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Select-EntraGroupIdsUserIsMemberOf" { @@ -29,7 +29,7 @@ Describe "Select-EntraGroupIdsUserIsMemberOf" { $result | Should -Not -BeNullOrEmpty $result | Should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when UserID is invalid " { @@ -50,7 +50,7 @@ Describe "Select-EntraGroupIdsUserIsMemberOf" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Select-entraGroupIdsUserIsMemberOf" - Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserMemberOfAsGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Set-EntraGroup.Tests.ps1 b/test/Entra/Groups/Set-EntraGroup.Tests.ps1 index 18b3a9246d..fe7d964057 100644 --- a/test/Entra/Groups/Set-EntraGroup.Tests.ps1 +++ b/test/Entra/Groups/Set-EntraGroup.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Groups + if((Get-Module -Name Microsoft.Entra.Groups) -eq $null){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Update-MgGroup -MockWith {} -ModuleName Microsoft.Entra.Groups } Describe "Set-EntraGroup" { @@ -17,13 +17,13 @@ Describe "Set-EntraGroup" { $result = Set-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraGroup -Id bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo" -MailEnabled $false -SecurityEnabled $true -MailNickName "demoNickname" -Description "test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should fail when GroupId is invalid" { { Set-EntraGroup -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Set-EntraGroup" { { Set-EntraGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Update-MgGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Update-MgGroup -MockWith {$args} -ModuleName Microsoft.Entra.Groups $result = Set-EntraGroup -GroupId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Set-EntraGroup" { Set-EntraGroup -Id bbbbbbbb-1111-2222-3333-cccccccccccc $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraGroup" - Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgGroup -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 b/test/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 index a6d2479b3d..73e65f92e0 100644 --- a/test/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 +++ b/test/Entra/Groups/Set-EntraGroupLifecyclePolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Groups + if ((Get-Module -Name Microsoft.Entra.Groups) -eq $null) { + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName Update-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Update-MgGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Groups } Describe "Set-EntraGroupLifecyclePolicy" { @@ -32,7 +32,7 @@ Describe "Set-EntraGroupLifecyclePolicy" { $result.ManagedGroupTypes | should -Be "All" $result.AlternateNotificationEmails | should -Be "admingroup@contoso.com" - Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraGroupLifecyclePolicy -Id "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" @@ -68,7 +68,7 @@ Describe "Set-EntraGroupLifecyclePolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraGroupLifecyclePolicy" - Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgGroupLifecyclePolicy -ModuleName Microsoft.Entra.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Groups/Valid.Tests.ps1 b/test/Entra/Groups/Valid.Tests.ps1 index 924359246d..09183dedca 100644 --- a/test/Entra/Groups/Valid.Tests.ps1 +++ b/test/Entra/Groups/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Groups)){ - Import-Module Microsoft.Graph.Entra.Groups + if($null -eq (Get-Module -Name Microsoft.Entra.Groups)){ + Import-Module Microsoft.Entra.Groups } Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra.Groups + $module = Get-Module -Name Microsoft.Entra.Groups } Describe "Valid parameter Tests"{ @@ -27,16 +27,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Groups $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Groups $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Groups -Times 1 } } catch { @@ -65,16 +65,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Groups $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Groups -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Groups + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Groups $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Groups -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Groups -Times 1 } } catch { diff --git a/test/Entra/New-EntraInvitation.Tests.ps1 b/test/Entra/New-EntraInvitation.Tests.ps1 index acea6a2caa..d7c0ac4c68 100644 --- a/test/Entra/New-EntraInvitation.Tests.ps1 +++ b/test/Entra/New-EntraInvitation.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ # BeforeAll { -# if((Get-Module -Name Microsoft.Graph.Entra) -eq $null){ -# Import-Module Microsoft.Graph.Entra +# if((Get-Module -Name Microsoft.Entra) -eq $null){ +# Import-Module Microsoft.Entra # } # Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -160,7 +160,7 @@ # } # ) # } -# Mock -CommandName New-MgInvitation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra +# Mock -CommandName New-MgInvitation -MockWith $scriptblock -ModuleName Microsoft.Entra # } # Describe "New-EntraInvitation" { @@ -179,7 +179,7 @@ # $result.SendInvitationMessage | Should -Be $true # $result.InvitedUserDisplayName | Should -BeNullOrEmpty -# Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Graph.Entra -Times 1 +# Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Entra -Times 1 # } # It "Should fail when parameters are empty" { @@ -208,7 +208,7 @@ # $result = New-EntraInvitation -InvitedUserEmailAddress SawyerM@contoso.com -SendInvitationMessage $True -InviteRedirectUrl "http://myapps.contoso.com" # $result | Should -Not -BeNullOrEmpty # $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraInvitation" -# Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { +# Should -Invoke -CommandName New-MgInvitation -ModuleName Microsoft.Entra -Times 1 -ParameterFilter { # $Headers.'User-Agent' | Should -Be $userAgentHeaderValue # $true # } diff --git a/test/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 b/test/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 index 8b98d25284..ee44ba6a5f 100644 --- a/test/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 +++ b/test/Entra/Reports/Get-EntraAuditDirectoryLog.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Reports) -eq $null) { - Import-Module Microsoft.Graph.Entra.Reports + if ((Get-Module -Name Microsoft.Entra.Reports) -eq $null) { + Import-Module Microsoft.Entra.Reports } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -37,7 +37,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Reports + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Reports } Describe "Get-EntraAuditDirectoryLog" { @@ -46,7 +46,7 @@ Describe "Get-EntraAuditDirectoryLog" { $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should fail when Id is empty" { { Get-EntraAuditDirectoryLog -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -63,7 +63,7 @@ Describe "Get-EntraAuditDirectoryLog" { It "Should return all Audit Directory Logs" { $result = Get-EntraAuditDirectoryLog -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should fail when All has an argument" { { Get-EntraAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -73,13 +73,13 @@ Describe "Get-EntraAuditDirectoryLog" { $result = Get-EntraAuditDirectoryLog -Filter "correlationId eq 'bbbbbbbb-1111-2222-3333-cccccccccrrr'" $result | Should -Not -BeNullOrEmpty $result.id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should return top Audit Directory Logs" { $result = @(Get-EntraAuditDirectoryLog -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should contain ID in parameters when passed Id to it" { $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -87,11 +87,11 @@ Describe "Get-EntraAuditDirectoryLog" { } It "Should contain 'User-Agent' header" { - Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Reports + Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Entra.Reports $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuditDirectoryLog" $result = Get-EntraAuditDirectoryLog -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 b/test/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 index 4efece827a..031f797823 100644 --- a/test/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 +++ b/test/Entra/Reports/Get-EntraAuditSignInLog.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Reports) -eq $null) { - Import-Module Microsoft.Graph.Entra.Reports + if ((Get-Module -Name Microsoft.Entra.Reports) -eq $null) { + Import-Module Microsoft.Entra.Reports } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -42,7 +42,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Reports + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Reports } Describe "Get-EntraAuditSignInLog" { @@ -51,13 +51,13 @@ Describe "Get-EntraAuditSignInLog" { $result = Get-EntraAuditSignInLog -SignInId "bbbbbbbb-1111-2222-3333-cccccccccc22" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc22' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should return specific Audit SignIn Logs with alias" { $result = Get-EntraAuditSignInLog -Id "bbbbbbbb-1111-2222-3333-cccccccccc22" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc22' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should fail when SignInId is empty" { { Get-EntraAuditSignInLog -SignInId } | Should -Throw "Missing an argument for parameter 'SignInId'*" @@ -74,7 +74,7 @@ Describe "Get-EntraAuditSignInLog" { It "Should return all Audit SignIn Logs" { $result = Get-EntraAuditSignInLog -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should fail when All has an argument" { { Get-EntraAuditSignInLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -83,24 +83,24 @@ Describe "Get-EntraAuditSignInLog" { $result = Get-EntraAuditSignInLog -Filter "correlationId eq 'bbbbbbbb-1111-2222-3333-cccccccccc11'" $result | Should -Not -BeNullOrEmpty $result.id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc22' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should return top Audit SignIn Logs" { $result = @(Get-EntraAuditSignInLog -Top 1) $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } It "Should contain ID in parameters when passed Id to it" { $result = Get-EntraAuditSignInLog -SignInId "bbbbbbbb-1111-2222-3333-cccccccccc22" $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc22" } It "Should contain 'User-Agent' header" { - Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Reports + Mock -CommandName Invoke-GraphRequest -MockWith {$args} -ModuleName Microsoft.Entra.Reports $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuditSignInLog" $result = Get-EntraAuditSignInLog -SignInId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Reports/Invalid.Tests.ps1 b/test/Entra/Reports/Invalid.Tests.ps1 index f0eafa64d0..bfac3c5f31 100644 --- a/test/Entra/Reports/Invalid.Tests.ps1 +++ b/test/Entra/Reports/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ - Import-Module Microsoft.Graph.Entra.Reports +if($null -eq (Get-Module -Name Microsoft.Entra.Reports)){ + Import-Module Microsoft.Entra.Reports } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/test/Entra/Reports/Module.Tests.ps1 b/test/Entra/Reports/Module.Tests.ps1 index 96084885f0..5d3dc15293 100644 --- a/test/Entra/Reports/Module.Tests.ps1 +++ b/test/Entra/Reports/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra.Reports Module" { +Describe "Microsoft.Entra.Reports Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Reports) -eq $null){ - Import-Module Microsoft.Graph.Entra.Reports + if((Get-Module -Name Microsoft.Entra.Reports) -eq $null){ + Import-Module Microsoft.Entra.Reports } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Reports + $PSModuleInfo = Get-Module Microsoft.Entra.Reports $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Reports + $PSModuleInfo = Get-Module Microsoft.Entra.Reports $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Reports - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Reports.psm1" + $PSModuleInfo = Get-Module Microsoft.Entra.Reports + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Entra.Reports.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Reports + $PSModuleInfo = Get-Module Microsoft.Entra.Reports $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra.Reports -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Entra.Reports -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/test/Entra/Reports/Valid.Tests.ps1 b/test/Entra/Reports/Valid.Tests.ps1 index efe88f1a52..c07e2e3cb5 100644 --- a/test/Entra/Reports/Valid.Tests.ps1 +++ b/test/Entra/Reports/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Reports)){ - Import-Module Microsoft.Graph.Entra.Reports + if($null -eq (Get-Module -Name Microsoft.Entra.Reports)){ + Import-Module Microsoft.Entra.Reports } Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra.Reports + $module = Get-Module -Name Microsoft.Entra.Reports } Describe "Valid parameter Tests"{ @@ -27,16 +27,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Reports + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Reports $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Reports + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Reports $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Reports -Times 1 } } catch { @@ -65,16 +65,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Reports + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Reports $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Reports -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Reports + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Reports $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Reports -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Reports -Times 1 } } catch { diff --git a/test/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 index 8c263652fe..1d7e02cc21 100644 --- a/test/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraAuthorizationPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -30,7 +30,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraAuthorizationPolicy" { @@ -48,14 +48,14 @@ Describe "Get-EntraAuthorizationPolicy" { $result.AllowedToUseSspr | should -Be $True $result.BlockMsolPowerShell | should -Be $True - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should return AuthorizationPolicy when passed Id" { $result = Get-EntraAuthorizationPolicy -Id 'authorizationPolicy' $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'authorizationPolicy' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is invalid" { {Get-EntraAuthorizationPolicy -Id ''} | Should -Throw 'Exception calling "Substring" with "2" argument*' @@ -68,7 +68,7 @@ Describe "Get-EntraAuthorizationPolicy" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'AuthorizationPolicy' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraAuthorizationPolicy -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -80,7 +80,7 @@ Describe "Get-EntraAuthorizationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAuthorizationPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 index 2df798c937..4da190a36c 100644 --- a/test/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraConditionalAccessPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -39,7 +39,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraConditionalAccessPolicy" { @@ -52,7 +52,7 @@ Describe "Get-EntraConditionalAccessPolicy" { $result.DisplayName | Should -Be "MFA policy" $result.State | Should -Be "enabled" - Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should retrieves a list of all conditional access policies in Microsoft Entra ID" { @@ -61,7 +61,7 @@ Describe "Get-EntraConditionalAccessPolicy" { $result.Id | Should -Contain "aaaaaaaa-1111-2222-3333-ccccccccccc" $result.ObjectId | Should -Contain "aaaaaaaa-1111-2222-3333-ccccccccccc" - Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Property parameter should work" { @@ -94,7 +94,7 @@ Describe "Get-EntraConditionalAccessPolicy" { $result = Get-EntraConditionalAccessPolicy -PolicyId "aaaaaaaa-1111-2222-3333-ccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraConditionalAccessPolicy" - Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 index 420ed9c003..8a31bc7d78 100644 --- a/test/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraFeatureRolloutPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraFeatureRolloutPolicy" { @@ -31,7 +31,7 @@ Describe "Get-EntraFeatureRolloutPolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is invalid" { { Get-EntraFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -50,20 +50,20 @@ Describe "Get-EntraFeatureRolloutPolicy" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Feature-Rollout-Policy' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should return specific FeatureRolloutPolicy by filter" { $result = Get-EntraFeatureRolloutPolicy -Filter "DisplayName -eq 'Feature-Rollout-Policy'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Feature-Rollout-Policy' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should return specific Property" { $result = Get-EntraFeatureRolloutPolicy -Property Id $result.Id | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should contain 'User-Agent' header" { @@ -74,7 +74,7 @@ Describe "Get-EntraFeatureRolloutPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraFeatureRolloutPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 b/test/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 index 5c839ba397..208a02c4a9 100644 --- a/test/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraIdentityProvider.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraIdentityProvider" { @@ -36,7 +36,7 @@ Context "Test for Get-EntraIdentityProvider" { $result.DisplayName | Should -Be "Mock-App" $result.identityProviderType | Should -Be "Google" - Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should return specific identity provider with alias" { $result = Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" @@ -45,7 +45,7 @@ Context "Test for Get-EntraIdentityProvider" { $result.DisplayName | Should -Be "Mock-App" $result.identityProviderType | Should -Be "Google" - Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Get-EntraIdentityProvider -IdentityProviderBaseId } | Should -Throw "Missing an argument for parameter 'IdentityProviderBaseId'*" @@ -70,7 +70,7 @@ Context "Test for Get-EntraIdentityProvider" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -82,7 +82,7 @@ Context "Test for Get-EntraIdentityProvider" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraIdentityProvider" - Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 b/test/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 index 0cb7353576..f4981a919a 100644 --- a/test/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraOAuth2PermissionGrant.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraOAuth2PermissionGrant" { @@ -35,7 +35,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $result.PrincipalId | Should -BeNullOrEmpty $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should return All Group AppRole Assignment" { $result = Get-EntraOAuth2PermissionGrant -All @@ -46,7 +46,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when All is invalid" { { Get-EntraOAuth2PermissionGrant -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -60,7 +60,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $result.ClientId | Should -Be "aaaaaaaa-bbbb-cccc-1111-222222222222" - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Top is empty" { { Get-EntraOAuth2PermissionGrant -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -77,7 +77,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $result | Should -Not -BeNullOrEmpty $result.ConsentType | Should -Be 'AllPrincipals' - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraOAuth2PermissionGrant -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -90,7 +90,7 @@ Context "Test for Get-EntraOAuth2PermissionGrant" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraOAuth2PermissionGrant" - Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgOAuth2PermissionGrant -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 b/test/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 index e8a95c2858..bda37ead0a 100644 --- a/test/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraPermissionGrantConditionSet.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,20 +20,20 @@ BeforeAll { ) } - Mock -CommandName Get-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns - Mock -CommandName Get-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraPermissionGrantConditionSet"{ It "Should not return empty object for condition set 'includes'"{ $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should not return empty object for condition set 'excludes'"{ $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { { Get-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType "" -Id ""} | Should -Throw "Cannot bind argument to parameter*" @@ -56,7 +56,7 @@ Describe "Get-EntraPermissionGrantConditionSet"{ $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { @@ -67,7 +67,7 @@ Describe "Get-EntraPermissionGrantConditionSet"{ $result = Get-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPermissionGrantConditionSet" - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 index 0a005309f7..d35f033cdb 100644 --- a/test/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraPermissionGrantPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraPermissionGrantPolicy" { @@ -31,7 +31,7 @@ Describe "Get-EntraPermissionGrantPolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "microsoft-all-application-permissions" - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Get-EntraPermissionGrantPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -53,7 +53,7 @@ Describe "Get-EntraPermissionGrantPolicy" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'All application' - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -66,7 +66,7 @@ Describe "Get-EntraPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPermissionGrantPolicy" - Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Get-EntraPolicy.Tests.ps1 b/test/Entra/SignIns/Get-EntraPolicy.Tests.ps1 index 2dd83a26f3..723f0752e2 100644 --- a/test/Entra/SignIns/Get-EntraPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -42,7 +42,7 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraPolicy" { Context "Test for Get-EntraPolicy" { @@ -52,20 +52,20 @@ Describe "Get-EntraPolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should return all Policies" { $result = Get-EntraPolicy -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should return all Policy" { $result = Get-EntraPolicy -Top 1 $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is invalid" { { Get-EntraPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -87,7 +87,7 @@ Describe "Get-EntraPolicy" { $result = Get-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 b/test/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 index 239e7c7ddb..040307900a 100644 --- a/test/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 +++ b/test/Entra/SignIns/Get-EntraTrustedCertificateAuthority.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -40,20 +40,20 @@ BeforeAll { } - Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Entra.SignIns - Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Get-EntraTrustedCertificateAuthority"{ It "Result should not be empty when no parameter passed" { $result = Get-EntraTrustedCertificateAuthority $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Result should not be empty when parameters are empty" { $result = Get-EntraTrustedCertificateAuthority -TrustedIssuer '' -TrustedIssuerSki '' $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Property parameter should work" { $result = Get-EntraTrustedCertificateAuthority -Property TrustedIssuerSki @@ -70,7 +70,7 @@ Describe "Get-EntraTrustedCertificateAuthority"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTrustedCertificateAuthority" Get-EntraTrustedCertificateAuthority $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraTrustedCertificateAuthority" - Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Invalid.Tests.ps1 b/test/Entra/SignIns/Invalid.Tests.ps1 index a3c5cd01a1..ea62cc52f6 100644 --- a/test/Entra/SignIns/Invalid.Tests.ps1 +++ b/test/Entra/SignIns/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ - Import-Module Microsoft.Graph.Entra.SignIns +if($null -eq (Get-Module -Name Microsoft.Entra.SignIns)){ + Import-Module Microsoft.Entra.SignIns } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/test/Entra/SignIns/Module.Tests.ps1 b/test/Entra/SignIns/Module.Tests.ps1 index 46b6aad654..9311c9f32d 100644 --- a/test/Entra/SignIns/Module.Tests.ps1 +++ b/test/Entra/SignIns/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra.SignIns Module" { +Describe "Microsoft.Entra.SignIns Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.SignIns + $PSModuleInfo = Get-Module Microsoft.Entra.SignIns $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.SignIns + $PSModuleInfo = Get-Module Microsoft.Entra.SignIns $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.SignIns - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.SignIns.psm1" + $PSModuleInfo = Get-Module Microsoft.Entra.SignIns + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Entra.SignIns.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.SignIns + $PSModuleInfo = Get-Module Microsoft.Entra.SignIns $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra.SignIns -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Entra.SignIns -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/test/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 index 8a3ad5b7dd..0473b2302a 100644 --- a/test/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraConditionalAccessPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -39,7 +39,7 @@ BeforeAll { } ) } - Mock -CommandName New-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName New-MgIdentityConditionalAccessPolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "New-EntraConditionalAccessPolicy" { @@ -62,7 +62,7 @@ Describe "New-EntraConditionalAccessPolicy" { $result.State | Should -Be "enabled" - Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when DisplayName parameter is empty" { @@ -110,7 +110,7 @@ Describe "New-EntraConditionalAccessPolicy" { $params = Get-Parameters -data $result.Parameters $params.Conditions.Users.IncludeUsers | Should -Be "all" - Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should contain BuiltInControls in parameters when passed GrantControls to it" { @@ -128,7 +128,7 @@ Describe "New-EntraConditionalAccessPolicy" { $params = Get-Parameters -data $result.Parameters $params.GrantControls.BuiltInControls | Should -Be "mfa" - Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should contain 'User-Agent' header" { @@ -145,7 +145,7 @@ Describe "New-EntraConditionalAccessPolicy" { $result = New-EntraConditionalAccessPolicy -DisplayName "MFA policy" -State "Enabled" -Conditions $conditions -GrantControls $controls -SessionControls $SessionControls $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraConditionalAccessPolicy" - Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 index e2f797bf06..15e2560e89 100644 --- a/test/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraFeatureRolloutPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -22,7 +22,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "New-EntraFeatureRolloutPolicy" { @@ -35,7 +35,7 @@ Describe "New-EntraFeatureRolloutPolicy" { $result.IsEnabled | should -Be "False" $result.Description | should -Be "FeatureRolloutPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Feature are invalid" { { New-EntraFeatureRolloutPolicy -Feature "" } | Should -Throw "Cannot bind argument to parameter 'Feature'*" @@ -63,7 +63,7 @@ Describe "New-EntraFeatureRolloutPolicy" { $result = New-EntraFeatureRolloutPolicy -Feature 'PasswordHashSync' -DisplayName 'FeatureRolloutPolicy1' -Description 'FeatureRolloutPolicy1' -IsEnabled $false $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraFeatureRolloutPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 b/test/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 index 55e2b4c5fe..b3ad06f2a2 100644 --- a/test/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraIdentityProvider.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName New-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName New-MgIdentityProvider -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "New-EntraIdentityProvider" { @@ -36,7 +36,7 @@ Context "Test for New-EntraIdentityProvider" { $result.DisplayName | Should -Be "Mock-App" $result.identityProviderType | Should -Be "Google" - Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Type is empty" { { New-EntraIdentityProvider -Type -Name "Mock-App" -ClientId "Google123" -ClientSecret "GoogleId" } | Should -Throw "Missing an argument for parameter 'Type'*" @@ -87,7 +87,7 @@ Context "Test for New-EntraIdentityProvider" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraIdentityProvider" - Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 index 2e4a996a08..a60b7ce957 100644 --- a/test/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraNamedLocationPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ BeforeAll { ) } - Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "New-EntraNamedLocationPolicy" { @@ -42,7 +42,7 @@ Context "Test for New-EntraNamedLocationPolicy" { $result.DisplayName | Should -Be "Mock-App policies" $result.CreatedDateTime | Should -Be "14-05-2024 09:38:07" - Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when OdataType is empty" { { New-EntraNamedLocationPolicy -OdataType } | Should -Throw "Missing an argument for parameter 'OdataType'*" @@ -81,7 +81,7 @@ Context "Test for New-EntraNamedLocationPolicy" { $result.ObjectId | should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" } It "Should contain @odata.type in bodyparameters when passed OdataId to it" { - Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName New-MgIdentityConditionalAccessNamedLocation -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns $ipRanges = New-Object -TypeName Microsoft.Open.MSGraph.Model.IpRange $ipRanges.cidrAddress = "6.5.4.1/30" @@ -98,7 +98,7 @@ Context "Test for New-EntraNamedLocationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraNamedLocationPolicy" - Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 b/test/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 index 4af685ac8e..f0eb31b54d 100644 --- a/test/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraOauth2PermissionGrant.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,7 +20,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "New-EntraOauth2PermissionGrant" { @@ -33,7 +33,7 @@ Describe "New-EntraOauth2PermissionGrant" { $result.ResourceId | should -Be "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" $result.Scope | should -Be "DelegatedPermissionGrant.ReadWrite.All" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when ClientId is invalid" { { New-EntraOauth2PermissionGrant -ClientId "" } | Should -Throw "Cannot bind argument to parameter 'ClientId'*" @@ -58,7 +58,7 @@ Describe "New-EntraOauth2PermissionGrant" { $result = New-EntraOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraOauth2PermissionGrant" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 b/test/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 index 1a89cfb3f5..3e50ebacbc 100644 --- a/test/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraPermissionGrantConditionSet.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -22,20 +22,20 @@ BeforeAll { ) } - Mock -CommandName New-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName New-MgPolicyPermissionGrantPolicyInclude -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns - Mock -CommandName New-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName New-MgPolicyPermissionGrantPolicyExclude -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "New-EntraPermissionGrantConditionSet"{ It "Should not return empty object for condition set 'includes'"{ $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -PermissionType "delegated" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should not return empty object for condition set 'excludes'"{ $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "excludes" -PermissionType "delegated" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { { New-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType ""} | Should -Throw "Cannot bind argument to parameter*" @@ -53,7 +53,7 @@ Describe "New-EntraPermissionGrantConditionSet"{ $result = New-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -PermissionType "delegated" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPermissionGrantConditionSet" - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 index a240228529..32ec3c7812 100644 --- a/test/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraPermissionGrantPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName New-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName New-MgPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "New-EntraPermissionGrantPolicy" { @@ -35,7 +35,7 @@ Describe "New-EntraPermissionGrantPolicy" { $result.Includes | should -Be @("22cc22cc-dd33-ee44-ff55-66aa66aa66aa") $result.DeletedDateTime | should -Be "2/8/2024 6:39:16 AM" - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { New-EntraPermissionGrantPolicy -Id -DisplayName "MyNewPermissionGrantPolicy" -Description "My new permission grant policy" } | Should -Throw "Missing an argument for parameter 'Id'.*" @@ -58,7 +58,7 @@ Describe "New-EntraPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPermissionGrantPolicy" - Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/New-EntraPolicy.Tests.ps1 b/test/Entra/SignIns/New-EntraPolicy.Tests.ps1 index 4500f49c6d..24f58874e4 100644 --- a/test/Entra/SignIns/New-EntraPolicy.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,7 +20,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "New-EntraPolicy" { @@ -35,7 +35,7 @@ Describe "New-EntraPolicy" { $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" $result.IsOrganizationDefault | should -Be "False" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when parameters are invalid" { { New-EntraPolicy -Definition "" -DisplayName "" -Type "" -IsOrganizationDefault "" -AlternativeIdentifier "" } | Should -Throw "Cannot bind argument to parameter*" @@ -52,7 +52,7 @@ Describe "New-EntraPolicy" { $result = New-EntraPolicy -Definition @('{ "definition": [ "{\"ClaimsMappingPolicy\":{\"Version\":1,\"IncludeBasicClaimSet\":\"true\",\"ClaimsSchema\":[{\"Source\":\"user\",\"ID\":\"userPrincipalName\",\"SAMLClaimType\":\"http://xyz.xmlsoap.org/ws/2005/05/pqr/claims/name\",\"JwtClaimType\":\"xyz\"},{\"Source\":\"user\",\"ID\":\"displayName\",\"SAMLClaimType\":\"http://xxx.yyy.com/identity/claims/displayname\",\"JwtClaimType\":\"ppp\"}]}}" ], "displayName": "test Claims Issuance Policy", "isOrganizationDefault": false }') -DisplayName "Claimstest" -Type "claimsMappingPolicies" -IsOrganizationDefault $false -AlternativeIdentifier "1f587daa-d6fc-433f-88ee-ccccccccc111" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 b/test/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 index c1a1fdcf3f..d5b78a5908 100644 --- a/test/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 +++ b/test/Entra/SignIns/New-EntraTrustedCertificateAuthority.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -17,7 +17,7 @@ BeforeAll { } - Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Entra.SignIns $scriptblock = { return @( @@ -37,7 +37,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns $scriptblock2 = { return @( @@ -55,7 +55,7 @@ BeforeAll { } - Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Entra.SignIns } @@ -78,7 +78,7 @@ Describe "New-EntraTrustedCertificateAuthority" { $result.certificateAuthorities.AuthorityType| Should -Be "RootAuthority" $result.certificateAuthorities.TrustedIssuerSki| Should -Be "66aa66aa-bb77-cc88-dd99-00ee00ee00ee" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { @@ -105,7 +105,7 @@ Describe "New-EntraTrustedCertificateAuthority" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraTrustedCertificateAuthority" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 b/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 index 83fa25c7ea..3a64dd6bf0 100644 --- a/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicy.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Remove-EntraFeatureRolloutPolicy" { @@ -17,7 +17,7 @@ Describe "Remove-EntraFeatureRolloutPolicy" { $result = Remove-EntraFeatureRolloutPolicy -Id bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is invalid" { { Remove-EntraFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -30,7 +30,7 @@ Describe "Remove-EntraFeatureRolloutPolicy" { $result = Remove-EntraFeatureRolloutPolicy -Id bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 index 1af8be8fe6..91de0da971 100644 --- a/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Remove-EntraFeatureRolloutPolicyDirectoryObject" { @@ -17,7 +17,7 @@ Describe "Remove-EntraFeatureRolloutPolicyDirectoryObject" { $result = Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is invalid" { { Remove-EntraFeatureRolloutPolicyDirectoryObject -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -36,7 +36,7 @@ Describe "Remove-EntraFeatureRolloutPolicyDirectoryObject" { $result = Remove-EntraFeatureRolloutPolicyDirectoryObject -Id bbbbbbbb-1111-2222-3333-cccccccccccc -ObjectId bbbbbbbb-1111-2222-3333-aaaaaaaaaaaa $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraFeatureRolloutPolicyDirectoryObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 b/test/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 index 54e1a2fff3..20d7070857 100644 --- a/test/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraIdentityProvider.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgIdentityProvider -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgIdentityProvider -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Remove-EntraIdentityProvider" { @@ -17,13 +17,13 @@ Context "Test for Remove-EntraIdentityProvider" { $result = Remove-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraIdentityProvider -Id "Google-OAUTH" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Remove-EntraIdentityProvider -IdentityProviderBaseId } | Should -Throw "Missing an argument for parameter 'IdentityProviderBaseId'*" @@ -32,7 +32,7 @@ Context "Test for Remove-EntraIdentityProvider" { { Remove-EntraIdentityProvider -IdentityProviderBaseId "" } | Should -Throw "Cannot bind argument to parameter 'IdentityProviderBaseId' because it is an empty string." } It "Should contain IdentityProviderBaseId in parameters when passed IdentityProviderBaseId to it" { - Mock -CommandName Remove-MgIdentityProvider -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgIdentityProvider -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Remove-EntraIdentityProvider -IdentityProviderBaseId "Google-OAUTH" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Context "Test for Remove-EntraIdentityProvider" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraIdentityProvider" - Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgIdentityProvider -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 b/test/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 index 6bcfd858b1..51ed76a2a1 100644 --- a/test/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraNamedLocationPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Remove-EntraNamedLocationPolicy" { @@ -16,7 +16,7 @@ Describe "Remove-EntraNamedLocationPolicy" { $result = Remove-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when PolicyId is empty" { { Remove-EntraNamedLocationPolicy -PolicyId } | Should -Throw "Missing an argument for parameter 'PolicyId'*" @@ -25,7 +25,7 @@ Describe "Remove-EntraNamedLocationPolicy" { { Remove-EntraNamedLocationPolicy -PolicyId "" } | Should -Throw "Cannot bind argument to parameter 'PolicyId' because it is an empty string*" } It "Should contain NamedLocationId in parameters when passed PolicyId to it" { - Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Remove-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" $params = Get-Parameters -data $result @@ -38,7 +38,7 @@ Describe "Remove-EntraNamedLocationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraNamedLocationPolicy" - Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 b/test/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 index 8589509a8a..ee0b53dbb4 100644 --- a/test/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraOAuth2PermissionGrant.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Remove-EntraGroupAppRoleAssignment" { @@ -16,7 +16,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { $result = Remove-EntraOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when ObjectId is empty" { { Remove-EntraOAuth2PermissionGrant -ObjectId } | Should -Throw "Missing an argument for parameter 'ObjectId'*" @@ -25,7 +25,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { { Remove-EntraOAuth2PermissionGrant -ObjectId "" } | Should -Throw "Cannot bind argument to parameter 'ObjectId' because it is an empty string." } It "Should contain OAuth2PermissionGrantId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgOAuth2PermissionGrant -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Remove-EntraOAuth2PermissionGrant -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -38,7 +38,7 @@ Describe "Remove-EntraGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraOAuth2PermissionGrant" - Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgOAuth2PermissionGrant -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 b/test/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 index 0294c62d38..2772b6ee8c 100644 --- a/test/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraPermissionGrantConditionSet.Tests.ps1 @@ -2,14 +2,14 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Entra.SignIns - Mock -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Remove-EntraPermissionGrantConditionSet"{ @@ -18,14 +18,14 @@ Describe "Remove-EntraPermissionGrantConditionSet"{ $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should delete a permission grant condition set 'excludes' from a policy"{ $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "excludes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when PolicyId parameter are invalid when ConditionSetType is includes" { @@ -69,7 +69,7 @@ Describe "Remove-EntraPermissionGrantConditionSet"{ } It "Should contain PermissionGrantPolicyId in parameters when passed PolicyId to it" { - Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" $params = Get-Parameters -data $result @@ -77,7 +77,7 @@ Describe "Remove-EntraPermissionGrantConditionSet"{ } It "Should contain PermissionGrantConditionSetId in parameters when passed Id to it" { - Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Remove-EntraPermissionGrantConditionSet -PolicyId "test1" -ConditionSetType "includes" -Id "ccccdddd-2222-eeee-3333-ffff4444aaaa" $params = Get-Parameters -data $result @@ -91,7 +91,7 @@ Describe "Remove-EntraPermissionGrantConditionSet"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPermissionGrantConditionSet" - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 b/test/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 index e1d72017a6..10ebaf3fdd 100644 --- a/test/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraPermissionGrantPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Remove-EntraPermissionGrantPolicy" { @@ -16,7 +16,7 @@ Describe "Remove-EntraPermissionGrantPolicy" { $result = Remove-EntraPermissionGrantPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Remove-EntraPermissionGrantPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -25,7 +25,7 @@ Describe "Remove-EntraPermissionGrantPolicy" { { Remove-EntraPermissionGrantPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string*" } It "Should contain PermissionGrantPolicyId in parameters when passed Id to it" { - Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Remove-MgPolicyPermissionGrantPolicy -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Remove-EntraPermissionGrantPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $params = Get-Parameters -data $result @@ -38,7 +38,7 @@ Describe "Remove-EntraPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPermissionGrantPolicy" - Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 b/test/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 index 6d54d86cb8..8f0cbf56d4 100644 --- a/test/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -18,13 +18,13 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Entra.SignIns } Describe "Test for Remove-EntraPolicy" { It "Should return empty object" { $result = Remove-EntraPolicy -Id bbbbbbbb-1111-1111-1111-cccccccccccc #$result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 2 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 2 } It "Should fail when -Id is empty" { { Remove-EntraPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" @@ -40,7 +40,7 @@ Describe "Test for Remove-EntraPolicy" { $result = Remove-EntraPolicy -Id bbbbbbbb-1111-1111-1111-cccccccccccc $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 b/test/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 index 25a1aff3ce..06938e5077 100644 --- a/test/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 +++ b/test/Entra/SignIns/Remove-EntraTrustedCertificateAuthority.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -17,7 +17,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns $scriptblock2 = { @@ -37,7 +37,7 @@ BeforeAll { } - Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Entra.SignIns $scriptblock3 = { return @( @@ -48,7 +48,7 @@ BeforeAll { } - Mock -CommandName Get-MgContext -MockWith $scriptblock3 -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgContext -MockWith $scriptblock3 -ModuleName Microsoft.Entra.SignIns } @@ -59,7 +59,7 @@ Describe "Remove-EntraTrustedCertificateAuthority" { $result = Remove-EntraTrustedCertificateAuthority -CertificateAuthorityInformation $cer[0] $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when CertificateAuthorityInformation is empty" { @@ -77,7 +77,7 @@ Describe "Remove-EntraTrustedCertificateAuthority" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraTrustedCertificateAuthority" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 index 08a27b7564..f0558def5d 100644 --- a/test/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Set-EntraAuthorizationPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgPolicyAuthorizationPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgPolicyAuthorizationPolicy -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Set-EntraAuthorizationPolicy" { @@ -20,7 +20,7 @@ Describe "Set-EntraAuthorizationPolicy" { $result = Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions $false -AllowedToUseSSPR $false -AllowEmailVerifiedUsersToJoinOrganization $true -BlockMsolPowerShell $true -DefaultUserRolePermissions $DefaultUserRolePermissions -Description "test" -DisplayName "Authorization Policies" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when AllowedToSignUpEmailBasedSubscriptions is invalid" { { Set-EntraAuthorizationPolicy -AllowedToSignUpEmailBasedSubscriptions 'a' } | Should -Throw "Cannot process argument transformation on parameter 'AllowedToSignUpEmailBasedSubscriptions'.*" @@ -69,7 +69,7 @@ Describe "Set-EntraAuthorizationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraAuthorizationPolicy" - Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgPolicyAuthorizationPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 index fe0d799668..113943f274 100644 --- a/test/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Set-EntraConditionalAccessPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Set-EntraConditionalAccessPolicy" { @@ -19,7 +19,7 @@ Describe "Set-EntraConditionalAccessPolicy" { $result = Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" -State enabled -Conditions $Condition -GrantControls $Controls -SessionControls $SessionControls $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when PolicyId parameter is empty" { @@ -63,7 +63,7 @@ Describe "Set-EntraConditionalAccessPolicy" { } It "Should contain ConditionalAccessPolicyId in parameters when passed PolicyId to it" { - Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Set-EntraConditionalAccessPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -DisplayName "test" $params = Get-Parameters -data $result @@ -71,7 +71,7 @@ Describe "Set-EntraConditionalAccessPolicy" { } It "Should contain ClientAppTypes in parameters when passed Conditions to it" { - Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet $Condition.clientAppTypes = @("mobileAppsAndDesktopClients","browser") @@ -81,11 +81,11 @@ Describe "Set-EntraConditionalAccessPolicy" { $params = Get-Parameters -data $result $params.Conditions.ClientAppTypes | Should -Be @("mobileAppsAndDesktopClients","browser") - Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should contain BuiltInControls in parameters when passed GrantControls to it" { - Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgIdentityConditionalAccessPolicy -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $Condition = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet $Controls = New-Object -TypeName Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls @@ -96,7 +96,7 @@ Describe "Set-EntraConditionalAccessPolicy" { $params = Get-Parameters -data $result $params.GrantControls.BuiltInControls | Should -Be @("mfa") - Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should contain 'User-Agent' header" { @@ -111,7 +111,7 @@ Describe "Set-EntraConditionalAccessPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraConditionalAccessPolicy" - Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgIdentityConditionalAccessPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 index 333b815034..a4ddff1f03 100644 --- a/test/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Set-EntraFeatureRolloutPolicy.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Set-EntraFeatureRolloutPolicy" { @@ -17,7 +17,7 @@ Describe "Set-EntraFeatureRolloutPolicy" { $result = Set-EntraFeatureRolloutPolicy -Id 7e22e9df-abf0-4ee2-bcf8-fd7b62eff2f5 -DisplayName 'Feature-Rollout-Policytest' -Description 'Feature-Rollout-test' -IsEnabled $false $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id are invalid" { { Set-EntraFeatureRolloutPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id'*" @@ -47,7 +47,7 @@ Describe "Set-EntraFeatureRolloutPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraFeatureRolloutPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 index 0ad72de98c..795b6393e6 100644 --- a/test/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Set-EntraNamedLocationPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Set-EntraNamedLocationPolicy" { @@ -20,7 +20,7 @@ Describe "Set-EntraNamedLocationPolicy" { $result = Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" -IpRanges @($ipRanges1,$ipRanges2) -IsTrusted $true -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -CountriesAndRegions @("US","ID","CA") -IncludeUnknownCountriesAndRegions $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when PolicyId is empty" { { Set-EntraNamedLocationPolicy -PolicyId -OdataType "#microsoft.graph.ipNamedLocation" } | Should -Throw "Missing an argument for parameter 'PolicyId'*" @@ -59,7 +59,7 @@ Describe "Set-EntraNamedLocationPolicy" { { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -IncludeUnknownCountriesAndRegions xyz } | Should -Throw "Cannot process argument transformation on parameter 'IncludeUnknownCountriesAndRegions'*" } It "Should contain NamedLocationId in parameters when passed PolicyId to it" { - Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgIdentityConditionalAccessNamedLocation -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" $params = Get-Parameters -data $result @@ -68,7 +68,7 @@ Describe "Set-EntraNamedLocationPolicy" { It "Should contain @odata.type in bodyparameters when passed OdataId to it" { Set-EntraNamedLocationPolicy -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" -OdataType "#microsoft.graph.ipNamedLocation" -DisplayName "Mock-App policies" - Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { Write-Host $BodyParameter.AdditionalProperties."@odata.type" | ConvertTo-Json $BodyParameter.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.ipNamedLocation" $true @@ -81,7 +81,7 @@ Describe "Set-EntraNamedLocationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraNamedLocationPolicy" - Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgIdentityConditionalAccessNamedLocation -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 b/test/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 index 4ca67e573b..2b10bfb249 100644 --- a/test/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 +++ b/test/Entra/SignIns/Set-EntraPermissionGrantConditionSet.Tests.ps1 @@ -1,23 +1,23 @@ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {} -ModuleName Microsoft.Entra.SignIns - Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Set-EntraPermissionGrantConditionSet"{ It "Should return empty object for condition set 'includes'"{ $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should return empty object for condition set 'excludes'"{ $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { { Set-EntraPermissionGrantConditionSet -PolicyId "" -ConditionSetType "" -Id ""} | Should -Throw "Cannot bind argument to parameter*" @@ -26,27 +26,27 @@ Describe "Set-EntraPermissionGrantConditionSet"{ { Set-EntraPermissionGrantConditionSet -PolicyId -ConditionSetType -Id } | Should -Throw "Missing an argument for parameter*" } It "Should contain parameters for condition set 'includes'" { - Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgPolicyPermissionGrantPolicyInclude -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "includes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $params = Get-Parameters -data $result $params.PermissionGrantPolicyId | Should -Be "policy1" $params.PermissionGrantConditionSetId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyInclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should contain parameters for condition set 'excludes'" { - Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {$args} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgPolicyPermissionGrantPolicyExclude -MockWith {$args} -ModuleName Microsoft.Entra.SignIns $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $params = Get-Parameters -data $result $params.PermissionGrantPolicyId | Should -Be "policy1" $params.PermissionGrantConditionSetId | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantConditionSet" $result = Set-EntraPermissionGrantConditionSet -PolicyId "policy1" -ConditionSetType "excludes" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PermissionClassification "Low" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantConditionSet" - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicyExclude -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 index 3b497e1cdc..e0cf99e003 100644 --- a/test/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Set-EntraPermissionGrantPolicy.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.SignIns + if ((Get-Module -Name Microsoft.Entra.SignIns) -eq $null) { + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Update-MgPolicyPermissionGrantPolicy -MockWith {} -ModuleName Microsoft.Entra.SignIns } Describe "Set-EntraPermissionGrantPolicy" { @@ -16,7 +16,7 @@ Describe "Set-EntraPermissionGrantPolicy" { $result = Set-EntraPermissionGrantPolicy -Id "permission_grant_policy" -Description "test" -DisplayName "Test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when Id is empty" { { Set-EntraPermissionGrantPolicy -Id -Description "test" -DisplayName "Test" } | Should -Throw "Missing an argument for parameter 'Id'.*" @@ -37,7 +37,7 @@ Describe "Set-EntraPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraPermissionGrantPolicy" - Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Set-EntraPolicy.Tests.ps1 b/test/Entra/SignIns/Set-EntraPolicy.Tests.ps1 index ee6aee13b7..cff8e1d017 100644 --- a/test/Entra/SignIns/Set-EntraPolicy.Tests.ps1 +++ b/test/Entra/SignIns/Set-EntraPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -15,7 +15,7 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns } Describe "Test for Set-EntraPolicy" { @@ -23,7 +23,7 @@ Describe "Test for Set-EntraPolicy" { It "Should return empty object" { $result = Set-EntraPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when id is empty" { @@ -50,7 +50,7 @@ Describe "Test for Set-EntraPolicy" { Set-EntraPolicy -Id "Engineering_Project" -type "HomeRealmDiscoveryPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 b/test/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 index 0d47c7a867..60ede51576 100644 --- a/test/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 +++ b/test/Entra/SignIns/Set-EntraTrustedCertificateAuthority.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.SignIns + if((Get-Module -Name Microsoft.Entra.SignIns) -eq $null){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -17,7 +17,7 @@ BeforeAll { } - Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgContext -MockWith $tenantObj -ModuleName Microsoft.Entra.SignIns $scriptblock = { return @( @@ -37,7 +37,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.SignIns $scriptblock2 = { return @( @@ -55,7 +55,7 @@ BeforeAll { } - Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Get-MgOrganizationCertificateBasedAuthConfiguration -MockWith $scriptblock2 -ModuleName Microsoft.Entra.SignIns } @@ -75,7 +75,7 @@ Describe "Set-EntraTrustedCertificateAuthority" { $result.certificateAuthorities.AuthorityType| Should -Be "RootAuthority" $result.certificateAuthorities.TrustedIssuerSki| Should -Be "E48DBC5D4AF447E9D9D4A5440D4096C70AF5352A" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } It "Should fail when parameters are empty" { @@ -96,7 +96,7 @@ Describe "Set-EntraTrustedCertificateAuthority" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraTrustedCertificateAuthority" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/SignIns/Valid.Tests.ps1 b/test/Entra/SignIns/Valid.Tests.ps1 index 8feeeeb40b..9b556c1fab 100644 --- a/test/Entra/SignIns/Valid.Tests.ps1 +++ b/test/Entra/SignIns/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.SignIns)){ - Import-Module Microsoft.Graph.Entra.SignIns + if($null -eq (Get-Module -Name Microsoft.Entra.SignIns)){ + Import-Module Microsoft.Entra.SignIns } Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra.SignIns + $module = Get-Module -Name Microsoft.Entra.SignIns } Describe "Valid parameter Tests"{ @@ -27,16 +27,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.SignIns $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.SignIns $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.SignIns -Times 1 } } catch { @@ -65,16 +65,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.SignIns $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.SignIns -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.SignIns + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.SignIns $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.SignIns -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.SignIns -Times 1 } } catch { diff --git a/test/Entra/Users/Get-EntraUser.Tests.ps1 b/test/Entra/Users/Get-EntraUser.Tests.ps1 index 25930ba106..ebecbf8659 100644 --- a/test/Entra/Users/Get-EntraUser.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUser.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -48,7 +48,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUser" { @@ -59,7 +59,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should execute successfully with Alias" { @@ -68,7 +68,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should contain 'User-Agent' header" { @@ -79,7 +79,7 @@ Describe "Get-EntraUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUser" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -96,7 +96,7 @@ Describe "Get-EntraUser" { It "Should return all contact" { $result = Get-EntraUser -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -107,7 +107,7 @@ Describe "Get-EntraUser" { $result = Get-EntraUser -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -123,7 +123,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific user by search string" { @@ -131,7 +131,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } @@ -148,7 +148,7 @@ Describe "Get-EntraUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/test/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 b/test/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 index 93c37783e6..5efb3ede3f 100644 --- a/test/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserAppRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { } - Mock -CommandName Get-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserAppRoleAssignment" { @@ -45,7 +45,7 @@ Describe "Get-EntraUserAppRoleAssignment" { $result.ResourceDisplayName | Should -Be "M365 License Manager" $result.ResourceId | Should -Be "bbbbbbbb-cccc-dddd-2222-333333333333" - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when ObjectId is empty string value" { @@ -60,7 +60,7 @@ Describe "Get-EntraUserAppRoleAssignment" { It "Should return all contact" { $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -71,7 +71,7 @@ Describe "Get-EntraUserAppRoleAssignment" { $result = Get-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -96,7 +96,7 @@ Describe "Get-EntraUserAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserAppRoleAssignment" - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -108,7 +108,7 @@ Describe "Get-EntraUserAppRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.PrincipalDisplayName | Should -Be "demo" - Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/test/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 b/test/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 index a057e402f8..8ac5a81dd0 100644 --- a/test/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserCreatedObject.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -49,7 +49,7 @@ BeforeAll { } - Mock -CommandName Get-MgUserCreatedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUserCreatedObject -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserCreatedObject" { @@ -59,7 +59,7 @@ Describe "Get-EntraUserCreatedObject" { $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific User with alias" { @@ -67,7 +67,7 @@ Describe "Get-EntraUserCreatedObject" { $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -81,7 +81,7 @@ Describe "Get-EntraUserCreatedObject" { It "Should return all contact" { $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -92,7 +92,7 @@ Describe "Get-EntraUserCreatedObject" { $result = Get-EntraUserCreatedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -117,7 +117,7 @@ Describe "Get-EntraUserCreatedObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserCreatedObject" - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -128,7 +128,7 @@ Describe "Get-EntraUserCreatedObject" { $result | Should -Not -BeNullOrEmpty $result.appDisplayName | Should -Be "Microsoft Graph Command Line Tools" - Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserCreatedObject -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/test/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 b/test/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 index 463aaec321..3ab3292900 100644 --- a/test/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserDirectReport.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } @@ -41,14 +41,14 @@ Describe "Get-EntraUserDirectReport" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific user direct report with alias" { $result = Get-EntraUserDirectReport -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty" { { Get-EntraUserDirectReport -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" @@ -61,7 +61,7 @@ Describe "Get-EntraUserDirectReport" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All is invalid" { { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -71,7 +71,7 @@ Describe "Get-EntraUserDirectReport" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when top is empty" { { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -84,7 +84,7 @@ Describe "Get-EntraUserDirectReport" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Mock-User" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -115,7 +115,7 @@ Describe "Get-EntraUserDirectReport" { $result = Get-EntraUserDirectReport -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserDirectReport" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Get-EntraUserExtension.Tests.ps1 b/test/Entra/Users/Get-EntraUserExtension.Tests.ps1 index 764b74477e..ec4c17dae0 100644 --- a/test/Entra/Users/Get-EntraUserExtension.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserExtension.Tests.ps1 @@ -1,6 +1,6 @@ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -14,7 +14,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserExtension" { Context "Test for Get-EntraUserExtension" { @@ -22,14 +22,14 @@ Describe "Get-EntraUserExtension" { $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should contain 'User-Agent' header" { @@ -37,7 +37,7 @@ Describe "Get-EntraUserExtension" { $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -55,7 +55,7 @@ Describe "Get-EntraUserExtension" { $result = Get-EntraUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/test/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 b/test/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 index e6baca9901..e0c9481cef 100644 --- a/test/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserLicenseDetail.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -22,7 +22,7 @@ BeforeAll { } - Mock -CommandName Get-MgUserLicenseDetail -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUserLicenseDetail -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserLicenseDetail" { @@ -36,7 +36,7 @@ Describe "Get-EntraUserLicenseDetail" { $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] - should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Users -Times 1 + should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific User with alias" { $result = Get-EntraUserLicenseDetail -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -47,7 +47,7 @@ Describe "Get-EntraUserLicenseDetail" { $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] - should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Users -Times 1 + should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -68,7 +68,7 @@ Describe "Get-EntraUserLicenseDetail" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'X8Wu1RItQkSNL8zKldQ5DmAn38eBLPdOtXhbU5K1cd8' - Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -81,7 +81,7 @@ Describe "Get-EntraUserLicenseDetail" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserLicenseDetail" - Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserLicenseDetail -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Get-EntraUserManager.Tests.ps1 b/test/Entra/Users/Get-EntraUserManager.Tests.ps1 index 6419064700..db66707353 100644 --- a/test/Entra/Users/Get-EntraUserManager.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserManager.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -32,7 +32,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserManager" { @@ -52,7 +52,7 @@ Describe "Get-EntraUserManager" { $result.identities[0].issuer | Should -Be "contoso.com" $result.identities[0].issuerAssignedId | Should -Be "test@contoso.com" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific User wit alias" { @@ -70,7 +70,7 @@ Describe "Get-EntraUserManager" { $result.identities[0].issuer | Should -Be "contoso.com" $result.identities[0].issuerAssignedId | Should -Be "test@contoso.com" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -95,7 +95,7 @@ Describe "Get-EntraUserManager" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserManager" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -106,7 +106,7 @@ Describe "Get-EntraUserManager" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/test/Entra/Users/Get-EntraUserMembership.Tests.ps1 b/test/Entra/Users/Get-EntraUserMembership.Tests.ps1 index d0dea5239e..b335f89709 100644 --- a/test/Entra/Users/Get-EntraUserMembership.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserMembership.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgUserMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUserMemberOf -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserMembership" { @@ -30,14 +30,14 @@ Describe "Get-EntraUserMembership" { $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific user membership with alias" { $result = Get-EntraUserMembership -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty" { @@ -52,7 +52,7 @@ Describe "Get-EntraUserMembership" { $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -63,7 +63,7 @@ Describe "Get-EntraUserMembership" { $result = Get-EntraUserMembership -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 5 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -90,7 +90,7 @@ Describe "Get-EntraUserMembership" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { @@ -105,7 +105,7 @@ Describe "Get-EntraUserMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserMembership" - Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserMemberOf -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 b/test/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 index 1d879ef92b..0ba340eacb 100644 --- a/test/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserOAuth2PermissionGrant.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgUserOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUserOAuth2PermissionGrant -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserOAuth2PermissionGrant" { @@ -32,7 +32,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result.PrincipalId | should -Contain 'aaaaaaaa-bbbb-cccc-1111-222222222222' $result.Id | Should -Contain 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific UserOAuth2PermissionGrant with alias" { @@ -41,7 +41,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result.PrincipalId | should -Contain 'aaaaaaaa-bbbb-cccc-1111-222222222222' $result.Id | Should -Contain 'Aa1Bb2Cc3.-Dd4Ee5Ff6Gg7Hh8Ii9_~Jj0Kk1Ll2' - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty" { @@ -56,7 +56,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -67,7 +67,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result = Get-EntraUserOAuth2PermissionGrant -UserId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -95,7 +95,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $result | Should -Not -BeNullOrEmpty $result.ConsentType | Should -Be "Principal" - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { @@ -110,7 +110,7 @@ Describe "Get-EntraUserOAuth2PermissionGrant" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOAuth2PermissionGrant" - Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserOAuth2PermissionGrant -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 b/test/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 index d1e8150bd6..8b0bd96449 100644 --- a/test/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserOwnedDevice.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -42,7 +42,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgUserOwnedDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUserOwnedDevice -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserOwnedDevice" { @@ -54,7 +54,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Should get devices owned by a user with alias" { @@ -64,7 +64,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Property parameter should work" { @@ -85,7 +85,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Contain "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -99,7 +99,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-3333-4444-5555-bbbbbbbbbbbb" $result.AdditionalProperties.displayName | Should -Be "Sawyer Miller" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Top is empty" { @@ -121,7 +121,7 @@ Context "Test for Get-EntraUserOwnedDevice" { $result = Get-EntraUserOwnedDevice -UserId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOwnedDevice" - Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserOwnedDevice -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 b/test/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 index a9c806ffe2..34fba69210 100644 --- a/test/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserOwnedObject.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserOwnedObject" { @@ -42,7 +42,7 @@ Describe "Get-EntraUserOwnedObject" { $result.DisplayName | Should -Be "ToGraph_443DEM" - should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific User with alias" { $result = Get-EntraUserOwnedObject -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -56,7 +56,7 @@ Describe "Get-EntraUserOwnedObject" { $result.DisplayName | Should -Be "ToGraph_443DEM" - should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { { Get-EntraUserOwnedObject -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -70,7 +70,7 @@ Describe "Get-EntraUserOwnedObject" { $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when top is empty" { @@ -84,7 +84,7 @@ Describe "Get-EntraUserOwnedObject" { It "Should return all contact" { $result = Get-EntraUserOwnedObject -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All has an argument" { @@ -105,7 +105,7 @@ Describe "Get-EntraUserOwnedObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserOwnedObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -116,7 +116,7 @@ Describe "Get-EntraUserOwnedObject" { $result | Should -Not -BeNullOrEmpty $result.displayName | Should -Be "ToGraph_443DEM" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/test/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 b/test/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 index 21b3855d67..490659d36a 100644 --- a/test/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 +++ b/test/Entra/Users/Get-EntraUserRegisteredDevice.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgUserRegisteredDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUserRegisteredDevice -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Get-EntraUserRegisteredDevice" { @@ -41,7 +41,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific user registered device with alias" { $result = Get-EntraUserRegisteredDevice -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -50,7 +50,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when ObjectlId is empty" { { Get-EntraUserRegisteredDevice -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" @@ -65,7 +65,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when All is invalid" { { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -77,7 +77,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Top is empty" { { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -90,7 +90,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result | Should -Not -BeNullOrEmpty $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -105,7 +105,7 @@ Context "Test for Get-EntraUserRegisteredDevice" { $result = Get-EntraUserRegisteredDevice -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraUserRegisteredDevice" - Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgUserRegisteredDevice -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Invalid.Tests.ps1 b/test/Entra/Users/Invalid.Tests.ps1 index 86b4e6e2a0..0fd0ae696b 100644 --- a/test/Entra/Users/Invalid.Tests.ps1 +++ b/test/Entra/Users/Invalid.Tests.ps1 @@ -1,17 +1,17 @@ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Users)){ - Import-Module Microsoft.Graph.Entra.Users +if($null -eq (Get-Module -Name Microsoft.Entra.Users)){ + Import-Module Microsoft.Entra.Users } Describe "Invalid Tests"{ It "Should fail when parameters are invalid"{ - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users $module.ExportedCommands.Keys | ForEach-Object{ $command = Get-Command $_ { Invoke-Command $command -demo "" } | Should -Throw "A parameter cannot be found that matches parameter name 'demo'." } } It "Should fail with 'TenantId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'TenantId'){ @@ -21,7 +21,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Id' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Id'){ @@ -31,7 +31,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'ObjectId' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'ObjectId'){ @@ -41,7 +41,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'All' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'All'){ @@ -56,7 +56,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Top' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Top'){ @@ -66,7 +66,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'Filter' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'Filter'){ @@ -76,7 +76,7 @@ Describe "Invalid Tests"{ } } It "Should fail with 'SearchString' parameter" { - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users $module.ExportedCommands.Keys | ForEach-Object { $command = Get-Command $_ if ($command.ParameterSets.Parameters.Name -contains 'SearchString'){ diff --git a/test/Entra/Users/Module.Tests.ps1 b/test/Entra/Users/Module.Tests.ps1 index fdfd4009f8..f489e7aa1f 100644 --- a/test/Entra/Users/Module.Tests.ps1 +++ b/test/Entra/Users/Module.Tests.ps1 @@ -2,39 +2,39 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -Describe "Microsoft.Graph.Entra.Users Module" { +Describe "Microsoft.Entra.Users Module" { Context "On module import" { BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } } It "Should have exported commands" { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Users + $PSModuleInfo = Get-Module Microsoft.Entra.Users $PSModuleInfo | Should -Not -BeNullOrEmpty $PSModuleInfo.ExportedFunctions.Count | Should -Not -Be 0 } It 'Should be compatible with PS core and desktop' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Users + $PSModuleInfo = Get-Module Microsoft.Entra.Users $PSModuleInfo.CompatiblePSEditions | Should -BeIn @("Core", "Desktop") } It 'Should point to script module' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Users - $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Graph.Entra.Users.psm1" + $PSModuleInfo = Get-Module Microsoft.Entra.Users + $PSModuleInfo.RootModule | Should -BeLikeExactly "*Microsoft.Entra.Users.psm1" } It 'Should lock GUID' { - $PSModuleInfo = Get-Module Microsoft.Graph.Entra.Users + $PSModuleInfo = Get-Module Microsoft.Entra.Users $PSModuleInfo.Guid | Should -Be "742dccd1-bf4b-46a0-a3f2-14e0bb508233" } It "Module import should not write to error and information streams" { $ps = [powershell]::Create() - $ps.AddScript("Import-Module Microsoft.Graph.Entra.Users -ErrorAction SilentlyContinue").Invoke() + $ps.AddScript("Import-Module Microsoft.Entra.Users -ErrorAction SilentlyContinue").Invoke() "Checking Information stream" | Out-Host $ps.Streams.Information.Count | Should -Be 0 "Checking Error stream" | Out-Host diff --git a/test/Entra/Users/New-EntraUser.Tests.ps1 b/test/Entra/Users/New-EntraUser.Tests.ps1 index 73965333b1..ca51989aa0 100644 --- a/test/Entra/Users/New-EntraUser.Tests.ps1 +++ b/test/Entra/Users/New-EntraUser.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -50,7 +50,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "New-EntraUser" { @@ -115,7 +115,7 @@ Describe "New-EntraUser" { $result.ImmutableId | Should -Be "1234567890" $result.Country | Should -Be "USA" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when parameters are empty" { @@ -131,7 +131,7 @@ Describe "New-EntraUser" { $result = New-EntraUser -DisplayName "demo002" -PasswordProfile $PasswordProfile -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraUser" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 b/test/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 index 11d35f157d..aa65d255de 100644 --- a/test/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Users/New-EntraUserAppRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -30,7 +30,7 @@ BeforeAll { ) } - Mock -CommandName New-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName New-MgUserAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "New-EntraUserAppRoleAssignment" { @@ -66,7 +66,7 @@ Describe "New-EntraUserAppRoleAssignment" { $result.ResourceDisplayName | Should -Be $expectedResult.ResourceDisplayName $result.ResourceId | Should -Be $expectedResult.ResourceId - Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when parameters are empty" { @@ -78,7 +78,7 @@ Describe "New-EntraUserAppRoleAssignment" { } It "Should contain UserId in parameters" { - Mock -CommandName New-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName New-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Users $result = New-EntraUserAppRoleAssignment -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -PrincipalId 'aaaaaaaa-bbbb-cccc-1111-222222222222' -ResourceId 'bbbbbbbb-cccc-dddd-2222-333333333333' -Id '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' $params = Get-Parameters -data $result @@ -94,7 +94,7 @@ Describe "New-EntraUserAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraUserAppRoleAssignment" - Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Remove-EntraUser.Tests.ps1 b/test/Entra/Users/Remove-EntraUser.Tests.ps1 index 2cf62af69e..6846fd0a12 100644 --- a/test/Entra/Users/Remove-EntraUser.Tests.ps1 +++ b/test/Entra/Users/Remove-EntraUser.Tests.ps1 @@ -3,13 +3,13 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Remove-MgUser -MockWith {} -ModuleName Microsoft.Entra.Users } Describe "Remove-EntraUser" { @@ -17,12 +17,12 @@ Describe "Remove-EntraUser" { It "Should return empty object" { $result = Remove-EntraUser -UserId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Entra.Users -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraUser -ObjectId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string" { { Remove-EntraUser -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -31,7 +31,7 @@ Describe "Remove-EntraUser" { { Remove-EntraUser -UserId } | Should -Throw "Missing an argument for parameter*" } It "Should contain Id in parameters when passed UserId to it" { - Mock -CommandName Remove-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Remove-MgUser -MockWith { $args } -ModuleName Microsoft.Entra.Users $result = Remove-EntraUser -UserId "aaaaaaaa-2222-3333-4444-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Remove-EntraUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUser" - Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgUser -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 b/test/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 index d69e00ee75..5bea5a93e8 100644 --- a/test/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Users/Remove-EntraUserAppRoleAssignment.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {} -ModuleName Microsoft.Entra.Users } Describe "Remove-EntraUserAppRoleAssignment" { @@ -16,7 +16,7 @@ Describe "Remove-EntraUserAppRoleAssignment" { $result = Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when ObjectId is invalid" { @@ -36,7 +36,7 @@ Describe "Remove-EntraUserAppRoleAssignment" { } It "Should contain UserId in parameters" { - Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Remove-MgUserAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Users $result = Remove-EntraUserAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "33dd33dd-ee44-ff55-aa66-77bb77bb77bb" $params = Get-Parameters -data $result @@ -50,7 +50,7 @@ Describe "Remove-EntraUserAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUserAppRoleAssignment" - Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgUserAppRoleAssignment -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Remove-EntraUserManager.Tests.ps1 b/test/Entra/Users/Remove-EntraUserManager.Tests.ps1 index 390af4bcd0..b2f01b6125 100644 --- a/test/Entra/Users/Remove-EntraUserManager.Tests.ps1 +++ b/test/Entra/Users/Remove-EntraUserManager.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Remove-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Entra.Users } Describe "Remove-EntraUserManager" { @@ -16,12 +16,12 @@ Describe "Remove-EntraUserManager" { It "Should return empty object" { $result = Remove-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraUserManager -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string" { { Remove-EntraUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -30,7 +30,7 @@ Describe "Remove-EntraUserManager" { { Remove-EntraUserManager -UserId } | Should -Throw "Missing an argument for parameter*" } It "Should contain UserId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Remove-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Entra.Users $result = Remove-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraUserManager" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraUserManager" - Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgUserManagerByRef -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Set-EntraUser.Tests.ps1 b/test/Entra/Users/Set-EntraUser.Tests.ps1 index 7c6245d4d4..e5c3159519 100644 --- a/test/Entra/Users/Set-EntraUser.Tests.ps1 +++ b/test/Entra/Users/Set-EntraUser.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Entra.Users } Describe "Set-EntraUser" { @@ -17,7 +17,7 @@ Describe "Set-EntraUser" { $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "demo002" -UserPrincipalName "demo001@M365x99297270.OnMicrosoft.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" -PostalCode "10001" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty" { @@ -29,7 +29,7 @@ Describe "Set-EntraUser" { } It "Should contain userId in parameters when passed UserId to it" { - Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Entra.Users $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -Mobile "1234567890" $params = Get-Parameters -data $result $params.userId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -38,7 +38,7 @@ Describe "Set-EntraUser" { } It "Should contain MobilePhone in parameters when passed Mobile to it" { - Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Entra.Users $result = Set-EntraUser -UserId bbbbbbbb-1111-2222-3333-cccccccccccc -Mobile "1234567890" $params = Get-Parameters -data $result $params.MobilePhone | Should -Be "1234567890" @@ -51,7 +51,7 @@ Describe "Set-EntraUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUser" - Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -70,7 +70,7 @@ Describe "Set-EntraUser" { } } It "Should contain ExternalUserState, OnPremisesImmutableId, ExternalUserStateChangeDateTime, BusinessPhones" { - Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Update-MgUser -MockWith { $args } -ModuleName Microsoft.Entra.Users # format like "yyyy-MM-dd HH:mm:ss" $userStateChangedOn = [System.DateTime]::Parse("2015-12-08 15:15:19") diff --git a/test/Entra/Users/Set-EntraUserLicense.Tests.ps1 b/test/Entra/Users/Set-EntraUserLicense.Tests.ps1 index 7d92630d82..04ed6d4d1b 100644 --- a/test/Entra/Users/Set-EntraUserLicense.Tests.ps1 +++ b/test/Entra/Users/Set-EntraUserLicense.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Users } Describe "Set-EntraUserLicense" { @@ -56,7 +56,7 @@ Describe "Set-EntraUserLicense" { $result.businessPhones | Should -Be @("8976546787") $result.surname | Should -Be "KTETSs" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -95,7 +95,7 @@ Describe "Set-EntraUserLicense" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserLicense" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Set-EntraUserManager.Tests.ps1 b/test/Entra/Users/Set-EntraUserManager.Tests.ps1 index 5bd5a7b7a0..d211b3a77e 100644 --- a/test/Entra/Users/Set-EntraUserManager.Tests.ps1 +++ b/test/Entra/Users/Set-EntraUserManager.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Set-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Set-MgUserManagerByRef -MockWith {} -ModuleName Microsoft.Entra.Users } Describe "Set-EntraUserManager" { @@ -16,14 +16,14 @@ Describe "Set-EntraUserManager" { $result = Set-EntraUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific User with alias" { $result = Set-EntraUserManager -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -39,7 +39,7 @@ Describe "Set-EntraUserManager" { } It "Should contain UserId in parameters when passed UserId to it" { - Mock -CommandName Set-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Set-MgUserManagerByRef -MockWith { $args } -ModuleName Microsoft.Entra.Users $result = Set-EntraUserManager -UserId "00001111-aaaa-2222-bbbb-3333cccc4444" -RefObjectId "00001111-aaaa-2222-bbbb-3333cccc4444" $params = Get-Parameters -data $result @@ -53,7 +53,7 @@ Describe "Set-EntraUserManager" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserManager" - Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Set-MgUserManagerByRef -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Set-EntraUserPassword.Tests.ps1 b/test/Entra/Users/Set-EntraUserPassword.Tests.ps1 index c52dbb7607..c0d216ac8f 100644 --- a/test/Entra/Users/Set-EntraUserPassword.Tests.ps1 +++ b/test/Entra/Users/Set-EntraUserPassword.Tests.ps1 @@ -6,12 +6,12 @@ param() BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Update-MgUser -MockWith {} -ModuleName Microsoft.Entra.Users } Describe "Set-EntraUserPassword" { @@ -23,7 +23,7 @@ Describe "Set-EntraUserPassword" { $result = Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty" { $userUPN="mock106@M365x99297270.OnMicrosoft.com" @@ -74,7 +74,7 @@ Describe "Set-EntraUserPassword" { { Set-EntraUserPassword -UserId $userUPN -Password $secPassword -EnforceChangePasswordPolicy xyz } | Should -Throw "Cannot process argument transformation on parameter 'EnforceChangePasswordPolicy'*" } It "Should contain ForceChangePasswordNextSignIn in parameters when passed ForceChangePasswordNextLogin to it" { - Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Entra.Users $userUPN="mock106@M365x99297270.OnMicrosoft.com" $newPassword="New@12345" @@ -84,7 +84,7 @@ Describe "Set-EntraUserPassword" { $params.PasswordProfile.ForceChangePasswordNextSignIn | Should -Be $true } It "Should contain ForceChangePasswordNextSignInWithMfa in parameters when passed EnforceChangePasswordPolicy to it" { - Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Update-MgUser -MockWith {$args} -ModuleName Microsoft.Entra.Users $userUPN="mock106@M365x99297270.OnMicrosoft.com" $newPassword="New@12345" @@ -101,7 +101,7 @@ Describe "Set-EntraUserPassword" { $result = Set-EntraUserPassword -UserId $userUPN -Password $secPassword -ForceChangePasswordNextLogin $true -EnforceChangePasswordPolicy $true $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserPassword" - Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgUser -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 b/test/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 index 0c69ce7dd8..db2832612e 100644 --- a/test/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 +++ b/test/Entra/Users/Set-EntraUserThumbnailPhoto.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Users + if ((Get-Module -Name Microsoft.Entra.Users) -eq $null) { + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Set-MgUserPhotoContent -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Set-MgUserPhotoContent -MockWith {} -ModuleName Microsoft.Entra.Users } Describe "Set-EntraUserThumbnailPhoto" { @@ -16,14 +16,14 @@ Describe "Set-EntraUserThumbnailPhoto" { $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Entra.Users -Times 1 } It "Should return specific User with alias" { $result = Set-EntraUserThumbnailPhoto -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserId is empty string value" { @@ -39,7 +39,7 @@ Describe "Set-EntraUserThumbnailPhoto" { } It "Should contain UserId in parameters when passed ObjectId to it" { - Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Entra.Users $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' $params = Get-Parameters -data $result @@ -47,7 +47,7 @@ Describe "Set-EntraUserThumbnailPhoto" { } It "Should contain InFile in parameters" { - Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Set-MgUserPhotoContent -MockWith { $args } -ModuleName Microsoft.Entra.Users $result = Set-EntraUserThumbnailPhoto -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -FilePath 'D:\UserThumbnailPhoto.jpg' $params = Get-Parameters -data $result @@ -61,7 +61,7 @@ Describe "Set-EntraUserThumbnailPhoto" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraUserThumbnailPhoto" - Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Set-MgUserPhotoContent -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 b/test/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 index 711ec74034..488c8ccb0f 100644 --- a/test/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 +++ b/test/Entra/Users/Update-EntraSignedInUserPassword.Tests.ps1 @@ -6,12 +6,12 @@ param() BeforeAll{ - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Users $CurrentPassword = ConvertTo-SecureString 'test@123' -AsPlainText -Force $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force @@ -21,7 +21,7 @@ Describe "Tests for Update-EntraSignedInUserPassword"{ It "should return empty object"{ $result = Update-EntraSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when CurrentPassword is null" { { Update-EntraSignedInUserPassword -CurrentPassword } | Should -Throw "Missing an argument for parameter 'CurrentPassword'*" @@ -43,7 +43,7 @@ Describe "Tests for Update-EntraSignedInUserPassword"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraSignedInUserPassword" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 b/test/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 index 20e8a811bf..2cd6aa2a65 100644 --- a/test/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 +++ b/test/Entra/Users/Update-EntraUserFromFederated.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Users + if((Get-Module -Name Microsoft.Entra.Users) -eq $null){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblockForAuthenticationMethod = { @@ -21,9 +21,9 @@ BeforeAll { ) } - Mock -CommandName Get-MgUserAuthenticationMethod -MockWith $scriptblockForAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Users - Mock -CommandName Get-MgUser -MockWith $scriptblockForMgUser -ModuleName Microsoft.Graph.Entra.Users - Mock -CommandName Reset-MgUserAuthenticationMethodPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Get-MgUserAuthenticationMethod -MockWith $scriptblockForAuthenticationMethod -ModuleName Microsoft.Entra.Users + Mock -CommandName Get-MgUser -MockWith $scriptblockForMgUser -ModuleName Microsoft.Entra.Users + Mock -CommandName Reset-MgUserAuthenticationMethodPassword -MockWith {} -ModuleName Microsoft.Entra.Users } Describe "Update-EntraUserFromFederated" { @@ -31,7 +31,7 @@ BeforeAll { It "Should sets identity synchronization features for a tenant." { $result = Update-EntraUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword "Pass1234" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Reset-MgUserAuthenticationMethodPassword -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Reset-MgUserAuthenticationMethodPassword -ModuleName Microsoft.Entra.Users -Times 1 } It "Should fail when UserPrincipalName is empty" { {Update-EntraUserFromFederated -UserPrincipalName } | Should -Throw "Missing an argument for parameter 'UserPrincipalName'. Specify a parameter*" @@ -50,7 +50,7 @@ BeforeAll { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraUserFromFederated" - Should -Invoke -CommandName Reset-MgUserAuthenticationMethodPassword -ModuleName Microsoft.Graph.Entra.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Reset-MgUserAuthenticationMethodPassword -ModuleName Microsoft.Entra.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Users/Valid.Tests.ps1 b/test/Entra/Users/Valid.Tests.ps1 index f396e57626..56cdbe01cb 100644 --- a/test/Entra/Users/Valid.Tests.ps1 +++ b/test/Entra/Users/Valid.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll{ - if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Users)){ - Import-Module Microsoft.Graph.Entra.Users + if($null -eq (Get-Module -Name Microsoft.Entra.Users)){ + Import-Module Microsoft.Entra.Users } Import-Module (Join-Path $psscriptroot "..\EntraCmdletsMap.ps1") -Force - $module = Get-Module -Name Microsoft.Graph.Entra.Users + $module = Get-Module -Name Microsoft.Entra.Users } Describe "Valid parameter Tests"{ @@ -27,16 +27,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -Id 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Users $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Users $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Users -Times 1 } } catch { @@ -65,16 +65,16 @@ Describe "Valid parameter Tests"{ Write-Host "$command" $commandScriptBlock = [scriptblock]::Create("$commandName -ObjectId 056b2531-005e-4f3e-be78-01a71ea30a04") if($filter.IsApi){ - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Users $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Users -Times 1 } else { - Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Graph.Entra.Users + Mock -CommandName $filter.TargetName -MockWith {} -ModuleName Microsoft.Entra.Users $result = Invoke-Command -ScriptBlock $commandScriptBlock $result | Should -BeNullOrEmpty - Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Graph.Entra.Users -Times 1 + Should -Invoke -CommandName $filter.TargetName -ModuleName Microsoft.Entra.Users -Times 1 } } catch { diff --git a/test/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 b/test/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 index 3eeea0f488..21e8e720d6 100644 --- a/test/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 +++ b/test/EntraBeta/Applications/Add-EntraBetaApplicationPolicy.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.Applications } Describe "Add-EntraBetaApplicationPolicy" { @@ -17,7 +17,7 @@ Context "Test for Add-EntraBetaApplicationPolicy" { $result = Add-EntraBetaApplicationPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Id is empty" { { Add-EntraBetaApplicationPolicy -Id -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -38,7 +38,7 @@ Context "Test for Add-EntraBetaApplicationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaApplicationPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 index d1b50f31fa..4fbe4683eb 100644 --- a/test/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 +++ b/test/EntraBeta/Applications/Get-EntraBetaApplication.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -32,7 +32,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Get-MgBetaApplication -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "Get-EntraBetaApplication" { @@ -41,12 +41,12 @@ Describe "Get-EntraBetaApplication" { $result = Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('aaaaaaaa-1111-1111-1111-000000000000') - Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraBetaApplication -ObjectId "aaaaaaaa-1111-1111-1111-000000000000" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Get-EntraBetaApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -54,7 +54,7 @@ Describe "Get-EntraBetaApplication" { It "Should return all applications" { $result = Get-EntraBetaApplication -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when All has argument" { { Get-EntraBetaAuditDirectoryLog -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'." @@ -66,18 +66,18 @@ Describe "Get-EntraBetaApplication" { $result = Get-EntraBetaApplication -SearchString 'Mock-App' $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should return specific application by filter" { $result = Get-EntraBetaApplication -Filter "DisplayName -eq 'Mock-App'" $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should return top application" { $result = Get-EntraBetaApplication -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Result should Contain ApplicationId" { $result = Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" @@ -98,7 +98,7 @@ Describe "Get-EntraBetaApplication" { $result = Get-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplication" - Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -108,7 +108,7 @@ Describe "Get-EntraBetaApplication" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Property is empty" { @@ -136,7 +136,7 @@ Describe "Get-EntraBetaApplication" { It "Should return a list of applications by default" { $GetAzureADApplication = Get-Command Get-EntraBetaApplication - $GetAzureADApplication.ModuleName | Should -Be "Microsoft.Graph.Entra.Beta.Applications" + $GetAzureADApplication.ModuleName | Should -Be "Microsoft.Entra.Beta.Applications" $GetAzureADApplication.DefaultParameterSet | Should -Be "GetQuery" } It 'Should have List parameterSet' { diff --git a/test/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 index 3e05180639..b6cccc0dc0 100644 --- a/test/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 +++ b/test/EntraBeta/Applications/Get-EntraBetaApplicationLogo.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -18,14 +18,14 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "Get-EntraBetaApplicationLogo" { It "Should return empty" { $result = Get-EntraBetaApplicationLogo -ApplicationId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -FilePath "D:\image.jpg" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Get-EntraBetaApplicationLogo -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -38,7 +38,7 @@ Describe "Get-EntraBetaApplicationLogo" { $result = Get-EntraBetaApplicationLogo -ApplicationId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -FilePath "D:\image.jpg" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationLogo" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 index 6948b2f0d4..92ac28bea9 100644 --- a/test/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 +++ b/test/EntraBeta/Applications/Get-EntraBetaApplicationPasswordCredential.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.Applications + if ((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null) { + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "Get-EntraBetaApplicationPasswordCredential" { Context "Test for Get-EntraBetaApplicationPasswordCredential" { @@ -33,13 +33,13 @@ Describe "Get-EntraBetaApplicationPasswordCredential" { $result.DisplayName | Should -Be "test" $result.CustomKeyIdentifier.gettype().name | Should -Be 'Byte[]' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should return specific credential with Alias" { $result = Get-EntraBetaApplicationPasswordCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ApplicationId is invalid" { { Get-EntraBetaApplicationPasswordCredential -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -52,7 +52,7 @@ Describe "Get-EntraBetaApplicationPasswordCredential" { $result = Get-EntraBetaApplicationPasswordCredential -ApplicationId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 index 32640a785e..7a291ec963 100644 --- a/test/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 +++ b/test/EntraBeta/Applications/Get-EntraBetaApplicationPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -30,7 +30,7 @@ $scriptblock = { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "Get-EntraBetaApplicationPolicy" { @@ -43,7 +43,7 @@ Describe "Get-EntraBetaApplicationPolicy" { $result.displayName | Should -Be "Mock application policy" $result.type | Should -be "HomeRealmDiscoveryPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Id is empty" { { Get-EntraBetaApplicationPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -63,7 +63,7 @@ Describe "Get-EntraBetaApplicationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 index 1ebf8411a6..3e8b434b29 100644 --- a/test/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 +++ b/test/EntraBeta/Applications/Get-EntraBetaApplicationTemplate.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -32,7 +32,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaApplicationTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Get-MgBetaApplicationTemplate -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "Get-EntraBetaApplicationTemplate" { @@ -43,7 +43,7 @@ Describe "Get-EntraBetaApplicationTemplate" { $result.DisplayName | should -Be 'FigBytes' $result.Description | should -Be "Capture and manage your ESG data from across the organization in an integrated, cloud-based platform that connects organizational strategy, automates reporting, and simplifies stakeholder engagement." - Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Id is empty" { @@ -58,14 +58,14 @@ Describe "Get-EntraBetaApplicationTemplate" { $result = Get-EntraBetaApplicationTemplate $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain Id in result" { $result = Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result.Id | should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" - Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain ApplicationTemplateId in parameters when passed Id to it" { @@ -79,7 +79,7 @@ Describe "Get-EntraBetaApplicationTemplate" { $result = Get-EntraBetaApplicationTemplate -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationTemplate" - Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -90,7 +90,7 @@ Describe "Get-EntraBetaApplicationTemplate" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'FigBytes' - Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaApplicationTemplate -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Property is empty" { diff --git a/test/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 index 1a7340a586..9f8afb0b7f 100644 --- a/test/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 +++ b/test/EntraBeta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "Get-EntraBetaPasswordSingleSignOnCredential" { @@ -39,7 +39,7 @@ Describe "Get-EntraBetaPasswordSingleSignOnCredential" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" - Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ObjectId is Invalid" { @@ -60,7 +60,7 @@ Describe "Get-EntraBetaPasswordSingleSignOnCredential" { $params = Get-Parameters -data $result.Parameters $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" - Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain BodyParameter in parameters when passed PasswordSSOObjectId to it" { @@ -68,7 +68,7 @@ Describe "Get-EntraBetaPasswordSingleSignOnCredential" { $result | Should -Not -BeNullOrEmpty $result.Credentials[0].Value | should -Be 'test420' - Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain 'User-Agent' header" { @@ -76,7 +76,7 @@ Describe "Get-EntraBetaPasswordSingleSignOnCredential" { $result= Get-EntraBetaPasswordSingleSignOnCredential -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc56" -PasswordSSOObjectId "bbbbbbbb-1111-2222-3333-cccccccccc55" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPasswordSingleSignOnCredential" - Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 index d4dc7d7f1c..bc083eae7b 100644 --- a/test/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 +++ b/test/EntraBeta/Applications/Get-EntraBetaServicePrincipal.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -77,7 +77,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Get-MgBetaServicePrincipal -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "Get-EntraBetaServicePrincipal" { @@ -86,7 +86,7 @@ Describe "Get-EntraBetaServicePrincipal" { $result = Get-EntraBetaServicePrincipal $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraBetaServicePrincipal -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc59" @@ -99,14 +99,14 @@ Describe "Get-EntraBetaServicePrincipal" { $result.SignInAudience | Should -Be "AzureADMyOrg" $result.ServicePrincipalType | Should -Be "Application" - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should get all service principal" { $result = Get-EntraBetaServicePrincipal -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when All has an argument" { @@ -124,7 +124,7 @@ Describe "Get-EntraBetaServicePrincipal" { $result.SignInAudience | Should -Be "AzureADMyOrg" $result.ServicePrincipalType | Should -Be "Application" - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { @@ -139,7 +139,7 @@ Describe "Get-EntraBetaServicePrincipal" { $result = Get-EntraBetaServicePrincipal -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Top are empty" { @@ -161,7 +161,7 @@ Describe "Get-EntraBetaServicePrincipal" { $result.SignInAudience | Should -Be "AzureADMyOrg" $result.ServicePrincipalType | Should -Be "Application" - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Filter are empty" { @@ -172,7 +172,7 @@ Describe "Get-EntraBetaServicePrincipal" { $result = Get-EntraBetaServicePrincipal -Property "DisplayName" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Select are empty" { @@ -190,7 +190,7 @@ Describe "Get-EntraBetaServicePrincipal" { $result.SignInAudience | Should -Be "AzureADMyOrg" $result.ServicePrincipalType | Should -Be "Application" - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when SearchString are empty" { @@ -207,7 +207,7 @@ Describe "Get-EntraBetaServicePrincipal" { $params = Get-Parameters -data $result.Parameters $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc59" - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain filter in parameters when passed SearchString to it" { @@ -215,7 +215,7 @@ Describe "Get-EntraBetaServicePrincipal" { $params = Get-Parameters -data $result.Parameters $params.Filter | Should -Be "publisherName eq 'demo1' or (displayName eq 'demo1' or startswith(displayName,'demo1'))" - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain 'User-Agent' header" { @@ -223,7 +223,7 @@ Describe "Get-EntraBetaServicePrincipal" { $result= Get-EntraBetaServicePrincipal -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc59" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipal" - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -237,7 +237,7 @@ Describe "Get-EntraBetaServicePrincipal" { $result | Should -Not -BeNullOrEmpty $result.AppDisplayName | Should -Be 'demo1' - Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipal -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should execute successfully without throwing an error " { diff --git a/test/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 b/test/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 index d3c8905adc..f69d544f4e 100644 --- a/test/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 +++ b/test/EntraBeta/Applications/Get-EntraBetaServicePrincipalOwnedObject.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -87,7 +87,7 @@ BeforeAll { "Parameters" = $args } } - Mock -CommandName Get-MgBetaServicePrincipalOwnedObject -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Get-MgBetaServicePrincipalOwnedObject -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "Get-EntraBetaServicePrincipalOwnedObject" { @@ -103,7 +103,7 @@ Describe "Get-EntraBetaServicePrincipalOwnedObject" { $result.AdditionalProperties.appDisplayName | Should -Be "ToGraph_443democc3c" $result.AdditionalProperties.tags | Should -Be @('WindowsAzureActiveDirectoryIntegratedApp') - Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should return specific device with Alias" { $result = Get-EntraBetaServicePrincipalOwnedObject -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccc40" @@ -116,7 +116,7 @@ Describe "Get-EntraBetaServicePrincipalOwnedObject" { $result.AdditionalProperties.appDisplayName | Should -Be "ToGraph_443democc3c" $result.AdditionalProperties.tags | Should -Be @('WindowsAzureActiveDirectoryIntegratedApp') - Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ServicePrincipalId are empty" { { Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'*" @@ -130,7 +130,7 @@ Describe "Get-EntraBetaServicePrincipalOwnedObject" { $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Top are empty" { @@ -145,7 +145,7 @@ Describe "Get-EntraBetaServicePrincipalOwnedObject" { $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when All has an argument" { @@ -156,7 +156,7 @@ Describe "Get-EntraBetaServicePrincipalOwnedObject" { $result = Get-EntraBetaServicePrincipalOwnedObject -ServicePrincipalId "bbbbbbbb-1111-2222-3333-cccccccccc40" $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc58" - Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain ServicePrincipalId in parameters when passed Id to it" { @@ -173,7 +173,7 @@ Describe "Get-EntraBetaServicePrincipalOwnedObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipalOwnedObject" - Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -183,7 +183,7 @@ Describe "Get-EntraBetaServicePrincipalOwnedObject" { $result | Should -Not -BeNullOrEmpty $result.appDisplayName | Should -Be 'ToGraph_443democc3c' - Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Get-MgBetaServicePrincipalOwnedObject -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Property is empty" { diff --git a/test/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 b/test/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 index d36a1c16f9..8a96c641eb 100644 --- a/test/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 +++ b/test/EntraBeta/Applications/New-EntraBetaApplication.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -32,7 +32,7 @@ BeforeAll { ) } - Mock -CommandName New-MgBetaApplication -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName New-MgBetaApplication -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "New-EntraBetaApplication"{ @@ -44,7 +44,7 @@ Describe "New-EntraBetaApplication"{ $result.IsDeviceOnlyAuthSupported | should -Be "True" $result.IsFallbackPublicClient | should -Be "True" $result.SignInAudience | should -Be "AzureADandPersonalMicrosoftAccount" - Should -Invoke -CommandName New-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName New-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when DisplayName is empty" { { New-EntraBetaApplication -DisplayName "" } | Should -Throw "Cannot bind argument to parameter*" @@ -57,7 +57,7 @@ Describe "New-EntraBetaApplication"{ $result = New-EntraBetaApplication -DisplayName "Mock-App" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaApplication" - Should -Invoke -CommandName New-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 index 47fdb0e381..b5f242351d 100644 --- a/test/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 +++ b/test/EntraBeta/Applications/New-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { } ) } - Mock -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Applications } Describe "New-EntraBetaPasswordSingleSignOnCredential" { @@ -54,7 +54,7 @@ Describe "New-EntraBetaPasswordSingleSignOnCredential" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" - Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ObjectId is empty" { @@ -143,7 +143,7 @@ Describe "New-EntraBetaPasswordSingleSignOnCredential" { $params = Get-Parameters -data $result.Parameters $params.ServicePrincipalId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" - Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain BodyParameter in parameters when passed PasswordSSOCredential to it" { @@ -167,7 +167,7 @@ Describe "New-EntraBetaPasswordSingleSignOnCredential" { $result | Should -Not -BeNullOrEmpty $value | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should contain 'User-Agent' header" { @@ -193,7 +193,7 @@ Describe "New-EntraBetaPasswordSingleSignOnCredential" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaPasswordSingleSignOnCredential" - Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 b/test/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 index 13a1faf2e4..5b6d2b1d7b 100644 --- a/test/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 +++ b/test/EntraBeta/Applications/Remove-EntraBetaApplication.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Remove-MgBetaApplication -MockWith {} -ModuleName Microsoft.Entra.Beta.Applications } Describe "Remove-EntraBetaApplication" { @@ -15,12 +15,12 @@ Describe "Remove-EntraBetaApplication" { It "Should return empty object" { $result = Remove-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraBetaApplication -ObjectId "aaaaaaaa-1111-1111-1111-000000000000" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Remove-EntraBetaApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter*" @@ -29,7 +29,7 @@ Describe "Remove-EntraBetaApplication" { { Remove-EntraBetaApplication -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Remove-MgBetaApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Remove-MgBetaApplication -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Applications $result = Remove-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" $params = Get-Parameters -data $result $params.ApplicationId | Should -Be "aaaaaaaa-1111-1111-1111-000000000000" @@ -39,7 +39,7 @@ Describe "Remove-EntraBetaApplication" { $result = Remove-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaApplication" - Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 b/test/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 index d83d815cc0..5f66f094ef 100644 --- a/test/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 +++ b/test/EntraBeta/Applications/Remove-EntraBetaApplicationPolicy.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.Applications } Describe "Remove-EntraBetaApplicationPolicy" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaApplicationPolicy" { $result = Remove-EntraBetaApplicationPolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PolicyId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when Id is empty" { @@ -44,7 +44,7 @@ Describe "Remove-EntraBetaApplicationPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaApplicationPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 index 519fd5fb5f..91c0b969e4 100644 --- a/test/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 +++ b/test/EntraBeta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {} -ModuleName Microsoft.Entra.Beta.Applications } Describe "Remove-EntraBetaPasswordSingleSignOnCredential" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaPasswordSingleSignOnCredential" { $result = Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ObjectId is empty" { @@ -33,7 +33,7 @@ Describe "Remove-EntraBetaPasswordSingleSignOnCredential" { } It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Applications $result = Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -41,7 +41,7 @@ Describe "Remove-EntraBetaPasswordSingleSignOnCredential" { } It "Should contain Id in parameters when passed PasswordSSOObjectId to it" { - Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Applications $result = Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -53,7 +53,7 @@ Describe "Remove-EntraBetaPasswordSingleSignOnCredential" { $result = Remove-EntraBetaPasswordSingleSignOnCredential -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -PasswordSSOObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaPasswordSingleSignOnCredential" - Should -Invoke -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 b/test/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 index 869025515e..67b899d44c 100644 --- a/test/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 +++ b/test/EntraBeta/Applications/Set-EntraBetaApplication.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaApplication -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Update-MgBetaApplication -MockWith {} -ModuleName Microsoft.Entra.Beta.Applications } Describe "Set-EntraBetaApplication"{ @@ -15,12 +15,12 @@ Describe "Set-EntraBetaApplication"{ It "Should return empty object"{ $result = Set-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraBetaApplication -ObjectId "aaaaaaaa-1111-1111-1111-000000000000" -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Set-EntraBetaApplication -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId' because it is an empty string." @@ -29,7 +29,7 @@ Describe "Set-EntraBetaApplication"{ { Set-EntraBetaApplication -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" } It "Should contain ApplicationId in parameters when passed ApplicationId to it" { - Mock -CommandName Update-MgBetaApplication -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Update-MgBetaApplication -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Applications $result = Set-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" $params = Get-Parameters -data $result $params.ApplicationId | Should -Be "aaaaaaaa-1111-1111-1111-000000000000" @@ -39,7 +39,7 @@ Describe "Set-EntraBetaApplication"{ $result = Set-EntraBetaApplication -ApplicationId "aaaaaaaa-1111-1111-1111-000000000000" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaApplication" - Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaApplication -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 b/test/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 index 88cef370e0..325d90e992 100644 --- a/test/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 +++ b/test/EntraBeta/Applications/Set-EntraBetaApplicationLogo.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.Applications } Describe "Set-EntraBetaApplicationLogo"{ @@ -16,7 +16,7 @@ Describe "Set-EntraBetaApplicationLogo"{ It "Should return empty object"{ $result = Set-EntraBetaApplicationLogo -ApplicationId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -FilePath "https://th.bing.com/th?q=Perennial+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ApplicationId is empty" { { Set-EntraBetaApplicationLogo -ApplicationId "" } | Should -Throw "Cannot bind argument to parameter 'ApplicationId'*" @@ -32,7 +32,7 @@ Describe "Set-EntraBetaApplicationLogo"{ $result = Set-EntraBetaApplicationLogo -ApplicationId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -FilePath "https://th.bing.com/th?q=Perennial+Garden+Ideas&w=138&h=138&c=7&o=5&dpr=1.3&pid=1.7&mkt=en-IN&cc=IN&setlang=en&adlt=moderate" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaApplicationLogo" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 b/test/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 index 011a30e326..e92dd22aa8 100644 --- a/test/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 +++ b/test/EntraBeta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {} -ModuleName Microsoft.Entra.Beta.Applications } Describe "Set-EntraBetaPasswordSingleSignOnCredential" { @@ -32,7 +32,7 @@ Describe "Set-EntraBetaPasswordSingleSignOnCredential" { $result = Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential $params $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ObjectId is empty" { @@ -82,7 +82,7 @@ Describe "Set-EntraBetaPasswordSingleSignOnCredential" { } It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { - Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Applications $params = @{ id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" @@ -105,7 +105,7 @@ Describe "Set-EntraBetaPasswordSingleSignOnCredential" { } It "Should contain BodyParameter in parameters when passed PasswordSSOCredential to it" { - Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Applications $params = @{ id = "11bb11bb-cc22-dd33-ee44-55ff55ff55ff" @@ -157,7 +157,7 @@ Describe "Set-EntraBetaPasswordSingleSignOnCredential" { } $result = Set-EntraBetaPasswordSingleSignOnCredential -ObjectId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PasswordSSOCredential $params $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPasswordSingleSignOnCredential" - Should -Invoke -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaServicePrincipalPasswordSingleSignOnCredential -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 b/test/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 index f9e18078ef..f869efbff1 100644 --- a/test/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 +++ b/test/EntraBeta/Applications/Set-EntraBetaServicePrincipal.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Applications) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Applications + if((Get-Module -Name Microsoft.Entra.Beta.Applications) -eq $null){ + Import-Module Microsoft.Entra.Beta.Applications } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Applications + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.Applications } Describe "Set-EntraBetaServicePrincipal"{ @@ -17,13 +17,13 @@ Describe "Set-EntraBetaServicePrincipal"{ $result = Set-EntraBetaServicePrincipal -ServicePrincipalId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should return empty object with Alias" { $result = Set-EntraBetaServicePrincipal -ServicePrincipalId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 } It "Should fail when ServicePrincipalId is invalid" { { Set-EntraBetaServicePrincipal -ServicePrincipalId "" } | Should -Throw "Cannot bind argument to parameter 'ServicePrincipalId' because it is an empty string." @@ -35,7 +35,7 @@ Describe "Set-EntraBetaServicePrincipal"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaServicePrincipal" Set-EntraBetaServicePrincipal -ServicePrincipalId bbbbbbbb-1111-2222-3333-cccccccccccc | Out-Null $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaServicePrincipal" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 b/test/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 index a31127e3fa..0d42a59a66 100644 --- a/test/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 +++ b/test/EntraBeta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Authentication) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Authentication + if((Get-Module -Name Microsoft.Entra.Beta.Authentication) -eq $null){ + Import-Module Microsoft.Entra.Beta.Authentication } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -17,7 +17,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaUserAuthenticationMethod -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Authentication + Mock -CommandName Get-MgBetaUserAuthenticationMethod -MockWith {} -ModuleName Microsoft.Entra.Beta.Authentication } Describe "Reset-EntraBetaStrongAuthenticationMethodByUpn" { @@ -26,7 +26,7 @@ Describe "Reset-EntraBetaStrongAuthenticationMethodByUpn" { $result = Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso.com#EXT#@M365x99297270.onmicrosoft.com' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Beta.Authentication -Times 1 + Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Entra.Beta.Authentication -Times 1 } It "Should fail when UserPrincipalName is empty" { { Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName } | Should -Throw "Missing an argument for parameter 'UserPrincipalName'*" @@ -39,14 +39,14 @@ Describe "Reset-EntraBetaStrongAuthenticationMethodByUpn" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Reset-EntraBetaStrongAuthenticationMethodByUpn" Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' | Out-Null - Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Beta.Authentication -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Entra.Beta.Authentication -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } } It "Should contain 'User-Agent' header" { Reset-EntraBetaStrongAuthenticationMethodByUpn -UserPrincipalName 'Test_contoso@M365x99297270.onmicrosoft.com' | Out-Null - Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Beta.Authentication -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaUserAuthenticationMethod -ModuleName Microsoft.Entra.Beta.Authentication -Times 1 -ParameterFilter { $userId | Should -Be 'Test_contoso@M365x99297270.onmicrosoft.com' $true } diff --git a/test/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 index eb22b02d7c..b70eb47b61 100644 --- a/test/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgBetaAdministrativeUnitMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaAdministrativeUnitMemberByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Add-EntraBetaAdministrativeUnitMember" { @@ -17,13 +17,13 @@ Describe "Add-EntraBetaAdministrativeUnitMember" { $result = Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return empty object with alias" { $result = Add-EntraBetaAdministrativeUnitMember -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -38,7 +38,7 @@ Describe "Add-EntraBetaAdministrativeUnitMember" { { Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId ""} | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." } It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { - Mock -CommandName New-MgBetaAdministrativeUnitMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaAdministrativeUnitMemberByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Add-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "eeeeeeee-4444-5555-6666-ffffffffffff" $params = Get-Parameters -data $result $params.AdministrativeUnitId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -50,7 +50,7 @@ Describe "Add-EntraBetaAdministrativeUnitMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaAdministrativeUnitMember" - Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaAdministrativeUnitMemberByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index d0603e66b5..d6e517bd5d 100644 --- a/test/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -18,7 +18,7 @@ BeforeAll { } ) } - Mock -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue" { @@ -29,7 +29,7 @@ Describe "Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.IsActive | Should -Be $true - Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when CustomSecurityAttributeDefinitionId are empty" { @@ -67,7 +67,7 @@ Describe "Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue" { Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -IsActive $true $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue" - Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 index 9c0de190cc..dd7b953926 100644 --- a/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Add-EntraBetaDeviceRegisteredOwner" { @@ -16,13 +16,13 @@ Describe "Add-EntraBetaDeviceRegisteredOwner" { $result = Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Add-EntraBetaDeviceRegisteredOwner -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" @@ -37,19 +37,19 @@ Describe "Add-EntraBetaDeviceRegisteredOwner" { { Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "" } | Should -Throw "Cannot bind argument to parameter 'RefObjectId' because it is an empty string." } It "Should contain DeviceId in parameters when passed ObjectId to it" { - Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "412be9d1-1460-4061-8eed-cca203fcb215" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain BodyParameter in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement Add-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} - Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -62,7 +62,7 @@ Describe "Add-EntraBetaDeviceRegisteredOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaDeviceRegisteredOwner" - Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 index 284c6aae99..3f7aa8ee17 100644 --- a/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Add-EntraBetaDeviceRegisteredUser" { @@ -16,7 +16,7 @@ Describe "Add-EntraBetaDeviceRegisteredUser" { $result = Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Add-EntraBetaDeviceRegisteredUser -DeviceId -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'DeviceId'.*" @@ -34,22 +34,22 @@ Describe "Add-EntraBetaDeviceRegisteredUser" { $result = Add-EntraBetaDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should contain DeviceId in parameters when passed DeviceId to it" { - Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain BodyParameter in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement Add-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbbbbb-1111-2222-3333-cccccccccccc"} - Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -62,7 +62,7 @@ Describe "Add-EntraBetaDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaDeviceRegisteredUser" - Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 index d54b41bc41..0c7fd19f99 100644 --- a/test/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Add-EntraBetaScopedRoleMembership" { @@ -39,7 +39,7 @@ Describe "Add-EntraBetaScopedRoleMembership" { $result.RoleId | Should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" $result.AdministrativeUnitId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" - Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should add a user to the specified role within the specified administrative unit with alias" { $RoleMember = New-Object -TypeName Microsoft.Open.MSGraph.Model.MsRoleMemberInfo @@ -50,7 +50,7 @@ Describe "Add-EntraBetaScopedRoleMembership" { $result.RoleId | Should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" $result.AdministrativeUnitId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" - Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Add-EntraBetaScopedRoleMembership -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -108,7 +108,7 @@ Describe "Add-EntraBetaScopedRoleMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaScopedRoleMembership" - Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 index 02caea1746..3baa7c4a9a 100644 --- a/test/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Confirm-EntraBetaDomain.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Confirm-EntraBetaDomain" { @@ -17,7 +17,7 @@ Describe "Confirm-EntraBetaDomain" { $result = Confirm-EntraBetaDomain -DomainName "Contoso.com" -ForceTakeover $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DomainName is invalid" { { Confirm-EntraBetaDomain -DomainName "" } | Should -Throw "Cannot bind argument to parameter 'DomainName' because it is an empty string.*" @@ -35,7 +35,7 @@ Describe "Confirm-EntraBetaDomain" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Confirm-EntraBetaDomain" Confirm-EntraBetaDomain -DomainName "Contoso.com" -ForceTakeover $true - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 index b83bb56761..1224c5420c 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAccountSku.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaSubscribedSku -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaAccountSku" { @@ -36,7 +36,7 @@ Describe "Get-EntraBetaAccountSku" { $result.AccountId | should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" $result.AppliesTo | should -Be "User" - Should -Invoke -CommandName Get-MgBetaSubscribedSku -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaSubscribedSku -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraBetaAccountSku -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -53,7 +53,7 @@ Describe "Get-EntraBetaAccountSku" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAccountSku" - Should -Invoke -CommandName Get-MgBetaSubscribedSku -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaSubscribedSku -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 index a3afdbcaa9..f495b20d37 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaAdministrativeUnit -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaAdministrativeUnit -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaAdministrativeUnit" { @@ -36,7 +36,7 @@ Describe "Get-EntraBetaAdministrativeUnit" { $result.DisplayName | Should -Be "Mock-Administrative-unit" $result.Description | Should -Be "NewAdministrativeUnit" - Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return specific administrative unit with alias" { $result = Get-EntraBetaAdministrativeUnit -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" @@ -45,7 +45,7 @@ Describe "Get-EntraBetaAdministrativeUnit" { $result.DisplayName | Should -Be "Mock-Administrative-unit" $result.Description | Should -Be "NewAdministrativeUnit" - Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Get-EntraBetaAdministrativeUnit -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -57,7 +57,7 @@ Describe "Get-EntraBetaAdministrativeUnit" { $result = Get-EntraBetaAdministrativeUnit -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraBetaAdministrativeUnit -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -66,7 +66,7 @@ Describe "Get-EntraBetaAdministrativeUnit" { $result = Get-EntraBetaAdministrativeUnit -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaAdministrativeUnit -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -79,7 +79,7 @@ Describe "Get-EntraBetaAdministrativeUnit" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-Administrative-unit' - Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when filter is empty" { { Get-EntraBetaAdministrativeUnit -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -99,7 +99,7 @@ Describe "Get-EntraBetaAdministrativeUnit" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-Administrative-unit' - Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaAdministrativeUnit -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -112,7 +112,7 @@ Describe "Get-EntraBetaAdministrativeUnit" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAdministrativeUnit" - Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 index 0af73b9bb5..2af9026d35 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaAdministrativeUnitMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaAdministrativeUnitMember -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaAdministrativeUnitMember" { @@ -38,7 +38,7 @@ Describe "Get-EntraBetaAdministrativeUnitMember" { $result.AdditionalProperties.DisplayName | Should -Be "Mock-UnitMember" $result.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.user" - Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return specific administrative unit member with alias" { $result = Get-EntraBetaAdministrativeUnitMember -ObjectId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" @@ -47,7 +47,7 @@ Describe "Get-EntraBetaAdministrativeUnitMember" { $result.AdditionalProperties.DisplayName | Should -Be "Mock-UnitMember" $result.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.user" - Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -59,7 +59,7 @@ Describe "Get-EntraBetaAdministrativeUnitMember" { $result = Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -All XY } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'.*" @@ -69,7 +69,7 @@ Describe "Get-EntraBetaAdministrativeUnitMember" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -92,7 +92,7 @@ Describe "Get-EntraBetaAdministrativeUnitMember" { $result | Should -Not -BeNullOrEmpty $result.ID | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "pppppppp-1111-1111-1111-aaaaaaaaaaaa" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -105,7 +105,7 @@ Describe "Get-EntraBetaAdministrativeUnitMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAdministrativeUnitMember" - Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 index a50f96b2ec..4231d6ac25 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaAttributeSet.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectoryAttributeSet -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryAttributeSet -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaAttributeSet" { @@ -31,7 +31,7 @@ Describe "Get-EntraBetaAttributeSet" { $result.Description | should -Be "new test" $result.MaxAttributesPerSet | should -Be 22 - Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should get attribute set using alias" { @@ -41,7 +41,7 @@ Describe "Get-EntraBetaAttributeSet" { $result.Description | should -Be "new test" $result.MaxAttributesPerSet | should -Be 22 - Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AttributeSetId is empty" { @@ -68,7 +68,7 @@ Describe "Get-EntraBetaAttributeSet" { $result = Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAttributeSet" - Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -78,7 +78,7 @@ Describe "Get-EntraBetaAttributeSet" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'bbbbcccc-1111-dddd-2222-eeee3333ffff' - Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaAttributeSet -AttributeSetId "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 index 5d25212440..b9cd82363f 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaCustomSecurityAttributeDefinition" { @@ -45,7 +45,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinition" { $result.IsSearchable | should -Be $true $result.UsePreDefinedValuesOnly | should -Be $true - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { @@ -72,7 +72,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinition" { $result | Should -Not -BeNullOrEmpty $result.Description | Should -Be 'Target completion date' - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -83,7 +83,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinition" { $result = Get-EntraBetaCustomSecurityAttributeDefinition -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaCustomSecurityAttributeDefinition" - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index 5ba897a74d..cb6ca3d3ab 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -18,7 +18,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { @@ -27,7 +27,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when CustomSecurityAttributeDefinitionId are empty" { @@ -44,7 +44,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" $result.IsActive | Should -Be $true - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Id are empty" { @@ -61,7 +61,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" $result.IsActive | Should -Be $true - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Filter are empty" { @@ -78,7 +78,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $params = Get-Parameters -data $result.Parameters $params.AllowedValueId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should contain value in parameters when passed Filter to it" { @@ -88,7 +88,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $expectedFilter = "Id eq 'bbbbbbbb-1111-2222-3333-cccccccccc55'" $params.Filter | Should -Be $expectedFilter - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Property parameter should work" { @@ -96,7 +96,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { @@ -108,7 +108,7 @@ Describe "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $result = Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" - Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 index b54a324949..352b5bf2ad 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDevice.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -27,7 +27,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDevice -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaDevice" { @@ -38,13 +38,13 @@ Describe "Get-EntraBetaDevice" { $result.Id | should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result.DisplayName | should -Be "Mock-Device" - Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return specific device with Alias" { $result = Get-EntraBetaDevice -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Get-EntraBetaDevice -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" @@ -56,7 +56,7 @@ Describe "Get-EntraBetaDevice" { $result = Get-EntraBetaDevice -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { { Get-EntraBetaDevice -All xy } | Should -Throw "A positional parameter cannot be found that accepts argument 'xy'*" @@ -70,7 +70,7 @@ Describe "Get-EntraBetaDevice" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when searchstring is empty" { { Get-EntraBetaDevice -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" @@ -80,7 +80,7 @@ Describe "Get-EntraBetaDevice" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when filter is empty" { { Get-EntraBetaDevice -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -90,7 +90,7 @@ Describe "Get-EntraBetaDevice" { $result = Get-EntraBetaDevice -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaDevice -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -124,7 +124,7 @@ Describe "Get-EntraBetaDevice" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-Device' - Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaDevice -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -137,7 +137,7 @@ Describe "Get-EntraBetaDevice" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDevice" - Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 index a679a6cc46..65bdf104aa 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -27,7 +27,7 @@ BeforeAll { } - Mock -CommandName Get-MgBetaDeviceRegisteredOwner -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDeviceRegisteredOwner -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaDeviceRegisteredOwner" { @@ -37,14 +37,14 @@ Describe "Get-EntraBetaDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return specific device registered owner with alias" { $result = Get-EntraBetaDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Get-EntraBetaDeviceRegisteredOwner -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" @@ -57,7 +57,7 @@ Describe "Get-EntraBetaDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when All is invalid" { @@ -68,7 +68,7 @@ Describe "Get-EntraBetaDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when top is empty" { { Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -88,7 +88,7 @@ Describe "Get-EntraBetaDeviceRegisteredOwner" { $result = Get-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -99,7 +99,7 @@ Describe "Get-EntraBetaDeviceRegisteredOwner" { $result | Should -Not -BeNullOrEmpty $result.mobilePhone | Should -Be '425-555-0100' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredOwner -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 index f5aeda00fd..1e5017a215 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if ((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null) { + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -27,7 +27,7 @@ BeforeAll { } } - Mock -CommandName Get-MgBetaDeviceRegisteredUser -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDeviceRegisteredUser -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } @@ -39,14 +39,14 @@ Describe "Get-EntraBetaDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return specific device registered User with alias" { $result = Get-EntraBetaDeviceRegisteredUser -ObjectId "8542ebd1-3d49-4073-9dce-30f197c67755" $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Get-EntraBetaDeviceRegisteredUser -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" @@ -59,7 +59,7 @@ Describe "Get-EntraBetaDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return top device registered owner" { @@ -67,7 +67,7 @@ Describe "Get-EntraBetaDeviceRegisteredUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be '00aa00aa-bb11-cc22-dd33-44ee44ee44ee' - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when top is empty" { { Get-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -99,7 +99,7 @@ Describe "Get-EntraBetaDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDeviceRegisteredUser" - Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDeviceRegisteredUser -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 index 83080e7d68..c6b5a9aed2 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.Tests.ps1 @@ -2,9 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -17,14 +17,14 @@ BeforeAll { } } } - Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaDirSyncConfiguration" { Context "Test for Get-EntraBetaDirSyncConfiguration" { It "Get irectory synchronization settings" { $result = Get-EntraBetaDirSyncConfiguration -TenantId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraBetaDirSyncConfiguration -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -46,7 +46,7 @@ Describe "Get-EntraBetaDirSyncConfiguration" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirSyncConfiguration" - Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 index a9a1ad930b..7e64421e34 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirSyncFeature.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -34,7 +34,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaDirSyncFeature" { @@ -42,17 +42,17 @@ Describe "Get-EntraBetaDirSyncFeature" { It "Returns all the sync features" { $result = Get-EntraBetaDirSyncFeature $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Returns specific sync feature" { $result = Get-EntraBetaDirSyncFeature -Feature PasswordSync $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Returns sync feature" { $result = Get-EntraBetaDirSyncFeature -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraBetaDirSyncFeature -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -74,7 +74,7 @@ Describe "Get-EntraBetaDirSyncFeature" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirSyncFeature" - Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 index f8b2a5ff44..fb298bcc67 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaDirectoryObjectOnPremisesProvisioningError" { @@ -15,12 +15,12 @@ Describe "Get-EntraBetaDirectoryObjectOnPremisesProvisioningError" { It "Should return empty object" { $result = Get-EntraBetaDirectoryObjectOnPremisesProvisioningError $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return empty object when TenantId is passed" { $result = Get-EntraBetaDirectoryObjectOnPremisesProvisioningError -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraBetaDirectoryObjectOnPremisesProvisioningError -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -35,7 +35,7 @@ Describe "Get-EntraBetaDirectoryObjectOnPremisesProvisioningError" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectoryObjectOnPremisesProvisioningError" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 index 4b5ba79b96..d3e7577708 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySetting.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,7 +20,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectorySetting -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectorySetting -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaDirectorySetting" { @@ -33,7 +33,7 @@ Describe "Get-EntraBetaDirectorySetting" { $result.TemplateId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" $result.Values | should -Be @("EnableAccessCheckForPrivilegedApplicationUpdates") - Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { @@ -48,7 +48,7 @@ Describe "Get-EntraBetaDirectorySetting" { $result = Get-EntraBetaDirectorySetting -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when All has an argument" { @@ -59,7 +59,7 @@ Describe "Get-EntraBetaDirectorySetting" { $result = Get-EntraBetaDirectorySetting -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when top is empty" { @@ -81,7 +81,7 @@ Describe "Get-EntraBetaDirectorySetting" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Application' - Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaDirectorySetting -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -92,7 +92,7 @@ Describe "Get-EntraBetaDirectorySetting" { $result= Get-EntraBetaDirectorySetting -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectorySetting" - Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 index 0ec2c20676..98d9d2bf12 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaDirectorySettingTemplate" { @@ -38,7 +38,7 @@ Describe "Get-EntraBetaDirectorySettingTemplate" { $result.DisplayName | should -Be "Group.Unified.Guest" $result.Description | should -Be "Settings for a specific Unified Group" - Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { @@ -52,7 +52,7 @@ Describe "Get-EntraBetaDirectorySettingTemplate" { It "Should contain DirectorySettingTemplateId in parameters when passed Id to it" { $result = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $DirectorySettingTemplateId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" $true } @@ -62,7 +62,7 @@ Describe "Get-EntraBetaDirectorySettingTemplate" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Group.Unified.Guest' - Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -73,7 +73,7 @@ Describe "Get-EntraBetaDirectorySettingTemplate" { $result = Get-EntraBetaDirectorySettingTemplate -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDirectorySettingTemplate" - Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectorySettingTemplate -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 index 4afa3025f1..277348a46b 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaDomainFederationSettings" { @@ -39,12 +39,12 @@ Describe "Get-EntraBetaDomainFederationSettings" { $result | Should -Not -BeNullOrEmpty $result.FederationBrandName | Should -Be "Contoso" $result.ActiveLogOnUri | Should -Be "https://sts.deverett.info/adfs/services/trust/2005/usernamemixed" - Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Returns federation settings" { $result = Get-EntraBetaDomainFederationSettings -DomainName "test.com" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when TenantId is empty" { { Get-EntraBetaDomainFederationSettings -TenantId } | Should -Throw "Missing an argument for parameter 'TenantId'*" @@ -66,7 +66,7 @@ Describe "Get-EntraBetaDomainFederationSettings" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDomainFederationSettings" - Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 index 31e48c281c..c552c065a8 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaFederationProperty.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,7 +20,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraFederationProperty" { Context "Test for Get-EntraFederationProperty" { @@ -34,7 +34,7 @@ Describe "Get-EntraFederationProperty" { $result.PassiveSignInUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" $result.SignOutUri | Should -Be "https://sts.anmaji.myworkspace.microsoft.com/adfs/ls/" - Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { {Get-EntraBetaFederationProperty -DomainName} | Should -Throw "Missing an argument for parameter 'DomainName'. Specify a parameter*" @@ -45,7 +45,7 @@ Describe "Get-EntraFederationProperty" { } It "Should contain DomainId in parameters when DomainName to it" { - Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Get-EntraBetaFederationProperty -DomainName "contoso.com" $params = Get-Parameters -data $result $params.DomainId | Should -Be "contoso.com" @@ -59,7 +59,7 @@ Describe "Get-EntraFederationProperty" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaFederationProperty" - Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 index 7379f832c9..332741c45a 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaPasswordPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -17,7 +17,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDomain -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDomain -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaPasswordPolicy" { @@ -28,7 +28,7 @@ Describe "Get-EntraBetaPasswordPolicy" { $result.NotificationDays.PasswordNotificationWindowInDays | Should -Be "14" $result.ValidityPeriod | Should -Be "2147483647" - Should -Invoke -CommandName Get-MgBetaDomain -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDomain -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { @@ -47,7 +47,7 @@ Describe "Get-EntraBetaPasswordPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPasswordPolicy" - Should -Invoke -CommandName Get-MgBetaDomain -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDomain -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 index 3a89ac45b9..6c5f34db93 100644 --- a/test/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Get-EntraBetaScopedRoleMembership" { @@ -37,7 +37,7 @@ Describe "Get-EntraBetaScopedRoleMembership" { $result.RoleId | Should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" $result.AdministrativeUnitId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" - Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return specific scoped role membership with alias" { $result = Get-EntraBetaScopedRoleMembership -ObjectId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" @@ -46,7 +46,7 @@ Describe "Get-EntraBetaScopedRoleMembership" { $result.RoleId | Should -Be "cccccccc-85c2-4543-b86c-cccccccccccc" $result.AdministrativeUnitId | Should -Be "dddddddd-7902-4be2-a25b-dddddddddddd" - Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Get-EntraBetaScopedRoleMembership -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -71,7 +71,7 @@ Describe "Get-EntraBetaScopedRoleMembership" { $result | Should -Not -BeNullOrEmpty $result.RoleId | Should -Be 'cccccccc-85c2-4543-b86c-cccccccccccc' - Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -84,7 +84,7 @@ Describe "Get-EntraBetaScopedRoleMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaScopedRoleMembership" - Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 index a74da8f0da..a18770294b 100644 --- a/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnit.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -24,7 +24,7 @@ BeforeAll { ) } - Mock -CommandName New-MgBetaAdministrativeUnit -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaAdministrativeUnit -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "New-EntraBetaAdministrativeUnit" { @@ -36,7 +36,7 @@ Describe "New-EntraBetaAdministrativeUnit" { $result.DisplayName | Should -Be "Mock-Admin-Unit" $result.Description | Should -Be "NewAdministrativeUnit" - Should -Invoke -CommandName New-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DisplayName is empty" { { New-EntraBetaAdministrativeUnit -DisplayName -Description "NewAdministrativeUnit" } | Should -Throw "Missing an argument for parameter 'DisplayName'*" @@ -64,7 +64,7 @@ Describe "New-EntraBetaAdministrativeUnit" { $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAdministrativeUnit" - Should -Invoke -CommandName New-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 index 830edd06d5..ef624ce170 100644 --- a/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -37,7 +37,7 @@ BeforeAll { ) } - Mock -CommandName New-MGBetaAdministrativeUnitMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MGBetaAdministrativeUnitMember -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "New-EntraBetaAdministrativeUnitMember" { @@ -49,12 +49,12 @@ Describe "New-EntraBetaAdministrativeUnitMember" { $result.AdditionalProperties.DisplayName | Should -Be "Mock-Admin-UnitMember" $result.AdditionalProperties.Description | Should -Be "NewAdministrativeUnitMember" - Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = New-EntraBetaAdministrativeUnitMember -Id "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -OdataType "Microsoft.Graph.Group" -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False -GroupTypes @("Unified","DynamicMembership") -MembershipRule "(user.department -contains 'Marketing')" -MembershipRuleProcessingState "On" -IsAssignableToRole $False $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { {New-EntraBetaAdministrativeUnitMember -AdministrativeUnitId -DisplayName "Mock-Admin-UnitMember" -Description "NewAdministrativeUnitMember" -MailEnabled $True -MailNickname "Mock-Admin-UnitMember" -SecurityEnabled $False } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -137,7 +137,7 @@ Describe "New-EntraBetaAdministrativeUnitMember" { $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAdministrativeUnitMember" - Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MGBetaAdministrativeUnitMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 index 3e7e9db762..47a7609828 100644 --- a/test/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/New-EntraBetaAttributeSet.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName New-MgBetaDirectoryAttributeSet -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDirectoryAttributeSet -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "New-EntraBetaAttributeSet" { @@ -31,7 +31,7 @@ Describe "New-EntraBetaAttributeSet" { $result.Description | should -Be "New AttributeSet" $result.MaxAttributesPerSet | should -Be 21 - Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should create new attribute set with alias" { @@ -41,7 +41,7 @@ Describe "New-EntraBetaAttributeSet" { $result.Description | should -Be "New AttributeSet" $result.MaxAttributesPerSet | should -Be 21 - Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AttributeSetId is empty" { @@ -73,7 +73,7 @@ Describe "New-EntraBetaAttributeSet" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaAttributeSet" - Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 index a4145e9116..1853390f32 100644 --- a/test/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -26,7 +26,7 @@ BeforeAll { } ) } - Mock -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "New-EntraBetaCustomSecurityAttributeDefinition" { @@ -45,7 +45,7 @@ Describe "New-EntraBetaCustomSecurityAttributeDefinition" { $result.IsSearchable | should -Be $true $result.UsePreDefinedValuesOnly | should -Be $true - Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AttributeSet is empty" { @@ -121,7 +121,7 @@ Describe "New-EntraBetaCustomSecurityAttributeDefinition" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaCustomSecurityAttributeDefinition" - Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 b/test/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 index 96aa0016ad..9bbf65cf7a 100644 --- a/test/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/New-EntraBetaDirectorySetting.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -49,9 +49,9 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock1 -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock1 -ModuleName Microsoft.Entra.Beta.DirectoryManagement - Mock -CommandName New-MgBetaDirectorySetting -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName New-MgBetaDirectorySetting -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "New-EntraBetaDirectorySetting" { @@ -65,7 +65,7 @@ Describe "New-EntraBetaDirectorySetting" { $result.TemplateId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" - Should -Invoke -CommandName New-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName New-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DirectorySetting is empty" { @@ -93,7 +93,7 @@ Describe "New-EntraBetaDirectorySetting" { $settingsCopy = $template.CreateDirectorySetting() New-EntraBetaDirectorySetting -DirectorySetting $settingsCopy - Should -Invoke -CommandName New-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 index 849dd34b89..616f58b176 100644 --- a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaAdministrativeUnit -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaAdministrativeUnit -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Remove-EntraBetaAdministrativeUnit" { @@ -17,13 +17,13 @@ Describe "Remove-EntraBetaAdministrativeUnit" { $result = Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraBetaAdministrativeUnit -ObjectId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -32,7 +32,7 @@ Describe "Remove-EntraBetaAdministrativeUnit" { { Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId "" } | Should -Throw "Cannot bind argument to parameter 'AdministrativeUnitId' because it is an empty string." } It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { - Mock -CommandName Remove-MgBetaAdministrativeUnit -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaAdministrativeUnit -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Remove-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraBetaAdministrativeUnit" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaAdministrativeUnit" - Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 index 001a22f648..80e6fdb68c 100644 --- a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Remove-EntraBetaAdministrativeUnitMember" { @@ -17,13 +17,13 @@ Describe "Remove-EntraBetaAdministrativeUnitMember" { $result = Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraBetaAdministrativeUnitMember -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraBetaAdministrativeUnitMember -AdministrativeUnitId -MemberId "dddddddd-9999-0000-1111-eeeeeeeeeeee" } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -44,7 +44,7 @@ Describe "Remove-EntraBetaAdministrativeUnitMember" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaAdministrativeUnitMember" - Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitMemberByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 index 5eff0971a7..a46a675a43 100644 --- a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDevice.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDevice -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Remove-EntraBetaDevice" { @@ -17,13 +17,13 @@ Describe "Remove-EntraBetaDevice" { $result = Remove-EntraBetaDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraBetaDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceId is invalid" { { Remove-EntraBetaDevice -DeviceId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Remove-EntraBetaDevice" { { Remove-EntraBetaDevice -DeviceId } | Should -Throw "Missing an argument for parameter 'DeviceId'*" } It "Should contain DeviceId in parameters when passed DeviceId to it" { - Mock -CommandName Remove-MgBetaDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDevice -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Remove-EntraBetaDevice -DeviceId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Remove-EntraBetaDevice" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDevice" Remove-EntraBetaDevice -DeviceId "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 index 4552ae175d..9bdc2fda4b 100644 --- a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Remove-EntraBetaDeviceRegisteredOwner" { @@ -16,13 +16,13 @@ Describe "Remove-EntraBetaDeviceRegisteredOwner" { $result = Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraBetaDeviceRegisteredOwner -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Remove-EntraBetaDeviceRegisteredOwner -DeviceId -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } @@ -37,14 +37,14 @@ Describe "Remove-EntraBetaDeviceRegisteredOwner" { { Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "" | Should -Throw "Cannot bind argument to parameter 'OwnerId' because it is an empty string.*" } } It "Should contain DeviceId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Remove-EntraBetaDeviceRegisteredOwner -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -OwnerId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -58,7 +58,7 @@ Describe "Remove-EntraBetaDeviceRegisteredOwner" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDeviceRegisteredOwner" - Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredOwnerByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 index e9d21155af..414f35ab0c 100644 --- a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Remove-EntraBetaDeviceRegisteredUser" { @@ -16,13 +16,13 @@ Describe "Remove-EntraBetaDeviceRegisteredUser" { $result = Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraBetaDeviceRegisteredUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceId is empty" { { Remove-EntraBetaDeviceRegisteredUser -DeviceId -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" | Should -Throw "Missing an argument for parameter 'DeviceId'*" } @@ -37,14 +37,14 @@ Describe "Remove-EntraBetaDeviceRegisteredUser" { { Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "" | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string.*" } } It "Should contain DeviceId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result $params.DeviceId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" } It "Should contain DirectoryObjectId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDeviceRegisteredUserByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Remove-EntraBetaDeviceRegisteredUser -DeviceId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -58,7 +58,7 @@ Describe "Remove-EntraBetaDeviceRegisteredUser" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDeviceRegisteredUser" - Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaDeviceRegisteredUserByRef -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 index 44cbee9ba5..affb7984dd 100644 --- a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaDirectorySetting.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaDirectorySetting -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDirectorySetting -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Remove-EntraBetaDirectorySetting" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaDirectorySetting" { $result = Remove-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { @@ -29,7 +29,7 @@ Describe "Remove-EntraBetaDirectorySetting" { } It "Should contain DirectorySettingId in parameters when passed Id to it" { - Mock -CommandName Remove-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Remove-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -44,7 +44,7 @@ Describe "Remove-EntraBetaDirectorySetting" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaDirectorySetting" - Should -Invoke -CommandName Remove-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 index 9d0b5721f3..5ebbe63703 100644 --- a/test/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Remove-EntraBetaScopedRoleMembership" { @@ -17,13 +17,13 @@ Describe "Remove-EntraBetaScopedRoleMembership" { $result = Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should return empty object" { $result = Remove-EntraBetaScopedRoleMembership -ObjectId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AdministrativeUnitId is empty" { { Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -38,7 +38,7 @@ Describe "Remove-EntraBetaScopedRoleMembership" { { Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId ""} | Should -Throw "Cannot bind argument to parameter 'ScopedRoleMembershipId' because it is an empty string." } It "Should contain AdministrativeUnitId in parameters when passed AdministrativeUnitId to it" { - Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Remove-EntraBetaScopedRoleMembership -AdministrativeUnitId "dddddddd-1111-2222-3333-eeeeeeeeeeee" -ScopedRoleMembershipId "zTVcE8KFQ0W4bI9tvt6kz9Es_cQCeeJLolvVzF_5NRdnAVb9H_8aR410OwBwq86hU" $params = Get-Parameters -data $result @@ -51,7 +51,7 @@ Describe "Remove-EntraBetaScopedRoleMembership" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaScopedRoleMembership" - Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaDirectoryAdministrativeUnitScopedRoleMember -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 index c085c13761..f07ce22042 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaAdministrativeUnit -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaAdministrativeUnit -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaAdministrativeUnit" { @@ -17,7 +17,7 @@ Describe "Set-EntraBetaAdministrativeUnit" { $result = Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -IsMemberManagementRestricted $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId -DisplayName "Mock-Admin-Unit" } | Should -Throw "Missing an argument for parameter 'AdministrativeUnitId'*" @@ -38,7 +38,7 @@ Describe "Set-EntraBetaAdministrativeUnit" { { Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" -IsMemberManagementRestricted "" } | Should -Throw "Cannot process argument transformation on parameter 'IsMemberManagementRestricted'.*" } It "Should contain AdministrativeUnitId in parameters when passed ObjectId to it" { - Mock -CommandName Update-MgBetaAdministrativeUnit -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaAdministrativeUnit -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Set-EntraBetaAdministrativeUnit -AdministrativeUnitId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -DisplayName "Mock-Admin-Unit" -Description "NewAdministrativeUnit" $params = Get-Parameters -data $result @@ -51,7 +51,7 @@ Describe "Set-EntraBetaAdministrativeUnit" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaAdministrativeUnit" - Should -Invoke -CommandName Update-MgBetaAdministrativeUnit -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaAdministrativeUnit -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 index 4f7a96dc27..d5908bdcda 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaAttributeSet.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaDirectoryAttributeSet -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectoryAttributeSet -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaAttributeSet" { @@ -17,14 +17,14 @@ Describe "Set-EntraBetaAttributeSet" { $result = Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 $result | Should -Be -NullOrEmpty - Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should update attribute set with alias" { $result = Set-EntraBetaAttributeSet -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 $result | Should -Be -NullOrEmpty - Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AttributeSetId is empty" { @@ -44,7 +44,7 @@ Describe "Set-EntraBetaAttributeSet" { } It "Should contain AttributeSetId in parameters when passed Id to it" { - Mock -CommandName Update-MgBetaDirectoryAttributeSet -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectoryAttributeSet -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 $params = Get-Parameters -data $result @@ -56,7 +56,7 @@ Describe "Set-EntraBetaAttributeSet" { $result = Set-EntraBetaAttributeSet -AttributeSetId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Update AttributeSet" -MaxAttributesPerSet 22 $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaAttributeSet" - Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaDirectoryAttributeSet -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 index b0de1ebe16..7f7fe15549 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaCustomSecurityAttributeDefinition" { @@ -17,7 +17,7 @@ Describe "Set-EntraBetaCustomSecurityAttributeDefinition" { $result = Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { @@ -45,7 +45,7 @@ Describe "Set-EntraBetaCustomSecurityAttributeDefinition" { } It "Should contain CustomSecurityAttributeDefinitionId in parameters when passed Id to it" { - Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true $params = Get-Parameters -data $result @@ -57,7 +57,7 @@ Describe "Set-EntraBetaCustomSecurityAttributeDefinition" { $result = Set-EntraBetaCustomSecurityAttributeDefinition -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -Description "Target completion date" -Status "Available" -UsePreDefinedValuesOnly $true $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaCustomSecurityAttributeDefinition" - Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinition -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 index 37202db2ab..769a9534b7 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { @@ -17,7 +17,7 @@ Describe "Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $result = Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when CustomSecurityAttributeDefinitionId are empty" { @@ -45,7 +45,7 @@ Describe "Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { } It "Should contain AllowedValueId in parameters when passed Id to it" { - Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false $params = Get-Parameters -data $result @@ -57,7 +57,7 @@ Describe "Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" { $result = Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -CustomSecurityAttributeDefinitionId Engineering_Projectt -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -IsActive $false $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue" - Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaDirectoryCustomSecurityAttributeDefinitionAllowedValue -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 index 17b7b8b975..ea079e98a2 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDevice.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaDevice -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDevice -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaDevice"{ @@ -17,13 +17,13 @@ Describe "Set-EntraBetaDevice"{ $result = Set-EntraBetaDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraBetaDevice -ObjectId bbbbbbbb-1111-2222-3333-cccccccccccc -DisplayName "Mock-App" -AccountEnabled $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DeviceObjectId is invalid" { { Set-EntraBetaDevice -DeviceObjectId "" } | Should -Throw "Cannot bind argument to parameter 'DeviceObjectId' because it is an empty string." @@ -32,7 +32,7 @@ Describe "Set-EntraBetaDevice"{ { Set-EntraBetaDevice -DeviceObjectId } | Should -Throw "Missing an argument for parameter 'DeviceObjectId'*" } It "Should contain DeviceId in parameters when passed DeviceObjectId to it" { - Mock -CommandName Update-MgBetaDevice -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDevice -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Set-EntraBetaDevice -DeviceObjectId bbbbbbbb-1111-2222-3333-cccccccccccc $params = Get-Parameters -data $result @@ -42,7 +42,7 @@ Describe "Set-EntraBetaDevice"{ $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDevice" Set-EntraBetaDevice -DeviceObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaDevice -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 index 68ab5a687a..40de0edfff 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -14,16 +14,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement - Mock -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaDirSyncConfiguration" { Context "Test for Set-EntraBetaDirSyncConfiguration" { It "Should Modifies the directory synchronization settings." { $result = Set-EntraBetaDirSyncConfiguration -AccidentalDeletionThreshold "111" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Force $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when AccidentalDeletionThreshold is empty" { @@ -52,7 +52,7 @@ Describe "Set-EntraBetaDirSyncConfiguration" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDirSyncConfiguration" - Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 index ce8e8fb162..dd531b0ad7 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -14,9 +14,9 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement - Mock -CommandName Update-MgBetaOrganization -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaOrganization -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaDirSyncEnabled" { Context "Test for Set-EntraBetaDirSyncEnabled" { @@ -24,7 +24,7 @@ Describe "Set-EntraBetaDirSyncEnabled" { $result = Set-EntraBetaDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force write-host $result $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaOrganization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaOrganization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when EnableDirsync is empty" { @@ -50,7 +50,7 @@ Describe "Set-EntraBetaDirSyncEnabled" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDirSyncEnabled" Set-EntraBetaDirSyncEnabled -EnableDirsync $True -TenantId 'aaaaaaaa-1111-1111-1111-000000000000' -Force | Out-Null - Should -Invoke -CommandName Update-MgBetaOrganization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaOrganization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 index 48bf466feb..0c7d6655e8 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirSyncFeature.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -15,16 +15,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectoryOnPremiseSynchronization -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement - Mock -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaDirSyncFeature" { Context "Test for Set-EntraBetaDirSyncFeature" { It "Should sets identity synchronization features for a tenant." { $result = Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable $false -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force -ErrorAction SilentlyContinue $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Feature is empty" { @@ -58,7 +58,7 @@ Describe "Set-EntraBetaDirSyncFeature" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraAttributeSet" Set-EntraBetaDirSyncFeature -Feature "BypassDirSyncOverrides" -Enable $false -TenantId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Force -ErrorAction SilentlyContinue | Out-Null - Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Graph.Entra -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaDirectoryOnPremiseSynchronization -ModuleName Microsoft.Entra -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 index 1cf50c7b3f..9a87e0f703 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDirectorySetting.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -27,9 +27,9 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement - Mock -CommandName Update-MgBetaDirectorySetting -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectorySetting -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaDirectorySetting" { @@ -41,7 +41,7 @@ Describe "Set-EntraBetaDirectorySetting" { $result = Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting $settingsCopy $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when Id is empty" { @@ -70,7 +70,7 @@ Describe "Set-EntraBetaDirectorySetting" { } It "Should contain BodyParameter in parameters when passed DirectorySetting to it" { - Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" $settingsCopy = $template.CreateDirectorySetting() @@ -81,7 +81,7 @@ Describe "Set-EntraBetaDirectorySetting" { } It "Should contain DirectorySettingId in parameters when passed Id to it" { - Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" $settingsCopy = $template.CreateDirectorySetting() @@ -92,14 +92,14 @@ Describe "Set-EntraBetaDirectorySetting" { } It "Should contain 'User-Agent' header" { - Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDirectorySetting -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDirectorySetting" $template = Get-EntraBetaDirectorySettingTemplate -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" $settingsCopy = $template.CreateDirectorySetting() $settingsCopy["EnableBannedPasswordCheckOnPremises"] = "False" Set-EntraBetaDirectorySetting -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -DirectorySetting $settingsCopy - Should -Invoke -CommandName Update-MgBetaDirectorySetting -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaDirectorySetting -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 index 256e7834ec..b910fb936b 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblock = { @@ -29,16 +29,16 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Get-MgBetaDomainFederationConfiguration -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement - Mock -CommandName Update-MgBetaDomainFederationConfiguration -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDomainFederationConfiguration -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement } Describe "Set-EntraBetaDomainFederationSettings" { Context "Test for Set-EntraBetaDomainFederationSettings" { It "Should Updates settings for a federated domain." { $result = Set-EntraBetaDomainFederationSettings -DomainName "manan.lab.myworkspace.microsoft.com" -LogOffUri "https://adfs1.manan.lab/adfs/" -PassiveLogOnUri "https://adfs1.manan.lab/adfs/" -ActiveLogOnUri "https://adfs1.manan.lab/adfs/services/trust/2005/" -IssuerUri "http://adfs1.manan.lab/adfs/services/" -FederationBrandName "ADFS" -MetadataExchangeUri "https://adfs1.manan.lab/adfs/services/trust/" -PreferredAuthenticationProtocol "saml" -PromptLoginBehavior "nativeSupport" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Update-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when DomainName is empty" { @@ -56,7 +56,7 @@ Describe "Set-EntraBetaDomainFederationSettings" { {Set-EntraBetaDomainFederationSettings -Demo } | Should -Throw "A parameter cannot be found that matches parameter name 'Demo'*" } It "Should contain DomainId in parameters when DomainName to it" { - Mock -CommandName Update-MgBetaDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Update-MgBetaDomainFederationConfiguration -MockWith {$args} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Set-EntraBetaDomainFederationSettings -DomainName "manan.lab.myworkspace.microsoft.com" $params = Get-Parameters -data $result $a= $params | ConvertTo-json | ConvertFrom-Json @@ -69,7 +69,7 @@ Describe "Set-EntraBetaDomainFederationSettings" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaDomainFederationSettings" - Should -Invoke -CommandName Update-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaDomainFederationConfiguration -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 b/test/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 index ab6d3f52de..3bd042222d 100644 --- a/test/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 +++ b/test/EntraBeta/DirectoryManagement/Set-EntraBetaPartnerInformation.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -MockWith { + Mock -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Entra.Beta.DirectoryManagement -MockWith { return @{ value = @( @{ @@ -23,10 +23,10 @@ BeforeAll { Describe "Set-EntraBetaPartnerInformation"{ Context "Test for Set-EntraBetaPartnerInformation" { It "Should return empty object"{ - Mock -CommandName Invoke-MgGraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement + Mock -CommandName Invoke-MgGraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.DirectoryManagement $result = Set-EntraBetaPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId b73cc049-a025-4441-ba3a-8826d9a68ecc $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 } It "Should fail when PartnerSupportUrl is empty" { { Set-EntraBetaPartnerInformation -PartnerSupportUrl } | Should -Throw "Missing an argument for parameter 'PartnerSupportUrl'*" @@ -62,7 +62,7 @@ Describe "Set-EntraBetaPartnerInformation"{ It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPartnerInformation" Set-EntraBetaPartnerInformation -PartnerSupportUrl "http://www.test1.com" -PartnerCommerceUrl "http://www.test1.com" -PartnerHelpUrl "http://www.test1.com" -PartnerSupportEmails "contoso@example.com" -PartnerSupportTelephones "2342" -TenantId "00aa00aa-bb11-cc22-dd33-44ee44ee44ff" - Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-MgGraphRequest -ModuleName Microsoft.Entra.Beta.DirectoryManagement -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/EntraBeta.Tests.ps1 b/test/EntraBeta/EntraBeta.Tests.ps1 index fc24f16ec5..77c9bc2b57 100644 --- a/test/EntraBeta/EntraBeta.Tests.ps1 +++ b/test/EntraBeta/EntraBeta.Tests.ps1 @@ -2,35 +2,35 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Authentication)){ - Import-Module Microsoft.Graph.Entra.Beta.Authentication -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Beta.Authentication)){ + Import-Module Microsoft.Entra.Beta.Authentication -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Applications)){ - Import-Module Microsoft.Graph.Entra.Beta.Applications -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Beta.Applications)){ + Import-Module Microsoft.Entra.Beta.Applications -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement)){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement)){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Governance)){ - Import-Module Microsoft.Graph.Entra.Beta.Governance -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Beta.Governance)){ + Import-Module Microsoft.Entra.Beta.Governance -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Users)){ - Import-Module Microsoft.Graph.Entra.Beta.Users -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Beta.Users)){ + Import-Module Microsoft.Entra.Beta.Users -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Groups)){ - Import-Module Microsoft.Graph.Entra.Beta.Groups -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Beta.Groups)){ + Import-Module Microsoft.Entra.Beta.Groups -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.Reports)){ - Import-Module Microsoft.Graph.Entra.Beta.Reports -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Beta.Reports)){ + Import-Module Microsoft.Entra.Beta.Reports -Force } -if($null -eq (Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns)){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns -Force +if($null -eq (Get-Module -Name Microsoft.Entra.Beta.SignIns)){ + Import-Module Microsoft.Entra.Beta.SignIns -Force } Import-Module Pester -#$psmPath = (Get-Module Microsoft.Graph.Entra.Beta).Path -$ps1FilesPath = join-path $psscriptroot "..\..\module\EntraBeta\Microsoft.Graph.Entra" +#$psmPath = (Get-Module Microsoft.Entra.Beta).Path +$ps1FilesPath = join-path $psscriptroot "..\..\module\EntraBeta\Microsoft.Entra" $testReportPath = join-path $psscriptroot "..\..\TestReport\EntraBeta" $mockScriptsPath = join-path $psscriptroot "..\..\test\EntraBeta\*\*.Tests.ps1" diff --git a/test/EntraBeta/General.Tests.ps1 b/test/EntraBeta/General.Tests.ps1 index c9e1aaba5a..57fd290e84 100644 --- a/test/EntraBeta/General.Tests.ps1 +++ b/test/EntraBeta/General.Tests.ps1 @@ -3,8 +3,8 @@ # # ------------------------------------------------------------------------------ # BeforeAll { -# if((Get-Module -Name Microsoft.Graph.Entra.Beta) -eq $null){ -# Import-Module Microsoft.Graph.Entra.Beta +# if((Get-Module -Name Microsoft.Entra.Beta) -eq $null){ +# Import-Module Microsoft.Entra.Beta # } # } @@ -18,17 +18,17 @@ # Describe 'Module checks' { # It 'Module imported' { -# $module = Get-Module -Name Microsoft.Graph.Entra.Beta +# $module = Get-Module -Name Microsoft.Entra.Beta # $module | Should -Not -Be $null # } # It 'Have more that zero exported functions' { -# $module = Get-Module -Name Microsoft.Graph.Entra.Beta +# $module = Get-Module -Name Microsoft.Entra.Beta # $module.ExportedCommands.Keys.Count | Should -BeGreaterThan 0 # } # It 'Known number translated commands' { -# $module = Get-Module -Name Microsoft.Graph.Entra.Beta +# $module = Get-Module -Name Microsoft.Entra.Beta # $module.ExportedCommands.Keys.Count | Should -Be 293 # } diff --git a/test/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 index b9b8c38831..7fd6cdcb4b 100644 --- a/test/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 +++ b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedResource.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Governance + if((Get-Module -Name Microsoft.Entra.Beta.Governance) -eq $null){ + Import-Module Microsoft.Entra.Beta.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaPrivilegedAccessResource -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Governance + Mock -CommandName Get-MgBetaPrivilegedAccessResource -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Governance } Describe "Get-EntraBetaPrivilegedResource" { @@ -37,7 +37,7 @@ Describe "Get-EntraBetaPrivilegedResource" { $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when ProviderId are empty" { @@ -57,7 +57,7 @@ Describe "Get-EntraBetaPrivilegedResource" { $result.ExternalId | Should -Be "/administrativeUnits/bbbbbbbb-1111-2222-3333-cccccccccc55" $result.DisplayName | Should -Be "new" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Id are empty" { @@ -72,7 +72,7 @@ Describe "Get-EntraBetaPrivilegedResource" { $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Top are empty" { @@ -92,7 +92,7 @@ Describe "Get-EntraBetaPrivilegedResource" { $result.ExternalId | Should -Be "/administrativeUnits/bbbbbbbb-1111-2222-3333-cccccccccc55" $result.DisplayName | Should -Be "new" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Filter are empty" { @@ -109,7 +109,7 @@ Describe "Get-EntraBetaPrivilegedResource" { $params = Get-Parameters -data $result.Parameters $params.GovernanceResourceId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should contain PrivilegedAccessId in parameters when passed ProviderId to it" { @@ -117,14 +117,14 @@ Describe "Get-EntraBetaPrivilegedResource" { $params = Get-Parameters -data $result.Parameters $params.PrivilegedAccessId | Should -Be "aadRoles" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Property parameter should work" { $result = Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property DisplayName $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'new' - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -134,7 +134,7 @@ Describe "Get-EntraBetaPrivilegedResource" { $result= Get-EntraBetaPrivilegedResource -ProviderId aadRoles -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedResource" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResource -ModuleName Microsoft.Entra.Beta.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 index f7e1d0f4b0..bbbb9fddf2 100644 --- a/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 +++ b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleDefinition.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Governance + if((Get-Module -Name Microsoft.Entra.Beta.Governance) -eq $null){ + Import-Module Microsoft.Entra.Beta.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Governance + Mock -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Governance } Describe "Get-EntraBetaPrivilegedRoleDefinition" { @@ -35,7 +35,7 @@ Describe "Get-EntraBetaPrivilegedRoleDefinition" { $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" $result.ResourceId | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Id is empty" { { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -66,7 +66,7 @@ Describe "Get-EntraBetaPrivilegedRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be "Mock Portal" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when filter is empty" { { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -76,7 +76,7 @@ Describe "Get-EntraBetaPrivilegedRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -101,7 +101,7 @@ Describe "Get-EntraBetaPrivilegedRoleDefinition" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock Portal' - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaPrivilegedRoleDefinition -ProviderId "MockRoles" -ResourceId "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -114,7 +114,7 @@ Describe "Get-EntraBetaPrivilegedRoleDefinition" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedRoleDefinition" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessResourceRoleDefinition -ModuleName Microsoft.Entra.Beta.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 index 0c33316eaf..065222dbb7 100644 --- a/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 +++ b/test/EntraBeta/Governance/Get-EntraBetaPrivilegedRoleSetting.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Governance + if((Get-Module -Name Microsoft.Entra.Beta.Governance) -eq $null){ + Import-Module Microsoft.Entra.Beta.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -60,7 +60,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaPrivilegedAccessRoleSetting -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Governance + Mock -CommandName Get-MgBetaPrivilegedAccessRoleSetting -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Governance } Describe "Get-EntraBetaPrivilegedRoleSetting" { @@ -72,7 +72,7 @@ Describe "Get-EntraBetaPrivilegedRoleSetting" { $result.resourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $result.roleDefinitionId | Should -Be "eeeeeeee-c632-46ae-9ee0-dddddddddddd" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Id is empty" { { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -91,7 +91,7 @@ Describe "Get-EntraBetaPrivilegedRoleSetting" { $result | Should -Not -BeNullOrEmpty $result.resourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Filter "ResourceId eq 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1'" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -104,7 +104,7 @@ Describe "Get-EntraBetaPrivilegedRoleSetting" { $result | Should -Not -BeNullOrEmpty $result.resourceId | Should -Be "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when filter is empty" { { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Filter } | Should -Throw "Missing an argument for parameter 'filter'*" @@ -126,7 +126,7 @@ Describe "Get-EntraBetaPrivilegedRoleSetting" { $result | Should -Not -BeNullOrEmpty $result.resourceId | Should -Be 'a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1' - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -139,7 +139,7 @@ Describe "Get-EntraBetaPrivilegedRoleSetting" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPrivilegedRoleSetting" - Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 b/test/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 index 0371c31e3e..48dc37067a 100644 --- a/test/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 +++ b/test/EntraBeta/Governance/Set-EntraBetaPrivilegedRoleSetting.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Governance) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Governance + if((Get-Module -Name Microsoft.Entra.Beta.Governance) -eq $null){ + Import-Module Microsoft.Entra.Beta.Governance } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Governance + Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {} -ModuleName Microsoft.Entra.Beta.Governance } Describe "Set-EntraBetaPrivilegedRoleSetting" { @@ -18,7 +18,7 @@ Describe "Set-EntraBetaPrivilegedRoleSetting" { $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" -RoleDefinitionId "b1b1b1b1-cccc-dddd-eeee-f2f2f2f2f2f2" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should return empty object for UserMemberSettings" { $setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting @@ -29,7 +29,7 @@ Describe "Set-EntraBetaPrivilegedRoleSetting" { $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserMemberSettings $temp $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should return empty object for AdminEligibleSettings" { $setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting @@ -38,7 +38,7 @@ Describe "Set-EntraBetaPrivilegedRoleSetting" { $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AdminEligibleSettings $setting $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should return empty object for UserEligibleSettings" { $setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting @@ -52,7 +52,7 @@ Describe "Set-EntraBetaPrivilegedRoleSetting" { $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserEligibleSettings $setting $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should return empty object for AdminMemberSettings" { $setting = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting @@ -65,7 +65,7 @@ Describe "Set-EntraBetaPrivilegedRoleSetting" { $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AdminMemberSettings $temp $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 } It "Should fail when Id is empty" { { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -98,14 +98,14 @@ Describe "Set-EntraBetaPrivilegedRoleSetting" { { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -UserMemberSettings } | Should -Throw "Missing an argument for parameter 'UserMemberSettings'*" } It "Should contain PrivilegedAccessId in parameters when passed ProviderId to it" { - Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Governance + Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Governance $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $params = Get-Parameters -data $result $params.PrivilegedAccessId | Should -Be "MockRoles" } It "Should contain GovernanceRoleSettingId in parameters when passed Id to it" { - Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Governance + Mock -CommandName Update-MgBetaPrivilegedAccessRoleSetting -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Governance $result = Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $params = Get-Parameters -data $result @@ -118,7 +118,7 @@ Describe "Set-EntraBetaPrivilegedRoleSetting" { Set-EntraBetaPrivilegedRoleSetting -ProviderId "MockRoles" -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPrivilegedRoleSetting" - Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Graph.Entra.Beta.Governance -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaPrivilegedAccessRoleSetting -ModuleName Microsoft.Entra.Beta.Governance -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 b/test/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 index 1226ef17e9..e84b855ace 100644 --- a/test/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 +++ b/test/EntraBeta/Groups/Add-EntraBetaGroupMember.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgBetaGroupMember -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName New-MgBetaGroupMember -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Add-EntraBetaGroupMember" { @@ -17,7 +17,7 @@ Describe "Add-EntraBetaGroupMember" { $result = Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName New-MgBetaGroupMember -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -37,7 +37,7 @@ Describe "Add-EntraBetaGroupMember" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName New-MgBetaGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName New-MgBetaGroupMember -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Add-EntraBetaGroupMember" { } It "Should contain DirectoryObjectId in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgBetaGroupMember -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName New-MgBetaGroupMember -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -57,7 +57,7 @@ Describe "Add-EntraBetaGroupMember" { Add-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaGroupMember" - Should -Invoke -CommandName New-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaGroupMember -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 b/test/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 index 54d3053ba4..a563fcaf23 100644 --- a/test/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 +++ b/test/EntraBeta/Groups/Add-EntraBetaGroupOwner.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Add-EntraBetaGroupOwner" { @@ -17,7 +17,7 @@ Describe "Add-EntraBetaGroupOwner" { $result = Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -37,18 +37,18 @@ Describe "Add-EntraBetaGroupOwner" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result $params.GroupId | Should -Be "aaaabbbb-0000-cccc-1111-dddd2222eeee" } It "Should contain BodyParameter in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName New-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/bbbbcccc-1111-dddd-2222-eeee3333ffff"} - Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $BodyParameter.AdditionalProperties.'@odata.id' | Should -Be $value.'@odata.id' Write-Host $BodyParameter.AdditionalProperties.'@odata.id' $true @@ -61,7 +61,7 @@ Describe "Add-EntraBetaGroupOwner" { Add-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaGroupOwner" - Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaGroupOwnerByRef -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 index 0511fb4ca7..e3e1d14d08 100644 --- a/test/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 +++ b/test/EntraBeta/Groups/Get-EntraBetaDeletedGroup.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "Get-EntraBetaDeletedGroup" { @@ -37,7 +37,7 @@ Context "Test for Get-EntraBetaDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should return specific Deleted Group with alias" { $result = Get-EntraBetaDeletedGroup -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -46,7 +46,7 @@ Context "Test for Get-EntraBetaDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { { Get-EntraBetaDeletedGroup -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -58,7 +58,7 @@ Context "Test for Get-EntraBetaDeletedGroup" { $result = Get-EntraBetaDeletedGroup -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when All is invalid" { { Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -70,7 +70,7 @@ Context "Test for Get-EntraBetaDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -85,7 +85,7 @@ Context "Test for Get-EntraBetaDeletedGroup" { $result.DisplayName | Should -Be "Mock-App" $result.GroupTypes | Should -Be "Unified" - Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when filter is empty" { { Get-EntraBetaDeletedGroup -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -97,7 +97,7 @@ Context "Test for Get-EntraBetaDeletedGroup" { $result.MailNickname | Should -Be "Demo-Mock-App" $result.DisplayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when searchstring is empty" { { Get-EntraBetaDeletedGroup -SearchString } | Should -Throw "Missing an argument for parameter 'SearchString'*" @@ -107,7 +107,7 @@ Context "Test for Get-EntraBetaDeletedGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-App' - Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -127,7 +127,7 @@ Context "Test for Get-EntraBetaDeletedGroup" { $result = Get-EntraBetaDeletedGroup -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaDeletedGroup" - Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaDirectoryDeletedItemAsGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 index abb9708746..d2306ae130 100644 --- a/test/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 +++ b/test/EntraBeta/Groups/Get-EntraBetaGroup.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "Get-EntraBetaGroup" { @@ -31,7 +31,7 @@ Describe "Get-EntraBetaGroup" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccc55' - Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -46,7 +46,7 @@ Describe "Get-EntraBetaGroup" { $result = Get-EntraBetaGroup -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when All has an argument" { @@ -58,7 +58,7 @@ Describe "Get-EntraBetaGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'demo' - Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when SearchString is empty" { @@ -70,7 +70,7 @@ Describe "Get-EntraBetaGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'demo' - Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Filter is empty" { @@ -80,7 +80,7 @@ Describe "Get-EntraBetaGroup" { It "Should return top group" { $result = Get-EntraBetaGroup -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when top is empty" { @@ -112,7 +112,7 @@ Describe "Get-EntraBetaGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'demo' - Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -122,7 +122,7 @@ Describe "Get-EntraBetaGroup" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'demo' - Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -133,7 +133,7 @@ Describe "Get-EntraBetaGroup" { $result= Get-EntraBetaGroup -GroupId "bbbbbbbb-1111-2222-3333-cccccccccc55" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroup" - Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 index 9d9c92ca26..7e13d47e3c 100644 --- a/test/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 +++ b/test/EntraBeta/Groups/Get-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "Get-EntraBetaGroupAppRoleAssignment" { @@ -38,7 +38,7 @@ Context "Test for Get-EntraBetaGroupAppRoleAssignment" { $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should return specific Group AppRole Assignment with alias" { $result = Get-EntraBetaGroupAppRoleAssignment -objectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -48,7 +48,7 @@ Context "Test for Get-EntraBetaGroupAppRoleAssignment" { $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when ObjectlId is empty" { { Get-EntraBetaGroupAppRoleAssignment -GroupId } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -64,7 +64,7 @@ Context "Test for Get-EntraBetaGroupAppRoleAssignment" { $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when All is invalid" { { Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -77,7 +77,7 @@ Context "Test for Get-EntraBetaGroupAppRoleAssignment" { $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result.AppRoleId | Should -Be "00001111-aaaa-2222-bbbb-3333cccc4444" - Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -90,7 +90,7 @@ Context "Test for Get-EntraBetaGroupAppRoleAssignment" { $result | Should -Not -BeNullOrEmpty $result.PrincipalDisplayName | Should -Be 'Mock-Group' - Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -109,7 +109,7 @@ Context "Test for Get-EntraBetaGroupAppRoleAssignment" { $result = Get-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 index 0bde4799a2..d8f9d48ac1 100644 --- a/test/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 +++ b/test/EntraBeta/Groups/Get-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "Get-EntraBetaGroupLifecyclePolicy" { @@ -32,7 +32,7 @@ Describe "Get-EntraBetaGroupLifecyclePolicy" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraBetaGroupLifecyclePolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" @@ -49,7 +49,7 @@ Describe "Get-EntraBetaGroupLifecyclePolicy" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.ManagedGroupTypes | Should -Be "All" - Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is empty" { @@ -71,7 +71,7 @@ Describe "Get-EntraBetaGroupLifecyclePolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" - Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Property is empty" { @@ -83,7 +83,7 @@ Describe "Get-EntraBetaGroupLifecyclePolicy" { $result = Get-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 index e02ba3a561..e8ae3736a3 100644 --- a/test/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 +++ b/test/EntraBeta/Groups/Get-EntraBetaGroupMember.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.Groups + if ((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null) { + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaGroupMember -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaGroupMember -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "Get-EntraBetaGroupMember" { @@ -31,7 +31,7 @@ Describe "Get-EntraBetaGroupMember" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is invalid" { { Get-EntraBetaGroupMember -GroupId "" } | Should -Throw "Cannot bind argument to parameter 'GroupId' because it is an empty string." @@ -52,7 +52,7 @@ Describe "Get-EntraBetaGroupMember" { $result = Get-EntraBetaGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when All has an argument" { @@ -63,7 +63,7 @@ Describe "Get-EntraBetaGroupMember" { $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Property parameter should work" { @@ -71,7 +71,7 @@ Describe "Get-EntraBetaGroupMember" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Property is empty" { @@ -83,7 +83,7 @@ Describe "Get-EntraBetaGroupMember" { $result = Get-EntraBetaGroupMember -GroupId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaGroupMember -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 index 7b51502990..a5bce952a2 100644 --- a/test/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 +++ b/test/EntraBeta/Groups/Get-EntraBetaGroupOwner.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { ) } } - Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Invoke-GraphRequest -MockWith $mockResponse -ModuleName Microsoft.Entra.Beta.Groups } Describe "Get-EntraBetaGroupOwner" { @@ -40,7 +40,7 @@ Describe "Get-EntraBetaGroupOwner" { $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' $result.DeletedDateTime | should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Get a group owner by alias" { @@ -49,7 +49,7 @@ Describe "Get-EntraBetaGroupOwner" { $result.Id | should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' $result.DeletedDateTime | should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -64,7 +64,7 @@ Describe "Get-EntraBetaGroupOwner" { $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when All has an argument" { @@ -75,7 +75,7 @@ Describe "Get-EntraBetaGroupOwner" { $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Top 2 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when top is empty" { @@ -105,7 +105,7 @@ Describe "Get-EntraBetaGroupOwner" { $result = Get-EntraBetaGroupOwner -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaGroupOwner" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -115,7 +115,7 @@ Describe "Get-EntraBetaGroupOwner" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when Property is empty" { diff --git a/test/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 b/test/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 index 7cd44e8a28..b53fcb3e4a 100644 --- a/test/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 +++ b/test/EntraBeta/Groups/Get-EntraBetaObjectSetting.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.Groups + if ((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null) { + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,7 +20,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "Get-EntraBetaObjectSetting" { @@ -30,7 +30,7 @@ Describe "Get-EntraBetaObjectSetting" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when TargetType is empty" { { Get-EntraBetaObjectSetting -TargetType } | Should -Throw "Missing an argument for parameter 'TargetType'*" @@ -45,7 +45,7 @@ Describe "Get-EntraBetaObjectSetting" { $result = Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when All has an argument" { { Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $true } | Should -Throw "A positional parameter cannot be found that accepts argument 'True'.*" @@ -56,7 +56,7 @@ Describe "Get-EntraBetaObjectSetting" { $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should contain ID in parameters when passed TargetType TargetObjectId to it" { @@ -73,7 +73,7 @@ Describe "Get-EntraBetaObjectSetting" { $result = Get-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaObjectSetting" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 b/test/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 index c8f445e239..9154cc2f89 100644 --- a/test/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 +++ b/test/EntraBeta/Groups/New-EntraBetaGroup.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -29,7 +29,7 @@ BeforeAll { } ) } - Mock -CommandName New-MgBetaGroup -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName New-MgBetaGroup -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "New-EntraBetaGroup" { @@ -51,7 +51,7 @@ Describe "New-EntraBetaGroup" { $result.CreatedByAppId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc56" $result.Id | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" - Should -Invoke -CommandName New-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName New-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when parameters are empty" { @@ -79,7 +79,7 @@ Describe "New-EntraBetaGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaGroup" - Should -Invoke -CommandName New-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 index 82d74bcdea..3db6aa0ccc 100644 --- a/test/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 +++ b/test/EntraBeta/Groups/New-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { ) } - Mock -CommandName New-MgBetaGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName New-MgBetaGroupAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "New-EntraBetaGroupAppRoleAssignment" { @@ -38,7 +38,7 @@ Context "Test for New-EntraBetaGroupAppRoleAssignment" { $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should return created Group AppRole Assignment with alias" { $result = New-EntraBetaGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -48,7 +48,7 @@ Context "Test for New-EntraBetaGroupAppRoleAssignment" { $result.PrincipalId | Should -Be "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result.AppRoleId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when ObjectlId is empty" { { New-EntraBetaGroupAppRoleAssignment -GroupId -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -88,7 +88,7 @@ Context "Test for New-EntraBetaGroupAppRoleAssignment" { $result = New-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -PrincipalId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -ResourceId "aaaaaaaa-bbbb-cccc-1111-222222222222" -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 b/test/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 index 816d1c877e..4e68916f9b 100644 --- a/test/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 +++ b/test/EntraBeta/Groups/New-EntraBetaObjectSetting.Tests.ps1 @@ -2,11 +2,11 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -43,8 +43,8 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "New-EntraBetaObjectSetting" { Context "Test for New-EntraBetaObjectSetting" { @@ -58,7 +58,7 @@ Describe "New-EntraBetaObjectSetting" { $result.Id | Should -Be "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result.templateId | Should -be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when TargetType is empty" { $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} @@ -102,7 +102,7 @@ Describe "New-EntraBetaObjectSetting" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaObjectSetting" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 index a73800fcfd..9c51a36ad0 100644 --- a/test/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 +++ b/test/EntraBeta/Groups/Remove-EntraBetaGroup.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroup -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Remove-EntraBetaGroup" { @@ -17,14 +17,14 @@ Describe "Remove-EntraBetaGroup" { $result = Remove-EntraBetaGroup -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraBetaGroup -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -36,7 +36,7 @@ Describe "Remove-EntraBetaGroup" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgBetaGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroup -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Remove-EntraBetaGroup -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $params = Get-Parameters -data $result @@ -51,7 +51,7 @@ Describe "Remove-EntraBetaGroup" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroup" - Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 index eab382f6dd..84961dbfdd 100644 --- a/test/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 +++ b/test/EntraBeta/Groups/Remove-EntraBetaGroupAppRoleAssignment.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupAppRoleAssignment -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Remove-EntraBetaGroupAppRoleAssignment" { @@ -16,13 +16,13 @@ Describe "Remove-EntraBetaGroupAppRoleAssignment" { $result = Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should return empty object with Alias" { $result = Remove-EntraBetaGroupAppRoleAssignment -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { { Remove-EntraBetaGroupAppRoleAssignment -GroupId -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" } | Should -Throw "Missing an argument for parameter 'GroupId'*" @@ -37,7 +37,7 @@ Describe "Remove-EntraBetaGroupAppRoleAssignment" { { Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "" } | Should -Throw "Cannot bind argument to parameter 'AppRoleAssignmentId' because it is an empty string." } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgBetaGroupAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" $params = Get-Parameters -data $result @@ -47,7 +47,7 @@ Describe "Remove-EntraBetaGroupAppRoleAssignment" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupAppRoleAssignment" Remove-EntraBetaGroupAppRoleAssignment -GroupId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -AppRoleAssignmentId "a0a0a0a0-bbbb-cccc-dddd-e1e1e1e1e1e1" - Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaGroupAppRoleAssignment -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 index c9b0dcf3dd..491892bc25 100644 --- a/test/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 +++ b/test/EntraBeta/Groups/Remove-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupLifecyclePolicy -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Remove-EntraBetaGroupLifecyclePolicy" { @@ -17,14 +17,14 @@ Describe "Remove-EntraBetaGroupLifecyclePolicy" { $result = Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraBetaGroupLifecyclePolicy -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupLifecyclePolicyId is empty" { @@ -36,7 +36,7 @@ Describe "Remove-EntraBetaGroupLifecyclePolicy" { } It "Should contain GroupLifecyclePolicyId in parameters when passed GroupLifecyclePolicyId to it" { - Mock -CommandName Remove-MgBetaGroupLifecyclePolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupLifecyclePolicy -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $params = Get-Parameters -data $result @@ -48,7 +48,7 @@ Describe "Remove-EntraBetaGroupLifecyclePolicy" { $result = Remove-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupLifecyclePolicy" - Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 index 71791befa9..1663daf260 100644 --- a/test/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 +++ b/test/EntraBeta/Groups/Remove-EntraBetaGroupMember.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaGroupMemberByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupMemberByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Remove-EntraBetaGroupMember" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaGroupMember" { $result = Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaGroupMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Remove-MgBetaGroupMemberByRef -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -37,7 +37,7 @@ Describe "Remove-EntraBetaGroupMember" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgBetaGroupMemberByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupMemberByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -49,7 +49,7 @@ Describe "Remove-EntraBetaGroupMember" { $result = Remove-EntraBetaGroupMember -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -MemberId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupMember" - Should -Invoke -CommandName Remove-MgBetaGroupMemberByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaGroupMemberByRef -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 index 2f0a568b2b..2960ded66d 100644 --- a/test/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 +++ b/test/EntraBeta/Groups/Remove-EntraBetaGroupOwner.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Remove-EntraBetaGroupOwner" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaGroupOwner" { $result = Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Remove-MgBetaGroupOwnerByRef -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -37,7 +37,7 @@ Describe "Remove-EntraBetaGroupOwner" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraBetaGroupOwner" { } It "Should contain DirectoryObjectId in parameters when passed OwnerId to it" { - Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Remove-MgBetaGroupOwnerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -57,7 +57,7 @@ Describe "Remove-EntraBetaGroupOwner" { $result = Remove-EntraBetaGroupOwner -GroupId "aaaabbbb-0000-cccc-1111-dddd2222eeee" -OwnerId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaGroupOwner" - Should -Invoke -CommandName Remove-MgBetaGroupOwnerByRef -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaGroupOwnerByRef -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 b/test/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 index 16e197c2af..2b1297b52c 100644 --- a/test/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 +++ b/test/EntraBeta/Groups/Remove-EntraBetaObjectSetting.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Remove-EntraBetaObjectSetting" { Context "Test for Remove-EntraBetaObjectSetting" { @@ -15,7 +15,7 @@ Describe "Remove-EntraBetaObjectSetting" { $result = Remove-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when TargetType is empty" { { Remove-EntraBetaObjectSetting -TargetType -TargetObjectId "aaaaaaaa-5a8c-4f5a-a368-cccccccccccc" -Id "dddddddd-7902-4be2-a25b-dddddddddddd" } | Should -Throw "Missing an argument for parameter 'TargetType'*" @@ -42,7 +42,7 @@ Describe "Remove-EntraBetaObjectSetting" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaObjectSetting" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 b/test/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 index bb994f2f0c..52afed068c 100644 --- a/test/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 +++ b/test/EntraBeta/Groups/Set-EntraBetaGroup.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaGroup -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Update-MgBetaGroup -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Set-EntraBetaGroup" { @@ -17,14 +17,14 @@ Describe "Set-EntraBetaGroup" { $result = Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Description "Update Group" -DisplayName "Update My Test san" -MailEnabled $false -MailNickname "Update nickname" -SecurityEnabled $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraBetaGroup -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Description "Update Group" -DisplayName "Update My Test san" -MailEnabled $false -MailNickname "Update nickname" -SecurityEnabled $true $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when GroupId is empty" { @@ -60,7 +60,7 @@ Describe "Set-EntraBetaGroup" { } It "Should contain GroupId in parameters when passed GroupId to it" { - Mock -CommandName Update-MgBetaGroup -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Update-MgBetaGroup -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Groups $result = Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $params = Get-Parameters -data $result @@ -72,7 +72,7 @@ Describe "Set-EntraBetaGroup" { $result = Set-EntraBetaGroup -GroupId "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaGroup" - Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaGroup -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 b/test/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 index 547138a569..1c64b1785c 100644 --- a/test/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 +++ b/test/EntraBeta/Groups/Set-EntraBetaGroupLifecyclePolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.Groups + if ((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null) { + Import-Module Microsoft.Entra.Beta.Groups } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -19,7 +19,7 @@ BeforeAll { ) } - Mock -CommandName Update-MgBetaGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Update-MgBetaGroupLifecyclePolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Groups } Describe "Set-EntraBetaGroupLifecyclePolicy" { @@ -32,7 +32,7 @@ Describe "Set-EntraBetaGroupLifecyclePolicy" { $result.ManagedGroupTypes | should -Be "All" $result.AlternateNotificationEmails | should -Be "admingroup@contoso.com" - Should -Invoke -CommandName Update-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Update-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should execute successfully with Alias" { $result = Set-EntraBetaGroupLifecyclePolicy -Id "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" @@ -65,7 +65,7 @@ Describe "Set-EntraBetaGroupLifecyclePolicy" { $result = Set-EntraBetaGroupLifecyclePolicy -GroupLifecyclePolicyId "a47d4510-08c8-4437-99e9-71ca88e7af0f" -GroupLifetimeInDays 200 -AlternateNotificationEmails "admingroup@contoso.com" -ManagedGroupTypes "All" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaGroupLifecyclePolicy -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 b/test/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 index 0a3420c612..551aef7aca 100644 --- a/test/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 +++ b/test/EntraBeta/Groups/Set-EntraBetaObjectSetting.Tests.ps1 @@ -2,11 +2,11 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Groups) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Groups + if((Get-Module -Name Microsoft.Entra.Beta.Groups) -eq $null){ + Import-Module Microsoft.Entra.Beta.Groups } - if((Get-Module -Name Microsoft.Graph.Entra.Beta.DirectoryManagement) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.DirectoryManagement + if((Get-Module -Name Microsoft.Entra.Beta.DirectoryManagement) -eq $null){ + Import-Module Microsoft.Entra.Beta.DirectoryManagement } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,8 +28,8 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Graph.Entra.Beta.DirectoryManagement - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Groups + Mock -CommandName Get-MgBetaDirectorySettingTemplate -MockWith $TemplateScriptblock -ModuleName Microsoft.Entra.Beta.DirectoryManagement + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.Groups } Describe "Set-EntraBetaObjectSetting" { Context "Test for Set-EntraBetaObjectSetting" { @@ -41,7 +41,7 @@ Describe "Set-EntraBetaObjectSetting" { $result = Set-EntraBetaObjectSetting -TargetType "Groups" -TargetObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -DirectorySetting $settingsCopy $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 } It "Should fail when TargetType is empty" { $template = Get-EntraBetaDirectorySettingTemplate | Where-Object {$_.displayname -eq "group.unified.guest"} @@ -95,7 +95,7 @@ Describe "Set-EntraBetaObjectSetting" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaObjectSetting" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Groups -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Groups -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 b/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 index 51512fa6a3..29ef515ebe 100644 --- a/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 +++ b/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Reports + if((Get-Module -Name Microsoft.Entra.Beta.Reports) -eq $null){ + Import-Module Microsoft.Entra.Beta.Reports } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -27,7 +27,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Reports + Mock -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Reports } Describe "Get-EntraBetaApplicationSignInDetailedSummary" { @@ -39,7 +39,7 @@ Describe "Get-EntraBetaApplicationSignInDetailedSummary" { $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" $result.AppId | Should -Be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" - Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when filter is empty" { { Get-EntraBetaApplicationSignInDetailedSummary -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -49,7 +49,7 @@ Describe "Get-EntraBetaApplicationSignInDetailedSummary" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaApplicationSignInDetailedSummary -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -65,7 +65,7 @@ Describe "Get-EntraBetaApplicationSignInDetailedSummary" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaApplicationSignInDetailedSummary" - Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaReportApplicationSignInDetailedSummary -ModuleName Microsoft.Entra.Beta.Reports -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 b/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 index 841d8ab180..18beab78eb 100644 --- a/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 +++ b/test/EntraBeta/Reports/Get-EntraBetaApplicationSignInSummary.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Reports + if((Get-Module -Name Microsoft.Entra.Beta.Reports) -eq $null){ + Import-Module Microsoft.Entra.Beta.Reports } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ $scriptblock = { } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Reports + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Reports } Describe "Get-EntraBetaApplicationSignInSummary" { @@ -40,7 +40,7 @@ Describe "Get-EntraBetaApplicationSignInSummary" { $result.AppDisplayName | Should -Be "Mock Portal" $result.AppId | Should -be "dddddddd-1111-2222-3333-aaaaaaaaaaaa" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when Days is empty" { { Get-EntraBetaApplicationSignInSummary -Days } | Should -Throw "Missing an argument for parameter 'Days'*" @@ -50,7 +50,7 @@ Describe "Get-EntraBetaApplicationSignInSummary" { $result | Should -Not -BeNullOrEmpty $result.AppDisplayName | Should -Be "Mock Portal" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when filter is empty" { { Get-EntraBetaApplicationSignInDetailedSummary -Filter } | Should -Throw "Missing an argument for parameter 'Filter'*" @@ -60,7 +60,7 @@ Describe "Get-EntraBetaApplicationSignInSummary" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaApplicationSignInSummary -Days "7" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -73,7 +73,7 @@ Describe "Get-EntraBetaApplicationSignInSummary" { $result = Get-EntraBetaApplicationSignInSummary -Days "30" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Reports -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 b/test/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 index 32e410dc56..2efa9f2b8f 100644 --- a/test/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 +++ b/test/EntraBeta/Reports/Get-EntraBetaAuditDirectoryLog.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Reports + if((Get-Module -Name Microsoft.Entra.Beta.Reports) -eq $null){ + Import-Module Microsoft.Entra.Beta.Reports } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -41,7 +41,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaAuditLogDirectoryAudit -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Reports + Mock -CommandName Get-MgBetaAuditLogDirectoryAudit -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Reports } Describe "Get-EntraBetaAuditDirectoryLog" { @@ -49,7 +49,7 @@ Describe "Get-EntraBetaAuditDirectoryLog" { It "Should get all logs" { $result = Get-EntraBetaAuditDirectoryLog -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when All has argument" { @@ -66,7 +66,7 @@ Describe "Get-EntraBetaAuditDirectoryLog" { $result.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result.LoggedByService | Should -Be "Self-service Group Management" - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when top is empty" { @@ -87,7 +87,7 @@ Describe "Get-EntraBetaAuditDirectoryLog" { $result.Id | Should -Be "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result.LoggedByService | Should -Be "Self-service Group Management" - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when Filter is empty" { @@ -98,14 +98,14 @@ Describe "Get-EntraBetaAuditDirectoryLog" { $result = Get-EntraBetaAuditDirectoryLog -Filter "result eq 'success'" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should get all audit logs with a given result(failure)" { $result = Get-EntraBetaAuditDirectoryLog -Filter "result eq 'failure'" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Property parameter should work" { @@ -113,7 +113,7 @@ Describe "Get-EntraBetaAuditDirectoryLog" { $result | Should -Not -BeNullOrEmpty $result.ActivityDisplayName | Should -Be 'GroupsODataV4_GetgroupLifecyclePolicies' - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaAuditDirectoryLog -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -124,7 +124,7 @@ Describe "Get-EntraBetaAuditDirectoryLog" { $result= Get-EntraBetaAuditDirectoryLog $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditDirectoryLog" - Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaAuditLogDirectoryAudit -ModuleName Microsoft.Entra.Beta.Reports -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 b/test/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 index f8fde9c6ac..59ee1dd86b 100644 --- a/test/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 +++ b/test/EntraBeta/Reports/Get-EntraBetaAuditSignInLog.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Reports) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Reports + if((Get-Module -Name Microsoft.Entra.Beta.Reports) -eq $null){ + Import-Module Microsoft.Entra.Beta.Reports } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -180,7 +180,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaAuditLogSignIn -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Reports + Mock -CommandName Get-MgBetaAuditLogSignIn -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Reports } Describe "Get-EntraBetaAuditSignInLog" { @@ -188,7 +188,7 @@ Describe "Get-EntraBetaAuditSignInLog" { It "Should get all logs" { $result = Get-EntraBetaAuditSignInLog -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when All has an argument" { @@ -208,7 +208,7 @@ Describe "Get-EntraBetaAuditSignInLog" { $result.UserPrincipalName | Should -Be "test@contoso.com" $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when top is empty" { @@ -232,7 +232,7 @@ Describe "Get-EntraBetaAuditSignInLog" { $result.UserPrincipalName | Should -Be "test@contoso.com" $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should get audit sign-in logs containing a given userPrincipalName" { @@ -248,7 +248,7 @@ Describe "Get-EntraBetaAuditSignInLog" { $result.UserPrincipalName | Should -Be "test@contoso.com" $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should get audit sign-in logs containing a given appId" { @@ -264,7 +264,7 @@ Describe "Get-EntraBetaAuditSignInLog" { $result.UserPrincipalName | Should -Be "test@contoso.com" $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should get audit sign-in logs containing a given appDisplayName" { @@ -280,7 +280,7 @@ Describe "Get-EntraBetaAuditSignInLog" { $result.UserPrincipalName | Should -Be "test@contoso.com" $result.UserId | Should -Be "bbbbbbbb-1111-2222-3333-cccccccccccc" - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when Filter is empty" { @@ -291,21 +291,21 @@ Describe "Get-EntraBetaAuditSignInLog" { $result = Get-EntraBetaAuditSignInLog -Filter "result eq 'success'" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should get all sign-in logs with a given result(failure)" { $result = Get-EntraBetaAuditSignInLog -Filter "result eq 'failure'" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Property parameter should work" { $result = Get-EntraBetaAuditSignInLog -Property AppDisplayName $result | Should -Not -BeNullOrEmpty $result.AppDisplayName | Should -Be 'Azure Active Directory PowerShell' - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 } It "Should fail when Property is empty" { @@ -317,7 +317,7 @@ Describe "Get-EntraBetaAuditSignInLog" { $result= Get-EntraBetaAuditSignInLog $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaAuditSignInLog" - Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Graph.Entra.Beta.Reports -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaAuditLogSignIn -ModuleName Microsoft.Entra.Beta.Reports -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 index 069c37d2d3..0b073e343f 100644 --- a/test/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ b/test/EntraBeta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { @@ -17,7 +17,7 @@ Describe "Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { @@ -37,7 +37,7 @@ Describe "Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { } It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { - Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.SignIns $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { } It "Should contain OdataId in parameters when passed RefObjectId to it" { - Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.SignIns $result = Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $value = "https://graph.microsoft.com/v1.0/directoryObjects/bbbbcccc-1111-dddd-2222-eeee3333ffff" @@ -59,7 +59,7 @@ Describe "Add-EntraBetaFeatureRolloutPolicyDirectoryObject" { Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "aaaabbbb-0000-cccc-1111-dddd2222eeee" -RefObjectId "bbbbcccc-1111-dddd-2222-eeee3333ffff" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaFeatureRolloutPolicyDirectoryObject" - Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaDirectoryFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 index f36eb6778c..c36fd7b21d 100644 --- a/test/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Add-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Add-EntraBetaServicePrincipalPolicy" { @@ -17,7 +17,7 @@ Describe "Add-EntraBetaServicePrincipalPolicy" { $result = Add-EntraBetaServicePrincipalPolicy -Id "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" -RefObjectId "bbbbbbbb-7777-8888-9999-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { { Add-EntraBetaServicePrincipalPolicy -Id -RefObjectId "bbbbbbbb-7777-8888-9999-cccccccccccc" } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -38,7 +38,7 @@ Describe "Add-EntraBetaServicePrincipalPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Add-EntraBetaServicePrincipalPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 index 1f2bc03968..bc15ab517a 100644 --- a/test/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Get-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { } ) } - Mock -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Get-EntraBetaFeatureRolloutPolicy" { @@ -41,7 +41,7 @@ Describe "Get-EntraBetaFeatureRolloutPolicy" { $result.AppliesTo | should -BeNullOrEmpty $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" - Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { @@ -56,7 +56,7 @@ Describe "Get-EntraBetaFeatureRolloutPolicy" { $displayName = Get-EntraBetaFeatureRolloutPolicy -Filter "DisplayName eq 'Feature-Rollout-Policytest'" $displayName | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Filter is empty" { @@ -67,7 +67,7 @@ Describe "Get-EntraBetaFeatureRolloutPolicy" { $searchString = Get-EntraBetaFeatureRolloutPolicy -SearchString "Feature-Rollout-Policytest" $searchString | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when SearchString is empty" { @@ -97,7 +97,7 @@ Describe "Get-EntraBetaFeatureRolloutPolicy" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Feature-Rollout-Policytest' - Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -108,7 +108,7 @@ Describe "Get-EntraBetaFeatureRolloutPolicy" { $result = Get-EntraBetaFeatureRolloutPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccc55" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaFeatureRolloutPolicy" - Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 index 7200b0957a..5bc56d6762 100644 --- a/test/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Get-EntraBetaPermissionGrantPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if ((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -21,7 +21,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Get-MgBetaPolicyPermissionGrantPolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Get-EntraBetaPermissionGrantPolicy" { @@ -31,7 +31,7 @@ Describe "Get-EntraBetaPermissionGrantPolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be "microsoft-all-application-permissions" - Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { { Get-EntraBetaPermissionGrantPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -53,7 +53,7 @@ Describe "Get-EntraBetaPermissionGrantPolicy" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'All application' - Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaPermissionGrantPolicy -Id "microsoft-all-application-permissions" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -66,7 +66,7 @@ Describe "Get-EntraBetaPermissionGrantPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPermissionGrantPolicy" - Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaPolicyPermissionGrantPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 index 7be65c068f..4687a239f2 100644 --- a/test/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Get-EntraBetaPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if ((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -42,7 +42,7 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $ScriptBlock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Get-EntraBetaPolicy" { Context "Test for Get-EntraBetaPolicy" { @@ -52,20 +52,20 @@ Describe "Get-EntraBetaPolicy" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Contain 'bbbbbbbb-1111-2222-3333-cccccccccccc' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should return all Policies" { $result = Get-EntraBetaPolicy -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should return all Policy" { $result = Get-EntraBetaPolicy -Top 1 $result | Should -Not -BeNullOrEmpty $result | Should -HaveCount 1 - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is invalid" { { Get-EntraBetaPolicy -Id "" } | Should -Throw "Cannot bind argument to parameter 'Id' because it is an empty string." @@ -88,7 +88,7 @@ Describe "Get-EntraBetaPolicy" { $result = Get-EntraBetaPolicy -Id "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 index 173b576e63..100bbda9df 100644 --- a/test/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 +++ b/test/EntraBeta/SignIns/Get-EntraBetaPolicyAppliedObject.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -28,7 +28,7 @@ $scriptblock = { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Get-EntraBetaPolicyAppliedObject" { @@ -40,7 +40,7 @@ Describe "Get-EntraBetaPolicyAppliedObject" { $result.displayName | Should -Be "Mock policy Object" $result.servicePrincipalNames | Should -be "Mock service principal" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { { Get-EntraBetaPolicyAppliedObject -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -60,7 +60,7 @@ Describe "Get-EntraBetaPolicyAppliedObject" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaPolicyAppliedObject" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 index 31b0df9d78..860fa4ca60 100644 --- a/test/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Get-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -31,7 +31,7 @@ $scriptblock = { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Get-EntraBetaServicePrincipalPolicy" { @@ -42,7 +42,7 @@ Describe "Get-EntraBetaServicePrincipalPolicy" { $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" $result.displayName | Should -Be "Mock policy" $result.ServicePrincipalType | Should -be "activityBasedTimeoutPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { { Get-EntraBetaServicePrincipalPolicy -Id } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -61,7 +61,7 @@ Describe "Get-EntraBetaServicePrincipalPolicy" { $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaServicePrincipalPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 index 523c632b45..0031072d54 100644 --- a/test/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/New-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -25,7 +25,7 @@ BeforeAll { } ) } - Mock -CommandName New-MgBetaPolicyFeatureRolloutPolicy -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName New-MgBetaPolicyFeatureRolloutPolicy -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "New-EntraBetaFeatureRolloutPolicy" { @@ -41,7 +41,7 @@ Describe "New-EntraBetaFeatureRolloutPolicy" { $result.AppliesTo | should -BeNullOrEmpty $result.ObjectId | should -Be "bbbbbbbb-1111-2222-3333-cccccccccc55" - Should -Invoke -CommandName New-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName New-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Feature is empty" { @@ -101,7 +101,7 @@ Describe "New-EntraBetaFeatureRolloutPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaFeatureRolloutPolicy" - Should -Invoke -CommandName New-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName New-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 b/test/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 index 9fef2ee19f..2883a15155 100644 --- a/test/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 +++ b/test/EntraBeta/SignIns/New-EntraBetaOauth2PermissionGrant.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if ((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "New-EntraBetaOauth2PermissionGrant" { @@ -38,7 +38,7 @@ Describe "New-EntraBetaOauth2PermissionGrant" { $result.ResourceId | should -Be "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" $result.Scope | should -Be "DelegatedPermissionGrant.ReadWrite.All" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when ClientId is invalid" { { New-EntraBetaOauth2PermissionGrant -ClientId "" } | Should -Throw "Cannot bind argument to parameter 'ClientId'*" @@ -71,7 +71,7 @@ Describe "New-EntraBetaOauth2PermissionGrant" { $result= New-EntraBetaOauth2PermissionGrant -ClientId "bbbbbbbb-1111-2222-3333-cccccccccccc" -ConsentType "AllPrincipals" -ResourceId "bbbbbbbb-1111-2222-3333-rrrrrrrrrrrr" -Scope "DelegatedPermissionGrant.ReadWrite.All" -StartTime $startTime -ExpiryTime $expiryTime $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaOauth2PermissionGrant" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 index e6589caaad..8f7d4dde7b 100644 --- a/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -MockWith {} -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Remove-EntraBetaFeatureRolloutPolicy" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaFeatureRolloutPolicy" { $result = Remove-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { @@ -29,7 +29,7 @@ Describe "Remove-EntraBetaFeatureRolloutPolicy" { } It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { - Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -MockWith {$args} -ModuleName Microsoft.Entra.Beta.SignIns $result = Remove-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" $params = Get-Parameters -data $result @@ -41,7 +41,7 @@ Describe "Remove-EntraBetaFeatureRolloutPolicy" { $result = Remove-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicy" - Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 index 3a8ceb779d..5ae23ff974 100644 --- a/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 +++ b/test/EntraBeta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { @@ -37,7 +37,7 @@ Describe "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { } It "Should contain DirectoryObjectId in parameters when passed ObjectId to it" { - Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.SignIns $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $params = Get-Parameters -data $result @@ -45,7 +45,7 @@ Describe "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { } It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { - Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.SignIns $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $params = Get-Parameters -data $result @@ -57,7 +57,7 @@ Describe "Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" { $result = Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -ObjectId "aaaabbbb-0000-cccc-1111-dddd2222eeee" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaFeatureRolloutPolicyDirectoryObject" - Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaPolicyFeatureRolloutPolicyApplyToByRef -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 index 0964ff8f28..8f41939023 100644 --- a/test/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Remove-EntraBetaPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if ((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $ScriptBlock = { @@ -14,7 +14,7 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Remove-EntraBetaPolicy" { @@ -22,7 +22,7 @@ Describe "Remove-EntraBetaPolicy" { It "Should remove policy" { $result = Remove-EntraBetaPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" #$result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { @@ -38,7 +38,7 @@ Describe "Remove-EntraBetaPolicy" { Remove-EntraBetaPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' -eq $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 index 909c7d7139..220af8ad06 100644 --- a/test/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Remove-EntraBetaServicePrincipalPolicy.Tests.ps1 @@ -2,13 +2,13 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Remove-EntraBetaServicePrincipalPolicy" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaServicePrincipalPolicy" { $result = Remove-EntraBetaServicePrincipalPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { { Remove-EntraBetaServicePrincipalPolicy -Id -PolicyId "1aaaaaa1-2bb2-3cc3-4dd4-5eeeeeeeeee5" } | Should -Throw "Missing an argument for parameter 'Id'*" @@ -38,7 +38,7 @@ Describe "Remove-EntraBetaServicePrincipalPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaServicePrincipalPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 index c4befe3344..daba8328bf 100644 --- a/test/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaTrustFrameworkPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Remove-MgBetaTrustFrameworkPolicy -MockWith {} -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Remove-EntraBetaTrustFrameworkPolicy" { @@ -17,7 +17,7 @@ Describe "Remove-EntraBetaTrustFrameworkPolicy" { $result = Remove-EntraBetaTrustFrameworkPolicy -Id "B2C_1A_TRUSTFRAMEWORKLOCALIZATION" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaTrustFrameworkPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Remove-MgBetaTrustFrameworkPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { @@ -29,7 +29,7 @@ Describe "Remove-EntraBetaTrustFrameworkPolicy" { } It "Should contain TrustFrameworkPolicyId in parameters when passed Id to it" { - Mock -CommandName Remove-MgBetaTrustFrameworkPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Remove-MgBetaTrustFrameworkPolicy -MockWith {$args} -ModuleName Microsoft.Entra.Beta.SignIns $result = Remove-EntraBetaTrustFrameworkPolicy -Id "B2C_1A_TRUSTFRAMEWORKLOCALIZATION" $params = Get-Parameters -data $result @@ -41,7 +41,7 @@ Describe "Remove-EntraBetaTrustFrameworkPolicy" { $result = Remove-EntraBetaTrustFrameworkPolicy -Id "B2C_1A_TRUSTFRAMEWORKLOCALIZATION" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaTrustFrameworkPolicy" - Should -Invoke -CommandName Remove-MgBetaTrustFrameworkPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaTrustFrameworkPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 index 0e05cf9deb..8548dcb754 100644 --- a/test/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Set-EntraBetaFeatureRolloutPolicy.Tests.ps1 @@ -3,12 +3,12 @@ # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null){ + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -MockWith {} -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Set-EntraBetaFeatureRolloutPolicy" { @@ -17,7 +17,7 @@ Describe "Set-EntraBetaFeatureRolloutPolicy" { $result = Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Feature is empty" { @@ -61,7 +61,7 @@ Describe "Set-EntraBetaFeatureRolloutPolicy" { } It "Should contain FeatureRolloutPolicyId in parameters when passed Id to it" { - Mock -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -MockWith {$args} -ModuleName Microsoft.Entra.Beta.SignIns $result = Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" $params = Get-Parameters -data $result @@ -72,7 +72,7 @@ Describe "Set-EntraBetaFeatureRolloutPolicy" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaFeatureRolloutPolicy" Set-EntraBetaFeatureRolloutPolicy -Id "bbbbcccc-1111-dddd-2222-eeee3333ffff" -Feature "passwordHashSync" -DisplayName "Feature-Rollout-Policytest" -IsEnabled $true -IsAppliedToOrganization $false -Description "Feature-Rollout-test" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaFeatureRolloutPolicy" - Should -Invoke -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaPolicyFeatureRolloutPolicy -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 b/test/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 index 3af495e065..121746d4b7 100644 --- a/test/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 +++ b/test/EntraBeta/SignIns/Set-EntraBetaPolicy.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.SignIns) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.SignIns + if ((Get-Module -Name Microsoft.Entra.Beta.SignIns) -eq $null) { + Import-Module Microsoft.Entra.Beta.SignIns } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -17,14 +17,14 @@ BeforeAll { return $response } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.SignIns } Describe "Set-EntraBetaPolicy" { Context "Test for Set-EntraBetaPolicy" { It "Should return updated Policy" { Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Definition @('{"homeRealmDiscoveryPolicies":{"AlternateLoginIDLookup":true, "IncludedUserIds":["UserID"]}}') -DisplayName "new update 13" -IsOrganizationDefault $false - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should fail when Id is empty" { @@ -68,16 +68,16 @@ Describe "Set-EntraBetaPolicy" { } It "Should return updated Policy when passes Type" { - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.SignIns + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.SignIns Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" -Type "HomeRealmDiscoveryPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 } It "Should contain 'User-Agent' header" { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPolicy" Set-EntraBetaPolicy -Id "00aa00aa-bb11-cc22-dd33-44ee44ee44ee" $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaPolicy" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.SignIns -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.SignIns -Times 1 -ParameterFilter { $Headers.'User-Agent' -eq $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 index 40e5e605c8..897c1faa0c 100644 --- a/test/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 +++ b/test/EntraBeta/Users/Get-EntraBetaUser.Tests.ps1 @@ -3,8 +3,8 @@ # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.Users + if ((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null) { + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -49,7 +49,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Users } Describe "Get-EntraBetaUser" { @@ -60,7 +60,7 @@ Describe "Get-EntraBetaUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should contain 'User-Agent' header" { @@ -68,7 +68,7 @@ Describe "Get-EntraBetaUser" { $result = Get-EntraBetaUser -Top 1 $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUser" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -85,7 +85,7 @@ Describe "Get-EntraBetaUser" { It "Should return all contact" { $result = Get-EntraBetaUser -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when All has an argument" { @@ -96,7 +96,7 @@ Describe "Get-EntraBetaUser" { $result = Get-EntraBetaUser -Top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when top is empty" { @@ -112,7 +112,7 @@ Describe "Get-EntraBetaUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should return specific user by search string" { @@ -120,7 +120,7 @@ Describe "Get-EntraBetaUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } @@ -137,7 +137,7 @@ Describe "Get-EntraBetaUser" { $result | Should -Not -BeNullOrEmpty $result.DisplayName | Should -Be 'Mock-User' - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when Property is empty" { @@ -148,7 +148,7 @@ Describe "Get-EntraBetaUser" { $result = Get-EntraBetaUser -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $UserId | Should -Be $null $true } @@ -172,7 +172,7 @@ Describe "Get-EntraBetaUser" { $result | Should -Not -BeNullOrEmpty $result.Id | should -Be @('bbbbbbbb-1111-2222-3333-cccccccccccc') - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } } } diff --git a/test/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 index e329fc36de..dee10058a8 100644 --- a/test/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 +++ b/test/EntraBeta/Users/Get-EntraBetaUserExtension.Tests.ps1 @@ -1,6 +1,6 @@ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.Users + if ((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null) { + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -14,7 +14,7 @@ BeforeAll { } } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Users } Describe "Get-EntraBetaUserExtension" { Context "Test for Get-EntraBetaUserExtension" { @@ -22,14 +22,14 @@ Describe "Get-EntraBetaUserExtension" { $result = Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should contain 'User-Agent' header" { @@ -37,7 +37,7 @@ Describe "Get-EntraBetaUserExtension" { $result = Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } @@ -55,7 +55,7 @@ Describe "Get-EntraBetaUserExtension" { $result = Get-EntraBetaUserExtension -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property DisplayName $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when Property is empty" { diff --git a/test/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 index 10ed0626f8..39fedea276 100644 --- a/test/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 +++ b/test/EntraBeta/Users/Get-EntraBetaUserLicenseDetail.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -20,7 +20,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaUserLicenseDetail -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Get-MgBetaUserLicenseDetail -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Users } Describe "Get-EntraBetaUserLicenseDetail" { @@ -35,7 +35,7 @@ Describe "Get-EntraBetaUserLicenseDetail" { $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] - Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should return specific User License Detail alias" { $result = Get-EntraBetaUserLicenseDetail -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" @@ -47,7 +47,7 @@ Describe "Get-EntraBetaUserLicenseDetail" { $result.SkuPartNumber | Should -Be "ENTERPRISEPREMIUM" $result.AdditionalProperties | Should -BeOfType [System.Collections.Hashtable] - Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when UserId is empty string" { @@ -72,7 +72,7 @@ Describe "Get-EntraBetaUserLicenseDetail" { $result = Get-EntraBetaUserLicenseDetail -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserLicenseDetail" - Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaUserLicenseDetail -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 index 44d1be83d5..0c669824f1 100644 --- a/test/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 +++ b/test/EntraBeta/Users/Get-EntraBetaUserManager.Tests.ps1 @@ -1,6 +1,6 @@ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -82,7 +82,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaUserManager -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Get-MgBetaUserManager -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Users } Describe "Get-EntraBetaUserManager" { @@ -103,7 +103,7 @@ Describe "Get-EntraBetaUserManager" { $result.identities[0].issuer | Should -Be "contoso.com" $result.identities[0].issuerAssignedId | Should -Be "MiriamG@contoso.com" - Should -Invoke -CommandName Get-MgBetaUserManager -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserManager -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when ObjectId is empty" { @@ -138,7 +138,7 @@ Describe "Get-EntraBetaUserManager" { $result = Get-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserManager" - Should -Invoke -CommandName Get-MgBetaUserManager -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaUserManager -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 index 23e392d5c8..f069562eca 100644 --- a/test/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 +++ b/test/EntraBeta/Users/Get-EntraBetaUserMembership.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -27,7 +27,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaUserMemberOf -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Get-MgBetaUserMemberOf -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Users } Describe "Get-EntraBetaUserMembership" { @@ -39,7 +39,7 @@ Describe "Get-EntraBetaUserMembership" { $result.AdditionalProperties.DisplayName | Should -Be "Mock-Membership" $result.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.group" - Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should return specific user membership with alias" { $result = Get-EntraBetaUserMembership -ObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" @@ -48,7 +48,7 @@ Describe "Get-EntraBetaUserMembership" { $result.AdditionalProperties.DisplayName | Should -Be "Mock-Membership" $result.AdditionalProperties."@odata.type" | Should -Be "#microsoft.graph.group" - Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when UserId is empty" { { Get-EntraBetaUserMembership -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" @@ -60,7 +60,7 @@ Describe "Get-EntraBetaUserMembership" { $result = Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when All is invalid" { { Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -70,7 +70,7 @@ Describe "Get-EntraBetaUserMembership" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb" - Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -93,7 +93,7 @@ Describe "Get-EntraBetaUserMembership" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' - Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaUserMembership -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -105,7 +105,7 @@ Describe "Get-EntraBetaUserMembership" { $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserMembership" - Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaUserMemberOf -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 index bd9fed0c3f..3bdbdeefed 100644 --- a/test/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 +++ b/test/EntraBeta/Users/Get-EntraBetaUserOwnedDevice.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -32,7 +32,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaUserOwnedDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Get-MgBetaUserOwnedDevice -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Users } Describe "Get-EntraBetaUserOwnedDevice" { @@ -44,7 +44,7 @@ Describe "Get-EntraBetaUserOwnedDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when UserId is empty" { { Get-EntraBetaUserOwnedDevice -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" @@ -56,7 +56,7 @@ Describe "Get-EntraBetaUserOwnedDevice" { $result = Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when All is invalid" { { Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -68,7 +68,7 @@ Describe "Get-EntraBetaUserOwnedDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -86,7 +86,7 @@ Describe "Get-EntraBetaUserOwnedDevice" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' - Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaUserOwnedDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -98,7 +98,7 @@ Describe "Get-EntraBetaUserOwnedDevice" { $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserOwnedDevice" - Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaUserOwnedDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 b/test/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 index 43fe01e921..bf6c0e3a8d 100644 --- a/test/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 +++ b/test/EntraBeta/Users/Get-EntraBetaUserRegisteredDevice.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -32,7 +32,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaUserRegisteredDevice -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Get-MgBetaUserRegisteredDevice -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Users } Describe "Get-EntraBetaUserRegisteredDevice" { @@ -44,7 +44,7 @@ Describe "Get-EntraBetaUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when UserId is empty" { { Get-EntraBetaUserRegisteredDevice -UserId } | Should -Throw "Missing an argument for parameter 'UserId'*" @@ -56,7 +56,7 @@ Describe "Get-EntraBetaUserRegisteredDevice" { $result = Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when All is invalid" { { Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -All xyz } | Should -Throw "A positional parameter cannot be found that accepts argument 'xyz'.*" @@ -68,7 +68,7 @@ Describe "Get-EntraBetaUserRegisteredDevice" { $result.AdditionalProperties.deviceId | Should -Be "aaaaaaaa-0b0b-1c1c-2d2d-333333333333" $result.AdditionalProperties.displayName | Should -Be "Mock-App" - Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when Top is empty" { { Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -86,7 +86,7 @@ Describe "Get-EntraBetaUserRegisteredDevice" { $result | Should -Not -BeNullOrEmpty $result.Id | Should -Be 'aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb' - Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when Property is empty" { { Get-EntraBetaUserRegisteredDevice -UserId "bbbbbbbb-1111-2222-3333-cccccccccccc" -Property } | Should -Throw "Missing an argument for parameter 'Property'*" @@ -98,7 +98,7 @@ Describe "Get-EntraBetaUserRegisteredDevice" { $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraBetaUserRegisteredDevice" - Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgBetaUserRegisteredDevice -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 b/test/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 index 65f58bd90d..83599f67c5 100644 --- a/test/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 +++ b/test/EntraBeta/Users/New-EntraBetaUser.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if ((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null) { - Import-Module Microsoft.Graph.Entra.Beta.Users + if ((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null) { + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force @@ -49,7 +49,7 @@ BeforeAll { ) } - Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Invoke-GraphRequest -MockWith $scriptblock -ModuleName Microsoft.Entra.Beta.Users } Describe "New-EntraBetaUser" { @@ -114,7 +114,7 @@ Describe "New-EntraBetaUser" { $result.ImmutableId | Should -Be "1234567890" $result.Country | Should -Be "USA" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when parameters are empty" { @@ -129,7 +129,7 @@ Describe "New-EntraBetaUser" { $result = New-EntraBetaUser -DisplayName "demo002" -PasswordProfile $PasswordProfile -UserPrincipalName "demo001@contoso.com" -AccountEnabled $true -MailNickName "demo002NickName" -AgeGroup "adult" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion New-EntraBetaUser" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 b/test/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 index 5628cffad4..04fb2c6628 100644 --- a/test/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 +++ b/test/EntraBeta/Users/Remove-EntraBetaUser.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Remove-MgBetaUser -MockWith {} -ModuleName Microsoft.Entra.Beta.Users } Describe "Remove-EntraBetaUser" { @@ -15,12 +15,12 @@ Describe "Remove-EntraBetaUser" { It "Should return empty object" { $result = Remove-EntraBetaUser -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should execute successfully with Alias" { $result = Remove-EntraBetaUser -ObjectId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when UserId is empty" { { Remove-EntraBetaUser -UserId "" } | Should -Throw "Cannot bind argument to parameter*" @@ -29,7 +29,7 @@ Describe "Remove-EntraBetaUser" { { Remove-EntraBetaUser -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" } It "Should contain UserId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgBetaUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Remove-MgBetaUser -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Users $result = Remove-EntraBetaUser -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -40,7 +40,7 @@ Describe "Remove-EntraBetaUser" { $result = Remove-EntraBetaUser -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaUser" - Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaUser -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 b/test/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 index 0b29232f5e..2cd4c63dd8 100644 --- a/test/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 +++ b/test/EntraBeta/Users/Remove-EntraBetaUserManager.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Remove-MgBetaUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Remove-MgBetaUserManagerByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.Users } Describe "Remove-EntraBetaUserManager" { @@ -15,12 +15,12 @@ Describe "Remove-EntraBetaUserManager" { It "Should return empty object" { $result = Remove-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should return empty object with alias" { $result = Remove-EntraBetaUserManager -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when UserId is empty" { { Remove-EntraBetaUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter*" @@ -29,7 +29,7 @@ Describe "Remove-EntraBetaUserManager" { { Remove-EntraBetaUserManager -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" } It "Should contain UserId in parameters when passed UserId to it" { - Mock -CommandName Remove-MgBetaUserManagerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Remove-MgBetaUserManagerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Users $result = Remove-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $params = Get-Parameters -data $result @@ -40,7 +40,7 @@ Describe "Remove-EntraBetaUserManager" { $result = Remove-EntraBetaUserManager -UserId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Remove-EntraBetaUserManager" - Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Remove-MgBetaUserManagerByRef -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 b/test/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 index f0cef92b5a..e455e6673a 100644 --- a/test/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 +++ b/test/EntraBeta/Users/Set-EntraBetaUser.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Update-MgBetaUser -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Update-MgBetaUser -MockWith {} -ModuleName Microsoft.Entra.Beta.Users } Describe "Set-EntraBetaUser"{ @@ -15,12 +15,12 @@ Describe "Set-EntraBetaUser"{ It "Should return empty object"{ $result = Set-EntraBetaUser -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should return empty object with alias"{ $result = Set-EntraBetaUser -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -DisplayName "Mock-App" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when ObjectId is empty" { { Set-EntraBetaUser -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -29,7 +29,7 @@ Describe "Set-EntraBetaUser"{ { Set-EntraBetaUser -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" } It "Should contain UserId in parameters when passed ObjectId to it" { - Mock -CommandName Update-MgBetaUser -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Update-MgBetaUser -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Users $result = Set-EntraBetaUser -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' $params = Get-Parameters -data $result @@ -40,7 +40,7 @@ Describe "Set-EntraBetaUser"{ $result = Set-EntraBetaUser -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaUser" - Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Update-MgBetaUser -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 b/test/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 index 4307e68cfa..3920979691 100644 --- a/test/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 +++ b/test/EntraBeta/Users/Set-EntraBetaUserManager.Tests.ps1 @@ -2,12 +2,12 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Set-MgBetaUserManagerByRef -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Set-MgBetaUserManagerByRef -MockWith {} -ModuleName Microsoft.Entra.Beta.Users } Describe "Set-EntraBetaUserManager"{ @@ -15,12 +15,12 @@ Describe "Set-EntraBetaUserManager"{ It "Should return empty object"{ $result = Set-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should return empty object with alias"{ $result = Set-EntraBetaUserManager -ObjectId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when UserId is empty" { { Set-EntraBetaUserManager -UserId "" } | Should -Throw "Cannot bind argument to parameter 'UserId' because it is an empty string." @@ -29,7 +29,7 @@ Describe "Set-EntraBetaUserManager"{ { Set-EntraBetaUserManager -Power "abc" } | Should -Throw "A parameter cannot be found that matches parameter name 'Power'*" } It "Should contain UserId in parameters when passed UserId to it" { - Mock -CommandName Set-MgBetaUserManagerByRef -MockWith {$args} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Set-MgBetaUserManagerByRef -MockWith {$args} -ModuleName Microsoft.Entra.Beta.Users $result = Set-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $params = Get-Parameters -data $result @@ -40,7 +40,7 @@ Describe "Set-EntraBetaUserManager"{ $result = Set-EntraBetaUserManager -UserId 'aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb' -RefObjectId "bbbbbbbb-1111-2222-3333-cccccccccccc" $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Set-EntraBetaUserManager" - Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Set-MgBetaUserManagerByRef -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 b/test/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 index f25a87c45d..d0d503de45 100644 --- a/test/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 +++ b/test/EntraBeta/Users/Update-EntraBetaSignedInUserPassword.Tests.ps1 @@ -6,12 +6,12 @@ param() BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force - Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Invoke-GraphRequest -MockWith {} -ModuleName Microsoft.Entra.Beta.Users } Describe "Tests for Update-EntraBetaSignedInUserPassword"{ @@ -21,7 +21,7 @@ Describe "Tests for Update-EntraBetaSignedInUserPassword"{ $NewPassword = ConvertTo-SecureString 'test@1234' -AsPlainText -Force $result = Update-EntraBetaSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when CurrentPassword is null" { @@ -55,7 +55,7 @@ Describe "Tests for Update-EntraBetaSignedInUserPassword"{ $result = Update-EntraBetaSignedInUserPassword -CurrentPassword $CurrentPassword -NewPassword $NewPassword $result | Should -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraBetaSignedInUserPassword" - Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Invoke-GraphRequest -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 b/test/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 index 6ececce1d5..678a9ae405 100644 --- a/test/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 +++ b/test/EntraBeta/Users/Update-EntraBetaUserFromFederated.Tests.ps1 @@ -2,8 +2,8 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ BeforeAll { - if((Get-Module -Name Microsoft.Graph.Entra.Beta.Users) -eq $null){ - Import-Module Microsoft.Graph.Entra.Beta.Users + if((Get-Module -Name Microsoft.Entra.Beta.Users) -eq $null){ + Import-Module Microsoft.Entra.Beta.Users } Import-Module (Join-Path $PSScriptRoot "..\..\Common-Functions.ps1") -Force $scriptblockForAuthenticationMethod = { @@ -21,9 +21,9 @@ BeforeAll { ) } - Mock -CommandName Get-MgBetaUserAuthenticationMethod -MockWith $scriptblockForAuthenticationMethod -ModuleName Microsoft.Graph.Entra.Beta.Users - Mock -CommandName Get-MgBetaUser -MockWith $scriptblockForMgUser -ModuleName Microsoft.Graph.Entra.Beta.Users - Mock -CommandName Reset-MgBetaUserAuthenticationMethodPassword -MockWith {} -ModuleName Microsoft.Graph.Entra.Beta.Users + Mock -CommandName Get-MgBetaUserAuthenticationMethod -MockWith $scriptblockForAuthenticationMethod -ModuleName Microsoft.Entra.Beta.Users + Mock -CommandName Get-MgBetaUser -MockWith $scriptblockForMgUser -ModuleName Microsoft.Entra.Beta.Users + Mock -CommandName Reset-MgBetaUserAuthenticationMethodPassword -MockWith {} -ModuleName Microsoft.Entra.Beta.Users } Describe "Update-EntraBetaUserFromFederated" { @@ -31,7 +31,7 @@ BeforeAll { It "Should sets identity synchronization features for a tenant" { $result = Update-EntraBetaUserFromFederated -UserPrincipalName "xyz.onmicrosoft.com" -NewPassword "Pass1234" $result | Should -BeNullOrEmpty - Should -Invoke -CommandName Reset-MgBetaUserAuthenticationMethodPassword -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 + Should -Invoke -CommandName Reset-MgBetaUserAuthenticationMethodPassword -ModuleName Microsoft.Entra.Beta.Users -Times 1 } It "Should fail when UserPrincipalName is empty" { {Update-EntraBetaUserFromFederated -UserPrincipalName } | Should -Throw "Missing an argument for parameter 'UserPrincipalName'. Specify a parameter*" @@ -49,7 +49,7 @@ BeforeAll { $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Update-EntraBetaUserFromFederated" - Should -Invoke -CommandName Reset-MgBetaUserAuthenticationMethodPassword -ModuleName Microsoft.Graph.Entra.Beta.Users -Times 1 -ParameterFilter { + Should -Invoke -CommandName Reset-MgBetaUserAuthenticationMethodPassword -ModuleName Microsoft.Entra.Beta.Users -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } From ecce8ad1af80a4435e6013392c8acf273e8203b4 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:26:28 +0300 Subject: [PATCH 113/124] Docs updates for legacy (#1225) --- ...ntraBetaPrivateAccessApplicationSegment.md | 6 - ...ntraBetaPrivateAccessApplicationSegment.md | 6 - ...ntraBetaPrivateAccessApplicationSegment.md | 6 - ...nable-EntraBetaGlobalSecureAccessTenant.md | 73 ++++++++ ...EntraBetaGlobalSecureAccessTenantStatus.md | 84 +++++++++ .../Get-EntraBetaPrivateAccessApplication.md | 163 ++++++++++++++++++ ...ntraBetaPrivateAccessApplicationSegment.md | 37 ++-- ...-EntraBetaUserAuthenticationRequirement.md | 97 +++++++++++ .../New-EntraBetaPrivateAccessApplication.md | 113 ++++++++++++ ...ntraBetaPrivateAccessApplicationSegment.md | 39 +++-- ...ntraBetaPrivateAccessApplicationSegment.md | 33 ++-- .../Update-EntraBetaOauth2PermissionGrant.md | 128 ++++++++++++++ ...-EntraBetaUserAuthenticationRequirement.md | 111 ++++++++++++ .../Get-EntraUserAuthenticationMethod.md | 93 ++++++++++ .../Update-EntraOauth2PermissionGrant.md | 128 ++++++++++++++ 15 files changed, 1051 insertions(+), 66 deletions(-) create mode 100644 module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md create mode 100644 module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md create mode 100644 module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md create mode 100644 module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement.md create mode 100644 module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md create mode 100644 module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaOauth2PermissionGrant.md create mode 100644 module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement.md create mode 100644 module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAuthenticationMethod.md create mode 100644 module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraOauth2PermissionGrant.md diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md index a8e50bd826..b3df2ed5c1 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md @@ -7,15 +7,9 @@ ms.date: 06/26/2024 ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG -<<<<<<< HEAD -author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -======= author: andres-canello external help file: Microsoft.Entra.Beta-Help.xml Module Name: Microsoft.Entra.Beta ->>>>>>> e6ba625db (Rename module (#1223)) online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md index 4ca7f11fc0..b14d31b890 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md @@ -7,15 +7,9 @@ ms.date: 07/18/2024 ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG -<<<<<<< HEAD -author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -======= author: andres-canello external help file: Microsoft.Entra.Beta-Help.xml Module Name: Microsoft.Entra.Beta ->>>>>>> e6ba625db (Rename module (#1223)) online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md index 4f2270bbc0..766a9a1269 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md @@ -7,15 +7,9 @@ ms.date: 07/18/2024 ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG -<<<<<<< HEAD -author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -======= author: andres-canello external help file: Microsoft.Entra.Beta-Help.xml Module Name: Microsoft.Entra.Beta ->>>>>>> e6ba625db (Rename module (#1223)) online version: schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md new file mode 100644 index 0000000000..fc76f02dca --- /dev/null +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md @@ -0,0 +1,73 @@ +--- +title: Enable-EntraBetaGlobalSecureAccessTenant +description: This article provides details on the Enable-EntraBetaGlobalSecureAccessTenant command. + +ms.topic: reference +ms.date: 10/31/2024 +ms.author: eunicewaweru +reviewer: andres-canello +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: +schema: 2.0.0 +--- + +# Enable-EntraBetaGlobalSecureAccessTenant + +## Synopsis + +Onboard the Global Secure Access service in the tenant. + +## Syntax + +```powershell +Enable-EntraBetaGlobalSecureAccessTenant +``` + +## Description + +The `Enable-EntraBetaGlobalSecureAccessTenant` cmdlet onboards the Global Secure Access service in the tenant. + +In delegated scenarios with work or school accounts, the signed-in user needs a supported Microsoft Entra role or a custom role with the necessary permissions: + +- Global Secure Access Administrator +- Security Administrator + +## Examples + +### Example 1: Enable Global Secure Access for a tenant + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +Enable-EntraBetaGlobalSecureAccessTenant +``` + +```Output +@odata.context : https://graph.microsoft.com/beta/$metadata#networkAccess/tenantStatus/$entity +onboardingStatus : onboarded +onboardingErrorMessage : +``` + +This command onboards the Global Secure Access service in the tenant. + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS + +[Get-EntraBetaGlobalSecureAccessTenantStatus](Get-EntraBetaGlobalSecureAccessTenantStatus.md) diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md new file mode 100644 index 0000000000..02a1d9d7c6 --- /dev/null +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md @@ -0,0 +1,84 @@ +--- +title: Get-EntraBetaGlobalSecureAccessTenantStatus +description: This article provides details on the Get-EntraBetaGlobalSecureAccessTenantStatus command. + +ms.topic: reference +ms.date: 10/19/2024 +ms.author: eunicewaweru +reviewer: andres-canello +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: +schema: 2.0.0 +--- + +# Get-EntraBetaGlobalSecureAccessTenantStatus + +## Synopsis + +Retrieves the onboarding status of the Global Secure Access service in the tenant. + +## Syntax + +```powershell +Get-EntraBetaGlobalSecureAccessTenantStatus +``` + +## Description + +The `Get-EntraBetaGlobalSecureAccessTenantStatus` cmdlet retrieves the onboarding status of the Global Secure Access service in the tenant. + +For delegated scenarios involving work or school accounts, the signed-in user must have either a supported Microsoft Entra role or a custom role with the necessary permissions. The following least-privileged roles are supported for this operation: + +- Global Reader +- Global Secure Access Administrator +- Security Administrator + +## Examples + +### Example 1: Check Global Secure Access status for the tenant + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +Get-EntraBetaGlobalSecureAccessTenantStatus +``` + +```Output +@odata.context onboardingStatus onboardingErrorMessage +-------------- ---------------- ---------------------- +https://graph.microsoft.com/beta/$metadata#networkAccess/tenantStatus/$entity offboarded +``` + +This command checks if the Global Secure Access service is activated in the tenant. + +If the status is `offboarded`, you can activate the service with `New-EntraBetaGlobalSecureAccessTenant`. + +The onboarding status can be: `offboarded`, `offboarding in progress`, `onboarding in progress`, `onboarded`, `onboarding error`, or `offboarding error`. + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) + +[Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md) + +[Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) + +[New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md) diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md new file mode 100644 index 0000000000..daa37596e3 --- /dev/null +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md @@ -0,0 +1,163 @@ +--- +title: Get-EntraBetaPrivateAccessApplication +description: This article provides details on the Get-EntraBetaPrivateAccessApplication command. + +ms.topic: reference +ms.date: 10/19/2024 +ms.author: eunicewaweru +reviewer: andres-canello +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: +schema: 2.0.0 +--- + +# Get-EntraBetaPrivateAccessApplication + +## Synopsis + +Retrieves a list of all Private Access applications, or if specified, details of a specific application. + +## Syntax + +### ApplicationId (Default) + +```powershell +Get-EntraBetaPrivateAccessApplication + [-ApplicationId ] + [] +``` + +### ApplicationName + +```powershell +Get-EntraBetaPrivateAccessApplication + [-ApplicationName ] + [] +``` + +## Description + +The `Get-EntraBetaPrivateAccessApplication` cmdlet retrieves a list of all Private Access applications, or if specified, details of a specific application. + +## Examples + +### Example 1: Retrieve all Private Access applications + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +Get-EntraBetaPrivateAccessApplication +``` + +```Output +displayName : testApp1 +appId : aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +id : bbbbbbbb-1111-2222-3333-cccccccccccc +tags : {IsAccessibleViaZTNAClient, HideApp, PrivateAccessNonWebApplication} +createdDateTime : 14/06/2024 12:38:50 AM + +displayName : QuickAccess +appId : dddddddd-3333-4444-5555-eeeeeeeeeeee +id : eeeeeeee-4444-5555-6666-ffffffffffff +tags : {HideApp, NetworkAccessQuickAccessApplication} +createdDateTime : 4/07/2023 4:00:07 AM +``` + +This command retrieves all Private Access applications, including Quick Access. + +### Example 2: Retrieve a specific Private Access application by object Id + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +$application = Get-EntraBetaPrivateAccessApplication | Where-Object {$_.displayName -eq 'Finance team file share'} +Get-EntraBetaPrivateAccessApplication -ApplicationId $application.Id +``` + +```Output +displayName : QuickAccess +appId : aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +id : bbbbbbbb-1111-2222-3333-cccccccccccc +tags : {HideApp, NetworkAccessQuickAccessApplication} +createdDateTime : 4/07/2023 4:00:07 AM +``` + +This example demonstrates how to retrieve information for a specific Private Access application by object id. + +### Example 3: Retrieve a specific Private Access application by name + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +Get-EntraBetaPrivateAccessApplication -ApplicationName 'Finance team file share' +``` + +```Output +displayName : Finance team file share +appId : aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb +id : bbbbbbbb-1111-2222-3333-cccccccccccc +tags : {IsAccessibleViaZTNAClient, HideApp, PrivateAccessNonWebApplication} +createdDateTime : 14/06/2024 12:38:50 AM +``` + +This example demonstrates how to retrieve information for a specific Private Access application by application name. + +## Parameters + +### -ApplicationId + +The Object ID of a Private Access application object. + +```yaml +Type: System.String +Parameter Sets: SingleAppID +Aliases: ObjectId + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ApplicationName + +Specifies a specific application name to retrieve. + +```yaml +Type: System.String +Parameter Sets: SingleAppName +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS + +[Get-EntraBetaApplication](Get-EntraBetaApplication.md) + +[Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md) + +[Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) + +[New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md) diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md index bdb7fd2d8a..a4a56e0752 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md @@ -5,9 +5,9 @@ description: This article provides details on the Get-EntraBetaPrivateAccessAppl ms.topic: reference ms.date: 06/26/2024 ms.author: eunicewaweru -ms.reviewer: stevemutungi +reviewer: andres-canello manager: CelesteDG -author: andres-canello +author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta online version: @@ -20,6 +20,15 @@ schema: 2.0.0 Retrieves a list of all application segments associated to a Private Access application, or if specified, details of a specific application segment. +## Syntax + +```powershell +Get-EntraBetaPrivateAccessApplicationSegment + -ApplicationId + [-ApplicationSegmentId ] + [] +``` + ## Description The `Get-EntraBetaPrivateAccessApplicationSegment` cmdlet retrieves a list of all application segments associated to a Private Access application, or if specified, details of a specific application segment. @@ -30,8 +39,8 @@ The `Get-EntraBetaPrivateAccessApplicationSegment` cmdlet retrieves a list of al ```powershell Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' -$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId -Get-EntraBetaPrivateAccessApplicationSegment -ObjectId $ApplicationObjectId +$application = Get-EntraBetaApplication -Filter "displayName eq ''" +Get-EntraBetaPrivateAccessApplicationSegment -ApplicationId $application.Id ``` ```Output @@ -49,14 +58,9 @@ This command retrieves all application segments for an application. ```powershell Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' -$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId - -$params = @{ - ObjectId = $ApplicationObjectId - ApplicationSegmentId = 'cccc2222-dd33-4444-55ee-666666ffffff' -} - -Get-EntraBetaPrivateAccessApplicationSegment @params +$application = Get-EntraBetaApplication -Filter "displayName eq ''" +$applicationSegment = Get-EntraBetaPrivateAccessApplicationSegment -ApplicationId $application.Id | Where-Object {$_.destinationType -eq 'fqdn'} +Get-EntraBetaPrivateAccessApplicationSegment -ApplicationId $application.Id -ApplicationSegmentId $applicationSegment.Id ``` ```Output @@ -72,17 +76,17 @@ This example demonstrates how to retrieve information for a specific application ## Parameters -### -ObjectId +### -ApplicationId The Object ID of a Private Access application object. ```yaml Type: System.String Parameter Sets: AllApplicationSegments, SingleApplicationSegment -Aliases: id +Aliases: ObjectId Required: True -Position: 1 +Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False @@ -98,7 +102,7 @@ Parameter Sets: SingleApplicationSegment Aliases: Required: False -Position: 2, Named +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -127,4 +131,3 @@ System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutra [Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) [New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md) - diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement.md new file mode 100644 index 0000000000..1bda51f7b4 --- /dev/null +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement.md @@ -0,0 +1,97 @@ +--- +title: Get-EntraBetaUserAuthenticationRequirement +description: This article provides details on the Get-EntraBetaUserAuthenticationRequirement Command. + +ms.topic: reference +ms.date: 07/25/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement + +schema: 2.0.0 +--- + +# Get-EntraBetaUserAuthenticationRequirement + +## Synopsis + +Retrieve the authentication method status of a user. + +## Syntax + +```powershell +Get-EntraBetaUserAuthenticationRequirement + -UserId + [] +``` + +## Description + +The `Get-EntraBetaUserAuthenticationRequirement` cmdlet retrieves the authentication method status of a user. + +In delegated scenarios with work or school accounts, the signed-in user must have a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles can perform this operation: + +- Global Reader +- Authentication Policy Administrator + +## Examples + +### Example 1: Retrieve a User's MFA Status + +```powershell +Connect-Entra -Scopes 'Policy.Read.All' +Get-EntraBetaUserAuthenticationRequirement -UserId 'SawyerM@contoso.com' +``` + +```Output +perUserMfaState @odata.context +--------------- -------------- +disabled https://graph.microsoft.com/beta/$metadata#users(..) +``` + +This example retrieves the authentication method status of a user. + +A user's state shows whether an Authentication Administrator enrolls them in per-user Microsoft Entra multifactor authentication. User accounts have one of three distinct states in Microsoft Entra MFA: + +- `Disabled` - The default state for a user not enrolled in per-user Microsoft Entra multifactor authentication. +- `Enabled` - The user is enrolled in per-user Microsoft Entra multifactor authentication, but can still use their password for legacy authentication. If the user has no registered MFA authentication methods, they receive a prompt to register the next time they sign in using modern authentication (such as when they sign in on a web browser). +- `Enforced` - The user is enrolled per-user in Microsoft Entra multifactor authentication. If the user has no registered authentication methods, they receive a prompt to register the next time they sign in using modern authentication (such as when they sign in on a web browser). Users who complete registration while they're Enabled are automatically moved to the Enforced state. + +## Parameters + +### -UserId + +Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +The most effective way to protect users with Microsoft Entra MFA is by creating a Conditional Access policy. Conditional Access, a feature available in Microsoft Entra ID P1 and P2, allows you to enforce MFA based on specific conditions and scenarios. To learn how to set up Conditional Access, refer to the tutorial: [Secure user sign-in events with Microsoft Entra multifactor authentication](https://learn.microsoft.com/entra/identity/authentication/tutorial-enable-azure-mfa). + +For Microsoft Entra ID Free tenants without Conditional Access, you can [use security defaults](https://learn.microsoft.com/entra/fundamentals/security-defaults) to protect users. MFA prompts are automatic, but you can't customize the rules. + +## Related Links diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md new file mode 100644 index 0000000000..be03b5a2fd --- /dev/null +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md @@ -0,0 +1,113 @@ +--- +title: New-EntraBetaPrivateAccessApplication +description: This article provides details on the New-EntraBetaPrivateAccessApplication command. + +ms.topic: reference +ms.date: 10/19/2024 +ms.author: eunicewaweru +reviewer: andres-canello +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra.Beta-Help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: +schema: 2.0.0 +--- + +# New-EntraBetaPrivateAccessApplication + +## Synopsis + +Creates a Private Access application and assigns a connector group to it. + +## Syntax + +```powershell +New-EntraBetaPrivateAccessApplication + -ApplicationName + [-ConnectorGroupId ] + [] +``` + +## Description + +The `New-EntraBetaPrivateAccessApplication` cmdlet creates a Private Access application and assigns a connector group to it. + +## Examples + +### Example 1: Create a new Private Access app and assign the default connector group + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +New-EntraBetaPrivateAccessApplication -ApplicationName 'Contoso GSA Application' +``` + +This example shows how to create a new Private Access application named `Contoso GSA Application` and assign it to the default connector group. + +### Example 2: Create a new Private Access app and assign a specific connector group + +```powershell +Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' +$connectorGroup = Get-EntraBetaApplicationProxyConnectorGroup -Filter "Name eq 'Contoso GSA Group'" +New-EntraBetaPrivateAccessApplication -ApplicationName 'Contoso GSA Application' -ConnectorGroupId $connectorGroup.Id +``` + +This example shows how to create a new Private Access application named `Contoso GSA Application` and assign it to a specific connector group. + +## Parameters + +### -ApplicationName + +The name of the new Private Access application. + +```yaml +Type: System.String +Parameter Sets: +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConnectorGroupId + +Specifies a connector group to assign to the application. Use `Get-EntraBetaApplicationProxyConnectorGroup` to retrieve connector details or `New-EntraBetaApplicationProxyConnectorGroup` to create a new group. + +```yaml +Type: System.String +Parameter Sets: +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +### System.String + +System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] System.Nullable\`1\[\[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\]\] + +## Outputs + +### System.Object + +## Notes + +## RELATED LINKS + +[Get-EntraBetaPrivateAccessApplication](Get-EntraBetaPrivateAccessApplication.md) +[Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md) +[Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) +[New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md) +[New-EntraBetaApplicationProxyConnectorGroup](New-EntraBetaApplicationProxyConnectorGroup.md) diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md index 96cb1b52d7..fecf462c46 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md @@ -5,7 +5,7 @@ description: This article provides details on the New-EntraBetaPrivateAccessAppl ms.topic: reference ms.date: 07/18/2024 ms.author: eunicewaweru -ms.reviewer: stevemutungi +reviewer: andres-canello manager: CelesteDG author: andres-canello external help file: Microsoft.Graph.Entra.Beta-Help.xml @@ -20,6 +20,18 @@ schema: 2.0.0 Creates an application segment associated to a Private Access application. +## Syntax + +```powershell +New-EntraBetaPrivateAccessApplicationSegment + -ApplicationId + -DestinationHost + -DestinationType + [-Protocol ] + [-Ports ] + [] +``` + ## Description The `New-EntraBetaPrivateAccessApplicationSegment` cmdlet creates an application segment associated to a Private Access application. @@ -30,16 +42,14 @@ The `New-EntraBetaPrivateAccessApplicationSegment` cmdlet creates an application ```powershell Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' -$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId - +$application = Get-EntraBetaApplication -Filter "displayName eq ''" $params = @{ - ObjectId = $ApplicationObjectId + ApplicationId = $application.Id DestinationHost = 'ssh.contoso.local' Ports = 22 Protocol = 'TCP' DestinationType = 'FQDN' } - New-EntraBetaPrivateAccessApplicationSegment @params ``` @@ -56,16 +66,14 @@ id : cccc2222-dd33-4444-55ee-666666ffffff ```powershell Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' -$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId - +$application = Get-EntraBetaApplication -Filter "displayName eq ''" $params = @{ - ObjectId = $ApplicationObjectId + ApplicationId = $application.Id DestinationHost = '192.168.1.100..192.168.1.110' Ports = '22,3389' Protocol = 'TCP,UDP' DestinationType = 'ipRange' } - New-EntraBetaPrivateAccessApplicationSegment @params ``` @@ -97,35 +105,34 @@ $variables = Import-Csv $csvFile # Loop through each row of the CSV and execute the command for each set of variables foreach ($variable in $variables) { - $AppObjectId = $variable.AppObjectId - $DestHost = $variable.DestHost + $appObjectId = $variable.AppObjectId + $destHost = $variable.DestHost $ports = $variable.ports -split "," $protocol = $variable.protocol -split "," $type = $variable.type # Execute the command $params = @{ - ObjectId = $AppObjectId - DestinationHost = $DestHost + ApplicationId = $appObjectId + DestinationHost = $destHost Ports = $ports Protocol = $protocol DestinationType = $type } - New-EntraBetaPrivateAccessApplicationSegment @params } ``` ## Parameters -### -ObjectId +### -ApplicationId The object ID of a Private Access application object. ```yaml Type: System.String Parameter Sets: -Aliases: id +Aliases: ObjectId Required: True Position: 1 diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md index 47683fd025..f5e5d659e1 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md @@ -5,7 +5,7 @@ description: This article provides details on the Remove-EntraBetaPrivateAccessA ms.topic: reference ms.date: 07/18/2024 ms.author: eunicewaweru -ms.reviewer: stevemutungi +reviewer: andres-canello manager: CelesteDG author: andres-canello external help file: Microsoft.Graph.Entra.Beta-Help.xml @@ -20,6 +20,15 @@ schema: 2.0.0 Removes an application segment associated to a Private Access application. +## Syntax + +```powershell +Remove-EntraBetaPrivateAccessApplicationSegment + -ApplicationId + [-ApplicationSegmentId ] + [] +``` + ## Description The `Remove-EntraBetaPrivateAccessApplicationSegment` cmdlet removes application segments associated to a Private Access application. @@ -30,35 +39,29 @@ The `Remove-EntraBetaPrivateAccessApplicationSegment` cmdlet removes application ```powershell Connect-Entra -Scopes 'NetworkAccessPolicy.ReadWrite.All', 'Application.ReadWrite.All', 'NetworkAccess.ReadWrite.All' -$ApplicationObjectId = (Get-EntraBetaApplication -Filter "DisplayName eq ''").ObjectId -$ApplicationSegmentId = (Get-EntraBetaPrivateAccessApplicationSegment -ObjectId $ApplicationObjectId -Top 1).Id - -$params = @{ - ObjectId = $ApplicationObjectId - ApplicationSegmentId = $ApplicationSegmentId -} - -Remove-EntraBetaPrivateAccessApplicationSegment @params +$application = Get-EntraBetaApplication -Filter "displayName eq ''" +$applicationSegment = Get-EntraBetaPrivateAccessApplicationSegment -ApplicationId $application.Id | Where-Object {$_.destinationType -eq 'fqdn'} +Remove-EntraBetaPrivateAccessApplicationSegment -ApplicationId $application.Id -ApplicationSegmentId $applicationSegment.Id ``` This example shows how to remove an application segment associated to a Private Access application. -- `ObjectId` is the application Object ID of the Private Access Application. +- `ApplicationId` is the application Object ID of the Private Access Application. - `ApplicationSegmentId` is the application segment identifier to be deleted. ## Parameters -### -ObjectId +### -ApplicationId The object ID of a Private Access application object. ```yaml Type: System.String Parameter Sets: -Aliases: id +Aliases: ObjectId Required: True -Position: 1 +Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False @@ -74,7 +77,7 @@ Parameter Sets: Aliases: Required: True -Position: 2, Named +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaOauth2PermissionGrant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaOauth2PermissionGrant.md new file mode 100644 index 0000000000..45cbf0620f --- /dev/null +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaOauth2PermissionGrant.md @@ -0,0 +1,128 @@ +--- +title: Update-EntraBetaOauth2PermissionGrant +description: This article provides details on the Update-EntraBetaOauth2PermissionGrant command. + +ms.topic: reference +ms.date: 11/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Update-EntraBetaOauth2PermissionGrant + +schema: 2.0.0 +--- + +# Update-EntraBetaOauth2PermissionGrant + +## Synopsis + +Update the properties of a delegated permission grant (oAuth2PermissionGrant object). + +## Syntax + +```powershell +Update-EntraBetaOauth2PermissionGrant + -OAuth2PermissionGrantId + [-Scope ] + [] +``` + +## Description + +The `Update-EntraBetaOauth2PermissionGrant` cmdlet is used to update the properties of a delegated permission grant (oAuth2PermissionGrant object) by adding or removing items in the scopes list. + +To add new scopes, include both existing and new scopes in this parameter; otherwise, existing scopes will be overwritten. + +In delegated scenarios with work or school accounts, the signed-in user needs a supported Microsoft Entra role or a custom role with the required permissions. The least privileged roles that support this operation are: + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator + +## Examples + +### Example 1: Update delegated permission grant scope + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$clientServicePrincipal = Get-EntraBetaServicePrincipal -Filter "displayName eq 'My application'" +$permissionGrant = Get-EntraBetaOAuth2PermissionGrant | Where-Object {$_.ClientId -eq $clientServicePrincipal.Id -and $_.Scope -eq 'Directory.Read.All'} +Update-EntraBetaOauth2PermissionGrant -OAuth2PermissionGrantId $permissionGrant.Id -Scope 'Directory.Read.All User.Read.All' +``` + +This command updates a delegated permission grant. + +- `-OAuth2PermissionGrantId` parameter specifies the Unique identifier for the oAuth2PermissionGrant. +- `-Scope` parameter is a space-separated list of claim values for delegated permissions to include in access tokens for the resource application (API), such as `openid User.Read GroupMember.Read.All`. + +### Example 2: Clear all scopes in the delegated permission grant + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$clientServicePrincipal = Get-EntraBetaServicePrincipal -Filter "displayName eq 'My application'" +$permissionGrant = Get-EntraBetaOAuth2PermissionGrant | Where-Object {$_.ClientId -eq $clientServicePrincipal.Id -and $_.Scope -eq 'Directory.Read.All'} +Update-EntraBetaOAuth2PermissionGrant -OAuth2PermissionGrantId $permissionGrant.Id -Scope '' +``` + +This command updates a delegated permission grant. + +- `-OAuth2PermissionGrantId` parameter specifies the Unique identifier for the oAuth2PermissionGrant. + +## Parameters + +### -OAuth2PermissionGrantId + +The Unique identifier for the oAuth2PermissionGrant. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Scope + +A space-separated list of claim values for delegated permissions to include in access tokens for the resource application (API), such as `openid User.Read GroupMember.Read.All`. Each claim must match a value in the API's publishedPermissionScopes property. The total length must not exceed 3850 characters. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraBetaOauth2PermissionGrant](Get-EntraBetaOAuth2PermissionGrant.md) + +[New-EntraBetaOauth2PermissionGrant](New-EntraBetaOauth2PermissionGrant.md) + +[Remove-EntraBetaOauth2PermissionGrant](Remove-EntraBetaOAuth2PermissionGrant.md) diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement.md new file mode 100644 index 0000000000..a668b958a2 --- /dev/null +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement.md @@ -0,0 +1,111 @@ +--- +title: Update-EntraBetaUserAuthenticationRequirement +description: This article provides details on the Update-EntraBetaUserAuthenticationRequirement command. + +ms.topic: reference +ms.date: 11/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra.Beta-help.xml +Module Name: Microsoft.Graph.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement + +schema: 2.0.0 +--- + +# Update-EntraBetaUserAuthenticationRequirement + +## Synopsis + +Update the MFA Status of a user. + +## Syntax + +```powershell +Update-EntraBetaUserAuthenticationRequirement + -UserId + -PerUserMfaState + [] +``` + +## Description + +The `Update-EntraBetaUserAuthenticationRequirement` cmdlet is used to update the MFA status of a user. + +**Note:** Enabled users automatically switch to Enforced once they register for Microsoft Entra MFA. Avoid manually setting a user to Enforced unless they're already registered or it’s acceptable for them to experience interruptions with legacy authentication protocols. + +In delegated scenarios with work or school accounts, where the signed-in user acts on behalf of another user, they must have a supported Microsoft Entra role or a custom role with the necessary permissions. The following least privileged roles are supported: + +- Authentication Administrator +- Privileged Authentication Administrator + +## Examples + +### Example 1: Update delegated permission grant scope + +```powershell +Connect-Entra -Scopes 'Policy.ReadWrite.AuthenticationMethod' +Update-EntraBetaUserAuthenticationRequirement -UserId 'SawyerM@Contoso.com' -PerUserMfaState 'enabled' +``` + +This command updates the MFA status of a user. + +- `-UserId` parameter specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID. +- `-PerUserMfaState` parameter specifies the user's status for per-user multifactor authentication, with possible values: `enforced`, `enabled`, or `disabled`. + +## Parameters + +### -UserId + +Specifies the ID (as a User Principle Name or ObjectId) of a user in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -PerUserMfaState + +The user's status for per-user multifactor authentication, with possible values: `enforced`, `enabled`, or `disabled`. + +`Disabled` - The default state for a user not enrolled in per-user Microsoft Entra multifactor authentication. + +`Enabled` - The user is enrolled in per-user Microsoft Entra multifactor authentication, but can still use their password for legacy authentication. If the user has no registered MFA authentication methods, they receive a prompt to register the next time they sign in using modern authentication (such as when they sign in on a web browser). + +`Enforced` - The user is enrolled per-user in Microsoft Entra multifactor authentication. If the user has no registered authentication methods, they receive a prompt to register the next time they sign in using modern authentication (such as when they sign in on a web browser). Users who complete registration while they're Enabled are automatically moved to the Enforced state. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +Enabled users are automatically switched to Enforced when they register for Microsoft Entra multifactor authentication. Don't manually change the user state to Enforced unless the user is already registered or if it's acceptable for the user to experience interruption in connections to legacy authentication protocols. + +## Related Links diff --git a/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAuthenticationMethod.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAuthenticationMethod.md new file mode 100644 index 0000000000..2e804e277d --- /dev/null +++ b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraUserAuthenticationMethod.md @@ -0,0 +1,93 @@ +--- +title: Get-EntraUserAuthenticationMethod +description: This article provides details on the Get-EntraUserAuthenticationMethod command. + + +ms.topic: reference +ms.date: 11/11/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru +external help file: Microsoft.Graph.Entra-Help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserAuthenticationMethod + +schema: 2.0.0 +--- + +# Get-EntraUserAuthenticationMethod + +## Synopsis + +Retrieve a list of a user's registered authentication methods. + +## Syntax + +```powershell +Get-EntraUserAuthenticationMethod + -UserId + [] +``` + +## Description + +The `Get-EntraUserAuthenticationMethod` cmdlet retrieves a list of a user's registered authentication methods. An authentication method is a way for a user to verify their identity, such as a password, phone (SMS or voice), or FIDO2 security key. + +In delegated scenarios involving work or school accounts, where the signed-in user is acting on behalf of another user, the signed-in user must be assigned either a supported Microsoft Entra role or a custom role with the necessary permissions. For this operation, the following least privileged roles are supported: + +- Global Reader +- Authentication Administrator +- Privileged Authentication Administrator + +## Examples + +### Example 1: Get a list of authentication methods registered to a user + +```powershell +Connect-Entra -Scopes 'UserAuthenticationMethod.Read.All' +Get-EntraUserAuthenticationMethod -UserId 'SawyerM@Contoso.com' | Select-Object Id, DisplayName, AuthenticationMethodType +``` + +```Output +Id DisplayName AuthenticationMethodType +-- ----------- ------------------------ +00001111-aaaa-2222-bbbb-3333cccc4444 #microsoft.graph.passwordAuthenticationMethod +11112222-bbbb-3333-cccc-4444dddd5555 iPhone 16 #microsoft.graph.microsoftAuthenticatorAuthenticationMethod +``` + +This example retrieves a Get a list of a user's registered authentication methods. + +- `-UserId` parameter specifies the object ID of a user(as a UserPrincipalName or ObjectId). + +## Parameters + +### -UserId + +Specifies the ID of a user (as a UserPrincipalName or ObjectId) in Microsoft Entra ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ObjectId + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +The authentication administrator only sees masked phone numbers. + +## Related Links diff --git a/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraOauth2PermissionGrant.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraOauth2PermissionGrant.md new file mode 100644 index 0000000000..978a067d65 --- /dev/null +++ b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Update-EntraOauth2PermissionGrant.md @@ -0,0 +1,128 @@ +--- +title: Update-EntraOauth2PermissionGrant +description: This article provides details on the Update-EntraOauth2PermissionGrant command. + +ms.topic: reference +ms.date: 11/01/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG +author: msewaweru + +external help file: Microsoft.Graph.Entra-help.xml +Module Name: Microsoft.Graph.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraOauth2PermissionGrant + +schema: 2.0.0 +--- + +# Update-EntraOauth2PermissionGrant + +## Synopsis + +Update the properties of a delegated permission grant (oAuth2PermissionGrant object). + +## Syntax + +```powershell +Update-EntraOauth2PermissionGrant + -OAuth2PermissionGrantId + [-Scope ] + [] +``` + +## Description + +The `Update-EntraOauth2PermissionGrant` cmdlet is used to update the properties of a delegated permission grant (oAuth2PermissionGrant object) by adding or removing items in the scopes list. + +To add new scopes, include both existing and new scopes in this parameter; otherwise, existing scopes will be overwritten. + +In delegated scenarios with work or school accounts, the signed-in user needs a supported Microsoft Entra role or a custom role with the required permissions. The least privileged roles that support this operation are: + +- Application Administrator +- Application Developer +- Cloud Application Administrator +- Directory Writers +- Privileged Role Administrator +- User Administrator + +## Examples + +### Example 1: Update delegated permission grant scope + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$clientServicePrincipal = Get-EntraServicePrincipal -Filter "displayName eq 'My application'" +$permissionGrant = Get-EntraOauth2PermissionGrant | Where-Object {$_.ClientId -eq $clientServicePrincipal.Id -and $_.Scope -eq 'Directory.Read.All'} +Update-EntraOauth2PermissionGrant -OAuth2PermissionGrantId $permissionGrant.Id -Scope 'Directory.Read.All User.Read.All' +``` + +This command updates a delegated permission grant. + +- `-OAuth2PermissionGrantId` parameter specifies the Unique identifier for the oAuth2PermissionGrant. +- `-Scope` parameter is a space-separated list of claim values for delegated permissions to include in access tokens for the resource application (API), such as `openid User.Read GroupMember.Read.All`. + +### Example 2: Clear all scopes in the delegated permission grant + +```powershell +Connect-Entra -Scopes 'DelegatedPermissionGrant.ReadWrite.All' +$clientServicePrincipal = Get-EntraServicePrincipal -Filter "displayName eq 'My application'" +$permissionGrant = Get-EntraOauth2PermissionGrant | Where-Object {$_.ClientId -eq $clientServicePrincipal.Id -and $_.Scope -eq 'Directory.Read.All'} +Update-EntraOauth2PermissionGrant -OAuth2PermissionGrantId $permissionGrant.Id -Scope '' +``` + +This command updates a delegated permission grant. + +- `-OAuth2PermissionGrantId` parameter specifies the Unique identifier for the oAuth2PermissionGrant. + +## Parameters + +### -OAuth2PermissionGrantId + +The Unique identifier for the oAuth2PermissionGrant. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Id + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Scope + +A space-separated list of claim values for delegated permissions to include in access tokens for the resource application (API), such as `openid User.Read GroupMember.Read.All`. Each claim must match a value in the API's publishedPermissionScopes property. The total length must not exceed 3850 characters. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVariable`, `-InformationAction`, `-InformationVariable`, `-OutVariable`, `-OutBuffer`, `-PipelineVariable`, `-Verbose`, `-WarningAction`, and `-WarningVariable`. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +## Inputs + +## Outputs + +## Notes + +## Related Links + +[Get-EntraOauth2PermissionGrant](Get-EntraOauth2PermissionGrant.md) + +[New-EntraOauth2PermissionGrant](New-EntraOauth2PermissionGrant.md) + +[Remove-EntraOauth2PermissionGrant](Remove-EntraOauth2PermissionGrant.md) From b12f18920fabca9d369d7007b39cccecab6ee8e1 Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Thu, 21 Nov 2024 17:43:07 +0300 Subject: [PATCH 114/124] Release pipeline - update module name (#1224) --- .azure-pipelines/1es-entra-powershell-release.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.azure-pipelines/1es-entra-powershell-release.yml b/.azure-pipelines/1es-entra-powershell-release.yml index 30b8a094d2..611b3c3efc 100644 --- a/.azure-pipelines/1es-entra-powershell-release.yml +++ b/.azure-pipelines/1es-entra-powershell-release.yml @@ -58,12 +58,7 @@ extends: displayName: Publish Nuget package inputs: useDotNetTask: false -<<<<<<< HEAD - packagesToPush: '$(System.ArtifactsDirectory)/drop/Microsoft.Graph.Entra*.nupkg' + packagesToPush: '$(System.ArtifactsDirectory)/drop/Microsoft.Entra*.nupkg' packageParentPath: '$(System.ArtifactsDirectory)' -======= - packagesToPush: '$(Pipeline.Workspace)/drop/Microsoft.Entra*.nupkg' - packageParentPath: '$(Pipeline.Workspace)/drop' ->>>>>>> e6ba625db (Rename module (#1223)) nuGetFeedType: external publishFeedCredentials: EntraPowerShell_PSGallery From 0d60fa9b00d7b68259ba3b71432211d13cdfe09f Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:56:21 +0300 Subject: [PATCH 115/124] Resplit for Release (#1226) --- ...cipalDelegatedPermissionClassification.ps1 | 70 +-- .../Add-EntraServicePrincipalOwner.ps1 | 48 +- .../Enable-EntraAzureADAliases.ps1 | 124 ++--- .../Get-EntraApplicationExtensionProperty.ps1 | 48 +- .../Get-EntraApplicationServiceEndpoint.ps1 | 68 +-- .../Get-EntraDeletedApplication.ps1 | 10 +- .../Get-EntraServicePrincipal.ps1 | 100 ++-- ...EntraServicePrincipalAppRoleAssignedTo.ps1 | 70 +-- ...EntraServicePrincipalAppRoleAssignment.ps1 | 70 +-- ...Get-EntraServicePrincipalCreatedObject.ps1 | 68 +-- ...cipalDelegatedPermissionClassification.ps1 | 62 +-- .../Get-EntraServicePrincipalMembership.ps1 | 68 +-- ...aServicePrincipalOAuth2PermissionGrant.ps1 | 68 +-- .../Get-EntraServicePrincipalOwnedObject.ps1 | 68 +-- .../Applications/New-EntraApplication.ps1 | 230 ++++---- .../New-EntraApplicationExtensionProperty.ps1 | 70 +-- .../Applications/New-EntraApplicationKey.ps1 | 66 +-- .../New-EntraApplicationKeyCredential.ps1 | 86 +-- .../New-EntraApplicationPassword.ps1 | 78 +-- .../New-EntraServicePrincipal.ps1 | 202 ++++---- ...EntraServicePrincipalAppRoleAssignment.ps1 | 70 +-- .../Applications/Remove-EntraApplication.ps1 | 48 +- ...move-EntraApplicationExtensionProperty.ps1 | 48 +- .../Remove-EntraApplicationKey.ps1 | 60 +-- .../Remove-EntraApplicationKeyCredential.ps1 | 60 +-- .../Remove-EntraApplicationOwner.ps1 | 56 +- .../Remove-EntraApplicationPassword.ps1 | 64 +-- ...ove-EntraApplicationPasswordCredential.ps1 | 60 +-- ...move-EntraApplicationVerifiedPublisher.ps1 | 52 +- .../Remove-EntraDeletedApplication.ps1 | 48 +- .../Remove-EntraServicePrincipal.ps1 | 48 +- ...EntraServicePrincipalAppRoleAssignment.ps1 | 48 +- ...cipalDelegatedPermissionClassification.ps1 | 4 +- ...ove-EntraServicePrincipalKeyCredential.ps1 | 60 +-- .../Restore-EntraDeletedApplication.ps1 | 8 +- ...ntraGroupIdsServicePrincipalIsMemberOf.ps1 | 4 +- .../Set-EntraApplicationVerifiedPublisher.ps1 | 52 +- .../Enable-EntraAzureADAliases.ps1 | 42 +- .../Revoke-EntraUserAllRefreshToken.ps1 | 48 +- .../Add-EntraDeviceRegisteredOwner.ps1 | 48 +- .../Add-EntraDeviceRegisteredUser.ps1 | 48 +- .../Add-EntraDirectoryRoleMember.ps1 | 48 +- .../Confirm-EntraDomain.ps1 | 52 +- .../Enable-EntraAzureADAliases.ps1 | 104 ++-- .../Enable-EntraDirectoryRole.ps1 | 52 +- .../Get-EntraContactDirectReport.ps1 | 68 +-- .../Get-EntraContactManager.ps1 | 48 +- .../Get-EntraContactMembership.ps1 | 68 +-- .../DirectoryManagement/Get-EntraContract.ps1 | 88 ++-- ...EntraCustomSecurityAttributeDefinition.ps1 | 50 ++ .../Get-EntraDeletedDirectoryObject.ps1 | 48 +- .../DirectoryManagement/Get-EntraDevice.ps1 | 112 ++-- .../Get-EntraDirSyncFeature.ps1} | 2 +- .../Get-EntraDirectoryRole.ps1 | 68 +-- .../Get-EntraDirectoryRoleTemplate.ps1 | 48 +- ...-EntraDomainServiceConfigurationRecord.ps1 | 48 +- .../Get-EntraDomainVerificationDnsRecord.ps1 | 48 +- .../Get-EntraExtensionProperty.ps1 | 48 +- .../Get-EntraObjectByObjectId.ps1 | 6 +- .../Get-EntraUserAuthenticationMethod.ps1 | 57 ++ .../DirectoryManagement/New-EntraDevice.ps1 | 132 ++--- .../DirectoryManagement/New-EntraDomain.ps1 | 66 +-- .../Remove-EntraContact.ps1 | 48 +- .../Remove-EntraDevice.ps1 | 48 +- .../Remove-EntraDeviceRegisteredOwner.ps1 | 56 +- .../Remove-EntraDeviceRegisteredUser.ps1 | 48 +- .../Remove-EntraDirectoryRoleMember.ps1 | 56 +- .../Remove-EntraDomain.ps1 | 48 +- .../Restore-EntraDeletedDirectoryObject.ps1 | 5 +- .../Set-EntraAdministrativeUnit.ps1 | 3 + .../DirectoryManagement/Set-EntraDomain.ps1 | 66 +-- .../Set-EntraTenantDetail.ps1 | 4 +- .../Update-EntraOauth2PermissionGrant.ps1 | 41 ++ .../Enable-EntraAzureADAlias.ps1 | 358 ++++++------- .../Governance/Enable-EntraAzureADAliases.ps1 | 48 +- .../Get-EntraDirectoryRoleAssignment.ps1 | 90 ++-- .../New-EntraDirectoryRoleAssignment.ps1 | 64 +-- .../New-EntraDirectoryRoleDefinition.ps1 | 104 ++-- .../Remove-EntraDirectoryRoleAssignment.ps1 | 48 +- .../Remove-EntraDirectoryRoleDefinition.ps1 | 48 +- .../Set-EntraDirectoryRoleDefinition.ps1 | 110 ++-- .../Groups/Add-EntraGroupMember.ps1 | 49 +- .../Groups/Add-EntraGroupOwner.ps1 | 49 +- .../Groups/Add-EntraLifecyclePolicyGroup.ps1 | 61 ++- .../Groups/Enable-EntraAzureADAliases.ps1 | 80 +-- .../Groups/Get-EntraDeletedGroup.ps1 | 1 + .../Microsoft.Entra/Groups/Get-EntraGroup.ps1 | 100 ++-- .../Get-EntraGroupAppRoleAssignment.ps1 | 68 +-- .../Groups/Get-EntraGroupLifecyclePolicy.ps1 | 48 +- .../Groups/Get-EntraGroupPermissionGrant.ps1 | 48 +- .../Groups/Get-EntraLifecyclePolicyGroup.ps1 | 48 +- .../Groups/Get-EntraObjectSetting.ps1 | 4 +- .../Microsoft.Entra/Groups/New-EntraGroup.ps1 | 94 ++-- .../New-EntraGroupAppRoleAssignment.ps1 | 72 +-- .../Groups/New-EntraGroupLifecyclePolicy.ps1 | 58 +-- .../Groups/Remove-EntraGroup.ps1 | 48 +- .../Remove-EntraGroupAppRoleAssignment.ps1 | 48 +- .../Remove-EntraGroupLifecyclePolicy.ps1 | 48 +- .../Groups/Remove-EntraGroupMember.ps1 | 56 +- .../Groups/Remove-EntraGroupOwner.ps1 | 56 +- .../Remove-EntraLifecyclePolicyGroup.ps1 | 60 +-- .../Groups/Reset-EntraLifeCycleGroup.ps1 | 48 +- .../Select-EntraGroupIdsContactIsMemberOf.ps1 | 4 +- .../Select-EntraGroupIdsGroupIsMemberOf.ps1 | 4 +- .../Select-EntraGroupIdsUserIsMemberOf.ps1 | 4 +- .../Microsoft.Entra/Groups/Set-EntraGroup.ps1 | 91 ++-- .../Groups/Set-EntraGroupLifecyclePolicy.ps1 | 73 ++- .../Reports/Enable-EntraAzureADAliases.ps1 | 42 +- .../SignIns/Enable-EntraAzureADAliases.ps1 | 85 +-- .../SignIns/Get-EntraAuthorizationPolicy.ps1 | 2 +- .../Get-EntraConditionalAccessPolicy.ps1 | 50 +- .../SignIns/Get-EntraFeatureRolloutPolicy.ps1 | 2 +- .../SignIns/Get-EntraIdentityProvider.ps1 | 51 +- .../SignIns/Get-EntraNamedLocationPolicy.ps1 | 1 - .../Get-EntraOAuth2PermissionGrant.ps1 | 59 ++- .../Get-EntraPermissionGrantConditionSet.ps1 | 4 +- .../Get-EntraPermissionGrantPolicy.ps1 | 48 +- .../SignIns/Get-EntraPolicy.ps1 | 3 +- .../Get-EntraTrustedCertificateAuthority.ps1 | 4 +- .../New-EntraConditionalAccessPolicy.ps1 | 108 ++-- .../SignIns/New-EntraCustomHeaders.ps1 | 2 +- .../SignIns/New-EntraFeatureRolloutPolicy.ps1 | 3 +- .../SignIns/New-EntraIdentityProvider.ps1 | 10 +- .../SignIns}/New-EntraInvitation.ps1 | 14 +- .../SignIns/New-EntraNamedLocationPolicy.ps1 | 12 +- .../New-EntraOauth2PermissionGrant.ps1 | 27 +- .../New-EntraPermissionGrantConditionSet.ps1 | 20 +- .../New-EntraPermissionGrantPolicy.ps1 | 60 +-- .../SignIns/New-EntraPolicy.ps1 | 2 +- .../Remove-EntraConditionalAccessPolicy.ps1 | 48 +- .../Remove-EntraFeatureRolloutPolicy.ps1 | 52 +- .../SignIns/Remove-EntraIdentityProvider.ps1 | 48 +- .../Remove-EntraNamedLocationPolicy.ps1 | 48 +- .../Remove-EntraOAuth2PermissionGrant.ps1 | 48 +- ...emove-EntraPermissionGrantConditionSet.ps1 | 4 +- .../Remove-EntraPermissionGrantPolicy.ps1 | 48 +- .../SignIns/Remove-EntraPolicy.ps1 | 3 +- .../SignIns/Set-EntraAuthorizationPolicy.ps1 | 100 ++-- .../Set-EntraConditionalAccessPolicy.ps1 | 152 +++--- .../SignIns/Set-EntraFeatureRolloutPolicy.ps1 | 2 +- .../SignIns/Set-EntraNamedLocationPolicy.ps1 | 20 +- .../Set-EntraPermissionGrantConditionSet.ps1 | 27 +- .../Set-EntraPermissionGrantPolicy.ps1 | 61 +-- .../SignIns/Set-EntraPolicy.ps1 | 4 +- .../Users/Enable-EntraAzureADAliases.ps1 | 78 +-- .../Users/Get-EntraUserAppRoleAssignment.ps1 | 68 +-- .../Users/Get-EntraUserLicenseDetail.ps1 | 48 +- .../Users/Get-EntraUserMembership.ps1 | 68 +-- .../Get-EntraUserOAuth2PermissionGrant.ps1 | 68 +-- .../Users/Get-EntraUserThumbnailPhoto.ps1 | 70 +-- .../Microsoft.Entra/Users/New-EntraUser.ps1 | 76 +-- .../Users/New-EntraUserAppRoleAssignment.ps1 | 70 +-- .../Users/Remove-EntraUser.ps1 | 48 +- .../Remove-EntraUserAppRoleAssignment.ps1 | 48 +- .../Users/Remove-EntraUserExtension.ps1 | 56 +- .../Users/Remove-EntraUserManager.ps1 | 48 +- .../Microsoft.Entra/Users/Set-EntraUser.ps1 | 258 ++++----- .../Users/Set-EntraUserManager.ps1 | 48 +- .../Users/Set-EntraUserThumbnailPhoto.ps1 | 64 +-- .../Update-EntraSignedInUserPassword.ps1 | 4 +- .../UnMappedFiles/New-EntraCustomHeaders.ps1 | 31 ++ .../Entra/UnMappedFiles/Test-EntraScript.ps1 | 65 ++- module/Entra/config/moduleMapping.json | 2 +- .../Add-EntraBetaApplicationOwner.ps1 | 64 +-- .../Add-EntraBetaApplicationPolicy.ps1 | 4 +- ...cipalDelegatedPermissionClassification.ps1 | 66 +-- .../Add-EntraBetaServicePrincipalOwner.ps1 | 64 +-- .../Enable-EntraAzureADAliases.ps1 | 116 ----- ...-EntraBetaApplicationExtensionProperty.ps1 | 48 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 60 +-- .../Get-EntraBetaServicePrincipal.ps1 | 74 +-- ...aBetaServicePrincipalAppRoleAssignedTo.ps1 | 58 +-- ...aBetaServicePrincipalAppRoleAssignment.ps1 | 58 +-- ...EntraBetaServicePrincipalCreatedObject.ps1 | 58 +-- ...cipalDelegatedPermissionClassification.ps1 | 66 +-- ...et-EntraBetaServicePrincipalMembership.ps1 | 58 +-- ...aServicePrincipalOAuth2PermissionGrant.ps1 | 58 +-- ...t-EntraBetaServicePrincipalOwnedObject.ps1 | 58 +-- .../Get-EntraBetaServicePrincipalOwner.ps1 | 61 +-- .../Applications/New-EntraBetaApplication.ps1 | 258 ++++----- ...-EntraBetaApplicationExtensionProperty.ps1 | 68 +-- .../New-EntraBetaApplicationKey.ps1 | 62 +-- .../New-EntraBetaApplicationKeyCredential.ps1 | 86 +-- .../New-EntraBetaApplicationPassword.ps1 | 48 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 56 +- .../New-EntraBetaServicePrincipal.ps1 | 158 +++--- ...aBetaServicePrincipalAppRoleAssignment.ps1 | 66 +-- .../Remove-EntraBetaApplication.ps1 | 48 +- ...-EntraBetaApplicationExtensionProperty.ps1 | 56 +- .../Remove-EntraBetaApplicationKey.ps1 | 64 +-- ...move-EntraBetaApplicationKeyCredential.ps1 | 48 +- .../Remove-EntraBetaApplicationOwner.ps1 | 52 +- .../Remove-EntraBetaApplicationPassword.ps1 | 52 +- ...EntraBetaApplicationPasswordCredential.ps1 | 48 +- ...ntraBetaApplicationProxyConnectorGroup.ps1 | 2 +- ...-EntraBetaApplicationVerifiedPublisher.ps1 | 48 +- .../Remove-EntraBetaDeletedApplication.ps1 | 48 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 60 +-- .../Remove-EntraBetaServicePrincipal.ps1 | 48 +- ...aBetaServicePrincipalAppRoleAssignment.ps1 | 64 +-- ...cipalDelegatedPermissionClassification.ps1 | 4 +- .../Remove-EntraBetaServicePrincipalOwner.ps1 | 52 +- .../Restore-EntraBetaDeletedApplication.ps1 | 8 +- ...BetaGroupIdsServicePrincipalIsMemberOf.ps1 | 4 +- ...licationProxyApplicationConnectorGroup.ps1 | 44 ++ ...pplicationProxyApplicationSingleSignOn.ps1 | 2 +- ...ntraBetaApplicationProxyConnectorGroup.ps1 | 2 +- ...-EntraBetaApplicationVerifiedPublisher.ps1 | 52 +- ...ntraBetaPasswordSingleSignOnCredential.ps1 | 56 +- .../Enable-EntraAzureADAliases.ps1 | 51 -- .../Get-EntraUnsupportedCommand.ps1 | 8 - .../Revoke-EntraBetaUserAllRefreshToken.ps1 | 48 +- ...ecurityAttributeDefinitionAllowedValue.ps1 | 56 +- .../Add-EntraBetaDeviceRegisteredOwner.ps1 | 64 +-- .../Add-EntraBetaDeviceRegisteredUser.ps1 | 64 +-- .../Add-EntraBetaDirectoryRoleMember.ps1 | 64 +-- .../Enable-EntraAzureADAliases.ps1 | 111 ---- .../Enable-EntraBetaDirectoryRole.ps1 | 48 +- .../Get-EntraBetaAdministrativeUnit.ps1 | 72 +-- .../Get-EntraBetaAdministrativeUnitMember.ps1 | 58 +-- .../Get-EntraBetaAttributeSet.ps1 | 52 +- .../Get-EntraBetaContactDirectReport.ps1 | 58 +-- .../Get-EntraBetaContactManager.ps1 | 48 +- .../Get-EntraBetaContactMembership.ps1 | 58 +-- .../Get-EntraBetaContract.ps1 | 72 +-- ...aBetaCustomSecurityAttributeDefinition.ps1 | 52 +- ...ecurityAttributeDefinitionAllowedValue.ps1 | 60 +-- .../Get-EntraBetaDeletedDirectoryObject.ps1 | 52 +- .../Get-EntraBetaDevice.ps1 | 84 +-- .../Get-EntraBetaDirectoryRole.ps1 | 66 +-- .../Get-EntraBetaDirectoryRoleTemplate.ps1 | 44 +- .../Get-EntraBetaDirectorySetting.ps1 | 60 +-- ...raBetaDomainServiceConfigurationRecord.ps1 | 50 +- ...t-EntraBetaDomainVerificationDnsRecord.ps1 | 50 +- .../Get-EntraUnsupportedCommand.ps1 | 8 - .../New-EntraBetaAdministrativeUnit.ps1 | 78 +-- ...aBetaCustomSecurityAttributeDefinition.ps1 | 94 ++-- .../New-EntraBetaDevice.ps1 | 138 ++--- .../New-EntraBetaDirectorySetting.ps1 | 52 +- .../New-EntraBetaDomain.ps1 | 70 +-- .../Remove-EntraBetaAdministrativeUnit.ps1 | 48 +- ...move-EntraBetaAdministrativeUnitMember.ps1 | 60 +-- .../Remove-EntraBetaContact.ps1 | 48 +- .../Remove-EntraBetaDevice.ps1 | 48 +- .../Remove-EntraBetaDeviceRegisteredOwner.ps1 | 52 +- .../Remove-EntraBetaDeviceRegisteredUser.ps1 | 52 +- .../Remove-EntraBetaDirectoryRoleMember.ps1 | 60 +-- .../Remove-EntraBetaDirectorySetting.ps1 | 52 +- .../Remove-EntraBetaDomain.ps1 | 48 +- .../Remove-EntraBetaScopedRoleMembership.ps1 | 56 +- ...estore-EntraBetaDeletedDirectoryObject.ps1 | 50 -- .../Set-EntraBetaAdministrativeUnit.ps1 | 88 ++-- ...aBetaCustomSecurityAttributeDefinition.ps1 | 74 +-- ...ecurityAttributeDefinitionAllowedValue.ps1 | 56 +- .../Set-EntraBetaDirectorySetting.ps1 | 64 +-- .../Set-EntraBetaDomain.ps1 | 74 +-- .../Set-EntraBetaTenantDetail.ps1 | 8 +- .../Governance/Enable-EntraAzureADAliases.ps1 | 69 --- .../Get-EntraBetaDirectoryRoleAssignment.ps1 | 64 +-- .../Get-EntraBetaPrivilegedResource.ps1 | 56 +- .../Get-EntraBetaPrivilegedRole.ps1 | 52 +- ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 56 +- .../Get-EntraBetaPrivilegedRoleDefinition.ps1 | 72 +-- .../Get-EntraUnsupportedCommand.ps1 | 8 - .../New-EntraBetaDirectoryRoleAssignment.ps1 | 66 +-- .../New-EntraBetaDirectoryRoleDefinition.ps1 | 108 ++-- .../New-EntraBetaPrivilegedRoleAssignment.ps1 | 70 +-- ...emove-EntraBetaDirectoryRoleAssignment.ps1 | 52 +- ...emove-EntraBetaDirectoryRoleDefinition.ps1 | 52 +- .../Set-EntraBetaDirectoryRoleDefinition.ps1 | 106 ++-- ...traBetaPrivilegedRoleAssignmentRequest.ps1 | 82 +-- .../Set-EntraBetaPrivilegedRoleSetting.ps1 | 120 ++--- .../Groups/Add-EntraBetaGroupMember.ps1 | 60 +-- .../Groups/Add-EntraBetaGroupOwner.ps1 | 64 +-- .../Add-EntraBetaLifecyclePolicyGroup.ps1 | 60 +-- .../Groups/Enable-EntraAzureADAliases.ps1 | 78 --- .../Groups/Get-EntraBetaGroup.ps1 | 74 +-- .../Get-EntraBetaGroupAppRoleAssignment.ps1 | 58 +-- .../Get-EntraBetaGroupLifecyclePolicy.ps1 | 52 +- .../Get-EntraBetaGroupPermissionGrant.ps1 | 52 +- .../Get-EntraBetaLifecyclePolicyGroup.ps1 | 52 +- .../Groups/Get-EntraBetaObjectByObjectId.ps1 | 6 +- .../Groups/Get-EntraBetaObjectSetting.ps1 | 6 +- .../Groups/Get-EntraUnsupportedCommand.ps1 | 8 - .../Groups/New-EntraBetaGroup.ps1 | 116 ++--- .../New-EntraBetaGroupAppRoleAssignment.ps1 | 68 +-- .../New-EntraBetaGroupLifecyclePolicy.ps1 | 56 +- .../Groups/New-EntraBetaObjectSetting.ps1 | 6 +- .../Groups/Remove-EntraBetaGroup.ps1 | 48 +- ...Remove-EntraBetaGroupAppRoleAssignment.ps1 | 64 +-- .../Remove-EntraBetaGroupLifecyclePolicy.ps1 | 52 +- .../Groups/Remove-EntraBetaGroupMember.ps1 | 60 +-- .../Groups/Remove-EntraBetaGroupOwner.ps1 | 52 +- .../Remove-EntraBetaLifecyclePolicyGroup.ps1 | 60 +-- .../Groups/Remove-EntraBetaObjectSetting.ps1 | 6 +- .../Groups/Reset-EntraBetaLifeCycleGroup.ps1 | 52 +- ...ect-EntraBetaGroupIdsContactIsMemberOf.ps1 | 4 +- ...elect-EntraBetaGroupIdsGroupIsMemberOf.ps1 | 4 +- ...Select-EntraBetaGroupIdsUserIsMemberOf.ps1 | 4 +- .../Groups/Set-EntraBetaGroup.ps1 | 120 ++--- .../Set-EntraBetaGroupLifecyclePolicy.ps1 | 68 +-- .../Groups/Set-EntraBetaObjectSetting.ps1 | 8 +- .../Enable-EntraAzureADAliases.ps1 | 47 -- ...able-EntraBetaGlobalSecureAccessTenant.ps1 | 19 +- ...ntraBetaGlobalSecureAccessTenantStatus.ps1 | 23 +- .../Get-EntraBetaPrivateAccessApplication.ps1 | 45 +- ...traBetaPrivateAccessApplicationSegment.ps1 | 54 +- .../Get-EntraUnsupportedCommand.ps1 | 8 - .../New-EntraBetaPrivateAccessApplication.ps1 | 81 +-- ...traBetaPrivateAccessApplicationSegment.ps1 | 142 ++--- ...traBetaPrivateAccessApplicationSegment.ps1 | 77 +-- .../Reports/Enable-EntraAzureADAliases.ps1 | 53 -- .../Reports/Get-EntraUnsupportedCommand.ps1 | 8 - ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 56 +- .../Add-EntraBetaServicePrincipalPolicy.ps1 | 4 +- .../SignIns/Enable-EntraAzureADAliases.ps1 | 94 ---- .../Get-EntraBetaConditionalAccessPolicy.ps1 | 44 +- .../Get-EntraBetaFeatureRolloutPolicy.ps1 | 52 +- .../SignIns/Get-EntraBetaIdentityProvider.ps1 | 54 +- .../Get-EntraBetaOAuth2PermissionGrant.ps1 | 54 +- .../Get-EntraBetaPermissionGrantPolicy.ps1 | 52 +- ...t-EntraBetaTrustedCertificateAuthority.ps1 | 4 +- .../Get-EntraBetaUserAuthenticationMethod.ps1 | 58 +++ ...EntraBetaUserAuthenticationRequirement.ps1 | 36 ++ .../SignIns/Get-EntraUnsupportedCommand.ps1 | 8 - .../New-EntraBetaConditionalAccessPolicy.ps1 | 132 ++--- .../New-EntraBetaFeatureRolloutPolicy.ps1 | 90 ++-- .../SignIns/New-EntraBetaInvitation.ps1 | 22 +- .../New-EntraBetaNamedLocationPolicy.ps1 | 12 +- ...w-EntraBetaPermissionGrantConditionSet.ps1 | 22 +- .../New-EntraBetaPermissionGrantPolicy.ps1 | 58 +-- .../SignIns/New-EntraBetaPolicy.ps1 | 12 +- .../New-EntraBetaTrustFrameworkPolicy.ps1 | 6 +- ...emove-EntraBetaConditionalAccessPolicy.ps1 | 44 +- .../Remove-EntraBetaFeatureRolloutPolicy.ps1 | 52 +- ...etaFeatureRolloutPolicyDirectoryObject.ps1 | 56 +- .../Remove-EntraBetaIdentityProvider.ps1 | 52 +- .../Remove-EntraBetaNamedLocationPolicy.ps1 | 44 +- .../Remove-EntraBetaOAuth2PermissionGrant.ps1 | 48 +- .../Remove-EntraBetaPermissionGrantPolicy.ps1 | 52 +- .../Remove-EntraBetaTrustFrameworkPolicy.ps1 | 52 +- .../Set-EntraBetaAuthorizationPolicy.ps1 | 110 ++-- .../Set-EntraBetaConditionalAccessPolicy.ps1 | 128 ++--- .../Set-EntraBetaFeatureRolloutPolicy.ps1 | 88 ++-- .../Set-EntraBetaNamedLocationPolicy.ps1 | 14 +- ...t-EntraBetaPermissionGrantConditionSet.ps1 | 26 +- .../Set-EntraBetaPermissionGrantPolicy.ps1 | 64 +-- .../SignIns/Set-EntraBetaPolicy.ps1 | 8 +- .../Set-EntraBetaTrustFrameworkPolicy.ps1 | 6 +- .../Update-EntraBetaOauth2PermissionGrant.ps1 | 41 ++ ...EntraBetaUserAuthenticationRequirement.ps1 | 53 ++ .../Users/Enable-EntraAzureADAliases.ps1 | 73 --- .../Get-EntraBetaUserAppRoleAssignment.ps1 | 58 +-- .../Users/Get-EntraBetaUserLicenseDetail.ps1 | 48 +- .../Users/Get-EntraBetaUserMembership.ps1 | 58 +-- ...Get-EntraBetaUserOAuth2PermissionGrant.ps1 | 58 +-- .../Users/Get-EntraBetaUserThumbnailPhoto.ps1 | 66 +-- .../Users/Get-EntraUnsupportedCommand.ps1 | 8 - .../Users/New-EntraBetaUser.ps1 | 76 +-- .../New-EntraBetaUserAppRoleAssignment.ps1 | 66 +-- .../Users/Remove-EntraBetaUser.ps1 | 48 +- .../Remove-EntraBetaUserAppRoleAssignment.ps1 | 60 +-- .../Users/Remove-EntraBetaUserExtension.ps1 | 56 +- .../Users/Remove-EntraBetaUserManager.ps1 | 48 +- .../Users/Set-EntraBetaUser.ps1 | 256 ++++----- .../Users/Set-EntraBetaUserExtension.ps1 | 56 +- .../Users/Set-EntraBetaUserLicense.ps1 | 4 +- .../Users/Set-EntraBetaUserManager.ps1 | 64 +-- .../Users/Set-EntraBetaUserPassword.ps1 | 10 +- .../Users/Set-EntraBetaUserThumbnailPhoto.ps1 | 70 +-- .../Enable-EntraAzureADAlias.ps1} | 490 +++++++++--------- .../Get-EntraBetaDirSyncfeature.ps1 | 89 ---- .../Get-EntraUnsupportedCommand.ps1 | 0 .../New-EntraBetaCustomHeaders.ps1 | 29 ++ .../UnMappedFiles/Test-EntraScript.ps1 | 14 +- module/EntraBeta/config/moduleMapping.json | 11 +- src/EntraModuleSplitter.ps1 | 13 +- ...ervicePrincipalAppRoleAssignedTo.Tests.ps1 | 14 +- ...ervicePrincipalAppRoleAssignment.Tests.ps1 | 14 +- 379 files changed, 10367 insertions(+), 10785 deletions(-) rename module/Entra/{UnMappedFiles/Get-EntraDirSyncfeature.ps1 => Microsoft.Entra/DirectoryManagement/Get-EntraDirSyncFeature.ps1} (99%) create mode 100644 module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraUserAuthenticationMethod.ps1 create mode 100644 module/Entra/Microsoft.Entra/DirectoryManagement/Update-EntraOauth2PermissionGrant.ps1 rename module/Entra/{UnMappedFiles => Microsoft.Entra/SignIns}/New-EntraInvitation.ps1 (97%) create mode 100644 module/Entra/UnMappedFiles/New-EntraCustomHeaders.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 create mode 100644 module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaUserAuthenticationMethod.ps1 create mode 100644 module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaUserAuthenticationRequirement.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 create mode 100644 module/EntraBeta/Microsoft.Entra.Beta/SignIns/Update-EntraBetaOauth2PermissionGrant.ps1 create mode 100644 module/EntraBeta/Microsoft.Entra.Beta/SignIns/Update-EntraBetaUserAuthenticationRequirement.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 delete mode 100644 module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 rename module/EntraBeta/{Microsoft.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 => UnMappedFiles/Enable-EntraAzureADAlias.ps1} (100%) delete mode 100644 module/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 rename module/EntraBeta/{Microsoft.Entra.Beta/Applications => UnMappedFiles}/Get-EntraUnsupportedCommand.ps1 (100%) create mode 100644 module/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 diff --git a/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 index 3ffe5d02c8..23aea766ff 100644 --- a/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.ps1 @@ -6,86 +6,86 @@ function Add-EntraServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PermissionName, + [System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PermissionId, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $PermissionName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Classification"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Classification"] = $PSBoundParameters["Classification"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["Classification"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Classification"] = $PSBoundParameters["Classification"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PermissionName"]) - { - $params["PermissionName"] = $PSBoundParameters["PermissionName"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PermissionId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PermissionId"] = $PSBoundParameters["PermissionId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["PermissionName"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["PermissionName"] = $PSBoundParameters["PermissionName"] } - if ($null -ne $PSBoundParameters["PermissionId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PermissionId"] = $PSBoundParameters["PermissionId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 b/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 index 440e91ba33..6a69beac07 100644 --- a/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Add-EntraServicePrincipalOwner.ps1 @@ -17,49 +17,53 @@ function Add-EntraServicePrincipalOwner { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -71,10 +75,6 @@ function Add-EntraServicePrincipalOwner { $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/Applications/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Applications/Enable-EntraAzureADAliases.ps1 index 959c646781..ec173d258c 100644 --- a/module/Entra/Microsoft.Entra/Applications/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Enable-EntraAzureADAliases.ps1 @@ -3,91 +3,91 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraApplicationKey -Scope Global -Force - Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force - Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force - Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraServicePrincipalCreatedObject -Scope Global -Force Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraApplicationPassword -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraApplicationServiceEndpoint -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-EntraServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force Set-Alias -Name Remove-EntraServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-EntraServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 index 904f395864..aa5c695548 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationExtensionProperty.ps1 @@ -16,57 +16,57 @@ function Get-EntraApplicationExtensionProperty { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["ApplicationId"]) { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 index 43d2d78430..c3d47523ef 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraApplicationServiceEndpoint.ps1 @@ -5,15 +5,15 @@ function Get-EntraApplicationServiceEndpoint { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraApplicationServiceEndpoint { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraDeletedApplication.ps1 index c6ccc6a58f..1c022d989f 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraDeletedApplication.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraDeletedApplication.ps1 @@ -6,17 +6,17 @@ function Get-EntraDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipal.ps1 index ec90727804..a48b13d101 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipal.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipal.ps1 @@ -6,20 +6,20 @@ function Get-EntraServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,33 +28,57 @@ function Get-EntraServicePrincipal { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["SearchString"]) { @@ -62,6 +86,10 @@ function Get-EntraServicePrincipal { $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -70,42 +98,14 @@ function Get-EntraServicePrincipal { { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["Filter"]) - { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 index 2bf1c275d7..81afb5e464 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalAppRoleAssignedTo { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalAppRoleAssignedTo { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { @@ -94,7 +94,7 @@ function Get-EntraServicePrincipalAppRoleAssignedTo { $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - $response = Get-MgServicePrincipalAppRoleAssignment @params -Headers $customHeaders + $response = Get-MgServicePrincipalAppRoleAssignedTo @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 index e0db70289c..5d941d589c 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { @@ -94,7 +94,7 @@ function Get-EntraServicePrincipalAppRoleAssignment { $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - $response = Get-MgServicePrincipalAppRoleAssignedTo @params -Headers $customHeaders + $response = Get-MgServicePrincipalAppRoleAssignment @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 index 5d9018f2a5..7b18b898e3 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalCreatedObject.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalCreatedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalCreatedObject { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 index 14f7130b07..617f8214a8 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.ps1 @@ -6,14 +6,14 @@ function Get-EntraServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,29 +22,34 @@ function Get-EntraServicePrincipalDelegatedPermissionClassification { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{} - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { @@ -58,34 +63,29 @@ function Get-EntraServicePrincipalDelegatedPermissionClassification { { $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 index b5eb9e8abf..504277060b 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalMembership.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalMembership { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 index 88a9244252..f5b1434454 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 index d5dda82477..6134b20b18 100644 --- a/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Get-EntraServicePrincipalOwnedObject.ps1 @@ -5,15 +5,15 @@ function Get-EntraServicePrincipalOwnedObject { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraServicePrincipalOwnedObject { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Applications/New-EntraApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplication.ps1 index e43cd7410d..56ff641707 100644 --- a/module/Entra/Microsoft.Entra/Applications/New-EntraApplication.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/New-EntraApplication.ps1 @@ -7,87 +7,78 @@ function New-EntraApplication { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, + [System.String] $TokenEncryptionKeyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, + [Microsoft.Open.MSGraph.Model.WebApplication] $Web, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, + [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Tags, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, + [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $SignInAudience, + [System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, + [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TokenEncryptionKeyId, + [System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GroupMembershipClaims, + [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.WebApplication] $Web + [Microsoft.Open.MSGraph.Model.ApiApplication] $Api ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["PasswordCredentials"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["PasswordCredentials"] - $a = @() - $input = $TmpValue - foreach($v in $input) - { - $Temp = $v | ConvertTo-Json - $hash = @{} - - (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} - $a += $hash - } - - $Value = $a - $params["PasswordCredentials"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { @@ -111,6 +102,30 @@ function New-EntraApplication { $Value = $a $params["KeyCredentials"] = $Value } + if($null -ne $PSBoundParameters["Web"]) + { + $TmpValue = $PSBoundParameters["Web"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Web"] = $Value + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) + { + $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] + } if($null -ne $PSBoundParameters["AppRoles"]) { $TmpValue = $PSBoundParameters["AppRoles"] @@ -128,21 +143,9 @@ function New-EntraApplication { $Value = $a $params["AppRoles"] = $Value } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if($null -ne $PSBoundParameters["AddIns"]) - { - $TmpValue = $PSBoundParameters["AddIns"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["AddIns"] = $Value - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["IdentifierUris"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { @@ -150,59 +153,30 @@ function New-EntraApplication { $Value = $TmpValue | ConvertTo-Json $params["RequiredResourceAccess"] = $Value } - if ($null -ne $PSBoundParameters["Tags"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Tags"] = $PSBoundParameters["Tags"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($null -ne $PSBoundParameters["ParentalControlSettings"]) + if($null -ne $PSBoundParameters["AddIns"]) { - $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $TmpValue = $PSBoundParameters["AddIns"] $Temp = $TmpValue | ConvertTo-Json $Value = $Temp - $params["ParentalControlSettings"] = $Value - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["AddIns"] = $Value } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if($null -ne $PSBoundParameters["Api"]) - { - $TmpValue = $PSBoundParameters["Api"] - - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["Api"] = $Value - } - if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) - { - $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] - } - if($null -ne $PSBoundParameters["PublicClient"]) - { - $TmpValue = $PSBoundParameters["PublicClient"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["PublicClient"] = $Value - } if($null -ne $PSBoundParameters["InformationalUrl"]) { $TmpValue = $PSBoundParameters["InformationalUrl"] @@ -211,61 +185,87 @@ function New-EntraApplication { $Value = $Temp $params["Info"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($null -ne $PSBoundParameters["PasswordCredentials"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $TmpValue = $PSBoundParameters["PasswordCredentials"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $Temp = $v | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} + $a += $hash + } + + $Value = $a + $params["PasswordCredentials"] = $Value } - if($null -ne $PSBoundParameters["OptionalClaims"]) + if ($null -ne $PSBoundParameters["Tags"]) { - $TmpValue = $PSBoundParameters["OptionalClaims"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["OptionalClaims"] = $Value + $params["Tags"] = $PSBoundParameters["Tags"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["SignInAudience"]) - { - $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) + if($null -ne $PSBoundParameters["ParentalControlSettings"]) { - $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] + $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["ParentalControlSettings"] = $Value } if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) { $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["SignInAudience"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] } - if ($null -ne $PSBoundParameters["IdentifierUris"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($null -ne $PSBoundParameters["Web"]) + if($null -ne $PSBoundParameters["OptionalClaims"]) { - $TmpValue = $PSBoundParameters["Web"] + $TmpValue = $PSBoundParameters["OptionalClaims"] $Temp = $TmpValue | ConvertTo-Json $Value = $Temp - $params["Web"] = $Value + $params["OptionalClaims"] = $Value + } + if($null -ne $PSBoundParameters["PublicClient"]) + { + $TmpValue = $PSBoundParameters["PublicClient"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["PublicClient"] = $Value + } + if($null -ne $PSBoundParameters["Api"]) + { + $TmpValue = $PSBoundParameters["Api"] + + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Api"] = $Value } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 index 7d4300d54d..6510494f7d 100644 --- a/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationExtensionProperty.ps1 @@ -5,87 +5,87 @@ function New-EntraApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Name, + [System.String] $DataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $TargetObjects, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DataType + [System.String] $Name, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["DataType"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["DataType"] = $PSBoundParameters["DataType"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["TargetObjects"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if ($null -ne $PSBoundParameters["Name"]) { $params["Name"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["TargetObjects"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["DataType"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["DataType"] = $PSBoundParameters["DataType"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKey.ps1 index 445216d5f2..69f52ba5ca 100644 --- a/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKey.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKey.ps1 @@ -6,15 +6,15 @@ function New-EntraApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Proof, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ApplicationId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Proof, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential ) @@ -23,69 +23,69 @@ function New-EntraApplicationKey { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Proof"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Proof"] = $PSBoundParameters["Proof"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PasswordCredential"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PasswordCredential"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PasswordCredential"] = $PSBoundParameters["PasswordCredential"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Proof"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Proof"] = $PSBoundParameters["Proof"] } if ($null -ne $PSBoundParameters["KeyCredential"]) { $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKeyCredential.ps1 index c2db7345f9..62a0ee6a5d 100644 --- a/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKeyCredential.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationKeyCredential.ps1 @@ -7,74 +7,82 @@ function New-EntraApplicationKeyCredential { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Value, + [System.String] $CustomKeyIdentifier, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type, + [System.Nullable`1[System.DateTime]] $StartDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.DateTime]] $StartDate, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, + [System.Nullable`1[System.DateTime]] $EndDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, + [System.String] $Value, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.DateTime]] $EndDate, + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $CustomKeyIdentifier + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["Value"]) + if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { - $params["Value"] = $PSBoundParameters["Value"] + $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["StartDate"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["StartDate"] = $PSBoundParameters["StartDate"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["EndDate"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["EndDate"] = $PSBoundParameters["EndDate"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Type"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Type"] = $PSBoundParameters["Type"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Value"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Value"] = $PSBoundParameters["Value"] } - if ($null -ne $PSBoundParameters["StartDate"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["StartDate"] = $PSBoundParameters["StartDate"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Type"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Type"] = $PSBoundParameters["Type"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -84,9 +92,9 @@ function New-EntraApplicationKeyCredential { { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -96,17 +104,9 @@ function New-EntraApplicationKeyCredential { { $params["Usage"] = $PSBoundParameters["Usage"] } - if ($null -ne $PSBoundParameters["EndDate"]) - { - $params["EndDate"] = $PSBoundParameters["EndDate"] - } - if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) - { - $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationPassword.ps1 index bf522a2c2a..7587ce592e 100644 --- a/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationPassword.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/New-EntraApplicationPassword.ps1 @@ -5,82 +5,82 @@ function New-EntraApplicationPassword { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential + [Microsoft.Open.MSGraph.Model.PasswordCredential] $PasswordCredential, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["PasswordCredential"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["PasswordCredential"] + $hash = @{} + $TmpValue.PSObject.Properties | ForEach-Object { + if ($_.Value) { + $hash[$_.Name] = $_.Value + } + } + + $Value = $hash + $params["PasswordCredential"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($null -ne $PSBoundParameters["PasswordCredential"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $TmpValue = $PSBoundParameters["PasswordCredential"] - $hash = @{} - $TmpValue.PSObject.Properties | ForEach-Object { - if ($_.Value) { - $hash[$_.Name] = $_.Value - } - } - - $Value = $hash - $params["PasswordCredential"] = $Value + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipal.ps1 index 33c29a19dd..dd81ff9f1b 100644 --- a/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipal.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipal.ps1 @@ -6,29 +6,29 @@ function New-EntraServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AppId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + [System.Collections.Generic.List`1[System.String]] $AlternativeNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, + [System.String] $ErrorUrl, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ReplyUrls, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AccountEnabled, + [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $LogoutUrl, + [System.String] $ServicePrincipalType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ErrorUrl, + [System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Tags, + [System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, @@ -37,32 +37,96 @@ function New-EntraServicePrincipal { [System.String] $PublisherName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $SamlMetadataUrl, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $AlternativeNames, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Homepage, + [System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, + [System.Collections.Generic.List`1[System.String]] $Tags, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ServicePrincipalType + [System.String] $AccountEnabled ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["AlternativeNames"]) + { + $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ErrorUrl"]) + { + $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + } if ($null -ne $PSBoundParameters["AppId"]) { $params["AppId"] = $PSBoundParameters["AppId"] } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) + { + $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalType"]) + { + $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] + } + if ($null -ne $PSBoundParameters["Homepage"]) + { + $params["Homepage"] = $PSBoundParameters["Homepage"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ReplyUrls"]) + { + $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] + } + if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) + { + $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] + } + if ($null -ne $PSBoundParameters["PublisherName"]) + { + $params["PublisherName"] = $PSBoundParameters["PublisherName"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } if($null -ne $PSBoundParameters["PasswordCredentials"]) { $TmpValue = $PSBoundParameters["PasswordCredentials"] @@ -82,10 +146,6 @@ function New-EntraServicePrincipal { $Value = $a $params["PasswordCredentials"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($null -ne $PSBoundParameters["KeyCredentials"]) { $TmpValue = $PSBoundParameters["KeyCredentials"] @@ -107,108 +167,48 @@ function New-EntraServicePrincipal { $Value = $a $params["KeyCredentials"] = $Value } - if ($null -ne $PSBoundParameters["ReplyUrls"]) - { - $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] - } - if($null -ne $PSBoundParameters["AccountEnabled"]) - { - $TmpValue = $PSBoundParameters["AccountEnabled"] - $Value = $null - - if (-not [bool]::TryParse($TmpValue, [ref]$Value)) { - throw 'Invalid input for AccountEnabled' - return - } - $params["AccountEnabled"] = $Value - } - if ($null -ne $PSBoundParameters["LogoutUrl"]) - { - $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ErrorUrl"]) - { - $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] - } - if ($null -ne $PSBoundParameters["Tags"]) - { - $params["Tags"] = $PSBoundParameters["Tags"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) - { - $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] - } - if ($null -ne $PSBoundParameters["PublisherName"]) - { - $params["PublisherName"] = $PSBoundParameters["PublisherName"] - } if ($null -ne $PSBoundParameters["SamlMetadataUrl"]) { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["AlternativeNames"]) + if ($null -ne $PSBoundParameters["Tags"]) { - $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] + $params["Tags"] = $PSBoundParameters["Tags"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["Homepage"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Homepage"] = $PSBoundParameters["Homepage"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) + if ($null -ne $PSBoundParameters["LogoutUrl"]) { - $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] + $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["AccountEnabled"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["AccountEnabled"] + $Value = $null + + if (-not [bool]::TryParse($TmpValue, [ref]$Value)) { + throw 'Invalid input for AccountEnabled' + return + } + $params["AccountEnabled"] = $Value } - if ($null -ne $PSBoundParameters["ServicePrincipalType"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 index b22620196b..642526c1a4 100644 --- a/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/New-EntraServicePrincipalAppRoleAssignment.ps1 @@ -6,86 +6,86 @@ function New-EntraServicePrincipalAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id, + [System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["AppRoleId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["AppRoleId"] = $PSBoundParameters["Id"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplication.ps1 index f1fc7f7548..034b825b95 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplication.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplication.ps1 @@ -14,57 +14,57 @@ function Remove-EntraApplication { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["ApplicationId"]) { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 index 82cd3b9d54..c6456c4147 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationExtensionProperty.ps1 @@ -17,42 +17,42 @@ function Remove-EntraApplicationExtensionProperty { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["ApplicationId"]) { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] @@ -61,17 +61,17 @@ function Remove-EntraApplicationExtensionProperty { { $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKey.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKey.ps1 index 1e5f92d8ac..3beb994e77 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKey.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKey.ps1 @@ -7,78 +7,78 @@ function Remove-EntraApplicationKey { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Proof, + [System.String] $KeyId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ApplicationId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $KeyId + [System.String] $Proof ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Proof"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Proof"] = $PSBoundParameters["Proof"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Proof"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Proof"] = $PSBoundParameters["Proof"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 index 4b7808c20c..cfc6f5449b 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationKeyCredential.ps1 @@ -5,73 +5,73 @@ function Remove-EntraApplicationKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $KeyId + [System.String] $KeyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationOwner.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationOwner.ps1 index ebeb0da6c6..0095bea9e7 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationOwner.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationOwner.ps1 @@ -5,73 +5,73 @@ function Remove-EntraApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OwnerId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId + [System.String] $ApplicationId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["ApplicationId"]) { $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPassword.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPassword.ps1 index cbc218a2e5..e9bf9bb5f7 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPassword.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPassword.ps1 @@ -6,72 +6,72 @@ function Remove-EntraApplicationPassword { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $KeyId + [System.String] $KeyId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 index 0baba3ca31..40c064260c 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationPasswordCredential.ps1 @@ -5,73 +5,73 @@ function Remove-EntraApplicationPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $KeyId + [System.String] $KeyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 index 353765b6df..ef8cf85d18 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraApplicationVerifiedPublisher.ps1 @@ -14,57 +14,57 @@ function Remove-EntraApplicationVerifiedPublisher { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AppObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["AppObjectId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraDeletedApplication.ps1 index abcc21adeb..701b0274f9 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraDeletedApplication.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraDeletedApplication.ps1 @@ -14,57 +14,57 @@ function Remove-EntraDeletedApplication { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["ObjectId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipal.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipal.ps1 index 5c8c4e43f7..5dc9bc5365 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipal.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipal.ps1 @@ -14,57 +14,57 @@ function Remove-EntraServicePrincipal { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 index a145bc1253..112b83fea2 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalAppRoleAssignment.ps1 @@ -17,61 +17,61 @@ function Remove-EntraServicePrincipalAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 index 0357d442ec..c22fecfcfe 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.ps1 @@ -7,10 +7,10 @@ function Remove-EntraServicePrincipalDelegatedPermissionClassification { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId + [System.String] $Id ) PROCESS{ diff --git a/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 index f80e1a848e..dda29fc1aa 100644 --- a/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Remove-EntraServicePrincipalKeyCredential.ps1 @@ -5,73 +5,73 @@ function Remove-EntraServicePrincipalKeyCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $KeyId + [System.String] $KeyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Applications/Restore-EntraDeletedApplication.ps1 b/module/Entra/Microsoft.Entra/Applications/Restore-EntraDeletedApplication.ps1 index 87eaadc227..703c5baf03 100644 --- a/module/Entra/Microsoft.Entra/Applications/Restore-EntraDeletedApplication.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Restore-EntraDeletedApplication.ps1 @@ -6,11 +6,11 @@ function Restore-EntraDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $IdentifierUris + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 b/module/Entra/Microsoft.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 index 6e7905c73c..a1981bcd68 100644 --- a/module/Entra/Microsoft.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraGroupIdsServicePrincipalIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck + [System.String] $ObjectId ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 b/module/Entra/Microsoft.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 index dc981a6c9a..f05ff18489 100644 --- a/module/Entra/Microsoft.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 +++ b/module/Entra/Microsoft.Entra/Applications/Set-EntraApplicationVerifiedPublisher.ps1 @@ -17,61 +17,61 @@ function Set-EntraApplicationVerifiedPublisher { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AppObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["AppObjectId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Authentication/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Authentication/Enable-EntraAzureADAliases.ps1 index a4d44469e4..e078d85bca 100644 --- a/module/Entra/Microsoft.Entra/Authentication/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Entra/Authentication/Enable-EntraAzureADAliases.ps1 @@ -6,37 +6,37 @@ function Enable-EntraAzureADAliases { Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraUserAllRefreshToken -Scope Global -Force Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Connect-AzureAD -Value Connect-Entra -Scope Global -Force Set-Alias -Name Disconnect-AzureAD -Value Disconnect-Entra -Scope Global -Force diff --git a/module/Entra/Microsoft.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 b/module/Entra/Microsoft.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 index 7ee97f340c..a3643f5a1a 100644 --- a/module/Entra/Microsoft.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 +++ b/module/Entra/Microsoft.Entra/Authentication/Revoke-EntraUserAllRefreshToken.ps1 @@ -14,57 +14,57 @@ function Revoke-EntraUserAllRefreshToken { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["UserId"]) { $params["UserId"] = $PSBoundParameters["UserId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 index cc3c6abeb2..9c3aefb01c 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredOwner.ps1 @@ -17,49 +17,53 @@ function Add-EntraDeviceRegisteredOwner { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -71,10 +75,6 @@ function Add-EntraDeviceRegisteredOwner { $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 index c39e09efa8..b49dc25c92 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDeviceRegisteredUser.ps1 @@ -17,49 +17,53 @@ function Add-EntraDeviceRegisteredUser { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -71,10 +75,6 @@ function Add-EntraDeviceRegisteredUser { $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 index ff52e333d9..c387fee134 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Add-EntraDirectoryRoleMember.ps1 @@ -17,49 +17,53 @@ function Add-EntraDirectoryRoleMember { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -71,10 +75,6 @@ function Add-EntraDirectoryRoleMember { $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" $params["OdataId"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 index c47e7cd1a8..5e452b401a 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Confirm-EntraDomain.ps1 @@ -17,38 +17,30 @@ function Confirm-EntraDomain { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -57,22 +49,30 @@ function Confirm-EntraDomain { { $params["DomainId"] = $PSBoundParameters["Name"] } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["CrossCloudVerificationCode"]) { $params["CrossCloudVerificationCode"] = $PSBoundParameters["CrossCloudVerificationCode"] } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 index d046d23267..7180c0cd1f 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraAzureADAliases.ps1 @@ -3,79 +3,79 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraDirectoryRoleTemplate -Scope Global -Force - Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-EntraAdministrativeUnit -Scope Global -Force - Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force - Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force - Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force - Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force - Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force - Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force - Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraDomainVerificationDnsRecord -Scope Global -Force - Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force - Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-EntraAdministrativeUnit -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force - Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force - Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name Get-AzureADContract -Value Get-EntraContract -Scope Global -Force - Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force - Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraDirectoryRoleTemplate -Scope Global -Force Set-Alias -Name Set-AzureADDevice -Value Set-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force Set-Alias -Name New-AzureADDevice -Value New-EntraDevice -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-EntraRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name Get-EntraRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Add-EntraCustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 index 6d172b5085..bd1cbeb9b1 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Enable-EntraDirectoryRole.ps1 @@ -14,57 +14,57 @@ function Enable-EntraDirectoryRole { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["RoleTemplateId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["RoleTemplateId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 index 92979216c7..201b03aabe 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactDirectReport.ps1 @@ -5,15 +5,15 @@ function Get-EntraContactDirectReport { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OrgContactId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraContactDirectReport { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactManager.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactManager.ps1 index 74103b4f7f..29d169c64e 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactManager.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactManager.ps1 @@ -16,57 +16,57 @@ function Get-EntraContactManager { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["OrgContactId"]) { $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 index 38a9c39b4d..c9f663a339 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContactMembership.ps1 @@ -5,15 +5,15 @@ function Get-EntraContactMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OrgContactId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OrgContactId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraContactMembership { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContract.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContract.ps1 index 062b76c106..9328331cd6 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContract.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraContract.ps1 @@ -5,18 +5,18 @@ function Get-EntraContract { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ContractId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ContractId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -25,34 +25,58 @@ function Get-EntraContract { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"} - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] @@ -65,38 +89,14 @@ function Get-EntraContract { { $params["ContractId"] = $PSBoundParameters["ContractId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["Filter"]) - { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 index 438be06236..9076df84fc 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.ps1 @@ -42,5 +42,55 @@ function Get-EntraCustomSecurityAttributeDefinition { $userList } } +}function Restore-EntraDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $AutoReconcileProxyConflict + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = 'https://graph.microsoft.com/v1.0/directory/deletedItems/' + $params["Method"] = "POST" + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] += $Id+"/microsoft.graph.restore" + } + if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) + { + $params["Body"] = @{ + autoReconcileProxyConflict = $true + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $data | ForEach-Object { + if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id + + } + } + $userList = @() + foreach ($res in $data) { + $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } }# ------------------------------------------------------------------------------ diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 index 3c0364d4e3..5b13f93cdc 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDeletedDirectoryObject.ps1 @@ -16,38 +16,30 @@ function Get-EntraDeletedDirectoryObject { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -56,17 +48,25 @@ function Get-EntraDeletedDirectoryObject { { $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDevice.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDevice.ps1 index a23ad86547..80895c241e 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDevice.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDevice.ps1 @@ -6,20 +6,20 @@ function Get-EntraDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,33 +28,57 @@ function Get-EntraDevice { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["SearchString"]) { @@ -62,6 +86,10 @@ function Get-EntraDevice { $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -70,42 +98,14 @@ function Get-EntraDevice { { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["Filter"]) - { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] @@ -118,15 +118,15 @@ function Get-EntraDevice { $response = Get-MgDevice @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name DevicePhysicalIds -Value PhysicalIds - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceTrustType -Value TrustType - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem + Add-Member -InputObject $_ -MemberType AliasProperty -Name ComplianceExpiryTime -Value ComplianceExpirationDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSVersion -Value OperatingSystemVersion - Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime - Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled - Add-Member -InputObject $_ -MemberType AliasProperty -Name ComplianceExpiryTime -Value ComplianceExpirationDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceTrustType -Value TrustType Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceObjectVersion -Value DeviceVersion Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id diff --git a/module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirSyncFeature.ps1 similarity index 99% rename from module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 rename to module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirSyncFeature.ps1 index 96ac75b343..0d767d67e0 100644 --- a/module/Entra/UnMappedFiles/Get-EntraDirSyncfeature.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirSyncFeature.ps1 @@ -2,7 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ -function Get-EntraDirSyncfeature { +function Get-EntraDirSyncFeature { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 index c4b54acde3..1948552233 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRole.ps1 @@ -5,12 +5,12 @@ function Get-EntraDirectoryRole { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DirectoryRoleId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -19,66 +19,66 @@ function Get-EntraDirectoryRole { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"} - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 index 64bbf4e10f..2c6d9a4dc3 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryRoleTemplate.ps1 @@ -13,53 +13,53 @@ function Get-EntraDirectoryRoleTemplate { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 index a63f43aa9b..22520b34d7 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.ps1 @@ -16,38 +16,30 @@ function Get-EntraDomainServiceConfigurationRecord { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -56,17 +48,25 @@ function Get-EntraDomainServiceConfigurationRecord { { $params["DomainId"] = $PSBoundParameters["Name"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 index 0e2285281a..2fb8bf249d 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.ps1 @@ -16,38 +16,30 @@ function Get-EntraDomainVerificationDnsRecord { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -56,17 +48,25 @@ function Get-EntraDomainVerificationDnsRecord { { $params["DomainId"] = $PSBoundParameters["Name"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 index cc443d0838..2bf29bae9a 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraExtensionProperty.ps1 @@ -14,58 +14,58 @@ function Get-EntraExtensionProperty { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["IsSyncedFromOnPremises"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["IsSyncedFromOnPremises"] = $PSBoundParameters["IsSyncedFromOnPremises"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["IsSyncedFromOnPremises"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["IsSyncedFromOnPremises"] = $PSBoundParameters["IsSyncedFromOnPremises"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 index be766a8bf1..7f635f2e2d 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraObjectByObjectId.ps1 @@ -6,11 +6,11 @@ function Get-EntraObjectByObjectId { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[System.String]] $ObjectIds, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $Types, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Collections.Generic.List`1[System.String]] $ObjectIds, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraUserAuthenticationMethod.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraUserAuthenticationMethod.ps1 new file mode 100644 index 0000000000..f06128c377 --- /dev/null +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraUserAuthenticationMethod.ps1 @@ -0,0 +1,57 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraUserAuthenticationMethod { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, HelpMessage = "Enter the User ID (ObjectId or UserPrincipalName) of the user whose authentication requirements you want to update.")] + [Alias("ObjectId")] + [System.String] $UserId + ) + + PROCESS { + try { + # Initialize headers and URI + $params = @{ } + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["UserId"]) { + $params["UserId"] = $PSBoundParameters["UserId"] + } + + $params["Url"] = "https://graph.microsoft.com/v1.0/users/$($params.UserId)/authentication/methods" + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + # Make the API call + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $params.Url -Method GET + + if ($response.ContainsKey('value')) { + $response = $response.value + } + + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + $authMethodList = @() + foreach ($res in $data) { + $authMethodType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAuthenticationMethod + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0, 1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $authMethodType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $authMethodType | Add-Member -MemberType AliasProperty -Name AuthenticationMethodType -Value '@odata.type' + $authMethodList += $authMethodType + } + + return $authMethodList + } + catch { + Write-Error "An error occurred while retrieving user authentication methods: $_" + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDevice.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDevice.ps1 index 87d68ec86e..3772708fff 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDevice.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDevice.ps1 @@ -6,64 +6,56 @@ function New-EntraDevice { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompliant, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ProfileType, + [System.String] $DeviceTrustType, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SystemLabels, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DeviceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Int32]] $DeviceObjectVersion, + [System.String] $DeviceMetadata, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DeviceOSVersion, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DeviceTrustType, + [System.Collections.Generic.List`1[System.String]] $SystemLabels, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DeviceOSType, + [System.String] $ProfileType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsManaged, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [System.String] $DeviceOSVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DeviceId, + [System.String] $DeviceOSType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DeviceMetadata, + [System.Nullable`1[System.Boolean]] $IsCompliant, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds + [System.Nullable`1[System.Boolean]] $AccountEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $DeviceObjectVersion ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["IsCompliant"]) - { - $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["DevicePhysicalIds"]) { $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] @@ -72,65 +64,65 @@ function New-EntraDevice { { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["AccountEnabled"]) + if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) { - $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProfileType"]) + if ($null -ne $PSBoundParameters["DeviceTrustType"]) { - $params["ProfileType"] = $PSBoundParameters["ProfileType"] + $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["DeviceMetadata"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if ($null -ne $PSBoundParameters["SystemLabels"]) { $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProfileType"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProfileType"] = $PSBoundParameters["ProfileType"] } - if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) + if ($null -ne $PSBoundParameters["IsManaged"]) { - $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] + $params["IsManaged"] = $PSBoundParameters["IsManaged"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["DeviceOSVersion"]) { $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] } - if ($null -ne $PSBoundParameters["DeviceTrustType"]) - { - $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if ($null -ne $PSBoundParameters["DeviceOSType"]) { @@ -140,29 +132,37 @@ function New-EntraDevice { { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["IsManaged"]) + if ($null -ne $PSBoundParameters["IsCompliant"]) { - $params["IsManaged"] = $PSBoundParameters["IsManaged"] + $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DeviceMetadata"]) + if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) { - $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] } - if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["AccountEnabled"]) + { + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + } + if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) + { + $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDomain.ps1 index c0f2aeb5cb..203eee97d1 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDomain.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/New-EntraDomain.ps1 @@ -7,62 +7,54 @@ function New-EntraDomain { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SupportedServices, + [System.Nullable`1[System.Boolean]] $IsDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, + [System.Collections.Generic.List`1[System.String]] $SupportedServices, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefault + [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["SupportedServices"]) + if ($null -ne $PSBoundParameters["IsDefault"]) { - $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + $params["IsDefault"] = $PSBoundParameters["IsDefault"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["SupportedServices"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) - { - $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -71,21 +63,29 @@ function New-EntraDomain { { $params["Id"] = $PSBoundParameters["Name"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } - if ($null -ne $PSBoundParameters["IsDefault"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["IsDefault"] = $PSBoundParameters["IsDefault"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraContact.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraContact.ps1 index e5be9f34bc..712df911e7 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraContact.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraContact.ps1 @@ -14,57 +14,57 @@ function Remove-EntraContact { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["OrgContactId"]) { $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDevice.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDevice.ps1 index f10bcc371b..98958e7c0b 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDevice.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDevice.ps1 @@ -14,57 +14,57 @@ function Remove-EntraDevice { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 index cb6394608b..f844392df8 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.ps1 @@ -5,73 +5,73 @@ function Remove-EntraDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OwnerId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId + [System.String] $DeviceId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 index 84131281e1..b80193caed 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDeviceRegisteredUser.ps1 @@ -17,61 +17,61 @@ function Remove-EntraDeviceRegisteredUser { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["UserId"]) { $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 index 6afac8cc3b..1199394718 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDirectoryRoleMember.ps1 @@ -5,73 +5,73 @@ function Remove-EntraDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $MemberId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DirectoryRoleId + [System.String] $DirectoryRoleId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["MemberId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["MemberId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDomain.ps1 index ba128fc4a6..822f466e26 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDomain.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Remove-EntraDomain.ps1 @@ -14,38 +14,30 @@ function Remove-EntraDomain { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -54,17 +46,25 @@ function Remove-EntraDomain { { $params["DomainId"] = $PSBoundParameters["Name"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 index e8b4f1e345..bcef60d8a7 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Restore-EntraDeletedDirectoryObject.ps1 @@ -3,6 +3,8 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + + function Restore-EntraDeletedDirectoryObject { [CmdletBinding(DefaultParameterSetName = '')] param ( @@ -53,5 +55,4 @@ function Restore-EntraDeletedDirectoryObject { } $userList } -}# ------------------------------------------------------------------------------ - +}# ------------------------------------------------------------------------------ \ No newline at end of file diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 index 229e6e710b..bd805fa8b7 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraAdministrativeUnit.ps1 @@ -2,6 +2,9 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + + + function Set-EntraAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDomain.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDomain.ps1 index d9f97bb1be..709a9b133f 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDomain.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraDomain.ps1 @@ -7,62 +7,54 @@ function Set-EntraDomain { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SupportedServices, + [System.Nullable`1[System.Boolean]] $IsDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, + [System.Collections.Generic.List`1[System.String]] $SupportedServices, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefault + [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["SupportedServices"]) + if ($null -ne $PSBoundParameters["IsDefault"]) { - $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + $params["IsDefault"] = $PSBoundParameters["IsDefault"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["SupportedServices"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) - { - $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -71,21 +63,29 @@ function Set-EntraDomain { { $params["DomainId"] = $PSBoundParameters["Name"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } - if ($null -ne $PSBoundParameters["IsDefault"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["IsDefault"] = $PSBoundParameters["IsDefault"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 index 05f40f8742..2c7e61e798 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Set-EntraTenantDetail.ps1 @@ -7,7 +7,7 @@ function Set-EntraTenantDetail { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile, + [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails, @@ -19,7 +19,7 @@ function Set-EntraTenantDetail { [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationPhones, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails + [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Update-EntraOauth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Update-EntraOauth2PermissionGrant.ps1 new file mode 100644 index 0000000000..aed509d2d1 --- /dev/null +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Update-EntraOauth2PermissionGrant.ps1 @@ -0,0 +1,41 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Update-EntraOauth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("Id")] + [System.String] $OAuth2PermissionGrantId, + + [Parameter(Mandatory = $false)] + [System.String] $Scope + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/v1.0/oauth2PermissionGrants/" + $params["Method"] = "PATCH" + + if ($null -ne $PSBoundParameters["OAuth2PermissionGrantId"]) { + $params["Uri"] += $OAuth2PermissionGrantId + } + + if ($null -ne $PSBoundParameters["Scope"]) { + $body["scope"] = $PSBoundParameters["Scope"] + } + + $params["Body"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Entra/Enable-EntraAzureADAlias.ps1 b/module/Entra/Microsoft.Entra/Enable-EntraAzureADAlias.ps1 index e695210554..b7d9ca05c1 100644 --- a/module/Entra/Microsoft.Entra/Enable-EntraAzureADAlias.ps1 +++ b/module/Entra/Microsoft.Entra/Enable-EntraAzureADAlias.ps1 @@ -3,219 +3,219 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAlias { - Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force - Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraDirectoryRoleTemplate -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force + Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraApplicationKey -Scope Global -Force - Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-EntraAdministrativeUnit -Scope Global -Force - Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Set-AzureADUserManager -Value Set-EntraUserManager -Scope Global -Force - Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force - Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force - Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force - Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force - Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force + Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force - Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraUserExtension -Scope Global -Force - Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force - Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force - Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force - Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraDomainVerificationDnsRecord -Scope Global -Force - Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force - Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraContact -Scope Global -Force + Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraContactDirectReport -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADGroup -Value Get-EntraGroup -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force - Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraDomain -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraUserLicenseDetail -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraDomainNameReference -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnit -Value Remove-EntraAdministrativeUnit -Scope Global -Force + Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraApplicationPassword -Scope Global -Force + Set-Alias -Name Remove-AzureADMSAdministrativeUnitMember -Value Remove-EntraAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force + Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraGroupMember -Scope Global -Force Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraUserLicense -Scope Global -Force - Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force - Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Get-AzureADGroup -Value Get-EntraGroup -Scope Global -Force - Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force - Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraUserAllRefreshToken -Scope Global -Force - Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraApplication -Scope Global -Force - Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force - Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force - Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraUserCreatedObject -Scope Global -Force - Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraUserLicenseDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraDirectoryRole -Scope Global -Force - Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraDeletedApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraTenantDetail -Scope Global -Force Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Set-AzureADDomain -Value Set-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraServicePrincipalCreatedObject -Scope Global -Force - Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraDevice -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraSignedInUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraServicePrincipalOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraDomain -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraApplication -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraSubscribedSku -Scope Global -Force Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraUserMembership -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraExtensionProperty -Scope Global -Force + Set-Alias -Name Set-AzureADUserManager -Value Set-EntraUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraApplication -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraUserCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraServicePrincipalOwner -Scope Global -Force Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraUserOwnedObject -Scope Global -Force - Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force + Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraGroupIdsServicePrincipalIsMemberOf -Scope Global -Force Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraDeviceRegisteredOwner -Scope Global -Force Set-Alias -Name Get-AzureADContract -Value Get-EntraContract -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force - Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force - Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraContactManager -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraDomain -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraServicePrincipal -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraApplicationPasswordCredential -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraServicePrincipalOwnedObject -Scope Global -Force Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force - Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraApplicationOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraDirectoryRole -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraDirectoryRoleTemplate -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force Set-Alias -Name Set-AzureADDevice -Value Set-EntraDevice -Scope Global -Force - Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force - Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraApplicationLogo -Scope Global -Force - Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraContactMembership -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADMSScopedRoleMembership -Value Remove-EntraScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraDevice -Scope Global -Force + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraObjectByObjectId -Scope Global -Force Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraApplicationPassword -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraServicePrincipalAppRoleAssignedTo -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraApplicationServiceEndpoint -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraDeletedApplication -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraContact -Scope Global -Force Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force Set-Alias -Name New-AzureADDevice -Value New-EntraDevice -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraApplicationServiceEndpoint -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force - Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraApplicationKey -Scope Global -Force - Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force - Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Remove-EntraServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force + Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraTenantDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraApplicationLogo -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraDomain -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Connect-AzureAD -Value Connect-Entra -Scope Global -Force Set-Alias -Name Disconnect-AzureAD -Value Disconnect-Entra -Scope Global -Force Set-Alias -Name Remove-EntraRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force diff --git a/module/Entra/Microsoft.Entra/Governance/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Governance/Enable-EntraAzureADAliases.ps1 index 30a0fd6056..01bcea93fd 100644 --- a/module/Entra/Microsoft.Entra/Governance/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Entra/Governance/Enable-EntraAzureADAliases.ps1 @@ -3,45 +3,45 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraDirectoryRoleDefinition -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-EntraRoleAssignment -Value Remove-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name Get-EntraRoleAssignment -Value Get-EntraDirectoryRoleAssignment -Scope Global -Force Set-Alias -Name New-EntraRoleAssignment -Value New-EntraDirectoryRoleAssignment -Scope Global -Force diff --git a/module/Entra/Microsoft.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 index 263008492e..2cdff2a36c 100644 --- a/module/Entra/Microsoft.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Governance/Get-EntraDirectoryRoleAssignment.ps1 @@ -6,20 +6,20 @@ function Get-EntraDirectoryRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, [Alias('Id')] [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UnifiedRoleAssignmentId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,37 +28,42 @@ function Get-EntraDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{} - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["SearchString"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["SearchString"] = $PSBoundParameters["SearchString"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -68,41 +73,36 @@ function Get-EntraDirectoryRoleAssignment { { $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["All"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["SearchString"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["SearchString"] = $PSBoundParameters["SearchString"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($null -ne $PSBoundParameters["Filter"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 index 3e21e79746..20927b2fd4 100644 --- a/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleAssignment.ps1 @@ -6,79 +6,79 @@ function New-EntraDirectoryRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $RoleDefinitionId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DirectoryScopeId + [System.String] $DirectoryScopeId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $RoleDefinitionId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["DirectoryScopeId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] } - if ($null -ne $PSBoundParameters["DirectoryScopeId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 index 0e6952a285..03fc9441f9 100644 --- a/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 +++ b/module/Entra/Microsoft.Entra/Governance/New-EntraDirectoryRoleDefinition.ps1 @@ -6,17 +6,14 @@ function New-EntraDirectoryRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ResourceScopes, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Version, @@ -24,95 +21,98 @@ function New-EntraDirectoryRoleDefinition { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $TemplateId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RolePermissions"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RolePermissions"] + $Temp = @{ + allowedResourceActions = $TmpValue.allowedResourceActions + condition = $TmpValue.condition + } + $Value = $Temp + $params["RolePermissions"] = $Value + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ResourceScopes"]) { $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Version"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Version"] = $PSBoundParameters["Version"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($null -ne $PSBoundParameters["RolePermissions"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RolePermissions"] - $Temp = @{ - allowedResourceActions = $TmpValue.allowedResourceActions - condition = $TmpValue.condition - } - $Value = $Temp - $params["RolePermissions"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["TemplateId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["TemplateId"] = $PSBoundParameters["TemplateId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } - if ($null -ne $PSBoundParameters["Version"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Version"] = $PSBoundParameters["Version"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["TemplateId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["TemplateId"] = $PSBoundParameters["TemplateId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 index 56a33b4bb1..28cbd2d2d0 100644 --- a/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleAssignment.ps1 @@ -14,38 +14,30 @@ function Remove-EntraDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -54,17 +46,25 @@ function Remove-EntraDirectoryRoleAssignment { { $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 index c21491040d..c8942a535a 100644 --- a/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 +++ b/module/Entra/Microsoft.Entra/Governance/Remove-EntraDirectoryRoleDefinition.ps1 @@ -14,38 +14,30 @@ function Remove-EntraDirectoryRoleDefinition { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -54,17 +46,25 @@ function Remove-EntraDirectoryRoleDefinition { { $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 b/module/Entra/Microsoft.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 index 6f3387e9e7..5cc9f96d14 100644 --- a/module/Entra/Microsoft.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 +++ b/module/Entra/Microsoft.Entra/Governance/Set-EntraDirectoryRoleDefinition.ps1 @@ -7,16 +7,13 @@ function Set-EntraDirectoryRoleDefinition { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ResourceScopes, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsEnabled, + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + [System.String] $Description, [Alias('Id')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UnifiedRoleDefinitionId, @@ -28,102 +25,105 @@ function Set-EntraDirectoryRoleDefinition { [System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.Nullable`1[System.Boolean]] $IsEnabled, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($null -ne $PSBoundParameters["RolePermissions"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $TmpValue = $PSBoundParameters["RolePermissions"] + $Value = @() + foreach($val in $TmpValue) + { + $Temp = $val | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { $hash[$_.Name] = $_.Value } + $Value += $hash + } + $params["RolePermissions"] = $Value + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ResourceScopes"]) { $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["Version"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Version"] = $PSBoundParameters["Version"] } - if($null -ne $PSBoundParameters["RolePermissions"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $TmpValue = $PSBoundParameters["RolePermissions"] - $Value = @() - foreach($val in $TmpValue) - { - $Temp = $val | ConvertTo-Json - $hash = @{} - - (ConvertFrom-Json $Temp).psobject.properties | Foreach { $hash[$_.Name] = $_.Value } - $Value += $hash - } - $params["RolePermissions"] = $Value + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["TemplateId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["TemplateId"] = $PSBoundParameters["TemplateId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } - if ($null -ne $PSBoundParameters["Version"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Version"] = $PSBoundParameters["Version"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["TemplateId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["TemplateId"] = $PSBoundParameters["TemplateId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupMember.ps1 b/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupMember.ps1 index 40eec2c654..5e27297609 100644 --- a/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupMember.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupMember.ps1 @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Add-EntraGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( @@ -18,49 +17,53 @@ function Add-EntraGroupMember { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -70,10 +73,6 @@ function Add-EntraGroupMember { { $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupOwner.ps1 index b450bbe0ea..3e068a8736 100644 --- a/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupOwner.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Add-EntraGroupOwner.ps1 @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Add-EntraGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( @@ -18,49 +17,53 @@ function Add-EntraGroupOwner { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -72,10 +75,6 @@ function Add-EntraGroupOwner { $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 index 18dd4aab98..28154f349a 100644 --- a/module/Entra/Microsoft.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Add-EntraLifecyclePolicyGroup.ps1 @@ -2,77 +2,76 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Add-EntraLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupLifecyclePolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $GroupId + [System.String] $GroupId, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Groups/Enable-EntraAzureADAliases.ps1 index 70ab6ed103..e3ca2ac1c3 100644 --- a/module/Entra/Microsoft.Entra/Groups/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Enable-EntraAzureADAliases.ps1 @@ -3,63 +3,63 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force - Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Get-AzureADGroup -Value Get-EntraGroup -Scope Global -Force Set-Alias -Name New-AzureADMSGroup -Value New-EntraGroup -Scope Global -Force - Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraGroupOwner -Scope Global -Force Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraGroup -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraGroupMember -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraLifeCycleGroup -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraGroupMember -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraGroupOwner -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraDeletedGroup -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraGroupLifecyclePolicy -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force } diff --git a/module/Entra/Microsoft.Entra/Groups/Get-EntraDeletedGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraDeletedGroup.ps1 index 2ce6c42255..d75feb5084 100644 --- a/module/Entra/Microsoft.Entra/Groups/Get-EntraDeletedGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Get-EntraDeletedGroup.ps1 @@ -4,6 +4,7 @@ # ------------------------------------------------------------------------------ + function Get-EntraDeletedGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( diff --git a/module/Entra/Microsoft.Entra/Groups/Get-EntraGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroup.ps1 index a23e4a21ad..08bf6047d9 100644 --- a/module/Entra/Microsoft.Entra/Groups/Get-EntraGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroup.ps1 @@ -6,20 +6,20 @@ function Get-EntraGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, + [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -28,33 +28,57 @@ function Get-EntraGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($PSBoundParameters.ContainsKey("Top")) + { + $params["Top"] = $PSBoundParameters["Top"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["Filter"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["Filter"] + foreach($i in $keysChanged.GetEnumerator()){ + $TmpValue = $TmpValue.Replace($i.Key, $i.Value) + } + $Value = $TmpValue + $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($null -ne $PSBoundParameters["All"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["SearchString"]) { @@ -62,6 +86,10 @@ function Get-EntraGroup { $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" $params["Filter"] = $Value } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -70,42 +98,14 @@ function Get-EntraGroup { { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($PSBoundParameters.ContainsKey("Top")) - { - $params["Top"] = $PSBoundParameters["Top"] - } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["Filter"]) - { - $TmpValue = $PSBoundParameters["Filter"] - foreach($i in $keysChanged.GetEnumerator()){ - $TmpValue = $TmpValue.Replace($i.Key, $i.Value) - } - $Value = $TmpValue - $params["Filter"] = $Value - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 index 88656e8da2..04b7f0f76f 100644 --- a/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupAppRoleAssignment.ps1 @@ -5,15 +5,15 @@ function Get-EntraGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraGroupAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 index a6091cc837..65fc95b4f7 100644 --- a/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupLifecyclePolicy.ps1 @@ -16,38 +16,30 @@ function Get-EntraGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -56,17 +48,25 @@ function Get-EntraGroupLifecyclePolicy { { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 index d649e60802..c753a32539 100644 --- a/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Get-EntraGroupPermissionGrant.ps1 @@ -16,38 +16,30 @@ function Get-EntraGroupPermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -56,17 +48,25 @@ function Get-EntraGroupPermissionGrant { { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 index 84e766a192..57d878f4a0 100644 --- a/module/Entra/Microsoft.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Get-EntraLifecyclePolicyGroup.ps1 @@ -16,38 +16,30 @@ function Get-EntraLifecyclePolicyGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -56,17 +48,25 @@ function Get-EntraLifecyclePolicyGroup { { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Groups/Get-EntraObjectSetting.ps1 b/module/Entra/Microsoft.Entra/Groups/Get-EntraObjectSetting.ps1 index 90357d24ff..854d36fda7 100644 --- a/module/Entra/Microsoft.Entra/Groups/Get-EntraObjectSetting.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Get-EntraObjectSetting.ps1 @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Get-EntraObjectSetting { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( @@ -98,4 +97,5 @@ function Get-EntraObjectSetting { $targetTypeList } -} +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/Microsoft.Entra/Groups/New-EntraGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/New-EntraGroup.ps1 index f046401457..69159d4b1e 100644 --- a/module/Entra/Microsoft.Entra/Groups/New-EntraGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/New-EntraGroup.ps1 @@ -9,14 +9,11 @@ function New-EntraGroup { [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.Nullable`1[System.Boolean]] $SecurityEnabled, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Visibility, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $GroupTypes, @@ -24,96 +21,99 @@ function New-EntraGroup { [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $MailNickname, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $MailEnabled, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $Visibility, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } - if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + if ($null -ne $PSBoundParameters["MailEnabled"]) { - $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Visibility"]) + if ($null -ne $PSBoundParameters["GroupTypes"]) { - $params["Visibility"] = $PSBoundParameters["Visibility"] + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["MailNickname"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["MailNickname"] = $PSBoundParameters["MailNickname"] } - if ($null -ne $PSBoundParameters["GroupTypes"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["MailNickname"]) + if ($null -ne $PSBoundParameters["Visibility"]) { - $params["MailNickname"] = $PSBoundParameters["MailNickname"] + $params["Visibility"] = $PSBoundParameters["Visibility"] } - if ($null -ne $PSBoundParameters["MailEnabled"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 index 286b032f69..f308a89e76 100644 --- a/module/Entra/Microsoft.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/New-EntraGroupAppRoleAssignment.ps1 @@ -5,87 +5,87 @@ function New-EntraGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $ResourceId, [Alias('Id')] [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $AppRoleId, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["AppRoleId"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["AppRoleId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 index 86311467e0..33c46424f0 100644 --- a/module/Entra/Microsoft.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/New-EntraGroupLifecyclePolicy.ps1 @@ -7,79 +7,79 @@ function New-EntraGroupLifecyclePolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ManagedGroupTypes, + [System.String] $AlternateNotificationEmails, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, + [System.String] $ManagedGroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AlternateNotificationEmails + [System.Nullable`1[System.Int32]] $GroupLifetimeInDays ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) { $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { - $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroup.ps1 index 25d32c6dde..328c849e79 100644 --- a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroup.ps1 @@ -14,57 +14,57 @@ function Remove-EntraGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 index 144e3df1e2..6f10cffa19 100644 --- a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupAppRoleAssignment.ps1 @@ -17,61 +17,61 @@ function Remove-EntraGroupAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 index 2e4e021191..37e3d7bcb4 100644 --- a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupLifecyclePolicy.ps1 @@ -14,38 +14,30 @@ function Remove-EntraGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -54,17 +46,25 @@ function Remove-EntraGroupLifecyclePolicy { { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupMember.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupMember.ps1 index fa29dcf564..bab08a9e50 100644 --- a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupMember.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupMember.ps1 @@ -5,73 +5,73 @@ function Remove-EntraGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $MemberId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $MemberId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["MemberId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["MemberId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupOwner.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupOwner.ps1 index 1e7ad68534..8bb26c2d5f 100644 --- a/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupOwner.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Remove-EntraGroupOwner.ps1 @@ -5,73 +5,73 @@ function Remove-EntraGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $OwnerId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $OwnerId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["GroupId"]) { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 index 8cad13aba0..dad7549f1f 100644 --- a/module/Entra/Microsoft.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Remove-EntraLifecyclePolicyGroup.ps1 @@ -5,73 +5,73 @@ function Remove-EntraLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupLifecyclePolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $GroupId + [System.String] $GroupId, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["GroupId"]) + { + $params["GroupId"] = $PSBoundParameters["GroupId"] + } if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 index 4025272131..5ec5c1069e 100644 --- a/module/Entra/Microsoft.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Reset-EntraLifeCycleGroup.ps1 @@ -14,38 +14,30 @@ function Reset-EntraLifeCycleGroup { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -54,17 +46,25 @@ function Reset-EntraLifeCycleGroup { { $params["GroupId"] = $PSBoundParameters["Id"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 index de7c1145f1..7641c0ef00 100644 --- a/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsContactIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraGroupIdsContactIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck + [System.String] $ObjectId ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 index 9ba3b673c0..e7201dc21d 100644 --- a/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsGroupIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraGroupIdsGroupIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck + [System.String] $ObjectId ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 index 0c118f45e9..a4e66f7749 100644 --- a/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Select-EntraGroupIdsUserIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraGroupIdsUserIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck + [System.String] $ObjectId ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/Groups/Set-EntraGroup.ps1 b/module/Entra/Microsoft.Entra/Groups/Set-EntraGroup.ps1 index eed82ce744..08b77bb0b4 100644 --- a/module/Entra/Microsoft.Entra/Groups/Set-EntraGroup.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Set-EntraGroup.ps1 @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Set-EntraGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( @@ -11,85 +10,77 @@ function Set-EntraGroup { [System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + [System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Visibility, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[System.String]] $GroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $GroupTypes, + [System.String] $MailNickname, [Alias('Id')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $GroupId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickname, + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $MailEnabled, + [System.String] $Visibility, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["SecurityEnabled"]) { $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } - if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + if ($null -ne $PSBoundParameters["MailEnabled"]) { - $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Visibility"]) + if ($null -ne $PSBoundParameters["GroupTypes"]) { - $params["Visibility"] = $PSBoundParameters["Visibility"] + $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["MailNickname"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["MailNickname"] = $PSBoundParameters["MailNickname"] } - if ($null -ne $PSBoundParameters["GroupTypes"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -99,29 +90,37 @@ function Set-EntraGroup { { $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["MailNickname"]) + if ($null -ne $PSBoundParameters["Visibility"]) { - $params["MailNickname"] = $PSBoundParameters["MailNickname"] + $params["Visibility"] = $PSBoundParameters["Visibility"] } - if ($null -ne $PSBoundParameters["MailEnabled"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 b/module/Entra/Microsoft.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 index f7c264c22f..ea18dc3203 100644 --- a/module/Entra/Microsoft.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 +++ b/module/Entra/Microsoft.Entra/Groups/Set-EntraGroupLifecyclePolicy.ps1 @@ -2,71 +2,58 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Set-EntraGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ManagedGroupTypes, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, + [System.String] $AlternateNotificationEmails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AlternateNotificationEmails, + [System.String] $ManagedGroupTypes, [Alias('Id')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupLifecyclePolicyId + [System.String] $GroupLifecyclePolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Int32]] $GroupLifetimeInDays ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) { $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -76,17 +63,29 @@ function Set-EntraGroupLifecyclePolicy { { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Reports/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Reports/Enable-EntraAzureADAliases.ps1 index 72e5f37ebf..b2ff67a700 100644 --- a/module/Entra/Microsoft.Entra/Reports/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Entra/Reports/Enable-EntraAzureADAliases.ps1 @@ -4,37 +4,37 @@ # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-EntraAuditDirectoryLogs -Value Get-EntraAuditDirectoryLog -Scope Global -Force Set-Alias -Name Get-EntraAuditSignInLogs -Value Get-EntraAuditSignInLog -Scope Global -Force diff --git a/module/Entra/Microsoft.Entra/SignIns/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/SignIns/Enable-EntraAzureADAliases.ps1 index 53791c7e76..756282ab4c 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Enable-EntraAzureADAliases.ps1 @@ -4,64 +4,65 @@ # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraInvitation -Scope Global -Force Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraNamedLocationPolicy -Scope Global -Force Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraIdentityProvider -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraTrustedCertificateAuthority -Scope Global -Force Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraAuthorizationPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraPermissionGrantConditionSet -Scope Global -Force Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraOAuth2PermissionGrant -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force } diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 index 0f05e3d3cf..fb32dbffdc 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraAuthorizationPolicy.ps1 @@ -52,4 +52,4 @@ function Get-EntraAuthorizationPolicy { $policyList } } -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 index 7ab3f04c1a..628166cf24 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraConditionalAccessPolicy.ps1 @@ -3,6 +3,8 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + + function Get-EntraConditionalAccessPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( @@ -17,57 +19,57 @@ function Get-EntraConditionalAccessPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 index 0e1a86add5..ac44918a20 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraFeatureRolloutPolicy.ps1 @@ -79,5 +79,5 @@ function Get-EntraFeatureRolloutPolicy { $userList } } -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraIdentityProvider.ps1 index 17b6d1049c..9b7704a367 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraIdentityProvider.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraIdentityProvider.ps1 @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Get-EntraIdentityProvider { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( @@ -17,38 +16,30 @@ function Get-EntraIdentityProvider { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -57,17 +48,25 @@ function Get-EntraIdentityProvider { { $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { @@ -81,8 +80,8 @@ function Get-EntraIdentityProvider { $response = Get-MgIdentityProvider @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName Add-Member -InputObject $_ -MemberType AliasProperty -Name Type -Value identityProviderType + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 index ca6de2cb6f..e24ca7a7d0 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraNamedLocationPolicy.ps1 @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Get-EntraNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 index 15e775d502..87ec9b4fa2 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraOAuth2PermissionGrant.ps1 @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Get-EntraOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( @@ -20,64 +19,64 @@ function Get-EntraOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["All"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 index 6c8cefc164..433d7c8353 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantConditionSet.ps1 @@ -7,13 +7,13 @@ function Get-EntraPermissionGrantConditionSet { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType, + [System.String] $PolicyId, [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [System.String] $ConditionSetType, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 index 96ec206000..e863de72fc 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPermissionGrantPolicy.ps1 @@ -16,38 +16,30 @@ function Get-EntraPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -56,17 +48,25 @@ function Get-EntraPermissionGrantPolicy { { $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPolicy.ps1 index 1ea1167baf..5d7476e370 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraPolicy.ps1 @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ - function Get-EntraPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( @@ -87,5 +86,5 @@ ErrorCode: Request_UnsupportedQuery" } $respList } -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 b/module/Entra/Microsoft.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 index 2247263f8d..954f948652 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Get-EntraTrustedCertificateAuthority.ps1 @@ -7,10 +7,10 @@ function Get-EntraTrustedCertificateAuthority { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TrustedIssuerSki, + [System.String] $TrustedIssuer, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TrustedIssuer, + [System.String] $TrustedIssuerSki, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 index c699be9467..c85ba513c1 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraConditionalAccessPolicy.ps1 @@ -9,29 +9,29 @@ function New-EntraConditionalAccessPolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($null -ne $PSBoundParameters["GrantControls"]) { @@ -45,25 +45,46 @@ function New-EntraConditionalAccessPolicy { $Value = $hash $params["GrantControls"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if($null -ne $PSBoundParameters["Conditions"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["Conditions"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["State"]) + { + $params["State"] = $PSBoundParameters["State"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if($null -ne $PSBoundParameters["SessionControls"]) + { + $TmpValue = $PSBoundParameters["SessionControls"] $Value = @{} $TmpValue.PSObject.Properties | foreach { $propName = $_.Name $propValue = $_.Value - if ($propName -eq 'clientAppTypes') { - $Value[$propName] = $propValue - } - elseif ($propValue -is [System.Object]) { + if ($propValue -is [System.Object]) { $nestedProps = @{} $propValue.PSObject.Properties | foreach { $nestedPropName = $_.Name @@ -73,44 +94,23 @@ function New-EntraConditionalAccessPolicy { $Value[$propName] = $nestedProps } } - $params["Conditions"] = $Value + $params["SessionControls"] = $Value } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["State"]) - { - $params["State"] = $PSBoundParameters["State"] - } - if ($null -ne $PSBoundParameters["DisplayName"]) - { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($null -ne $PSBoundParameters["SessionControls"]) + if($null -ne $PSBoundParameters["Conditions"]) { - $TmpValue = $PSBoundParameters["SessionControls"] + $TmpValue = $PSBoundParameters["Conditions"] $Value = @{} $TmpValue.PSObject.Properties | foreach { $propName = $_.Name $propValue = $_.Value - if ($propValue -is [System.Object]) { + if ($propName -eq 'clientAppTypes') { + $Value[$propName] = $propValue + } + elseif ($propValue -is [System.Object]) { $nestedProps = @{} $propValue.PSObject.Properties | foreach { $nestedPropName = $_.Name @@ -120,27 +120,27 @@ function New-EntraConditionalAccessPolicy { $Value[$propName] = $nestedProps } } - $params["SessionControls"] = $Value + $params["Conditions"] = $Value } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Id"] = $PSBoundParameters["Id"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraCustomHeaders.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraCustomHeaders.ps1 index 88a73b1e0a..ff4a8b0be1 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraCustomHeaders.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraCustomHeaders.ps1 @@ -27,5 +27,5 @@ function New-EntraCustomHeaders { $customHeaders["User-Agent"] = $userAgentHeaderValue $customHeaders -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 index 55652846c3..b46dcee128 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraFeatureRolloutPolicy.ps1 @@ -67,5 +67,4 @@ function New-EntraFeatureRolloutPolicy { $userList } } -}# ------------------------------------------------------------------------------ - +} diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraIdentityProvider.ps1 index 7047754749..00003a84db 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraIdentityProvider.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraIdentityProvider.ps1 @@ -7,16 +7,16 @@ function New-EntraIdentityProvider { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Type, + [System.String] $ClientSecret, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Name, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Type, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $ClientId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ClientSecret + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Name ) PROCESS { diff --git a/module/Entra/UnMappedFiles/New-EntraInvitation.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraInvitation.ps1 similarity index 97% rename from module/Entra/UnMappedFiles/New-EntraInvitation.ps1 rename to module/Entra/Microsoft.Entra/SignIns/New-EntraInvitation.ps1 index a43fc41789..324b88fd01 100644 --- a/module/Entra/UnMappedFiles/New-EntraInvitation.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraInvitation.ps1 @@ -9,6 +9,12 @@ function New-EntraInvitation { [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $InvitedUserEmailAddress, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $InvitedUserDisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $InviteRedirectUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo, @@ -18,14 +24,8 @@ function New-EntraInvitation { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $SendInvitationMessage, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $InviteRedirectUrl, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $InvitedUserType, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $InvitedUserDisplayName + [System.String] $InvitedUserType ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 index c72608b6bd..41a33f63f0 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraNamedLocationPolicy.ps1 @@ -7,25 +7,25 @@ function New-EntraNamedLocationPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $OdataType, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges + [System.String] $DisplayName ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 index e6827d1b74..58333f12fa 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraOauth2PermissionGrant.ps1 @@ -5,13 +5,13 @@ function New-EntraOauth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'CreateExpanded')] param ( - [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = "CreateExpanded", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ClientId, - [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true)] + [Parameter(ParameterSetName = "CreateExpanded", Mandatory = $true)] [System.String] $ConsentType, [Parameter(ParameterSetName = "CreateExpanded")] [System.String] $PrincipalId, - [Parameter(ParameterSetName = "CreateExpanded",Mandatory = $true)] + [Parameter(ParameterSetName = "CreateExpanded", Mandatory = $true)] [System.String] $ResourceId, [Parameter(ParameterSetName = "CreateExpanded")] [System.String] $Scope @@ -24,34 +24,29 @@ function New-EntraOauth2PermissionGrant { $params["Method"] = "POST" $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["ClientId"]) - { + if ($null -ne $PSBoundParameters["ClientId"]) { $body["clientId"] = $PSBoundParameters["ClientId"] } - if($null -ne $PSBoundParameters["ConsentType"]) - { + if ($null -ne $PSBoundParameters["ConsentType"]) { $body["consentType"] = $PSBoundParameters["ConsentType"] } - if($null -ne $PSBoundParameters["PrincipalId"]) - { + if ($null -ne $PSBoundParameters["PrincipalId"]) { $body["principalId"] = $PSBoundParameters["PrincipalId"] } - if($null -ne $PSBoundParameters["ResourceId"]) - { + if ($null -ne $PSBoundParameters["ResourceId"]) { $body["resourceId"] = $PSBoundParameters["ResourceId"] } - if($null -ne $PSBoundParameters["Scope"]) - { + if ($null -ne $PSBoundParameters["Scope"]) { $body["scope"] = $PSBoundParameters["Scope"] } $params["Body"] = $body Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Invoke-GraphRequest @params -Headers $customHeaders - if($response){ + if ($response) { $response = $response | ConvertTo-Json | ConvertFrom-Json $response | ForEach-Object { if ($null -ne $_) { @@ -64,5 +59,5 @@ function New-EntraOauth2PermissionGrant { $userData } } -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 index 77e696dff1..e67b53f4e8 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantConditionSet.ps1 @@ -7,13 +7,16 @@ function New-EntraPermissionGrantConditionSet { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Permissions, + [System.String] $PermissionType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResourceApplication, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ConditionSetType, @@ -22,19 +25,16 @@ function New-EntraPermissionGrantConditionSet { [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionType, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + [System.Collections.Generic.List`1[System.String]] $Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionClassification, + [System.String] $ResourceApplication, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId + [System.String] $PermissionClassification ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 index c81f7a5bcf..2b446ffef6 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraPermissionGrantPolicy.ps1 @@ -7,54 +7,46 @@ function New-EntraPermissionGrantPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -64,21 +56,29 @@ function New-EntraPermissionGrantPolicy { { $params["Id"] = $PSBoundParameters["Id"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/New-EntraPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/New-EntraPolicy.ps1 index a657537877..26c107e31b 100644 --- a/module/Entra/Microsoft.Entra/SignIns/New-EntraPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/New-EntraPolicy.ps1 @@ -90,5 +90,5 @@ function New-EntraPolicy { $respType } -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 index 298255ecaf..b97615367b 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraConditionalAccessPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraConditionalAccessPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 index c99a53e4e2..186f7cade4 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraFeatureRolloutPolicy.ps1 @@ -23,55 +23,5 @@ function Remove-EntraFeatureRolloutPolicy { $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json $response } -}function Restore-EntraDeletedDirectoryObject { - [CmdletBinding(DefaultParameterSetName = '')] - param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $AutoReconcileProxyConflict - ) - - PROCESS { - $params = @{} - $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - $params["Uri"] = 'https://graph.microsoft.com/v1.0/directory/deletedItems/' - $params["Method"] = "POST" - if($null -ne $PSBoundParameters["Id"]) - { - $params["Uri"] += $Id+"/microsoft.graph.restore" - } - if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) - { - $params["Body"] = @{ - autoReconcileProxyConflict = $true - } - } - - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug - Write-Debug("=========================================================================`n") - - $response = Invoke-GraphRequest @params -Headers $customHeaders - $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json - $data | ForEach-Object { - if($null -ne $_) { - Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id - - } - } - $userList = @() - foreach ($res in $data) { - $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphDirectoryObject - $res.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) - $propertyValue = $_.Value - $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force - } - $userList += $userType - } - $userList - } -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraIdentityProvider.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraIdentityProvider.ps1 index 72b60defa1..28fb095e5e 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraIdentityProvider.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraIdentityProvider.ps1 @@ -14,38 +14,30 @@ function Remove-EntraIdentityProvider { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -54,17 +46,25 @@ function Remove-EntraIdentityProvider { { $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 index 85b86671bb..b96e02746b 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraNamedLocationPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraNamedLocationPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 index d496b89696..4e943dcd54 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraOAuth2PermissionGrant.ps1 @@ -14,57 +14,57 @@ function Remove-EntraOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["ObjectId"]) { $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 index 10a5f21c16..0be4f3aeba 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantConditionSet.ps1 @@ -7,13 +7,13 @@ function Remove-EntraPermissionGrantConditionSet { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType, + [System.String] $PolicyId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId + [System.String] $ConditionSetType ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 index 96e9301a6f..eb36b7399e 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPermissionGrantPolicy.ps1 @@ -14,38 +14,30 @@ function Remove-EntraPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] @@ -54,17 +46,25 @@ function Remove-EntraPermissionGrantPolicy { { $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPolicy.ps1 index 1092725d14..23a142077c 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Remove-EntraPolicy.ps1 @@ -40,5 +40,6 @@ function Remove-EntraPolicy { $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method $response } -}# ------------------------------------------------------------------------------ +} + diff --git a/module/Entra/Microsoft.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 index 304f2060d4..d7859bd11f 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Set-EntraAuthorizationPolicy.ps1 @@ -7,114 +7,114 @@ function Set-EntraAuthorizationPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, + [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, + [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["DefaultUserRolePermissions"] + $hash = @{} + $hash["AllowedToCreateApps"] = $TmpValue.AllowedToCreateApps + $hash["AllowedToCreateSecurityGroups"] = $TmpValue.AllowedToCreateSecurityGroups + $hash["AllowedToReadOtherUsers"] = $TmpValue.AllowedToReadOtherUsers + $hash["PermissionGrantPoliciesAssigned"] = $TmpValue.PermissionGrantPoliciesAssigned + + $Value = $hash + $params["DefaultUserRolePermissions"] = $Value } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) + { + $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] } if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) { $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) - { - $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) - { - $TmpValue = $PSBoundParameters["DefaultUserRolePermissions"] - $hash = @{} - $hash["AllowedToCreateApps"] = $TmpValue.AllowedToCreateApps - $hash["AllowedToCreateSecurityGroups"] = $TmpValue.AllowedToCreateSecurityGroups - $hash["AllowedToReadOtherUsers"] = $TmpValue.AllowedToReadOtherUsers - $hash["PermissionGrantPoliciesAssigned"] = $TmpValue.PermissionGrantPoliciesAssigned - - $Value = $hash - $params["DefaultUserRolePermissions"] = $Value - } - if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 index 0906e35774..5dd4da2d99 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Set-EntraConditionalAccessPolicy.ps1 @@ -9,32 +9,32 @@ function Set-EntraConditionalAccessPolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($null -ne $PSBoundParameters["GrantControls"]) { @@ -47,81 +47,41 @@ function Set-EntraConditionalAccessPolicy { $Value = $hash $params["GrantControls"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if($null -ne $PSBoundParameters["Conditions"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $TmpValue = $PSBoundParameters["Conditions"] - if($TmpValue.Applications){ - $Applications=@{} - $Applications["IncludeApplications"] = $TmpValue.Applications.IncludeApplications - $Applications["ExcludeApplications"] = $TmpValue.Applications.ExcludeApplications - $Applications["IncludeUserActions"] = $TmpValue.Applications.IncludeUserActions - $Applications["IncludeProtectionLevels"] = $TmpValue.Applications.IncludeProtectionLevels - } - if($TmpValue.Locations){ - $Locations = @{} - $Locations["IncludeLocations"] = $TmpValue.Locations.IncludeLocations - $Locations["ExcludeLocations"] = $TmpValue.Locations.ExcludeLocations - } - if($TmpValue.Platforms){ - $Platforms = @{} - $Platforms["IncludePlatforms"] = $TmpValue.Platforms.IncludePlatforms - $Platforms["ExcludePlatforms"] = $TmpValue.Platforms.ExcludePlatforms - } - if($TmpValue.Users){ - $Users = @{} - $Users["IncludeUsers"] = $TmpValue.Users.IncludeUsers - $Users["ExcludeUsers"] = $TmpValue.Users.ExcludeUsers - $Users["IncludeGroups"] = $TmpValue.Users.IncludeGroups - $Users["ExcludeGroups"] = $TmpValue.Users.ExcludeGroups - $Users["IncludeRoles"] = $TmpValue.Users.IncludeRoles - $Users["ExcludeRoles"] = $TmpValue.Users.ExcludeRoles - } - - $hash = @{} - if($TmpValue.Applications) {$hash["Applications"] = $Applications } - if($TmpValue.ClientAppTypes) { $hash["ClientAppTypes"] = $TmpValue.ClientAppTypes } - if($TmpValue.Locations) { $hash["Locations"] = $Locations } - if($TmpValue.Platforms) { $hash["Platforms"] = $Platforms } - if($TmpValue.SignInRiskLevels) { $hash["SignInRiskLevels"] = $TmpValue.SignInRiskLevels } - if($TmpValue.Users) { $hash["Users"] = $Users } - $Value = $hash - $params["Conditions"] = $Value + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["State"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["State"] = $PSBoundParameters["State"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["State"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["State"] = $PSBoundParameters["State"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Id"] = $PSBoundParameters["Id"] } if($null -ne $PSBoundParameters["SessionControls"]) { @@ -155,29 +115,69 @@ function Set-EntraConditionalAccessPolicy { $Value = $hash $params["SessionControls"] = $Value } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if($null -ne $PSBoundParameters["Conditions"]) { - $params["Id"] = $PSBoundParameters["Id"] + $TmpValue = $PSBoundParameters["Conditions"] + if($TmpValue.Applications){ + $Applications=@{} + $Applications["IncludeApplications"] = $TmpValue.Applications.IncludeApplications + $Applications["ExcludeApplications"] = $TmpValue.Applications.ExcludeApplications + $Applications["IncludeUserActions"] = $TmpValue.Applications.IncludeUserActions + $Applications["IncludeProtectionLevels"] = $TmpValue.Applications.IncludeProtectionLevels + } + if($TmpValue.Locations){ + $Locations = @{} + $Locations["IncludeLocations"] = $TmpValue.Locations.IncludeLocations + $Locations["ExcludeLocations"] = $TmpValue.Locations.ExcludeLocations + } + if($TmpValue.Platforms){ + $Platforms = @{} + $Platforms["IncludePlatforms"] = $TmpValue.Platforms.IncludePlatforms + $Platforms["ExcludePlatforms"] = $TmpValue.Platforms.ExcludePlatforms + } + if($TmpValue.Users){ + $Users = @{} + $Users["IncludeUsers"] = $TmpValue.Users.IncludeUsers + $Users["ExcludeUsers"] = $TmpValue.Users.ExcludeUsers + $Users["IncludeGroups"] = $TmpValue.Users.IncludeGroups + $Users["ExcludeGroups"] = $TmpValue.Users.ExcludeGroups + $Users["IncludeRoles"] = $TmpValue.Users.IncludeRoles + $Users["ExcludeRoles"] = $TmpValue.Users.ExcludeRoles + } + + $hash = @{} + if($TmpValue.Applications) {$hash["Applications"] = $Applications } + if($TmpValue.ClientAppTypes) { $hash["ClientAppTypes"] = $TmpValue.ClientAppTypes } + if($TmpValue.Locations) { $hash["Locations"] = $Locations } + if($TmpValue.Platforms) { $hash["Platforms"] = $Platforms } + if($TmpValue.SignInRiskLevels) { $hash["SignInRiskLevels"] = $TmpValue.SignInRiskLevels } + if($TmpValue.Users) { $hash["Users"] = $Users } + $Value = $hash + $params["Conditions"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 index 8dc40a1e59..6c260f26e1 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Set-EntraFeatureRolloutPolicy.ps1 @@ -57,5 +57,5 @@ function Set-EntraFeatureRolloutPolicy { $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json $response } -}# ------------------------------------------------------------------------------ +} diff --git a/module/Entra/Microsoft.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 index a076a0c1b3..35a9f59aec 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Set-EntraNamedLocationPolicy.ps1 @@ -7,28 +7,28 @@ function Set-EntraNamedLocationPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsTrusted, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $OdataType, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, + [System.Nullable`1[System.Boolean]] $IsTrusted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [System.String] $OdataType, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 index 050825f20c..127e66d38b 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantConditionSet.ps1 @@ -2,42 +2,43 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Set-EntraPermissionGrantConditionSet { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Permissions, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResourceApplication, + [System.String] $PermissionType, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType, + [System.String] $Id, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $ConditionSetType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionType, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + [System.Collections.Generic.List`1[System.String]] $Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionClassification, + [System.String] $ResourceApplication, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId + [System.String] $PermissionClassification ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 index 904eed234a..e50ff2081b 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPermissionGrantPolicy.ps1 @@ -2,59 +2,52 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Set-EntraPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Description, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $DisplayName ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -64,21 +57,29 @@ function Set-EntraPermissionGrantPolicy { { $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/SignIns/Set-EntraPolicy.ps1 b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPolicy.ps1 index 3661d51ca9..a242080201 100644 --- a/module/Entra/Microsoft.Entra/SignIns/Set-EntraPolicy.ps1 +++ b/module/Entra/Microsoft.Entra/SignIns/Set-EntraPolicy.ps1 @@ -2,6 +2,7 @@ # Copyright (c) Microsoft Corporation. All Rights Reserved. # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ + function Set-EntraPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( @@ -99,5 +100,4 @@ function Set-EntraPolicy { } } -}# ------------------------------------------------------------------------------ - +} \ No newline at end of file diff --git a/module/Entra/Microsoft.Entra/Users/Enable-EntraAzureADAliases.ps1 b/module/Entra/Microsoft.Entra/Users/Enable-EntraAzureADAliases.ps1 index 12c3c97f41..8c07562888 100644 --- a/module/Entra/Microsoft.Entra/Users/Enable-EntraAzureADAliases.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Enable-EntraAzureADAliases.ps1 @@ -3,63 +3,63 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force - Set-Alias -Name Set-AzureADUserManager -Value Set-EntraUserManager -Scope Global -Force - Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraUserExtension -Scope Global -Force - Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force - Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force - Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraUserLicense -Scope Global -Force - Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraUserCreatedObject -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force + Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADUser -Value Get-EntraUser -Scope Global -Force Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraUserLicenseDetail -Scope Global -Force - Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force - Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraUserLicense -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraUserMembership -Scope Global -Force + Set-Alias -Name Set-AzureADUserManager -Value Set-EntraUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraUserCreatedObject -Scope Global -Force Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraUserOwnedObject -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraUserOwnedDevice -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraUserManager -Scope Global -Force Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraUserExtension -Scope Global -Force - Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Set-AzureADUser -Value Set-EntraUser -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraUserThumbnailPhoto -Scope Global -Force Set-Alias -Name Remove-AzureADUser -Value Remove-EntraUser -Scope Global -Force - Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraUserExtension -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraSignedInUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraUserRegisteredDevice -Scope Global -Force Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraUserOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraUserDirectReport -Scope Global -Force + Set-Alias -Name New-AzureADUser -Value New-EntraUser -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Add-AzureADMSScopedRoleMembership -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADMSAdministrativeUnitMember -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force } diff --git a/module/Entra/Microsoft.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 index c7f009c7d0..62e109ae37 100644 --- a/module/Entra/Microsoft.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Get-EntraUserAppRoleAssignment.ps1 @@ -6,14 +6,14 @@ function Get-EntraUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraUserAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Users/Get-EntraUserLicenseDetail.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserLicenseDetail.ps1 index 46a59d92b1..c6d9c47a7f 100644 --- a/module/Entra/Microsoft.Entra/Users/Get-EntraUserLicenseDetail.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Get-EntraUserLicenseDetail.ps1 @@ -16,57 +16,57 @@ function Get-EntraUserLicenseDetail { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["UserId"]) { $params["UserId"] = $PSBoundParameters["UserId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Users/Get-EntraUserMembership.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserMembership.ps1 index 99e86b2727..14bf77e18a 100644 --- a/module/Entra/Microsoft.Entra/Users/Get-EntraUserMembership.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Get-EntraUserMembership.ps1 @@ -5,15 +5,15 @@ function Get-EntraUserMembership { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraUserMembership { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["UserId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 index 39e8c7dfd8..4d2caee0d5 100644 --- a/module/Entra/Microsoft.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Get-EntraUserOAuth2PermissionGrant.ps1 @@ -5,15 +5,15 @@ function Get-EntraUserOAuth2PermissionGrant { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,68 +22,68 @@ function Get-EntraUserOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($PSBoundParameters.ContainsKey("Top")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Top"] = $PSBoundParameters["Top"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["UserId"]) + if($null -ne $PSBoundParameters["All"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($PSBoundParameters.ContainsKey("Top")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Top"] = $PSBoundParameters["Top"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/Entra/Microsoft.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 index 1349a8a703..db0c35ade5 100644 --- a/module/Entra/Microsoft.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Get-EntraUserThumbnailPhoto.ps1 @@ -7,16 +7,16 @@ function Get-EntraUserThumbnailPhoto { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Boolean] $View, + [System.String] $FileName, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UserId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FileName, - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FilePath, + [System.Boolean] $View, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -25,70 +25,70 @@ function Get-EntraUserThumbnailPhoto { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["View"]) - { - $params["View"] = $PSBoundParameters["View"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["FileName"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["FileName"] = $PSBoundParameters["FileName"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["FileName"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["FileName"] = $PSBoundParameters["FileName"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["FilePath"]) { $params["FilePath"] = $PSBoundParameters["FilePath"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["UserId"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["View"]) + { + $params["View"] = $PSBoundParameters["View"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/Entra/Microsoft.Entra/Users/New-EntraUser.ps1 b/module/Entra/Microsoft.Entra/Users/New-EntraUser.ps1 index 68616d017c..b1352d1342 100644 --- a/module/Entra/Microsoft.Entra/Users/New-EntraUser.ps1 +++ b/module/Entra/Microsoft.Entra/Users/New-EntraUser.ps1 @@ -8,106 +8,106 @@ function New-EntraUser { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CompanyName, + [System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $StreetAddress, + [System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ImmutableId, + [System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UsageLocation, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Surname, + [System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PasswordPolicies, + [System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompromised, + [System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $PostalCode, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Department, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreationType, + [System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PreferredLanguage, + [System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TelephoneNumber, + [System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + [System.String] $UserStateChangedOn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ShowInAddressList, + [System.String] $GivenName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $FacsimileTelephoneNumber, + [System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserPrincipalName, + [System.String] $PasswordPolicies, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserStateChangedOn, + [System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Mobile, + [System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OtherMails, + [System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PhysicalDeliveryOfficeName, + [System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ConsentProvidedForMinor, + [System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserType, + [System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GivenName, + [System.Collections.Generic.List`1[System.String]] $OtherMails, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserState, + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AgeGroup, + [System.Nullable`1[System.Boolean]] $IsCompromised, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $JobTitle, + [System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $City, + [System.String] $AgeGroup, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Country, + [System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickName + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames ) PROCESS { diff --git a/module/Entra/Microsoft.Entra/Users/New-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Users/New-EntraUserAppRoleAssignment.ps1 index 20897e6af4..8ea4936098 100644 --- a/module/Entra/Microsoft.Entra/Users/New-EntraUserAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Users/New-EntraUserAppRoleAssignment.ps1 @@ -6,86 +6,86 @@ function New-EntraUserAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id, + [System.String] $ResourceId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId + [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ResourceId"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["AppRoleId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["AppRoleId"] = $PSBoundParameters["Id"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Users/Remove-EntraUser.ps1 b/module/Entra/Microsoft.Entra/Users/Remove-EntraUser.ps1 index 9f7705008c..298dcdba69 100644 --- a/module/Entra/Microsoft.Entra/Users/Remove-EntraUser.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Remove-EntraUser.ps1 @@ -14,57 +14,57 @@ function Remove-EntraUser { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["UserId"]) { $params["UserId"] = $PSBoundParameters["UserId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 index 77bd14260a..240609a7a2 100644 --- a/module/Entra/Microsoft.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserAppRoleAssignment.ps1 @@ -17,61 +17,61 @@ function Remove-EntraUserAppRoleAssignment { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["ObjectId"]) { $params["UserId"] = $PSBoundParameters["ObjectId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Users/Remove-EntraUserExtension.ps1 b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserExtension.ps1 index 1b93b758b3..54ae5da5f1 100644 --- a/module/Entra/Microsoft.Entra/Users/Remove-EntraUserExtension.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserExtension.ps1 @@ -21,65 +21,65 @@ function Remove-EntraUserExtension { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ExtensionNames"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ExtensionNames"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["ExtensionId"]) { $params["ExtensionId"] = $PSBoundParameters["ExtensionId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ExtensionName"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ExtensionName"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Users/Remove-EntraUserManager.ps1 b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserManager.ps1 index ebdb6541d4..ff49eec726 100644 --- a/module/Entra/Microsoft.Entra/Users/Remove-EntraUserManager.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Remove-EntraUserManager.ps1 @@ -14,57 +14,57 @@ function Remove-EntraUserManager { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["UserId"]) { $params["UserId"] = $PSBoundParameters["UserId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/Entra/Microsoft.Entra/Users/Set-EntraUser.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUser.ps1 index accbb1423b..2403117090 100644 --- a/module/Entra/Microsoft.Entra/Users/Set-EntraUser.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Set-EntraUser.ps1 @@ -8,174 +8,198 @@ function Set-EntraUser { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CompanyName, + [System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $StreetAddress, + [System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UsageLocation, + [System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Surname, + [System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PasswordPolicies, + [System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompromised, + [System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Department, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + [System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreationType, + [System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PreferredLanguage, + [System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TelephoneNumber, + [System.String] $UserStateChangedOn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + [System.String] $GivenName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ShowInAddressList, + [System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $FacsimileTelephoneNumber, + [System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ImmutableId, + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserPrincipalName, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserStateChangedOn, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Mobile, + [System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OtherMails, + [System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PhysicalDeliveryOfficeName, + [System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ConsentProvidedForMinor, + [System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserType, + [System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GivenName, + [System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserState, + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AgeGroup, + [System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $JobTitle, + [System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $City, + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Country, + [System.Nullable`1[System.Boolean]] $ShowInAddressList, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId + [System.String] $UserId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompromised ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["SignInNames"]) + if ($null -ne $PSBoundParameters["State"]) { - $params["Identities"] = $PSBoundParameters["SignInNames"] + $params["State"] = $PSBoundParameters["State"] } - if ($null -ne $PSBoundParameters["CompanyName"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["CompanyName"] = $PSBoundParameters["CompanyName"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] } - if ($null -ne $PSBoundParameters["StreetAddress"]) + if ($null -ne $PSBoundParameters["UserType"]) { - $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] + $params["UserType"] = $PSBoundParameters["UserType"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["PreferredLanguage"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] } - if ($null -ne $PSBoundParameters["UsageLocation"]) + if ($null -ne $PSBoundParameters["StreetAddress"]) { - $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] + $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] } - if ($null -ne $PSBoundParameters["AccountEnabled"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Surname"]) + if ($null -ne $PSBoundParameters["CreationType"]) { - $params["Surname"] = $PSBoundParameters["Surname"] + $params["CreationType"] = $PSBoundParameters["CreationType"] } - if ($null -ne $PSBoundParameters["PasswordPolicies"]) + if ($null -ne $PSBoundParameters["ImmutableId"]) { - $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] + $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["IsCompromised"]) + if ($null -ne $PSBoundParameters["CompanyName"]) { - $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + $params["CompanyName"] = $PSBoundParameters["CompanyName"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["PostalCode"]) { $params["PostalCode"] = $PSBoundParameters["PostalCode"] } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + { + $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] + } if ($null -ne $PSBoundParameters["Department"]) { $params["Department"] = $PSBoundParameters["Department"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["Mobile"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["MobilePhone"] = $PSBoundParameters["Mobile"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["UserStateChangedOn"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] + } + if ($null -ne $PSBoundParameters["GivenName"]) + { + $params["GivenName"] = $PSBoundParameters["GivenName"] + } + if ($null -ne $PSBoundParameters["Country"]) + { + $params["Country"] = $PSBoundParameters["Country"] + } + if ($null -ne $PSBoundParameters["PasswordPolicies"]) + { + $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] } if($null -ne $PSBoundParameters["PasswordProfile"]) { @@ -191,126 +215,102 @@ function Set-EntraUser { { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - if ($null -ne $PSBoundParameters["CreationType"]) - { - $params["CreationType"] = $PSBoundParameters["CreationType"] - } - if ($null -ne $PSBoundParameters["PreferredLanguage"]) - { - $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] - } - if ($null -ne $PSBoundParameters["TelephoneNumber"]) + if ($null -ne $PSBoundParameters["SignInNames"]) { - $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] + $params["Identities"] = $PSBoundParameters["SignInNames"] } - if ($null -ne $PSBoundParameters["ExtensionProperty"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ShowInAddressList"]) + if ($null -ne $PSBoundParameters["MailNickName"]) { - $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] + $params["MailNickName"] = $PSBoundParameters["MailNickName"] } - if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ImmutableId"]) + if ($null -ne $PSBoundParameters["JobTitle"]) { - $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] + $params["JobTitle"] = $PSBoundParameters["JobTitle"] } - if ($null -ne $PSBoundParameters["UserPrincipalName"]) + if ($null -ne $PSBoundParameters["UserState"]) { - $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] + $params["ExternalUserState"] = $PSBoundParameters["UserState"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["City"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["City"] = $PSBoundParameters["City"] } - if ($null -ne $PSBoundParameters["MailNickName"]) + if ($null -ne $PSBoundParameters["UsageLocation"]) { - $params["MailNickName"] = $PSBoundParameters["MailNickName"] + $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] } - if ($null -ne $PSBoundParameters["UserStateChangedOn"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["Mobile"]) + if ($null -ne $PSBoundParameters["Surname"]) { - $params["MobilePhone"] = $PSBoundParameters["Mobile"] + $params["Surname"] = $PSBoundParameters["Surname"] } if ($null -ne $PSBoundParameters["OtherMails"]) { $params["OtherMails"] = $PSBoundParameters["OtherMails"] } - if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) - { - $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["UserPrincipalName"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] } - if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) + if ($null -ne $PSBoundParameters["ExtensionProperty"]) { - $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] + $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] } - if ($null -ne $PSBoundParameters["UserType"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserType"] = $PSBoundParameters["UserType"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GivenName"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["GivenName"] = $PSBoundParameters["GivenName"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["TelephoneNumber"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] } - if ($null -ne $PSBoundParameters["UserState"]) + if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) { - $params["ExternalUserState"] = $PSBoundParameters["UserState"] + $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] } if ($null -ne $PSBoundParameters["AgeGroup"]) { $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] } - if ($null -ne $PSBoundParameters["State"]) - { - $params["State"] = $PSBoundParameters["State"] - } - if ($null -ne $PSBoundParameters["JobTitle"]) - { - $params["JobTitle"] = $PSBoundParameters["JobTitle"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["City"]) + if ($null -ne $PSBoundParameters["AccountEnabled"]) { - $params["City"] = $PSBoundParameters["City"] + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } - if ($null -ne $PSBoundParameters["Country"]) + if ($null -ne $PSBoundParameters["ShowInAddressList"]) { - $params["Country"] = $PSBoundParameters["Country"] + $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] } if ($null -ne $PSBoundParameters["UserId"]) { $params["UserId"] = $PSBoundParameters["UserId"] } + if ($null -ne $PSBoundParameters["IsCompromised"]) + { + $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/Users/Set-EntraUserManager.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUserManager.ps1 index 2d9a1c9b33..86b967b230 100644 --- a/module/Entra/Microsoft.Entra/Users/Set-EntraUserManager.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Set-EntraUserManager.ps1 @@ -17,49 +17,53 @@ function Set-EntraUserManager { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["UserId"]) { $params["UserId"] = $PSBoundParameters["UserId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { @@ -71,10 +75,6 @@ function Set-EntraUserManager { $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 b/module/Entra/Microsoft.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 index b0f96ec709..3cec4265e4 100644 --- a/module/Entra/Microsoft.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Set-EntraUserThumbnailPhoto.ps1 @@ -11,15 +11,15 @@ function Set-EntraUserThumbnailPhoto { [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Byte[]] $ImageByteArray, + + [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $FilePath, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "Stream")] [Parameter(ParameterSetName = "File")] [Parameter(ParameterSetName = "ByteArray")] - [System.String] $UserId, - - [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FilePath + [System.String] $UserId ) PROCESS { @@ -30,66 +30,66 @@ function Set-EntraUserThumbnailPhoto { { $params["FileStream"] = $PSBoundParameters["FileStream"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ImageByteArray"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ImageByteArray"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["UserId"]) - { - $params["UserId"] = $PSBoundParameters["UserId"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["FilePath"]) { $params["InFile"] = $PSBoundParameters["FilePath"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/Entra/Microsoft.Entra/Users/Update-EntraSignedInUserPassword.ps1 b/module/Entra/Microsoft.Entra/Users/Update-EntraSignedInUserPassword.ps1 index 72d01e4b7f..6188a142ae 100644 --- a/module/Entra/Microsoft.Entra/Users/Update-EntraSignedInUserPassword.ps1 +++ b/module/Entra/Microsoft.Entra/Users/Update-EntraSignedInUserPassword.ps1 @@ -7,10 +7,10 @@ function Update-EntraSignedInUserPassword { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Security.SecureString] $CurrentPassword, + [System.Security.SecureString] $NewPassword, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Security.SecureString] $NewPassword + [System.Security.SecureString] $CurrentPassword ) PROCESS { diff --git a/module/Entra/UnMappedFiles/New-EntraCustomHeaders.ps1 b/module/Entra/UnMappedFiles/New-EntraCustomHeaders.ps1 new file mode 100644 index 0000000000..5f3d3fe2af --- /dev/null +++ b/module/Entra/UnMappedFiles/New-EntraCustomHeaders.ps1 @@ -0,0 +1,31 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .PARAMETER Command + The command that is being executed. + .EXAMPLE + New-EntraCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-Module Microsoft.Graph.Entra | Select-Object version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/Entra/UnMappedFiles/Test-EntraScript.ps1 b/module/Entra/UnMappedFiles/Test-EntraScript.ps1 index 202f799cb1..c222f51c4f 100644 --- a/module/Entra/UnMappedFiles/Test-EntraScript.ps1 +++ b/module/Entra/UnMappedFiles/Test-EntraScript.ps1 @@ -5,10 +5,10 @@ function Test-EntraScript { <# .SYNOPSIS - Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Entra. + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. .DESCRIPTION - Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Entra. + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. .PARAMETER Path Path to the script file(s) to scan. @@ -19,17 +19,17 @@ function Test-EntraScript { Used when scanning code that has no file representation (e.g. straight from a repository). .PARAMETER Quiet - Only return $true or $false, based on whether the script could run under Microsoft.Entra ($true) or not ($false) + Only return $true or $false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($false) .EXAMPLE PS C:\> Test-EntraScript -Path .\usercreation.ps1 -Quiet - Returns whether the script "usercreation.ps1" could run under Microsoft.Entra + Returns whether the script "usercreation.ps1" could run under Microsoft.Graph.Entra .EXAMPLE PS C:\> Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript - Returns a list of all scripts that would not run under the Microsoft.Entra module, listing each issue with line and code. + Returns a list of all scripts that would not run under the Microsoft.Graph.Entra module, listing each issue with line and code. #> [CmdletBinding()] param ( @@ -79,7 +79,7 @@ function Test-EntraScript { foreach ($command in $allCommands) { if ($command.CommandElements[0].Value -notin $ForbiddenCommands) { continue } $findings += [PSCustomObject]@{ - PSTypeName = 'Microsoft.Entra.CommandRequirement' + PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' Name = $Name Line = $command.Extent.StartLineNumber Type = 'UnsupportedCommand' @@ -90,7 +90,7 @@ function Test-EntraScript { foreach ($requiredCommand in $RequiredCommands) { if ($requiredCommand -notin $allCommandNames) { continue } $findings += [PSCustomObject]@{ - PSTypeName = 'Microsoft.Entra.CommandRequirement' + PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' Name = $Name Line = -1 Type = 'RequiredCommandMissing' @@ -135,5 +135,54 @@ function Test-EntraScript { } } } -} +}function Get-EntraAuthorizationPolicy { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/authorizationPolicy?" + $params["Method"] = "GET" + + if($null -ne $PSBoundParameters["Id"]) + { + $Id = $Id.Substring(0, 1).ToLower() + $Id.Substring(1) + $Filter = "Id eq '$Id'" + $f = '$' + 'Filter' + $params["Uri"] += "&$f=$Filter" + } + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + $params["Uri"] += "&$properties" + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json + if($response){ + $policyList = @() + foreach ($data in $response) { + $policyType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAuthorizationPolicy + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $policyType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $policyList += $policyType + } + $policyList + } + } +}# ------------------------------------------------------------------------------ diff --git a/module/Entra/config/moduleMapping.json b/module/Entra/config/moduleMapping.json index 174b5022c1..9f14cab8ff 100644 --- a/module/Entra/config/moduleMapping.json +++ b/module/Entra/config/moduleMapping.json @@ -1,6 +1,6 @@ { "Add-EntraAdministrativeUnitMember": "DirectoryManagement", - "Add-EntraLifecyclePolicyGroup": "Groups", + "Add-EntraLifecyclePolicyGroup": "Groups", "Get-EntraAccountSku": "DirectoryManagement", "Get-EntraAdministrativeUnit": "DirectoryManagement", "Get-EntraAdministrativeUnitMember": "DirectoryManagement", diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 index c787637f66..88df62eb3b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationOwner.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaApplicationOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" - $params["OdataId"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 index 6e77542901..40ef6db8a6 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaApplicationPolicy.ps1 @@ -7,10 +7,10 @@ function Add-EntraBetaApplicationPolicy { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $RefObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $Id ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 index bcecf7bd5a..cb90115a8e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -6,15 +6,15 @@ function Add-EntraBetaServicePrincipalDelegatedPermissionClassification { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PermissionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PermissionName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[Microsoft.Open.MSGraph.Model.DelegatedPermissionClassification+ClassificationEnum]] $Classification, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ServicePrincipalId ) @@ -23,69 +23,69 @@ function Add-EntraBetaServicePrincipalDelegatedPermissionClassification { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["Classification"]) + if ($null -ne $PSBoundParameters["PermissionId"]) { - $params["Classification"] = $PSBoundParameters["Classification"] + $params["PermissionId"] = $PSBoundParameters["PermissionId"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["PermissionId"]) - { - $params["PermissionId"] = $PSBoundParameters["PermissionId"] - } if ($null -ne $PSBoundParameters["PermissionName"]) { $params["PermissionName"] = $PSBoundParameters["PermissionName"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["Classification"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Classification"] = $PSBoundParameters["Classification"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 index ad02a0a4ca..92b1bc6d12 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Add-EntraBetaServicePrincipalOwner.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 3c0e9ec07e..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,116 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Remove-AzureADMSPasswordSingleSignOnCredential -Value Remove-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraBetaApplicationProxyApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraBetaDeletedApplication -Scope Global -Force - Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraBetaDeletedApplication -Scope Global -Force - Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationFromApplicationTemplate -Value New-EntraBetaApplicationFromApplicationTemplate -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationPolicy -Value Remove-EntraBetaApplicationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationSignInDetailedSummary -Value Get-EntraBetaApplicationSignInDetailedSummary -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraBetaApplicationPassword -Scope Global -Force - Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraBetaApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSApplicationTemplate -Value Get-EntraBetaApplicationTemplate -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraBetaServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraBetaApplicationPassword -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPolicy -Value Get-EntraBetaApplicationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADApplication -Value Get-EntraBetaApplication -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name New-AzureADMSApplication -Value New-EntraBetaApplication -Scope Global -Force - Set-Alias -Name Add-AzureADApplicationPolicy -Value Add-EntraBetaApplicationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraBetaApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraBetaServicePrincipalOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Set-AzureADMSPasswordSingleSignOnCredential -Value Set-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSPasswordSingleSignOnCredential -Value Get-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraBetaServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraBetaApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraBetaServicePrincipalOwnedObject -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Remove-EntraBetaApplicationProxyApplication -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraBetaServicePrincipalMembership -Scope Global -Force - Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name New-AzureADMSPasswordSingleSignOnCredential -Value New-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraBetaServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraBetaServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraBetaDeletedApplication -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraBetaGroupIdsServicePrincipalIsMemberOf -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraBetaApplication -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraBetaApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraBetaApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraBetaServicePrincipalCreatedObject -Scope Global -Force - Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraBetaApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraBetaApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraBetaApplicationKey -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraBetaApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraBetaApplication -Scope Global -Force - Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraBetaDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraBetaApplicationKey -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraBetaApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-EntraBetaServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force - Set-Alias -Name Remove-EntraBetaServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-EntraBetaServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-EntraBetaServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 index 6cbe82f513..c0d87ed0a9 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaApplicationExtensionProperty.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaApplicationExtensionProperty { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 index 817fda707c..7c670e5c45 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -7,73 +7,73 @@ function Get-EntraBetaPasswordSingleSignOnCredential { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] - $Value = $TmpValue.Id - $params["Id"] = $Value + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] + $Value = $TmpValue.Id + $params["Id"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 index b453aac08e..003e8449b8 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipal.ps1 @@ -5,15 +5,15 @@ function Get-EntraBetaServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, @@ -27,22 +27,10 @@ function Get-EntraBetaServicePrincipal { PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) - { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["SearchString"]) { @@ -50,6 +38,10 @@ function Get-EntraBetaServicePrincipal { $Value = "publisherName eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue'))" $params["Filter"] = $Value } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] @@ -59,48 +51,56 @@ function Get-EntraBetaServicePrincipal { $Value = $TmpValue $params["Filter"] = $Value } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 index c51c0167be..10bd80ec17 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaServicePrincipalAppRoleAssignedTo { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 index 79f3491c54..04bc92669e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaServicePrincipalAppRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 index 50e04d165a..3e0decb47c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaServicePrincipalCreatedObject { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 index a4763c214c..e53fdfb7b6 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -9,11 +9,11 @@ function Get-EntraBetaServicePrincipalDelegatedPermissionClassification { [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ServicePrincipalId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -22,21 +22,13 @@ function Get-EntraBetaServicePrincipalDelegatedPermissionClassification { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -47,45 +39,53 @@ function Get-EntraBetaServicePrincipalDelegatedPermissionClassification { $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["DelegatedPermissionClassificationId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 index c91c9cda05..c062f80383 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalMembership.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaServicePrincipalMembership { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 index a1ff33592c..c0af38e2af 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaServicePrincipalOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 index 079cd01664..625fcb8aea 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaServicePrincipalOwnedObject { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 index fd849ab81b..de1adc6705 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraBetaServicePrincipalOwner.ps1 @@ -3,68 +3,71 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Get-EntraBetaServicePrincipalOwner { - function Get-EntraBetaServicePrincipalOwner { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Alias("ObjectId")] - [System.String] $ServicePrincipalId, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] - [System.String[]] $Property + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("ObjectId")] + [System.String] $ServicePrincipalId, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + # Switch to include all service principal owners + [switch] $All, + + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["ServicePrincipalId"]) - { + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if($null -ne $PSBoundParameters["All"]) - { - if($PSBoundParameters["All"]) - { + if ($null -ne $PSBoundParameters["All"]) { + if ($PSBoundParameters["All"]) { $params["All"] = $PSBoundParameters["All"] } } - if($PSBoundParameters.ContainsKey("Debug")) - { + if ($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if($PSBoundParameters.ContainsKey("Top")) - { + if ($PSBoundParameters.ContainsKey("Top")) { $params["Top"] = $PSBoundParameters["Top"] } - if($null -ne $PSBoundParameters["Property"]) - { + if ($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] } + # Add common parameters if they exist + $commonParams = @("WarningVariable", "InformationVariable", "InformationAction", "OutVariable", "OutBuffer", "ErrorVariable", "PipelineVariable", "ErrorAction", "WarningAction") + foreach ($param in $commonParams) { + if ($PSBoundParameters.ContainsKey($param)) { + $params[$param] = $PSBoundParameters[$param] + } + } Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Get-MgBetaServicePrincipalOwner @params -Headers $customHeaders $response | ForEach-Object { - if($null -ne $_) { + if ($null -ne $_) { Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id - $propsToConvert = @('appRoles','publishedPermissionScopes') - try{ + $propsToConvert = @('appRoles', 'publishedPermissionScopes') + try { foreach ($prop in $propsToConvert) { $value = $_.$prop | ConvertTo-Json -Depth 10 | ConvertFrom-Json $_ | Add-Member -MemberType NoteProperty -Name $prop -Value ($value) -Force } - }catch{} + } catch {} } } $response - } -} + } } diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplication.ps1 index ed1da7ad30..6415687b13 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplication.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplication.ps1 @@ -7,110 +7,144 @@ function New-EntraBetaApplication { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, + [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, + [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, + [System.Collections.Generic.List`1[System.String]] $Tags, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDeviceOnlyAuthSupported, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, + [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PreAuthorizedApplication]] $PreAuthorizedApplications, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, + [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.InformationalUrl] $InformationalUrl, + [System.Collections.Generic.List`1[System.String]] $OrgRestrictions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TokenEncryptionKeyId, + [System.String] $SignInAudience, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GroupMembershipClaims, + [Microsoft.Open.MSGraph.Model.WebApplication] $Web, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AddIn]] $AddIns, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OrgRestrictions, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.PasswordCredential]] $PasswordCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Tags, + [System.Collections.Generic.List`1[System.String]] $IdentifierUris, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $IdentifierUris, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.PublicClientApplication] $PublicClient, + [System.String] $TokenEncryptionKeyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ParentalControlSettings] $ParentalControlSettings, + [System.Nullable`1[System.Boolean]] $IsFallbackPublicClient, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $SignInAudience, + [System.String] $GroupMembershipClaims, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.WebApplication] $Web, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RequiredResourceAccess]] $RequiredResourceAccess, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AppRole]] $AppRoles, + [Microsoft.Open.MSGraph.Model.ApiApplication] $Api, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.OptionalClaims] $OptionalClaims ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PreAuthorizedApplications"]) - { - $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($null -ne $PSBoundParameters["PublicClient"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $TmpValue = $PSBoundParameters["PublicClient"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["PublicClient"] = $Value } - if($null -ne $PSBoundParameters["RequiredResourceAccess"]) + if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) { - $TmpValue = $PSBoundParameters["RequiredResourceAccess"] - $Value = $TmpValue | ConvertTo-Json - $params["RequiredResourceAccess"] = $Value + $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["Tags"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Tags"] = $PSBoundParameters["Tags"] } if ($null -ne $PSBoundParameters["ErrorVariable"]) { $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) + if($null -ne $PSBoundParameters["InformationalUrl"]) { - $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] + $TmpValue = $PSBoundParameters["InformationalUrl"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Info"] = $Value } - if ($null -ne $PSBoundParameters["IsDeviceOnlyAuthSupported"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["IsDeviceOnlyAuthSupported"] = $PSBoundParameters["IsDeviceOnlyAuthSupported"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["PreAuthorizedApplications"]) + { + $params["PreAuthorizedApplications"] = $PSBoundParameters["PreAuthorizedApplications"] + } + if($null -ne $PSBoundParameters["ParentalControlSettings"]) + { + $TmpValue = $PSBoundParameters["ParentalControlSettings"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["ParentalControlSettings"] = $Value + } + if ($null -ne $PSBoundParameters["OrgRestrictions"]) + { + $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] + } + if ($null -ne $PSBoundParameters["SignInAudience"]) + { + $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if($null -ne $PSBoundParameters["Web"]) + { + $TmpValue = $PSBoundParameters["Web"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Web"] = $Value } if ($null -ne $PSBoundParameters["PipelineVariable"]) { @@ -120,13 +154,13 @@ function New-EntraBetaApplication { { $params["AddIns"] = $PSBoundParameters["AddIns"] } - if($null -ne $PSBoundParameters["Api"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $TmpValue = $PSBoundParameters["Api"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["Api"] = $Value + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { @@ -145,69 +179,46 @@ function New-EntraBetaApplication { $Value = $a $params["PasswordCredentials"] = $Value } - if($null -ne $PSBoundParameters["InformationalUrl"]) - { - $TmpValue = $PSBoundParameters["InformationalUrl"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["Info"] = $Value - } - if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) - { - $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) - { - $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] - } - if($null -ne $PSBoundParameters["OptionalClaims"]) - { - $TmpValue = $PSBoundParameters["OptionalClaims"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["OptionalClaims"] = $Value - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["IdentifierUris"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] } - if ($null -ne $PSBoundParameters["OrgRestrictions"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OrgRestrictions"] = $PSBoundParameters["OrgRestrictions"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["Tags"]) + if($null -ne $PSBoundParameters["AppRoles"]) { - $params["Tags"] = $PSBoundParameters["Tags"] + $TmpValue = $PSBoundParameters["AppRoles"] + $a = @() + $input = $TmpValue + foreach($v in $input) + { + $Temp = $v | ConvertTo-Json + $hash = @{} + + (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} + $a += $hash + } + + $Value = $a + $params["AppRoles"] = $Value } - if ($null -ne $PSBoundParameters["IdentifierUris"]) + if ($null -ne $PSBoundParameters["TokenEncryptionKeyId"]) { - $params["IdentifierUris"] = $PSBoundParameters["IdentifierUris"] + $params["TokenEncryptionKeyId"] = $PSBoundParameters["TokenEncryptionKeyId"] } - if($null -ne $PSBoundParameters["PublicClient"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $TmpValue = $PSBoundParameters["PublicClient"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["PublicClient"] = $Value + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($null -ne $PSBoundParameters["ParentalControlSettings"]) + if ($null -ne $PSBoundParameters["IsFallbackPublicClient"]) { - $TmpValue = $PSBoundParameters["ParentalControlSettings"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["ParentalControlSettings"] = $Value + $params["IsFallbackPublicClient"] = $PSBoundParameters["IsFallbackPublicClient"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { @@ -231,50 +242,39 @@ function New-EntraBetaApplication { $Value = $a $params["KeyCredentials"] = $Value } - if ($null -ne $PSBoundParameters["SignInAudience"]) - { - $params["SignInAudience"] = $PSBoundParameters["SignInAudience"] - } - if($null -ne $PSBoundParameters["Web"]) + if ($null -ne $PSBoundParameters["GroupMembershipClaims"]) { - $TmpValue = $PSBoundParameters["Web"] - $Temp = $TmpValue | ConvertTo-Json - - $Value = $Temp - $params["Web"] = $Value + $params["GroupMembershipClaims"] = $PSBoundParameters["GroupMembershipClaims"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($null -ne $PSBoundParameters["AppRoles"]) + if($null -ne $PSBoundParameters["RequiredResourceAccess"]) { - $TmpValue = $PSBoundParameters["AppRoles"] - $a = @() - $input = $TmpValue - foreach($v in $input) - { - $Temp = $v | ConvertTo-Json - $hash = @{} - - (ConvertFrom-Json $Temp).psobject.properties | Foreach { if($null -ne $_.Value){ $hash[$_.Name] = $_.Value }} - $a += $hash - } - - $Value = $a - $params["AppRoles"] = $Value + $TmpValue = $PSBoundParameters["RequiredResourceAccess"] + $Value = $TmpValue | ConvertTo-Json + $params["RequiredResourceAccess"] = $Value } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["Api"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["Api"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["Api"] = $Value } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($null -ne $PSBoundParameters["OptionalClaims"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $TmpValue = $PSBoundParameters["OptionalClaims"] + $Temp = $TmpValue | ConvertTo-Json + + $Value = $Temp + $params["OptionalClaims"] = $Value } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 index 5dd1d8b183..35b2819bfe 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationExtensionProperty.ps1 @@ -5,87 +5,87 @@ function New-EntraBetaApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $TargetObjects, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ApplicationId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DataType, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $TargetObjects + [System.String] $DataType ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["DataType"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["DataType"] = $PSBoundParameters["DataType"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Name"] = $PSBoundParameters["Name"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["TargetObjects"]) { $params["TargetObjects"] = $PSBoundParameters["TargetObjects"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["Name"]) + { + $params["Name"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["DataType"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DataType"] = $PSBoundParameters["DataType"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 index 9c5cff8a47..a1b7cbb1b6 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKey.ps1 @@ -6,12 +6,12 @@ function New-EntraBetaApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $Proof, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ObjectId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [Microsoft.Open.MSGraph.Model.KeyCredential] $KeyCredential, @@ -23,65 +23,65 @@ function New-EntraBetaApplicationKey { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Proof"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Proof"] = $PSBoundParameters["Proof"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["Proof"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Proof"] = $PSBoundParameters["Proof"] + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["KeyCredential"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["KeyCredential"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["KeyCredential"] = $PSBoundParameters["KeyCredential"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($null -ne $PSBoundParameters["PasswordCredential"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 index 765653c56a..d16b96bde6 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationKeyCredential.ps1 @@ -7,106 +7,106 @@ function New-EntraBetaApplicationKeyCredential { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.DateTime]] $EndDate, - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage, + [System.String] $Value, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $CustomKeyIdentifier, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.DateTime]] $StartDate, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Value, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyType]] $Type + [System.Nullable`1[System.DateTime]] $EndDate, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[Microsoft.Open.AzureAD.Graph.PowerShell.Custom.KeyUsage]] $Usage ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Value"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Value"] = $PSBoundParameters["Value"] } if ($null -ne $PSBoundParameters["ProgressAction"]) { $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["EndDate"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["EndDate"] = $PSBoundParameters["EndDate"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["Usage"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Usage"] = $PSBoundParameters["Usage"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["CustomKeyIdentifier"]) { $params["CustomKeyIdentifier"] = $PSBoundParameters["CustomKeyIdentifier"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["StartDate"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["StartDate"] = $PSBoundParameters["StartDate"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["StartDate"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["StartDate"] = $PSBoundParameters["StartDate"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["Value"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Value"] = $PSBoundParameters["Value"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Type"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Type"] = $PSBoundParameters["Type"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["EndDate"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["EndDate"] = $PSBoundParameters["EndDate"] } - if ($null -ne $PSBoundParameters["Type"]) + if ($null -ne $PSBoundParameters["Usage"]) { - $params["Type"] = $PSBoundParameters["Type"] + $params["Usage"] = $PSBoundParameters["Usage"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 index 89f22c905a..c02087bba2 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaApplicationPassword.ps1 @@ -17,57 +17,57 @@ function New-EntraBetaApplicationPassword { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["PasswordCredential"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 index 228fec953b..a17ab2b9f2 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -7,35 +7,39 @@ function New-EntraBetaPasswordSingleSignOnCredential { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["PasswordSSOCredential"]) { @@ -43,37 +47,33 @@ function New-EntraBetaPasswordSingleSignOnCredential { $Value = $TmpValue | ConvertTo-Json $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 index 9459bb1b0f..56a49ad477 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipal.ps1 @@ -6,86 +6,118 @@ function New-EntraBetaServicePrincipal { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AppId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $AlternativeNames, + [System.String] $ServicePrincipalType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Homepage, + [System.String] $LogoutUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AccountEnabled, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ServicePrincipalType, + [System.String] $Homepage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $PublisherName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Tags, + [System.Collections.Generic.List`1[System.String]] $AlternativeNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ErrorUrl, + [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $LogoutUrl, + [System.Collections.Generic.List`1[System.String]] $ReplyUrls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, + [System.String] $ErrorUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $SamlMetadataUrl, + [System.String] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ServicePrincipalNames, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.PasswordCredential]] $PasswordCredentials, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AppRoleAssignmentRequired, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ReplyUrls, + [System.String] $SamlMetadataUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName + [System.Collections.Generic.List`1[System.String]] $Tags ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["AppId"]) + if ($null -ne $PSBoundParameters["ServicePrincipalType"]) { - $params["AppId"] = $PSBoundParameters["AppId"] + $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["LogoutUrl"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["Homepage"]) + { + $params["Homepage"] = $PSBoundParameters["Homepage"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) + { + $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] + } + if ($null -ne $PSBoundParameters["PublisherName"]) + { + $params["PublisherName"] = $PSBoundParameters["PublisherName"] } if ($null -ne $PSBoundParameters["AlternativeNames"]) { $params["AlternativeNames"] = $PSBoundParameters["AlternativeNames"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] } - if ($null -ne $PSBoundParameters["Homepage"]) + if ($null -ne $PSBoundParameters["ReplyUrls"]) { - $params["Homepage"] = $PSBoundParameters["Homepage"] + $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["ErrorUrl"]) + { + $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if($null -ne $PSBoundParameters["AccountEnabled"]) { @@ -98,13 +130,9 @@ function New-EntraBetaServicePrincipal { } $params["AccountEnabled"] = $Value } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ServicePrincipalType"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ServicePrincipalType"] = $PSBoundParameters["ServicePrincipalType"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["PasswordCredentials"]) { @@ -125,41 +153,21 @@ function New-EntraBetaServicePrincipal { $Value = $a $params["PasswordCredentials"] = $Value } - if ($null -ne $PSBoundParameters["PublisherName"]) - { - $params["PublisherName"] = $PSBoundParameters["PublisherName"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if ($null -ne $PSBoundParameters["Tags"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Tags"] = $PSBoundParameters["Tags"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorUrl"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ErrorUrl"] = $PSBoundParameters["ErrorUrl"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["LogoutUrl"]) + if ($null -ne $PSBoundParameters["AppId"]) { - $params["LogoutUrl"] = $PSBoundParameters["LogoutUrl"] + $params["AppId"] = $PSBoundParameters["AppId"] } if($null -ne $PSBoundParameters["KeyCredentials"]) { @@ -186,29 +194,21 @@ function New-EntraBetaServicePrincipal { { $params["SamlMetadataUrl"] = $PSBoundParameters["SamlMetadataUrl"] } - if ($null -ne $PSBoundParameters["ServicePrincipalNames"]) - { - $params["ServicePrincipalNames"] = $PSBoundParameters["ServicePrincipalNames"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["AppRoleAssignmentRequired"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["AppRoleAssignmentRequired"] = $PSBoundParameters["AppRoleAssignmentRequired"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ReplyUrls"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ReplyUrls"] = $PSBoundParameters["ReplyUrls"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["Tags"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Tags"] = $PSBoundParameters["Tags"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 index 8630dd498a..8becd720be 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -10,58 +10,50 @@ function New-EntraBetaServicePrincipalAppRoleAssignment { [System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PrincipalId, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId, + [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id + [System.String] $ResourceId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -71,21 +63,29 @@ function New-EntraBetaServicePrincipalAppRoleAssignment { { $params["AppRoleId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 index f2b0a968bd..4d633191d3 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplication.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaApplication { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 index f6837401e9..dd91730a2b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationExtensionProperty.ps1 @@ -5,73 +5,73 @@ function Remove-EntraBetaApplicationExtensionProperty { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ApplicationId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ExtensionPropertyId + [System.String] $ExtensionPropertyId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ApplicationId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["ExtensionPropertyId"]) { $params["ExtensionPropertyId"] = $PSBoundParameters["ExtensionPropertyId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 index b43bc4c80e..8a3f807402 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKey.ps1 @@ -6,79 +6,79 @@ function Remove-EntraBetaApplicationKey { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Proof, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $KeyId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Proof + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["Proof"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Proof"] = $PSBoundParameters["Proof"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["Proof"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Proof"] = $PSBoundParameters["Proof"] + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 index fb2a7c3d71..bba49acaa8 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationKeyCredential.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaApplicationKeyCredential { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 index 7e63e90af5..71299f078e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationOwner.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaApplicationOwner { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 index 72798e3f25..973677a901 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPassword.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaApplicationPassword { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ApplicationId"] = $PSBoundParameters["ObjectId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApplicationId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 index b5fdc8dec3..2a8279ceb8 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationPasswordCredential.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaApplicationPasswordCredential { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["KeyId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["KeyId"] = $PSBoundParameters["KeyId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["KeyId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["KeyId"] = $PSBoundParameters["KeyId"] } - if ($null -ne $PSBoundParameters["ApplicationId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ApplicationId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ApplicationId"] = $PSBoundParameters["ApplicationId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 index 598da3f558..223beccb35 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.ps1 @@ -24,5 +24,5 @@ function Remove-EntraBetaApplicationProxyConnectorGroup { Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri } -} +}# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 index 52a3b30972..32a5711a40 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaApplicationVerifiedPublisher { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["AppObjectId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppObjectId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 index 2acfb14026..bddbcf8c2c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaDeletedApplication.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDeletedApplication { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 index 4f38aa8316..74c45050c5 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -7,73 +7,73 @@ function Remove-EntraBetaPasswordSingleSignOnCredential { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.MSGraph.Model.PasswordSSOObjectId] $PasswordSSOObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] - $Value = $TmpValue.Id - $params["Id"] = $Value + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($null -ne $PSBoundParameters["PasswordSSOObjectId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $TmpValue = $PSBoundParameters["PasswordSSOObjectId"] + $Value = $TmpValue.Id + $params["Id"] = $Value + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 index 034eea8e7d..cca61beefe 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipal.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaServicePrincipal { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 index 7c6cf20c58..a26d60f9af 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.ps1 @@ -5,73 +5,73 @@ function Remove-EntraBetaServicePrincipalAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AppRoleAssignmentId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId + [System.String] $ServicePrincipalId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) - { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 index 3bdc8d23dc..a5ae6f0d90 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.ps1 @@ -7,10 +7,10 @@ function Remove-EntraBetaServicePrincipalDelegatedPermissionClassification { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ServicePrincipalId, + [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id + [System.String] $ServicePrincipalId ) PROCESS{ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 index 6f0a7ebf2e..e9ec34b258 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Remove-EntraBetaServicePrincipalOwner.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaServicePrincipalOwner { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ServicePrincipalId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if ($null -ne $PSBoundParameters["ServicePrincipalId"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["ServicePrincipalId"] = $PSBoundParameters["ServicePrincipalId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 index d9262a6865..d9ff988e5e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Restore-EntraBetaDeletedApplication.ps1 @@ -6,11 +6,11 @@ function Restore-EntraBetaDeletedApplication { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $IdentifierUris, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [System.String] $ObjectId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $IdentifierUris ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 index 85c91998d7..64c4ffa64c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraBetaGroupIdsServicePrincipalIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 index 4c0b6e7840..6c2befde95 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.ps1 @@ -35,5 +35,49 @@ function Set-EntraBetaApplicationProxyApplicationConnectorGroup { Invoke-MgGraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri -Body $body -ContentType "application/json" } +}function Restore-EntraBetaDeletedDirectoryObject { + [CmdletBinding(DefaultParameterSetName = '')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $AutoReconcileProxyConflict + ) + + PROCESS { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = 'https://graph.microsoft.com/beta/directory/deletedItems/' + $params["Method"] = "POST" + if($null -ne $PSBoundParameters["Id"]) + { + $params["Uri"] += $Id+"/microsoft.graph.restore" + } + if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) + { + $params["Body"] = @{ + autoReconcileProxyConflict = $true + } + } + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + if($response){ + $userList = @() + foreach ($data in $response) { + $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject + $data.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $userList += $userType + } + $userList + } + } }# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 index 4fc3d74d0d..7b82ab121c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.ps1 @@ -71,5 +71,5 @@ function Set-EntraBetaApplicationProxyApplicationSingleSignOn { Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri -Body $body -ContentType "application/json" } -}# ------------------------------------------------------------------------------ +}# --------------------------------------------------------------------------- diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 index f5fcb4339b..472bc6e4ff 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.ps1 @@ -33,5 +33,5 @@ function Set-EntraBetaApplicationProxyConnectorGroup { Invoke-GraphRequest -Headers $customHeaders -Method $params.method -Uri $params.uri -Body $body } -}# ------------------------------------------------------------------------------ +} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 index 8b4d8e21b2..455e33e7cc 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.ps1 @@ -17,61 +17,61 @@ function Set-EntraBetaApplicationVerifiedPublisher { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["AppObjectId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["SetVerifiedPublisherRequest"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["SetVerifiedPublisherRequest"] = $PSBoundParameters["SetVerifiedPublisherRequest"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AppObjectId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AppObjectId"] = $PSBoundParameters["AppObjectId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 index b0eac52efe..a511f7d737 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.ps1 @@ -7,35 +7,39 @@ function Set-EntraBetaPasswordSingleSignOnCredential { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.PasswordSSOCredentials] $PasswordSSOCredential + [System.String] $ObjectId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if($null -ne $PSBoundParameters["PasswordSSOCredential"]) { @@ -43,37 +47,33 @@ function Set-EntraBetaPasswordSingleSignOnCredential { $Value = $TmpValue | ConvertTo-Json $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ServicePrincipalId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 2a28ee0685..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,51 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraBetaSignedInUserAllRefreshToken -Scope Global -Force - Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraBetaUserAllRefreshToken -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Connect-AzureAD -Value Connect-EntraBeta -Scope Global -Force - Set-Alias -Name Disconnect-AzureAD -Value Disconnect-EntraBeta -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 index 5f077a4885..b95a90a0d5 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.ps1 @@ -14,57 +14,57 @@ function Revoke-EntraBetaUserAllRefreshToken { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 index affb1b65a5..13c113f43f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -20,37 +20,33 @@ function Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["IsActive"]) { $params["IsActive"] = $PSBoundParameters["IsActive"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -60,25 +56,29 @@ function Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { { $params["Id"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) - { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 index 18bf2c6a06..32898fca8d 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaDeviceRegisteredOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 index fe5c34c78c..86f779c9e5 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaDeviceRegisteredUser { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 index ee8080b64f..66b923f44a 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DirectoryRoleId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DirectoryRoleId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" - $params["OdataId"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index e2ad75f306..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,111 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinition -Value Set-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name Remove-AzureADAdministrativeUnit -Value Remove-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraBetaContactDirectReport -Scope Global -Force - Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - Set-Alias -Name Get-AzureADAdministrativeUnitMember -Value Get-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Get-AzureADContract -Value Get-EntraBetaContract -Scope Global -Force - Set-Alias -Name Get-AzureADContact -Value Get-EntraBetaContact -Scope Global -Force - Set-Alias -Name Get-AzureADContactManager -Value Get-EntraBetaContactManager -Scope Global -Force - Set-Alias -Name Add-AzureADAdministrativeUnitMember -Value Add-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name New-AzureADDevice -Value New-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Get-AzureADDevice -Value Get-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Get-AzureADMSAttributeSet -Value Get-EntraBetaAttributeSet -Scope Global -Force - Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraBetaDomainVerificationDnsRecord -Scope Global -Force - Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinition -Value Get-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADScopedRoleMembership -Value Get-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name Get-AzureADDirectorySetting -Value Get-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Add-AzureADMScustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - Set-Alias -Name Remove-AzureADDirectorySetting -Value Remove-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Set-AzureADMSAttributeSet -Value Set-EntraBetaAttributeSet -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnitMember -Value New-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Remove-AzureADContact -Value Remove-EntraBetaContact -Scope Global -Force - Set-Alias -Name Set-AzureADDomain -Value Set-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Add-AzureADScopedRoleMembership -Value Add-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name New-AzureADMSAttributeSet -Value New-EntraBetaAttributeSet -Scope Global -Force - Set-Alias -Name Get-AzureADDirectorySettingTemplate -Value Get-EntraBetaDirectorySettingTemplate -Scope Global -Force - Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraBetaTenantDetail -Scope Global -Force - Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraBetaTenantDetail -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADMSCustomSecurityAttributeDefinition -Value New-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraBetaDomain -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Remove-AzureADScopedRoleMembership -Value Remove-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraBetaDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADAdministrativeUnitMember -Value Remove-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraBetaSubscribedSku -Scope Global -Force - Set-Alias -Name Set-AzureADDirectorySetting -Value Set-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraBetaDomainNameReference -Scope Global -Force - Set-Alias -Name New-AzureADDomain -Value New-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraBetaDirectoryRoleTemplate -Scope Global -Force - Set-Alias -Name Get-AzureADDomain -Value Get-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraBetaDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name New-AzureADDirectorySetting -Value New-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraBetaDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraBetaDirectoryRole -Scope Global -Force - Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraBetaDirectoryRole -Scope Global -Force - Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraBetaContactMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraBetaDomainServiceConfigurationRecord -Scope Global -Force - Set-Alias -Name Set-AzureADDevice -Value Set-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraBetaDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name Get-AzureADAdministrativeUnit -Value Get-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-EntraBetaRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-EntraBetaRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 index 2bdc3515a3..62285d48ae 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.ps1 @@ -14,57 +14,57 @@ function Enable-EntraBetaDirectoryRole { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["RoleTemplateId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["RoleTemplateId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["RoleTemplateId"] = $PSBoundParameters["RoleTemplateId"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 index 06179ca326..d2dcd2b36a 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.ps1 @@ -5,12 +5,12 @@ function Get-EntraBetaAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, @@ -25,25 +25,13 @@ function Get-EntraBetaAdministrativeUnit { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ObjectId = "Id"} - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) - { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -54,44 +42,56 @@ function Get-EntraBetaAdministrativeUnit { $Value = $TmpValue $params["Filter"] = $Value } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + { + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 index 5ec4f62b23..decbfe0904 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaAdministrativeUnitMember { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 index f7dd8f845f..827934a422 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaAttributeSet.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaAttributeSet { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["AttributeSetId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AttributeSetId"] = $PSBoundParameters["AttributeSetId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["AttributeSetId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["AttributeSetId"] = $PSBoundParameters["AttributeSetId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 index d21c5bd415..e32b59e90c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactDirectReport.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaContactDirectReport { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 index 8db726755c..43715d22f2 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactManager.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaContactManager { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 index 02afb8ca85..6aaa4285d0 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContactMembership.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaContactMembership { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 index 72d417cac5..2a1b23d480 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaContract.ps1 @@ -5,12 +5,12 @@ function Get-EntraBetaContract { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ContractId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ContractId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, @@ -25,25 +25,13 @@ function Get-EntraBetaContract { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ContractId"]) - { - $params["ContractId"] = $PSBoundParameters["ContractId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -54,44 +42,56 @@ function Get-EntraBetaContract { $Value = $TmpValue $params["Filter"] = $Value } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["ContractId"]) + { + $params["ContractId"] = $PSBoundParameters["ContractId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 index f4371c10d3..8af74cb24c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaCustomSecurityAttributeDefinition { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 index 7480b958a6..07ce4bf537 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -22,21 +22,13 @@ function Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{} - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -47,45 +39,53 @@ function Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { $Value = $TmpValue $params["Filter"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AllowedValueId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + $params["AllowedValueId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 index 2823970182..0e1d1b4b52 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaDeletedDirectoryObject { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["DirectoryObjectId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["DirectoryObjectId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["DirectoryObjectId"] = $PSBoundParameters["DirectoryObjectId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 index 9cc9bc11a3..7f020359ea 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDevice.ps1 @@ -5,15 +5,15 @@ function Get-EntraBetaDevice { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DeviceId, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DeviceId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, @@ -27,22 +27,10 @@ function Get-EntraBetaDevice { PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["DeviceId"]) - { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["SearchString"]) { @@ -50,6 +38,10 @@ function Get-EntraBetaDevice { $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] @@ -59,48 +51,56 @@ function Get-EntraBetaDevice { $Value = $TmpValue $params["Filter"] = $Value } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { @@ -118,16 +118,16 @@ function Get-EntraBetaDevice { $response = Get-MgBetaDevice @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSVersion -Value OperatingSystemVersion + Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimestamp -Value DeletedDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name ComplianceExpiryTime -Value ComplianceExpirationDateTime + Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceTrustType -Value TrustType - Add-Member -InputObject $_ -MemberType AliasProperty -Name DirSyncEnabled -Value OnPremisesSyncEnabled - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSVersion -Value OperatingSystemVersion + Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceObjectVersion -Value DeviceVersion Add-Member -InputObject $_ -MemberType AliasProperty -Name LastDirSyncTime -Value OnPremisesLastSyncDateTime - Add-Member -InputObject $_ -MemberType AliasProperty -Name ApproximateLastLogonTimestamp -Value ApproximateLastSignInDateTime - Add-Member -InputObject $_ -MemberType AliasProperty -Name ComplianceExpiryTime -Value ComplianceExpirationDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name DevicePhysicalIds -Value PhysicalIds - Add-Member -InputObject $_ -MemberType AliasProperty -Name DeviceOSType -Value OperatingSystem Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 index accfb57c10..0c10302483 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRole.ps1 @@ -5,12 +5,12 @@ function Get-EntraBetaDirectoryRole { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DirectoryRoleId, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -19,21 +19,13 @@ function Get-EntraBetaDirectoryRole { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["DirectoryRoleId"]) - { - $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -44,41 +36,49 @@ function Get-EntraBetaDirectoryRole { $Value = $TmpValue $params["Filter"] = $Value } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 index e576835759..a7c9dfaec6 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.ps1 @@ -13,54 +13,54 @@ function Get-EntraBetaDirectoryRoleTemplate { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($PSBoundParameters.ContainsKey("Debug")) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 index 34a472a8c3..91f951d781 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectorySetting.ps1 @@ -22,21 +22,37 @@ function Get-EntraBetaDirectorySetting { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] } if($null -ne $PSBoundParameters["All"]) { @@ -45,41 +61,25 @@ function Get-EntraBetaDirectorySetting { $params["All"] = $PSBoundParameters["All"] } } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["Id"]) { $params["DirectorySettingId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 index 62dbab0370..404e0afdb1 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaDomainServiceConfigurationRecord { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { @@ -80,8 +80,8 @@ function Get-EntraBetaDomainServiceConfigurationRecord { $response = Get-MgBetaDomainServiceConfigurationRecord @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 index b1753054dc..28facd3d63 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaDomainVerificationDnsRecord { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { @@ -80,8 +80,8 @@ function Get-EntraBetaDomainVerificationDnsRecord { $response = Get-MgBetaDomainVerificationDnsRecord @params -Headers $customHeaders $response | ForEach-Object { if($null -ne $_) { - Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name DnsRecordId -Value Id + Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 index a00b2eedd4..300d6ee828 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.ps1 @@ -7,99 +7,99 @@ function New-EntraBetaAdministrativeUnit { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRuleProcessingState, + [System.String] $MembershipRule, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipType, + [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRule, + [System.String] $MembershipRuleProcessingState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $MembershipType ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["MembershipRule"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + } + if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) + { + $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["MembershipType"]) + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) { - $params["MembershipType"] = $PSBoundParameters["MembershipType"] + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] } - if ($null -ne $PSBoundParameters["MembershipRule"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["MembershipType"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["MembershipType"] = $PSBoundParameters["MembershipType"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 index 59de00b833..6cd96d4ca6 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -7,113 +7,113 @@ function New-EntraBetaCustomSecurityAttributeDefinition { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AttributeSet, + [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Type, + [System.String] $Status, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsSearchable, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, + [System.Nullable`1[System.Boolean]] $IsCollection, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $IsSearchable, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Status, + [System.String] $AttributeSet, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsCollection + [System.String] $Type ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["AttributeSet"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["AttributeSet"] = $PSBoundParameters["AttributeSet"] + $params["Name"] = $PSBoundParameters["Name"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Status"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Status"] = $PSBoundParameters["Status"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Name"] = $PSBoundParameters["Name"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["Type"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Type"] = $PSBoundParameters["Type"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["IsSearchable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["IsSearchable"] = $PSBoundParameters["IsSearchable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) + if ($null -ne $PSBoundParameters["IsCollection"]) { - $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] + $params["IsCollection"] = $PSBoundParameters["IsCollection"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IsSearchable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IsSearchable"] = $PSBoundParameters["IsSearchable"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["AttributeSet"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["AttributeSet"] = $PSBoundParameters["AttributeSet"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["Type"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Type"] = $PSBoundParameters["Type"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Status"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Status"] = $PSBoundParameters["Status"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["IsCollection"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["IsCollection"] = $PSBoundParameters["IsCollection"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 index beff85586c..5195eb5f1d 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDevice.ps1 @@ -7,162 +7,162 @@ function New-EntraBetaDevice { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Int32]] $DeviceObjectVersion, + [System.Nullable`1[System.Boolean]] $IsManaged, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DeviceTrustType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DeviceOSVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DeviceMetadata, + [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsManaged, + [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $DeviceId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompliant, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $DeviceOSType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SystemLabels, + [System.Nullable`1[System.Int32]] $DeviceObjectVersion, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $DevicePhysicalIds, + [System.String] $DeviceMetadata, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DeviceOSVersion, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.DateTime]] $ApproximateLastLogonTimeStamp, + [System.Nullable`1[System.Boolean]] $AccountEnabled, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ProfileType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.AlternativeSecurityId]] $AlternativeSecurityIds, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DeviceOSType, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ProfileType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompliant, + [System.Collections.Generic.List`1[System.String]] $SystemLabels, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DeviceTrustType ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) - { - $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] - } - if ($null -ne $PSBoundParameters["DeviceTrustType"]) + if ($null -ne $PSBoundParameters["IsManaged"]) { - $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] + $params["IsManaged"] = $PSBoundParameters["IsManaged"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["DeviceOSVersion"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["DeviceMetadata"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["DevicePhysicalIds"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] } - if ($null -ne $PSBoundParameters["IsManaged"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["IsManaged"] = $PSBoundParameters["IsManaged"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["DeviceId"]) { $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["AccountEnabled"]) + if ($null -ne $PSBoundParameters["IsCompliant"]) { - $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["DeviceOSType"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] } - if ($null -ne $PSBoundParameters["SystemLabels"]) + if ($null -ne $PSBoundParameters["DeviceObjectVersion"]) { - $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] + $params["DeviceObjectVersion"] = $PSBoundParameters["DeviceObjectVersion"] } - if ($null -ne $PSBoundParameters["DevicePhysicalIds"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["DevicePhysicalIds"] = $PSBoundParameters["DevicePhysicalIds"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["DeviceOSVersion"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DeviceOSVersion"] = $PSBoundParameters["DeviceOSVersion"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ApproximateLastLogonTimeStamp"]) + if ($null -ne $PSBoundParameters["DeviceMetadata"]) { - $params["ApproximateLastLogonTimeStamp"] = $PSBoundParameters["ApproximateLastLogonTimeStamp"] + $params["DeviceMetadata"] = $PSBoundParameters["DeviceMetadata"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["AccountEnabled"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProfileType"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProfileType"] = $PSBoundParameters["ProfileType"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } if ($null -ne $PSBoundParameters["AlternativeSecurityIds"]) { $params["AlternativeSecurityIds"] = $PSBoundParameters["AlternativeSecurityIds"] } - if ($null -ne $PSBoundParameters["DeviceOSType"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["DeviceOSType"] = $PSBoundParameters["DeviceOSType"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["IsCompliant"]) + if ($null -ne $PSBoundParameters["ProfileType"]) { - $params["IsCompliant"] = $PSBoundParameters["IsCompliant"] + $params["ProfileType"] = $PSBoundParameters["ProfileType"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["SystemLabels"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["SystemLabels"] = $PSBoundParameters["SystemLabels"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["DeviceTrustType"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DeviceTrustType"] = $PSBoundParameters["DeviceTrustType"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 index f9e0d3666b..d6c8781f46 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDirectorySetting.ps1 @@ -14,18 +14,38 @@ function New-EntraBetaDirectorySetting { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } if($null -ne $PSBoundParameters["DirectorySetting"]) { $TmpValue = $PSBoundParameters["DirectorySetting"] @@ -35,41 +55,21 @@ function New-EntraBetaDirectorySetting { } $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationVariable"]) { $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 index 6281860d12..2f67f52da8 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/New-EntraBetaDomain.ps1 @@ -6,86 +6,86 @@ function New-EntraBetaDomain { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SupportedServices, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsDefault, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $Name, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Name + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $SupportedServices ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["SupportedServices"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["IsDefault"]) { $params["IsDefault"] = $PSBoundParameters["IsDefault"] } - if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) - { - $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["Id"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { - $params["Id"] = $PSBoundParameters["Name"] + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["SupportedServices"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 index 8d50f9ba69..f401ee2933 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaAdministrativeUnit { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 index 052722d9cf..68d6f42501 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.ps1 @@ -5,73 +5,73 @@ function Remove-EntraBetaAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $MemberId + [System.String] $MemberId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) - { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["MemberId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["MemberId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 index 122f7ee791..6ff11aa7c9 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaContact.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaContact { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OrgContactId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OrgContactId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OrgContactId"] = $PSBoundParameters["OrgContactId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 index 04cd2a6d32..e96ec6e418 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDevice.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDevice { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 index d9bd95fd77..dcb2ea8874 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaDeviceRegisteredOwner { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 index b6ed99f7dd..d83e587a40 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaDeviceRegisteredUser { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DeviceId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DeviceId"] = $PSBoundParameters["DeviceId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DeviceId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DeviceId"] = $PSBoundParameters["DeviceId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["DirectoryObjectId"] = $PSBoundParameters["UserId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 index c73617d23a..6f07d292f7 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.ps1 @@ -5,73 +5,73 @@ function Remove-EntraBetaDirectoryRoleMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $DirectoryRoleId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $MemberId + [System.String] $MemberId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $DirectoryRoleId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["DirectoryRoleId"]) - { - $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["MemberId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["DirectoryRoleId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["DirectoryRoleId"] = $PSBoundParameters["DirectoryRoleId"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["MemberId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 index abf94d1d3e..223ad8fb2f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDirectorySetting { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["DirectorySettingId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["DirectorySettingId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 index f516c57792..95ff9d4040 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaDomain.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDomain { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 index cb1656c3a4..201ec230cc 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.ps1 @@ -5,73 +5,73 @@ function Remove-EntraBetaScopedRoleMembership { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ScopedRoleMembershipId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId + [System.String] $AdministrativeUnitId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ScopedRoleMembershipId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ScopedRoleMembershipId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ScopedRoleMembershipId"] = $PSBoundParameters["ScopedRoleMembershipId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 deleted file mode 100644 index f3f28d626d..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.ps1 +++ /dev/null @@ -1,50 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Restore-EntraBetaDeletedDirectoryObject { - [CmdletBinding(DefaultParameterSetName = '')] - param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $AutoReconcileProxyConflict - ) - - PROCESS { - $params = @{} - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $params["Uri"] = 'https://graph.microsoft.com/beta/directory/deletedItems/' - $params["Method"] = "POST" - if($null -ne $PSBoundParameters["Id"]) - { - $params["Uri"] += $Id+"/microsoft.graph.restore" - } - if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) - { - $params["Body"] = @{ - autoReconcileProxyConflict = $true - } - } - - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug - Write-Debug("=========================================================================`n") - - $response = Invoke-GraphRequest @params -Headers $customHeaders - if($response){ - $userList = @() - foreach ($data in $response) { - $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject - $data.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name - $propertyValue = $_.Value - $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force - } - $userList += $userType - } - $userList - } - } -}# ------------------------------------------------------------------------------ - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 index 73db49fc25..6994dad1c6 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.ps1 @@ -7,106 +7,106 @@ function Set-EntraBetaAdministrativeUnit { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRuleProcessingState, - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId, + [System.String] $MembershipRule, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipType, + [System.Nullable`1[System.Boolean]] $IsMemberManagementRestricted, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRule, + [System.String] $MembershipRuleProcessingState, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $MembershipType ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) + if ($null -ne $PSBoundParameters["MembershipRule"]) { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["IsMemberManagementRestricted"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["IsMemberManagementRestricted"] = $PSBoundParameters["IsMemberManagementRestricted"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["MembershipType"]) + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) { - $params["MembershipType"] = $PSBoundParameters["MembershipType"] + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] } - if ($null -ne $PSBoundParameters["MembershipRule"]) + if ($null -ne $PSBoundParameters["AdministrativeUnitId"]) { - $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["MembershipType"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["MembershipType"] = $PSBoundParameters["MembershipType"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 index 27d9f1d8d6..cc6a19904a 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.ps1 @@ -6,86 +6,86 @@ function Set-EntraBetaCustomSecurityAttributeDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $UsePreDefinedValuesOnly, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.String] $Status, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Status + [System.String] $Description, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["Status"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Status"] = $PSBoundParameters["Status"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["UsePreDefinedValuesOnly"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["UsePreDefinedValuesOnly"] = $PSBoundParameters["UsePreDefinedValuesOnly"] + $params["Description"] = $PSBoundParameters["Description"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Status"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["Status"] = $PSBoundParameters["Status"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 index ac204cb020..82e5f26dae 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -20,65 +20,65 @@ function Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["IsActive"]) { $params["IsActive"] = $PSBoundParameters["IsActive"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["AllowedValueId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] + $params["AllowedValueId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["CustomSecurityAttributeDefinitionId"]) + { + $params["CustomSecurityAttributeDefinitionId"] = $PSBoundParameters["CustomSecurityAttributeDefinitionId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 index cb7c68f49b..f325baef3b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirectorySetting.ps1 @@ -17,14 +17,38 @@ function Set-EntraBetaDirectorySetting { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } if($null -ne $PSBoundParameters["DirectorySetting"]) { $TmpValue = $PSBoundParameters["DirectorySetting"] @@ -34,49 +58,25 @@ function Set-EntraBetaDirectorySetting { } $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["Id"]) { $params["DirectorySettingId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 index 7042554c30..adc36b558d 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDomain.ps1 @@ -6,86 +6,86 @@ function Set-EntraBetaDomain { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsDefault, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Name, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $SupportedServices, + [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefault, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsDefaultForCloudRedirections + [System.Collections.Generic.List`1[System.String]] $SupportedServices ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Name"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DomainId"] = $PSBoundParameters["Name"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["SupportedServices"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["IsDefault"]) { $params["IsDefault"] = $PSBoundParameters["IsDefault"] } - if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) - { - $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["Name"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DomainId"] = $PSBoundParameters["Name"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IsDefaultForCloudRedirections"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IsDefaultForCloudRedirections"] = $PSBoundParameters["IsDefaultForCloudRedirections"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["SupportedServices"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["SupportedServices"] = $PSBoundParameters["SupportedServices"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 index ddf10871fb..3501007026 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaTenantDetail.ps1 @@ -6,9 +6,6 @@ function Set-EntraBetaTenantDetail { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $SecurityComplianceNotificationMails, @@ -19,7 +16,10 @@ function Set-EntraBetaTenantDetail { [System.Collections.Generic.List`1[System.String]] $MarketingNotificationEmails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile + [Microsoft.Open.AzureAD.Model.PrivacyProfile] $PrivacyProfile, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $TechnicalNotificationMails ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 2627eeaa40..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,69 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedResource -Value Get-EntraBetaPrivilegedResource -Scope Global -Force - Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleSetting -Value Get-EntraBetaPrivilegedRoleSetting -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRole -Value Get-EntraBetaPrivilegedRole -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleDefinition -Value Get-EntraBetaPrivilegedRoleDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADMSPrivilegedRoleSetting -Value Set-EntraBetaPrivilegedRoleSetting -Scope Global -Force - Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADMSPrivilegedRoleAssignmentRequest -Value Set-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force - Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADPrivilegedRoleAssignment -Value New-EntraBetaPrivilegedRoleAssignment -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-EntraBetaRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-EntraBetaRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name New-EntraBetaRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Set-EntraBetaRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-EntraBetaRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Remove-EntraBetaRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name New-EntraBetaRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 index 606d17909b..eca29322da 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaDirectoryRoleAssignment.ps1 @@ -28,22 +28,18 @@ function Get-EntraBetaDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if ($null -ne $PSBoundParameters["SearchString"]) { $params["SearchString"] = $PSBoundParameters["SearchString"] } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] @@ -53,6 +49,26 @@ function Get-EntraBetaDirectoryRoleAssignment { $Value = $TmpValue $params["Filter"] = $Value } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } if($null -ne $PSBoundParameters["All"]) { if($PSBoundParameters["All"]) @@ -60,45 +76,29 @@ function Get-EntraBetaDirectoryRoleAssignment { $params["All"] = $PSBoundParameters["All"] } } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) { $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 index 8b401bb497..e6e33bc3c1 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedResource.ps1 @@ -25,21 +25,13 @@ function Get-EntraBetaPrivilegedResource { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{ProviderId = "PrivilegedAccessId"} - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -50,45 +42,53 @@ function Get-EntraBetaPrivilegedResource { $Value = $TmpValue $params["Filter"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["GovernanceResourceId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProviderId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["GovernanceResourceId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ProviderId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 index e832202939..0fa88c128b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRole.ps1 @@ -19,21 +19,13 @@ function Get-EntraBetaPrivilegedRole { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -44,41 +36,49 @@ function Get-EntraBetaPrivilegedRole { $Value = $TmpValue $params["Filter"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PrivilegedRoleId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PrivilegedRoleId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 index f778e45cb6..dc7399bc67 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleAssignmentRequest.ps1 @@ -25,21 +25,13 @@ function Get-EntraBetaPrivilegedRoleAssignmentRequest { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -50,45 +42,53 @@ function Get-EntraBetaPrivilegedRoleAssignmentRequest { $Value = $TmpValue $params["Filter"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProviderId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ProviderId"] = $PSBoundParameters["ProviderId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ProviderId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["ProviderId"] = $PSBoundParameters["ProviderId"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 index eb1c2ac880..818c47f632 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.ps1 @@ -9,9 +9,6 @@ function Get-EntraBetaPrivilegedRoleDefinition { [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ResourceId, - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, @@ -20,6 +17,9 @@ function Get-EntraBetaPrivilegedRoleDefinition { [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ResourceId, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -27,22 +27,14 @@ function Get-EntraBetaPrivilegedRoleDefinition { PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $keysChanged = @{ResourceId = "GovernanceResourceId"; ProviderId = "PrivilegedAccessId"} - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + $keysChanged = @{ProviderId = "PrivilegedAccessId"; ResourceId = "GovernanceResourceId"} + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } if($null -ne $PSBoundParameters["Filter"]) { @@ -53,54 +45,62 @@ function Get-EntraBetaPrivilegedRoleDefinition { $Value = $TmpValue $params["Filter"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["GovernanceResourceId"] = $PSBoundParameters["ResourceId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["GovernanceRoleDefinitionId"] = $PSBoundParameters["Id"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ProviderId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["GovernanceRoleDefinitionId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["ProviderId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { $params["Top"] = $PSBoundParameters["Top"] } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["GovernanceResourceId"] = $PSBoundParameters["ResourceId"] + } if($null -ne $PSBoundParameters["Property"]) { $params["Property"] = $PSBoundParameters["Property"] diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 index 45b2c917d9..ab513a8e90 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleAssignment.ps1 @@ -7,78 +7,78 @@ function New-EntraBetaDirectoryRoleAssignment { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PrincipalId, + [System.String] $RoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $RoleDefinitionId, + [System.String] $DirectoryScopeId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DirectoryScopeId + [System.String] $PrincipalId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["DirectoryScopeId"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["DirectoryScopeId"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["DirectoryScopeId"] = $PSBoundParameters["DirectoryScopeId"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 index fa8096dec4..71643ff73e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaDirectoryRoleDefinition.ps1 @@ -6,20 +6,11 @@ function New-EntraBetaDirectoryRoleDefinition { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TemplateId, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Version, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition]] $InheritsPermissionsFrom, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + [System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $ResourceScopes, @@ -27,99 +18,108 @@ function New-EntraBetaDirectoryRoleDefinition { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $TemplateId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsEnabled + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition]] $InheritsPermissionsFrom ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["TemplateId"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["TemplateId"] = $PSBoundParameters["TemplateId"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } if ($null -ne $PSBoundParameters["Version"]) { $params["Version"] = $PSBoundParameters["Version"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InheritsPermissionsFrom"] = $PSBoundParameters["InheritsPermissionsFrom"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ResourceScopes"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } - if($null -ne $PSBoundParameters["RolePermissions"]) + if ($null -ne $PSBoundParameters["Description"]) { - $TmpValue = $PSBoundParameters["RolePermissions"] - $Temp = @{ - allowedResourceActions = $TmpValue.allowedResourceActions - condition = $TmpValue.condition - } - $Value = $Temp - $params["RolePermissions"] = $Value + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ResourceScopes"]) + if ($null -ne $PSBoundParameters["TemplateId"]) { - $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] + $params["TemplateId"] = $PSBoundParameters["TemplateId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($null -ne $PSBoundParameters["RolePermissions"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $TmpValue = $PSBoundParameters["RolePermissions"] + $Temp = @{ + allowedResourceActions = $TmpValue.allowedResourceActions + condition = $TmpValue.condition + } + $Value = $Temp + $params["RolePermissions"] = $Value } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InheritsPermissionsFrom"] = $PSBoundParameters["InheritsPermissionsFrom"] } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 index 52b1c0e069..ad25093c95 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/New-EntraBetaPrivilegedRoleAssignment.ps1 @@ -6,17 +6,17 @@ function New-EntraBetaPrivilegedRoleAssignment { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $RoleId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.DateTime]] $ExpirationDateTime, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsElevated, + [System.String] $ResultMessage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResultMessage, + [System.Nullable`1[System.Boolean]] $IsElevated, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $RoleId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Id, @@ -29,77 +29,77 @@ function New-EntraBetaPrivilegedRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["RoleId"]) + if ($null -ne $PSBoundParameters["ExpirationDateTime"]) { - $params["RoleId"] = $PSBoundParameters["RoleId"] + $params["ExpirationDateTime"] = $PSBoundParameters["ExpirationDateTime"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ExpirationDateTime"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ExpirationDateTime"] = $PSBoundParameters["ExpirationDateTime"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["IsElevated"]) + if ($null -ne $PSBoundParameters["ResultMessage"]) { - $params["IsElevated"] = $PSBoundParameters["IsElevated"] + $params["ResultMessage"] = $PSBoundParameters["ResultMessage"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["IsElevated"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["IsElevated"] = $PSBoundParameters["IsElevated"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ResultMessage"]) + if ($null -ne $PSBoundParameters["RoleId"]) { - $params["ResultMessage"] = $PSBoundParameters["ResultMessage"] + $params["RoleId"] = $PSBoundParameters["RoleId"] } if ($null -ne $PSBoundParameters["Id"]) { $params["Id"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["UserId"] = $PSBoundParameters["UserId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 index da5e311cd6..0841c83b9b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDirectoryRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["UnifiedRoleAssignmentId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["UnifiedRoleAssignmentId"] = $PSBoundParameters["UnifiedRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 index 6e455a0dfa..258729e9c2 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaDirectoryRoleDefinition { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 index 8a317fee83..c105dfccd5 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaDirectoryRoleDefinition.ps1 @@ -7,72 +7,92 @@ function Set-EntraBetaDirectoryRoleDefinition { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TemplateId, + [System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Version, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[System.String]] $ResourceScopes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition]] $InheritsPermissionsFrom, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, + [System.String] $TemplateId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ResourceScopes, + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.RolePermission]] $RolePermissions, [Alias('Id')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UnifiedRoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsEnabled + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.DirectoryRoleDefinition]] $InheritsPermissionsFrom ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if ($null -ne $PSBoundParameters["IsEnabled"]) + { + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + } + if ($null -ne $PSBoundParameters["Version"]) + { + $params["Version"] = $PSBoundParameters["Version"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["TemplateId"]) + if ($null -ne $PSBoundParameters["ResourceScopes"]) { - $params["TemplateId"] = $PSBoundParameters["TemplateId"] + $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] } - if ($null -ne $PSBoundParameters["Version"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Version"] = $PSBoundParameters["Version"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["TemplateId"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["TemplateId"] = $PSBoundParameters["TemplateId"] } if ($null -ne $PSBoundParameters["DisplayName"]) { $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) - { - $params["InheritsPermissionsFrom"] = $PSBoundParameters["InheritsPermissionsFrom"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } if($null -ne $PSBoundParameters["RolePermissions"]) { @@ -88,49 +108,29 @@ function Set-EntraBetaDirectoryRoleDefinition { } $params["RolePermissions"] = $Value } - if ($null -ne $PSBoundParameters["ResourceScopes"]) - { - $params["ResourceScopes"] = $PSBoundParameters["ResourceScopes"] - } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["UnifiedRoleDefinitionId"]) { $params["UnifiedRoleDefinitionId"] = $PSBoundParameters["UnifiedRoleDefinitionId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["InheritsPermissionsFrom"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["InheritsPermissionsFrom"] = $PSBoundParameters["InheritsPermissionsFrom"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["IsEnabled"]) - { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 index c5793d0bf5..11c9f95fac 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.ps1 @@ -6,6 +6,12 @@ function Set-EntraBetaPrivilegedRoleAssignmentRequest { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AssignmentState, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Decision, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Reason, @@ -16,90 +22,84 @@ function Set-EntraBetaPrivilegedRoleAssignmentRequest { [System.String] $ProviderId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AssignmentState, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule] $Schedule, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Decision + [Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule] $Schedule ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["Reason"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Reason"] = $PSBoundParameters["Reason"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["AssignmentState"]) { - $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] + $params["AssignmentState"] = $PSBoundParameters["AssignmentState"] } - if ($null -ne $PSBoundParameters["ProviderId"]) + if ($null -ne $PSBoundParameters["Decision"]) { - $params["ProviderId"] = $PSBoundParameters["ProviderId"] + $params["Decision"] = $PSBoundParameters["Decision"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] + } + if ($null -ne $PSBoundParameters["Reason"]) + { + $params["Reason"] = $PSBoundParameters["Reason"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PrivilegedRoleAssignmentRequestId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["AssignmentState"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["AssignmentState"] = $PSBoundParameters["AssignmentState"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Schedule"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Schedule"] = $PSBoundParameters["Schedule"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["ProviderId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["ProviderId"] = $PSBoundParameters["ProviderId"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["Decision"]) - { - $params["Decision"] = $PSBoundParameters["Decision"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Schedule"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["Schedule"] = $PSBoundParameters["Schedule"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 index 9952db65cc..be7da8b1b7 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Governance/Set-EntraBetaPrivilegedRoleSetting.ps1 @@ -7,37 +7,37 @@ function Set-EntraBetaPrivilegedRoleSetting { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $AdminMemberSettings, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserEligibleSettings, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserMemberSettings, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $RoleDefinitionId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResourceId, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $AdminMemberSettings, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ProviderId, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserMemberSettings, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $AdminEligibleSettings, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $ProviderId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedRuleSetting]] $UserEligibleSettings + [System.String] $ResourceId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["AdminMemberSettings"]) + if($null -ne $PSBoundParameters["UserEligibleSettings"]) { - $TmpValue = $PSBoundParameters["AdminMemberSettings"] + $TmpValue = $PSBoundParameters["UserEligibleSettings"] $a = @() foreach($setting in $TmpValue) { $Temp = $setting | ConvertTo-Json @@ -45,55 +45,35 @@ function Set-EntraBetaPrivilegedRoleSetting { } $Value = $a - $params["AdminMemberSettings"] = $Value - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["UserEligibleSettings"] = $Value } - if ($null -ne $PSBoundParameters["RoleDefinitionId"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($PSBoundParameters.ContainsKey("Debug")) { $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ResourceId"]) - { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] - } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["GovernanceRoleSettingId"] = $PSBoundParameters["Id"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProviderId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($null -ne $PSBoundParameters["UserMemberSettings"]) { @@ -107,21 +87,17 @@ function Set-EntraBetaPrivilegedRoleSetting { $Value = $a $params["UserMemberSettings"] = $Value } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["RoleDefinitionId"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["RoleDefinitionId"] = $PSBoundParameters["RoleDefinitionId"] } - if($null -ne $PSBoundParameters["AdminEligibleSettings"]) + if($null -ne $PSBoundParameters["AdminMemberSettings"]) { - $TmpValue = $PSBoundParameters["AdminEligibleSettings"] + $TmpValue = $PSBoundParameters["AdminMemberSettings"] $a = @() foreach($setting in $TmpValue) { $Temp = $setting | ConvertTo-Json @@ -129,15 +105,23 @@ function Set-EntraBetaPrivilegedRoleSetting { } $Value = $a - $params["AdminEligibleSettings"] = $Value + $params["AdminMemberSettings"] = $Value } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["GovernanceRoleSettingId"] = $PSBoundParameters["Id"] } - if($null -ne $PSBoundParameters["UserEligibleSettings"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $TmpValue = $PSBoundParameters["UserEligibleSettings"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if($null -ne $PSBoundParameters["AdminEligibleSettings"]) + { + $TmpValue = $PSBoundParameters["AdminEligibleSettings"] $a = @() foreach($setting in $TmpValue) { $Temp = $setting | ConvertTo-Json @@ -145,7 +129,23 @@ function Set-EntraBetaPrivilegedRoleSetting { } $Value = $a - $params["UserEligibleSettings"] = $Value + $params["AdminEligibleSettings"] = $Value + } + if ($null -ne $PSBoundParameters["ProviderId"]) + { + $params["PrivilegedAccessId"] = $PSBoundParameters["ProviderId"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 index de42e5703a..7dd1207df0 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupMember.ps1 @@ -5,73 +5,73 @@ function Add-EntraBetaGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["RefObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 index a8c3d034f2..c5e392d8b0 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaGroupOwner.ps1 @@ -5,75 +5,75 @@ function Add-EntraBetaGroupOwner { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/beta/users/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 index 55ad0afc18..ede9b5b9c0 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Add-EntraBetaLifecyclePolicyGroup.ps1 @@ -5,73 +5,73 @@ function Add-EntraBetaLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupLifecyclePolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $GroupId + [System.String] $GroupId, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index b273032bb4..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,78 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraBetaObjectByObjectId -Scope Global -Force - Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name New-AzureADObjectSetting -Value New-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraBetaLifeCycleGroup -Scope Global -Force - Set-Alias -Name New-AzureADMSGroup -Value New-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Set-AzureADObjectSetting -Value Set-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADGroup -Value Get-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraBetaDeletedGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraBetaGroupPermissionGrant -Scope Global -Force - Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraBetaLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraBetaGroupIdsGroupIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Get-AzureADObjectSetting -Value Get-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraBetaLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraBetaGroupIdsContactIsMemberOf -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraBetaGroupIdsUserIsMemberOf -Scope Global -Force - Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADObjectSetting -Value Remove-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraBetaGroup -Scope Global -Force - Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraBetaLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 index 75c593e57d..d87ae96cc1 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroup.ps1 @@ -5,15 +5,15 @@ function Get-EntraBetaGroup { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias('ObjectId')] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $SearchString, [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, + [Alias('ObjectId')] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, @@ -27,22 +27,10 @@ function Get-EntraBetaGroup { PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $keysChanged = @{ObjectId = "Id"; SearchString = "Filter"} - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + $keysChanged = @{SearchString = "Filter"; ObjectId = "Id"} + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["SearchString"]) { @@ -50,6 +38,10 @@ function Get-EntraBetaGroup { $Value = "mailNickName eq '$TmpValue' or (mail eq '$TmpValue' or (displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')))" $params["Filter"] = $Value } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] @@ -59,48 +51,56 @@ function Get-EntraBetaGroup { $Value = $TmpValue $params["Filter"] = $Value } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if($null -ne $PSBoundParameters["All"]) + { + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 index e62cdc813d..9300c2131d 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupAppRoleAssignment.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaGroupAppRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 index abc5dae833..c253b6ac7d 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupLifecyclePolicy.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 index b26ba7b98c..e435c1010f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaGroupPermissionGrant.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaGroupPermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 index 2250039237..498bb21a54 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaLifecyclePolicyGroup.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaLifecyclePolicyGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 index 9158a76572..790b4f440b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 @@ -6,11 +6,11 @@ function Get-EntraBetaObjectByObjectId { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Types, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.Collections.Generic.List`1[System.String]] $ObjectIds, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Types, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 index cfe1ed1630..4498481466 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectSetting.ps1 @@ -6,6 +6,9 @@ function Get-EntraBetaObjectSetting { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $TargetType, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, @@ -15,9 +18,6 @@ function Get-EntraBetaObjectSetting { [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $TargetObjectId, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetType, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Nullable`1[System.Int32]] $Top, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroup.ps1 index 7996cd0be7..d001819771 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroup.ps1 @@ -9,35 +9,35 @@ function New-EntraBetaGroup { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $GroupTypes, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $MailEnabled, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRuleProcessingState, + [System.String] $Visibility, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRule, + [System.String] $Description, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $LabelId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Visibility, + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $MailNickname, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + [System.String] $MembershipRule, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $MailEnabled, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $LabelId, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $SecurityEnabled + [System.String] $MailNickname, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $MembershipRuleProcessingState ) PROCESS { @@ -48,93 +48,93 @@ function New-EntraBetaGroup { { $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } - if ($null -ne $PSBoundParameters["MailEnabled"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["Visibility"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["Visibility"] = $PSBoundParameters["Visibility"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + if ($null -ne $PSBoundParameters["Description"]) { - $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["MembershipRule"]) + if ($null -ne $PSBoundParameters["LabelId"]) { - $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + $params["LabelId"] = $PSBoundParameters["LabelId"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } - if ($null -ne $PSBoundParameters["Visibility"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["Visibility"] = $PSBoundParameters["Visibility"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["MailNickname"]) + if ($null -ne $PSBoundParameters["MembershipRule"]) { - $params["MailNickname"] = $PSBoundParameters["MailNickname"] + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["MailEnabled"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } - if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + if ($null -ne $PSBoundParameters["SecurityEnabled"]) { - $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["MailNickname"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["MailNickname"] = $PSBoundParameters["MailNickname"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["LabelId"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["LabelId"] = $PSBoundParameters["LabelId"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["SecurityEnabled"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 index 467d7ab489..829826ff5f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupAppRoleAssignment.ps1 @@ -8,60 +8,52 @@ function New-EntraBetaGroupAppRoleAssignment { [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $GroupId, + [Alias('Id')] + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $AppRoleId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId, - [Alias('Id')] - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $AppRoleId + [System.String] $ResourceId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -71,21 +63,29 @@ function New-EntraBetaGroupAppRoleAssignment { { $params["AppRoleId"] = $PSBoundParameters["AppRoleId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 index f7e609a168..d185cff869 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaGroupLifecyclePolicy.ps1 @@ -20,65 +20,65 @@ function New-EntraBetaGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 index 2b380b0a7c..252df64407 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/New-EntraBetaObjectSetting.ps1 @@ -7,13 +7,13 @@ function New-EntraBetaObjectSetting { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, + [System.String] $TargetType, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetObjectId, + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetType + [System.String] $TargetObjectId ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 index c5a57717eb..84d872639f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroup.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 index 59dcb6621c..c2005280ff 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.ps1 @@ -5,73 +5,73 @@ function Remove-EntraBetaGroupAppRoleAssignment { [CmdletBinding(DefaultParameterSetName = '')] param ( - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AppRoleAssignmentId, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId + [System.String] $GroupId, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) - { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 index e5174ec9e0..01c3e509eb 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaGroupLifecyclePolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 index a690e7abd3..c5339f0263 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupMember.ps1 @@ -5,73 +5,73 @@ function Remove-EntraBetaGroupMember { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $MemberId + [System.String] $MemberId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["GroupId"]) - { - $params["GroupId"] = $PSBoundParameters["GroupId"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["MemberId"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["MemberId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["MemberId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 index aa8e51c255..475735d045 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaGroupOwner.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaGroupOwner { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OwnerId"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["OwnerId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["OwnerId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 index 93bfa9e816..dc6b4b29c7 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.ps1 @@ -5,73 +5,73 @@ function Remove-EntraBetaLifecyclePolicyGroup { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupLifecyclePolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $GroupId + [System.String] $GroupId, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupLifecyclePolicyId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 index e8bda6bc71..9599307651 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Remove-EntraBetaObjectSetting.ps1 @@ -7,13 +7,13 @@ function Remove-EntraBetaObjectSetting { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $TargetType, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetObjectId, + [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetType + [System.String] $TargetObjectId ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 index c4e513204b..f34d614212 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Reset-EntraBetaLifeCycleGroup.ps1 @@ -14,57 +14,57 @@ function Reset-EntraBetaLifeCycleGroup { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 index d32e86c149..5269c4799f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraBetaGroupIdsContactIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 index 1ef06b33d7..4cbf3f8e33 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraBetaGroupIdsGroupIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 index 4752e61865..56903e8d32 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.ps1 @@ -7,10 +7,10 @@ function Select-EntraBetaGroupIdsUserIsMemberOf { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [Microsoft.Open.AzureAD.Model.GroupIdsForMembershipCheck] $GroupIdsForMembershipCheck ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 index bc56ef2667..de51529d7b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroup.ps1 @@ -10,37 +10,37 @@ function Set-EntraBetaGroup { [System.Collections.Generic.List`1[System.String]] $GroupTypes, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $MailEnabled, + [System.String] $Visibility, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Description, + + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $LabelId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MembershipRuleProcessingState, + [System.Nullable`1[System.Boolean]] $IsAssignableToRole, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Visibility, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $MembershipRule, - [Alias('Id')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $GroupId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickname, + [System.Nullable`1[System.Boolean]] $MailEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsAssignableToRole, + [System.Nullable`1[System.Boolean]] $SecurityEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, - - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $LabelId, + [System.String] $MailNickname, + [Alias('Id')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $GroupId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $SecurityEnabled + [System.String] $MembershipRuleProcessingState ) PROCESS { @@ -51,97 +51,97 @@ function Set-EntraBetaGroup { { $params["GroupTypes"] = $PSBoundParameters["GroupTypes"] } - if ($null -ne $PSBoundParameters["MailEnabled"]) - { - $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["Visibility"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Visibility"] = $PSBoundParameters["Visibility"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Visibility"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Visibility"] = $PSBoundParameters["Visibility"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["MembershipRule"]) + if ($null -ne $PSBoundParameters["LabelId"]) { - $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] + $params["LabelId"] = $PSBoundParameters["LabelId"] } - if ($null -ne $PSBoundParameters["GroupId"]) + if ($null -ne $PSBoundParameters["IsAssignableToRole"]) { - $params["GroupId"] = $PSBoundParameters["GroupId"] + $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["MailNickname"]) + if ($null -ne $PSBoundParameters["MembershipRule"]) { - $params["MailNickname"] = $PSBoundParameters["MailNickname"] + $params["MembershipRule"] = $PSBoundParameters["MembershipRule"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["MailEnabled"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["MailEnabled"] = $PSBoundParameters["MailEnabled"] } - if ($null -ne $PSBoundParameters["IsAssignableToRole"]) + if ($null -ne $PSBoundParameters["SecurityEnabled"]) { - $params["IsAssignableToRole"] = $PSBoundParameters["IsAssignableToRole"] + $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["MailNickname"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["MailNickname"] = $PSBoundParameters["MailNickname"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["GroupId"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["GroupId"] = $PSBoundParameters["GroupId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["LabelId"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["LabelId"] = $PSBoundParameters["LabelId"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["SecurityEnabled"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["SecurityEnabled"] = $PSBoundParameters["SecurityEnabled"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["MembershipRuleProcessingState"]) + { + $params["MembershipRuleProcessingState"] = $PSBoundParameters["MembershipRuleProcessingState"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 index 6d80797ac8..4464f37310 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaGroupLifecyclePolicy.ps1 @@ -6,6 +6,9 @@ function Set-EntraBetaGroupLifecyclePolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $ManagedGroupTypes, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Int32]] $GroupLifetimeInDays, [Alias('Id')] @@ -13,79 +16,76 @@ function Set-EntraBetaGroupLifecyclePolicy { [System.String] $GroupLifecyclePolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AlternateNotificationEmails, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ManagedGroupTypes + [System.String] $AlternateNotificationEmails ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["OutVariable"]) { $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] } if ($null -ne $PSBoundParameters["GroupLifetimeInDays"]) { $params["GroupLifetimeInDays"] = $PSBoundParameters["GroupLifetimeInDays"] } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } if ($null -ne $PSBoundParameters["GroupLifecyclePolicyId"]) { $params["GroupLifecyclePolicyId"] = $PSBoundParameters["GroupLifecyclePolicyId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } if ($null -ne $PSBoundParameters["AlternateNotificationEmails"]) { $params["AlternateNotificationEmails"] = $PSBoundParameters["AlternateNotificationEmails"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["ManagedGroupTypes"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ManagedGroupTypes"] = $PSBoundParameters["ManagedGroupTypes"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 index 6eafa64ead..2d1374b4ae 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Groups/Set-EntraBetaObjectSetting.ps1 @@ -7,16 +7,16 @@ function Set-EntraBetaObjectSetting { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, + [System.String] $TargetType, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [Microsoft.Open.MSGraph.Model.DirectorySetting] $DirectorySetting, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetObjectId, + [System.String] $Id, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TargetType + [System.String] $TargetObjectId ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 4e0632b31c..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,47 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 index 5ad5958614..a81a2a0725 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.ps1 @@ -4,9 +4,22 @@ # ------------------------------------------------------------------------------ function Enable-EntraBetaGlobalSecureAccessTenant { PROCESS { - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $response = Invoke-GraphRequest -Method POST -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/networkAccess/microsoft.graph.networkaccess.onboard" - $response + try { + # Create custom headers for the request + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + # Invoke the API request to enable global secure access tenant + $response = Invoke-GraphRequest -Method POST -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/networkAccess/microsoft.graph.networkaccess.onboard" + + # Check the response and provide feedback + if ($response) { + Write-Output "Global Secure Access Tenant has been successfully enabled." + } else { + Write-Error "Failed to enable Global Secure Access Tenant." + } + } catch { + Write-Error "An error occurred while enabling the Global Secure Access Tenant: $_" + } } }# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 index c3e847035b..a8bebf723c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.ps1 @@ -3,10 +3,23 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Get-EntraBetaGlobalSecureAccessTenantStatus { - PROCESS { - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/networkAccess/tenantStatus" - $response - } + PROCESS { + try { + # Create custom headers for the request + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + # Invoke the API request to get the tenant status + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/networkAccess/tenantStatus" + + # Check the response and provide feedback + if ($response) { + Write-Output $response + } else { + Write-Error "Failed to retrieve the Global Secure Access Tenant status." + } + } catch { + Write-Error "An error occurred while retrieving the Global Secure Access Tenant status: $_" + } + } }# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 index a3f6019e75..5b48d094d0 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.ps1 @@ -7,33 +7,42 @@ function Get-EntraBetaPrivateAccessApplication { [CmdletBinding(DefaultParameterSetName = 'AllPrivateAccessApps')] param ( [Alias("ObjectId")] - [Parameter(Mandatory = $True, Position = 1, ParameterSetName = 'SingleAppID')] - [string] + [Parameter(Mandatory = $True, ParameterSetName = 'SingleAppID')] + [System.String] $ApplicationId, [Parameter(Mandatory = $False, ParameterSetName = 'SingleAppName')] - [string] + [System.String] $ApplicationName ) PROCESS { - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + try { + # Create custom headers for the request + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - switch ($PSCmdlet.ParameterSetName) { - "AllPrivateAccessApps" { - $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri 'https://graph.microsoft.com/beta/applications?$count=true&$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames&$filter=tags/Any(x: x eq ''PrivateAccessNonWebApplication'') or tags/Any(x: x eq ''NetworkAccessManagedApplication'') or tags/Any(x: x eq ''NetworkAccessQuickAccessApplication'')' - $response.value - break - } - "SingleAppID" { - Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/?`$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames" - break - } - "SingleAppName" { - $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications?`$count=true&`$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames&`$filter=DisplayName eq '$ApplicationName'" - $response.value - break + switch ($PSCmdlet.ParameterSetName) { + "AllPrivateAccessApps" { + # Retrieve all private access applications + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri 'https://graph.microsoft.com/beta/applications?$count=true&$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames&$filter=tags/Any(x: x eq ''PrivateAccessNonWebApplication'') or tags/Any(x: x eq ''NetworkAccessManagedApplication'') or tags/Any(x: x eq ''NetworkAccessQuickAccessApplication'')' + $response.value + break + } + "SingleAppID" { + # Retrieve a single application by ID + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/?`$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames" + $response + break + } + "SingleAppName" { + # Retrieve a single application by name + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications?`$count=true&`$select=displayName,appId,id,tags,createdDateTime,servicePrincipalType,createdDateTime,servicePrincipalNames&`$filter=DisplayName eq '$ApplicationName'" + $response.value + break + } } + } catch { + Write-Error "Failed to retrieve the application(s): $_" } } }# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 index 0995adc371..f8abcbb7c4 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -4,30 +4,40 @@ # ------------------------------------------------------------------------------ function Get-EntraBetaPrivateAccessApplicationSegment { - [CmdletBinding(DefaultParameterSetName = 'AllApplicationSegments')] - param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $True, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [string] - $ApplicationId, - [Parameter(Mandatory = $False, Position = 2, ParameterSetName = 'SingleApplicationSegment')] - [string] - $ApplicationSegmentId - ) + [CmdletBinding(DefaultParameterSetName = 'AllApplicationSegments')] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $True, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] + $ApplicationId, + + [Parameter(Mandatory = $False, ParameterSetName = 'SingleApplicationSegment')] + [System.String] + $ApplicationSegmentId + ) PROCESS { - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - switch ($PSCmdlet.ParameterSetName) { - "AllApplicationSegments" { - $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments" - $response.value - break - } - "SingleApplicationSegment" { - Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" - break - } - } + try { + # Create custom headers for the request + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + switch ($PSCmdlet.ParameterSetName) { + "AllApplicationSegments" { + # Retrieve all application segments + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments" + $response.value + break + } + "SingleApplicationSegment" { + # Retrieve a single application segment + $response = Invoke-GraphRequest -Method GET -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" + $response + break + } + } + } catch { + Write-Error "Failed to retrieve the application segment(s): $_" + } } }# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 index 94f7c5211d..c03577f8e4 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.ps1 @@ -6,60 +6,65 @@ function New-EntraBetaPrivateAccessApplication { [CmdletBinding(DefaultParameterSetName = 'AllPrivateAccessApps')] param ( - [Parameter(Mandatory = $True, Position = 1)] - [string] + [Parameter(Mandatory = $True)] + [System.String] $ApplicationName, - [Parameter(Mandatory = $False, Position = 2)] - [string] + [Parameter(Mandatory = $False)] + [System.String] $ConnectorGroupId ) PROCESS { - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - - $bodyJson = @{ displayName = $ApplicationName } | ConvertTo-Json -Depth 99 -Compress - - # Instantiate the Private Access app try { - $newApp = Invoke-GraphRequest -Method POST -Headers $customHeaders -Uri 'https://graph.microsoft.com/beta/applicationTemplates/8adf8e6e-67b2-4cf2-a259-e3dc5476c621/instantiate' -Body $bodyJson - } - catch { - Write-Error "Failed to create the Private Access app. Error: $_" - return - } - - $bodyJson = @{ - "onPremisesPublishing" = @{ - "applicationType" = "nonwebapp" - "isAccessibleViaZTNAClient" = $true - } - } | ConvertTo-Json -Depth 99 -Compress + # Create custom headers for the request + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $newAppId = $newApp.application.objectId - - # Set the Private Access app to be accessible via the ZTNA client - $params = @{ - Method = 'PATCH' - Uri = "https://graph.microsoft.com/beta/applications/$newAppId/" - Body = $bodyJson - } + # Prepare the request body for instantiating the Private Access app + $bodyJson = @{ displayName = $ApplicationName } | ConvertTo-Json -Depth 99 -Compress - Invoke-GraphRequest @params + # Instantiate the Private Access app + $newApp = Invoke-GraphRequest -Method POST -Headers $customHeaders -Uri 'https://graph.microsoft.com/beta/applicationTemplates/8adf8e6e-67b2-4cf2-a259-e3dc5476c621/instantiate' -Body $bodyJson - # If ConnectorGroupId has been specified, assign the connector group to the app, otherwise the default connector group will be assigned. - if ($ConnectorGroupId) { + # Prepare the request body for setting the app to be accessible via the ZTNA client $bodyJson = @{ - "@odata.id" = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationproxy/connectorGroups/$ConnectorGroupId" + "onPremisesPublishing" = @{ + "applicationType" = "nonwebapp" + "isAccessibleViaZTNAClient" = $true + } } | ConvertTo-Json -Depth 99 -Compress - + + $newAppId = $newApp.application.objectId + + # Set the Private Access app to be accessible via the ZTNA client $params = @{ - Method = 'PUT' - Uri = "https://graph.microsoft.com/beta/applications/$newAppId/connectorGroup/`$ref" + Method = 'PATCH' + Uri = "https://graph.microsoft.com/beta/applications/$newAppId/" + Headers = $customHeaders Body = $bodyJson } - + Invoke-GraphRequest @params + + # If ConnectorGroupId has been specified, assign the connector group to the app + if ($ConnectorGroupId) { + $bodyJson = @{ + "@odata.id" = "https://graph.microsoft.com/beta/onPremisesPublishingProfiles/applicationproxy/connectorGroups/$ConnectorGroupId" + } | ConvertTo-Json -Depth 99 -Compress + + $params = @{ + Method = 'PUT' + Uri = "https://graph.microsoft.com/beta/applications/$newAppId/connectorGroup/`$ref" + Headers = $customHeaders + Body = $bodyJson + } + + Invoke-GraphRequest @params + } + + Write-Output "Private Access application '$ApplicationName' has been successfully created and configured." + } catch { + Write-Error "Failed to create the Private Access app. Error: $_" } } }# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 index 9f9221e09c..970a7f2e0f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -4,81 +4,85 @@ # ------------------------------------------------------------------------------ function New-EntraBetaPrivateAccessApplicationSegment { - [CmdletBinding()] - param ( + [CmdletBinding()] + param ( + [Alias('ObjectId')] + [Parameter(Mandatory = $True, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] + $ApplicationId, + + [Parameter(Mandatory = $True)] + [System.String] + $DestinationHost, + + [Parameter(Mandatory = $False)] + [System.String[]] + $Ports, + + [Parameter(Mandatory = $False)] + [ValidateSet("TCP", "UDP")] + [System.String[]] + $Protocol, - [Alias('ObjectId')] - [Parameter(Mandatory = $True, Position = 1, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [string] - $ApplicationId, - - [Parameter(Mandatory = $True)] - [string] - $DestinationHost, - - [Parameter(Mandatory = $False)] - [string[]] - $Ports, - - [Parameter(Mandatory = $False)] - [ValidateSet("TCP", "UDP")] - [string[]] - $Protocol, + [Parameter(Mandatory = $True)] + [ValidateSet("ipAddress", "dnsSuffix", "ipRangeCidr", "ipRange", "FQDN")] + [System.String] + $DestinationType + ) - [Parameter(Mandatory = $True)] - [ValidateSet("ipAddress", "dnsSuffix", "ipRangeCidr","ipRange","FQDN")] - [string] - $DestinationType - ) + PROCESS { + try { + # Create custom headers for the request + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $portRanges = @() - PROCESS { - - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $portRanges = @() + # Process port ranges + foreach ($port in $Ports) { + if (!$port.Contains("-")) { + $portRanges += "$port-$port" + } else { + $portRanges += $port + } + } - foreach ($port in $Ports){ - if (!$port.Contains("-")) { - $portRanges += $port + "-" + $port - } - else { - $portRanges += $port - } - } + # Build the request body based on the destination type + if ($DestinationType -eq "dnsSuffix") { + $body = @{ + destinationHost = $DestinationHost.ToLower() + destinationType = 'dnsSuffix' + } + } else { + switch ($DestinationType) { + "ipAddress" { $dstType = 'ip' } + "ipRange" { $dstType = 'ipRange' } + "fqdn" { $dstType = 'fqdn' } + "ipRangeCidr" { $dstType = 'ipRangeCidr' } + } + $body = @{ + destinationHost = $DestinationHost.ToLower() + protocol = $Protocol.ToLower() -join "," + ports = $portRanges + destinationType = $dstType + } + } - if ($DestinationType -eq "dnsSuffix") - { - $body = @{ - destinationHost = $DestinationHost.ToLower() - destinationType = 'dnsSuffix' - } - } - else - { - switch ($DestinationType) { - "ipAddress" { $dstType = 'ip' } - "ipRange" { $dstType = 'ipRange' } - "fqdn" { $dstType = 'fqdn' } - "ipRangeCidr" { $dstType = 'ipRangeCidr' } - } - $body = @{ - destinationHost = $DestinationHost.ToLower() - protocol = $Protocol.ToLower() -join "," - ports = $portRanges - destinationType = $dstType - } - } + # Convert the body to JSON + $bodyJson = $body | ConvertTo-Json -Depth 99 -Compress - $bodyJson = $body | ConvertTo-Json -Depth 99 -Compress + # Define the parameters for the API request + $params = @{ + Method = 'POST' + Uri = "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/" + Headers = $customHeaders + Body = $bodyJson + OutputType = 'PSObject' + } - $params = @{ - Method = 'POST' - Uri = "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/" - Headers = $customHeaders - Body = $bodyJson - OutputType = 'PSObject' - } - - Invoke-GraphRequest @params -} + # Invoke the API request + Invoke-GraphRequest @params + } catch { + Write-Error "Failed to create the application segment: $_" + } + } }# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 index 2c3e659f83..2b93d5e31d 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.ps1 @@ -4,63 +4,32 @@ # ------------------------------------------------------------------------------ function Remove-EntraBetaPrivateAccessApplicationSegment { - [CmdletBinding()] - param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $True, Position = 1)] - [string] - $ApplicationId, - [Parameter(Mandatory = $False, Position = 2)] - [string] - $ApplicationSegmentId - ) - - PROCESS { - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - Invoke-GraphRequest -Method DELETE -Headers $customHeaders -OutputType PSObject -Uri "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" - } -}function Restore-EntraBetaDeletedDirectoryObject { - [CmdletBinding(DefaultParameterSetName = '')] + [CmdletBinding()] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $AutoReconcileProxyConflict + [Alias('ObjectId')] + [Parameter(Mandatory = $True)] + [System.String] + $ApplicationId, + + [Parameter(Mandatory = $False)] + [System.String] + $ApplicationSegmentId ) - PROCESS { - $params = @{} - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - $params["Uri"] = 'https://graph.microsoft.com/beta/directory/deletedItems/' - $params["Method"] = "POST" - if($null -ne $PSBoundParameters["Id"]) - { - $params["Uri"] += $Id+"/microsoft.graph.restore" - } - if($PSBoundParameters.ContainsKey("AutoReconcileProxyConflict")) - { - $params["Body"] = @{ - autoReconcileProxyConflict = $true - } - } - - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug - Write-Debug("=========================================================================`n") - - $response = Invoke-GraphRequest @params -Headers $customHeaders - if($response){ - $userList = @() - foreach ($data in $response) { - $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphDirectoryObject - $data.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name - $propertyValue = $_.Value - $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force - } - $userList += $userType - } - $userList + PROCESS { + try { + # Create custom headers for the request + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + # Construct the URI for the API request + $uri = "https://graph.microsoft.com/beta/applications/$ApplicationId/onPremisesPublishing/segmentsConfiguration/microsoft.graph.ipSegmentConfiguration/applicationSegments/$ApplicationSegmentId" + + # Invoke the API request to delete the application segment + Invoke-GraphRequest -Method DELETE -Headers $customHeaders -OutputType PSObject -Uri $uri + + Write-Output "Application segment with ID $ApplicationSegmentId has been removed successfully." + } catch { + Write-Error "Failed to remove the application segment: $_" } } }# ------------------------------------------------------------------------------ diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 063d5a1fba..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Reports/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,53 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADApplicationSignInDetailedSummary -Value Get-EntraBetaApplicationSignInDetailedSummary -Scope Global -Force - Set-Alias -Name Get-AzureADAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force - Set-Alias -Name Get-AzureADAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-EntraBetaAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force - Set-Alias -Name Get-EntraBetaAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Reports/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 index 8abc221a94..655650d1bc 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 @@ -7,73 +7,73 @@ function Add-EntraBetaFeatureRolloutPolicyDirectoryObject { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $RefObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["Id"]) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" + $params["OdataId"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = "https://graph.microsoft.com/v1.0/directoryObjects/$TmpValue" - $params["OdataId"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 index e0d1c66d77..6036de249e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Add-EntraBetaServicePrincipalPolicy.ps1 @@ -7,10 +7,10 @@ function Add-EntraBetaServicePrincipalPolicy { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $RefObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $Id ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 6bcb016863..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,94 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name New-AzureADMSInvitation -Value New-EntraBetaInvitation -Scope Global -Force - Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalPolicy -Value Add-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADPolicy -Value Set-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name New-AzureADPolicy -Value New-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force - Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Get-AzureADPolicy -Value Get-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSTrustFrameworkPolicy -Value New-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraBetaAuthorizationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraBetaOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name New-AzureADMSFeatureRolloutPolicy -Value New-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADPolicyAppliedObject -Value Get-EntraBetaPolicyAppliedObject -Scope Global -Force - Set-Alias -Name Get-AzureADMSFeatureRolloutPolicy -Value Get-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force - Set-Alias -Name Set-AzureADMSFeatureRolloutPolicy -Value Set-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Remove-AzureADMSTrustFrameworkPolicy -Value Remove-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraBetaAuthorizationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Remove-AzureADPolicy -Value Remove-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSTrustFrameworkPolicy -Value Set-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicy -Value Remove-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADMSTrustFrameworkPolicy -Value Get-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraBetaOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 index cf6e3aadd3..921de3f356 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaConditionalAccessPolicy.ps1 @@ -16,33 +16,37 @@ function Get-EntraBetaConditionalAccessPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -52,21 +56,17 @@ function Get-EntraBetaConditionalAccessPolicy { { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 index 2ee8d32786..bb915a858e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.ps1 @@ -22,17 +22,9 @@ function Get-EntraBetaFeatureRolloutPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $keysChanged = @{SearchString = "Filter"} - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } if($null -ne $PSBoundParameters["SearchString"]) { @@ -40,6 +32,10 @@ function Get-EntraBetaFeatureRolloutPolicy { $Value = "displayName eq '$TmpValue' or startswith(displayName,'$TmpValue')" $params["Filter"] = $Value } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } if($null -ne $PSBoundParameters["Filter"]) { $TmpValue = $PSBoundParameters["Filter"] @@ -49,45 +45,49 @@ function Get-EntraBetaFeatureRolloutPolicy { $Value = $TmpValue $params["Filter"] = $Value } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } if ($null -ne $PSBoundParameters["OutBuffer"]) { $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 index 3615380baa..2ee8f1f29d 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaIdentityProvider.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaIdentityProvider { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { @@ -81,8 +81,8 @@ function Get-EntraBetaIdentityProvider { $response | ForEach-Object { if($null -ne $_) { Add-Member -InputObject $_ -NotePropertyMembers $_.AdditionalProperties - Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName Add-Member -InputObject $_ -MemberType AliasProperty -Name Type -Value identityProviderType + Add-Member -InputObject $_ -MemberType AliasProperty -Name Name -Value DisplayName Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id } diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 index e86662745c..f9da8f7f37 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.ps1 @@ -19,60 +19,60 @@ function Get-EntraBetaOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 index c9d032dbb0..9b8f7c3ae3 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaPermissionGrantPolicy.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 index 269894b130..96429399cf 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.ps1 @@ -7,10 +7,10 @@ function Get-EntraBetaTrustedCertificateAuthority { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TrustedIssuerSki, + [System.String] $TrustedIssuer, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $TrustedIssuer, + [System.String] $TrustedIssuerSki, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaUserAuthenticationMethod.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaUserAuthenticationMethod.ps1 new file mode 100644 index 0000000000..62ce179983 --- /dev/null +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaUserAuthenticationMethod.ps1 @@ -0,0 +1,58 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserAuthenticationMethod { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, HelpMessage = "Enter the User ID (ObjectId or UserPrincipalName) of the user whose authentication requirements you want to update.")] + [Alias("ObjectId")] + [System.String] $UserId + ) + + PROCESS { + try { + + # Initialize headers and URI + $params = @{ } + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["UserId"]) { + $params["UserId"] = $PSBoundParameters["UserId"] + } + + $params["Url"] = "https://graph.microsoft.com/beta/users/$($params.UserId)/authentication/methods" + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + # Make the API call + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $params.Url -Method GET + + if ($response.ContainsKey('value')) { + $response = $response.value + } + + $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json + + $authMethodList = @() + foreach ($res in $data) { + $authMethodType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphAuthenticationMethod + $res.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name.Substring(0, 1).ToUpper() + $_.Name.Substring(1) + $propertyValue = $_.Value + $authMethodType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $authMethodType | Add-Member -MemberType AliasProperty -Name AuthenticationMethodType -Value '@odata.type' + $authMethodList += $authMethodType + } + + return $authMethodList + } + catch { + Write-Error "An error occurred while retrieving user authentication methods: $_" + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaUserAuthenticationRequirement.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaUserAuthenticationRequirement.ps1 new file mode 100644 index 0000000000..2086df7c4f --- /dev/null +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraBetaUserAuthenticationRequirement.ps1 @@ -0,0 +1,36 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Get-EntraBetaUserAuthenticationRequirement { + [CmdletBinding(DefaultParameterSetName = 'UserRequirements')] + param ( + [Alias("ObjectId")] + [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, HelpMessage = "Enter the User ID (ObjectId or UserPrincipalName) of the user whose authentication requirements you want to retrieve.")] + [System.String] $UserId + ) + + PROCESS { + try { + # Initialize parameters and headers + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = "https://graph.microsoft.com/beta/users/$UserId" + $params["Uri"] = "$baseUri/authentication/requirements" + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + # Make the API call + $response = Invoke-GraphRequest -Uri $($params.Uri) -Method GET -Headers $customHeaders | Convertto-json | convertfrom-json + + # Return the response + return $response + } + catch { + Write-Error "An error occurred while retrieving user authentication requirements: $_" + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 index 35ae267ec7..263477b2da 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaConditionalAccessPolicy.ps1 @@ -7,81 +7,73 @@ function New-EntraBetaConditionalAccessPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ModifiedDateTime, + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreatedDateTime, + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, + [System.String] $ModifiedDateTime, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions + [System.String] $CreatedDateTime ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if($null -ne $PSBoundParameters["GrantControls"]) - { - $TmpValue = $PSBoundParameters["GrantControls"] - $hash = @{} - if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } - if($null -ne $TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } - if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } - if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } - - $Value = $hash - $params["GrantControls"] = $Value - } - if ($null -ne $PSBoundParameters["ModifiedDateTime"]) - { - $params["ModifiedDateTime"] = $PSBoundParameters["ModifiedDateTime"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["State"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["State"] = $PSBoundParameters["State"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["State"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["State"] = $PSBoundParameters["State"] } - if ($null -ne $PSBoundParameters["CreatedDateTime"]) + if($null -ne $PSBoundParameters["GrantControls"]) { - $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] + $TmpValue = $PSBoundParameters["GrantControls"] + $hash = @{} + if($TmpValue._Operator) { $hash["Operator"] = $TmpValue._Operator } + if($null -ne $TmpValue.BuiltInControls) { $hash["BuiltInControls"] = $TmpValue.BuiltInControls } + if($TmpValue.CustomAuthenticationFactors) { $hash["CustomAuthenticationFactors"] = $TmpValue.CustomAuthenticationFactors } + if($TmpValue.TermsOfUse) { $hash["TermsOfUse"] = $TmpValue.TermsOfUse } + + $Value = $hash + $params["GrantControls"] = $Value } if($null -ne $PSBoundParameters["SessionControls"]) { @@ -102,37 +94,13 @@ function New-EntraBetaConditionalAccessPolicy { } $params["SessionControls"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["Id"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($null -ne $PSBoundParameters["Conditions"]) { @@ -156,6 +124,38 @@ function New-EntraBetaConditionalAccessPolicy { } $params["Conditions"] = $Value } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ModifiedDateTime"]) + { + $params["ModifiedDateTime"] = $PSBoundParameters["ModifiedDateTime"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["CreatedDateTime"]) + { + $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 index 8fd7415ae3..1fa289f77b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaFeatureRolloutPolicy.ps1 @@ -6,100 +6,100 @@ function New-EntraBetaFeatureRolloutPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, + [System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $IsEnabled + [System.String] $DisplayName, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["AppliesTo"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } - if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Feature"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Feature"] = $PSBoundParameters["Feature"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["AppliesTo"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Feature"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Feature"] = $PSBoundParameters["Feature"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 index 7783ad0746..2f7067c1fa 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaInvitation.ps1 @@ -6,29 +6,29 @@ function New-EntraBetaInvitation { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ResetRedemption, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $InviteRedirectUrl, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $InvitedUserType, + [System.String] $InvitedUserDisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $InvitedUserDisplayName, + [Microsoft.Open.MSGraph.Model.InvitedUserMessageInfo] $InvitedUserMessageInfo, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $InvitedUserEmailAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $SendInvitationMessage, + [System.Nullable`1[System.Boolean]] $ResetRedemption, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $InviteRedirectUrl, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.User] $InvitedUser, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $InvitedUserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.User] $InvitedUser + [System.Nullable`1[System.Boolean]] $SendInvitationMessage ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 index 6ff58c0e37..af0d2d7e95 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaNamedLocationPolicy.ps1 @@ -7,10 +7,13 @@ function New-EntraBetaNamedLocationPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsTrusted, @@ -22,10 +25,7 @@ function New-EntraBetaNamedLocationPolicy { [System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 index 70956d7262..8b959f2a1b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantConditionSet.ps1 @@ -7,34 +7,34 @@ function New-EntraBetaPermissionGrantConditionSet { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResourceApplication, + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Permissions, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [System.String] $PermissionType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionType, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + [System.Collections.Generic.List`1[System.String]] $Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, + [System.String] $PermissionClassification, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $ConditionSetType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionClassification, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds + [System.String] $ResourceApplication ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 index 4bdc97f991..e371b2d5f1 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPermissionGrantPolicy.ps1 @@ -7,50 +7,54 @@ function New-EntraBetaPermissionGrantPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Id, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -60,25 +64,21 @@ function New-EntraBetaPermissionGrantPolicy { { $params["Id"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 index 525725d229..3baa7427b6 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaPolicy.ps1 @@ -9,20 +9,20 @@ function New-EntraBetaPolicy { [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsOrganizationDefault, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AlternativeIdentifier, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[System.String]] $Definition, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] [System.String] $Type, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Collections.Generic.List`1[System.String]] $Definition + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $AlternativeIdentifier ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 index 7dfcc442b3..513f06c6c0 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/New-EntraBetaTrustFrameworkPolicy.ps1 @@ -6,14 +6,14 @@ function New-EntraBetaTrustFrameworkPolicy { [CmdletBinding(DefaultParameterSetName = 'Content')] param ( + [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Content, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "Content")] [Parameter(ParameterSetName = "File")] [System.String] $OutputFilePath, - [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Content, - [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $InputFilePath ) diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 index 88cc5b6ebf..aa4ccc41ba 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.ps1 @@ -14,33 +14,37 @@ function Remove-EntraBetaConditionalAccessPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -50,21 +54,17 @@ function Remove-EntraBetaConditionalAccessPolicy { { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 index 7a34320a59..8215c28a39 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaFeatureRolloutPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 index 28be009099..0699a6fa4c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.ps1 @@ -17,61 +17,61 @@ function Remove-EntraBetaFeatureRolloutPolicyDirectoryObject { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["DirectoryObjectId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 index 2970f6c56c..15e01cd87f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaIdentityProvider.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaIdentityProvider { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["IdentityProviderBaseId"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["IdentityProviderBaseId"] = $PSBoundParameters["IdentityProviderBaseId"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 index ea9ee584f4..afdaaf0ce9 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaNamedLocationPolicy.ps1 @@ -14,33 +14,37 @@ function Remove-EntraBetaNamedLocationPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["NamedLocationId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -50,21 +54,17 @@ function Remove-EntraBetaNamedLocationPolicy { { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 index 3134aed672..5ea39f3f61 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["OAuth2PermissionGrantId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 index b7565ce9af..ff398d5175 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaPermissionGrantPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 index c094de018f..136b4f8e3f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaTrustFrameworkPolicy { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["TrustFrameworkPolicyId"] = $PSBoundParameters["Id"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["TrustFrameworkPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 index 69c05bae68..1131ef155f 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaAuthorizationPolicy.ps1 @@ -7,110 +7,106 @@ function Set-EntraBetaAuthorizationPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, + [System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, + [System.Collections.Generic.List`1[System.String]] $PermissionGrantPolicyIdsAssignedToDefaultUserRole, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Description, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $EnabledPreviewFeatures, + [System.String] $GuestUserRoleId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $PermissionGrantPolicyIdsAssignedToDefaultUserRole, + [System.Nullable`1[System.Boolean]] $AllowEmailVerifiedUsersToJoinOrganization, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $BlockMsolPowerShell, + [System.Nullable`1[System.Boolean]] $AllowedToSignUpEmailBasedSubscriptions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [Microsoft.Open.MSGraph.Model.DefaultUserRolePermissions] $DefaultUserRolePermissions, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AllowedToUseSSPR, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GuestUserRoleId + [System.Collections.Generic.List`1[System.String]] $EnabledPreviewFeatures ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) - { - $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) + if ($null -ne $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"]) { - $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] + $params["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] = $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["EnabledPreviewFeatures"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["EnabledPreviewFeatures"] = $PSBoundParameters["EnabledPreviewFeatures"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["GuestUserRoleId"]) { - $params["AuthorizationPolicyId"] = $PSBoundParameters["Id"] + $params["GuestUserRoleId"] = $PSBoundParameters["GuestUserRoleId"] } - if ($null -ne $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] = $PSBoundParameters["PermissionGrantPolicyIdsAssignedToDefaultUserRole"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["BlockMsolPowerShell"]) + if ($null -ne $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"]) { - $params["BlockMsolPowerShell"] = $PSBoundParameters["BlockMsolPowerShell"] + $params["AllowEmailVerifiedUsersToJoinOrganization"] = $PSBoundParameters["AllowEmailVerifiedUsersToJoinOrganization"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["AllowedToSignUpEmailBasedSubscriptions"] = $PSBoundParameters["AllowedToSignUpEmailBasedSubscriptions"] } if($null -ne $PSBoundParameters["DefaultUserRolePermissions"]) { @@ -123,25 +119,29 @@ function Set-EntraBetaAuthorizationPolicy { $Value = $hash $params["DefaultUserRolePermissions"] = $Value } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["AuthorizationPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["AllowedToUseSSPR"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["AllowedToUseSSPR"] = $PSBoundParameters["AllowedToUseSSPR"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["GuestUserRoleId"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["GuestUserRoleId"] = $PSBoundParameters["GuestUserRoleId"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["EnabledPreviewFeatures"]) + { + $params["EnabledPreviewFeatures"] = $PSBoundParameters["EnabledPreviewFeatures"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 index 9041ee0ed1..ae8d81e7e9 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaConditionalAccessPolicy.ps1 @@ -7,68 +7,64 @@ function Set-EntraBetaConditionalAccessPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ModifiedDateTime, + [System.String] $State, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $PolicyId, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessGrantControls] $GrantControls, + [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreatedDateTime, + [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessSessionControls] $SessionControls, + [System.String] $ModifiedDateTime, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.MSGraph.Model.ConditionalAccessConditionSet] $Conditions + [System.String] $CreatedDateTime ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["ModifiedDateTime"]) - { - $params["ModifiedDateTime"] = $PSBoundParameters["ModifiedDateTime"] - } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PolicyId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["State"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["State"] = $PSBoundParameters["State"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["State"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["State"] = $PSBoundParameters["State"] } if($null -ne $PSBoundParameters["GrantControls"]) { @@ -81,9 +77,17 @@ function Set-EntraBetaConditionalAccessPolicy { $Value = $hash $params["GrantControls"] = $Value } - if ($null -ne $PSBoundParameters["CreatedDateTime"]) + if ($null -ne $PSBoundParameters["PolicyId"]) { - $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] + $params["ConditionalAccessPolicyId"] = $PSBoundParameters["PolicyId"] + } + if ($null -ne $PSBoundParameters["DisplayName"]) + { + $params["DisplayName"] = $PSBoundParameters["DisplayName"] + } + if ($null -ne $PSBoundParameters["OutVariable"]) + { + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($null -ne $PSBoundParameters["SessionControls"]) { @@ -117,42 +121,6 @@ function Set-EntraBetaConditionalAccessPolicy { $Value = $hash $params["SessionControls"] = $Value } - if($PSBoundParameters.ContainsKey("Debug")) - { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Verbose")) - { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["Id"]) - { - $params["Id"] = $PSBoundParameters["Id"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } if($null -ne $PSBoundParameters["Conditions"]) { $TmpValue = $PSBoundParameters["Conditions"] @@ -193,6 +161,38 @@ function Set-EntraBetaConditionalAccessPolicy { $Value = $hash $params["Conditions"] = $Value } + if($PSBoundParameters.ContainsKey("Verbose")) + { + $params["Verbose"] = $PSBoundParameters["Verbose"] + } + if ($null -ne $PSBoundParameters["ModifiedDateTime"]) + { + $params["ModifiedDateTime"] = $PSBoundParameters["ModifiedDateTime"] + } + if ($null -ne $PSBoundParameters["Id"]) + { + $params["Id"] = $PSBoundParameters["Id"] + } + if ($null -ne $PSBoundParameters["PipelineVariable"]) + { + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + } + if ($null -ne $PSBoundParameters["InformationAction"]) + { + $params["InformationAction"] = $PSBoundParameters["InformationAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + } + if ($null -ne $PSBoundParameters["CreatedDateTime"]) + { + $params["CreatedDateTime"] = $PSBoundParameters["CreatedDateTime"] + } Write-Debug("============================ TRANSFORMATIONS ============================") $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 index c714f1640c..cddef236eb 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.ps1 @@ -7,106 +7,106 @@ function Set-EntraBetaFeatureRolloutPolicy { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization, + [System.Nullable`1[System.Boolean]] $IsEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, + [System.String] $Description, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $DisplayName, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.MsDirectoryObject]] $AppliesTo, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description, + [System.Nullable`1[Microsoft.Open.MSGraph.Model.MsFeatureRolloutPolicy+FeatureEnum]] $Feature, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsEnabled + [System.Nullable`1[System.Boolean]] $IsAppliedToOrganization ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["AppliesTo"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["IsEnabled"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["Feature"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Feature"] = $PSBoundParameters["Feature"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["AppliesTo"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["AppliesTo"] = $PSBoundParameters["AppliesTo"] + $params["FeatureRolloutPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Feature"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Feature"] = $PSBoundParameters["Feature"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["IsAppliedToOrganization"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["IsAppliedToOrganization"] = $PSBoundParameters["IsAppliedToOrganization"] } - if ($null -ne $PSBoundParameters["IsEnabled"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["IsEnabled"] = $PSBoundParameters["IsEnabled"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 index e88a42f1e8..a88c81791e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaNamedLocationPolicy.ps1 @@ -6,15 +6,18 @@ function Set-EntraBetaNamedLocationPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $PolicyId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IncludeUnknownCountriesAndRegions, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Nullable`1[System.Boolean]] $IsTrusted, @@ -25,10 +28,7 @@ function Set-EntraBetaNamedLocationPolicy { [System.String] $OdataType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.IpRange]] $IpRanges + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.CountriesAndRegion]] $CountriesAndRegions ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 index 2d47652733..0aa7454203 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.ps1 @@ -7,37 +7,37 @@ function Set-EntraBetaPermissionGrantConditionSet { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ResourceApplication, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Permissions, - - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $PolicyId, + [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, + [System.String] $PermissionType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ClientApplicationsFromVerifiedPublisherOnly, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[System.String]] $ClientApplicationIds, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ConditionSetType, + [System.String] $PolicyId, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Collections.Generic.List`1[System.String]] $Permissions, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $PermissionClassification, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, + [System.String] $ConditionSetType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PermissionType, + [System.Collections.Generic.List`1[System.String]] $ClientApplicationTenantIds, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $ClientApplicationPublisherIds + [System.String] $ResourceApplication, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 index f66a237ec9..300246b961 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPermissionGrantPolicy.ps1 @@ -6,79 +6,79 @@ function Set-EntraBetaPermissionGrantPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Description, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $DisplayName, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Description + [System.String] $Id ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Description"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Description"] = $PSBoundParameters["Description"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["Id"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PermissionGrantPolicyId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["Description"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Description"] = $PSBoundParameters["Description"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 index 92cce1f914..f3718ebc60 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaPolicy.ps1 @@ -10,13 +10,13 @@ function Set-EntraBetaPolicy { [System.Nullable`1[System.Boolean]] $IsOrganizationDefault, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AlternativeIdentifier, + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, + [System.Collections.Generic.List`1[System.String]] $Definition, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, @@ -25,7 +25,7 @@ function Set-EntraBetaPolicy { [System.String] $Type, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Definition + [System.String] $AlternativeIdentifier ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 index 9c381c06a1..40c3f0ef23 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.ps1 @@ -6,14 +6,14 @@ function Set-EntraBetaTrustFrameworkPolicy { [CmdletBinding(DefaultParameterSetName = 'Content')] param ( + [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Content, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "Content")] [Parameter(ParameterSetName = "File")] [System.String] $OutputFilePath, - [Parameter(ParameterSetName = "Content", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Content, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Parameter(ParameterSetName = "Content")] [Parameter(ParameterSetName = "File")] diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Update-EntraBetaOauth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Update-EntraBetaOauth2PermissionGrant.ps1 new file mode 100644 index 0000000000..2344751170 --- /dev/null +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Update-EntraBetaOauth2PermissionGrant.ps1 @@ -0,0 +1,41 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Update-EntraBetaOauth2PermissionGrant { + [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias("Id")] + [System.String] $OAuth2PermissionGrantId, + + [Parameter(Mandatory = $false)] + [System.String] $Scope + ) + + PROCESS { + $params = @{} + $body = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + $params["Uri"] = "https://graph.microsoft.com/beta/oauth2PermissionGrants/" + $params["Method"] = "PATCH" + + if ($null -ne $PSBoundParameters["OAuth2PermissionGrantId"]) { + $params["Uri"] += $OAuth2PermissionGrantId + } + + if ($null -ne $PSBoundParameters["Scope"]) { + $body["scope"] = $PSBoundParameters["Scope"] + } + + $params["Body"] = $body + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $response = Invoke-GraphRequest @params -Headers $customHeaders + $response + } +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Update-EntraBetaUserAuthenticationRequirement.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Update-EntraBetaUserAuthenticationRequirement.ps1 new file mode 100644 index 0000000000..625ec8b8a5 --- /dev/null +++ b/module/EntraBeta/Microsoft.Entra.Beta/SignIns/Update-EntraBetaUserAuthenticationRequirement.ps1 @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function Update-EntraBetaUserAuthenticationRequirement { + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, HelpMessage = "Enter the User ID (ObjectId or UserPrincipalName) of the user whose authentication requirements you want to update.")] + [Alias("ObjectId")] + [System.String] $UserId, + + [Parameter(Mandatory = $true, HelpMessage = "Specify the per-user MFA state. Valid values are 'enabled', 'disabled', or 'enforced'.")] + [ValidateSet("enabled", "disabled", "enforced")] + [System.String] $PerUserMfaState + ) + + PROCESS { + try { + # Initialize headers and URI + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + + if ($null -ne $PSBoundParameters["UserId"]) { + $params["UserId"] = $PSBoundParameters["UserId"] + } + if ($null -ne $PSBoundParameters["CurrentPassword"]) { + $params["PerUserMfaState"] = $PSBoundParameters["PerUserMfaState"] + } + + $params["Url"] = "https://graph.microsoft.com/beta/users/$UserId/authentication/requirements" + # Create the body for the PATCH request + $body = @{ + perUserMfaState = $PerUserMfaState + } | ConvertTo-Json -Depth 10 + + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + # Make the API call + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $params.Url -Method PATCH -Body $body + + # Return the response + return $response + + + } + catch { + Write-Error "An error occurred while updating user authentication requirements: $_" + } + } +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 deleted file mode 100644 index 1c1062114c..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Enable-EntraAzureADAliases.ps1 +++ /dev/null @@ -1,73 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Enable-EntraAzureADAliases { - Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraBetaUserMembership -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraBetaUserOwnedDevice -Scope Global -Force - Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraBetaUserExtension -Scope Global -Force - Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name Set-AzureADUserManager -Value Set-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name Get-AzureADUserManager -Value Get-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraBetaUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraBetaUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name Get-AzureADUser -Value Get-EntraBetaUser -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraBetaUserOwnedObject -Scope Global -Force - Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraBetaUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraBetaUserExtension -Scope Global -Force - Set-Alias -Name Remove-AzureADUser -Value Remove-EntraBetaUser -Scope Global -Force - Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraBetaUserRegisteredDevice -Scope Global -Force - Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraBetaUserExtension -Scope Global -Force - Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraBetaUserLicenseDetail -Scope Global -Force - Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraBetaUserDirectReport -Scope Global -Force - Set-Alias -Name New-AzureADUser -Value New-EntraBetaUser -Scope Global -Force - Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraBetaUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraBetaUserCreatedObject -Scope Global -Force - Set-Alias -Name Set-AzureADUser -Value Set-EntraBetaUser -Scope Global -Force - Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraBetaUserLicense -Scope Global -Force - Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraBetaSignedInUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraBetaUserOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraBetaUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraBetaUserPassword -Scope Global -Force - Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - -} diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 index 671b882e2b..cacccd6f66 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserAppRoleAssignment.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaUserAppRoleAssignment { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 index 5933b81d5f..bcf5a187b7 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserLicenseDetail.ps1 @@ -16,57 +16,57 @@ function Get-EntraBetaUserLicenseDetail { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 index c47916135d..91220a2cbf 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserMembership.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaUserMembership { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 index 87c171c121..3f671ea6f2 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.ps1 @@ -22,64 +22,64 @@ function Get-EntraBetaUserOAuth2PermissionGrant { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($null -ne $PSBoundParameters["All"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - if($PSBoundParameters["All"]) - { - $params["All"] = $PSBoundParameters["All"] - } + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($null -ne $PSBoundParameters["All"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + if($PSBoundParameters["All"]) + { + $params["All"] = $PSBoundParameters["All"] + } } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if ($PSBoundParameters.ContainsKey("Top")) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 index 65f2038a0e..42dcd1067d 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraBetaUserThumbnailPhoto.ps1 @@ -7,16 +7,16 @@ function Get-EntraBetaUserThumbnailPhoto { param ( [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FilePath, + [System.Boolean] $View, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $FileName, + [System.String] $FilePath, [Alias('ObjectId')] [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $UserId, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Boolean] $View, + [System.String] $FileName, [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] [System.String[]] $Property ) @@ -25,69 +25,69 @@ function Get-EntraBetaUserThumbnailPhoto { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["View"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["View"] = $PSBoundParameters["View"] + } + if ($null -ne $PSBoundParameters["ProgressAction"]) + { + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + } + if($PSBoundParameters.ContainsKey("Debug")) + { + $params["Debug"] = $PSBoundParameters["Debug"] + } + if ($null -ne $PSBoundParameters["OutBuffer"]) + { + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["FilePath"]) { $params["FilePath"] = $PSBoundParameters["FilePath"] } - if ($null -ne $PSBoundParameters["FileName"]) - { - $params["FileName"] = $PSBoundParameters["FileName"] - } if ($null -ne $PSBoundParameters["UserId"]) { $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["FileName"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["FileName"] = $PSBoundParameters["FileName"] } if ($null -ne $PSBoundParameters["ErrorAction"]) { $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if ($null -ne $PSBoundParameters["View"]) - { - $params["View"] = $PSBoundParameters["View"] - } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } if($null -ne $PSBoundParameters["Property"]) { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 deleted file mode 100644 index 24daf53824..0000000000 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Get-EntraUnsupportedCommand.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraUnsupportedCommand { - Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." -} - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUser.ps1 index af5a8529c1..37602be023 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUser.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUser.ps1 @@ -8,106 +8,106 @@ function New-EntraBetaUser { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $JobTitle, + [System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PreferredLanguage, + [System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreationType, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickName, + [System.String] $GivenName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Department, + [System.String] $FacsimileTelephoneNumber, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $City, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ShowInAddressList, + [System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OtherMails, + [System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $FacsimileTelephoneNumber, - - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserState, + [System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PhysicalDeliveryOfficeName, + [System.String] $UserStateChangedOn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PasswordPolicies, + [System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AgeGroup, + [System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CompanyName, + [System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Country, + [System.Nullable`1[System.Boolean]] $ShowInAddressList, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompromised, + [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + [System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $TelephoneNumber, + [System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $StreetAddress, + [System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ImmutableId, + [System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserType, + [System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserStateChangedOn, + [System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GivenName, + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UsageLocation, + [System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Surname, + [System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PostalCode, + [System.String] $MailNickName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Mobile, + [System.String] $AgeGroup, - [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $DisplayName + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.String] $Country, + + [Parameter(ParameterSetName = "InvokeByDynamicParameters")] + [System.Nullable`1[System.Boolean]] $IsCompromised ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 index b7d8ff27a2..c699c8f8bc 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/New-EntraBetaUserAppRoleAssignment.ps1 @@ -10,58 +10,50 @@ function New-EntraBetaUserAppRoleAssignment { [System.String] $ObjectId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $PrincipalId, + [System.String] $Id, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $ResourceId, + [System.String] $PrincipalId, [Parameter(ParameterSetName = "InvokeByDynamicParameters", Mandatory = $true)] - [System.String] $Id + [System.String] $ResourceId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["PrincipalId"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["ResourceId"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["ResourceId"] = $PSBoundParameters["ResourceId"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { @@ -71,21 +63,29 @@ function New-EntraBetaUserAppRoleAssignment { { $params["AppRoleId"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + } + if ($null -ne $PSBoundParameters["InformationVariable"]) + { + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["PrincipalId"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["PrincipalId"] = $PSBoundParameters["PrincipalId"] + } + if ($null -ne $PSBoundParameters["ResourceId"]) + { + $params["ResourceId"] = $PSBoundParameters["ResourceId"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUser.ps1 index ab3342f351..b334e16f27 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUser.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUser.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaUser { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 index 549d0f40f3..519708a501 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserAppRoleAssignment.ps1 @@ -7,71 +7,71 @@ function Remove-EntraBetaUserAppRoleAssignment { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AppRoleAssignmentId, + [System.String] $ObjectId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId + [System.String] $AppRoleAssignmentId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) - { - $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] - } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ObjectId"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["UserId"] = $PSBoundParameters["ObjectId"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ObjectId"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["UserId"] = $PSBoundParameters["ObjectId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["AppRoleAssignmentId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["AppRoleAssignmentId"] = $PSBoundParameters["AppRoleAssignmentId"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["ErrorVariable"]) + { + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 index f168ec5c4b..591eade001 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserExtension.ps1 @@ -21,65 +21,65 @@ function Remove-EntraBetaUserExtension { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ExtensionName"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["ExtensionName"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ExtensionId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ExtensionId"] = $PSBoundParameters["ExtensionId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["ExtensionNames"]) + if ($null -ne $PSBoundParameters["ExtensionId"]) { - $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] + $params["ExtensionId"] = $PSBoundParameters["ExtensionId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ExtensionNames"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ExtensionNames"] = $PSBoundParameters["ExtensionNames"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 index 9c2c5e1fbd..71540dd5ae 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Remove-EntraBetaUserManager.ps1 @@ -14,57 +14,57 @@ function Remove-EntraBetaUserManager { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["InformationAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUser.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUser.ps1 index 71a65d71fe..afa8f9bc4c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUser.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUser.ps1 @@ -8,308 +8,308 @@ function Set-EntraBetaUser { param ( [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $JobTitle, + [System.String] $CompanyName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PreferredLanguage, + [System.String] $PostalCode, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CreationType, + [System.String] $State, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $MailNickName, + [System.String] $GivenName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $State, + [System.String] $FacsimileTelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Department, + [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $City, + [System.String] $StreetAddress, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $ShowInAddressList, + [System.String] $PasswordPolicies, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $OtherMails, + [System.String] $PhysicalDeliveryOfficeName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $FacsimileTelephoneNumber, - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId, + [System.String] $UserType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $AccountEnabled, + [System.String] $UserStateChangedOn, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserState, + [System.String] $City, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PhysicalDeliveryOfficeName, + [System.String] $CreationType, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PasswordPolicies, + [System.String] $ImmutableId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AgeGroup, + [System.String] $ConsentProvidedForMinor, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $CompanyName, + [System.Nullable`1[System.Boolean]] $ShowInAddressList, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ConsentProvidedForMinor, + [System.Nullable`1[System.Boolean]] $AccountEnabled, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Country, + [System.String] $Department, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsCompromised, + [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, + [System.String] $UsageLocation, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.AzureAD.Model.SignInName]] $SignInNames, + [System.String] $PreferredLanguage, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] [System.String] $TelephoneNumber, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $StreetAddress, + [System.String] $DisplayName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $ImmutableId, + [System.Collections.Generic.List`1[System.String]] $OtherMails, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserType, + [System.String] $UserState, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserStateChangedOn, + [System.Collections.Generic.Dictionary`2[System.String,System.String]] $ExtensionProperty, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $GivenName, + [System.String] $Surname, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [Microsoft.Open.AzureAD.Model.PasswordProfile] $PasswordProfile, + [System.String] $JobTitle, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UsageLocation, + [System.String] $UserPrincipalName, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $UserPrincipalName, + [System.String] $Mobile, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Surname, + [System.String] $MailNickName, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $PostalCode, + [System.String] $AgeGroup, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Mobile, + [System.String] $Country, [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName + [System.Nullable`1[System.Boolean]] $IsCompromised ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["JobTitle"]) - { - $params["JobTitle"] = $PSBoundParameters["JobTitle"] - } - if ($null -ne $PSBoundParameters["PreferredLanguage"]) - { - $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] - } - if ($null -ne $PSBoundParameters["CreationType"]) + if ($null -ne $PSBoundParameters["CompanyName"]) { - $params["CreationType"] = $PSBoundParameters["CreationType"] + $params["CompanyName"] = $PSBoundParameters["CompanyName"] } - if ($null -ne $PSBoundParameters["MailNickName"]) + if ($null -ne $PSBoundParameters["PostalCode"]) { - $params["MailNickName"] = $PSBoundParameters["MailNickName"] + $params["PostalCode"] = $PSBoundParameters["PostalCode"] } if ($null -ne $PSBoundParameters["State"]) { $params["State"] = $PSBoundParameters["State"] } - if ($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["Department"]) - { - $params["Department"] = $PSBoundParameters["Department"] - } - if ($null -ne $PSBoundParameters["City"]) + if ($null -ne $PSBoundParameters["GivenName"]) { - $params["City"] = $PSBoundParameters["City"] + $params["GivenName"] = $PSBoundParameters["GivenName"] } - if ($null -ne $PSBoundParameters["ShowInAddressList"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["OtherMails"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OtherMails"] = $PSBoundParameters["OtherMails"] + $params["Debug"] = $PSBoundParameters["Debug"] } if ($null -ne $PSBoundParameters["FacsimileTelephoneNumber"]) { $params["FacsimileTelephoneNumber"] = $PSBoundParameters["FacsimileTelephoneNumber"] } - if ($null -ne $PSBoundParameters["UserId"]) + if($null -ne $PSBoundParameters["PasswordProfile"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $TmpValue = $PSBoundParameters["PasswordProfile"] + $Value = @{ + forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin + forceChangePasswordNextSignInWithMfa = $TmpValue.EnforceChangePasswordPolicy + password = $TmpValue.Password + } + $params["PasswordProfile"] = $Value } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["StreetAddress"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] } - if ($null -ne $PSBoundParameters["AccountEnabled"]) + if ($null -ne $PSBoundParameters["PasswordPolicies"]) { - $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] + $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] } - if ($null -ne $PSBoundParameters["UserState"]) + if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) { - $params["ExternalUserState"] = $PSBoundParameters["UserState"] + $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["UserType"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["UserType"] = $PSBoundParameters["UserType"] } - if ($null -ne $PSBoundParameters["PhysicalDeliveryOfficeName"]) + if ($null -ne $PSBoundParameters["UserStateChangedOn"]) { - $params["PhysicalDeliveryOfficeName"] = $PSBoundParameters["PhysicalDeliveryOfficeName"] + $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] } - if ($null -ne $PSBoundParameters["PasswordPolicies"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["PasswordPolicies"] = $PSBoundParameters["PasswordPolicies"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if ($null -ne $PSBoundParameters["AgeGroup"]) + if ($null -ne $PSBoundParameters["City"]) { - $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] + $params["City"] = $PSBoundParameters["City"] + } + if ($null -ne $PSBoundParameters["ErrorAction"]) + { + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["CreationType"]) + { + $params["CreationType"] = $PSBoundParameters["CreationType"] + } + if ($null -ne $PSBoundParameters["ImmutableId"]) + { + $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] } if ($null -ne $PSBoundParameters["PipelineVariable"]) { $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["CompanyName"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["CompanyName"] = $PSBoundParameters["CompanyName"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["ConsentProvidedForMinor"]) { $params["ConsentProvidedForMinor"] = $PSBoundParameters["ConsentProvidedForMinor"] } - if ($null -ne $PSBoundParameters["Country"]) + if ($null -ne $PSBoundParameters["ShowInAddressList"]) { - $params["Country"] = $PSBoundParameters["Country"] + $params["ShowInAddressList"] = $PSBoundParameters["ShowInAddressList"] } - if ($null -ne $PSBoundParameters["IsCompromised"]) + if ($null -ne $PSBoundParameters["AccountEnabled"]) { - $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] + $params["AccountEnabled"] = $PSBoundParameters["AccountEnabled"] } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["Department"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Department"] = $PSBoundParameters["Department"] } - if ($null -ne $PSBoundParameters["ExtensionProperty"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } if ($null -ne $PSBoundParameters["SignInNames"]) { $params["Identities"] = $PSBoundParameters["SignInNames"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["UsageLocation"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] } - if ($null -ne $PSBoundParameters["TelephoneNumber"]) + if ($null -ne $PSBoundParameters["PreferredLanguage"]) { - $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] + $params["PreferredLanguage"] = $PSBoundParameters["PreferredLanguage"] } - if ($null -ne $PSBoundParameters["StreetAddress"]) + if ($null -ne $PSBoundParameters["TelephoneNumber"]) { - $params["StreetAddress"] = $PSBoundParameters["StreetAddress"] + $params["BusinessPhones"] = $PSBoundParameters["TelephoneNumber"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["DisplayName"] = $PSBoundParameters["DisplayName"] } - if ($null -ne $PSBoundParameters["ImmutableId"]) + if ($null -ne $PSBoundParameters["OtherMails"]) { - $params["OnPremisesImmutableId"] = $PSBoundParameters["ImmutableId"] + $params["OtherMails"] = $PSBoundParameters["OtherMails"] } - if ($null -ne $PSBoundParameters["UserType"]) + if ($null -ne $PSBoundParameters["UserState"]) { - $params["UserType"] = $PSBoundParameters["UserType"] + $params["ExternalUserState"] = $PSBoundParameters["UserState"] } - if ($null -ne $PSBoundParameters["UserStateChangedOn"]) + if ($null -ne $PSBoundParameters["ExtensionProperty"]) { - $params["ExternalUserStateChangeDateTime"] = $PSBoundParameters["UserStateChangedOn"] + $params["ExtensionProperty"] = $PSBoundParameters["ExtensionProperty"] } - if ($null -ne $PSBoundParameters["GivenName"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["GivenName"] = $PSBoundParameters["GivenName"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if($null -ne $PSBoundParameters["PasswordProfile"]) + if ($null -ne $PSBoundParameters["Surname"]) { - $TmpValue = $PSBoundParameters["PasswordProfile"] - $Value = @{ - forceChangePasswordNextSignIn = $TmpValue.ForceChangePasswordNextLogin - forceChangePasswordNextSignInWithMfa = $TmpValue.EnforceChangePasswordPolicy - password = $TmpValue.Password - } - $params["PasswordProfile"] = $Value + $params["Surname"] = $PSBoundParameters["Surname"] } - if ($null -ne $PSBoundParameters["UsageLocation"]) + if ($null -ne $PSBoundParameters["JobTitle"]) { - $params["UsageLocation"] = $PSBoundParameters["UsageLocation"] + $params["JobTitle"] = $PSBoundParameters["JobTitle"] } if ($null -ne $PSBoundParameters["UserPrincipalName"]) { $params["UserPrincipalName"] = $PSBoundParameters["UserPrincipalName"] } - if ($null -ne $PSBoundParameters["Surname"]) + if ($null -ne $PSBoundParameters["Mobile"]) { - $params["Surname"] = $PSBoundParameters["Surname"] + $params["MobilePhone"] = $PSBoundParameters["Mobile"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationAction"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["PostalCode"]) + if ($null -ne $PSBoundParameters["MailNickName"]) { - $params["PostalCode"] = $PSBoundParameters["PostalCode"] + $params["MailNickName"] = $PSBoundParameters["MailNickName"] } - if ($null -ne $PSBoundParameters["Mobile"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["MobilePhone"] = $PSBoundParameters["Mobile"] + $params["UserId"] = $PSBoundParameters["UserId"] } if ($null -ne $PSBoundParameters["WarningVariable"]) { $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["AgeGroup"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["AgeGroup"] = $PSBoundParameters["AgeGroup"] } - if ($null -ne $PSBoundParameters["DisplayName"]) + if ($null -ne $PSBoundParameters["Country"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + $params["Country"] = $PSBoundParameters["Country"] + } + if ($null -ne $PSBoundParameters["IsCompromised"]) + { + $params["IsCompromised"] = $PSBoundParameters["IsCompromised"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 index 23cc509e8f..ebb8e61046 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserExtension.ps1 @@ -28,65 +28,65 @@ function Set-EntraBetaUserExtension { { $params["ExtensionName"] = $PSBoundParameters["ExtensionName"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["Id"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["Id"] = $PSBoundParameters["Id"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["Id"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["Id"] = $PSBoundParameters["Id"] } - if ($null -ne $PSBoundParameters["ExtensionValue"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["ExtensionValue"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["ExtensionValue"] = $PSBoundParameters["ExtensionValue"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ExtensionNameValues"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ExtensionNameValues"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ExtensionNameValues"] = $PSBoundParameters["ExtensionNameValues"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 index 4ef8ee927e..b0362bff2b 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserLicense.ps1 @@ -7,10 +7,10 @@ function Set-EntraBetaUserLicense { param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Microsoft.Open.AzureAD.Model.AssignedLicenses] $AssignedLicenses, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Microsoft.Open.AzureAD.Model.AssignedLicenses] $AssignedLicenses + [System.String] $ObjectId ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 index 230339a18e..079f656475 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserManager.ps1 @@ -5,75 +5,75 @@ function Set-EntraBetaUserManager { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Alias('ObjectId')] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $UserId, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $RefObjectId + [System.String] $RefObjectId, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["UserId"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["UserId"] = $PSBoundParameters["UserId"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) + if ($null -ne $PSBoundParameters["WarningVariable"]) { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["WarningAction"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } - if($PSBoundParameters.ContainsKey("Debug")) + if($null -ne $PSBoundParameters["RefObjectId"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $TmpValue = $PSBoundParameters["RefObjectId"] + $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} + $params["BodyParameter"] = $Value } - if ($null -ne $PSBoundParameters["ProgressAction"]) + if ($null -ne $PSBoundParameters["UserId"]) { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] + $params["UserId"] = $PSBoundParameters["UserId"] } - if($PSBoundParameters.ContainsKey("Verbose")) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["Verbose"] = $PSBoundParameters["Verbose"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if($PSBoundParameters.ContainsKey("Verbose")) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } - if($null -ne $PSBoundParameters["RefObjectId"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $TmpValue = $PSBoundParameters["RefObjectId"] - $Value = @{ "@odata.id" = "https://graph.microsoft.com/v1.0/users/$TmpValue"} - $params["BodyParameter"] = $Value + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 index 2ab8caf7d9..f4c544cde0 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserPassword.ps1 @@ -6,17 +6,17 @@ function Set-EntraBetaUserPassword { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $ObjectId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] $ForceChangePasswordNextLogin, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Boolean] $EnforceChangePasswordPolicy, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Security.SecureString] $Password, + [System.String] $ObjectId, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Boolean] $ForceChangePasswordNextLogin + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Security.SecureString] $Password ) PROCESS { diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 index e6640a9343..5421c0dd44 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/Users/Set-EntraBetaUserThumbnailPhoto.ps1 @@ -6,12 +6,6 @@ function Set-EntraBetaUserThumbnailPhoto { [CmdletBinding(DefaultParameterSetName = 'File')] param ( - [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.IO.Stream] $FileStream, - - [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Byte[]] $ImageByteArray, - [Parameter(ParameterSetName = "File", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $FilePath, [Alias('ObjectId')] @@ -19,28 +13,42 @@ function Set-EntraBetaUserThumbnailPhoto { [Parameter(ParameterSetName = "Stream")] [Parameter(ParameterSetName = "File")] [Parameter(ParameterSetName = "ByteArray")] - [System.String] $UserId + [System.String] $UserId, + + [Parameter(ParameterSetName = "ByteArray", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Byte[]] $ImageByteArray, + + [Parameter(ParameterSetName = "Stream", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.IO.Stream] $FileStream ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["FileStream"]) + if ($null -ne $PSBoundParameters["ProgressAction"]) { - $params["FileStream"] = $PSBoundParameters["FileStream"] + $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] } - if ($null -ne $PSBoundParameters["OutVariable"]) + if($PSBoundParameters.ContainsKey("Debug")) { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] + $params["Debug"] = $PSBoundParameters["Debug"] } - if ($null -ne $PSBoundParameters["PipelineVariable"]) + if ($null -ne $PSBoundParameters["OutBuffer"]) { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] + $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] } - if ($null -ne $PSBoundParameters["ImageByteArray"]) + if ($null -ne $PSBoundParameters["ErrorAction"]) { - $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] + $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + } + if ($null -ne $PSBoundParameters["WarningVariable"]) + { + $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + } + if ($null -ne $PSBoundParameters["WarningAction"]) + { + $params["WarningAction"] = $PSBoundParameters["WarningAction"] } if ($null -ne $PSBoundParameters["FilePath"]) { @@ -50,45 +58,37 @@ function Set-EntraBetaUserThumbnailPhoto { { $params["UserId"] = $PSBoundParameters["UserId"] } - if ($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if ($null -ne $PSBoundParameters["InformationVariable"]) + if ($null -ne $PSBoundParameters["OutVariable"]) { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] + $params["OutVariable"] = $PSBoundParameters["OutVariable"] } if($PSBoundParameters.ContainsKey("Verbose")) { $params["Verbose"] = $PSBoundParameters["Verbose"] } - if ($null -ne $PSBoundParameters["ProgressAction"]) - { - $params["ProgressAction"] = $PSBoundParameters["ProgressAction"] - } - if($PSBoundParameters.ContainsKey("Debug")) + if ($null -ne $PSBoundParameters["ImageByteArray"]) { - $params["Debug"] = $PSBoundParameters["Debug"] + $params["ImageByteArray"] = $PSBoundParameters["ImageByteArray"] } - if ($null -ne $PSBoundParameters["OutBuffer"]) + if ($null -ne $PSBoundParameters["PipelineVariable"]) { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] + $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] } - if ($null -ne $PSBoundParameters["ErrorAction"]) + if ($null -ne $PSBoundParameters["InformationVariable"]) { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] + $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] } if ($null -ne $PSBoundParameters["InformationAction"]) { $params["InformationAction"] = $PSBoundParameters["InformationAction"] } - if ($null -ne $PSBoundParameters["WarningVariable"]) + if ($null -ne $PSBoundParameters["ErrorVariable"]) { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] + $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] } - if ($null -ne $PSBoundParameters["WarningAction"]) + if ($null -ne $PSBoundParameters["FileStream"]) { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] + $params["FileStream"] = $PSBoundParameters["FileStream"] } Write-Debug("============================ TRANSFORMATIONS ============================") diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 b/module/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 rename to module/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 index 72b1ab5c7b..fc9b79a38c 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/Enable-EntraBetaAzureADAlias.ps1 +++ b/module/EntraBeta/UnMappedFiles/Enable-EntraAzureADAlias.ps1 @@ -3,251 +3,251 @@ # Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ function Enable-EntraAzureADAlias { - Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPasswordSingleSignOnCredential -Value Remove-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinition -Value Set-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name New-AzureADMSInvitation -Value New-EntraBetaInvitation -Scope Global -Force - Set-Alias -Name Remove-AzureADAdministrativeUnit -Value Remove-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraBetaObjectByObjectId -Scope Global -Force - Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraBetaApplicationProxyApplication -Scope Global -Force - Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraBetaDeletedApplication -Scope Global -Force - Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraBetaContactDirectReport -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalPolicy -Value Add-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraBetaDeletedApplication -Scope Global -Force - Set-Alias -Name New-AzureADObjectSetting -Value New-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - Set-Alias -Name Get-AzureADAdministrativeUnitMember -Value Get-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Get-AzureADContract -Value Get-EntraBetaContract -Scope Global -Force - Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Get-AzureADContact -Value Get-EntraBetaContact -Scope Global -Force - Set-Alias -Name Set-AzureADPolicy -Value Set-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraBetaNamedLocationPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADContactManager -Value Get-EntraBetaContactManager -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraBetaLifeCycleGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraBetaUserMembership -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationFromApplicationTemplate -Value New-EntraBetaApplicationFromApplicationTemplate -Scope Global -Force - Set-Alias -Name New-AzureADMSGroup -Value New-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADObjectSetting -Value Set-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationPolicy -Value Remove-EntraBetaApplicationPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADAdministrativeUnitMember -Value Add-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Add-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraBetaUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraBetaTenantDetail -Scope Global -Force + Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraBetaPermissionGrantPolicy -Scope Global -Force Set-Alias -Name Get-AzureADApplicationSignInDetailedSummary -Value Get-EntraBetaApplicationSignInDetailedSummary -Scope Global -Force - Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraBetaUserOwnedDevice -Scope Global -Force - Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraBetaUserExtension -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraBetaApplicationPassword -Scope Global -Force + Set-Alias -Name Set-AzureADDirectorySetting -Value Set-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSCustomSecurityAttributeDefinition -Value New-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraBetaApplicationKey -Scope Global -Force + Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraBetaDirectoryRole -Scope Global -Force + Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name New-AzureADMSGroup -Value New-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Reset-AzureADMSLifeCycleGroup -Value Reset-EntraBetaLifeCycleGroup -Scope Global -Force + Set-Alias -Name Get-AzureADAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraBetaApplicationLogo -Scope Global -Force + Set-Alias -Name Set-AzureADMSNamedLocationPolicy -Value Set-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraBetaDirectoryRoleTemplate -Scope Global -Force + Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicy -Value Remove-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name New-AzureADDirectorySetting -Value New-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADMSTrustFrameworkPolicy -Value New-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraBetaGroupIdsUserIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADDeletedApplication -Value Remove-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Set-AzureADDomain -Value Set-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraBetaUserRegisteredDevice -Scope Global -Force Set-Alias -Name New-AzureADApplicationPasswordCredential -Value New-EntraBetaApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name New-AzureADDevice -Value New-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Set-AzureADUserManager -Value Set-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name Get-AzureADDevice -Value Get-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Get-AzureADMSAttributeSet -Value Get-EntraBetaAttributeSet -Scope Global -Force - Set-Alias -Name Get-AzureADMSApplicationTemplate -Value Get-EntraBetaApplicationTemplate -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraBetaServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Get-AzureADUserManager -Value Get-EntraBetaUserManager -Scope Global -Force - Set-Alias -Name Get-AzureADUserThumbnailPhoto -Value Get-EntraBetaUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name New-AzureADPolicy -Value New-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraBetaDomainVerificationDnsRecord -Scope Global -Force - Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinition -Value Get-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Get-AzureADScopedRoleMembership -Value Get-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name Get-AzureADGroup -Value Get-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraBetaApplicationPassword -Scope Global -Force - Set-Alias -Name Get-AzureADDirectorySetting -Value Get-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraBetaAuthorizationPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraBetaDomain -Scope Global -Force Set-Alias -Name Remove-AzureADServicePrincipalPasswordCredential -Value Remove-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPolicy -Value Get-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADApplicationPolicy -Value Add-EntraBetaApplicationPolicy -Scope Global -Force Set-Alias -Name Add-AzureADMScustomSecurityAttributeDefinitionAllowedValues -Value Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - Set-Alias -Name Remove-AzureADDirectorySetting -Value Remove-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Set-AzureADMSAttributeSet -Value Set-EntraBetaAttributeSet -Scope Global -Force - Set-Alias -Name Get-AzureADApplication -Value Get-EntraBetaApplication -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantConditionSet -Value New-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Set-AzureADMSPermissionGrantPolicy -Value Set-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraBetaDeletedGroup -Scope Global -Force - Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraBetaUserThumbnailPhoto -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnitMember -Value New-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force - Set-Alias -Name Remove-AzureADMSIdentityProvider -Value Remove-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraBetaGroupIdsGroupIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name Get-AzureADDomainVerificationDnsRecord -Value Get-EntraBetaDomainVerificationDnsRecord -Scope Global -Force + Set-Alias -Name Get-AzureADMSApplicationTemplate -Value Get-EntraBetaApplicationTemplate -Scope Global -Force + Set-Alias -Name Get-AzureADDomain -Value Get-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalPolicy -Value Remove-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSPasswordSingleSignOnCredential -Value New-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleSetting -Value Get-EntraBetaPrivilegedRoleSetting -Scope Global -Force + Set-Alias -Name Get-AzureADObjectSetting -Value Get-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationPassword -Value New-EntraBetaApplicationPassword -Scope Global -Force + Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraBetaUserCreatedObject -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraBetaDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Get-AzureADMSAttributeSet -Value Get-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Remove-AzureADScopedRoleMembership -Value Remove-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyApplication -Value Get-EntraBetaApplicationProxyApplication -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraBetaGroupIdsContactIsMemberOf -Scope Global -Force + Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSPasswordSingleSignOnCredential -Value Get-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraBetaDirectoryRoleMember -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force + Set-Alias -Name Get-AzureADAdministrativeUnitMember -Value Get-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedRoleDefinition -Value Get-EntraBetaPrivilegedRoleDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraBetaDomainNameReference -Scope Global -Force Set-Alias -Name Get-AzureADServicePrincipal -Value Get-EntraBetaServicePrincipal -Scope Global -Force + Set-Alias -Name New-AzureADMSAdministrativeUnitMember -Value New-EntraBetaAdministrativeUnitMember -Scope Global -Force Set-Alias -Name Get-AzureADUser -Value Get-EntraBetaUser -Scope Global -Force - Set-Alias -Name New-AzureADMSApplication -Value New-EntraBetaApplication -Scope Global -Force - Set-Alias -Name Get-AzureADPolicy -Value Get-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADApplicationPolicy -Value Add-EntraBetaApplicationPolicy -Scope Global -Force - Set-Alias -Name New-AzureADMSTrustFrameworkPolicy -Value New-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraBetaServicePrincipalCreatedObject -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationFromApplicationTemplate -Value New-EntraBetaApplicationFromApplicationTemplate -Scope Global -Force Set-Alias -Name Get-AzureADServiceAppRoleAssignment -Value Get-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADContact -Value Remove-EntraBetaContact -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraBetaApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraBetaServicePrincipalOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Set-AzureADDomain -Value Set-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraBetaUserAllRefreshToken -Scope Global -Force Set-Alias -Name Get-AzureADMSAuthorizationPolicy -Value Get-EntraBetaAuthorizationPolicy -Scope Global -Force - Set-Alias -Name Add-AzureADScopedRoleMembership -Value Add-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipal -Value New-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name New-AzureADMSAttributeSet -Value New-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationPassword -Value Remove-EntraBetaApplicationPassword -Scope Global -Force + Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraBetaApplicationVerifiedPublisher -Scope Global -Force Set-Alias -Name Get-AzureADUserOwnedObject -Value Get-EntraBetaUserOwnedObject -Scope Global -Force - Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedResource -Value Get-EntraBetaPrivilegedResource -Scope Global -Force - Set-Alias -Name Set-AzureADMSPasswordSingleSignOnCredential -Value Set-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Get-AzureADDirectorySettingTemplate -Value Get-EntraBetaDirectorySettingTemplate -Scope Global -Force - Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraBetaTenantDetail -Scope Global -Force - Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force - Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraBetaGroupPermissionGrant -Scope Global -Force - Set-Alias -Name Remove-AzureADUserAppRoleAssignment -Value Remove-EntraBetaUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADMSPasswordSingleSignOnCredential -Value Get-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Set-AzureADTenantDetail -Value Set-EntraBetaTenantDetail -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleSetting -Value Get-EntraBetaPrivilegedRoleSetting -Scope Global -Force - Set-Alias -Name Get-AzureADMSLifecyclePolicyGroup -Value Get-EntraBetaLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraBetaServicePrincipalKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Remove-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force - Set-Alias -Name Get-AzureADMSRoleAssignment -Value Get-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADMSCustomSecurityAttributeDefinition -Value New-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force - Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraBetaPermissionGrantPolicy -Scope Global -Force - Set-Alias -Name Confirm-AzureADDomain -Value Confirm-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraBetaUserLicenseDetail -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraBetaSignedInUserAllRefreshToken -Scope Global -Force + Set-Alias -Name Get-AzureADUserMembership -Value Get-EntraBetaUserMembership -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOAuth2PermissionGrant -Value Get-EntraBetaServicePrincipalOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Set-AzureADMSIdentityProvider -Value Set-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name Set-AzureADUserExtension -Value Set-EntraBetaUserExtension -Scope Global -Force Set-Alias -Name Set-AzureADMSGroup -Value Set-EntraBetaGroup -Scope Global -Force - Set-Alias -Name New-AzureADMSAdministrativeUnit -Value New-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraBetaIdentityProvider -Scope Global -Force - Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Set-AzureADObjectSetting -Value Set-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantPolicy -Value Remove-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSAttributeSet -Value New-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraBetaApplicationOwner -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force + Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Get-AzureADUserManager -Value Get-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraBetaSubscribedSku -Scope Global -Force + Set-Alias -Name Get-AzureADMSRoleDefinition -Value Get-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Add-AzureADDeviceRegisteredUser -Value Add-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name Set-AzureADUserManager -Value Set-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraBetaApplicationExtensionProperty -Scope Global -Force Set-Alias -Name New-AzureADMSGroupLifecyclePolicy -Value New-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsGroupIsMemberOf -Value Select-EntraBetaGroupIdsGroupIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraBetaApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name Remove-AzureADScopedRoleMembership -Value Remove-EntraBetaScopedRoleMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADMSGroupLifecyclePolicy -Value Remove-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraBetaApplicationVerifiedPublisher -Scope Global -Force + Set-Alias -Name Get-AzureADGroupAppRoleAssignment -Value Get-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADContactManager -Value Get-EntraBetaContactManager -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalOwner -Value Remove-EntraBetaServicePrincipalOwner -Scope Global -Force Set-Alias -Name New-AzureADMSFeatureRolloutPolicy -Value New-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADPolicyAppliedObject -Value Get-EntraBetaPolicyAppliedObject -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraBetaServicePrincipalOwnedObject -Scope Global -Force + Set-Alias -Name Set-AzureADPolicy -Value Set-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSRoleDefinition -Value Remove-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraBetaDirectoryRoleMember -Scope Global -Force Set-Alias -Name Add-AzureADDeviceRegisteredOwner -Value Add-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADObjectByObjectId -Value Get-EntraBetaObjectByObjectId -Scope Global -Force + Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSPermissionGrantPolicy -Value New-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSApplication -Value New-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Get-AzureADTenantDetail -Value Get-EntraBetaTenantDetail -Scope Global -Force + Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraBetaUserPassword -Scope Global -Force + Set-Alias -Name Get-AzureADPolicyAppliedObject -Value Get-EntraBetaPolicyAppliedObject -Scope Global -Force + Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraBetaGroupLifecyclePolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSGroupPermissionGrant -Value Get-EntraBetaGroupPermissionGrant -Scope Global -Force + Set-Alias -Name Remove-AzureADDomain -Value Remove-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Get-AzureADScopedRoleMembership -Value Get-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDeletedApplication -Value Get-EntraBetaDeletedApplication -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADMSIdentityProvider -Value Get-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraBetaApplicationKeyCredential -Scope Global -Force + Set-Alias -Name Get-AzureADUserOwnedDevice -Value Get-EntraBetaUserOwnedDevice -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPolicy -Value Get-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraBetaServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Get-AzureADPolicy -Value Get-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name New-AzureADMSInvitation -Value New-EntraBetaInvitation -Scope Global -Force + Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraBetaDeletedDirectoryObject -Scope Global -Force + Set-Alias -Name Remove-AzureADAdministrativeUnitMember -Value Remove-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADMSPrivilegedResource -Value Get-EntraBetaPrivilegedResource -Scope Global -Force + Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force + Set-Alias -Name New-AzureADMSIdentityProvider -Value New-EntraBetaIdentityProvider -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraBetaLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name Get-AzureADMSFeatureRolloutPolicy -Value Get-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationKeyCredential -Value Remove-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Add-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Add-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force - Set-Alias -Name Add-AzureADGroupMember -Value Add-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationSignInSummary -Value Get-EntraBetaApplicationSignInSummary -Scope Global -Force + Set-Alias -Name Remove-AzureADMSPasswordSingleSignOnCredential -Value Remove-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredUser -Value Get-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupMember -Value Remove-EntraBetaGroupMember -Scope Global -Force + Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraBetaSignedInUserPassword -Scope Global -Force + Set-Alias -Name Set-AzureADMSAdministrativeUnit -Value Set-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraBetaUserOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name New-AzureADPrivilegedRoleAssignment -Value New-EntraBetaPrivilegedRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraBetaUserExtension -Scope Global -Force + Set-Alias -Name New-AzureADTrustedCertificateAuthority -Value New-EntraBetaTrustedCertificateAuthority -Scope Global -Force + Set-Alias -Name Get-AzureADMSNamedLocationPolicy -Value Get-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationLogo -Value Get-EntraBetaApplicationLogo -Scope Global -Force + Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraBetaDeviceRegisteredUser -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalPasswordCredential -Value New-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleDefinition -Value New-EntraBetaDirectoryRoleDefinition -Scope Global -Force + Set-Alias -Name Set-AzureADMSPermissionGrantConditionSet -Value Set-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Get-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Get-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Set-AzureADMSAttributeSet -Value Set-EntraBetaAttributeSet -Scope Global -Force + Set-Alias -Name Get-AzureADApplication -Value Get-EntraBetaApplication -Scope Global -Force + Set-Alias -Name Get-AzureADMSTrustFrameworkPolicy -Value Get-EntraBetaTrustFrameworkPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationProxyApplication -Value Remove-EntraBetaApplicationProxyApplication -Scope Global -Force - Set-Alias -Name Set-AzureADMSFeatureRolloutPolicy -Value Set-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADAdministrativeUnitMember -Value Remove-EntraBetaAdministrativeUnitMember -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalMembership -Value Get-EntraBetaServicePrincipalMembership -Scope Global -Force + Set-Alias -Name Get-AzureADDevice -Value Get-EntraBetaDevice -Scope Global -Force + Set-Alias -Name New-AzureADObjectSetting -Value New-EntraBetaObjectSetting -Scope Global -Force + Set-Alias -Name New-AzureADPolicy -Value New-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSCustomSecurityAttributeDefinition -Value Set-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Get-AzureADContact -Value Get-EntraBetaContact -Scope Global -Force + Set-Alias -Name Remove-AzureADPolicy -Value Remove-EntraBetaPolicy -Scope Global -Force + Set-Alias -Name Remove-AzureADMSConditionalAccessPolicy -Value Remove-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADAdministrativeUnitMember -Value Add-EntraBetaAdministrativeUnitMember -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalKeyCredential -Value Get-EntraBetaServicePrincipalKeyCredential -Scope Global -Force + Set-Alias -Name Set-AzureADDevice -Value Set-EntraBetaDevice -Scope Global -Force Set-Alias -Name Set-AzureADTrustedCertificateAuthority -Value Set-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADObjectSetting -Value Get-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Set-AzureADServicePrincipal -Value Set-EntraBetaServicePrincipal -Scope Global -Force - Set-Alias -Name Remove-AzureADMSTrustFrameworkPolicy -Value Remove-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADSubscribedSku -Value Get-EntraBetaSubscribedSku -Scope Global -Force - Set-Alias -Name New-AzureADMSPasswordSingleSignOnCredential -Value New-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force - Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraBetaServicePrincipalOwner -Scope Global -Force + Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraBetaGroupIdsServicePrincipalIsMemberOf -Scope Global -Force + Set-Alias -Name Set-AzureADUserThumbnailPhoto -Value Set-EntraBetaUserThumbnailPhoto -Scope Global -Force + Set-Alias -Name Set-AzureADMSPasswordSingleSignOnCredential -Value Set-EntraBetaPasswordSingleSignOnCredential -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRole -Value Get-EntraBetaPrivilegedRole -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupAppRoleAssignment -Value Remove-EntraBetaGroupAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADContact -Value Remove-EntraBetaContact -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationExtensionProperty -Value Remove-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraBetaContactMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADGroupOwner -Value Remove-EntraBetaGroupOwner -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationPolicy -Value Remove-EntraBetaApplicationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADContactDirectReport -Value Get-EntraBetaContactDirectReport -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipal -Value Remove-EntraBetaServicePrincipal -Scope Global -Force Set-Alias -Name Add-AzureADApplicationOwner -Value Add-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Set-AzureADDirectorySetting -Value Set-EntraBetaDirectorySetting -Scope Global -Force - Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Get-AzureADDomainNameReference -Value Get-EntraBetaDomainNameReference -Scope Global -Force - Set-Alias -Name New-AzureADMSConditionalAccessPolicy -Value New-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADMSGroupLifecyclePolicy -Value Set-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADMSLifecyclePolicyGroup -Value Remove-EntraBetaLifecyclePolicyGroup -Scope Global -Force - Set-Alias -Name New-AzureADDomain -Value New-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Set-AzureADMSAuthorizationPolicy -Value Set-EntraBetaAuthorizationPolicy -Scope Global -Force - Set-Alias -Name Remove-AzureADUserExtension -Value Remove-EntraBetaUserExtension -Scope Global -Force - Set-Alias -Name Remove-AzureADUser -Value Remove-EntraBetaUser -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsContactIsMemberOf -Value Select-EntraBetaGroupIdsContactIsMemberOf -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationKeyCredential -Value Get-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRoleTemplate -Value Get-EntraBetaDirectoryRoleTemplate -Scope Global -Force - Set-Alias -Name Remove-AzureADMSPermissionGrantConditionSet -Value Remove-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Remove-AzureADPolicy -Value Remove-EntraBetaPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADDomain -Value Get-EntraBetaDomain -Scope Global -Force - Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinitionAllowedValue -Value Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalOwner -Value Get-EntraBetaServicePrincipalOwner -Scope Global -Force - Set-Alias -Name Get-AzureADUserRegisteredDevice -Value Get-EntraBetaUserRegisteredDevice -Scope Global -Force + Set-Alias -Name Remove-AzureADMSTrustFrameworkPolicy -Value Remove-EntraBetaTrustFrameworkPolicy -Scope Global -Force + Set-Alias -Name Add-AzureADGroupOwner -Value Add-EntraBetaGroupOwner -Scope Global -Force Set-Alias -Name Restore-AzureADDeletedApplication -Value Restore-EntraBetaDeletedApplication -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsUserIsMemberOf -Value Select-EntraBetaGroupIdsUserIsMemberOf -Scope Global -Force - Set-Alias -Name Get-AzureADGroupOwner -Value Get-EntraBetaGroupOwner -Scope Global -Force - Set-Alias -Name Get-AzureADUserExtension -Value Get-EntraBetaUserExtension -Scope Global -Force - Set-Alias -Name Get-AzureADUserLicenseDetail -Value Get-EntraBetaUserLicenseDetail -Scope Global -Force - Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraBetaUserDirectReport -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredOwner -Value Remove-EntraBetaDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Select-AzureADGroupIdsServicePrincipalIsMemberOf -Value Select-EntraBetaGroupIdsServicePrincipalIsMemberOf -Scope Global -Force - Set-Alias -Name Remove-AzureADObjectSetting -Value Remove-EntraBetaObjectSetting -Scope Global -Force - Set-Alias -Name Add-AzureADDirectoryRoleMember -Value Add-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name New-AzureADDirectorySetting -Value New-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSPrivilegedRoleSetting -Value Set-EntraBetaPrivilegedRoleSetting -Scope Global -Force + Set-Alias -Name Get-AzureADGroup -Value Get-EntraBetaGroup -Scope Global -Force + Set-Alias -Name Get-AzureADMSDeletedGroup -Value Get-EntraBetaDeletedGroup -Scope Global -Force + Set-Alias -Name New-AzureADDevice -Value New-EntraBetaDevice -Scope Global -Force + Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraBetaLifecyclePolicyGroup -Scope Global -Force Set-Alias -Name New-AzureADUser -Value New-EntraBetaUser -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplication -Value Set-EntraBetaApplication -Scope Global -Force - Set-Alias -Name Get-AzureADAuditSignInLogs -Value Get-EntraBetaAuditSignInLog -Scope Global -Force + Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraBetaApplicationKey -Scope Global -Force Set-Alias -Name Remove-AzureADApplicationPasswordCredential -Value Remove-EntraBetaApplicationPasswordCredential -Scope Global -Force - Set-Alias -Name New-AzureADUserAppRoleAssignment -Value New-EntraBetaUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Remove-AzureADServiceAppRoleAssignment -Value Remove-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Set-AzureADMSApplicationVerifiedPublisher -Value Set-EntraBetaApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Get-AzureADUserCreatedObject -Value Get-EntraBetaUserCreatedObject -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalCreatedObject -Value Get-EntraBetaServicePrincipalCreatedObject -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraBetaDeviceRegisteredOwner -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRole -Value Get-EntraBetaPrivilegedRole -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRoleMember -Value Get-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name New-AzureADApplicationExtensionProperty -Value New-EntraBetaApplicationExtensionProperty -Scope Global -Force + Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraBetaUserAppRoleAssignment -Scope Global -Force + Set-Alias -Name Remove-AzureADUserManager -Value Remove-EntraBetaUserManager -Scope Global -Force + Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force + Set-Alias -Name Get-AzureADDirectorySettingTemplate -Value Get-EntraBetaDirectorySettingTemplate -Scope Global -Force + Set-Alias -Name Get-AzureADServicePrincipalOwnedObject -Value Get-EntraBetaServicePrincipalOwnedObject -Scope Global -Force Set-Alias -Name Set-AzureADMSTrustFrameworkPolicy -Value Set-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationLogo -Value Set-EntraBetaApplicationLogo -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationOwner -Value Get-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraBetaPermissionGrantConditionSet -Scope Global -Force - Set-Alias -Name Remove-AzureADMSNamedLocationPolicy -Value Remove-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADMSCustomSecurityAttributeDefinition -Value Get-EntraBetaCustomSecurityAttributeDefinition -Scope Global -Force + Set-Alias -Name Remove-AzureADAdministrativeUnit -Value Remove-EntraBetaAdministrativeUnit -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantPolicy -Value Get-EntraBetaPermissionGrantPolicy -Scope Global -Force + Set-Alias -Name New-AzureADDomain -Value New-EntraBetaDomain -Scope Global -Force + Set-Alias -Name Add-AzureADScopedRoleMembership -Value Add-EntraBetaScopedRoleMembership -Scope Global -Force + Set-Alias -Name Remove-AzureADObjectSetting -Value Remove-EntraBetaObjectSetting -Scope Global -Force Set-Alias -Name Set-AzureADUser -Value Set-EntraBetaUser -Scope Global -Force - Set-Alias -Name Get-AzureADDirectoryRole -Value Get-EntraBetaDirectoryRole -Scope Global -Force - Set-Alias -Name Get-AzureADMSPrivilegedRoleDefinition -Value Get-EntraBetaPrivilegedRoleDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraBetaUserLicense -Scope Global -Force - Set-Alias -Name Get-AzureADMSGroupLifecyclePolicy -Value Get-EntraBetaGroupLifecyclePolicy -Scope Global -Force - Set-Alias -Name Update-AzureADSignedInUserPassword -Value Update-EntraBetaSignedInUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADUserOAuth2PermissionGrant -Value Get-EntraBetaUserOAuth2PermissionGrant -Scope Global -Force - Set-Alias -Name Revoke-AzureADSignedInUserAllRefreshToken -Value Revoke-EntraBetaSignedInUserAllRefreshToken -Scope Global -Force - Set-Alias -Name Set-AzureADMSPrivilegedRoleSetting -Value Set-EntraBetaPrivilegedRoleSetting -Scope Global -Force - Set-Alias -Name Enable-AzureADDirectoryRole -Value Enable-EntraBetaDirectoryRole -Scope Global -Force - Set-Alias -Name Get-AzureADContactMembership -Value Get-EntraBetaContactMembership -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationKey -Value Remove-EntraBetaApplicationKey -Scope Global -Force - Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicy -Value Remove-EntraBetaFeatureRolloutPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationExtensionProperty -Value Get-EntraBetaApplicationExtensionProperty -Scope Global -Force - Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADGroupMember -Value Get-EntraBetaGroupMember -Scope Global -Force - Set-Alias -Name Remove-AzureADDeviceRegisteredUser -Value Remove-EntraBetaDeviceRegisteredUser -Scope Global -Force - Set-Alias -Name Set-AzureADMSRoleDefinition -Value Set-EntraBetaDirectoryRoleDefinition -Scope Global -Force - Set-Alias -Name Set-AzureADMSPrivilegedRoleAssignmentRequest -Value Set-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force - Set-Alias -Name New-AzureADMSRoleAssignment -Value New-EntraBetaDirectoryRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraBetaDomainServiceConfigurationRecord -Scope Global -Force - Set-Alias -Name Set-AzureADDevice -Value Set-EntraBetaDevice -Scope Global -Force - Set-Alias -Name Remove-AzureADApplication -Value Remove-EntraBetaApplication -Scope Global -Force - Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraBetaConditionalAccessPolicy -Scope Global -Force - Set-Alias -Name New-AzureADApplicationKeyCredential -Value New-EntraBetaApplicationKeyCredential -Scope Global -Force - Set-Alias -Name Remove-AzureADTrustedCertificateAuthority -Value Remove-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Get-AzureADUserAppRoleAssignment -Value Get-EntraBetaUserAppRoleAssignment -Scope Global -Force - Set-Alias -Name Get-AzureADMSTrustFrameworkPolicy -Value Get-EntraBetaTrustFrameworkPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADTrustedCertificateAuthority -Value Get-EntraBetaTrustedCertificateAuthority -Scope Global -Force - Set-Alias -Name Remove-AzureADGroup -Value Remove-EntraBetaGroup -Scope Global -Force - Set-Alias -Name Get-AzureADMSDeletedDirectoryObject -Value Get-EntraBetaDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationOwner -Value Remove-EntraBetaApplicationOwner -Scope Global -Force - Set-Alias -Name Remove-AzureADMSDeletedDirectoryObject -Value Remove-EntraBetaDeletedDirectoryObject -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPolicy -Value Get-EntraBetaServicePrincipalPolicy -Scope Global -Force - Set-Alias -Name Get-AzureADServicePrincipalPasswordCredential -Value Get-EntraBetaServicePrincipalPasswordCredential -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalOwner -Value Add-EntraBetaServicePrincipalOwner -Scope Global -Force Set-Alias -Name Remove-AzureADOAuth2PermissionGrant -Value Remove-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Remove-AzureADMSFeatureRolloutPolicyDirectoryObject -Value Remove-EntraBetaFeatureRolloutPolicyDirectoryObject -Scope Global -Force + Set-Alias -Name Add-AzureADServicePrincipalPolicy -Value Add-EntraBetaServicePrincipalPolicy -Scope Global -Force Set-Alias -Name Remove-AzureADDirectoryRoleMember -Value Remove-EntraBetaDirectoryRoleMember -Scope Global -Force - Set-Alias -Name New-AzureADMSApplicationKey -Value New-EntraBetaApplicationKey -Scope Global -Force - Set-Alias -Name New-AzureADGroupAppRoleAssignment -Value New-EntraBetaGroupAppRoleAssignment -Scope Global -Force - Set-Alias -Name New-AzureADPrivilegedRoleAssignment -Value New-EntraBetaPrivilegedRoleAssignment -Scope Global -Force - Set-Alias -Name Revoke-AzureADUserAllRefreshToken -Value Revoke-EntraBetaUserAllRefreshToken -Scope Global -Force + Set-Alias -Name New-AzureADServiceAppRoleAssignment -Value New-EntraBetaServicePrincipalAppRoleAssignment -Scope Global -Force + Set-Alias -Name New-AzureADMSNamedLocationPolicy -Value New-EntraBetaNamedLocationPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADDirectorySetting -Value Get-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Remove-AzureADDevice -Value Remove-EntraBetaDevice -Scope Global -Force Set-Alias -Name Get-AzureADAdministrativeUnit -Value Get-EntraBetaAdministrativeUnit -Scope Global -Force - Set-Alias -Name Remove-AzureADMSApplicationVerifiedPublisher -Value Remove-EntraBetaApplicationVerifiedPublisher -Scope Global -Force - Set-Alias -Name Set-AzureADUserPassword -Value Set-EntraBetaUserPassword -Scope Global -Force - Set-Alias -Name Get-AzureADServiceAppRoleAssignedTo -Value Get-EntraBetaServicePrincipalAppRoleAssignedTo -Scope Global -Force - Set-Alias -Name Add-AzureADMSLifecyclePolicyGroup -Value Add-EntraBetaLifecyclePolicyGroup -Scope Global -Force + Set-Alias -Name Get-AzureADDomainServiceConfigurationRecord -Value Get-EntraBetaDomainServiceConfigurationRecord -Scope Global -Force + Set-Alias -Name Set-AzureADUserLicense -Value Set-EntraBetaUserLicense -Scope Global -Force + Set-Alias -Name Remove-AzureADDirectorySetting -Value Remove-EntraBetaDirectorySetting -Scope Global -Force + Set-Alias -Name Set-AzureADMSPrivilegedRoleAssignmentRequest -Value Set-EntraBetaPrivilegedRoleAssignmentRequest -Scope Global -Force + Set-Alias -Name Add-AzureADMSServicePrincipalDelegatedPermissionClassification -Value Add-EntraBetaServicePrincipalDelegatedPermissionClassification -Scope Global -Force + Set-Alias -Name Set-AzureADMSConditionalAccessPolicy -Value Set-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Set-AzureADMSFeatureRolloutPolicy -Value Set-EntraBetaFeatureRolloutPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceRegisteredOwner -Value Get-EntraBetaDeviceRegisteredOwner -Scope Global -Force + Set-Alias -Name Get-AzureADMSPermissionGrantConditionSet -Value Get-EntraBetaPermissionGrantConditionSet -Scope Global -Force + Set-Alias -Name Remove-AzureADUser -Value Remove-EntraBetaUser -Scope Global -Force + Set-Alias -Name Get-AzureADMSConditionalAccessPolicy -Value Get-EntraBetaConditionalAccessPolicy -Scope Global -Force + Set-Alias -Name Get-AzureADAuditDirectoryLogs -Value Get-EntraBetaAuditDirectoryLog -Scope Global -Force + Set-Alias -Name Get-AzureADOAuth2PermissionGrant -Value Get-EntraBetaOAuth2PermissionGrant -Scope Global -Force + Set-Alias -Name Get-AzureADContract -Value Get-EntraBetaContract -Scope Global -Force + Set-Alias -Name Get-AzureADUserDirectReport -Value Get-EntraBetaUserDirectReport -Scope Global -Force Set-Alias -Name Get-CrossCloudVerificationCode -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force @@ -256,38 +256,38 @@ function Enable-EntraAzureADAlias { Set-Alias -Name Remove-RbacApplicationRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-RbacApplicationRoleDefinition -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Close-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationSingleSignOn -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Open-AzureADMSPrivilegedRoleAssignmentRequest -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationCustomDomainCertificate -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name New-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADCurrentSessionInfo -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Remove-AzureADContactManager -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name New-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationPasswordCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplication -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADDeviceConfiguration -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Set-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADContactThumbnailPhoto -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Restore-AzureADMSDeletedDirectoryObject -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorMemberOf -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Get-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force - Set-Alias -Name Get-AzureADApplicationProxyConnector -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationProxyConnectorGroupMembers -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Set-AzureADApplicationProxyApplicationConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name New-AzureADServicePrincipalKeyCredential -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Add-AzureADMSPrivilegedResource -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADPrivilegedRoleAssignment -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExtensionProperty -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADExternalDomainFederation -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Remove-AzureADApplicationProxyConnectorGroup -Value Get-EntraUnsupportedCommand -Scope Global -Force + Set-Alias -Name Get-AzureADApplicationServiceEndpoint -Value Get-EntraUnsupportedCommand -Scope Global -Force Set-Alias -Name Connect-AzureAD -Value Connect-EntraBeta -Scope Global -Force Set-Alias -Name Disconnect-AzureAD -Value Disconnect-EntraBeta -Scope Global -Force Set-Alias -Name Remove-EntraBetaRoleAssignment -Value Remove-EntraBetaDirectoryRoleAssignment -Scope Global -Force diff --git a/module/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 b/module/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 deleted file mode 100644 index c56d6afba6..0000000000 --- a/module/EntraBeta/UnMappedFiles/Get-EntraBetaDirSyncfeature.ps1 +++ /dev/null @@ -1,89 +0,0 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ -function Get-EntraBetaDirSyncfeature { - [CmdletBinding(DefaultParameterSetName = 'GetQuery')] - param ( - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String]$Feature - ) - PROCESS { - $params = @{} - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($PSBoundParameters.ContainsKey("Verbose")) { - $params["Verbose"] = $PSBoundParameters["Verbose"] - } - if ($null -ne $PSBoundParameters["Feature"]) { - $Feature = $PSBoundParameters["Feature"] - } - if ($null -ne $PSBoundParameters["TenantId"]) { - $params["OnPremisesDirectorySynchronizationId"] = $PSBoundParameters["TenantId"] - } - if ($PSBoundParameters.ContainsKey("Debug")) { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug - Write-Debug("=========================================================================`n") - $jsonData = Get-MgBetaDirectoryOnPremiseSynchronization @params -Headers $customHeaders | ConvertTo-Json - $object = ConvertFrom-Json $jsonData - $table =@() - foreach ($featureName in $object.Features.PSObject.Properties.Name) { - $row = New-Object PSObject -Property @{ - 'DirSyncFeature' = $featureName -replace "Enabled", "" - 'Enabled' = $object.Features.$featureName - } - $table += $row - } - if([string]::IsNullOrWhiteSpace($Feature)) { - $table | Format-Table -AutoSize - } - else { - $output = $table | Where-Object {$_.dirsyncFeature -eq $Feature} - if($null -eq $output) { - Write-Error "Get-EntraBetaDirSyncfeature : Invalid value for parameter. Parameter Name: Feature." - } - else { - $output - } - } - } - }# ------------------------------------------------------------------------------ - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 b/module/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Entra.Beta/Applications/Get-EntraUnsupportedCommand.ps1 rename to module/EntraBeta/UnMappedFiles/Get-EntraUnsupportedCommand.ps1 diff --git a/module/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 b/module/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 new file mode 100644 index 0000000000..16c1e3b342 --- /dev/null +++ b/module/EntraBeta/UnMappedFiles/New-EntraBetaCustomHeaders.ps1 @@ -0,0 +1,29 @@ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ +function New-EntraBetaCustomHeaders { + <# + .SYNOPSIS + Creates a custom header for use in telemetry. + .DESCRIPTION + The custom header created is a User-Agent with header value " EntraPowershell/ " + .EXAMPLE + New-EntraBetaCustomHeaders -Command Get-EntraUser + #> + [CmdletBinding()] + param ( + [Parameter(Mandatory = $true)] + [string] + $Command + ) + + $psVersion = $global:PSVersionTable.PSVersion + $entraVersion = (Get-module Microsoft.Graph.Entra.Beta | select version).Version.ToString() + $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion $Command" + $customHeaders = New-Object 'system.collections.generic.dictionary[string,string]' + $customHeaders["User-Agent"] = $userAgentHeaderValue + + $customHeaders +}# ------------------------------------------------------------------------------ + diff --git a/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 b/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 index 01f34853c0..b9bd962b8d 100644 --- a/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 +++ b/module/EntraBeta/UnMappedFiles/Test-EntraScript.ps1 @@ -5,10 +5,10 @@ function Test-EntraScript { <# .SYNOPSIS - Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Entra. + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. .DESCRIPTION - Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Entra. + Checks, whether the provided script is using AzureAD commands that are not supported by Microsoft.Graph.Entra. .PARAMETER Path Path to the script file(s) to scan. @@ -19,17 +19,17 @@ function Test-EntraScript { Used when scanning code that has no file representation (e.g. straight from a repository). .PARAMETER Quiet - Only return $true or $false, based on whether the script could run under Microsoft.Entra ($true) or not ($false) + Only return $true or $false, based on whether the script could run under Microsoft.Graph.Entra ($true) or not ($false) .EXAMPLE PS C:\> Test-EntraScript -Path .\usercreation.ps1 -Quiet - Returns whether the script "usercreation.ps1" could run under Microsoft.Entra + Returns whether the script "usercreation.ps1" could run under Microsoft.Graph.Entra .EXAMPLE PS C:\> Get-ChildItem -Path \\contoso.com\it\code -Recurse -Filter *.ps1 | Test-EntraScript - Returns a list of all scripts that would not run under the Microsoft.Entra module, listing each issue with line and code. + Returns a list of all scripts that would not run under the Microsoft.Graph.Entra module, listing each issue with line and code. #> [CmdletBinding()] param ( @@ -79,7 +79,7 @@ function Test-EntraScript { foreach ($command in $allCommands) { if ($command.CommandElements[0].Value -notin $ForbiddenCommands) { continue } $findings += [PSCustomObject]@{ - PSTypeName = 'Microsoft.Entra.CommandRequirement' + PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' Name = $Name Line = $command.Extent.StartLineNumber Type = 'UnsupportedCommand' @@ -90,7 +90,7 @@ function Test-EntraScript { foreach ($requiredCommand in $RequiredCommands) { if ($requiredCommand -notin $allCommandNames) { continue } $findings += [PSCustomObject]@{ - PSTypeName = 'Microsoft.Entra.CommandRequirement' + PSTypeName = 'Microsoft.Graph.Entra.CommandRequirement' Name = $Name Line = -1 Type = 'RequiredCommandMissing' diff --git a/module/EntraBeta/config/moduleMapping.json b/module/EntraBeta/config/moduleMapping.json index 08c26090d7..6dfceeaf2a 100644 --- a/module/EntraBeta/config/moduleMapping.json +++ b/module/EntraBeta/config/moduleMapping.json @@ -287,5 +287,14 @@ "Remove-EntraBetaDirectoryRoleDefinition": "Governance", "Remove-EntraBetaServicePrincipalAppRoleAssignment": "Applications", "Set-EntraBetaDirectoryRoleDefinition": "Governance", - "Update-EntraBetaUserFromFederated": "Users" + "Update-EntraBetaUserFromFederated": "Users", + "Enable-EntraBetaGlobalSecureAccessTenant":"NetworkAccess", + "Get-EntraBetaGlobalSecureAccessTenantStatus":"NetworkAccess", + "Get-EntraBetaPrivateAccessApplication":"NetworkAccess", + "Get-EntraBetaUserAuthenticationMethod":"SignIns", + "Get-EntraBetaUserAuthenticationRequirement":"SignIns", + "New-EntraBetaPrivateAccessApplication":"NetworkAccess", + "Update-EntraBetaOauth2PermissionGrant":"SignIns", + "Update-EntraBetaUserAuthenticationRequirement":"SignIns" + } \ No newline at end of file diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 2d604e00e1..7a04eddfcc 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -80,7 +80,7 @@ class EntraModuleSplitter { $functionContent = $function.Content # Append the function contents to the header - $ps1Content = $header + "`n" + $functionContent + $ps1Content = $header + "`n" + $functionContent+"`n" # Add the Enable-Entra*AzureADAlias function to the root of the module directory if ($functionName -eq $specificFunctionName) { @@ -129,7 +129,7 @@ class EntraModuleSplitter { foreach ($functionContent in $functionContents) { # Construct the full path for the function file $functionName = $functionContent.Name - $headerPs1Content = $this.Header + "`n" + $functionContent.Content + $headerPs1Content = $this.Header + "`n" + $functionContent.Content+ "`n"+"`n" $functionFilePath = Join-Path -Path $subDir.FullName -ChildPath "$functionName.ps1" # Write the function to the specified file @@ -139,6 +139,13 @@ class EntraModuleSplitter { } } +[string] GetModuleName([string] $Module="Entra"){ + if ($Module -eq 'Entra') { + return "Microsoft.Entra" + } else { + return "Microsoft.Entra.Beta" + } +} [void] SplitEntraModule([string]$Module = 'Entra') { $JsonFilePath=if($Module -eq 'Entra'){ @@ -155,7 +162,7 @@ class EntraModuleSplitter { $this.CreateOutputDirectory($unmappedDirectory) $jsonContent = $this.ReadJsonFile($JsonFilePath) - $moduleName = [System.IO.Path]::GetFileNameWithoutExtension($psm1FilePath) + $moduleName = $this.GetModuleName($Module) $moduleOutputDirectory = Join-Path -Path $outputDirectory -ChildPath $moduleName $this.CreateOutputDirectory($moduleOutputDirectory) diff --git a/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 index 8464c48601..93b71d7567 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.Tests.ps1 @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications + Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { @@ -33,14 +33,14 @@ Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { $result | Should -Not -BeNullOrEmpty $result.PrincipalId | should -Be '4d8fcb23-adc7-4d47-9328-2420eb1075ef' - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraServicePrincipalAppRoleAssignedTo -ObjectId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" $result | Should -Not -BeNullOrEmpty $result.PrincipalId | should -Be '4d8fcb23-adc7-4d47-9328-2420eb1075ef' - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -52,13 +52,13 @@ Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return top app role assignments " { $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Top is empty" { { Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -71,7 +71,7 @@ Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { $result.ObjectID | should -Be "I8uPTcetR02TKCQg6xB170ZWgaqJluBEqPHHxTxJ9Hs" } It "Should contain ServicePrincipalId in parameters when passed ServicePrincipalId to it" { - Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Applications + Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" $params = Get-Parameters -data $result @@ -83,7 +83,7 @@ Describe "Get-EntraServicePrincipalAppRoleAssignedTo" { $result= Get-EntraServicePrincipalAppRoleAssignedTo -ServicePrincipalId "4d8fcb23-adc7-4d47-9328-2420eb1075ef" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalAppRoleAssignedTo" - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } diff --git a/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 index 5523e9f042..301e7ce04c 100644 --- a/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 +++ b/test/Entra/Applications/Get-EntraServicePrincipalAppRoleAssignment.Tests.ps1 @@ -23,7 +23,7 @@ BeforeAll { ) } - Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications + Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith $scriptblock -ModuleName Microsoft.Entra.Applications } Describe "Get-EntraServiceAppRoleAssigned" { @@ -33,14 +33,14 @@ Describe "Get-EntraServiceAppRoleAssigned" { $result | Should -Not -BeNullOrEmpty $result.ResourceId | should -Be '021510b7-e753-40aa-b668-29753295ca34' - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should execute successfully with Alias" { $result = Get-EntraServicePrincipalAppRoleAssignment -ObjectId "021510b7-e753-40aa-b668-29753295ca34" $result | Should -Not -BeNullOrEmpty $result.ResourceId | should -Be '021510b7-e753-40aa-b668-29753295ca34' - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when ServicePrincipalId is empty" { { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId } | Should -Throw "Missing an argument for parameter 'ServicePrincipalId'.*" @@ -52,14 +52,14 @@ Describe "Get-EntraServiceAppRoleAssigned" { $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -All $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should return top service principal application role assignment." { $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -top 1 $result | Should -Not -BeNullOrEmpty - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 } It "Should fail when Top is empty" { { Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" -Top } | Should -Throw "Missing an argument for parameter 'Top'*" @@ -72,7 +72,7 @@ Describe "Get-EntraServiceAppRoleAssigned" { $result.ObjectId | should -Be "qjltmaz9l02qPcgftHNirITXiOnmHR5GmW_oEXl_ZL8" } It "Should contain ServicePrincipalId in parameters when passed ObjectId to it" { - Mock -CommandName Get-MgServicePrincipalAppRoleAssignedTo -MockWith {$args} -ModuleName Microsoft.Entra.Applications + Mock -CommandName Get-MgServicePrincipalAppRoleAssignment -MockWith {$args} -ModuleName Microsoft.Entra.Applications $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" $params = Get-Parameters -data $result @@ -84,7 +84,7 @@ Describe "Get-EntraServiceAppRoleAssigned" { $result = Get-EntraServicePrincipalAppRoleAssignment -ServicePrincipalId "021510b7-e753-40aa-b668-29753295ca34" $result | Should -Not -BeNullOrEmpty $userAgentHeaderValue = "PowerShell/$psVersion EntraPowershell/$entraVersion Get-EntraServicePrincipalAppRoleAssignment" - Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignedTo -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { + Should -Invoke -CommandName Get-MgServicePrincipalAppRoleAssignment -ModuleName Microsoft.Entra.Applications -Times 1 -ParameterFilter { $Headers.'User-Agent' | Should -Be $userAgentHeaderValue $true } From 9dd6d5788189226f4c965ccc70de99a7880770be Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Fri, 22 Nov 2024 11:45:45 +0300 Subject: [PATCH 116/124] Version 0.20.0-preview (#1227) --- module/Entra/config/ModuleMetadata.json | 2 +- module/EntraBeta/config/ModuleMetadata.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/Entra/config/ModuleMetadata.json b/module/Entra/config/ModuleMetadata.json index 65b00788e5..e92aac4f5e 100644 --- a/module/Entra/config/ModuleMetadata.json +++ b/module/Entra/config/ModuleMetadata.json @@ -30,6 +30,6 @@ "Entra" ], "releaseNotes": "See https://github.com/microsoftgraph/entra-powershell.", - "version": "0.19.0", + "version": "0.20.0", "Prerelease": "preview" } diff --git a/module/EntraBeta/config/ModuleMetadata.json b/module/EntraBeta/config/ModuleMetadata.json index c1625afb00..4243124e93 100644 --- a/module/EntraBeta/config/ModuleMetadata.json +++ b/module/EntraBeta/config/ModuleMetadata.json @@ -31,6 +31,6 @@ "Entra" ], "releaseNotes": "See https://github.com/microsoftgraph/entra-powershell.", - "version": "0.19.0", + "version": "0.20.0", "Prerelease": "preview" } From 49379b69bca81aadae5a4cfda4352dc0cd2403db Mon Sep 17 00:00:00 2001 From: Kennedy Kang'ethe Date: Fri, 22 Nov 2024 14:23:42 +0300 Subject: [PATCH 117/124] Update docs help (#1228) --- .../Applications/Add-EntraBetaApplicationOwner.md | 2 +- .../Applications/Add-EntraBetaApplicationPolicy.md | 2 +- ...BetaServicePrincipalDelegatedPermissionClassification.md | 2 +- .../Applications/Add-EntraBetaServicePrincipalOwner.md | 2 +- .../Applications/Get-EntraBetaApplication.md | 2 +- .../Get-EntraBetaApplicationExtensionProperty.md | 2 +- .../Applications/Get-EntraBetaApplicationKeyCredential.md | 2 +- .../Applications/Get-EntraBetaApplicationLogo.md | 2 +- .../Applications/Get-EntraBetaApplicationOwner.md | 2 +- .../Get-EntraBetaApplicationPasswordCredential.md | 2 +- .../Applications/Get-EntraBetaApplicationPolicy.md | 2 +- .../Get-EntraBetaApplicationProxyApplication.md | 2 +- ...et-EntraBetaApplicationProxyApplicationConnectorGroup.md | 2 +- .../Applications/Get-EntraBetaApplicationProxyConnector.md | 2 +- .../Get-EntraBetaApplicationProxyConnectorGroup.md | 2 +- .../Get-EntraBetaApplicationProxyConnectorGroupMembers.md | 2 +- .../Get-EntraBetaApplicationProxyConnectorMemberOf.md | 2 +- .../Applications/Get-EntraBetaApplicationServiceEndpoint.md | 2 +- .../Applications/Get-EntraBetaApplicationTemplate.md | 2 +- .../Applications/Get-EntraBetaDeletedApplication.md | 2 +- .../Get-EntraBetaPasswordSingleSignOnCredential.md | 2 +- .../Applications/Get-EntraBetaServicePrincipal.md | 2 +- .../Get-EntraBetaServicePrincipalAppRoleAssignedTo.md | 2 +- .../Get-EntraBetaServicePrincipalAppRoleAssignment.md | 2 +- .../Get-EntraBetaServicePrincipalCreatedObject.md | 2 +- ...BetaServicePrincipalDelegatedPermissionClassification.md | 2 +- .../Get-EntraBetaServicePrincipalKeyCredential.md | 2 +- .../Applications/Get-EntraBetaServicePrincipalMembership.md | 2 +- .../Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md | 2 +- .../Get-EntraBetaServicePrincipalOwnedObject.md | 2 +- .../Applications/Get-EntraBetaServicePrincipalOwner.md | 2 +- .../Get-EntraBetaServicePrincipalPasswordCredential.md | 2 +- .../Applications/New-EntraBetaApplication.md | 2 +- .../New-EntraBetaApplicationExtensionProperty.md | 2 +- .../New-EntraBetaApplicationFromApplicationTemplate.md | 2 +- .../Applications/New-EntraBetaApplicationKey.md | 2 +- .../Applications/New-EntraBetaApplicationKeyCredential.md | 2 +- .../Applications/New-EntraBetaApplicationPassword.md | 2 +- .../New-EntraBetaApplicationPasswordCredential.md | 2 +- .../New-EntraBetaApplicationProxyApplication.md | 2 +- .../New-EntraBetaApplicationProxyConnectorGroup.md | 2 +- .../New-EntraBetaPasswordSingleSignOnCredential.md | 2 +- .../Applications/New-EntraBetaServicePrincipal.md | 2 +- .../New-EntraBetaServicePrincipalAppRoleAssignment.md | 2 +- .../New-EntraBetaServicePrincipalPasswordCredential.md | 2 +- .../Applications/Remove-EntraBetaApplication.md | 2 +- .../Remove-EntraBetaApplicationExtensionProperty.md | 2 +- .../Applications/Remove-EntraBetaApplicationKey.md | 2 +- .../Remove-EntraBetaApplicationKeyCredential.md | 2 +- .../Applications/Remove-EntraBetaApplicationOwner.md | 2 +- .../Applications/Remove-EntraBetaApplicationPassword.md | 2 +- .../Remove-EntraBetaApplicationPasswordCredential.md | 2 +- .../Applications/Remove-EntraBetaApplicationPolicy.md | 2 +- .../Remove-EntraBetaApplicationProxyApplication.md | 2 +- ...ve-EntraBetaApplicationProxyApplicationConnectorGroup.md | 2 +- .../Remove-EntraBetaApplicationProxyConnectorGroup.md | 2 +- .../Remove-EntraBetaApplicationVerifiedPublisher.md | 2 +- .../Applications/Remove-EntraBetaDeletedApplication.md | 2 +- .../Applications/Remove-EntraBetaDeletedDirectoryObject.md | 2 +- .../Remove-EntraBetaPasswordSingleSignOnCredential.md | 2 +- .../Applications/Remove-EntraBetaServicePrincipal.md | 2 +- .../Remove-EntraBetaServicePrincipalAppRoleAssignment.md | 2 +- ...BetaServicePrincipalDelegatedPermissionClassification.md | 2 +- .../Applications/Remove-EntraBetaServicePrincipalOwner.md | 2 +- .../Remove-EntraBetaServicePrincipalPasswordCredential.md | 2 +- .../Applications/Restore-EntraBetaDeletedApplication.md | 2 +- .../Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md | 2 +- .../Applications/Set-EntraBetaApplication.md | 2 +- .../Applications/Set-EntraBetaApplicationLogo.md | 2 +- .../Set-EntraBetaApplicationProxyApplication.md | 2 +- ...et-EntraBetaApplicationProxyApplicationConnectorGroup.md | 2 +- .../Set-EntraBetaApplicationProxyApplicationSingleSignOn.md | 2 +- .../Applications/Set-EntraBetaApplicationProxyConnector.md | 2 +- .../Set-EntraBetaApplicationProxyConnectorGroup.md | 2 +- .../Set-EntraBetaApplicationVerifiedPublisher.md | 2 +- .../Set-EntraBetaPasswordSingleSignOnCredential.md | 2 +- .../Applications/Set-EntraBetaServicePrincipal.md | 2 +- .../entra-powershell-beta/Authentication/Connect-Entra.md | 2 +- .../Authentication/Disconnect-Entra.md | 2 +- .../Authentication/Get-EntraContext.md | 2 +- .../Revoke-EntraBetaSignedInUserAllRefreshToken.md | 2 +- .../Authentication/Revoke-EntraBetaUserAllRefreshToken.md | 2 +- .../Add-EntraBetaAdministrativeUnitMember.md | 2 +- ...ntraBetaCustomSecurityAttributeDefinitionAllowedValue.md | 2 +- .../Add-EntraBetaDeviceRegisteredOwner.md | 2 +- .../Add-EntraBetaDeviceRegisteredUser.md | 2 +- .../DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md | 2 +- .../Add-EntraBetaScopedRoleMembership.md | 2 +- .../DirectoryManagement/Confirm-EntraBetaDomain.md | 2 +- .../DirectoryManagement/Enable-EntraBetaDirectoryRole.md | 2 +- .../DirectoryManagement/Get-EntraBetaAccountSku.md | 2 +- .../DirectoryManagement/Get-EntraBetaAdministrativeUnit.md | 2 +- .../Get-EntraBetaAdministrativeUnitMember.md | 2 +- .../DirectoryManagement/Get-EntraBetaAttributeSet.md | 2 +- .../DirectoryManagement/Get-EntraBetaContact.md | 2 +- .../DirectoryManagement/Get-EntraBetaContactDirectReport.md | 2 +- .../DirectoryManagement/Get-EntraBetaContactManager.md | 2 +- .../DirectoryManagement/Get-EntraBetaContactMembership.md | 2 +- .../DirectoryManagement/Get-EntraBetaContract.md | 2 +- .../Get-EntraBetaCustomSecurityAttributeDefinition.md | 2 +- ...ntraBetaCustomSecurityAttributeDefinitionAllowedValue.md | 2 +- .../Get-EntraBetaDeletedDirectoryObject.md | 2 +- .../DirectoryManagement/Get-EntraBetaDevice.md | 2 +- .../Get-EntraBetaDeviceRegisteredOwner.md | 2 +- .../Get-EntraBetaDeviceRegisteredUser.md | 2 +- .../Get-EntraBetaDirSyncConfiguration.md | 2 +- .../DirectoryManagement/Get-EntraBetaDirSyncFeature.md | 2 +- ...t-EntraBetaDirectoryObjectOnPremisesProvisioningError.md | 2 +- .../DirectoryManagement/Get-EntraBetaDirectoryRole.md | 2 +- .../DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md | 2 +- .../Get-EntraBetaDirectoryRoleTemplate.md | 2 +- .../DirectoryManagement/Get-EntraBetaDirectorySetting.md | 2 +- .../Get-EntraBetaDirectorySettingTemplate.md | 2 +- .../DirectoryManagement/Get-EntraBetaDomain.md | 2 +- .../Get-EntraBetaDomainFederationSettings.md | 2 +- .../DirectoryManagement/Get-EntraBetaDomainNameReference.md | 2 +- .../Get-EntraBetaDomainServiceConfigurationRecord.md | 2 +- .../Get-EntraBetaDomainVerificationDnsRecord.md | 2 +- .../DirectoryManagement/Get-EntraBetaFederationProperty.md | 2 +- .../DirectoryManagement/Get-EntraBetaPartnerInformation.md | 2 +- .../DirectoryManagement/Get-EntraBetaPasswordPolicy.md | 2 +- .../Get-EntraBetaScopedRoleMembership.md | 2 +- .../DirectoryManagement/Get-EntraBetaSubscribedSku.md | 2 +- .../DirectoryManagement/Get-EntraBetaTenantDetail.md | 2 +- .../DirectoryManagement/New-EntraBetaAdministrativeUnit.md | 2 +- .../New-EntraBetaAdministrativeUnitMember.md | 2 +- .../DirectoryManagement/New-EntraBetaAttributeSet.md | 2 +- .../New-EntraBetaCustomSecurityAttributeDefinition.md | 2 +- .../DirectoryManagement/New-EntraBetaDevice.md | 2 +- .../DirectoryManagement/New-EntraBetaDirectorySetting.md | 2 +- .../DirectoryManagement/New-EntraBetaDomain.md | 2 +- .../Remove-EntraBetaAdministrativeUnit.md | 2 +- .../Remove-EntraBetaAdministrativeUnitMember.md | 2 +- .../DirectoryManagement/Remove-EntraBetaContact.md | 2 +- .../DirectoryManagement/Remove-EntraBetaDevice.md | 2 +- .../Remove-EntraBetaDeviceRegisteredOwner.md | 2 +- .../Remove-EntraBetaDeviceRegisteredUser.md | 2 +- .../Remove-EntraBetaDirectoryRoleMember.md | 2 +- .../DirectoryManagement/Remove-EntraBetaDirectorySetting.md | 2 +- .../DirectoryManagement/Remove-EntraBetaDomain.md | 2 +- .../Remove-EntraBetaScopedRoleMembership.md | 2 +- .../Restore-EntraBetaDeletedDirectoryObject.md | 2 +- .../DirectoryManagement/Set-EntraBetaAdministrativeUnit.md | 2 +- .../DirectoryManagement/Set-EntraBetaAttributeSet.md | 2 +- .../Set-EntraBetaCustomSecurityAttributeDefinition.md | 2 +- ...ntraBetaCustomSecurityAttributeDefinitionAllowedValue.md | 2 +- .../DirectoryManagement/Set-EntraBetaDevice.md | 2 +- .../Set-EntraBetaDirSyncConfiguration.md | 2 +- .../DirectoryManagement/Set-EntraBetaDirSyncEnabled.md | 2 +- .../DirectoryManagement/Set-EntraBetaDirSyncFeature.md | 2 +- .../DirectoryManagement/Set-EntraBetaDirectorySetting.md | 2 +- .../DirectoryManagement/Set-EntraBetaDomain.md | 2 +- .../Set-EntraBetaDomainFederationSettings.md | 2 +- .../DirectoryManagement/Set-EntraBetaPartnerInformation.md | 2 +- .../DirectoryManagement/Set-EntraBetaTenantDetail.md | 2 +- .../Governance/Get-EntraBetaDirectoryRoleAssignment.md | 2 +- .../Governance/Get-EntraBetaDirectoryRoleDefinition.md | 2 +- .../Governance/Get-EntraBetaPrivilegedResource.md | 2 +- .../Governance/Get-EntraBetaPrivilegedRole.md | 2 +- .../Governance/Get-EntraBetaPrivilegedRoleDefinition.md | 2 +- .../Governance/Get-EntraBetaPrivilegedRoleSetting.md | 2 +- .../Governance/New-EntraBetaDirectoryRoleAssignment.md | 2 +- .../Governance/New-EntraBetaDirectoryRoleDefinition.md | 2 +- .../Governance/New-EntraBetaPrivilegedRoleAssignment.md | 2 +- .../Governance/Remove-EntraBetaDirectoryRoleAssignment.md | 2 +- .../Governance/Remove-EntraBetaDirectoryRoleDefinition.md | 2 +- .../Governance/Set-EntraBetaDirectoryRoleDefinition.md | 2 +- .../Set-EntraBetaPrivilegedRoleAssignmentRequest.md | 2 +- .../Governance/Set-EntraBetaPrivilegedRoleSetting.md | 2 +- .../Groups/Add-EntraBetaGroupMember.md | 2 +- .../entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md | 2 +- .../Groups/Add-EntraBetaLifecyclePolicyGroup.md | 2 +- .../Groups/Get-EntraBetaDeletedGroup.md | 2 +- .../docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md | 2 +- .../Groups/Get-EntraBetaGroupAppRoleAssignment.md | 2 +- .../Groups/Get-EntraBetaGroupLifecyclePolicy.md | 2 +- .../Groups/Get-EntraBetaGroupMember.md | 2 +- .../entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md | 2 +- .../Groups/Get-EntraBetaGroupPermissionGrant.md | 2 +- .../Groups/Get-EntraBetaLifecyclePolicyGroup.md | 2 +- .../Groups/Get-EntraBetaObjectByObjectId.md | 2 +- .../Groups/Get-EntraBetaObjectSetting.md | 2 +- .../docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md | 2 +- .../Groups/New-EntraBetaGroupAppRoleAssignment.md | 2 +- .../Groups/New-EntraBetaGroupLifecyclePolicy.md | 2 +- .../Groups/New-EntraBetaObjectSetting.md | 2 +- .../entra-powershell-beta/Groups/Remove-EntraBetaGroup.md | 2 +- .../Groups/Remove-EntraBetaGroupAppRoleAssignment.md | 2 +- .../Groups/Remove-EntraBetaGroupLifecyclePolicy.md | 2 +- .../Groups/Remove-EntraBetaGroupMember.md | 2 +- .../Groups/Remove-EntraBetaGroupOwner.md | 2 +- .../Groups/Remove-EntraBetaLifecyclePolicyGroup.md | 2 +- .../Groups/Remove-EntraBetaObjectSetting.md | 2 +- .../Groups/Reset-EntraBetaLifeCycleGroup.md | 2 +- .../Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md | 2 +- .../Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md | 2 +- .../Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md | 2 +- .../docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md | 2 +- .../Groups/Set-EntraBetaGroupLifecyclePolicy.md | 2 +- .../Groups/Set-EntraBetaObjectSetting.md | 2 +- .../Enable-EntraBetaGlobalSecureAccessTenant.md | 4 ++-- .../Get-EntraBetaGlobalSecureAccessTenantStatus.md | 4 ++-- .../Get-EntraBetaPrivateAccessApplication.md | 4 ++-- .../Get-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../New-EntraBetaPrivateAccessApplication.md | 4 ++-- .../New-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../Remove-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../Get-EntraBetaApplicationSignInDetailedSummary.md | 2 +- .../Reports/Get-EntraBetaApplicationSignInSummary.md | 2 +- .../Reports/Get-EntraBetaAuditDirectoryLog.md | 2 +- .../Reports/Get-EntraBetaAuditSignInLog.md | 2 +- .../Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md | 2 +- .../SignIns/Add-EntraBetaServicePrincipalPolicy.md | 2 +- .../SignIns/Get-EntraBetaAuthorizationPolicy.md | 2 +- .../SignIns/Get-EntraBetaConditionalAccessPolicy.md | 2 +- .../SignIns/Get-EntraBetaFeatureRolloutPolicy.md | 2 +- .../SignIns/Get-EntraBetaIdentityProvider.md | 2 +- .../SignIns/Get-EntraBetaNamedLocationPolicy.md | 2 +- .../SignIns/Get-EntraBetaOAuth2PermissionGrant.md | 2 +- .../SignIns/Get-EntraBetaPermissionGrantConditionSet.md | 2 +- .../SignIns/Get-EntraBetaPermissionGrantPolicy.md | 2 +- .../entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md | 2 +- .../SignIns/Get-EntraBetaPolicyAppliedObject.md | 2 +- .../SignIns/Get-EntraBetaServicePrincipalPolicy.md | 2 +- .../SignIns/Get-EntraBetaTrustFrameworkPolicy.md | 2 +- .../SignIns/Get-EntraBetaTrustedCertificateAuthority.md | 2 +- .../Get-EntraBetaUserAuthenticationMethod.md | 6 +++--- .../Get-EntraBetaUserAuthenticationRequirement.md | 6 +++--- .../SignIns/New-EntraBetaConditionalAccessPolicy.md | 2 +- .../SignIns/New-EntraBetaFeatureRolloutPolicy.md | 2 +- .../SignIns/New-EntraBetaIdentityProvider.md | 2 +- .../SignIns/New-EntraBetaInvitation.md | 2 +- .../SignIns/New-EntraBetaNamedLocationPolicy.md | 2 +- .../SignIns/New-EntraBetaOauth2PermissionGrant.md | 2 +- .../SignIns/New-EntraBetaPermissionGrantConditionSet.md | 2 +- .../SignIns/New-EntraBetaPermissionGrantPolicy.md | 2 +- .../entra-powershell-beta/SignIns/New-EntraBetaPolicy.md | 2 +- .../SignIns/New-EntraBetaTrustFrameworkPolicy.md | 2 +- .../SignIns/New-EntraBetaTrustedCertificateAuthority.md | 2 +- .../SignIns/Remove-EntraBetaConditionalAccessPolicy.md | 2 +- .../SignIns/Remove-EntraBetaFeatureRolloutPolicy.md | 2 +- .../Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md | 2 +- .../SignIns/Remove-EntraBetaIdentityProvider.md | 2 +- .../SignIns/Remove-EntraBetaNamedLocationPolicy.md | 2 +- .../SignIns/Remove-EntraBetaOAuth2PermissionGrant.md | 2 +- .../SignIns/Remove-EntraBetaPermissionGrantConditionSet.md | 2 +- .../SignIns/Remove-EntraBetaPermissionGrantPolicy.md | 2 +- .../entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md | 2 +- .../SignIns/Remove-EntraBetaServicePrincipalPolicy.md | 2 +- .../SignIns/Remove-EntraBetaTrustFrameworkPolicy.md | 2 +- .../SignIns/Remove-EntraBetaTrustedCertificateAuthority.md | 2 +- .../Reset-EntraBetaStrongAuthenticationMethodByUpn.md | 2 +- .../SignIns/Set-EntraBetaAuthorizationPolicy.md | 2 +- .../SignIns/Set-EntraBetaConditionalAccessPolicy.md | 2 +- .../SignIns/Set-EntraBetaFeatureRolloutPolicy.md | 2 +- .../SignIns/Set-EntraBetaIdentityProvider.md | 2 +- .../SignIns/Set-EntraBetaNamedLocationPolicy.md | 2 +- .../SignIns/Set-EntraBetaPermissionGrantConditionSet.md | 2 +- .../SignIns/Set-EntraBetaPermissionGrantPolicy.md | 2 +- .../entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md | 2 +- .../SignIns/Set-EntraBetaTrustFrameworkPolicy.md | 2 +- .../SignIns/Set-EntraBetaTrustedCertificateAuthority.md | 2 +- .../Update-EntraBetaOauth2PermissionGrant.md | 6 +++--- .../Update-EntraBetaUserAuthenticationRequirement.md | 6 +++--- .../docs/entra-powershell-beta/Users/Get-EntraBetaUser.md | 2 +- .../Users/Get-EntraBetaUserAppRoleAssignment.md | 2 +- .../Users/Get-EntraBetaUserCreatedObject.md | 2 +- .../Users/Get-EntraBetaUserDirectReport.md | 2 +- .../Users/Get-EntraBetaUserExtension.md | 2 +- .../Users/Get-EntraBetaUserLicenseDetail.md | 2 +- .../entra-powershell-beta/Users/Get-EntraBetaUserManager.md | 2 +- .../Users/Get-EntraBetaUserMembership.md | 2 +- .../Users/Get-EntraBetaUserOAuth2PermissionGrant.md | 2 +- .../Users/Get-EntraBetaUserOwnedDevice.md | 2 +- .../Users/Get-EntraBetaUserOwnedObject.md | 2 +- .../Users/Get-EntraBetaUserRegisteredDevice.md | 2 +- .../Users/Get-EntraBetaUserThumbnailPhoto.md | 2 +- .../docs/entra-powershell-beta/Users/New-EntraBetaUser.md | 2 +- .../Users/New-EntraBetaUserAppRoleAssignment.md | 2 +- .../entra-powershell-beta/Users/Remove-EntraBetaUser.md | 2 +- .../Users/Remove-EntraBetaUserAppRoleAssignment.md | 2 +- .../Users/Remove-EntraBetaUserExtension.md | 2 +- .../Users/Remove-EntraBetaUserManager.md | 2 +- .../docs/entra-powershell-beta/Users/Set-EntraBetaUser.md | 2 +- .../Users/Set-EntraBetaUserExtension.md | 2 +- .../entra-powershell-beta/Users/Set-EntraBetaUserLicense.md | 2 +- .../entra-powershell-beta/Users/Set-EntraBetaUserManager.md | 2 +- .../Users/Set-EntraBetaUserPassword.md | 2 +- .../Users/Set-EntraBetaUserThumbnailPhoto.md | 2 +- .../Users/Update-EntraBetaSignedInUserPassword.md | 2 +- .../Users/Update-EntraBetaUserFromFederated.md | 2 +- .../Applications/Add-EntraApplicationOwner.md | 2 +- ...ntraServicePrincipalDelegatedPermissionClassification.md | 2 +- .../Applications/Add-EntraServicePrincipalOwner.md | 2 +- .../Applications/Get-EntraApplication.md | 2 +- .../Applications/Get-EntraApplicationExtensionProperty.md | 2 +- .../Applications/Get-EntraApplicationKeyCredential.md | 2 +- .../Applications/Get-EntraApplicationLogo.md | 2 +- .../Applications/Get-EntraApplicationOwner.md | 2 +- .../Applications/Get-EntraApplicationPasswordCredential.md | 2 +- .../Applications/Get-EntraApplicationServiceEndpoint.md | 2 +- .../Applications/Get-EntraApplicationTemplate.md | 2 +- .../Applications/Get-EntraDeletedApplication.md | 2 +- .../Applications/Get-EntraServicePrincipal.md | 2 +- .../Get-EntraServicePrincipalAppRoleAssignedTo.md | 2 +- .../Get-EntraServicePrincipalAppRoleAssignment.md | 2 +- .../Applications/Get-EntraServicePrincipalCreatedObject.md | 2 +- ...ntraServicePrincipalDelegatedPermissionClassification.md | 2 +- .../Applications/Get-EntraServicePrincipalKeyCredential.md | 2 +- .../Applications/Get-EntraServicePrincipalMembership.md | 2 +- .../Get-EntraServicePrincipalOAuth2PermissionGrant.md | 2 +- .../Applications/Get-EntraServicePrincipalOwnedObject.md | 2 +- .../Applications/Get-EntraServicePrincipalOwner.md | 2 +- .../Get-EntraServicePrincipalPasswordCredential.md | 2 +- .../Applications/New-EntraApplication.md | 2 +- .../Applications/New-EntraApplicationExtensionProperty.md | 2 +- .../New-EntraApplicationFromApplicationTemplate.md | 2 +- .../Applications/New-EntraApplicationKey.md | 2 +- .../Applications/New-EntraApplicationKeyCredential.md | 2 +- .../Applications/New-EntraApplicationPassword.md | 2 +- .../Applications/New-EntraApplicationPasswordCredential.md | 2 +- .../Applications/New-EntraServicePrincipal.md | 2 +- .../New-EntraServicePrincipalAppRoleAssignment.md | 2 +- .../Applications/New-EntraServicePrincipalKeyCredential.md | 2 +- .../New-EntraServicePrincipalPasswordCredential.md | 2 +- .../Applications/Remove-EntraApplication.md | 2 +- .../Remove-EntraApplicationExtensionProperty.md | 2 +- .../Applications/Remove-EntraApplicationKey.md | 2 +- .../Applications/Remove-EntraApplicationKeyCredential.md | 2 +- .../Applications/Remove-EntraApplicationOwner.md | 2 +- .../Applications/Remove-EntraApplicationPassword.md | 2 +- .../Remove-EntraApplicationPasswordCredential.md | 2 +- .../Remove-EntraApplicationVerifiedPublisher.md | 2 +- .../Applications/Remove-EntraDeletedApplication.md | 2 +- .../Applications/Remove-EntraDeletedDirectoryObject.md | 2 +- .../Applications/Remove-EntraServicePrincipal.md | 2 +- .../Remove-EntraServicePrincipalAppRoleAssignment.md | 2 +- ...ntraServicePrincipalDelegatedPermissionClassification.md | 2 +- .../Remove-EntraServicePrincipalKeyCredential.md | 2 +- .../Applications/Remove-EntraServicePrincipalOwner.md | 2 +- .../Remove-EntraServicePrincipalPasswordCredential.md | 2 +- .../Applications/Restore-EntraDeletedApplication.md | 2 +- .../Select-EntraGroupIdsServicePrincipalIsMemberOf.md | 2 +- .../Applications/Set-EntraApplication.md | 2 +- .../Applications/Set-EntraApplicationLogo.md | 2 +- .../Applications/Set-EntraApplicationVerifiedPublisher.md | 2 +- .../Applications/Set-EntraServicePrincipal.md | 2 +- .../Authentication/Add-EntraEnvironment.md | 2 +- .../entra-powershell-v1.0/Authentication/Connect-Entra.md | 2 +- .../Authentication/Disconnect-Entra.md | 2 +- .../Authentication/Find-EntraPermission.md | 2 +- .../Authentication/Get-EntraContext.md | 2 +- .../Authentication/Get-EntraEnvironment.md | 2 +- .../Revoke-EntraSignedInUserAllRefreshToken.md | 2 +- .../Authentication/Revoke-EntraUserAllRefreshToken.md | 2 +- .../Add-EntraAdministrativeUnitMember.md | 2 +- ...dd-EntraCustomSecurityAttributeDefinitionAllowedValue.md | 2 +- .../DirectoryManagement/Add-EntraDeviceRegisteredOwner.md | 2 +- .../DirectoryManagement/Add-EntraDeviceRegisteredUser.md | 2 +- .../DirectoryManagement/Add-EntraDirectoryRoleMember.md | 2 +- .../DirectoryManagement/Add-EntraScopedRoleMembership.md | 2 +- .../DirectoryManagement/Confirm-EntraDomain.md | 2 +- .../DirectoryManagement/Enable-EntraDirectoryRole.md | 2 +- .../DirectoryManagement/Get-CrossCloudVerificationCode.md | 2 +- .../DirectoryManagement/Get-EntraAccountSku.md | 2 +- .../DirectoryManagement/Get-EntraAdministrativeUnit.md | 2 +- .../Get-EntraAdministrativeUnitMember.md | 2 +- .../DirectoryManagement/Get-EntraAttributeSet.md | 2 +- .../DirectoryManagement/Get-EntraContact.md | 2 +- .../DirectoryManagement/Get-EntraContactDirectReport.md | 2 +- .../DirectoryManagement/Get-EntraContactManager.md | 2 +- .../DirectoryManagement/Get-EntraContactMembership.md | 2 +- .../DirectoryManagement/Get-EntraContactThumbnailPhoto.md | 2 +- .../DirectoryManagement/Get-EntraContract.md | 2 +- .../Get-EntraCustomSecurityAttributeDefinition.md | 2 +- ...et-EntraCustomSecurityAttributeDefinitionAllowedValue.md | 2 +- .../DirectoryManagement/Get-EntraDeletedDirectoryObject.md | 2 +- .../DirectoryManagement/Get-EntraDevice.md | 2 +- .../DirectoryManagement/Get-EntraDeviceRegisteredOwner.md | 2 +- .../DirectoryManagement/Get-EntraDeviceRegisteredUser.md | 2 +- .../DirectoryManagement/Get-EntraDirSyncConfiguration.md | 2 +- .../DirectoryManagement/Get-EntraDirSyncFeature.md | 2 +- .../Get-EntraDirectoryObjectOnPremisesProvisioningError.md | 2 +- .../DirectoryManagement/Get-EntraDirectoryRole.md | 2 +- .../DirectoryManagement/Get-EntraDirectoryRoleMember.md | 2 +- .../DirectoryManagement/Get-EntraDirectoryRoleTemplate.md | 2 +- .../DirectoryManagement/Get-EntraDomain.md | 2 +- .../Get-EntraDomainFederationSettings.md | 2 +- .../DirectoryManagement/Get-EntraDomainNameReference.md | 2 +- .../Get-EntraDomainServiceConfigurationRecord.md | 2 +- .../Get-EntraDomainVerificationDnsRecord.md | 2 +- .../DirectoryManagement/Get-EntraExtensionProperty.md | 2 +- .../DirectoryManagement/Get-EntraFederationProperty.md | 2 +- .../DirectoryManagement/Get-EntraObjectByObjectId.md | 2 +- .../DirectoryManagement/Get-EntraPartnerInformation.md | 2 +- .../DirectoryManagement/Get-EntraPasswordPolicy.md | 2 +- .../DirectoryManagement/Get-EntraScopedRoleMembership.md | 2 +- .../DirectoryManagement/Get-EntraSubscribedSku.md | 2 +- .../DirectoryManagement/Get-EntraTenantDetail.md | 2 +- .../DirectoryManagement/New-EntraAdministrativeUnit.md | 2 +- .../DirectoryManagement/New-EntraAttributeSet.md | 2 +- .../New-EntraCustomSecurityAttributeDefinition.md | 2 +- .../DirectoryManagement/New-EntraDevice.md | 2 +- .../DirectoryManagement/New-EntraDomain.md | 2 +- .../DirectoryManagement/Remove-EntraAdministrativeUnit.md | 2 +- .../Remove-EntraAdministrativeUnitMember.md | 2 +- .../DirectoryManagement/Remove-EntraContact.md | 2 +- .../DirectoryManagement/Remove-EntraDevice.md | 2 +- .../Remove-EntraDeviceRegisteredOwner.md | 2 +- .../DirectoryManagement/Remove-EntraDeviceRegisteredUser.md | 2 +- .../DirectoryManagement/Remove-EntraDirectoryRoleMember.md | 2 +- .../DirectoryManagement/Remove-EntraDomain.md | 2 +- .../Remove-EntraExternalDomainFederation.md | 2 +- .../DirectoryManagement/Remove-EntraScopedRoleMembership.md | 2 +- .../Restore-EntraDeletedDirectoryObject.md | 2 +- .../DirectoryManagement/Set-EntraAdministrativeUnit.md | 2 +- .../DirectoryManagement/Set-EntraAttributeSet.md | 2 +- .../Set-EntraCustomSecurityAttributeDefinition.md | 2 +- ...et-EntraCustomSecurityAttributeDefinitionAllowedValue.md | 2 +- .../DirectoryManagement/Set-EntraDevice.md | 2 +- .../DirectoryManagement/Set-EntraDirSyncConfiguration.md | 2 +- .../DirectoryManagement/Set-EntraDirSyncEnabled.md | 2 +- .../DirectoryManagement/Set-EntraDirSyncFeature.md | 2 +- .../DirectoryManagement/Set-EntraDomain.md | 2 +- .../Set-EntraDomainFederationSettings.md | 2 +- .../DirectoryManagement/Set-EntraPartnerInformation.md | 2 +- .../DirectoryManagement/Set-EntraTenantDetail.md | 2 +- .../Update-EntraOauth2PermissionGrant.md | 6 +++--- .../Governance/Get-EntraDirectoryRoleAssignment.md | 2 +- .../Governance/Get-EntraDirectoryRoleDefinition.md | 2 +- .../Governance/New-EntraDirectoryRoleAssignment.md | 2 +- .../Governance/New-EntraDirectoryRoleDefinition.md | 2 +- .../Governance/Remove-EntraDirectoryRoleAssignment.md | 2 +- .../Governance/Remove-EntraDirectoryRoleDefinition.md | 2 +- .../Governance/Set-EntraDirectoryRoleDefinition.md | 2 +- .../entra-powershell-v1.0/Groups/Add-EntraGroupMember.md | 2 +- .../entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md | 2 +- .../Groups/Add-EntraLifecyclePolicyGroup.md | 2 +- .../entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md | 2 +- module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md | 2 +- .../Groups/Get-EntraGroupAppRoleAssignment.md | 2 +- .../Groups/Get-EntraGroupLifecyclePolicy.md | 2 +- .../entra-powershell-v1.0/Groups/Get-EntraGroupMember.md | 2 +- .../entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md | 2 +- .../Groups/Get-EntraGroupPermissionGrant.md | 2 +- .../Groups/Get-EntraLifecyclePolicyGroup.md | 2 +- .../entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md | 2 +- module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md | 2 +- .../Groups/New-EntraGroupAppRoleAssignment.md | 2 +- .../Groups/New-EntraGroupLifecyclePolicy.md | 2 +- .../docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md | 2 +- .../Groups/Remove-EntraGroupAppRoleAssignment.md | 2 +- .../Groups/Remove-EntraGroupLifecyclePolicy.md | 2 +- .../entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md | 2 +- .../entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md | 2 +- .../Groups/Remove-EntraLifecyclePolicyGroup.md | 2 +- .../Groups/Reset-EntraLifeCycleGroup.md | 2 +- .../Groups/Select-EntraGroupIdsContactIsMemberOf.md | 2 +- .../Groups/Select-EntraGroupIdsGroupIsMemberOf.md | 2 +- .../Groups/Select-EntraGroupIdsUserIsMemberOf.md | 2 +- module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md | 2 +- .../Groups/Set-EntraGroupLifecyclePolicy.md | 2 +- .../Reports/Get-EntraAuditDirectoryLog.md | 2 +- .../Reports/Get-EntraAuditSignInLog.md | 2 +- .../SignIns/Get-EntraAuthorizationPolicy.md | 2 +- .../SignIns/Get-EntraConditionalAccessPolicy.md | 2 +- .../SignIns/Get-EntraFeatureRolloutPolicy.md | 2 +- .../SignIns/Get-EntraIdentityProvider.md | 2 +- .../SignIns/Get-EntraNamedLocationPolicy.md | 2 +- .../SignIns/Get-EntraOAuth2PermissionGrant.md | 2 +- .../SignIns/Get-EntraPermissionGrantConditionSet.md | 2 +- .../SignIns/Get-EntraPermissionGrantPolicy.md | 2 +- .../docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md | 2 +- .../SignIns/Get-EntraTrustedCertificateAuthority.md | 2 +- .../Get-EntraUserAuthenticationMethod.md | 6 +++--- .../SignIns/New-EntraConditionalAccessPolicy.md | 2 +- .../SignIns/New-EntraFeatureRolloutPolicy.md | 2 +- .../SignIns/New-EntraIdentityProvider.md | 2 +- .../SignIns/New-EntraNamedLocationPolicy.md | 2 +- .../SignIns/New-EntraOauth2PermissionGrant.md | 2 +- .../SignIns/New-EntraPermissionGrantConditionSet.md | 2 +- .../SignIns/New-EntraPermissionGrantPolicy.md | 2 +- .../docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md | 2 +- .../SignIns/New-EntraTrustedCertificateAuthority.md | 2 +- .../SignIns/Remove-EntraConditionalAccessPolicy.md | 2 +- .../SignIns/Remove-EntraFeatureRolloutPolicy.md | 2 +- .../Remove-EntraFeatureRolloutPolicyDirectoryObject.md | 2 +- .../SignIns/Remove-EntraIdentityProvider.md | 2 +- .../SignIns/Remove-EntraNamedLocationPolicy.md | 2 +- .../SignIns/Remove-EntraOAuth2PermissionGrant.md | 2 +- .../SignIns/Remove-EntraPermissionGrantConditionSet.md | 2 +- .../SignIns/Remove-EntraPermissionGrantPolicy.md | 2 +- .../entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md | 2 +- .../SignIns/Remove-EntraTrustedCertificateAuthority.md | 2 +- .../Reset-EntraStrongAuthenticationMethodByUpn.md | 2 +- .../SignIns/Set-EntraAuthorizationPolicy.md | 2 +- .../SignIns/Set-EntraConditionalAccessPolicy.md | 2 +- .../SignIns/Set-EntraFeatureRolloutPolicy.md | 2 +- .../SignIns/Set-EntraIdentityProvider.md | 2 +- .../SignIns/Set-EntraNamedLocationPolicy.md | 2 +- .../SignIns/Set-EntraPermissionGrantConditionSet.md | 2 +- .../SignIns/Set-EntraPermissionGrantPolicy.md | 2 +- .../docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md | 2 +- .../SignIns/Set-EntraTrustedCertificateAuthority.md | 2 +- module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md | 2 +- .../Users/Get-EntraUserAppRoleAssignment.md | 2 +- .../Users/Get-EntraUserCreatedObject.md | 2 +- .../Users/Get-EntraUserDirectReport.md | 2 +- .../entra-powershell-v1.0/Users/Get-EntraUserExtension.md | 2 +- .../Users/Get-EntraUserLicenseDetail.md | 2 +- .../entra-powershell-v1.0/Users/Get-EntraUserManager.md | 2 +- .../entra-powershell-v1.0/Users/Get-EntraUserMembership.md | 2 +- .../Users/Get-EntraUserOAuth2PermissionGrant.md | 2 +- .../entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md | 2 +- .../entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md | 2 +- .../Users/Get-EntraUserRegisteredDevice.md | 2 +- .../Users/Get-EntraUserThumbnailPhoto.md | 2 +- module/docs/entra-powershell-v1.0/Users/New-EntraUser.md | 2 +- .../Users/New-EntraUserAppRoleAssignment.md | 2 +- module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md | 2 +- .../Users/Remove-EntraUserAppRoleAssignment.md | 2 +- .../Users/Remove-EntraUserExtension.md | 2 +- .../entra-powershell-v1.0/Users/Remove-EntraUserManager.md | 2 +- module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md | 2 +- .../entra-powershell-v1.0/Users/Set-EntraUserExtension.md | 2 +- .../entra-powershell-v1.0/Users/Set-EntraUserLicense.md | 2 +- .../entra-powershell-v1.0/Users/Set-EntraUserManager.md | 2 +- .../entra-powershell-v1.0/Users/Set-EntraUserPassword.md | 2 +- .../Users/Set-EntraUserThumbnailPhoto.md | 2 +- .../Users/Update-EntraSignedInUserPassword.md | 2 +- .../Users/Update-EntraUserFromFederated.md | 2 +- 531 files changed, 547 insertions(+), 547 deletions(-) rename module/docs/entra-powershell-beta/{Applications => NetworkAccess}/Enable-EntraBetaGlobalSecureAccessTenant.md (95%) rename module/docs/entra-powershell-beta/{Applications => NetworkAccess}/Get-EntraBetaGlobalSecureAccessTenantStatus.md (96%) rename module/docs/entra-powershell-beta/{Applications => NetworkAccess}/Get-EntraBetaPrivateAccessApplication.md (98%) rename module/docs/entra-powershell-beta/{Applications => NetworkAccess}/New-EntraBetaPrivateAccessApplication.md (97%) rename module/docs/entra-powershell-beta/{Applications => SignIns}/Get-EntraBetaUserAuthenticationMethod.md (94%) rename module/docs/entra-powershell-beta/{Applications => SignIns}/Get-EntraBetaUserAuthenticationRequirement.md (95%) rename module/docs/entra-powershell-beta/{Authentication => SignIns}/Reset-EntraBetaStrongAuthenticationMethodByUpn.md (97%) rename module/docs/entra-powershell-beta/{Applications => SignIns}/Update-EntraBetaOauth2PermissionGrant.md (96%) rename module/docs/entra-powershell-beta/{Applications => SignIns}/Update-EntraBetaUserAuthenticationRequirement.md (96%) rename module/docs/entra-powershell-v1.0/{DirectoryManagement => SignIns}/Get-EntraUserAuthenticationMethod.md (95%) rename module/docs/entra-powershell-v1.0/{Authentication => SignIns}/Reset-EntraStrongAuthenticationMethodByUpn.md (97%) diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md index 6a8b962dd6..af87cac3b6 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaApplicationOwner diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md index bb7e0585ac..ec90a50f68 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaApplicationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaApplicationPolicy diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md index 2d39ad7f23..36d9979080 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaServicePrincipalDelegatedPermissionClassification diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md index 522cbb16d6..a18e07d1f4 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaServicePrincipalOwner diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md index c4e4139a41..9998639a45 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplication.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplication diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md index f140f901e4..7e91177f28 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationExtensionProperty.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationExtensionProperty diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md index e79ef0d5c0..03df320ea1 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationKeyCredential.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationKeyCredential diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md index 20aa5d9ede..5386b8084e 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationLogo.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationLogo diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md index e0883d9d87..4a78172069 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationOwner diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md index 5fbfbc3409..4aa96cde6c 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPasswordCredential.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationPasswordCredential schema: 2.0.0 diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md index 1e9795745a..5f31de13f3 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationPolicy diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md index 90732d9049..f8cacf7c0c 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplication.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyApplication diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md index 0dcf88fd66..e7a86dc1ee 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyApplicationConnectorGroup diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md index 5b6871e09c..4169cb13b0 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnector.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyConnector diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md index bd00f0b1c3..526b8c6de8 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroup.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroup diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md index 8be04f9aeb..7e4fc54e1e 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorGroupMembers.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyConnectorGroupMembers diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md index a080d1ba8c..14203aabb8 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationProxyConnectorMemberOf.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationProxyConnectorMemberOf diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md index 1b86f94050..af15b9e362 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md index e9da11e240..ce818ece77 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationTemplate.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationTemplate diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md index 6ea89d018d..79be9b55ed 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaDeletedApplication.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeletedApplication diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md index f42a529398..8ed4d84d76 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPasswordSingleSignOnCredential.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPasswordSingleSignOnCredential diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md index 8f59e4e105..c3c505d109 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipal.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipal diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md index d203f8d9ef..ee34964de9 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignedTo.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignedTo diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md index b99d59efbf..a10107c653 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalAppRoleAssignment.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md index 1db2e1e933..df4fd65c93 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalCreatedObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalCreatedObject diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md index 71431612e7..2f16da7c88 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalDelegatedPermissionClassification diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md index d0e4235397..67a4b3d852 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalKeyCredential.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalKeyCredential diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md index 9896c8fe5b..8bb9364878 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalMembership.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalMembership diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md index 37b4cd3bf7..7e075a40f7 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOAuth2PermissionGrant.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalOAuth2PermissionGrant diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md index 7776848a87..b5b4b2adc3 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwnedObject.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalOwnedObject diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md index f4079b75bb..8fdaf71bdb 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalOwner.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalOwner diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md index 609ce47a6f..ccf3588d60 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaServicePrincipalPasswordCredential.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalPasswordCredential diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md index ecc23fe69e..9d268358cb 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplication.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplication diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md index 480fd7f3b5..df3cbd07f9 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationExtensionProperty.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationExtensionProperty diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md index 53fe641539..e3b0be935b 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationFromApplicationTemplate.md @@ -11,7 +11,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationFromApplicationTemplate diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md index 5579a018fa..49d0842d13 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKey.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationKey diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md index 4a7aa7ceab..8f6b2858e3 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationKeyCredential.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationKeyCredential diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md index 7d16d52e9d..f04fc91310 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPassword.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationPassword diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md index 7c0eeff651..e19d0c32e9 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationPasswordCredential.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationPasswordCredential diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md index 228d00e8a6..9e8599b9b5 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyApplication.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationProxyApplication diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md index 38abcdcaf2..2b6e2ceae6 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaApplicationProxyConnectorGroup.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaApplicationProxyConnectorGroup diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md index 30cc3aeb7c..95aee6ae7a 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaPasswordSingleSignOnCredential.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPasswordSingleSignOnCredential diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md index b63c5d2399..71d14003fd 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipal.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaServicePrincipal diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md index e343ea2d82..0b72aa739a 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalAppRoleAssignment.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaServicePrincipalAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md index 6ca35e677b..b0b851ac65 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/New-EntraBetaServicePrincipalPasswordCredential.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaServicePrincipalPasswordCredential diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md index 84f5328cf5..54c8d2b1d2 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplication.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplication diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md index 87fb4d2151..a415ec7b6f 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationExtensionProperty.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationExtensionProperty diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md index c7e8034273..4803798a25 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKey.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationKey diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md index 140618b8e2..59c6778d1f 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationKeyCredential.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationKeyCredential diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md index 879bf8086b..a1e5029ae3 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationOwner diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md index 6b7b8ad3ed..0e41b5a95b 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPassword.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationPassword diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md index e2bb538ca6..1c0c35d08a 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPasswordCredential.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationPasswordCredential diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md index 4d4f5e3531..9913533461 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationPolicy diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md index 179ce03a8a..4482541fd2 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplication.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationProxyApplication diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md index cd013abedd..d460c77e02 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationProxyApplicationConnectorGroup diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md index 311cddf449..2cf6ebace5 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationProxyConnectorGroup.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationProxyConnectorGroup diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md index 23803b42d7..faf439c4fb 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaApplicationVerifiedPublisher.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaApplicationVerifiedPublisher diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md index 132606613e..073213e7cf 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedApplication.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDeletedApplication diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md index 01b319cee7..a1a279e71d 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDeletedDirectoryObject diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md index 604606939b..cff817efb6 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaPasswordSingleSignOnCredential.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPasswordSingleSignOnCredential diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md index ec0c8a41ae..f09f167ea1 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipal.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipal diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md index 6e00094b98..b20d67b812 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalAppRoleAssignment.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md index 989d7ce940..9144d29076 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalDelegatedPermissionClassification diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md index 44f34cc5f6..422257be5b 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalOwner.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalOwner diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md index 05f5121eeb..5808e6bbfd 100644 --- a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaServicePrincipalPasswordCredential.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalPasswordCredential diff --git a/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md b/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md index a15140726f..8ce74f4b30 100644 --- a/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Restore-EntraBetaDeletedApplication.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Restore-EntraBetaDeletedApplication diff --git a/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md index fa0f9b9d5d..3048ef355c 100644 --- a/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md +++ b/module/docs/entra-powershell-beta/Applications/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Select-EntraBetaGroupIdsServicePrincipalIsMemberOf diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md index f55f3ee0b5..aac219bb1d 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplication.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplication diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md index cff6a52c83..b7b23ff2a8 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationLogo.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationLogo diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md index 52c904783b..9aba2e5856 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplication.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyApplication diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md index f116fd531a..e73cda1102 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationConnectorGroup.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyApplicationConnectorGroup diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md index 4e87ebd36d..1351e53c87 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyApplicationSingleSignOn.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyApplicationSingleSignOn diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md index 5044f2396a..2b35cd5eb1 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnector.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyConnector diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md index 6df4bb154c..ef514add1b 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationProxyConnectorGroup.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationProxyConnectorGroup diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md index f39a7ff1be..cbf5dd4bb4 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaApplicationVerifiedPublisher.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaApplicationVerifiedPublisher diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md index 27e95975f6..ef2b533e0b 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaPasswordSingleSignOnCredential.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPasswordSingleSignOnCredential diff --git a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md index ff47c609e7..0d269ca14c 100644 --- a/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md +++ b/module/docs/entra-powershell-beta/Applications/Set-EntraBetaServicePrincipal.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaServicePrincipal diff --git a/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md b/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md index 7f23bc912a..6788e6b53d 100644 --- a/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md +++ b/module/docs/entra-powershell-beta/Authentication/Connect-Entra.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi254 manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Authentication-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Connect-Entra diff --git a/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md b/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md index 7c82182864..8bc8be543f 100644 --- a/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md +++ b/module/docs/entra-powershell-beta/Authentication/Disconnect-Entra.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Authentication-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Disconnect-Entra diff --git a/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md b/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md index df4cb64a5a..01f047964f 100644 --- a/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md +++ b/module/docs/entra-powershell-beta/Authentication/Get-EntraContext.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutung manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Authentication-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraContext diff --git a/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md index fb853cc108..df2a364b95 100644 --- a/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md +++ b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaSignedInUserAllRefreshToken.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Authentication-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Revoke-EntraBetaSignedInUserAllRefreshToken schema: 2.0.0 diff --git a/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md index abf537e4e3..43b0363968 100644 --- a/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md +++ b/module/docs/entra-powershell-beta/Authentication/Revoke-EntraBetaUserAllRefreshToken.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Authentication-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Revoke-EntraBetaUserAllRefreshToken schema: 2.0.0 diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md index 07ca83b651..764cc2bd62 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaAdministrativeUnitMember.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaAdministrativeUnitMember diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md index 885ed7921a..f4caa83366 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md index 8853e65002..56a7236cf9 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredOwner.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaDeviceRegisteredOwner diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md index 89d1a138d8..a640c8f901 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDeviceRegisteredUser.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaDeviceRegisteredUser diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md index a4dd895c3b..29618ad42a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaDirectoryRoleMember.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaDirectoryRoleMember diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md index 8d5c440187..425afb69db 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Add-EntraBetaScopedRoleMembership.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaScopedRoleMembership diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md index c12cfb2196..54830754c3 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Confirm-EntraBetaDomain.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Confirm-EntraBetaDomain diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md b/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md index 1f9c09b5fb..d94161118b 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Enable-EntraBetaDirectoryRole.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Enable-EntraBetaDirectoryRole diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md index 0443834e3c..809fa7f6d2 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAccountSku.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAccountSku diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md index 8e04422b9e..abdb63334d 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnit.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAdministrativeUnit diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md index d142051923..f82377f781 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAdministrativeUnitMember.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAdministrativeUnitMember diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md index 4b85fb91a9..0b91371df8 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaAttributeSet.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAttributeSet diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md index 3d97e81ab6..6989f58fd7 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContact.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContact diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md index b6acf266f7..2023374400 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactDirectReport.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContactDirectReport diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md index 30afe35d99..784338d912 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactManager.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContactManager diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md index 2810451cbe..ee342a8d74 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContactMembership.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContactMembership diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md index 21b6db02ef..a4f53b708f 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaContract.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaContract diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md index b74983089b..9081e7e049 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinition.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinition diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md index 11005110ab..393f4ba043 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md index 9b01319ecf..09a4f00c7d 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeletedDirectoryObject.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeletedDirectoryObject diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md index 362e8c7500..12c9bb4de2 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDevice.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDevice diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md index 3fa856ea60..6a6b122dbe 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredOwner.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeviceRegisteredOwner diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md index 75d17a7f7c..5f6b103744 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDeviceRegisteredUser.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeviceRegisteredUser diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md index f91f37634b..53aa48d970 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncConfiguration.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirSyncConfiguration diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md index b5ba61223a..9d1ac38e67 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirSyncFeature.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirSyncFeature diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md index 6737ae6c9a..1a5e8761a7 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md index 89c7bc7a73..6e95024b2a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRole.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRole diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md index f2753755f5..8edcde3df0 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleMember.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRoleMember diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md index fc2fb12162..29b9fb8d0b 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectoryRoleTemplate.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRoleTemplate diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md index 30361cb019..eaadf1330a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySetting.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectorySetting diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md index f52e58b67a..9360a06b79 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDirectorySettingTemplate.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectorySettingTemplate diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md index 0170f577ec..a27f930673 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomain.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomain diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md index bfc0b67afc..0a4baec28c 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainFederationSettings.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomainFederationSettings diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md index dd00238852..6c51c60e07 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainNameReference.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomainNameReference diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md index 0bf38733c9..1b72f6d221 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainServiceConfigurationRecord.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomainServiceConfigurationRecord diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md index b8f58afd74..69bc0a68af 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaDomainVerificationDnsRecord.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDomainVerificationDnsRecord diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md index 9ec4143e37..40be5e2400 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaFederationProperty.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaFederationProperty diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md index 0bcf8af5f7..f201080f8d 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPartnerInformation.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPartnerInformation diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md index 825909f966..a0b4d2646c 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaPasswordPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPasswordPolicy diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md index 4c858bd38a..68693bd41a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaScopedRoleMembership.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaScopedRoleMembership diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md index 3f90118380..c4d5f5642d 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaSubscribedSku.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaSubscribedSku diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md index 8fdbc31b5e..3d005a9e53 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Get-EntraBetaTenantDetail.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaTenantDetail diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md index bd46d1aa12..9d7f314c56 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnit.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaAdministrativeUnit diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md index 0eb553db0f..6a109663f7 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAdministrativeUnitMember.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaAdministrativeUnitMember diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md index 163ce8ca95..a1f0ed88ed 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaAttributeSet.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaAttributeSet diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md index 9f67102685..857b87d737 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaCustomSecurityAttributeDefinition.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaCustomSecurityAttributeDefinition diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md index 3411f6ec43..1da6543dcb 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDevice.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDevice diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md index b9b3ae2dc3..f3e49cf714 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDirectorySetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDirectorySetting diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md index 05cf883f64..39afed2b20 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/New-EntraBetaDomain.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDomain diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md index 1257754d3f..022f000a26 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnit.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaAdministrativeUnit diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md index c0097244f5..6cf361edc4 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaAdministrativeUnitMember.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaAdministrativeUnitMember diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md index ff723391c9..cdff52d0e9 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaContact.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaContact diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md index 57e89b5a37..66b5f60f8c 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDevice.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDevice diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md index 8328b37ab0..30bc42653c 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredOwner.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDeviceRegisteredOwner diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md index 9cbc75c92b..5611670a16 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeviceRegisteredUser.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDeviceRegisteredUser diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md index 77f0e02a35..3062c802ee 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectoryRoleMember.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDirectoryRoleMember diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md index 4ec63058a3..d8d645e803 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDirectorySetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDirectorySetting diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md index 4ecf201171..7b3d6e4a5a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDomain.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDomain diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md index 44ff6e6aae..a4eca94113 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaScopedRoleMembership.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaScopedRoleMembership diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md index 6093e8b3bd..ef6dd2cd77 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Restore-EntraBetaDeletedDirectoryObject diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md index bd45669142..2ca9f9117a 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAdministrativeUnit.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaAdministrativeUnit diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md index b16d966239..8757aa44ee 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaAttributeSet.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaAttributeSet diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md index 6b3757c9f4..9def46ce3f 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinition.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinition diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md index 01e97eb51d..24990be95e 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md index bff3a5c143..06ad01c104 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDevice.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDevice diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md index a50f202a95..463282e467 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncConfiguration.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirSyncConfiguration diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md index 0a1ccaa802..ac2f2d82d2 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncEnabled.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirSyncEnabled diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md index 09ce43b37d..8eb1cd1031 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirSyncFeature diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md index 4a5df53ed9..418c9451cf 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDirectorySetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirectorySetting diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md index 45988f67f5..31cc84fbf6 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomain.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDomain diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md index 8d7ba0612f..7fb89a6443 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaDomainFederationSettings.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDomainFederationSettings diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md index 91c05e2a8c..1e8729e1ad 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaPartnerInformation.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPartnerInformation diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md index 6306f730e4..4d33468b9b 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Set-EntraBetaTenantDetail.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.DirectoryManagement-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaTenantDetail diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md index 9479c7d7e9..ff6e927171 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRoleAssignment diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md index c284b0d438..72fd4229b2 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaDirectoryRoleDefinition.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDirectoryRoleDefinition diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md index ab414b9e7e..c6b1c04fea 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedResource.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedResource diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md index f06ae96aba..d5549729d4 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md @@ -1,5 +1,5 @@ --- -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedRole diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md index 4c14a1c6c9..27d2c9323c 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleDefinition.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedRoleDefinition diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md index 1de19d43d4..cf9df3ddbe 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRoleSetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedRoleSetting diff --git a/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md index 49c7a03f9e..9d05adcd28 100644 --- a/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDirectoryRoleAssignment diff --git a/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md index c17f7cb695..a931d1d6dd 100644 --- a/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/New-EntraBetaDirectoryRoleDefinition.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaDirectoryRoleDefinition diff --git a/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md index 1f9588ae8d..92d105e020 100644 --- a/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md @@ -1,5 +1,5 @@ --- -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment diff --git a/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md index 54700d7471..68b0e1fe3c 100644 --- a/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDirectoryRoleAssignment diff --git a/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md index 28b0bcb570..b8fefb0ced 100644 --- a/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/Remove-EntraBetaDirectoryRoleDefinition.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaDirectoryRoleDefinition diff --git a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md index a2e6ba4db1..d81052475e 100644 --- a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaDirectoryRoleDefinition.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaDirectoryRoleDefinition diff --git a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md index 1188d8079c..8279aa55ad 100644 --- a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md +++ b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md @@ -1,5 +1,5 @@ --- -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest diff --git a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md index 748b51fbe1..182c1ba4dd 100644 --- a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md +++ b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleSetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPrivilegedRoleSetting diff --git a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md index 14b20fe2cc..cde674dac9 100644 --- a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md +++ b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupMember.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaGroupMember diff --git a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md index 6f41645714..f09c35c291 100644 --- a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md +++ b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaGroupOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaGroupOwner diff --git a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md index 2d22f95f7d..7aa8f0b6bc 100644 --- a/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Add-EntraBetaLifecyclePolicyGroup.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaLifecyclePolicyGroup diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md index 86b2078a04..2b3361bcf7 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaDeletedGroup.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaDeletedGroup diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md index 405e421cc1..3caaf45ce5 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroup.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroup diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md index b899f27cfe..d3121ba032 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupAppRoleAssignment.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md index 9431995c28..f77e881e9d 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupLifecyclePolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupLifecyclePolicy diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md index 07d1fff0cc..9996a56a9d 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupMember.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupMember diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md index a605674ccb..88244c7718 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupOwner.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupOwner diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md index 1eee40e0ae..976f442b3b 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaGroupPermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGroupPermissionGrant diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md index 35f8772d66..f0d7b27e00 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaLifecyclePolicyGroup.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaLifecyclePolicyGroup diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md index 6ebe106017..6670c3e675 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectByObjectId.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaObjectByObjectId diff --git a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md index 3575baffca..d5b51ea9ac 100644 --- a/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md +++ b/module/docs/entra-powershell-beta/Groups/Get-EntraBetaObjectSetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaObjectSetting diff --git a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md index 7aa5102131..ebd08aa6d5 100644 --- a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md +++ b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroup.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaGroup diff --git a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md index 192b281170..97c93ad2e2 100644 --- a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupAppRoleAssignment.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaGroupAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md index 5dad10235f..ef0e835d05 100644 --- a/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-beta/Groups/New-EntraBetaGroupLifecyclePolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaGroupLifecyclePolicy diff --git a/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md index f624b43f0a..642cbdc4c5 100644 --- a/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md +++ b/module/docs/entra-powershell-beta/Groups/New-EntraBetaObjectSetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaObjectSetting diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md index fcbba57c1c..82ae0c2933 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroup.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroup diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md index 06d5e14af6..f7a2480edf 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupAppRoleAssignment.md @@ -7,7 +7,7 @@ ms.date: 07/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroupAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md index b06ac0ce84..48f6ad8e18 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupLifecyclePolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroupLifecyclePolicy diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md index 6aa0fd01f6..3a18dece3f 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupMember.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroupMember diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md index 9caf80d73a..cae70ab937 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaGroupOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaGroupOwner diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md index bb7d6f6c06..c70b3a6530 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaLifecyclePolicyGroup.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaLifecyclePolicyGroup diff --git a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md index b81bbbde0a..f28ba46a2b 100644 --- a/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md +++ b/module/docs/entra-powershell-beta/Groups/Remove-EntraBetaObjectSetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaObjectSetting diff --git a/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md b/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md index b56d5c8f1f..5e12cbd27f 100644 --- a/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Reset-EntraBetaLifeCycleGroup.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Reset-EntraBetaLifeCycleGroup diff --git a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md index 2d935e3e22..2c900e6efa 100644 --- a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md +++ b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsContactIsMemberOf.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Select-EntraBetaGroupIdsContactIsMemberOf diff --git a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md index d63dabfd53..956c9eae62 100644 --- a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md +++ b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsGroupIsMemberOf.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Select-EntraBetaGroupIdsGroupIsMemberOf diff --git a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md index ea47c72454..5b45323290 100644 --- a/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md +++ b/module/docs/entra-powershell-beta/Groups/Select-EntraBetaGroupIdsUserIsMemberOf.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Select-EntraBetaGroupIdsUserIsMemberOf diff --git a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md index a1eed3c9a1..77fdd1c707 100644 --- a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md +++ b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroup.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaGroup diff --git a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md index e9067dafc3..fe7d495975 100644 --- a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaGroupLifecyclePolicy.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaGroupLifecyclePolicy diff --git a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md index 181ba882d1..ba71b02573 100644 --- a/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md +++ b/module/docs/entra-powershell-beta/Groups/Set-EntraBetaObjectSetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Groups-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaObjectSetting diff --git a/module/docs/entra-powershell-beta/Applications/Enable-EntraBetaGlobalSecureAccessTenant.md b/module/docs/entra-powershell-beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.md similarity index 95% rename from module/docs/entra-powershell-beta/Applications/Enable-EntraBetaGlobalSecureAccessTenant.md rename to module/docs/entra-powershell-beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.md index fc76f02dca..19eb199d99 100644 --- a/module/docs/entra-powershell-beta/Applications/Enable-EntraBetaGlobalSecureAccessTenant.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.md @@ -8,8 +8,8 @@ ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta +external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml +Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaGlobalSecureAccessTenantStatus.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md similarity index 96% rename from module/docs/entra-powershell-beta/Applications/Get-EntraBetaGlobalSecureAccessTenantStatus.md rename to module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md index 02a1d9d7c6..4d7ffc11fc 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaGlobalSecureAccessTenantStatus.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md @@ -8,8 +8,8 @@ ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta +external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml +Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPrivateAccessApplication.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md similarity index 98% rename from module/docs/entra-powershell-beta/Applications/Get-EntraBetaPrivateAccessApplication.md rename to module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md index daa37596e3..9b0ba49978 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaPrivateAccessApplication.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md @@ -8,8 +8,8 @@ ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta +external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml +Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md index b3df2ed5c1..9ca629572b 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG author: andres-canello -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 diff --git a/module/docs/entra-powershell-beta/Applications/New-EntraBetaPrivateAccessApplication.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md similarity index 97% rename from module/docs/entra-powershell-beta/Applications/New-EntraBetaPrivateAccessApplication.md rename to module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md index be03b5a2fd..bb73a1c006 100644 --- a/module/docs/entra-powershell-beta/Applications/New-EntraBetaPrivateAccessApplication.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md @@ -8,8 +8,8 @@ ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta +external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml +Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md index b14d31b890..4b4805dd5b 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG author: andres-canello -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md index 766a9a1269..2461f7e052 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru reviewer: andres-canello manager: CelesteDG author: andres-canello -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta online version: schema: 2.0.0 diff --git a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md index 27751d2b7a..6a2a89432c 100644 --- a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md +++ b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInDetailedSummary.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Reports-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationSignInDetailedSummary diff --git a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md index c468f67a39..f99be411b7 100644 --- a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md +++ b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaApplicationSignInSummary.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Reports-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationSignInSummary diff --git a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md index 9d3cb06d39..17c27fd558 100644 --- a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md +++ b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditDirectoryLog.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Reports-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAuditDirectoryLog diff --git a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md index 5413f125de..c4700c230a 100644 --- a/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md +++ b/module/docs/entra-powershell-beta/Reports/Get-EntraBetaAuditSignInLog.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Reports-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAuditSignInLog diff --git a/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md index 57f8d907a6..26181d7ad0 100644 --- a/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md +++ b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaFeatureRolloutPolicyDirectoryObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaFeatureRolloutPolicyDirectoryObject diff --git a/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md index b4c2216864..31cc047197 100644 --- a/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Add-EntraBetaServicePrincipalPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Add-EntraBetaServicePrincipalPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md index d9ba259e52..188857f062 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaAuthorizationPolicy.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaAuthorizationPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md index 8a3afea146..3de7300d1e 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaConditionalAccessPolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaConditionalAccessPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md index b548efc464..a9a7585a82 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaFeatureRolloutPolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaFeatureRolloutPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md index 895a3c5ea9..740421c31a 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaIdentityProvider.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaIdentityProvider diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md index a3976a0b84..cc69f6ce50 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaNamedLocationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaNamedLocationPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md index 0e4ea31669..ee19654797 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaOAuth2PermissionGrant.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaOAuth2PermissionGrant diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md index 9f7fac6507..e379cfc51d 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantConditionSet.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPermissionGrantConditionSet diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md index 02f2e7ad24..9ba384bfc9 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPermissionGrantPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPermissionGrantPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md index ebb89eb711..a0c4fc6241 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md index d3a0233543..a497859100 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaPolicyAppliedObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPolicyAppliedObject diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md index 6c97472cae..a58d839d97 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaServicePrincipalPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaServicePrincipalPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md index 6547c95640..25cf3a0dc7 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustFrameworkPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaTrustFrameworkPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md index 8ab14f7b30..df4b2a8f6f 100644 --- a/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaTrustedCertificateAuthority.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaTrustedCertificateAuthority diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationMethod.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaUserAuthenticationMethod.md similarity index 94% rename from module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationMethod.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaUserAuthenticationMethod.md index d17b4bb236..acc2cf6610 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationMethod.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaUserAuthenticationMethod.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationMethod +external help file: Microsoft.Entra.Beta.SignIns-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserAuthenticationMethod schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationRequirement.md b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaUserAuthenticationRequirement.md similarity index 95% rename from module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationRequirement.md rename to module/docs/entra-powershell-beta/SignIns/Get-EntraBetaUserAuthenticationRequirement.md index 1bda51f7b4..cba343b64a 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaUserAuthenticationRequirement.md +++ b/module/docs/entra-powershell-beta/SignIns/Get-EntraBetaUserAuthenticationRequirement.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-Help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement +external help file: Microsoft.Entra.Beta.SignIns-Help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserAuthenticationRequirement schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md index 81f22bb054..055c3abd93 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaConditionalAccessPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaConditionalAccessPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md index bfff6c5c4c..fdac3f7d84 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaFeatureRolloutPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaFeatureRolloutPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md index 9b807a5ec1..aea2a52ee1 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaIdentityProvider.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaIdentityProvider diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md index c1c0e65825..35fc4d871f 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaInvitation.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaInvitation diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md index 064c2849e6..3b536f9063 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaNamedLocationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaNamedLocationPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md index fec246fe16..7a2ea21c0a 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaOauth2PermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaOauth2PermissionGrant diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md index dfaac2ade3..94b4720a26 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantConditionSet.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPermissionGrantConditionSet diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md index 2abe978292..8dab1ea3e7 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPermissionGrantPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPermissionGrantPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md index 8704cfb5b6..915c70c479 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md index 93a13d94c0..a33ff45fa5 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustFrameworkPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaTrustFrameworkPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md index 2bda7ea546..fb7187c326 100644 --- a/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-beta/SignIns/New-EntraBetaTrustedCertificateAuthority.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaTrustedCertificateAuthority diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md index 8ee117fdd9..f681c03983 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaConditionalAccessPolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaConditionalAccessPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md index 5154df93ce..7ed0d86189 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md index 69d8b2cdb2..082fa57c74 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaFeatureRolloutPolicyDirectoryObject diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md index 8303e41499..e606396c78 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaIdentityProvider.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaIdentityProvider diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md index 2aeedd6e62..800d3c50e5 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaNamedLocationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaNamedLocationPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md index fdf7951e30..cdb4e5f706 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaOAuth2PermissionGrant diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md index 9e03832160..5ab50b7a18 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantConditionSet.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPermissionGrantConditionSet diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md index f74b1a7488..07ec4fdedb 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPermissionGrantPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPermissionGrantPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md index 826ca4e6e0..bb798b568d 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md index e17504a700..6d12056154 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaServicePrincipalPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaServicePrincipalPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md index a1b627d105..c37cbe8d3f 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustFrameworkPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaTrustFrameworkPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md index 59bf1061e6..0756e09df0 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaTrustedCertificateAuthority.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaTrustedCertificateAuthority diff --git a/module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-beta/SignIns/Reset-EntraBetaStrongAuthenticationMethodByUpn.md similarity index 97% rename from module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md rename to module/docs/entra-powershell-beta/SignIns/Reset-EntraBetaStrongAuthenticationMethodByUpn.md index f56a6a935e..929c2c8db1 100644 --- a/module/docs/entra-powershell-beta/Authentication/Reset-EntraBetaStrongAuthenticationMethodByUpn.md +++ b/module/docs/entra-powershell-beta/SignIns/Reset-EntraBetaStrongAuthenticationMethodByUpn.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Reset-EntraBetaStrongAuthenticationMethodByUpn diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md index faec220da4..8a934f84ec 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaAuthorizationPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaAuthorizationPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md index c01a96f100..395fab1c7c 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaConditionalAccessPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaConditionalAccessPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md index 450ae6d9f4..8782db9b6d 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaFeatureRolloutPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaFeatureRolloutPolicy schema: 2.0.0 diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md index 9a64fde4c8..4f6c1677d1 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaIdentityProvider.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaIdentityProvider diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md index 707542fe8e..81f364e84d 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaNamedLocationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaNamedLocationPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md index aeab921b41..0c73c39791 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantConditionSet.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPermissionGrantConditionSet diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md index 84055128fe..fcc2fc32d4 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPermissionGrantPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPermissionGrantPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md index c10a20a1d2..0d16a969b5 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md index aa0cbfe203..d21efaf820 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustFrameworkPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaTrustFrameworkPolicy diff --git a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md index 77a382a568..a45e37dc0d 100644 --- a/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-beta/SignIns/Set-EntraBetaTrustedCertificateAuthority.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.SignIns-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaTrustedCertificateAuthority diff --git a/module/docs/entra-powershell-beta/Applications/Update-EntraBetaOauth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/Update-EntraBetaOauth2PermissionGrant.md similarity index 96% rename from module/docs/entra-powershell-beta/Applications/Update-EntraBetaOauth2PermissionGrant.md rename to module/docs/entra-powershell-beta/SignIns/Update-EntraBetaOauth2PermissionGrant.md index 45cbf0620f..f9b0e8620a 100644 --- a/module/docs/entra-powershell-beta/Applications/Update-EntraBetaOauth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/SignIns/Update-EntraBetaOauth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Update-EntraBetaOauth2PermissionGrant +external help file: Microsoft.Entra.Beta.SignIns-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Update-EntraBetaOauth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Applications/Update-EntraBetaUserAuthenticationRequirement.md b/module/docs/entra-powershell-beta/SignIns/Update-EntraBetaUserAuthenticationRequirement.md similarity index 96% rename from module/docs/entra-powershell-beta/Applications/Update-EntraBetaUserAuthenticationRequirement.md rename to module/docs/entra-powershell-beta/SignIns/Update-EntraBetaUserAuthenticationRequirement.md index a668b958a2..76ea680487 100644 --- a/module/docs/entra-powershell-beta/Applications/Update-EntraBetaUserAuthenticationRequirement.md +++ b/module/docs/entra-powershell-beta/SignIns/Update-EntraBetaUserAuthenticationRequirement.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra.Beta-help.xml -Module Name: Microsoft.Graph.Entra.Beta -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement +external help file: Microsoft.Entra.Beta.SignIns-help.xml +Module Name: Microsoft.Entra.Beta +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Update-EntraBetaUserAuthenticationRequirement schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md index 516d312449..7663d99102 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUser.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUser diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md index b03d11125f..c066f16441 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserAppRoleAssignment.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md index c948384f74..2138c96035 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserCreatedObject.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserCreatedObject diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md index 8f2b6c3f23..6cb7ec5a3e 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserDirectReport.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserDirectReport diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md index 427a3fcfda..661d5f0c43 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserExtension.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserExtension diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md index bb749f9f04..8de7f2141c 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserLicenseDetail.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserLicenseDetail diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md index 6b9a772b7e..d701521503 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserManager.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserManager diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md index 2f0e64f319..671ac692df 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserMembership.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserMembership diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md index b6e6b4e51f..b6cd725fb3 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOAuth2PermissionGrant.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserOAuth2PermissionGrant diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md index 066155c610..de5cc02690 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedDevice.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserOwnedDevice diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md index a1ad55788f..d7b8a13dc8 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserOwnedObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserOwnedObject diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md index 6391d94615..c43569a4f0 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserRegisteredDevice.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserRegisteredDevice diff --git a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md index 828275a0b7..8c777ba563 100644 --- a/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md +++ b/module/docs/entra-powershell-beta/Users/Get-EntraBetaUserThumbnailPhoto.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaUserThumbnailPhoto diff --git a/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md index 75bb05486c..ba5150bcb1 100644 --- a/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md +++ b/module/docs/entra-powershell-beta/Users/New-EntraBetaUser.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaUser diff --git a/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md index 5e9d2daf27..e9467b04ca 100644 --- a/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Users/New-EntraBetaUserAppRoleAssignment.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaUserAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md index 9947c13fed..314183dfa0 100644 --- a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md +++ b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUser.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaUser diff --git a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md index a2ed6ad699..20b6c0e45a 100644 --- a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserAppRoleAssignment.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaUserAppRoleAssignment diff --git a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md index 4c2581c33b..6d4b242cc4 100644 --- a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md +++ b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserExtension.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaUserExtension diff --git a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md index eb9aaeb1f5..d345a2d8b6 100644 --- a/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md +++ b/module/docs/entra-powershell-beta/Users/Remove-EntraBetaUserManager.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaUserManager diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md index 955e655e70..128f697ff0 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUser.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUser diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md index ca212caa31..19938de6ea 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserExtension.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserExtension diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md index 48de0dbe48..36a236e631 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserLicense.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserLicense diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md index a0f48aa49c..64fed02a20 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserManager.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserManager diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md index d9662f75f2..61cd48e807 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserPassword.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserPassword diff --git a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md index c5b1c21855..90a73b2ce9 100644 --- a/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md +++ b/module/docs/entra-powershell-beta/Users/Set-EntraBetaUserThumbnailPhoto.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaUserThumbnailPhoto diff --git a/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md b/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md index 09833b0c5a..2c3282077b 100644 --- a/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md +++ b/module/docs/entra-powershell-beta/Users/Update-EntraBetaSignedInUserPassword.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra.Beta-Help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Update-EntraBetaSignedInUserPassword diff --git a/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md b/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md index 8a386e04ca..accc96a469 100644 --- a/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md +++ b/module/docs/entra-powershell-beta/Users/Update-EntraBetaUserFromFederated.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra.Beta-help.xml +external help file: Microsoft.Entra.Beta.Users-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Update-EntraBetaUserFromFederated diff --git a/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md index feb1b6b7e8..dca68faccc 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Add-EntraApplicationOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraApplicationOwner diff --git a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md index e7a87c8752..acf6ebade0 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalDelegatedPermissionClassification.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraServicePrincipalDelegatedPermissionClassification diff --git a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md index f7f1dcd0a3..414d1aa154 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md @@ -8,7 +8,7 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraServicePrincipalOwner diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md index 6e630401b5..ebae562fd6 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplication.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplication diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md index e9e69715c1..7bb9eabfd6 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationExtensionProperty.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationExtensionProperty diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md index ac6159d595..0fba894e79 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationKeyCredential.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationKeyCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md index 720ab68779..7e66e4beec 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationLogo.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationLogo diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md index 0f97722400..8e2da80aeb 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationOwner.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationOwner diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md index 1dd794e120..734049b959 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationPasswordCredential.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationPasswordCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md index c831c41867..f6f2422c71 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationServiceEndpoint.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationServiceEndpoint diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md index 8efdc3291b..bc2961b62f 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraApplicationTemplate.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraApplicationTemplate schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md index 32a06bf586..f80317c8a2 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraDeletedApplication.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeletedApplication diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md index d4135e9d7d..72dafff67c 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipal.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipal diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md index 0067ebbe95..20ee6e4cea 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignedTo.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalAppRoleAssignedTo diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md index 0b0120db56..b26fd69f7f 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalAppRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md index 5b2e578d4f..aff6fd5cf6 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalCreatedObject.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalCreatedObject diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md index dda70e78c7..81b1ad1973 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalDelegatedPermissionClassification.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalDelegatedPermissionClassification diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md index da8e7c832f..130d49e187 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalKeyCredential.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalKeyCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md index e671ffd490..b4b4ad12d5 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalMembership.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalMembership diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md index 167fde1795..a931ca305f 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOAuth2PermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalOAuth2PermissionGrant diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md index 036c0a97ef..39d58ce217 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwnedObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalOwnedObject diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md index 66e684a96c..873b880471 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalOwner diff --git a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md index bb6aa91ac2..5606fcb1bb 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Get-EntraServicePrincipalPasswordCredential.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraServicePrincipalPasswordCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md index b5c030850e..dd107d7709 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplication.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplication diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md index 9764ac3e59..0b212e34c9 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationExtensionProperty.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationExtensionProperty diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md index 678fa01be3..4d206cce91 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationFromApplicationTemplate.md @@ -11,7 +11,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationFromApplicationTemplate schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md index 518da83efc..d5379f081b 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKey.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationKey diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md index 648bcf5c86..54bc059a63 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationKeyCredential.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationKeyCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md index ae8919ea7d..c3ad56de89 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPassword.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationPassword diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md index 43c37cffea..24d92ce324 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraApplicationPasswordCredential.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraApplicationPasswordCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md index 7691b81767..58fdb0f0ac 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipal.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraServicePrincipal diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md index d3d4d339d4..519fa1e806 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalAppRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraServicePrincipalAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md index 9a247d8433..12d01aef3a 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalKeyCredential.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraServicePrincipalKeyCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md index b75a7e1d49..9c00e75b9c 100644 --- a/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/New-EntraServicePrincipalPasswordCredential.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraServicePrincipalPasswordCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md index dbad1279f5..02034c0eeb 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplication.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplication diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md index 3f7d66ca2d..8080bdf285 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationExtensionProperty.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationExtensionProperty diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md index d313aa5257..93dc1591cd 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKey.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationKey diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md index a8d7c54160..36ee7a4025 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationKeyCredential.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationKeyCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md index 7c8e22b3d6..e6a029b2e6 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationOwner diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md index 0748c53f64..974b4f4aa2 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPassword.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationPassword diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md index 423d09f419..34ccf9a29d 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationPasswordCredential.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationPasswordCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md index f60afc20c0..c81d790901 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraApplicationVerifiedPublisher.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraApplicationVerifiedPublisher diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md index 7906384863..dc3d494f19 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedApplication.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDeletedApplication diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md index ab8f51e4e2..0d2083b752 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDeletedDirectoryObject diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md index df78641520..4b98537da4 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipal.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipal diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md index 1a62f2b97a..11afe9d9d0 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalAppRoleAssignment.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md index 39ad2c6340..467b145115 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalDelegatedPermissionClassification.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalDelegatedPermissionClassification diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md index 4e1aae3aa7..d2ef580e33 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalKeyCredential.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalKeyCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md index 3ce4d97e81..ef9bad0d69 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalOwner diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md index e0f439258c..64db9ae038 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md +++ b/module/docs/entra-powershell-v1.0/Applications/Remove-EntraServicePrincipalPasswordCredential.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraServicePrincipalPasswordCredential diff --git a/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md b/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md index 13b1ba3421..56eec8e5c5 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Restore-EntraDeletedApplication.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Restore-EntraDeletedApplication diff --git a/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md b/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md index 9dd9c7e28b..f12f7ccb62 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Applications/Select-EntraGroupIdsServicePrincipalIsMemberOf.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Select-EntraGroupIdsServicePrincipalIsMemberOf diff --git a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md index ad09e51727..45a4cbd8d2 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md +++ b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplication.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraApplication diff --git a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md index bf6066ecd7..b9afa093df 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md +++ b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationLogo.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraApplicationLogo diff --git a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md index 128e732d62..c059419acb 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md +++ b/module/docs/entra-powershell-v1.0/Applications/Set-EntraApplicationVerifiedPublisher.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraApplicationVerifiedPublisher diff --git a/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md b/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md index 1937767bd9..1746997bd9 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md +++ b/module/docs/entra-powershell-v1.0/Applications/Set-EntraServicePrincipal.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Applications-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraServicePrincipal diff --git a/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md index 528e7519ee..c51231c2d3 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Add-EntraEnvironment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Authentication-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraEnvironment diff --git a/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md b/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md index 59ce3f06f3..3a804c12fe 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Connect-Entra.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi254 manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Authentication-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Connect-Entra diff --git a/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md b/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md index 572a2cec05..602eece1c1 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Disconnect-Entra.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Authentication-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Disconnect-Entra diff --git a/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md b/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md index caeeec6481..7bd1d60f78 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Find-EntraPermission.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Authentication-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Find-EntraPermission diff --git a/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md index 0c7678461d..b9eb7971b0 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraContext.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Authentication-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContext diff --git a/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md index 50cb8dc428..0d04211dd5 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Get-EntraEnvironment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Authentication-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraEnvironment diff --git a/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md index f0132e7e37..7e46392371 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraSignedInUserAllRefreshToken.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Authentication-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Revoke-EntraSignedInUserAllRefreshToken diff --git a/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md index 9e3af6078d..c943896d8d 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md +++ b/module/docs/entra-powershell-v1.0/Authentication/Revoke-EntraUserAllRefreshToken.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Authentication-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Revoke-EntraUserAllRefreshToken schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md index 39645c5075..8932522a93 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraAdministrativeUnitMember.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraAdministrativeUnitMember diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md index 263c22f3ed..ac5e15aea2 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraCustomSecurityAttributeDefinitionAllowedValue schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md index 3bf00230a0..99c79ee9f4 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraDeviceRegisteredOwner diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md index 9e66c78719..07f5be76f2 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraDeviceRegisteredUser diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md index 52d70a4525..7571c092cb 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDirectoryRoleMember.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraDirectoryRoleMember diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md index 8de41bf3c4..c2cf72d69a 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraScopedRoleMembership.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraScopedRoleMembership diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md index 4c128989a7..da2f0d8d91 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Confirm-EntraDomain.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Confirm-EntraDomain diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md index 7bde93125c..8b9e84b52e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Enable-EntraDirectoryRole.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Enable-EntraDirectoryRole diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md index c37800183e..a78469f640 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-CrossCloudVerificationCode.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-CrossCloudVerificationCode diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md index 60d350db98..8ddb5f8978 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAccountSku.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAccountSku diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md index dbeddaa348..4deed44fa9 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnit.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAdministrativeUnit schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md index 3b36c38c7a..86d1548592 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAdministrativeUnitMember.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAdministrativeUnitMember diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md index fad801757b..089bb12b2d 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraAttributeSet.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAttributeSet diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md index ae39b96bfe..692f1deffb 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContact.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContact diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md index 2bf23e2253..1e872261b6 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactDirectReport.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContactDirectReport diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md index 840fe35d65..50b896aaf3 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactManager.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContactManager diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md index 4be93df4d0..dbe722149e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactMembership.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContactMembership diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md index 30999dafa1..cf20aa5742 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContactThumbnailPhoto.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContactThumbnailPhoto diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md index 1fc817f53b..650a446db7 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraContract.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraContract diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md index 8be18c9183..aca48c56e7 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinition.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraCustomSecurityAttributeDefinition schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md index 16c8fcd586..84798ce283 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraCustomSecurityAttributeDefinitionAllowedValue schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md index f121127233..16978c4e81 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeletedDirectoryObject.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeletedDirectoryObject diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md index 390fd74a7e..328ba69297 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDevice.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDevice diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md index e7fed412a2..1ae57ba1cb 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredOwner.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeviceRegisteredOwner diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md index 154ac0b9ca..a3a919fbd6 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDeviceRegisteredUser.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeviceRegisteredUser diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md index cc591e94d1..e8de7e8c9e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncConfiguration.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirSyncConfiguration diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md index e82f73167e..012f5b9672 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirSyncFeature.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirSyncFeature diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md index 3dc4b2f2c8..f629f058ec 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryObjectOnPremisesProvisioningError diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md index 028f9b4c1d..6e0594cd2e 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRole.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRole diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md index 1d489b5640..88cda43dc2 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleMember.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRoleMember diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md index b7cf7e366c..4560db21cc 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDirectoryRoleTemplate.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRoleTemplate diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md index b893987f1c..3b4c0b5d86 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomain.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomain diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md index 9354b09a11..06fc4878cb 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainFederationSettings.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomainFederationSettings diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md index 2875d4b638..558e7a9ded 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainNameReference.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomainNameReference diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md index 324bec695e..098852cab7 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainServiceConfigurationRecord.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomainServiceConfigurationRecord diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md index 3eb648caf9..e7a389c356 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraDomainVerificationDnsRecord.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDomainVerificationDnsRecord diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md index c349a7d41f..8e08027eca 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraExtensionProperty.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraExtensionProperty diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md index f679036a4c..ea63f66690 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraFederationProperty.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraFederationProperty diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md index 074b9af119..6410e8f9d1 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraObjectByObjectId.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraObjectByObjectId diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md index d9d5b732c8..3358296f0c 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPartnerInformation.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPartnerInformation diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md index 5b66b53975..60aa59307b 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraPasswordPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPasswordPolicy diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md index 0ab26bbffc..92829fc4c2 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraScopedRoleMembership.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraScopedRoleMembership diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md index 8e24d8ef29..6b833bb7c0 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraSubscribedSku.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraSubscribedSku diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md index f87b884182..21cd6fc850 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraTenantDetail.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraTenantDetail diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md index 98db6d4e38..48707792fa 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAdministrativeUnit.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraAdministrativeUnit diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md index c2222d8b03..c100eacd0c 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraAttributeSet.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraAttributeSet diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md index 49de406a9e..dc706dba2f 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraCustomSecurityAttributeDefinition.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraCustomSecurityAttributeDefinition diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md index 97c517fa89..9971ed4234 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDevice.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraDevice diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md index da72e16050..bd007e334b 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/New-EntraDomain.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraDomain diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md index 651bc99720..154c66d3f0 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnit.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraAdministrativeUnit diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md index c77c73c5a1..d4d78ed367 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraAdministrativeUnitMember.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraAdministrativeUnitMember diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md index 3202c94671..62fa1f0c43 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraContact.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraContact diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md index 8920323b92..bbef6c0490 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDevice.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDevice diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md index a4e92cb7fb..77eb8489a7 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDeviceRegisteredOwner diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md index f6b3f4346f..81f06ccd94 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeviceRegisteredUser.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDeviceRegisteredUser diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md index 950cc71640..6a1b180608 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDirectoryRoleMember.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDirectoryRoleMember diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md index a29b969d32..92ab4439b2 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDomain.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDomain diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md index 31abd641aa..d1ac7b8912 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraExternalDomainFederation.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraExternalDomainFederation diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md index 8304848936..817aafaa60 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraScopedRoleMembership.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraScopedRoleMembership diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md index 15c9999d8e..f63a516603 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Restore-EntraDeletedDirectoryObject diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md index a524d142e9..c2b5badd45 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAdministrativeUnit.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraAdministrativeUnit diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md index a4ece0916a..a7cb3d520d 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraAttributeSet.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraAttributeSet diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md index 7fab2faeb2..90955315df 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinition.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraCustomSecurityAttributeDefinition diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md index 8d53b7b119..524bb1f0db 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraCustomSecurityAttributeDefinitionAllowedValue.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraCustomSecurityAttributeDefinitionAllowedValue diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md index 9a1c8cf54e..b22e03c12f 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDevice.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDevice diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md index 053c6c5e47..def106ab66 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncConfiguration.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDirSyncConfiguration diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md index bfb236b909..4f2933e893 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncEnabled.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDirSyncEnabled diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md index 8b9213d1af..17cae1031c 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDirSyncFeature.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDirSyncFeature diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md index 5df60e08f0..646520128a 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomain.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDomain diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md index 54b068bbf8..3d03f90ca7 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraDomainFederationSettings.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDomainFederationSettings diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md index c8baf34f68..e3b3abd089 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraPartnerInformation.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraPartnerInformation diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md index a2d70b2894..d5c3e895dd 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Set-EntraTenantDetail.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.DirectoryManagement-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraTenantDetail diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Update-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Update-EntraOauth2PermissionGrant.md index 978a067d65..3cd0135f61 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Update-EntraOauth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Update-EntraOauth2PermissionGrant.md @@ -9,9 +9,9 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Update-EntraOauth2PermissionGrant +external help file: Microsoft.Entra.DirectoryManagement-help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Update-EntraOauth2PermissionGrant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md index 3732e917c8..09b58f225f 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Governance-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md index e65da09fb1..b8692bf1b6 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-v1.0/Governance/Get-EntraDirectoryRoleDefinition.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Governance-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDirectoryRoleDefinition diff --git a/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md index 627c47ef93..f8d0af8d75 100644 --- a/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Governance-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraDirectoryRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md index 306fb70603..e3432a4c05 100644 --- a/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-v1.0/Governance/New-EntraDirectoryRoleDefinition.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Governance-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraDirectoryRoleDefinition diff --git a/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md index 46b8530f9f..351dfc8123 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Governance-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDirectoryRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md index ae3d163375..2e82dc662f 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-v1.0/Governance/Remove-EntraDirectoryRoleDefinition.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Governance-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraDirectoryRoleDefinition diff --git a/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md b/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md index e4eaa62933..42b8ba48a8 100644 --- a/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md +++ b/module/docs/entra-powershell-v1.0/Governance/Set-EntraDirectoryRoleDefinition.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Governance-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraDirectoryRoleDefinition diff --git a/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md index 67c21f8739..226696a777 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md +++ b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupMember.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraGroupMember diff --git a/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md index ce0f079244..ff787973b4 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md +++ b/module/docs/entra-powershell-v1.0/Groups/Add-EntraGroupOwner.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraGroupOwner diff --git a/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md index 2855be163c..db8d28494b 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Add-EntraLifecyclePolicyGroup.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Add-EntraLifecyclePolicyGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md index 5dc878de90..e626d08b98 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraDeletedGroup.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraDeletedGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md index 342a416eee..dffb8fec94 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroup.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md index 556f16c85c..4a6740f0fe 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupAppRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md index cdebcfdc74..8ca5557c8f 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupLifecyclePolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupLifecyclePolicy diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md index b8022f1cb8..fa8a65e2f5 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupMember.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupMember diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md index 6a343f6d3e..138104a6bd 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupOwner.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupOwner diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md index ff6566a4b0..5bf584c8ce 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraGroupPermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraGroupPermissionGrant diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md index 3584a3d68b..e25c93b999 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraLifecyclePolicyGroup.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraLifecyclePolicyGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md b/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md index 79b680ebee..4991052d1b 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md +++ b/module/docs/entra-powershell-v1.0/Groups/Get-EntraObjectSetting.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraObjectSetting schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md index 8f91df9e41..fb98f748d8 100644 --- a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroup.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md index 4c1ba28162..f5f5947a7d 100644 --- a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupAppRoleAssignment.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraGroupAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md index 6b84628b27..ae9b213bf4 100644 --- a/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-v1.0/Groups/New-EntraGroupLifecyclePolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraGroupLifecyclePolicy diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md index dfc05d3d70..d402d22ccd 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroup.md @@ -8,7 +8,7 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md index eaf5c0b166..fd24852b18 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupAppRoleAssignment.md @@ -8,7 +8,7 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroupAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md index 5db5c62f32..a9b64ca762 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupLifecyclePolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroupLifecyclePolicy diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md index 8e766e187c..d4da0640d7 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupMember.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroupMember diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md index 524185a241..dd60446a69 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraGroupOwner.md @@ -8,7 +8,7 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraGroupOwner diff --git a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md index a771484b43..42c00f6f39 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Remove-EntraLifecyclePolicyGroup.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraLifecyclePolicyGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md b/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md index a84120036e..8cf30cba9e 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Reset-EntraLifeCycleGroup.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Reset-EntraLifeCycleGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md index 2101dd2643..38a0a963aa 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Select-EntraGroupIdsContactIsMemberOf diff --git a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md index beca17f2ec..b8bb5256b1 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsGroupIsMemberOf.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Select-EntraGroupIdsGroupIsMemberOf diff --git a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md index de9d155c5a..92c652ba9d 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsUserIsMemberOf.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Select-EntraGroupIdsUserIsMemberOf diff --git a/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md index c208c4ff84..6ff634d4b9 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md +++ b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroup.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraGroup diff --git a/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md index a6b05fe943..df28ef319e 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md +++ b/module/docs/entra-powershell-v1.0/Groups/Set-EntraGroupLifecyclePolicy.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Groups-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraGroupLifecyclePolicy diff --git a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md index d4bf972511..9c1c107c74 100644 --- a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md +++ b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Reports-Help.xml Module Name: Microsoft.Entra online version: schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md index 6046458e32..8ff0f396fa 100644 --- a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md +++ b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Reports-Help.xml Module Name: Microsoft.Entra online version: schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md index 61a4932ca0..cfea8dd06a 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraAuthorizationPolicy.md @@ -8,7 +8,7 @@ ms.date: 06/26/2024 ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAuthorizationPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md index a8cb85c366..9b904160c9 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraConditionalAccessPolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraConditionalAccessPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md index adb662c76b..750e6769d6 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraFeatureRolloutPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraFeatureRolloutPolicy schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md index e353ef3c72..a7b815a3bb 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraIdentityProvider.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraIdentityProvider diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md index 14e54a9313..a32d07988e 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraNamedLocationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraNamedLocationPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md index 025e4fd46f..4699baea24 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraOAuth2PermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraOAuth2PermissionGrant diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md index 04c45a1224..3c6e704e49 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantConditionSet.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPermissionGrantConditionSet diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md index abc5f5deca..afafd21137 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPermissionGrantPolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPermissionGrantPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md index d107e2392b..f328283f65 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md index 4461ec632a..39c0211645 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraTrustedCertificateAuthority.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraTrustedCertificateAuthority diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraUserAuthenticationMethod.md b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraUserAuthenticationMethod.md similarity index 95% rename from module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraUserAuthenticationMethod.md rename to module/docs/entra-powershell-v1.0/SignIns/Get-EntraUserAuthenticationMethod.md index 2e804e277d..bcb8bcd056 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Get-EntraUserAuthenticationMethod.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Get-EntraUserAuthenticationMethod.md @@ -9,9 +9,9 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Graph.Entra-Help.xml -Module Name: Microsoft.Graph.Entra -online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraUserAuthenticationMethod +external help file: Microsoft.Entra.SignIns-Help.xml +Module Name: Microsoft.Entra +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserAuthenticationMethod schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md index 8402f7ddc8..976cd12ce2 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraConditionalAccessPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraConditionalAccessPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md index 3b45f1a832..366f716cbe 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraFeatureRolloutPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraFeatureRolloutPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md index 37f754f289..840a54f7ff 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraIdentityProvider.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraIdentityProvider diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md index 48e797ee93..05876dfb0a 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraNamedLocationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraNamedLocationPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md index eb1d5c6f8d..21cae2b070 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraOauth2PermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraOauth2PermissionGrant diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md index a0ae5e06a0..cbba9fdef9 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantConditionSet.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraPermissionGrantConditionSet diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md index 3264f429a5..01bc1b6bda 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPermissionGrantPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraPermissionGrantPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md index dcdff8c2c0..205c565736 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md index 6669c17e14..067fe09ba5 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-v1.0/SignIns/New-EntraTrustedCertificateAuthority.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraTrustedCertificateAuthority diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md index 3f37198079..adc12a13d4 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraConditionalAccessPolicy.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraConditionalAccessPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md index 73e63963c9..673a1dcde5 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraBetaFeatureRolloutPolicy schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md index e9e4f0a135..bcfbfb7dab 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraFeatureRolloutPolicyDirectoryObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraFeatureRolloutPolicyDirectoryObject diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md index 0183415763..45c4c999e7 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraIdentityProvider.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraIdentityProvider diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md index e403a5a1ec..f7b0ad946f 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraNamedLocationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraNamedLocationPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md index 055850c6fc..70508badf7 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraOAuth2PermissionGrant diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md index 928234cf1f..5a335e07a9 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantConditionSet.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraPermissionGrantConditionSet diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md index 3b8e4b1e97..b63ba4d643 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPermissionGrantPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraPermissionGrantPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md index 7f5e0c6765..fe2c6038e6 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraPolicy schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md index 2d75d66e5e..6eeafd3f0b 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraTrustedCertificateAuthority.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraTrustedCertificateAuthority diff --git a/module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md b/module/docs/entra-powershell-v1.0/SignIns/Reset-EntraStrongAuthenticationMethodByUpn.md similarity index 97% rename from module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md rename to module/docs/entra-powershell-v1.0/SignIns/Reset-EntraStrongAuthenticationMethodByUpn.md index 8ccb238d09..4635e0ee1b 100644 --- a/module/docs/entra-powershell-v1.0/Authentication/Reset-EntraStrongAuthenticationMethodByUpn.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Reset-EntraStrongAuthenticationMethodByUpn.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Reset-EntraStrongAuthenticationMethodByUpn diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md index f7e63e9152..e4c9202c0b 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraAuthorizationPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraAuthorizationPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md index bd5d2f4629..899f72a7a8 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraConditionalAccessPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraConditionalAccessPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md index 686af3f1fa..597ce1e1c5 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraFeatureRolloutPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraFeatureRolloutPolicy schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md index ab4c682ae3..192593921b 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraIdentityProvider.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraIdentityProvider diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md index 66e07b3234..4d99b460dd 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraNamedLocationPolicy.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraNamedLocationPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md index 068ccb090d..d4424575c2 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantConditionSet.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraPermissionGrantConditionSet diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md index 0e0a66d20e..11ca930321 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPermissionGrantPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraPermissionGrantPolicy diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md index 7924ee0ab3..a86c064c8f 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: schema: 2.0.0 diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md index 86d8db25f8..58cb1c8fbc 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraTrustedCertificateAuthority.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraTrustedCertificateAuthority diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md index d45ae636e4..3ef0651aec 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUser.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUser diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md index 814da9c346..7e62f6e06e 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserAppRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md index babb1127ae..2d92933068 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserCreatedObject.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserCreatedObject diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md index d52b434cb7..50d3fb901f 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserDirectReport.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserDirectReport diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md index dd51603f9a..85f9fb1435 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserExtension.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserExtension diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md index bd67233386..9ce49dbc49 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserLicenseDetail.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserLicenseDetail diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md index d2aa60ada0..9c455e310f 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserManager.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserManager diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md index 5cfaf9d375..5e9d0015ce 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserMembership.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserMembership diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md index f131b430ab..2a4d668732 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOAuth2PermissionGrant.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserOAuth2PermissionGrant diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md index 0b3f78e79e..e5171a2b2a 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedDevice.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserOwnedDevice diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md index 0e6a103b85..f98a830d77 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserOwnedObject.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserOwnedObject diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md index 602ec8bab4..d6132b6d0c 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserRegisteredDevice.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserRegisteredDevice diff --git a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md index 3093fb0dc9..833ca92d90 100644 --- a/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md +++ b/module/docs/entra-powershell-v1.0/Users/Get-EntraUserThumbnailPhoto.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraUserThumbnailPhoto diff --git a/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md index 63370de4f8..e5cd4e629a 100644 --- a/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md +++ b/module/docs/entra-powershell-v1.0/Users/New-EntraUser.md @@ -10,7 +10,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraUser diff --git a/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md index 6a74a16fbc..5da43e1eff 100644 --- a/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Users/New-EntraUserAppRoleAssignment.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/New-EntraUserAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md index c06cf9902d..184b9b2190 100644 --- a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md +++ b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUser.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraUser diff --git a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md index 6601657b2e..0b3e5e66e8 100644 --- a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md +++ b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserAppRoleAssignment.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraUserAppRoleAssignment diff --git a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md index 78275af583..2a6094c3d8 100644 --- a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md +++ b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserExtension.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraUserExtension diff --git a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md index 5defcf1283..347433531b 100644 --- a/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md +++ b/module/docs/entra-powershell-v1.0/Users/Remove-EntraUserManager.md @@ -9,7 +9,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Remove-EntraUserManager diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md index 8f319d1e9c..179df5950b 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUser.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUser diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md index 7af45e1215..aa866937a5 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserExtension.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserExtension diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md index afd992d487..a603cf8dd3 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserLicense.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserLicense diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md index ee8a629278..4b728d157a 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserManager.md @@ -8,7 +8,7 @@ ms.author: eunicewaweru ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserManager diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md index 5fdebd108e..995679785e 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserPassword.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserPassword diff --git a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md index f6e8118e9a..301e6118f5 100644 --- a/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md +++ b/module/docs/entra-powershell-v1.0/Users/Set-EntraUserThumbnailPhoto.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraUserThumbnailPhoto diff --git a/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md b/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md index f32d94aac2..52d86af54f 100644 --- a/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md +++ b/module/docs/entra-powershell-v1.0/Users/Update-EntraSignedInUserPassword.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-Help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Update-EntraSignedInUserPassword diff --git a/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md b/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md index b9e2134321..5ff2784f25 100644 --- a/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md +++ b/module/docs/entra-powershell-v1.0/Users/Update-EntraUserFromFederated.md @@ -9,7 +9,7 @@ ms.reviewer: stevemutungi manager: CelesteDG author: msewaweru -external help file: Microsoft.Entra-help.xml +external help file: Microsoft.Entra.Users-Help.xml Module Name: Microsoft.Entra online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Update-EntraUserFromFederated From 21f8f07ab8ffe9342262cdde58aced7cdf9f14d4 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 27 Nov 2024 07:45:17 +0300 Subject: [PATCH 118/124] Enganga/docfx issue (#1230) * copied missing doc related files from module-legacy to module * fixed links * fixed links * fixed links and docfx * fixed openpublishing*.json * change revert * change revert * changes to monikerMapping.json * changes to monikerMapping.json * changes to monikerMapping.json * revert the mapping dir --- module/.sourcemap-maml-0.json | 1 + module/Entra/config/moduleMapping.json | 3 +- module/EntraBeta/config/moduleMapping.json | 2 +- module/breadcrumb/toc.yml | 3 ++ module/docfx.json | 40 +++++++++++++++++++ .../Add-EntraBetaServicePrincipalOwner.md | 2 +- .../Remove-EntraBetaDeletedDirectoryObject.md | 0 ...Restore-EntraBetaDeletedDirectoryObject.md | 6 +-- .../Governance/Get-EntraBetaPrivilegedRole.md | 10 +++++ .../New-EntraBetaPrivilegedRoleAssignment.md | 10 +++++ ...ntraBetaPrivilegedRoleAssignmentRequest.md | 10 +++++ ...EntraBetaGlobalSecureAccessTenantStatus.md | 2 +- .../Get-EntraBetaPrivateAccessApplication.md | 2 +- ...ntraBetaPrivateAccessApplicationSegment.md | 2 +- .../New-EntraBetaPrivateAccessApplication.md | 2 +- ...ntraBetaPrivateAccessApplicationSegment.md | 2 +- ...ntraBetaPrivateAccessApplicationSegment.md | 2 +- .../Remove-EntraBetaOAuth2PermissionGrant.md | 2 +- .../Add-EntraServicePrincipalOwner.md | 2 +- .../Add-EntraDeviceRegisteredUser.md | 2 +- .../Remove-EntraDeletedDirectoryObject.md | 0 .../Restore-EntraDeletedDirectoryObject.md | 6 +-- .../Select-EntraGroupIdsContactIsMemberOf.md | 2 +- .../Remove-EntraOAuth2PermissionGrant.md | 2 +- .../Update-EntraOauth2PermissionGrant.md | 0 module/mapping/monikerMapping.json | 14 +++++++ 26 files changed, 109 insertions(+), 20 deletions(-) create mode 100644 module/.sourcemap-maml-0.json create mode 100644 module/breadcrumb/toc.yml create mode 100644 module/docfx.json rename module/docs/entra-powershell-beta/{Applications => DirectoryManagement}/Remove-EntraBetaDeletedDirectoryObject.md (100%) rename module/docs/entra-powershell-v1.0/{Applications => DirectoryManagement}/Remove-EntraDeletedDirectoryObject.md (100%) rename module/docs/entra-powershell-v1.0/{DirectoryManagement => SignIns}/Update-EntraOauth2PermissionGrant.md (100%) create mode 100644 module/mapping/monikerMapping.json diff --git a/module/.sourcemap-maml-0.json b/module/.sourcemap-maml-0.json new file mode 100644 index 0000000000..6b05e77948 --- /dev/null +++ b/module/.sourcemap-maml-0.json @@ -0,0 +1 @@ +{"files":{}} \ No newline at end of file diff --git a/module/Entra/config/moduleMapping.json b/module/Entra/config/moduleMapping.json index 9f14cab8ff..e8052b4366 100644 --- a/module/Entra/config/moduleMapping.json +++ b/module/Entra/config/moduleMapping.json @@ -64,7 +64,7 @@ "Remove-EntraApplicationPasswordCredential": "Applications", "Remove-EntraApplicationVerifiedPublisher": "Applications", "Remove-EntraDeletedApplication": "Applications", - "Remove-EntraDeletedDirectoryObject": "Applications", + "Remove-EntraDeletedDirectoryObject": "DirectoryManagement", "Remove-EntraServicePrincipal": "Applications", "Remove-EntraServicePrincipalDelegatedPermissionClassification": "Applications", "Remove-EntraServicePrincipalKeyCredential": "Applications", @@ -213,6 +213,7 @@ "Set-EntraUserManager": "Users", "Set-EntraUserPassword": "Users", "Set-EntraUserThumbnailPhoto": "Users", + "Update-EntraOauth2PermissionGrant":"SignIns", "Update-EntraSignedInUserPassword": "Users", "Reset-EntraStrongAuthenticationMethodByUpn": "Authentication", "Get-EntraAttributeSet": "DirectoryManagement", diff --git a/module/EntraBeta/config/moduleMapping.json b/module/EntraBeta/config/moduleMapping.json index 6dfceeaf2a..97e5bfc559 100644 --- a/module/EntraBeta/config/moduleMapping.json +++ b/module/EntraBeta/config/moduleMapping.json @@ -106,7 +106,7 @@ "Remove-EntraBetaApplicationPolicy": "Applications", "Remove-EntraBetaApplicationVerifiedPublisher": "Applications", "Remove-EntraBetaDeletedApplication": "Applications", - "Remove-EntraBetaDeletedDirectoryObject": "Applications", + "Remove-EntraBetaDeletedDirectoryObject": "DirectoryManagement", "Remove-EntraBetaServicePrincipal": "Applications", "Remove-EntraBetaServicePrincipalDelegatedPermissionClassification": "Applications", "Remove-EntraBetaServicePrincipalOwner": "Applications", diff --git a/module/breadcrumb/toc.yml b/module/breadcrumb/toc.yml new file mode 100644 index 0000000000..61d8fca61e --- /dev/null +++ b/module/breadcrumb/toc.yml @@ -0,0 +1,3 @@ +- name: Docs + tocHref: / + topicHref: / \ No newline at end of file diff --git a/module/docfx.json b/module/docfx.json new file mode 100644 index 0000000000..f101fa02e1 --- /dev/null +++ b/module/docfx.json @@ -0,0 +1,40 @@ +{ + "build": { + "content": [ + { "dest": "entra-preview", "files": [ "breadcrumb/toc.yml" ]}, + + { "dest": "entra-preview", "files": [ "**/*.md", "**/*.yml" ], "src": "docs/entra-powershell-v1.0", "version": "entra-powershell-preview" }, + { "dest": "module", "exclude": [ "toc.yml" ], "files": [ "**/*.yml" ], "src": "entra-powershell-preview", "version": "entra-powershell-preview" }, + { "dest": "module", "files": [ "**/About/*.md" ], "src": "entra-powershell-preview", "version": "entra-powershell-preview" }, + { "dest": "module/entra-powershell-preview", "files": [ "toc.yml" ], "src": "entra-powershell-preview", "version": "entra-powershell-preview" }, + + { "dest": "entra-preview", "files": [ "**/*.md", "**/*.yml" ], "src": "docs/entra-powershell-beta", "version": "entra-powershell-beta-preview" }, + { "dest": "module", "exclude": [ "toc.yml" ], "files": [ "**/*.yml" ], "src": "entra-powershell-beta-preview", "version": "entra-powershell-beta-preview" }, + { "dest": "module", "files": [ "**/About/*.md" ], "src": "entra-powershell-beta-preview", "version": "entra-powershell-beta-preview" }, + { "dest": "module/entra-powershell-beta-preview", "files": [ "toc.yml" ], "src": "entra-powershell-beta-preview", "version": "entra-powershell-beta-preview" }, + + { "dest": "entra-preview", "files": [ "**/*.md", "**/*.yml" ], "src": "virtual-folder" }, + { "dest": "module", "files": [ "**/*.md", "**/*.yml" ], "src": "virtual-folder-module" } + ], + "versions": { + "entra-powershell-preview": { "dest": "entra-powershell-preview" }, + "entra-powershell-beta-preview": { "dest": "entra-powershell-beta-preview" } + }, + "overwrite": [], + "externalReference": [], + "globalMetadata": { + "breadcrumb_path": "/powershell/samples/breadcrumb/toc.json", + "extendBreadcrumb": true, + "feedback_system": "Standard", + "ms.devlang": "powershell", + "ms.topic": "reference", + "ms.author": "stevemutungi", + "author": "SteveMutungi254", + "uhfHeaderId": "MSDocsHeader-DotNet" + }, + "template": [], + "markdownEngineName": "markdig", + "exportRawModel": true, + "exportViewModel": true + } +} diff --git a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md index a18e07d1f4..37dac535ee 100644 --- a/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md +++ b/module/docs/entra-powershell-beta/Applications/Add-EntraBetaServicePrincipalOwner.md @@ -100,6 +100,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar [Get-EntraBetaServicePrincipalOwner](Get-EntraBetaServicePrincipalOwner.md) -[Get-EntraBetaUser](Get-EntraBetaUser.md) +[Get-EntraBetaUser](../Users/Get-EntraBetaUser.md) [Remove-EntraBetaServicePrincipalOwner](Remove-EntraBetaServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeletedDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-beta/Applications/Remove-EntraBetaDeletedDirectoryObject.md rename to module/docs/entra-powershell-beta/DirectoryManagement/Remove-EntraBetaDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md b/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md index ef6dd2cd77..7563d8c068 100644 --- a/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-beta/DirectoryManagement/Restore-EntraBetaDeletedDirectoryObject.md @@ -144,12 +144,12 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar ## Related Links -[Remove-EntraBetaDeletedApplication](Remove-EntraBetaDeletedApplication.md) +[Remove-EntraBetaDeletedApplication](../Applications/Remove-EntraBetaDeletedApplication.md) -[Restore-EntraBetaDeletedApplication](Restore-EntraBetaDeletedApplication.md) +[Restore-EntraBetaDeletedApplication](../Applications/Restore-EntraBetaDeletedApplication.md) [Remove-EntraBetaDeletedDirectoryObject](Remove-EntraBetaDeletedDirectoryObject.md) -[Get-EntraBetaDeletedApplication](Get-EntraBetaDeletedApplication.md) +[Get-EntraBetaDeletedApplication](../Applications/Get-EntraBetaDeletedApplication.md) [Get-EntraBetaDeletedDirectoryObject](Get-EntraBetaDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md index d5549729d4..6ef05bdaa6 100644 --- a/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md +++ b/module/docs/entra-powershell-beta/Governance/Get-EntraBetaPrivilegedRole.md @@ -1,4 +1,14 @@ --- +title: Get-EntraBetaPrivilegedRole +description: This article provides details on the Get-EntraBetaPrivilegedRole command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivilegedRole diff --git a/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md b/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md index 92d105e020..f6db071299 100644 --- a/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md +++ b/module/docs/entra-powershell-beta/Governance/New-EntraBetaPrivilegedRoleAssignment.md @@ -1,4 +1,14 @@ --- +title: New-EntraBetaPrivilegedRoleAssigment +description: This article provides details on the New-EntraBetaPrivilegedRoleAssignment command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPrivilegedRoleAssignment diff --git a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md index 8279aa55ad..70ce0884da 100644 --- a/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md +++ b/module/docs/entra-powershell-beta/Governance/Set-EntraBetaPrivilegedRoleAssignmentRequest.md @@ -1,4 +1,14 @@ --- +title: Set-EntraBetaDirectoryRoleAssignmentRequest +description: This article provides details on the Set-EntraBetaDirectoryRoleAssignmentRequest command. + + +ms.topic: reference +ms.date: 07/19/2024 +ms.author: eunicewaweru +ms.reviewer: stevemutungi +manager: CelesteDG + external help file: Microsoft.Entra.Beta.Governance-Help.xml Module Name: Microsoft.Entra.Beta online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Set-EntraBetaPrivilegedRoleAssignmentRequest diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md index 4d7ffc11fc..15edd9fcd9 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md @@ -75,7 +75,7 @@ System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutra ## RELATED LINKS -[Get-EntraBetaApplication](Get-EntraBetaApplication.md) +[Get-EntraBetaApplication](../Applications/Get-EntraBetaApplication.md) [Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md) diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md index 9b0ba49978..1faa556efa 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md @@ -154,7 +154,7 @@ System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutra ## RELATED LINKS -[Get-EntraBetaApplication](Get-EntraBetaApplication.md) +[Get-EntraBetaApplication](../Applications/Get-EntraBetaApplication.md) [Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md) diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md index 9ca629572b..16b1106eff 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md @@ -126,7 +126,7 @@ System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutra ## RELATED LINKS -[Get-EntraBetaApplication](Get-EntraBetaApplication.md) +[Get-EntraBetaApplication](../Applications/Get-EntraBetaApplication.md) [Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) diff --git a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md index bb73a1c006..cd4f9be4d1 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md @@ -110,4 +110,4 @@ System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutra [Get-EntraBetaPrivateAccessApplicationSegment](Get-EntraBetaPrivateAccessApplicationSegment.md) [Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) [New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md) -[New-EntraBetaApplicationProxyConnectorGroup](New-EntraBetaApplicationProxyConnectorGroup.md) +[New-EntraBetaApplicationProxyConnectorGroup](../Applications/New-EntraBetaApplicationProxyConnectorGroup.md) diff --git a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md index 4b4805dd5b..fec1e62985 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md @@ -227,4 +227,4 @@ System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutra [Remove-EntraBetaPrivateAccessApplicationSegment](Remove-EntraBetaPrivateAccessApplicationSegment.md) -[Get-EntraBetaApplication](Get-EntraBetaApplication.md) +[Get-EntraBetaApplication](../Applications/Get-EntraBetaApplication.md) diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md index 2461f7e052..209593cf99 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md @@ -105,4 +105,4 @@ System.Nullable\`1\[\[System. Boolean, mscorlib, Version=4.0.0.0, Culture=neutra [New-EntraBetaPrivateAccessApplicationSegment](New-EntraBetaPrivateAccessApplicationSegment.md) -[Get-EntraBetaApplication](Get-EntraBetaApplication.md) +[Get-EntraBetaApplication](../Applications/Get-EntraBetaApplication.md) diff --git a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md index cdb4e5f706..a192806f6c 100644 --- a/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-beta/SignIns/Remove-EntraBetaOAuth2PermissionGrant.md @@ -81,4 +81,4 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar [Get-EntraBetaOAuth2PermissionGrant](Get-EntraBetaOAuth2PermissionGrant.md) -[Get-EntraBetaServicePrincipal](Get-EntraBetaServicePrincipal.md) +[Get-EntraBetaServicePrincipal](../Applications/Get-EntraBetaServicePrincipal.md) diff --git a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md index 414d1aa154..0f49565131 100644 --- a/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md +++ b/module/docs/entra-powershell-v1.0/Applications/Add-EntraServicePrincipalOwner.md @@ -100,6 +100,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar [Get-EntraServicePrincipalOwner](Get-EntraServicePrincipalOwner.md) -[Get-EntraUser](Get-EntraUser.md) +[Get-EntraUser](../Users/Get-EntraUser.md) [Remove-EntraServicePrincipalOwner](Remove-EntraServicePrincipalOwner.md) diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md index 07f5be76f2..05cca07b00 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Add-EntraDeviceRegisteredUser.md @@ -107,6 +107,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar [Get-EntraDeviceRegisteredUser](Get-EntraDeviceRegisteredUser.md) -[Get-EntraUser](Get-EntraUser.md) +[Get-EntraUser](../Users/Get-EntraUser.md) [Remove-EntraDeviceRegisteredUser](Remove-EntraDeviceRegisteredUser.md) diff --git a/module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeletedDirectoryObject.md similarity index 100% rename from module/docs/entra-powershell-v1.0/Applications/Remove-EntraDeletedDirectoryObject.md rename to module/docs/entra-powershell-v1.0/DirectoryManagement/Remove-EntraDeletedDirectoryObject.md diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md b/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md index f63a516603..94a5cc6abc 100644 --- a/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md +++ b/module/docs/entra-powershell-v1.0/DirectoryManagement/Restore-EntraDeletedDirectoryObject.md @@ -143,12 +143,12 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar ## Related Links -[Remove-EntraDeletedApplication](Remove-EntraDeletedApplication.md) +[Remove-EntraDeletedApplication](../Applications/Remove-EntraDeletedApplication.md) -[Restore-EntraDeletedApplication](Restore-EntraDeletedApplication.md) +[Restore-EntraDeletedApplication](../Applications/Restore-EntraDeletedApplication.md) [Remove-EntraDeletedDirectoryObject](Remove-EntraDeletedDirectoryObject.md) -[Get-EntraDeletedApplication](Get-EntraDeletedApplication.md) +[Get-EntraDeletedApplication](../Applications/Get-EntraDeletedApplication.md) [Get-EntraDeletedDirectoryObject](Get-EntraDeletedDirectoryObject.md) diff --git a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md index 38a0a963aa..7598a68945 100644 --- a/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md +++ b/module/docs/entra-powershell-v1.0/Groups/Select-EntraGroupIdsContactIsMemberOf.md @@ -98,4 +98,4 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar ## Related Links -[Get-EntraContact](Get-EntraContact.md) +[Get-EntraContact](../DirectoryManagement/Get-EntraContact.md) diff --git a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md index 70508badf7..999957a607 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Remove-EntraOAuth2PermissionGrant.md @@ -81,6 +81,6 @@ This cmdlet supports the common parameters: `-Debug`, `-ErrorAction`, `-ErrorVar [Get-EntraOAuth2PermissionGrant](Get-EntraOAuth2PermissionGrant.md) -[Get-EntraServicePrincipal](Get-EntraServicePrincipal.md) +[Get-EntraServicePrincipal](../Applications/Get-EntraServicePrincipal.md) [Update-EntraOAuth2PermissionGrant](Update-EntraOauth2PermissionGrant.md) diff --git a/module/docs/entra-powershell-v1.0/DirectoryManagement/Update-EntraOauth2PermissionGrant.md b/module/docs/entra-powershell-v1.0/SignIns/Update-EntraOauth2PermissionGrant.md similarity index 100% rename from module/docs/entra-powershell-v1.0/DirectoryManagement/Update-EntraOauth2PermissionGrant.md rename to module/docs/entra-powershell-v1.0/SignIns/Update-EntraOauth2PermissionGrant.md diff --git a/module/mapping/monikerMapping.json b/module/mapping/monikerMapping.json new file mode 100644 index 0000000000..f92e4cc249 --- /dev/null +++ b/module/mapping/monikerMapping.json @@ -0,0 +1,14 @@ +{ + "entra-powershell-preview": { + "packageRoot": "entra-powershell-v1.0", + "conceptualToc": "docs/entra-powershell-v1.0/toc.yml", + "conceptualTocUrl": "/powershell/entra-preview/toc.json", + "referenceTocUrl": "/powershell/module/entra-powershell-v1.0/toc.json" + }, + "entra-powershell-beta-preview": { + "packageRoot": "entra-powershell-beta", + "conceptualToc": "docs/entra-powershell-beta/toc.yml", + "conceptualTocUrl": "/powershell/entra-preview/toc.json", + "referenceTocUrl": "/powershell/module/entra-powershell-beta/toc.json" + } +} From ba3621b9a81c68c203de82667ec5870f91050c88 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:35:31 +0300 Subject: [PATCH 119/124] Mapped Get-EntraBetaObjectByObjectId (#1250) --- .../Get-EntraBetaObjectByObjectId.ps1 | 0 module/EntraBeta/config/moduleMapping.json | 3 +-- 2 files changed, 1 insertion(+), 2 deletions(-) rename module/EntraBeta/Microsoft.Entra.Beta/{Groups => DirectoryManagement}/Get-EntraBetaObjectByObjectId.ps1 (100%) diff --git a/module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaObjectByObjectId.ps1 similarity index 100% rename from module/EntraBeta/Microsoft.Entra.Beta/Groups/Get-EntraBetaObjectByObjectId.ps1 rename to module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaObjectByObjectId.ps1 diff --git a/module/EntraBeta/config/moduleMapping.json b/module/EntraBeta/config/moduleMapping.json index 97e5bfc559..f7188a321e 100644 --- a/module/EntraBeta/config/moduleMapping.json +++ b/module/EntraBeta/config/moduleMapping.json @@ -256,7 +256,7 @@ "Add-EntraBetaScopedRoleMembership": "DirectoryManagement", "Confirm-EntraBetaDomain": "DirectoryManagement", "Get-EntraBetaConditionalAccessPolicy": "SignIns", - "Get-EntraBetaObjectByObjectId": "Groups", + "Get-EntraBetaObjectByObjectId": "DirectoryManagement", "Get-EntraBetaObjectSetting": "Groups", "Get-EntraBetaScopedRoleMembership": "DirectoryManagement", "Get-EntraBetaServicePrincipalPolicy": "SignIns", @@ -296,5 +296,4 @@ "New-EntraBetaPrivateAccessApplication":"NetworkAccess", "Update-EntraBetaOauth2PermissionGrant":"SignIns", "Update-EntraBetaUserAuthenticationRequirement":"SignIns" - } \ No newline at end of file From 4183d0a0cbf3610bf2def68887bd55a20eb31e45 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:10:22 +0300 Subject: [PATCH 120/124] Custom Headers Update automation (#1234) --- module/Entra/config/moduleMapping.json | 3 ++- src/EntraModuleSplitter.ps1 | 36 +++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/module/Entra/config/moduleMapping.json b/module/Entra/config/moduleMapping.json index e8052b4366..9cb329aae1 100644 --- a/module/Entra/config/moduleMapping.json +++ b/module/Entra/config/moduleMapping.json @@ -162,7 +162,7 @@ "New-EntraOauth2PermissionGrant": "SignIns", "New-EntraConditionalAccessPolicy": "SignIns", "New-EntraIdentityProvider": "SignIns", - "New-EntraInvitation": "Invitations", + "New-EntraInvitation": "SignIns", "New-EntraPermissionGrantConditionSet": "SignIns", "New-EntraPermissionGrantPolicy": "SignIns", "Remove-EntraConditionalAccessPolicy": "SignIns", @@ -189,6 +189,7 @@ "Set-EntraTenantDetail": "DirectoryManagement", "Add-EntraScopedRoleMembership": "DirectoryManagement", "Get-EntraUser": "Users", + "Get-EntraUserAuthenticationMethod":"SignIns", "Get-EntraUserAppRoleAssignment": "Users", "Get-EntraUserCreatedObject": "Users", "Get-EntraUserDirectReport": "Users", diff --git a/src/EntraModuleSplitter.ps1 b/src/EntraModuleSplitter.ps1 index 7a04eddfcc..1160728a89 100644 --- a/src/EntraModuleSplitter.ps1 +++ b/src/EntraModuleSplitter.ps1 @@ -121,7 +121,13 @@ class EntraModuleSplitter { } - [void] AddFunctionsToAllDirectories([string]$moduleOutputDirectory, [PSCustomObject[]]$functionContents) { +[void] AddFunctionsToAllDirectories([string]$moduleOutputDirectory, [PSCustomObject[]]$functionContents, [string]$Module = 'Entra') { + # Validate the module parameter + if ($Module -notin @('Entra', 'EntraBeta')) { + Write-Error "Invalid module specified. Please provide either 'Entra' or 'EntraBeta'." + return + } + # Get all directories under the module output directory $subDirectories = Get-ChildItem -Path $moduleOutputDirectory -Directory @@ -129,7 +135,30 @@ class EntraModuleSplitter { foreach ($functionContent in $functionContents) { # Construct the full path for the function file $functionName = $functionContent.Name - $headerPs1Content = $this.Header + "`n" + $functionContent.Content+ "`n"+"`n" + $headerPs1Content = $this.Header + "`n" + $functionContent.Content + "`n" + "`n" + + # If the function is 'New-EntraCustomHeaders', modify the version line + if ($functionName -eq "New-EntraCustomHeaders") { + $currentSubDirName = $subDir.Name + + # Search for the line containing the version line + if ($Module -eq 'Entra') { + # For Entra module, look for 'Microsoft.Graph.Entra' in the version line + if ($headerPs1Content -match "Microsoft.Graph.Entra") { + # Replace 'Microsoft.Graph.Entra' with 'Microsoft.Entra.' + $headerPs1Content = $headerPs1Content -replace "Microsoft.Graph.Entra", "Microsoft.Entra.$currentSubDirName" + } + } + elseif ($Module -eq 'EntraBeta') { + # For EntraBeta module, look for 'Microsoft.Graph.Entra.Beta' in the version line + if ($headerPs1Content -match "Microsoft.Graph.Entra.Beta") { + # Replace 'Microsoft.Graph.Entra.Beta' with 'Microsoft.Entra.Beta.' + $headerPs1Content = $headerPs1Content -replace "Microsoft.Graph.Entra.Beta", "Microsoft.Entra.Beta.$currentSubDirName" + } + } + } + + # Construct the function file path $functionFilePath = Join-Path -Path $subDir.FullName -ChildPath "$functionName.ps1" # Write the function to the specified file @@ -139,6 +168,7 @@ class EntraModuleSplitter { } } + [string] GetModuleName([string] $Module="Entra"){ if ($Module -eq 'Entra') { return "Microsoft.Entra" @@ -189,7 +219,7 @@ class EntraModuleSplitter { } # Call the new method to add functions to all directories - $this.AddFunctionsToAllDirectories($moduleOutputDirectory, $functionContents) + $this.AddFunctionsToAllDirectories($moduleOutputDirectory, $functionContents,$Module) Log-Message "[EntraModuleSplitter] Splitting and organizing complete." -Level 'SUCCESS' } From 504803198ded1ad5d92337b5b0849ab336ecf450 Mon Sep 17 00:00:00 2001 From: Emmanuel Ng'ang'a <60355631+emmanuel-karanja@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:52:27 +0300 Subject: [PATCH 121/124] Split Automation Fixes (#1236) --- build/Create-ModuleMapping.ps1 | 24 ++++-- build/Split-Docs.ps1 | 81 +++++++++++++-------- build/Split-EntraModule.ps1 | 2 + module/Entra/config/ModuleMetadata.json | 5 +- module/Entra/config/moduleMapping.json | 3 +- module/EntraBeta/config/ModuleMetadata.json | 5 +- src/CompatibilityAdapterBuilder.ps1 | 9 ++- src/EntraModuleBuilder.ps1 | 6 +- 8 files changed, 85 insertions(+), 50 deletions(-) diff --git a/build/Create-ModuleMapping.ps1 b/build/Create-ModuleMapping.ps1 index b0c849f613..504e59baaf 100644 --- a/build/Create-ModuleMapping.ps1 +++ b/build/Create-ModuleMapping.ps1 @@ -4,7 +4,13 @@ #This function uses the moduleMapping.json to split the docs to subdirectories i.e. Key =SubModule name and # Value =an array of strings representing the files in that directory -. ./common-functions.ps1 + +param ( + [string]$Module = "Entra" # Default to "Entra" if no argument is provided +) + +. (Join-Path $psscriptroot "/common-functions.ps1") + function Get-DirectoryFileMap { param ( [string]$Source = 'Entra' # Default to 'Entra' @@ -14,12 +20,12 @@ function Get-DirectoryFileMap { # Determine the root directory and the output based on the Source parameter switch ($Source) { 'Entra' { - $RootDirectory = "../module_legacy/Entra/Microsoft.Graph.Entra/" - $OutputDirectory = '../module_legacy/Entra/config/' + $RootDirectory = (Join-Path $PSScriptRoot "../module/Entra/Microsoft.Entra/") + $OutputDirectory = (Join-Path $PSScriptRoot '../module/Entra/config/') } 'EntraBeta' { - $RootDirectory = "../module_legacy/EntraBeta/Microsoft.Graph.Entra.Beta/" - $OutputDirectory = "../module_legacy/EntraBeta/config/" + $RootDirectory = (Join-Path $PSScriptRoot"../module/EntraBeta/Microsoft.Entra.Beta/") + $OutputDirectory = (Join-Path $PSScriptRoot"../module/EntraBeta/config/") } default { Log-Message "Invalid Source specified. Use 'Entra' or 'EntraBeta'." 'Error' @@ -47,7 +53,7 @@ function Get-DirectoryFileMap { # Get all the subdirectories under the root directory $subDirectories = Get-ChildItem -Path $RootDirectory -Directory - + $filesToSkip=@('Enable-EntraAzureADAliases','Get-EntraUnsupportedCommand','New-EntraCustomHeaders','Enable-EntraBetaAzureADAliases','Get-EntraBetaUnsupportedCommand','New-EntraBetaCustomHeaders') foreach ($subDir in $subDirectories) { Log-Message "Processing subdirectory '$($subDir.Name)'." 'Info' @@ -55,8 +61,10 @@ function Get-DirectoryFileMap { $files = Get-ChildItem -Path $subDir.FullName -File | ForEach-Object { $fileName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name) # Map the file name to the directory name - $fileDirectoryMap[$fileName] = $subDir.Name + if($fileName -notin $filesToSkip){ + $fileDirectoryMap[$fileName] = $subDir.Name Log-Message "Mapped file '$fileName' to directory '$($subDir.Name)'." 'Info' + } } } @@ -72,4 +80,4 @@ function Get-DirectoryFileMap { Log-Message "moduleMapping.json has been created at '$outputFilePath'." 'Info' } -Get-DirectoryFileMap -Source 'Entra' \ No newline at end of file +Get-DirectoryFileMap -Source $Module \ No newline at end of file diff --git a/build/Split-Docs.ps1 b/build/Split-Docs.ps1 index 0e48944e37..816f0bad3f 100644 --- a/build/Split-Docs.ps1 +++ b/build/Split-Docs.ps1 @@ -5,26 +5,29 @@ #This function copies the docs using the moduleMapping.json into their submodule directories # i.e. For each entry, it will use the Key(cmdlet name) and map it to the Value(A subdirectory created in the respective docs directory) -. (Join-Path $psscriptroot "/common-functions.ps1") +param ( + [string]$Module = "Entra" # Default to "Entra" if no argument is provided +) + +.(Join-Path $psscriptroot "/common-functions.ps1") function Split-Docs { param ( - [string]$Module = 'Entra', # Default to 'Entra' - [string]$OutputDirectory # Allow custom output directory + [string]$Module = 'Entra' ) # Determine source directories and mapping file paths based on the Source parameter switch ($Module) { 'Entra' { - $DocsSourceDirectory = "../module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra" - $MappingFilePath = '../module/Entra/config/moduleMapping.json' - $OutputDirectory='../module/docs/entra-powershell-v1.0' + $DocsSourceDirectory = (Join-Path $PSScriptRoot "../module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra") + $MappingFilePath = (Join-Path $PSScriptRoot '../module/Entra/config/moduleMapping.json') + $OutputDirectory= (Join-Path $PSScriptRoot '../module/docs/entra-powershell-v1.0') } 'EntraBeta' { - $DocsSourceDirectory = "../module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta" - $MappingFilePath = "../module/EntraBeta/config/moduleMapping.json" - $OutputDirectory="../module/docs/entra-powershell-beta" + $DocsSourceDirectory = (Join-Path $PSScriptRoot "../module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta") + $MappingFilePath = (Join-Path $PSScriptRoot "../module/EntraBeta/config/moduleMapping.json") + $OutputDirectory= (Join-Path $PSScriptRoot "../module/docs/entra-powershell-beta") } default { Log-Message -Message "[Split-Docs]: Invalid Source specified. Use 'Entra' or 'EntraBeta'." -Level 'ERROR' @@ -50,34 +53,48 @@ function Split-Docs { Log-Message -Message "[Split-Docs]: Created directory: $TargetRootDirectory" -Level 'SUCCESS' } - # Iterate over each file-directory pair in the moduleMapping.json - foreach ($fileEntry in $moduleMapping.PSObject.Properties) { - $fileName = $fileEntry.Name # Key (file name without extension) - $subDirName = $fileEntry.Value # Value (sub-directory name) + # Ensure UnMappedDocs directory exists at the same level as the OutputDirectory + $unMappedDocsDirectory = Join-Path -Path (Split-Path $TargetRootDirectory) -ChildPath 'UnMappedDocs' + if (-not (Test-Path -Path $unMappedDocsDirectory -PathType Container)) { + New-Item -Path $unMappedDocsDirectory -ItemType Directory | Out-Null + Log-Message -Message "[Split-Docs]: Created 'UnMappedDocs' directory: $unMappedDocsDirectory" -Level 'SUCCESS' + } - # Create the sub-directory under the output root directory if it doesn't exist - $targetSubDir = Join-Path -Path $TargetRootDirectory -ChildPath $subDirName + # Iterate over each file in the DocsSourceDirectory + $filesInSource = Get-ChildItem -Path $DocsSourceDirectory -Filter "*.md" - if($subDirName -eq 'Migration' -or $subDirName -eq 'Invitations'){ - Log-Message "[Split-Docs]: Skipping $subDirName" -Level 'WARNING' - continue - } - if (-not (Test-Path -Path $targetSubDir -PathType Container)) { - New-Item -Path $targetSubDir -ItemType Directory | Out-Null - Log-Message -Message "[Split-Docs]: Created sub-directory: $targetSubDir" -Level 'SUCCESS' - } + foreach ($file in $filesInSource) { + $fileNameWithoutExtension = [System.IO.Path]::GetFileNameWithoutExtension($file.Name) + + # Check if the fileName exists in the mapping + $subDirName = $moduleMapping.PSObject.Properties.Name | Where-Object { $_ -eq $fileNameWithoutExtension } + + if ($subDirName) { + # If a subdir is mapped, proceed as before + $subDirName = $moduleMapping.$fileNameWithoutExtension + $targetSubDir = Join-Path -Path $TargetRootDirectory -ChildPath $subDirName + + if($subDirName -eq 'Migration' -or $subDirName -eq 'Invitations'){ + Log-Message "[Split-Docs]: Skipping $subDirName" -Level 'WARNING' + continue + } + if (-not (Test-Path -Path $targetSubDir -PathType Container)) { + New-Item -Path $targetSubDir -ItemType Directory | Out-Null + Log-Message -Message "[Split-Docs]: Created sub-directory: $targetSubDir" -Level 'SUCCESS' + } - # Build the full source file path for the .md file - $sourceFile = Join-Path -Path $DocsSourceDirectory -ChildPath "$fileName.md" - if (Test-Path -Path $sourceFile -PathType Leaf) { # Copy the .md file to the target sub-directory - Copy-Item -Path $sourceFile -Destination $targetSubDir - Log-Message -Message "[Split-Docs]: Copied '$sourceFile' to '$targetSubDir'" -Level 'SUCCESS' - } else { - # Log a warning if the .md file doesn't exist in the source directory - Log-Message -Message "[Split-Docs]: File '$fileName.md' not found in '$DocsSourceDirectory'" -Level 'WARNING' + Copy-Item -Path $file.FullName -Destination $targetSubDir + Log-Message -Message "[Split-Docs]: Copied '$file' to '$targetSubDir'" -Level 'SUCCESS' + } + else { + # If no mapping found, move it to UnMappedDocs + Copy-Item -Path $file.FullName -Destination $unMappedDocsDirectory + Log-Message -Message "[Split-Docs]: No mapping for '$fileNameWithoutExtension'. Moved to '$unMappedDocsDirectory'" -Level 'INFO' } } Log-Message -Message "[Split-Docs]: Markdown file copying complete." -Level 'INFO' -} \ No newline at end of file +} + +Split-Docs -Module $Module diff --git a/build/Split-EntraModule.ps1 b/build/Split-EntraModule.ps1 index e1c21b47d4..36aedac62c 100644 --- a/build/Split-EntraModule.ps1 +++ b/build/Split-EntraModule.ps1 @@ -9,6 +9,7 @@ param ( # Import the necessary scripts . (Join-Path $psscriptroot "/common-functions.ps1") . (Join-Path $psscriptroot "../src/EntraModuleSplitter.ps1") +.(Join-Path $psscriptroot "/Split-Docs.ps1") @@ -18,3 +19,4 @@ param ( $entraModuleSplitter = [EntraModuleSplitter]::new() $entraModuleSplitter.SplitEntraModule($Module) # Pass the module argument $entraModuleSplitter.ProcessEntraAzureADAliases($Module) + diff --git a/module/Entra/config/ModuleMetadata.json b/module/Entra/config/ModuleMetadata.json index e92aac4f5e..0130f916d6 100644 --- a/module/Entra/config/ModuleMetadata.json +++ b/module/Entra/config/ModuleMetadata.json @@ -2,6 +2,7 @@ "guid": "742dccd1-bf4b-46a0-a3f2-14e0bb508233", "authors": "Microsoft", "owners": "Microsoft", + "entraDescription":"Microsoft Entra Powershell", "description": "Microsoft Entra PowerShell v1.0: Microsoft Entra PowerShell is a scenario-driven module that allows administrators to efficiently manage Entra ID resources, including users, groups, applications, and policies, among others", "requireLicenseAcceptance": "true", "requiredModules" : [ @@ -31,5 +32,7 @@ ], "releaseNotes": "See https://github.com/microsoftgraph/entra-powershell.", "version": "0.20.0", - "Prerelease": "preview" + "Prerelease": "preview", + "dotNetVersion":"4.7.2", + "powershellVersion":"5.1" } diff --git a/module/Entra/config/moduleMapping.json b/module/Entra/config/moduleMapping.json index 9cb329aae1..e0c44503e0 100644 --- a/module/Entra/config/moduleMapping.json +++ b/module/Entra/config/moduleMapping.json @@ -261,5 +261,6 @@ "Remove-EntraServicePrincipalAppRoleAssignment": "Applications", "Set-EntraDirectoryRoleDefinition": "Governance", "Update-EntraUserFromFederated": "Users", - "Get-EntraDomainServiceConfigurationRecord":"DirectoryManagement" + "Get-EntraDomainServiceConfigurationRecord":"DirectoryManagement", + "Get-EntraUserAuthenticationRequirement":"SignIns" } \ No newline at end of file diff --git a/module/EntraBeta/config/ModuleMetadata.json b/module/EntraBeta/config/ModuleMetadata.json index 4243124e93..e479667056 100644 --- a/module/EntraBeta/config/ModuleMetadata.json +++ b/module/EntraBeta/config/ModuleMetadata.json @@ -2,6 +2,7 @@ "guid": "3a8a0270-121c-4455-845d-497458213f96", "authors": "Microsoft", "owners": "Microsoft", + "entraDescription":"Microsoft Entra Powershell", "description": "Microsoft Entra PowerShell Beta: Microsoft Entra PowerShell is a scenario-driven module that allows administrators to efficiently manage Entra ID resources, including users, groups, applications, and policies, among others", "requireLicenseAcceptance": "true", "requiredModules" : [ @@ -32,5 +33,7 @@ ], "releaseNotes": "See https://github.com/microsoftgraph/entra-powershell.", "version": "0.20.0", - "Prerelease": "preview" + "Prerelease": "preview", + "dotNetVersion":"4.7.2", + "powershellVersion":"5.1" } diff --git a/src/CompatibilityAdapterBuilder.ps1 b/src/CompatibilityAdapterBuilder.ps1 index 19b940bcbc..b382b0be85 100644 --- a/src/CompatibilityAdapterBuilder.ps1 +++ b/src/CompatibilityAdapterBuilder.ps1 @@ -305,15 +305,16 @@ class CompatibilityAdapterBuilder { $data = $this.Map() $psm1FileContent = $this.GetFileHeader() + $doubleSpace="`n`n" foreach($cmd in $data.Commands) { - $psm1FileContent += $cmd.CommandBlock + $psm1FileContent += $doubleSpace+$cmd.CommandBlock } - $psm1FileContent += $this.GetUnsupportedCommand() + $psm1FileContent +=$doubleSpace+ $this.GetUnsupportedCommand() - $psm1FileContent += $this.GetAlisesFunction() + $psm1FileContent += $doubleSpace+$this.GetAlisesFunction() foreach($function in $this.HelperCmdletsToExport.GetEnumerator()){ - $psm1FileContent += $function.Value + $psm1FileContent += $doubleSpace+$function.Value } $psm1FileContent += $this.GetExportMemeber() $psm1FileContent += $this.SetMissingCommands() diff --git a/src/EntraModuleBuilder.ps1 b/src/EntraModuleBuilder.ps1 index 17eec57c74..386056d572 100644 --- a/src/EntraModuleBuilder.ps1 +++ b/src/EntraModuleBuilder.ps1 @@ -492,9 +492,9 @@ $($requiredModulesEntries -join ",`n") CompanyName = $($content.owners) FileList = @("$manifestFileName", "$moduleFileName", "$helpFileName") RootModule = "$moduleFileName" - Description = 'Microsoft Graph Entra PowerShell.' - DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) - PowerShellVersion = $([System.Version]::Parse('5.1')) + Description = $content.EntraDescription + DotNetFrameworkVersion = $([System.Version]::Parse($content.DotNetVersion)) + PowerShellVersion = $([System.Version]::Parse($content.PowershellVersion)) CompatiblePSEditions = @('Desktop', 'Core') RequiredModules = $requiredModules NestedModules = @() From 0f774e78dd2f0ee563b407e7b516a3ceb825efaf Mon Sep 17 00:00:00 2001 From: Steve Mutungi <132555836+SteveMutungi254@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:03:20 +0300 Subject: [PATCH 122/124] Fixing online version entries (#1249) --- .../Applications/Get-EntraBetaApplicationServiceEndpoint.md | 2 +- .../NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.md | 2 +- .../Get-EntraBetaGlobalSecureAccessTenantStatus.md | 2 +- .../NetworkAccess/Get-EntraBetaPrivateAccessApplication.md | 2 +- .../Get-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../NetworkAccess/New-EntraBetaPrivateAccessApplication.md | 2 +- .../New-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../Remove-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md | 2 +- .../entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md | 2 +- module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md | 2 +- .../Enable-EntraBetaGlobalSecureAccessTenant.md | 2 +- .../Get-EntraBetaApplicationServiceEndpoint.md | 2 +- .../Get-EntraBetaGlobalSecureAccessTenantStatus.md | 2 +- .../Get-EntraBetaPrivateAccessApplication.md | 2 +- .../Get-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../New-EntraBetaPrivateAccessApplication.md | 2 +- .../New-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../Remove-EntraBetaPrivateAccessApplicationSegment.md | 2 +- .../Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md | 2 +- .../Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md | 2 +- .../Microsoft.Graph.Entra/Set-EntraPolicy.md | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md index af15b9e362..848972a25a 100644 --- a/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md +++ b/module/docs/entra-powershell-beta/Applications/Get-EntraBetaApplicationServiceEndpoint.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Entra.Beta.Applications-Help.xml Module Name: Microsoft.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.md b/module/docs/entra-powershell-beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.md index 19eb199d99..2670ccb547 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Enable-EntraBetaGlobalSecureAccessTenant.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md index 15edd9fcd9..8935092811 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaGlobalSecureAccessTenantStatus.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md index 1faa556efa..2a0144646f 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplication.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivateAccessApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md index 16b1106eff..20a714f1c4 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Get-EntraBetaPrivateAccessApplicationSegment.md @@ -10,7 +10,7 @@ manager: CelesteDG author: andres-canello external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md index cd4f9be4d1..3808cc368a 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplication.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPrivateAccessApplication schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md index fec1e62985..e814466f8e 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/New-EntraBetaPrivateAccessApplicationSegment.md @@ -10,7 +10,7 @@ manager: CelesteDG author: andres-canello external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md index 209593cf99..892ac45aeb 100644 --- a/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md +++ b/module/docs/entra-powershell-beta/NetworkAccess/Remove-EntraBetaPrivateAccessApplicationSegment.md @@ -10,7 +10,7 @@ manager: CelesteDG author: andres-canello external help file: Microsoft.Entra.Beta.NetworkAccess-Help.xml Module Name: Microsoft.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md index 9c1c107c74..924acdd12d 100644 --- a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md +++ b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditDirectoryLog.md @@ -12,7 +12,7 @@ author: msewaweru external help file: Microsoft.Entra.Reports-Help.xml Module Name: Microsoft.Entra -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAuditDirectoryLog schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md index 8ff0f396fa..5ab1c4ec73 100644 --- a/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md +++ b/module/docs/entra-powershell-v1.0/Reports/Get-EntraAuditSignInLog.md @@ -12,7 +12,7 @@ author: msewaweru external help file: Microsoft.Entra.Reports-Help.xml Module Name: Microsoft.Entra -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Get-EntraAuditSignInLog schema: 2.0.0 --- diff --git a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md index a86c064c8f..99bc4b3813 100644 --- a/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md +++ b/module/docs/entra-powershell-v1.0/SignIns/Set-EntraPolicy.md @@ -11,7 +11,7 @@ author: msewaweru external help file: Microsoft.Entra.SignIns-Help.xml Module Name: Microsoft.Entra -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Entra/Set-EntraPolicy schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md index fc76f02dca..ab4e6780d0 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Enable-EntraBetaGlobalSecureAccessTenant schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint.md index cc092ed756..f4149cfb2c 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaApplicationServiceEndpoint schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md index 02a1d9d7c6..6921fb8de6 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaGlobalSecureAccessTenantStatus schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md index daa37596e3..10cdaf74a9 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplication schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md index a4a56e0752..d4913b50e1 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Get-EntraBetaPrivateAccessApplicationSegment schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md index be03b5a2fd..9704721caf 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication.md @@ -10,7 +10,7 @@ manager: CelesteDG author: msewaweru external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplication schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md index fecf462c46..de94cbd663 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/New-EntraBetaPrivateAccessApplicationSegment.md @@ -10,7 +10,7 @@ manager: CelesteDG author: andres-canello external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta -online version: +s schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md index f5e5d659e1..3ccb4597ab 100644 --- a/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md +++ b/module_legacy/docs/entra-powershell-beta/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment.md @@ -10,7 +10,7 @@ manager: CelesteDG author: andres-canello external help file: Microsoft.Graph.Entra.Beta-Help.xml Module Name: Microsoft.Graph.Entra.Beta -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra.Beta/Remove-EntraBetaPrivateAccessApplicationSegment schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md index 640ed63b0e..012cbe8f4d 100644 --- a/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md +++ b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog.md @@ -12,7 +12,7 @@ author: msewaweru external help file: Microsoft.Graph.Entra-Help.xml Module Name: Microsoft.Graph.Entra -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAuditDirectoryLog schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md index 5f710b7c0d..c5b1ae2b29 100644 --- a/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md +++ b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Get-EntraAuditSignInLog.md @@ -12,7 +12,7 @@ author: msewaweru external help file: Microsoft.Graph.Entra-Help.xml Module Name: Microsoft.Graph.Entra -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Get-EntraAuditSignInLog schema: 2.0.0 --- diff --git a/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPolicy.md b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPolicy.md index 9f5e238eb2..6f386abee5 100644 --- a/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPolicy.md +++ b/module_legacy/docs/entra-powershell-v1.0/Microsoft.Graph.Entra/Set-EntraPolicy.md @@ -11,7 +11,7 @@ author: msewaweru external help file: Microsoft.Graph.Entra-Help.xml Module Name: Microsoft.Graph.Entra -online version: +online version: https://learn.microsoft.com/powershell/module/Microsoft.Graph.Entra/Set-EntraPolicy schema: 2.0.0 --- From 5cce428ec3175ebcf7f6ea3ade390a45dfc3ed1a Mon Sep 17 00:00:00 2001 From: Sam Erde <20478745+SamErde@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:54:26 -0500 Subject: [PATCH 123/124] Modularize minor fixes (#1238) --- .openpublishing.build.ps1 | 8 +- ...ctoryObjectOnPremisesProvisioningError.ps1 | 47 +- ...ctoryObjectOnPremisesProvisioningError.ps1 | 40 +- .../Set-EntraBetaDirSyncFeature.ps1 | 172 ++- .../Get-EntraAdministrativeUnit.ps1 | 79 +- .../Get-EntraAdministrativeUnitMember.ps1 | 50 +- .../Get-EntraAttributeSet.ps1 | 24 +- .../Get-EntraAuditDirectoryLog.ps1 | 60 +- .../Get-EntraAuditSignInLog.ps1 | 63 +- ...EntraCustomSecurityAttributeDefinition.ps1 | 29 +- ...ecurityAttributeDefinitionAllowedValue.ps1 | 38 +- ...ctoryObjectOnPremisesProvisioningError.ps1 | 29 +- .../Get-EntraFeatureRolloutPolicy.ps1 | 73 +- .../Get-EntraObjectSetting.ps1 | 60 +- .../Remove-EntraPolicy.ps1 | 36 +- .../AdditionalFunctions/Set-EntraPolicy.ps1 | 131 +- ...EntraBetaApplicationPasswordCredential.ps1 | 34 +- ...ctoryObjectOnPremisesProvisioningError.ps1 | 21 +- module_legacy/docfx.json | 118 +- src/CompatibilityAdapterBuilder.ps1 | 1207 ++++++++--------- 20 files changed, 1180 insertions(+), 1139 deletions(-) diff --git a/.openpublishing.build.ps1 b/.openpublishing.build.ps1 index aadef76202..999addd649 100644 --- a/.openpublishing.build.ps1 +++ b/.openpublishing.build.ps1 @@ -1,17 +1,17 @@ param( - [string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", + [string]$buildCorePowershellUrl = 'https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1', [string]$parameters ) # Main -$errorActionPreference = 'Stop' +$ErrorActionPreference = 'Stop' # Step-1: Download buildcore script to local -echo "download build core script to local with source url: $buildCorePowershellUrl" +Write-Output "download build core script to local with source url: $buildCorePowershellUrl" $repositoryRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition $buildCorePowershellDestination = "$repositoryRoot\.openpublishing.buildcore.ps1" Invoke-WebRequest $buildCorePowershellUrl -OutFile "$buildCorePowershellDestination" # Step-2: Run build core -echo "run build core script with parameters: $parameters" +Write-Output "run build core script with parameters: $parameters" & "$buildCorePowershellDestination" "$parameters" exit $LASTEXITCODE diff --git a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 index abbed13e68..245e90f10f 100644 --- a/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 +++ b/module/Entra/Microsoft.Entra/DirectoryManagement/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 @@ -1,39 +1,46 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function Get-EntraDirectoryObjectOnPremisesProvisioningError { [CmdletBinding(DefaultParameterSetName = 'GetById')] + [OutputType([System.Object])] param ( - [Parameter(ParameterSetName = "GetById")][ValidateNotNullOrEmpty()][ValidateScript({if ($_ -is [System.Guid]) { $true } else {throw "TenantId must be of type [System.Guid]."}})][System.Guid] $TenantId + [Parameter(ParameterSetName = 'GetById')] + [ValidateNotNullOrEmpty()] + [ValidateScript({ if ($_ -is [System.Guid]) { $true } else { throw 'TenantId must be of type [System.Guid].' } })] + [System.Guid] $TenantId ) - PROCESS { + begin { } + + process { $params = @{} - $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["TenantId"]) { - $params["TenantId"] = $PSBoundParameters["TenantId"] - } - Write-Debug("============================ TRANSFORMATIONS ============================") + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters['TenantId']) { + $params['TenantId'] = $PSBoundParameters['TenantId'] + } + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - $Object = @("users", "groups", "contacts") + $Object = @('users', 'groups', 'contacts') $response = @() - + try { foreach ($obj in $object) { - $obj = ($obj | Out-String).trimend() + $obj = ($obj | Out-String).TrimEnd() $uri = 'https://graph.microsoft.com/v1.0/' + $obj + '?$select=onPremisesProvisioningErrors' $response += ((Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method GET).value).onPremisesProvisioningErrors } + } catch { + Write-Error $_.Exception.Message } - catch {} + } + + end { if ([string]::IsNullOrWhiteSpace($response)) { - write-host "False" - } - else { + Write-Output 'False' + } else { $response } - } } - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 index f7b7aea15d..4916b9566a 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 @@ -1,39 +1,47 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function Get-EntraBetaDirectoryObjectOnPremisesProvisioningError { [CmdletBinding(DefaultParameterSetName = 'GetById')] + [OutputType([System.Object])] param ( - [Parameter(ParameterSetName = "GetById")][ValidateNotNullOrEmpty()][ValidateScript({if ($_ -is [System.Guid]) { $true } else {throw "TenantId must be of type [System.Guid]."}})][System.Guid] $TenantId + [Parameter(ParameterSetName = 'GetById')] + [ValidateNotNullOrEmpty()] + [ValidateScript({ if ($_ -is [System.Guid]) { $true } else { throw 'TenantId must be of type [System.Guid].' } })] + [System.Guid] $TenantId ) - PROCESS { + + begin { } + + process { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["TenantId"]) { - $params["TenantId"] = $PSBoundParameters["TenantId"] + if ($null -ne $PSBoundParameters['TenantId']) { + $params['TenantId'] = $PSBoundParameters['TenantId'] } - Write-Debug("============================ TRANSFORMATIONS ============================") + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - $Object = @("users", "groups", "contacts") + $Object = @('users', 'groups', 'contacts') $response = @() try { foreach ($obj in $object) { - $obj = ($obj | Out-String).trimend() + $obj = ($obj | Out-String).TrimEnd() $uri = 'https://graph.microsoft.com/beta/' + $obj + '?$select=onPremisesProvisioningErrors' $response += ((Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method GET).value).onPremisesProvisioningErrors } + } catch { + Write-Error $_.Exception.Message } - catch {} + } + end { if ([string]::IsNullOrWhiteSpace($response)) { - write-host "False" - } - else { + Write-Host 'False' + } else { $response } } } - diff --git a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 index 031c46e6e2..dec44d534e 100644 --- a/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 +++ b/module/EntraBeta/Microsoft.Entra.Beta/DirectoryManagement/Set-EntraBetaDirSyncFeature.ps1 @@ -1,85 +1,87 @@ -# ------------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All Rights Reserved. -# Licensed under the MIT License. See License in the project root for license information. -# ------------------------------------------------------------------------------ +# ------------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All Rights Reserved. +# Licensed under the MIT License. See License in the project root for license information. +# ------------------------------------------------------------------------------ function Set-EntraBetaDirSyncFeature { - [CmdletBinding(DefaultParameterSetName = 'GetQuery')] - param ( - [Parameter(ParameterSetName = "GetQuery", Mandatory = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Feature, - [Parameter(ParameterSetName = "GetQuery", Mandatory = $true, ValueFromPipelineByPropertyName = $true)][System.Boolean] $Enabled, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipelineByPropertyName = $true)][System.Guid] $TenantId, - [switch] $Force - ) - PROCESS { - - $params = @{} - $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($PSBoundParameters.ContainsKey("Verbose")) { - $params["Verbose"] = $Null - } - if ($null -ne $PSBoundParameters["Feature"]) { - $Feature = $PSBoundParameters["Feature"] + "Enabled" - } - if ($null -ne $PSBoundParameters["Enabled"]) { - $Enabled = $PSBoundParameters["Enabled"] - } - if ($PSBoundParameters.ContainsKey("Debug")) { - $params["Debug"] = $PSBoundParameters["Debug"] - } - if($null -ne $PSBoundParameters["WarningVariable"]) - { - $params["WarningVariable"] = $PSBoundParameters["WarningVariable"] - } - if($null -ne $PSBoundParameters["InformationVariable"]) - { - $params["InformationVariable"] = $PSBoundParameters["InformationVariable"] - } - if($null -ne $PSBoundParameters["InformationAction"]) - { - $params["InformationAction"] = $PSBoundParameters["InformationAction"] - } - if($null -ne $PSBoundParameters["OutVariable"]) - { - $params["OutVariable"] = $PSBoundParameters["OutVariable"] - } - if($null -ne $PSBoundParameters["OutBuffer"]) - { - $params["OutBuffer"] = $PSBoundParameters["OutBuffer"] - } - if($null -ne $PSBoundParameters["ErrorVariable"]) - { - $params["ErrorVariable"] = $PSBoundParameters["ErrorVariable"] - } - if($null -ne $PSBoundParameters["PipelineVariable"]) - { - $params["PipelineVariable"] = $PSBoundParameters["PipelineVariable"] - } - if($null -ne $PSBoundParameters["ErrorAction"]) - { - $params["ErrorAction"] = $PSBoundParameters["ErrorAction"] - } - if($null -ne $PSBoundParameters["WarningAction"]) - { - $params["WarningAction"] = $PSBoundParameters["WarningAction"] - } - - Write-Debug("============================ TRANSFORMATIONS ============================") + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + [OutputType([System.String])] + param ( + [Parameter(ParameterSetName = 'GetQuery', Mandatory = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] + $Feature, + + [Parameter(ParameterSetName = 'GetQuery', Mandatory = $true, ValueFromPipelineByPropertyName = $true)] + [System.Boolean] + $Enabled, + + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipelineByPropertyName = $true)] + [System.Guid] + $TenantId, + + [switch] + $Force + ) + + begin { + $params = @{} + $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand + if ($PSBoundParameters.ContainsKey('Verbose')) { + $params['Verbose'] = $Null + } + if ($null -ne $PSBoundParameters['Feature']) { + $Feature = $PSBoundParameters['Feature'] + 'Enabled' + } + if ($null -ne $PSBoundParameters['Enabled']) { + $Enabled = $PSBoundParameters['Enabled'] + } + if ($PSBoundParameters.ContainsKey('Debug')) { + $params['Debug'] = $PSBoundParameters['Debug'] + } + if ($null -ne $PSBoundParameters['WarningVariable']) { + $params['WarningVariable'] = $PSBoundParameters['WarningVariable'] + } + if ($null -ne $PSBoundParameters['InformationVariable']) { + $params['InformationVariable'] = $PSBoundParameters['InformationVariable'] + } + if ($null -ne $PSBoundParameters['InformationAction']) { + $params['InformationAction'] = $PSBoundParameters['InformationAction'] + } + if ($null -ne $PSBoundParameters['OutVariable']) { + $params['OutVariable'] = $PSBoundParameters['OutVariable'] + } + if ($null -ne $PSBoundParameters['OutBuffer']) { + $params['OutBuffer'] = $PSBoundParameters['OutBuffer'] + } + if ($null -ne $PSBoundParameters['ErrorVariable']) { + $params['ErrorVariable'] = $PSBoundParameters['ErrorVariable'] + } + if ($null -ne $PSBoundParameters['PipelineVariable']) { + $params['PipelineVariable'] = $PSBoundParameters['PipelineVariable'] + } + if ($null -ne $PSBoundParameters['ErrorAction']) { + $params['ErrorAction'] = $PSBoundParameters['ErrorAction'] + } + if ($null -ne $PSBoundParameters['WarningAction']) { + $params['WarningAction'] = $PSBoundParameters['WarningAction'] + } + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") + } + + process { if ([string]::IsNullOrWhiteSpace($TenantId)) { $OnPremisesDirectorySynchronizationId = (Get-MgBetaDirectoryOnPremiseSynchronization).Id - } - else { + } else { $OnPremisesDirectorySynchronizationId = Get-MgBetaDirectoryOnPremiseSynchronization -OnPremisesDirectorySynchronizationId $TenantId -ErrorAction SilentlyContinue -ErrorVariable er if ([string]::IsNullOrWhiteSpace($er)) { $OnPremisesDirectorySynchronizationId = $OnPremisesDirectorySynchronizationId.Id - } - else { - throw "Set-EntraBetaDirsyncFeature :$er" + } else { + throw "Set-EntraBetaDirSyncFeature :$er" break } } - + $body = @{ features = @{ $Feature = $Enabled } } @@ -87,34 +89,30 @@ function Set-EntraBetaDirSyncFeature { if ($Force) { # If -Force is used, skip confirmation and proceed with the action. $decision = 0 - } - else { + } else { $title = 'Confirm' $question = 'Do you want to continue?' - $Suspend = new-Object System.Management.Automation.Host.ChoiceDescription "&Suspend", "S" - $Yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Y" - $No = new-Object System.Management.Automation.Host.ChoiceDescription "&No", "N" + $Suspend = New-Object System.Management.Automation.Host.ChoiceDescription '&Suspend', 'S' + $Yes = New-Object System.Management.Automation.Host.ChoiceDescription '&Yes', 'Y' + $No = New-Object System.Management.Automation.Host.ChoiceDescription '&No', 'N' $choices = [System.Management.Automation.Host.ChoiceDescription[]]( $Yes, $No, $Suspend) $decision = $Host.UI.PromptForChoice($title, $question, $choices, 1) } if ($decision -eq 0) { - $response = Update-MgBetaDirectoryOnPremiseSynchronization -Headers $customHeaders -OnPremisesDirectorySynchronizationId $OnPremisesDirectorySynchronizationId -BodyParameter $body -ErrorAction SilentlyContinue -ErrorVariable "er" + $response = Update-MgBetaDirectoryOnPremiseSynchronization -Headers $customHeaders -OnPremisesDirectorySynchronizationId $OnPremisesDirectorySynchronizationId -BodyParameter $body -ErrorAction SilentlyContinue -ErrorVariable 'er' $er break if ([string]::IsNullOrWhiteSpace($er)) { $response + } else { + Write-Error "Cannot bind parameter 'TenantId'. Cannot convert value `"$TenantId`" to type + `"System.Guid`". Error: `"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).`"" } - else { - Write-Error "Cannot bind parameter 'TenantId'. Cannot convert value `"$TenantId`" to type - `"System.Guid`". Error: `"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).`" " - } - - } - else { + + } else { return } - - } -} + end { } +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 index 849b52436e..f41c26d504 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnit.ps1 @@ -4,47 +4,45 @@ function Get-EntraAdministrativeUnit { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Alias("ObjectId")] - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter + [Alias('ObjectId')] + [Parameter(ParameterSetName = 'GetById', Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter ) - PROCESS { - $params = @{} - $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - $baseUri = "/v1.0/directory/administrativeUnits" - $properties = '$select=*' - $params["Uri"] = "$baseUri/?$properties" - if($null -ne $PSBoundParameters["AdministrativeUnitId"]) - { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] - $params["Uri"] = "$baseUri/$($params.AdministrativeUnitId)?$properties" - } - if ($PSBoundParameters.ContainsKey("Top")) { - $topCount = $PSBoundParameters["Top"] - if ($topCount -gt 999) { - $params["Uri"] += "&`$top=999" + PROCESS { + $params = @{} + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $baseUri = '/v1.0/directory/administrativeUnits' + $properties = '$select=*' + $params['Uri'] = "$baseUri/?$properties" + if ($null -ne $PSBoundParameters['AdministrativeUnitId']) { + $params['AdministrativeUnitId'] = $PSBoundParameters['AdministrativeUnitId'] + $params['Uri'] = "$baseUri/$($params.AdministrativeUnitId)?$properties" } - else { - $params["Uri"] += "&`$top=$topCount" + if ($PSBoundParameters.ContainsKey('Top')) { + $topCount = $PSBoundParameters['Top'] + if ($topCount -gt 999) { + $params['Uri'] += "&`$top=999" + } else { + $params['Uri'] += "&`$top=$topCount" + } + } + if ($null -ne $PSBoundParameters['Filter']) { + $Filter = $PSBoundParameters['Filter'] + $f = '$' + 'Filter' + $params['Uri'] += "&$f=$Filter" } - } - if ($null -ne $PSBoundParameters["Filter"]) { - $Filter = $PSBoundParameters["Filter"] - $f = '$' + 'Filter' - $params["Uri"] += "&$f=$Filter" - } - Write-Debug("============================ TRANSFORMATIONS ============================") + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - + $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $($params.Uri) -Method GET) $data = $response | ConvertTo-Json -Depth 10 | ConvertFrom-Json @@ -53,24 +51,25 @@ function Get-EntraAdministrativeUnit { $all = $All.IsPresent $increment = $topCount - $data.Count while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { - $params["Uri"] = $response.'@odata.nextLink' + $params['Uri'] = $response.'@odata.nextLink' if ($increment -gt 0) { $topValue = [Math]::Min($increment, 999) - $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $params['Uri'] = $params['Uri'].Replace('$top=999', "`$top=$topValue") $increment -= $topValue } - $response = Invoke-GraphRequest @params + $response = Invoke-GraphRequest @params $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json } + } catch { + Write-Error $_.Exception.Message } - catch {} $data | ForEach-Object { if ($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id Add-Member -InputObject $_ -MemberType AliasProperty -Name DeletionTimeStamp -Value deletedDateTime } } - + if ($data) { $aulist = @() foreach ($item in $data) { @@ -85,4 +84,4 @@ function Get-EntraAdministrativeUnit { $aulist } } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 index 7bb91f3237..6714ad4531 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraAdministrativeUnitMember.ps1 @@ -3,14 +3,14 @@ # ------------------------------------------------------------------------------ function Get-EntraAdministrativeUnitMember { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] - param ( - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Nullable`1[System.Int32]] $Top, - [Alias("ObjectId")] - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $AdministrativeUnitId, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All + param ( + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Nullable`1[System.Int32]] $Top, + [Alias('ObjectId')] + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $AdministrativeUnitId, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All ) PROCESS { @@ -18,23 +18,21 @@ function Get-EntraAdministrativeUnitMember { $topCount = $null $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $baseUri = "/v1.0/directory/administrativeUnits/$AdministrativeUnitId/members?`$select=*" - $params["Uri"] = "$baseUri" - if($null -ne $PSBoundParameters["AdministrativeUnitId"]) - { - $params["AdministrativeUnitId"] = $PSBoundParameters["AdministrativeUnitId"] + $params['Uri'] = "$baseUri" + if ($null -ne $PSBoundParameters['AdministrativeUnitId']) { + $params['AdministrativeUnitId'] = $PSBoundParameters['AdministrativeUnitId'] } - if ($PSBoundParameters.ContainsKey("Top")) { - $topCount = $PSBoundParameters["Top"] + if ($PSBoundParameters.ContainsKey('Top')) { + $topCount = $PSBoundParameters['Top'] if ($topCount -gt 999) { $minTop = 999 - $params["Uri"] += "&`$top=999" - } - else { - $params["Uri"] += "&`$top=$topCount" + $params['Uri'] += "&`$top=999" + } else { + $params['Uri'] += "&`$top=$topCount" } } - Write-Debug("============================ TRANSFORMATIONS ============================") + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") @@ -46,22 +44,22 @@ function Get-EntraAdministrativeUnitMember { $all = $All.IsPresent $increment = $topCount - $data.Count while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { - $params["Uri"] = $response.'@odata.nextLink' + $params['Uri'] = $response.'@odata.nextLink' if ($increment -gt 0) { $topValue = [Math]::Min($increment, 999) if ($minTop) { - $params["Uri"] = $params["Uri"].Replace("`$top=$minTop", "`$top=$topValue") - } - else { - $params["Uri"] = $params["Uri"].Replace("`$top=$topCount", "`$top=$topValue") + $params['Uri'] = $params['Uri'].Replace("`$top=$minTop", "`$top=$topValue") + } else { + $params['Uri'] = $params['Uri'].Replace("`$top=$topCount", "`$top=$topValue") } $increment -= $topValue } $response = (Invoke-GraphRequest -Headers $customHeaders -Uri $($params.Uri) -Method GET) $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json } + } catch { + Write-Error $_.Exception.Message } - catch {} $data | ForEach-Object { if ($null -ne $_) { Add-Member -InputObject $_ -MemberType AliasProperty -Name ObjectId -Value Id @@ -84,4 +82,4 @@ function Get-EntraAdministrativeUnitMember { $memberList } } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 index cdccf1849b..e0b0f438f6 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraAttributeSet.ps1 @@ -5,34 +5,34 @@ function Get-EntraAttributeSet { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Alias("Id")] + [Parameter(ParameterSetName = 'GetById', Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias('Id')] [System.String] $AttributeSetId ) PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - $params["Uri"] = "https://graph.microsoft.com/v1.0/directory/attributeSets/" - $params["Method"] = "GET" - if ($null -ne $PSBoundParameters["AttributeSetId"]) { - $params["Uri"] += $AttributeSetId + $params['Uri'] = 'https://graph.microsoft.com/v1.0/directory/attributeSets/' + $params['Method'] = 'GET' + if ($null -ne $PSBoundParameters['AttributeSetId']) { + $params['Uri'] += $AttributeSetId } - Write-Debug("============================ TRANSFORMATIONS ============================") + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json try { $response = $response.value + } catch { + Write-Error $_.Exception.Message } - catch {} - if($response) - { + if ($response) { $userList = @() foreach ($data in $response) { $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAttributeSet $data.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyName = $_.Name.Substring(0, 1).ToUpper() + $_.Name.Substring(1) $propertyValue = $_.Value $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force } @@ -41,4 +41,4 @@ function Get-EntraAttributeSet { $userList } } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 index 2b6b69b3cd..6d895093c3 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditDirectoryLog.ps1 @@ -5,14 +5,14 @@ function Get-EntraAuditDirectoryLog { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Int32] $Top, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter + [Parameter(ParameterSetName = 'GetById', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter ) PROCESS { @@ -20,33 +20,29 @@ function Get-EntraAuditDirectoryLog { $params = @{} $topCount = $null $baseUri = 'https://graph.microsoft.com/v1.0/auditLogs/directoryAudits' - $params["Method"] = "GET" - $params["Uri"] = "$baseUri"+"?" + $params['Method'] = 'GET' + $params['Uri'] = "$baseUri" + '?' - if($PSBoundParameters.ContainsKey("Top")) - { - $topCount = $PSBoundParameters["Top"] + if ($PSBoundParameters.ContainsKey('Top')) { + $topCount = $PSBoundParameters['Top'] if ($topCount -gt 999) { - $params["Uri"] += "&`$top=999" - } - else{ - $params["Uri"] += "&`$top=$topCount" + $params['Uri'] += "&`$top=999" + } else { + $params['Uri'] += "&`$top=$topCount" } } - if($null -ne $PSBoundParameters["Id"]) - { - $LogId = $PSBoundParameters["Id"] - $params["Uri"] = "$baseUri/$($LogId)" + if ($null -ne $PSBoundParameters['Id']) { + $LogId = $PSBoundParameters['Id'] + $params['Uri'] = "$baseUri/$($LogId)" } - if($null -ne $PSBoundParameters["Filter"]) - { - $Filter = $PSBoundParameters["Filter"] + if ($null -ne $PSBoundParameters['Filter']) { + $Filter = $PSBoundParameters['Filter'] $f = '$Filter' - $params["Uri"] += "&$f=$Filter" + $params['Uri'] += "&$f=$Filter" } - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug('============================ TRANSFORMATIONS ============================') + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Invoke-GraphRequest @params -Headers $customHeaders @@ -56,16 +52,18 @@ function Get-EntraAuditDirectoryLog { $all = $All.IsPresent $increment = $topCount - $data.Count while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { - $params["Uri"] = $response.'@odata.nextLink' + $params['Uri'] = $response.'@odata.nextLink' if ($increment -gt 0) { $topValue = [Math]::Min($increment, 999) - $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $params['Uri'] = $params['Uri'].Replace('$top=999', "`$top=$topValue") $increment -= $topValue } $response = Invoke-GraphRequest @params $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json } - } catch {} + } catch { + Write-Error $_.Exception.Message + } $userList = @() foreach ($response in $data) { @@ -79,4 +77,4 @@ function Get-EntraAuditDirectoryLog { } $userList } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 index 5686e768d2..b6790c9421 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraAuditSignInLog.ps1 @@ -5,15 +5,15 @@ function Get-EntraAuditSignInLog { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Alias("Id")] - [System.String] $SignInId, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.Int32] $Top, - [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [switch] $All, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter + [Parameter(ParameterSetName = 'GetById', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias('Id')] + [System.String] $SignInId, + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter ) PROCESS { @@ -21,41 +21,36 @@ function Get-EntraAuditSignInLog { $params = @{} $topCount = $null $baseUri = 'https://graph.microsoft.com/v1.0/auditLogs/signIns' - $params["Method"] = "GET" - $params["Uri"] = "$baseUri" + $params['Method'] = 'GET' + $params['Uri'] = "$baseUri" $query = $null - if($PSBoundParameters.ContainsKey("Top")) - { - $topCount = $PSBoundParameters["Top"] + if ($PSBoundParameters.ContainsKey('Top')) { + $topCount = $PSBoundParameters['Top'] if ($topCount -gt 999) { $query += "&`$top=999" - } - else{ + } else { $query += "&`$top=$topCount" } } - if($null -ne $PSBoundParameters["SignInId"]) - { - $logId = $PSBoundParameters["SignInId"] - $params["Uri"] = "$baseUri/$($logId)" + if ($null -ne $PSBoundParameters['SignInId']) { + $logId = $PSBoundParameters['SignInId'] + $params['Uri'] = "$baseUri/$($logId)" } - if($null -ne $PSBoundParameters["Filter"]) - { - $Filter = $PSBoundParameters["Filter"] + if ($null -ne $PSBoundParameters['Filter']) { + $Filter = $PSBoundParameters['Filter'] $f = '$filter' $query += "&$f=$Filter" } - if($null -ne $query) - { - $query = "?" + $query.TrimStart("&") - $params["Uri"] += $query + if ($null -ne $query) { + $query = '?' + $query.TrimStart('&') + $params['Uri'] += $query } - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug('============================ TRANSFORMATIONS ============================') + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Invoke-GraphRequest @params -Headers $customHeaders @@ -65,16 +60,18 @@ function Get-EntraAuditSignInLog { $all = $All.IsPresent $increment = $topCount - $data.Count while (($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0))) { - $params["Uri"] = $response.'@odata.nextLink' + $params['Uri'] = $response.'@odata.nextLink' if ($increment -gt 0) { $topValue = [Math]::Min($increment, 999) - $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $params['Uri'] = $params['Uri'].Replace('$top=999', "`$top=$topValue") $increment -= $topValue } $response = Invoke-GraphRequest @params $data += $response.value | ConvertTo-Json -Depth 100 | ConvertFrom-Json } - } catch {} + } catch { + Write-Error $_.Exception.Message + } $userList = @() foreach ($response in $data) { $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphSignIn @@ -87,4 +84,4 @@ function Get-EntraAuditSignInLog { } $userList } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 index 47113ca5ce..11a5b81666 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinition.ps1 @@ -4,30 +4,31 @@ function Get-EntraCustomSecurityAttributeDefinition { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = 'GetById', Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id ) - PROCESS { + PROCESS { $params = @{} - $Method = "GET" - $Uri = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/" + $Method = 'GET' + $Uri = 'https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/' $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - - if ($null -ne $PSBoundParameters["Id"]) { + + if ($null -ne $PSBoundParameters['Id']) { $Uri += $Id } - Write-Debug("============================ TRANSFORMATIONS ============================") + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - + $response = (Invoke-GraphRequest -Uri $Uri -Method $Method -Headers $customHeaders) | ConvertTo-Json | ConvertFrom-Json - try { - $response = $response.value + try { + $response = $response.value + } catch { + Write-Error $_.Exception.Message } - catch {} - if($response){ + if ($response) { $userList = @() foreach ($data in $response) { $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphCustomSecurityAttributeDefinition @@ -39,6 +40,6 @@ function Get-EntraCustomSecurityAttributeDefinition { $userList += $userType } $userList - } + } } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 index b2a2620f4b..6108059460 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraCustomSecurityAttributeDefinitionAllowedValue.ps1 @@ -4,43 +4,43 @@ function Get-EntraCustomSecurityAttributeDefinitionAllowedValue { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = 'GetById', Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Id, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $Filter, [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.String] $CustomSecurityAttributeDefinitionId ) - PROCESS { + PROCESS { $params = @{} - $params["Uri"] = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/$CustomSecurityAttributeDefinitionId/allowedValues/" - $params["Method"] = "GET" + $params['Uri'] = "https://graph.microsoft.com/v1.0/directory/customSecurityAttributeDefinitions/$CustomSecurityAttributeDefinitionId/allowedValues/" + $params['Method'] = 'GET' $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["Id"]) { - $params["Uri"] += $Id + if ($null -ne $PSBoundParameters['Id']) { + $params['Uri'] += $Id } - if ($null -ne $PSBoundParameters["Filter"]) { - $params["Uri"] += '?$filter=' + $Filter + if ($null -ne $PSBoundParameters['Filter']) { + $params['Uri'] += '?$filter=' + $Filter } - Write-Debug("============================ TRANSFORMATIONS ============================") + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - - $response = (Invoke-GraphRequest @params -Headers $customHeaders) | ConvertTo-Json -Depth 5 | ConvertFrom-Json - try { - $response = $response.value + + $response = (Invoke-GraphRequest @params -Headers $customHeaders) | ConvertTo-Json -Depth 5 | ConvertFrom-Json + try { + $response = $response.value + } catch { + Write-Error $_.Exception.Message } - catch {} - if($response) - { + if ($response) { $userList = @() foreach ($data in $response) { $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphAllowedValue $data.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyName = $_.Name.Substring(0, 1).ToUpper() + $_.Name.Substring(1) $propertyValue = $_.Value $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force } @@ -49,4 +49,4 @@ function Get-EntraCustomSecurityAttributeDefinitionAllowedValue { $userList } } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 index 5d1d03af95..4816031db3 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraDirectoryObjectOnPremisesProvisioningError.ps1 @@ -5,36 +5,35 @@ function Get-EntraDirectoryObjectOnPremisesProvisioningError { [CmdletBinding(DefaultParameterSetName = 'GetById')] param ( - [Parameter(ParameterSetName = "GetById")][ValidateNotNullOrEmpty()][ValidateScript({if ($_ -is [System.Guid]) { $true } else {throw "TenantId must be of type [System.Guid]."}})][System.Guid] $TenantId + [Parameter(ParameterSetName = 'GetById')][ValidateNotNullOrEmpty()][ValidateScript({ if ($_ -is [System.Guid]) { $true } else { throw 'TenantId must be of type [System.Guid].' } })][System.Guid] $TenantId ) - PROCESS { + PROCESS { $params = @{} - $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["TenantId"]) { - $params["TenantId"] = $PSBoundParameters["TenantId"] - } - Write-Debug("============================ TRANSFORMATIONS ============================") + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + if ($null -ne $PSBoundParameters['TenantId']) { + $params['TenantId'] = $PSBoundParameters['TenantId'] + } + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - $Object = @("users", "groups", "contacts") + $Object = @('users', 'groups', 'contacts') $response = @() - + try { foreach ($obj in $object) { $obj = ($obj | Out-String).trimend() $uri = 'https://graph.microsoft.com/v1.0/' + $obj + '?$select=onPremisesProvisioningErrors' $response += ((Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method GET).value).onPremisesProvisioningErrors } + } catch { + Write-Error $_.Exception.Message } - catch {} if ([string]::IsNullOrWhiteSpace($response)) { - write-host "False" - } - else { + Write-Host 'False' + } else { $response } - + } } Set-Alias -Name Get-EntraHasObjectsWithDirSyncProvisioningError -Value Get-EntraDirectoryObjectOnPremisesProvisioningError -Scope Global -Force - diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 index 1b32be76ce..4fdf2022a6 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraFeatureRolloutPolicy.ps1 @@ -4,66 +4,61 @@ function Get-EntraFeatureRolloutPolicy { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "GetVague", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $SearchString, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Filter, - [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] - [System.String[]] $Property + [Parameter(ParameterSetName = 'GetById', Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = 'GetVague', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $SearchString, + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Filter, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property ) PROCESS { $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand $params = @{} $baseUri = 'https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies' - $params["Method"] = "GET" - $params["Uri"] = "$baseUri" + $params['Method'] = 'GET' + $params['Uri'] = "$baseUri" $query = $null - - if($null -ne $PSBoundParameters["Id"]) - { - $Id = $PSBoundParameters["Id"] - $params["Uri"] = "https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies/$Id" + + if ($null -ne $PSBoundParameters['Id']) { + $Id = $PSBoundParameters['Id'] + $params['Uri'] = "https://graph.microsoft.com/v1.0/policies/featureRolloutPolicies/$Id" } - if($null -ne $PSBoundParameters["SearchString"]) - { - $FilterValue = $PSBoundParameters["SearchString"] - $filter="displayName eq '$FilterValue' or startswith(displayName,'$FilterValue')" + if ($null -ne $PSBoundParameters['SearchString']) { + $FilterValue = $PSBoundParameters['SearchString'] + $filter = "displayName eq '$FilterValue' or startswith(displayName,'$FilterValue')" $f = '$' + 'Filter' $query += "&$f=$Filter" } - if($null -ne $PSBoundParameters["Filter"]) - { - $Filter = $PSBoundParameters["Filter"] + if ($null -ne $PSBoundParameters['Filter']) { + $Filter = $PSBoundParameters['Filter'] $f = '$' + 'Filter' $query += "&$f=$Filter" - } - if($null -ne $PSBoundParameters["Property"]) - { - $selectProperties = $PSBoundParameters["Property"] + } + if ($null -ne $PSBoundParameters['Property']) { + $selectProperties = $PSBoundParameters['Property'] $selectProperties = $selectProperties -Join ',' $query += "&`$select=$($selectProperties)" } - if($null -ne $query) - { - $query = "?" + $query.TrimStart("&") - $params["Uri"] += $query + if ($null -ne $query) { + $query = '?' + $query.TrimStart('&') + $params['Uri'] += $query } - - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + + Write-Debug('============================ TRANSFORMATIONS ============================') + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - + $data = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json - try { + try { $data = $data.value | ConvertTo-Json | ConvertFrom-Json + } catch { + Write-Error $_.Exception.Message } - catch {} - if($data) - { + if ($data) { $userList = @() foreach ($response in $data) { $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphFeatureRolloutPolicy @@ -77,4 +72,4 @@ function Get-EntraFeatureRolloutPolicy { $userList } } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 b/module_legacy/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 index faf51a15f4..dacf4401a7 100644 --- a/module_legacy/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Get-EntraObjectSetting.ps1 @@ -4,8 +4,8 @@ function Get-EntraObjectSetting { [CmdletBinding(DefaultParameterSetName = 'GetQuery')] param ( - [Parameter(ParameterSetName = "GetById", Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, - [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Parameter(ParameterSetName = 'GetById', Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)][System.String] $Id, + [Parameter(ParameterSetName = 'GetQuery', ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [System.Int32] $Top, [Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [switch] $All, @@ -22,32 +22,28 @@ function Get-EntraObjectSetting { $params = @{} $topCount = $null $baseUri = "https://graph.microsoft.com/v1.0/$TargetType/$TargetObjectId/settings" - $params["Method"] = "GET" - $params["Uri"] = $baseUri+'?$select=*' - if($null -ne $PSBoundParameters["Property"]) - { - $selectProperties = $PSBoundParameters["Property"] + $params['Method'] = 'GET' + $params['Uri'] = $baseUri + '?$select=*' + if ($null -ne $PSBoundParameters['Property']) { + $selectProperties = $PSBoundParameters['Property'] $selectProperties = $selectProperties -Join ',' - $params["Uri"] = $baseUri+"?`$select=$($selectProperties)" + $params['Uri'] = $baseUri + "?`$select=$($selectProperties)" } - if($PSBoundParameters.ContainsKey("Top") -and (-not $PSBoundParameters.ContainsKey("All"))) - { - $topCount = $PSBoundParameters["Top"] + if ($PSBoundParameters.ContainsKey('Top') -and (-not $PSBoundParameters.ContainsKey('All'))) { + $topCount = $PSBoundParameters['Top'] if ($topCount -gt 999) { - $params["Uri"] += "&`$top=999" - } - else{ - $params["Uri"] += "&`$top=$topCount" + $params['Uri'] += "&`$top=999" + } else { + $params['Uri'] += "&`$top=$topCount" } } - if($null -ne $PSBoundParameters["Id"]) - { - $Id = $PSBoundParameters["Id"] - $params["Uri"] = "$baseUri/$($Id)" + if ($null -ne $PSBoundParameters['Id']) { + $Id = $PSBoundParameters['Id'] + $params['Uri'] = "$baseUri/$($Id)" } - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug('============================ TRANSFORMATIONS ============================') + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Invoke-GraphRequest @params -Headers $customHeaders @@ -57,24 +53,26 @@ function Get-EntraObjectSetting { $all = $All.IsPresent $increment = $topCount - $data.Count while ($response.'@odata.nextLink' -and (($all) -or ($increment -gt 0 -and -not $all))) { - $params["Uri"] = $response.'@odata.nextLink' + $params['Uri'] = $response.'@odata.nextLink' if (-not $all) { $topValue = [Math]::Min($increment, 999) - $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $params['Uri'] = $params['Uri'].Replace('$top=999', "`$top=$topValue") $increment -= $topValue } $response = Invoke-GraphRequest @params $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json } - } catch {} + } catch { + Write-Error $_.Exception.Message + } $targetTypeList = @() - if($TargetType.ToLower() -eq 'groups'){ - foreach($res in $data){ + if ($TargetType.ToLower() -eq 'groups') { + foreach ($res in $data) { $groupType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphGroupSetting $res.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyName = $_.Name.Substring(0, 1).ToUpper() + $_.Name.Substring(1) $propertyValue = $_.Value $groupType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force } @@ -82,11 +80,11 @@ function Get-EntraObjectSetting { } } - if($TargetType.ToLower() -eq 'users'){ - foreach($res in $data){ + if ($TargetType.ToLower() -eq 'users') { + foreach ($res in $data) { $userType = New-Object Microsoft.Graph.PowerShell.Models.MicrosoftGraphUserSettings $res.PSObject.Properties | ForEach-Object { - $propertyName = $_.Name.Substring(0,1).ToUpper() + $_.Name.Substring(1) + $propertyName = $_.Name.Substring(0, 1).ToUpper() + $_.Name.Substring(1) $propertyValue = $_.Value $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force } @@ -96,4 +94,4 @@ function Get-EntraObjectSetting { $targetTypeList } -} \ No newline at end of file +} diff --git a/module_legacy/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 index 4dab294b7c..c7ecfc6ee5 100644 --- a/module_legacy/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Remove-EntraPolicy.ps1 @@ -4,39 +4,41 @@ function Remove-EntraPolicy { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id ) - PROCESS { + PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - $policyTypes = "activityBasedTimeoutPolicies", "defaultAppManagementPolicy", "appManagementPolicies", "authenticationFlowsPolicy", "authenticationMethodsPolicy", "claimsMappingPolicies", "featureRolloutPolicies", "homeRealmDiscoveryPolicies", "permissionGrantPolicies", "tokenIssuancePolicies", "tokenLifetimePolicies" - + $policyTypes = 'activityBasedTimeoutPolicies', 'defaultAppManagementPolicy', 'appManagementPolicies', 'authenticationFlowsPolicy', 'authenticationMethodsPolicy', 'claimsMappingPolicies', 'featureRolloutPolicies', 'homeRealmDiscoveryPolicies', 'permissionGrantPolicies', 'tokenIssuancePolicies', 'tokenLifetimePolicies' + foreach ($policyType in $policyTypes) { - $uri = "https://graph.microsoft.com/v1.0/policies/" + $policyType + "/" + $id + $uri = 'https://graph.microsoft.com/v1.0/policies/' + $policyType + '/' + $id try { $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method GET break + } catch { + Write-Error $_.Exception.Message } - catch {} } - $policy = ($response.'@odata.context') -match 'policies/([^/]+)/\$entity' - + # Unused variable + #$policy = ($response.'@odata.context') -match 'policies/([^/]+)/\$entity' + $policyType = $Matches[1] - Write-Debug("============================ Matches ============================") + Write-Debug('============================ Matches ============================') Write-Debug($Matches[1]) - if (($null -ne $PSBoundParameters["id"]) -and ($null -ne $policyType )) { - $URI = "https://graph.microsoft.com/v1.0/policies/" + $policyType + "/" + $id + if (($null -ne $PSBoundParameters['id']) -and ($null -ne $policyType )) { + $URI = 'https://graph.microsoft.com/v1.0/policies/' + $policyType + '/' + $id } - $Method = "DELETE" - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + $Method = 'DELETE' + Write-Debug('============================ TRANSFORMATIONS ============================') + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") $response = Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method $Method $response - } -} \ No newline at end of file + } +} diff --git a/module_legacy/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 b/module_legacy/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 index aa4498b836..6efba4dda8 100644 --- a/module_legacy/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 +++ b/module_legacy/Entra/AdditionalFunctions/Set-EntraPolicy.ps1 @@ -4,98 +4,99 @@ function Set-EntraPolicy { [CmdletBinding(DefaultParameterSetName = 'InvokeByDynamicParameters')] param ( - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $AlternativeIdentifier, - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [System.String] $Id, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[System.String]] $Definition, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $DisplayName, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.String] $Type, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, - [Parameter(ParameterSetName = "InvokeByDynamicParameters")] - [System.Nullable`1[System.Boolean]] $IsOrganizationDefault + [Parameter(ParameterSetName = 'InvokeByDynamicParameters')] + [System.String] $AlternativeIdentifier, + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $Id, + [Parameter(ParameterSetName = 'InvokeByDynamicParameters')] + [System.Collections.Generic.List`1[System.String]] $Definition, + [Parameter(ParameterSetName = 'InvokeByDynamicParameters')] + [System.String] $DisplayName, + [Parameter(ParameterSetName = 'InvokeByDynamicParameters')] + [System.String] $Type, + [Parameter(ParameterSetName = 'InvokeByDynamicParameters')] + [System.Collections.Generic.List`1[Microsoft.Open.MSGraph.Model.KeyCredential]] $KeyCredentials, + [Parameter(ParameterSetName = 'InvokeByDynamicParameters')] + [System.Nullable`1[System.Boolean]] $IsOrganizationDefault ) - PROCESS { + PROCESS { $params = @{} $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand - + $policyTypeMap = @{ - "ActivityBasedTimeoutPolicy" = "activityBasedTimeoutPolicies" - "ApplicationManagementPolicy" = "appManagementPolicies" - "DefaultAppManagementPolicy" = "defaultAppManagementPolicy" - "AuthenticationFlowsPolicy" = "authenticationFlowsPolicy" - "AuthenticationMethodsPolicy" = "authenticationMethodsPolicy" - "ClaimsMappingPolicy" = "claimsMappingPolicies" - "FeatureRolloutPolicy" = "featureRolloutPolicies" - "HomeRealmDiscoveryPolicy" = "homeRealmDiscoveryPolicies" - "PermissionGrantPolicy" = "permissionGrantPolicies" - "TokenIssuancePolicy" = "tokenIssuancePolicies" - "TokenLifetimePolicy" = "tokenLifetimePolicies" + 'ActivityBasedTimeoutPolicy' = 'activityBasedTimeoutPolicies' + 'ApplicationManagementPolicy' = 'appManagementPolicies' + 'DefaultAppManagementPolicy' = 'defaultAppManagementPolicy' + 'AuthenticationFlowsPolicy' = 'authenticationFlowsPolicy' + 'AuthenticationMethodsPolicy' = 'authenticationMethodsPolicy' + 'ClaimsMappingPolicy' = 'claimsMappingPolicies' + 'FeatureRolloutPolicy' = 'featureRolloutPolicies' + 'HomeRealmDiscoveryPolicy' = 'homeRealmDiscoveryPolicies' + 'PermissionGrantPolicy' = 'permissionGrantPolicies' + 'TokenIssuancePolicy' = 'tokenIssuancePolicies' + 'TokenLifetimePolicy' = 'tokenLifetimePolicies' } $policyTypes = $policyTypeMap.Values - if ($null -ne $PSBoundParameters["type"]) { - $type = if ($policyTypeMap.ContainsKey($type)) { $policyTypeMap[$type] } else { - Write-Error "Set-EntraBetADPolicy : Error occurred while executing SetPolicy + if ($null -ne $PSBoundParameters['type']) { + $type = if ($policyTypeMap.ContainsKey($type)) { $policyTypeMap[$type] } else { + Write-Error "Set-EntraBetADPolicy : Error occurred while executing SetPolicy Code: Request_BadRequest Message: Invalid value specified for property 'type' of resource 'Policy'." - return; + return } } else { $type = $null - } - - if(!$type) { + } + + if (!$type) { foreach ($pType in $policyTypes) { - $uri = "https://graph.microsoft.com/v1.0/policies/" + $pType + "/" + $id + $uri = 'https://graph.microsoft.com/v1.0/policies/' + $pType + '/' + $id try { $response = Invoke-GraphRequest -Uri $uri -Method GET break + } catch { + Write-Error $_.Exception.Message } - catch {} } - $policy = ($response.'@odata.context') -match 'policies/([^/]+)/\$entity' + # Unused variable + #$policy = ($response.'@odata.context') -match 'policies/([^/]+)/\$entity' $type = $Matches[1] } - - if($policyTypes -notcontains $type) { - Write-Error "Set-AzureADPolicy : Error occurred while executing SetPolicy + + if ($policyTypes -notcontains $type) { + Write-Error "Set-AzureADPolicy : Error occurred while executing SetPolicy Code: Request_BadRequest Message: Invalid value specified for property 'type' of resource 'Policy'." - } - else { - if ($null -ne $PSBoundParameters["Definition"]) { - $params["Definition"] = $PSBoundParameters["Definition"] + } else { + if ($null -ne $PSBoundParameters['Definition']) { + $params['Definition'] = $PSBoundParameters['Definition'] } - if ($null -ne $PSBoundParameters["DisplayName"]) { - $params["DisplayName"] = $PSBoundParameters["DisplayName"] + if ($null -ne $PSBoundParameters['DisplayName']) { + $params['DisplayName'] = $PSBoundParameters['DisplayName'] } - if ($null -ne $PSBoundParameters["Definition"]) { - $params["Definition"] = $PSBoundParameters["Definition"] + if ($null -ne $PSBoundParameters['Definition']) { + $params['Definition'] = $PSBoundParameters['Definition'] } - if ($null -ne $PSBoundParameters["IsOrganizationDefault"]) { - $params["IsOrganizationDefault"] = $PSBoundParameters["IsOrganizationDefault"] + if ($null -ne $PSBoundParameters['IsOrganizationDefault']) { + $params['IsOrganizationDefault'] = $PSBoundParameters['IsOrganizationDefault'] } - if (($null -ne $PSBoundParameters["id"]) -and ($null -ne $type )) { - $URI = "https://graph.microsoft.com/v1.0/policies/" + $type + "/" + $id + if (($null -ne $PSBoundParameters['id']) -and ($null -ne $type )) { + $URI = 'https://graph.microsoft.com/v1.0/policies/' + $type + '/' + $id } - - $Method = "PATCH" - - Write-Debug("============================ TRANSFORMATIONS ============================") - $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug - Write-Debug("=========================================================================`n") - - $body = $params | ConvertTo-Json - Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Body $body -Method $Method - + + $Method = 'PATCH' + + Write-Debug('============================ TRANSFORMATIONS ============================') + $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + + $body = $params | ConvertTo-Json + Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Body $body -Method $Method + } - - } -} \ No newline at end of file + + } +} diff --git a/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 index e475c8dca9..6f8a6ce25d 100644 --- a/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 +++ b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaApplicationPasswordCredential.ps1 @@ -5,35 +5,35 @@ function Get-EntraBetaApplicationPasswordCredential { [CmdletBinding(DefaultParameterSetName = '')] param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] - [Alias("ObjectId")] - [System.String] $ApplicationId, - [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] - [System.String[]] $Property + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [Alias('ObjectId')] + [System.String] $ApplicationId, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property ) PROCESS { $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand $params = @{} $baseUri = "https://graph.microsoft.com/beta/applications/$ApplicationId/passwordCredentials" - $params["Method"] = "GET" - $params["Uri"] = "$baseUri" + $params['Method'] = 'GET' + $params['Uri'] = "$baseUri" $response = Invoke-GraphRequest @params -Headers $customHeaders | ConvertTo-Json | ConvertFrom-Json try { $response = $response.value + } catch { + Write-Error $_.Exception.Message } - catch {} $response | ForEach-Object { - if($null -ne $_) { + if ($null -ne $_) { $CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_.CustomKeyIdentifier))) Add-Member -InputObject $_ -MemberType NoteProperty -Name CustomKeyIdentifier -Value $CustomKeyIdentifier -Force Add-Member -InputObject $_ -MemberType AliasProperty -Name EndDate -Value endDateTime Add-Member -InputObject $_ -MemberType AliasProperty -Name StartDate -Value startDateTime } } - if($response) - { + if ($response) { $userList = @() foreach ($data in $response) { $userType = New-Object Microsoft.Graph.Beta.PowerShell.Models.MicrosoftGraphPasswordCredential @@ -43,14 +43,12 @@ function Get-EntraBetaApplicationPasswordCredential { $userType | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force } $userList += $userType - } - if($null -ne $PSBoundParameters["Property"]) - { - $userList | Select-Object $PSBoundParameters["Property"] } - else { + if ($null -ne $PSBoundParameters['Property']) { + $userList | Select-Object $PSBoundParameters['Property'] + } else { $userList - } + } } } -} \ No newline at end of file +} diff --git a/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 index 9866fe1d04..afdd658571 100644 --- a/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 +++ b/module_legacy/EntraBeta/AdditionalFunctions/Get-EntraBetaDirectoryObjectOnPremisesProvisioningError.ps1 @@ -5,36 +5,35 @@ function Get-EntraBetaDirectoryObjectOnPremisesProvisioningError { [CmdletBinding(DefaultParameterSetName = 'GetById')] param ( - [Parameter(ParameterSetName = "GetById")][ValidateNotNullOrEmpty()][ValidateScript({if ($_ -is [System.Guid]) { $true } else {throw "TenantId must be of type [System.Guid]."}})][System.Guid] $TenantId + [Parameter(ParameterSetName = 'GetById')][ValidateNotNullOrEmpty()][ValidateScript({ if ($_ -is [System.Guid]) { $true } else { throw 'TenantId must be of type [System.Guid].' } })][System.Guid] $TenantId ) PROCESS { $params = @{} $customHeaders = New-EntraBetaCustomHeaders -Command $MyInvocation.MyCommand - if ($null -ne $PSBoundParameters["TenantId"]) { - $params["TenantId"] = $PSBoundParameters["TenantId"] + if ($null -ne $PSBoundParameters['TenantId']) { + $params['TenantId'] = $PSBoundParameters['TenantId'] } - Write-Debug("============================ TRANSFORMATIONS ============================") + Write-Debug('============================ TRANSFORMATIONS ============================') $params.Keys | ForEach-Object { "$_ : $($params[$_])" } | Write-Debug Write-Debug("=========================================================================`n") - $Object = @("users", "groups", "contacts") + $Object = @('users', 'groups', 'contacts') $response = @() try { foreach ($obj in $object) { - $obj = ($obj | Out-String).trimend() + $obj = ($obj | Out-String).TrimEnd() $uri = 'https://graph.microsoft.com/beta/' + $obj + '?$select=onPremisesProvisioningErrors' $response += ((Invoke-GraphRequest -Headers $customHeaders -Uri $uri -Method GET).value).onPremisesProvisioningErrors } + } catch { + Write-Error $_.Exception.Message } - catch {} if ([string]::IsNullOrWhiteSpace($response)) { - write-host "False" - } - else { + Write-Host 'False' + } else { $response } } } Set-Alias -Name Get-EntraBetaHasObjectsWithDirSyncProvisioningError -Value Get-EntraBetaDirectoryObjectOnPremisesProvisioningError -Scope Global -Force - diff --git a/module_legacy/docfx.json b/module_legacy/docfx.json index 5c7747e82b..ff5bf913ff 100644 --- a/module_legacy/docfx.json +++ b/module_legacy/docfx.json @@ -1,24 +1,108 @@ { "build": { "content": [ - { "dest": "entra-preview", "files": [ "breadcrumb/toc.yml" ]}, - - { "dest": "entra-preview", "files": [ "**/*.md", "**/*.yml" ], "src": "docs/entra-powershell-v1.0", "version": "entra-powershell-preview" }, - { "dest": "module", "exclude": [ "toc.yml" ], "files": [ "**/*.yml" ], "src": "entra-powershell-preview", "version": "entra-powershell-preview" }, - { "dest": "module", "files": [ "**/About/*.md" ], "src": "entra-powershell-preview", "version": "entra-powershell-preview" }, - { "dest": "module/entra-powershell-preview", "files": [ "toc.yml" ], "src": "entra-powershell-preview", "version": "entra-powershell-preview" }, - - { "dest": "entra-preview", "files": [ "**/*.md", "**/*.yml" ], "src": "docs/entra-powershell-beta", "version": "entra-powershell-beta-preview" }, - { "dest": "module", "exclude": [ "toc.yml" ], "files": [ "**/*.yml" ], "src": "entra-powershell-beta-preview", "version": "entra-powershell-beta-preview" }, - { "dest": "module", "files": [ "**/About/*.md" ], "src": "entra-powershell-beta-preview", "version": "entra-powershell-beta-preview" }, - { "dest": "module/entra-powershell-beta-preview", "files": [ "toc.yml" ], "src": "entra-powershell-beta-preview", "version": "entra-powershell-beta-preview" }, - - { "dest": "entra-preview", "files": [ "**/*.md", "**/*.yml" ], "src": "virtual-folder" }, - { "dest": "module", "files": [ "**/*.md", "**/*.yml" ], "src": "virtual-folder-module" } + { + "dest": "entra-preview", + "files": [ + "breadcrumb/toc.yml" + ] + }, + { + "dest": "entra-preview", + "files": [ + "**/*.md", + "**/*.yml" + ], + "src": "docs/entra-powershell-v1.0", + "version": "entra-powershell-preview" + }, + { + "dest": "module", + "exclude": [ + "toc.yml" + ], + "files": [ + "**/*.yml" + ], + "src": "entra-powershell-preview", + "version": "entra-powershell-preview" + }, + { + "dest": "module", + "files": [ + "**/About/*.md" + ], + "src": "entra-powershell-preview", + "version": "entra-powershell-preview" + }, + { + "dest": "module/entra-powershell-preview", + "files": [ + "toc.yml" + ], + "src": "entra-powershell-preview", + "version": "entra-powershell-preview" + }, + { + "dest": "entra-preview", + "files": [ + "**/*.md", + "**/*.yml" + ], + "src": "docs/entra-powershell-beta", + "version": "entra-powershell-beta-preview" + }, + { + "dest": "module", + "exclude": [ + "toc.yml" + ], + "files": [ + "**/*.yml" + ], + "src": "entra-powershell-beta-preview", + "version": "entra-powershell-beta-preview" + }, + { + "dest": "module", + "files": [ + "**/About/*.md" + ], + "src": "entra-powershell-beta-preview", + "version": "entra-powershell-beta-preview" + }, + { + "dest": "module/entra-powershell-beta-preview", + "files": [ + "toc.yml" + ], + "src": "entra-powershell-beta-preview", + "version": "entra-powershell-beta-preview" + }, + { + "dest": "entra-preview", + "files": [ + "**/*.md", + "**/*.yml" + ], + "src": "virtual-folder" + }, + { + "dest": "module", + "files": [ + "**/*.md", + "**/*.yml" + ], + "src": "virtual-folder-module" + } ], "versions": { - "entra-powershell-preview": { "dest": "entra-powershell-preview" }, - "entra-powershell-beta-preview": { "dest": "entra-powershell-beta-preview" }, + "entra-powershell-preview": { + "dest": "entra-powershell-preview" + }, + "entra-powershell-beta-preview": { + "dest": "entra-powershell-beta-preview" + } }, "overwrite": [], "externalReference": [], @@ -30,7 +114,7 @@ "ms.prod": "powershell", "ms.topic": "reference", "ms.author": "stevemutungi", - "author": "SteveMutungi254", + "author": "SteveMutungi254" }, "template": [], "markdownEngineName": "markdig", diff --git a/src/CompatibilityAdapterBuilder.ps1 b/src/CompatibilityAdapterBuilder.ps1 index b382b0be85..92b5583bf3 100644 --- a/src/CompatibilityAdapterBuilder.ps1 +++ b/src/CompatibilityAdapterBuilder.ps1 @@ -5,26 +5,26 @@ Set-StrictMode -Version 5 class CompatibilityAdapterBuilder { [string] $SourceModuleName - [string[]] $SourceModulePrefixs + [string[]] $SourceModulePrefixes [string] $NewPrefix [string[]] $DestinationModuleName - [string[]] $DestinationPrefixs + [string[]] $DestinationPrefixes [string] $ModuleName hidden [string[]] $MissingCommandsToMap = @() hidden [string[]] $TypesToCreate = @() - hidden [string] $TypePrefix = "" + hidden [string] $TypePrefix = '' hidden [hashtable] $CmdCustomizations = @{} hidden [hashtable] $GenericParametersTransformations = @{} hidden [hashtable] $GenericOutputTransformations = @{} hidden [hashtable] $TypeCustomizations = @{} - hidden [string] $OutputFolder = (join-path $PSScriptRoot '../bin') + hidden [string] $OutputFolder = (Join-Path $PSScriptRoot '../bin') hidden [string] $HelpFolder = $null hidden [MappedCmdCollection] $ModuleMap = $null hidden [bool] $GenerateCommandsToMapData hidden [hashtable] $HelperCmdletsToExport = @{} hidden [string] $BasePath = $null hidden [string] $LoadMessage - hidden [string[]] $cmdtoSkipNameconverssion = @( + hidden [string[]] $cmdToSkipNameConversion = @( 'Select-EntraGroupIdsGroupIsMemberOf', 'Get-EntraUserAppRoleAssignment', 'Get-EntraPermissionGrantConditionSet', @@ -64,132 +64,131 @@ class CompatibilityAdapterBuilder { 'New-EntraNamedLocationPolicy', 'New-EntraServicePrincipalAppRoleAssignment', 'Restore-EntraDeletedDirectoryObject', - 'Restore-EntraBetaDeletedDirectoryObject', - 'New-EntraBetaServicePrincipalAppRoleAssignment', - 'New-EntraBetaNamedLocationPolicy', - 'Get-EntraBetaPermissionGrantConditionSet', - 'Get-EntraBetaPermissionGrantConditionSet', - 'Get-EntraBetaApplicationKeyCredential', - 'Get-EntraBetaPrivilegedRoleDefinition', - 'Get-EntraBetaFeatureRolloutPolicy', - 'Set-EntraBetaPermissionGrantPolicy', - 'Remove-EntraBetaApplicationPassword', - 'Get-EntraBetaServicePrincipalPolicy', - 'Get-EntraBetaPrivilegedRoleAssignmentRequest', - 'New-EntraBetaApplicationPassword', - 'Set-EntraBetaPasswordSingleSignOnCredential', - 'Get-EntraBetaObjectSetting', - 'Add-EntraBetaApplicationPolicy', - 'Add-EntraBetaFeatureRolloutPolicyDirectoryObject', - 'Revoke-EntraBetaUserAllRefreshToken', - 'Get-EntraBetaPrivilegedRole', - 'Get-EntraBetaApplicationTemplate', - 'Select-EntraBetaGroupIdsContactIsMemberOf', - 'Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue', - 'Set-EntraBetaUserLicense', - 'Set-EntraBetaTrustFrameworkPolicy', - 'Remove-EntraBetaUserAppRoleAssignment', - 'Get-EntraBetaApplicationPolicy', - 'Get-EntraBetaPermissionGrantPolicy', - 'Select-EntraBetaGroupIdsGroupIsMemberOf', - 'New-EntraBetaUserAppRoleAssignment', - 'Get-EntraBetaTrustFrameworkPolicy', - 'Remove-EntraBetaObjectSetting', - 'Add-EntraBetacustomSecurityAttributeDefinitionAllowedValue', - 'Get-EntraBetaUserOAuth2PermissionGrant', - 'New-EntraBetaApplicationKey', - 'Get-EntraBetaPolicy', - 'Get-EntraBetaDirectorySetting', - 'New-EntraBetaServiceAppRoleAssignment', - 'Get-EntraBetaObjectByObjectId', - 'Remove-EntraBetaPasswordSingleSignOnCredential', - 'Set-EntraBetaPermissionGrantConditionSet', - 'Set-EntraBetaConditionalAccessPolicy', - 'Get-EntraBetaPolicyAppliedObject', - 'Remove-EntraBetaDeletedApplication', - 'Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue', - 'Get-EntraBetaUserAppRoleAssignment', - 'Get-EntraBetaDirectorySettingTemplate', - 'Remove-EntraBetaServicePrincipalPolicy', - 'Get-EntraBetaPermissionGrantConditionSet', - 'Set-EntraBetaObjectSetting', - 'Remove-EntraBetaFeatureRolloutPolicyDirectoryObject', - 'Get-EntraBetaAuthorizationPolicy', - 'Remove-EntraBetaPermissionGrantPolicy', - 'Set-EntraBetaDirectorySetting', - 'Set-EntraBetaAuthorizationPolicy', - 'Remove-EntraBetaDirectorySetting', - 'Remove-EntraBetaApplicationPolicy', - 'New-EntraBetaConditionalAccessPolicy', - 'Set-EntraBetaPrivilegedRoleAssignmentRequest', - 'Remove-EntraBetaTrustFrameworkPolicy', - 'New-EntraBetaPasswordSingleSignOnCredential', - 'Remove-EntraBetaPolicy', - 'Set-EntraBetaPolicy', - 'Set-EntraBetaCustomSecurityAttributeDefinition', - 'Get-EntraBetaPrivilegedResource', - 'Set-EntraBetaUserPassword', - 'New-EntraBetaApplicationFromApplicationTemplate', - 'Set-EntraBetaPrivilegedRoleSetting', - 'Remove-EntraBetaApplicationKey', - 'Get-EntraBetaPrivilegedRoleSetting', - 'Remove-EntraBetaOAuth2PermissionGrant', - 'Select-EntraBetaGroupIdsServicePrincipalIsMemberOf', - 'Get-EntraBetaServicePrincipalDelegatedPermissionClassification', - 'New-EntraBetaPrivilegedRoleAssignment', - 'Get-EntraBetaPasswordSingleSignOnCredential', - 'Set-EntraBetaFeatureRolloutPolicy', - 'New-EntraBetaPermissionGrantPolicy', - 'Remove-EntraBetaFeatureRolloutPolicy', - 'Get-EntraBetaCustomSecurityAttributeDefinition', - 'Remove-EntraBetaServicePrincipalDelegatedPermissionClassification', - 'Select-EntraBetaGroupIdsUserIsMemberOf', - 'Set-EntraBetaNamedLocationPolicy', - 'New-EntraBetaNamedLocationPolicy', - 'Restore-EntraBetaDeletedApplication', - 'Remove-EntraBetaPermissionGrantConditionSet' - + 'Restore-EntraBetaDeletedDirectoryObject', + 'New-EntraBetaServicePrincipalAppRoleAssignment', + 'New-EntraBetaNamedLocationPolicy', + 'Get-EntraBetaPermissionGrantConditionSet', + 'Get-EntraBetaPermissionGrantConditionSet', + 'Get-EntraBetaApplicationKeyCredential', + 'Get-EntraBetaPrivilegedRoleDefinition', + 'Get-EntraBetaFeatureRolloutPolicy', + 'Set-EntraBetaPermissionGrantPolicy', + 'Remove-EntraBetaApplicationPassword', + 'Get-EntraBetaServicePrincipalPolicy', + 'Get-EntraBetaPrivilegedRoleAssignmentRequest', + 'New-EntraBetaApplicationPassword', + 'Set-EntraBetaPasswordSingleSignOnCredential', + 'Get-EntraBetaObjectSetting', + 'Add-EntraBetaApplicationPolicy', + 'Add-EntraBetaFeatureRolloutPolicyDirectoryObject', + 'Revoke-EntraBetaUserAllRefreshToken', + 'Get-EntraBetaPrivilegedRole', + 'Get-EntraBetaApplicationTemplate', + 'Select-EntraBetaGroupIdsContactIsMemberOf', + 'Set-EntraBetaCustomSecurityAttributeDefinitionAllowedValue', + 'Set-EntraBetaUserLicense', + 'Set-EntraBetaTrustFrameworkPolicy', + 'Remove-EntraBetaUserAppRoleAssignment', + 'Get-EntraBetaApplicationPolicy', + 'Get-EntraBetaPermissionGrantPolicy', + 'Select-EntraBetaGroupIdsGroupIsMemberOf', + 'New-EntraBetaUserAppRoleAssignment', + 'Get-EntraBetaTrustFrameworkPolicy', + 'Remove-EntraBetaObjectSetting', + 'Add-EntraBetaCustomSecurityAttributeDefinitionAllowedValue', + 'Get-EntraBetaUserOAuth2PermissionGrant', + 'New-EntraBetaApplicationKey', + 'Get-EntraBetaPolicy', + 'Get-EntraBetaDirectorySetting', + 'New-EntraBetaServiceAppRoleAssignment', + 'Get-EntraBetaObjectByObjectId', + 'Remove-EntraBetaPasswordSingleSignOnCredential', + 'Set-EntraBetaPermissionGrantConditionSet', + 'Set-EntraBetaConditionalAccessPolicy', + 'Get-EntraBetaPolicyAppliedObject', + 'Remove-EntraBetaDeletedApplication', + 'Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue', + 'Get-EntraBetaUserAppRoleAssignment', + 'Get-EntraBetaDirectorySettingTemplate', + 'Remove-EntraBetaServicePrincipalPolicy', + 'Get-EntraBetaPermissionGrantConditionSet', + 'Set-EntraBetaObjectSetting', + 'Remove-EntraBetaFeatureRolloutPolicyDirectoryObject', + 'Get-EntraBetaAuthorizationPolicy', + 'Remove-EntraBetaPermissionGrantPolicy', + 'Set-EntraBetaDirectorySetting', + 'Set-EntraBetaAuthorizationPolicy', + 'Remove-EntraBetaDirectorySetting', + 'Remove-EntraBetaApplicationPolicy', + 'New-EntraBetaConditionalAccessPolicy', + 'Set-EntraBetaPrivilegedRoleAssignmentRequest', + 'Remove-EntraBetaTrustFrameworkPolicy', + 'New-EntraBetaPasswordSingleSignOnCredential', + 'Remove-EntraBetaPolicy', + 'Set-EntraBetaPolicy', + 'Set-EntraBetaCustomSecurityAttributeDefinition', + 'Get-EntraBetaPrivilegedResource', + 'Set-EntraBetaUserPassword', + 'New-EntraBetaApplicationFromApplicationTemplate', + 'Set-EntraBetaPrivilegedRoleSetting', + 'Remove-EntraBetaApplicationKey', + 'Get-EntraBetaPrivilegedRoleSetting', + 'Remove-EntraBetaOAuth2PermissionGrant', + 'Select-EntraBetaGroupIdsServicePrincipalIsMemberOf', + 'Get-EntraBetaServicePrincipalDelegatedPermissionClassification', + 'New-EntraBetaPrivilegedRoleAssignment', + 'Get-EntraBetaPasswordSingleSignOnCredential', + 'Set-EntraBetaFeatureRolloutPolicy', + 'New-EntraBetaPermissionGrantPolicy', + 'Remove-EntraBetaFeatureRolloutPolicy', + 'Get-EntraBetaCustomSecurityAttributeDefinition', + 'Remove-EntraBetaServicePrincipalDelegatedPermissionClassification', + 'Select-EntraBetaGroupIdsUserIsMemberOf', + 'Set-EntraBetaNamedLocationPolicy', + 'New-EntraBetaNamedLocationPolicy', + 'Restore-EntraBetaDeletedApplication', + 'Remove-EntraBetaPermissionGrantConditionSet' + ) # Constructor that changes the output folder, load all the Required Modules and creates the output folder. - CompatibilityAdapterBuilder() { - $this.BasePath = (join-path $PSScriptRoot '../module_legacy/Entra/') - $this.HelpFolder = (join-path $this.BasePath './help') - $this.Configure((join-path $this.BasePath "/config/ModuleSettings.json")) + CompatibilityAdapterBuilder() { + $this.BasePath = (Join-Path $PSScriptRoot '../module_legacy/Entra/') + $this.HelpFolder = (Join-Path $this.BasePath './help') + $this.Configure((Join-Path $this.BasePath '/config/ModuleSettings.json')) } - CompatibilityAdapterBuilder([string] $Module){ - $this.BasePath = (join-path $PSScriptRoot '../module_legacy/') - $this.BasePath = (join-path $this.BasePath $Module) - $this.HelpFolder = (join-path $this.BasePath './help') - $this.Configure((join-path $this.BasePath "/config/ModuleSettings.json")) + CompatibilityAdapterBuilder([string] $Module) { + $this.BasePath = (Join-Path $PSScriptRoot '../module_legacy/') + $this.BasePath = (Join-Path $this.BasePath $Module) + $this.HelpFolder = (Join-Path $this.BasePath './help') + $this.Configure((Join-Path $this.BasePath '/config/ModuleSettings.json')) } - CompatibilityAdapterBuilder([bool] $notRunningUT = $false){ - if($notRunningUT) - { - $this.BasePath = (join-path $PSScriptRoot '../module_legacy/Entra/') - $this.HelpFolder = (join-path $this.BasePath './help') - $this.Configure((join-path $this.BasePath "/config/ModuleSettings.json")) - } + CompatibilityAdapterBuilder([bool] $notRunningUT = $false) { + if ($notRunningUT) { + $this.BasePath = (Join-Path $PSScriptRoot '../module_legacy/Entra/') + $this.HelpFolder = (Join-Path $this.BasePath './help') + $this.Configure((Join-Path $this.BasePath '/config/ModuleSettings.json')) + } } - hidden Configure([string] $ModuleSettingsPath){ + hidden Configure([string] $ModuleSettingsPath) { $settingPath = $ModuleSettingsPath $content = Get-Content -Path $settingPath | ConvertFrom-Json $this.SourceModuleName = $content.sourceModule - $this.SourceModulePrefixs = $content.sourceModulePrefix + $this.SourceModulePrefixes = $content.sourceModulePrefix $this.NewPrefix = $content.newPrefix $this.DestinationModuleName = $content.destinationModuleName - $this.DestinationPrefixs = $content.destinationPrefix + $this.DestinationPrefixes = $content.destinationPrefix $this.ModuleName = $content.moduleName $this.TypePrefix = $content.typePrefix Import-Module $this.SourceModuleName -Force | Out-Null - foreach ($moduleName in $this.DestinationModuleName){ + foreach ($moduleName in $this.DestinationModuleName) { Import-Module $moduleName -RequiredVersion $content.destinationModuleVersion -Force | Out-Null } - if(!(Test-Path $this.OutputFolder)){ + if (!(Test-Path $this.OutputFolder)) { New-Item -ItemType Directory -Path $this.OutputFolder | Out-Null } @@ -198,56 +197,55 @@ class CompatibilityAdapterBuilder { # Generates the module then generates all the files required to create the module. BuildModule() { - $this.WriteModuleFile() - $this.WriteModuleManifest() + $this.WriteModuleFile() + $this.WriteModuleManifest() } - + AddTypes($types) { $this.TypeCustomizations = $types - foreach($type in $types.Keys){ + foreach ($type in $types.Keys) { $this.TypesToCreate += $type } } # Add customization based on the the CommandMap object. AddCustomization([hashtable[]] $Commands) { - foreach($cmd in $Commands) { + foreach ($cmd in $Commands) { $parameters = $null $outputs = $null - if($null -ne $cmd.TargetName){ - if($cmd.Parameters){ + if ($null -ne $cmd.TargetName) { + if ($cmd.Parameters) { $parameters = @{} - foreach($param in $cmd.Parameters){ + foreach ($param in $cmd.Parameters) { $parameters.Add($param.SourceName, [DataMap]::New($param.SourceName, $param.TargetName, $param.ConversionType, [Scriptblock]::Create($param.SpecialMapping))) } } - - if($cmd.Outputs){ + + if ($cmd.Outputs) { $outputs = @{} - foreach($param in $cmd.Outputs){ + foreach ($param in $cmd.Outputs) { $outputs.Add($param.SourceName, [DataMap]::New($param.SourceName, $param.TargetName, $param.ConversionType, [Scriptblock]::Create($param.SpecialMapping))) } } - $customCommand = [CommandMap]::New($cmd.SourceName,$cmd.TargetName, $parameters, $outputs) + $customCommand = [CommandMap]::New($cmd.SourceName, $cmd.TargetName, $parameters, $outputs) $this.CmdCustomizations.Add($cmd.SourceName, $customCommand) - } - else { - if($cmd.Parameters){ + } else { + if ($cmd.Parameters) { $parameters = @{} - foreach($param in $cmd.Parameters){ + foreach ($param in $cmd.Parameters) { $this.GenericParametersTransformations.Add($param.SourceName, [DataMap]::New($param.SourceName, $param.TargetName, $param.ConversionType, [Scriptblock]::Create($param.SpecialMapping))) } } - - if($cmd.Outputs){ + + if ($cmd.Outputs) { $outputs = @{} - foreach($param in $cmd.Outputs){ + foreach ($param in $cmd.Outputs) { $this.GenericOutputTransformations.Add($param.SourceName, [DataMap]::New($param.SourceName, $param.TargetName, $param.ConversionType, [Scriptblock]::Create($param.SpecialMapping))) } } - if($null -ne $cmd.SourceName) { + if ($null -ne $cmd.SourceName) { $scriptBlock = [Scriptblock]::Create($cmd.CustomScript) $customCommand = [CommandMap]::New($cmd.SourceName, $scriptBlock) $this.CmdCustomizations.Add($cmd.SourceName, $customCommand) @@ -256,16 +254,16 @@ class CompatibilityAdapterBuilder { } } - AddHelperCommand([string] $FileName){ + AddHelperCommand([string] $FileName) { $properties = Get-ItemProperty -Path $FileName - if($null -ne $properties){ - $name = $properties.PSChildName.Replace(".ps1","") + if ($null -ne $properties) { + $name = $properties.PSChildName.Replace('.ps1', '') $this.HelperCmdletsToExport.Add($name, $(Get-Content -Path $FileName) -join "`n") } } hidden GenerateHelpFiles() { - foreach($file in Get-ChildItem -Path $this.HelpFolder -Filter "*.xml") { + foreach ($file in Get-ChildItem -Path $this.HelpFolder -Filter '*.xml') { Copy-Item $file.FullName $this.OutputFolder -Force } #$helpPath = Join-Path $this.OutputFolder "$($this.ModuleName)-Help.xml" @@ -275,31 +273,31 @@ class CompatibilityAdapterBuilder { } hidden [string] GetHelpHeader() { - $helpHeader = @" + $helpHeader = @' -"@ +'@ return $helpHeader } hidden [string] GetHelpCommandsFromFiles($filePath) { - $helpCommands = "" - $replacePrefix = "-" + $this.NewPrefix - $oldPrefix = "-AzureAD" - foreach($file in Get-ChildItem -Path $this.HelpFolder -Filter "*.xml") { - (Get-Content $file.FullName | Select-Object -Skip 2 | Select-Object -SkipLast 1).Replace($oldPrefix,$replacePrefix) | Add-Content -Path $filePath + $helpCommands = '' + $replacePrefix = '-' + $this.NewPrefix + $oldPrefix = '-AzureAD' + foreach ($file in Get-ChildItem -Path $this.HelpFolder -Filter '*.xml') { + (Get-Content $file.FullName | Select-Object -Skip 2 | Select-Object -SkipLast 1).Replace($oldPrefix, $replacePrefix) | Add-Content -Path $filePath } return $helpCommands } hidden [string] GetHelpFooter() { - $helpHeader = @" + $helpHeader = @' -"@ +'@ return $helpHeader } - - hidden WriteModuleFile() { + + hidden WriteModuleFile() { $filePath = Join-Path $this.OutputFolder "$($this.ModuleName).psm1" #This call create the mapping used to create the final module. $data = $this.Map() @@ -316,83 +314,81 @@ class CompatibilityAdapterBuilder { foreach($function in $this.HelperCmdletsToExport.GetEnumerator()){ $psm1FileContent += $doubleSpace+$function.Value } - $psm1FileContent += $this.GetExportMemeber() + $psm1FileContent += $this.GetExportMember() $psm1FileContent += $this.SetMissingCommands() $psm1FileContent += $this.LoadMessage $psm1FileContent += $this.GetTypesDefinitions() $psm1FileContent | Out-File -FilePath $filePath } - hidden GetInnerTypes([string] $type){ - $object = New-Object -TypeName $type + hidden GetInnerTypes([string] $type) { + $object = New-Object -TypeName $type $object.GetType().GetProperties() | ForEach-Object { - if($_.PropertyType.Name -eq 'Nullable`1') { + if ($_.PropertyType.Name -eq 'Nullable`1') { $name = $_.PropertyType.GenericTypeArguments.FullName - if(!$_.PropertyType.GenericTypeArguments.IsEnum){ - if($name -like "$($this.TypePrefix)*") { - if(!$this.TypesToCreate.Contains($name)){ + if (!$_.PropertyType.GenericTypeArguments.IsEnum) { + if ($name -like "$($this.TypePrefix)*") { + if (!$this.TypesToCreate.Contains($name)) { $this.TypesToCreate += $name $this.GetInnerTypes($name) - } + } } } - } - elseif($_.PropertyType.Name -eq 'List`1') { + } elseif ($_.PropertyType.Name -eq 'List`1') { $name = $_.PropertyType.GenericTypeArguments.FullName - if(!$_.PropertyType.GenericTypeArguments.IsEnum){ - if($name -like "$($this.TypePrefix)*") { - if(!$this.TypesToCreate.Contains($name)){ + if (!$_.PropertyType.GenericTypeArguments.IsEnum) { + if ($name -like "$($this.TypePrefix)*") { + if (!$this.TypesToCreate.Contains($name)) { $this.TypesToCreate += $name $this.GetInnerTypes($name) - } + } } } - } - else { - if(!$_.PropertyType.IsEnum){ + } else { + if (!$_.PropertyType.IsEnum) { $name = $_.PropertyType.FullName - if($name -like "$($this.TypePrefix)*") { - if(!$this.TypesToCreate.Contains($name)){ + if ($name -like "$($this.TypePrefix)*") { + if (!$this.TypesToCreate.Contains($name)) { $this.TypesToCreate += $name $this.GetInnerTypes($name) } } } - } + } } } hidden [string] GetTypesDefinitions() { $types = $this.TypesToCreate | Sort-Object -Unique - - foreach($type in $types) { + + foreach ($type in $types) { $this.GetInnerTypes($type) } - $types = $this.TypesToCreate | Sort-Object -Unique + $types = $this.TypesToCreate | Sort-Object -Unique $namespace = $null $def = @" # ------------------------------------------------------------------------------ -# Type definitios required for commands inputs +# Type definitions required for commands inputs # ------------------------------------------------------------------------------ `$def = @" "@ Write-Host "Creating types definitions for $($types.Count) types." - foreach($type in $types) { - Write-Host "- Generating type for $type" - if($type.contains("+")){ - $type = $type.Substring(0,$type.IndexOf("+")) - Write-Host "- Real type is $type" - } - $object = New-Object -TypeName $type - $namespaceNew = $object.GetType().Namespace - $enumsDefined = @() + foreach ($type in $types) { + Write-Host "- Generating type for $type" + if ($type.contains('+')) { + $type = $type.Substring(0, $type.IndexOf('+')) + Write-Host "- Real type is $type" + } + $object = New-Object -TypeName $type + $namespaceNew = $object.GetType().Namespace + $enumsDefined = @() - if($namespace -ne $namespaceNew){ - if($null -ne $namespace){ - $def += @" + if ($namespace -ne $namespaceNew) { + if ($null -ne $namespace) { + $def += @" } namespace $namespaceNew @@ -401,117 +397,113 @@ namespace $namespaceNew using System.Linq; "@ - } - else { - $def += @" + } else { + $def += @" namespace $namespaceNew { using System.Linq; - -"@ + +"@ + } + $namespace = $object.GetType().Namespace } - $namespace = $object.GetType().Namespace - } - $name = $object.GetType().Name - if($object.GetType().IsEnum){ $name = $object.GetType().Name - if(!$enumsDefined.Contains($name)){ - $def += $this.GetEnumString($name, $object.GetType().FullName) - $enumsDefined += $name - continue - } - } - $def += @" + if ($object.GetType().IsEnum) { + $name = $object.GetType().Name + if (!$enumsDefined.Contains($name)) { + $def += $this.GetEnumString($name, $object.GetType().FullName) + $enumsDefined += $name + continue + } + } + $def += @" public class $name { "@ - if($this.TypeCustomizations.ContainsKey($object.GetType().FullName)){ - $extraFunctions = $this.TypeCustomizations[$object.GetType().FullName] - $def += @" + if ($this.TypeCustomizations.ContainsKey($object.GetType().FullName)) { + $extraFunctions = $this.TypeCustomizations[$object.GetType().FullName] + $def += @" $extraFunctions } "@ - } - else { - - $object.GetType().GetProperties() | ForEach-Object { - if($_.PropertyType.Name -eq 'Nullable`1') { - $name = $_.PropertyType.GenericTypeArguments.FullName - if($_.PropertyType.GenericTypeArguments.IsEnum){ - $name = $_.PropertyType.GenericTypeArguments.Name - if(!$enumsDefined.Contains($name)){ - $def += $this.GetEnumString($name, $_.PropertyType.GenericTypeArguments.FullName) - $enumsDefined += $name - } - } - $name = "System.Nullable<$($name)>" - } - elseif ($_.PropertyType.Name -eq 'List`1') { - $name = $_.PropertyType.GenericTypeArguments.FullName - if($_.PropertyType.GenericTypeArguments.IsEnum){ - $name = $_.PropertyType.GenericTypeArguments.Name - if(!$enumsDefined.Contains($name)){ - $def += $this.GetEnumString($name, $_.PropertyType.GenericTypeArguments.FullName) - $enumsDefined += $name + } else { + + $object.GetType().GetProperties() | ForEach-Object { + if ($_.PropertyType.Name -eq 'Nullable`1') { + $name = $_.PropertyType.GenericTypeArguments.FullName + if ($_.PropertyType.GenericTypeArguments.IsEnum) { + $name = $_.PropertyType.GenericTypeArguments.Name + if (!$enumsDefined.Contains($name)) { + $def += $this.GetEnumString($name, $_.PropertyType.GenericTypeArguments.FullName) + $enumsDefined += $name + } + } + $name = "System.Nullable<$($name)>" + } elseif ($_.PropertyType.Name -eq 'List`1') { + $name = $_.PropertyType.GenericTypeArguments.FullName + if ($_.PropertyType.GenericTypeArguments.IsEnum) { + $name = $_.PropertyType.GenericTypeArguments.Name + if (!$enumsDefined.Contains($name)) { + $def += $this.GetEnumString($name, $_.PropertyType.GenericTypeArguments.FullName) + $enumsDefined += $name + } + } + $name = "System.Collections.Generic.List<$($name)>" + } else { + $name = $_.PropertyType.FullName + if ($_.PropertyType.IsEnum) { + $name = $_.PropertyType.Name + if (!$enumsDefined.Contains($name)) { + $def += $this.GetEnumString($name, $_.PropertyType.FullName) + $enumsDefined += $name + } + } } + $def += " public $($name) $($_.Name);`n" } - $name = "System.Collections.Generic.List<$($name)>" - } - else { - $name = $_.PropertyType.FullName - if($_.PropertyType.IsEnum){ - $name = $_.PropertyType.Name - if(!$enumsDefined.Contains($name)){ - $def += $this.GetEnumString($name, $_.PropertyType.FullName) - $enumsDefined += $name - } - } - } - $def += " public $($name) $($_.Name);`n" - } - $constructor = "" + $constructor = '' - if(1 -eq $object.GetType().GetProperties().Count){ + if (1 -eq $object.GetType().GetProperties().Count) { - $constructor = @" + $constructor = @" public $($object.GetType().Name)() - { + { } - + public $($object.GetType().Name)($name value) { $($object.GetType().GetProperties()[0].Name) = value; } "@ - } + } - $def += @" + $def += @" $constructor } "@ + } } - } - $def += @" + $def += @' } -"@ +'@ $def += @" `"@ try{ Add-Type -TypeDefinition `$def } - catch{} + catch { Write-Error $_.Exception.Message } # ------------------------------------------------------------------------------ -# End of Type definitios required for commands inputs +# End of Type definitions required for commands inputs # ------------------------------------------------------------------------------ "@ @@ -523,140 +515,134 @@ public $($object.GetType().Name)() public enum $($enumName){ "@ - [enum]::getvalues([type]$enumType) | ForEach-Object { - $def += " $_ = $($_.value__),`n" - } - $def += @" + [enum]::GetValues([type]$enumType) | ForEach-Object { + $def += " $_ = $($_.value__),`n" + } + $def += @' } -"@ +'@ return $def } hidden WriteModuleManifest() { - $settingPath = join-path $this.BasePath "./config/ModuleMetadata.json" + $settingPath = Join-Path $this.BasePath './config/ModuleMetadata.json' $files = @("$($this.ModuleName).psd1", "$($this.ModuleName).psm1", "$($this.ModuleName)-Help.xml") $content = Get-Content -Path $settingPath | ConvertFrom-Json $PSData = @{ - Tags = $($content.tags) - LicenseUri = $($content.licenseUri) - ProjectUri = $($content.projectUri) - IconUri = $($content.iconUri) + Tags = $($content.tags) + LicenseUri = $($content.licenseUri) + ProjectUri = $($content.projectUri) + IconUri = $($content.iconUri) ReleaseNotes = $($content.releaseNotes) - Prerelease = $null + Prerelease = $null } - $manisfestPath = Join-Path $this.OutputFolder "$($this.ModuleName).psd1" - $functions = $this.ModuleMap.CommandsList + "Enable-EntraAzureADAlias" + "Get-EntraUnsupportedCommand" + $manifestPath = Join-Path $this.OutputFolder "$($this.ModuleName).psd1" + $functions = $this.ModuleMap.CommandsList + 'Enable-EntraAzureADAlias' + 'Get-EntraUnsupportedCommand' $requiredModules = @() - foreach($module in $content.requiredModules){ - $requiredModules += @{ModuleName = $module; RequiredVersion = $content.requiredModulesVersion} + foreach ($module in $content.requiredModules) { + $requiredModules += @{ModuleName = $module; RequiredVersion = $content.requiredModulesVersion } } $moduleSettings = @{ - Path = $manisfestPath - GUID = $($content.guid) - ModuleVersion = "$($content.version)" - FunctionsToExport = $functions - CmdletsToExport=@() - AliasesToExport=@() - Author = $($content.authors) - CompanyName = $($content.owners) - FileList = $files - RootModule = "$($this.ModuleName).psm1" - Description = 'Microsoft Graph Entra PowerShell.' - DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) - PowerShellVersion = $([System.Version]::Parse('5.1')) - CompatiblePSEditions = @('Desktop','Core') - RequiredModules = $requiredModules - NestedModules = @() + Path = $manifestPath + GUID = $($content.guid) + ModuleVersion = "$($content.version)" + FunctionsToExport = $functions + CmdletsToExport = @() + AliasesToExport = @() + Author = $($content.authors) + CompanyName = $($content.owners) + FileList = $files + RootModule = "$($this.ModuleName).psm1" + Description = 'Microsoft Graph Entra PowerShell.' + DotNetFrameworkVersion = $([System.Version]::Parse('4.7.2')) + PowerShellVersion = $([System.Version]::Parse('5.1')) + CompatiblePSEditions = @('Desktop', 'Core') + RequiredModules = $requiredModules + NestedModules = @() } - - if($null -ne $content.Prerelease){ + + if ($null -ne $content.Prerelease) { $PSData.Prerelease = $content.Prerelease } - $this.LoadMessage = $this.LoadMessage.Replace("{VERSION}", $content.version) + $this.LoadMessage = $this.LoadMessage.Replace('{VERSION}', $content.version) New-ModuleManifest @moduleSettings - Update-ModuleManifest -Path $manisfestPath -PrivateData $PSData + Update-ModuleManifest -Path $manifestPath -PrivateData $PSData } # Creates the ModuleMap object, this is mainly used by other methods but can be called when debugging or finding missing cmdlets - hidden [MappedCmdCollection] Map(){ + hidden [MappedCmdCollection] Map() { $this.ModuleMap = [MappedCmdCollection]::new($this.ModuleName) - $originalCmdlets = $this.GetModuleCommands($this.SourceModuleName, $this.SourceModulePrefixs, $true) - $targetCmdlets = $this.GetModuleCommands($this.DestinationModuleName, $this.DestinationPrefixs, $true) + $originalCmdlets = $this.GetModuleCommands($this.SourceModuleName, $this.SourceModulePrefixes, $true) + $targetCmdlets = $this.GetModuleCommands($this.DestinationModuleName, $this.DestinationPrefixes, $true) $newCmdletData = @() $cmdletsToExport = @() $missingCmdletsToExport = @() - if('Microsoft.Graph.Entra' -eq $this.ModuleName){ - $cmdletsToSkip = @("Add-AzureADMSApplicationOwner", "Get-AzureADMSApplication", "Get-AzureADMSApplicationExtensionProperty", "Get-AzureADMSApplicationOwner", "New-AzureADApplication", "New-AzureADMSApplicationExtensionProperty", "Remove-AzureADMSApplication", "Remove-AzureADMSApplicationExtensionProperty", "Remove-AzureADMSApplicationOwner", "Set-AzureADApplication", "Set-AzureADMSApplicationLogo", "Get-AzureADMSGroup", "New-AzureADGroup", "Remove-AzureADMSGroup", "Set-AzureADGroup") - } - else{ - $cmdletsToSkip = @("Add-AzureADMSAdministrativeUnitMember", "Add-AzureADMSScopedRoleMembership", "Get-AzureADMSAdministrativeUnit", "Get-AzureADMSAdministrativeUnitMember", "Get-AzureADMSScopedRoleMembership", "New-AzureADAdministrativeUnit", "Remove-AzureADMSAdministrativeUnit", "Remove-AzureADMSAdministrativeUnitMember", "Remove-AzureADMSScopedRoleMembership", "Set-AzureADAdministrativeUnit", "Add-AzureADMSApplicationOwner", "Get-AzureADMSApplication", "Get-AzureADMSApplicationExtensionProperty", "Get-AzureADMSApplicationOwner", "New-AzureADApplication","New-AzureADMSApplicationExtensionProperty","Remove-AzureADMSApplication","Remove-AzureADMSApplicationExtensionProperty","Remove-AzureADMSApplicationOwner","Set-AzureADApplication","Set-AzureADMSApplicationLogo","Get-AzureADMSGroup","New-AzureADGroup","Remove-AzureADMSGroup","Set-AzureADGroup","Get-AzureADMSPrivilegedRoleAssignment","Get-AzureADMSServicePrincipal","Set-AzureADMSServicePrincipal","Get-AzureADMSUser","Set-AzureADMSUser","New-AzureADMSUser","New-AzureADMSServicePrincipal") + if ('Microsoft.Graph.Entra' -eq $this.ModuleName) { + $cmdletsToSkip = @('Add-AzureADMSApplicationOwner', 'Get-AzureADMSApplication', 'Get-AzureADMSApplicationExtensionProperty', 'Get-AzureADMSApplicationOwner', 'New-AzureADApplication', 'New-AzureADMSApplicationExtensionProperty', 'Remove-AzureADMSApplication', 'Remove-AzureADMSApplicationExtensionProperty', 'Remove-AzureADMSApplicationOwner', 'Set-AzureADApplication', 'Set-AzureADMSApplicationLogo', 'Get-AzureADMSGroup', 'New-AzureADGroup', 'Remove-AzureADMSGroup', 'Set-AzureADGroup') + } else { + $cmdletsToSkip = @('Add-AzureADMSAdministrativeUnitMember', 'Add-AzureADMSScopedRoleMembership', 'Get-AzureADMSAdministrativeUnit', 'Get-AzureADMSAdministrativeUnitMember', 'Get-AzureADMSScopedRoleMembership', 'New-AzureADAdministrativeUnit', 'Remove-AzureADMSAdministrativeUnit', 'Remove-AzureADMSAdministrativeUnitMember', 'Remove-AzureADMSScopedRoleMembership', 'Set-AzureADAdministrativeUnit', 'Add-AzureADMSApplicationOwner', 'Get-AzureADMSApplication', 'Get-AzureADMSApplicationExtensionProperty', 'Get-AzureADMSApplicationOwner', 'New-AzureADApplication', 'New-AzureADMSApplicationExtensionProperty', 'Remove-AzureADMSApplication', 'Remove-AzureADMSApplicationExtensionProperty', 'Remove-AzureADMSApplicationOwner', 'Set-AzureADApplication', 'Set-AzureADMSApplicationLogo', 'Get-AzureADMSGroup', 'New-AzureADGroup', 'Remove-AzureADMSGroup', 'Set-AzureADGroup', 'Get-AzureADMSPrivilegedRoleAssignment', 'Get-AzureADMSServicePrincipal', 'Set-AzureADMSServicePrincipal', 'Get-AzureADMSUser', 'Set-AzureADMSUser', 'New-AzureADMSUser', 'New-AzureADMSServicePrincipal') } - foreach ($cmd in $originalCmdlets.Keys){ + foreach ($cmd in $originalCmdlets.Keys) { if ($cmdletsToSkip -contains $cmd) { continue } $originalCmdlet = $originalCmdlets[$cmd] $newFunction = $this.GetNewCmdTranslation($cmd, $originalCmdlet, $targetCmdlets, $this.NewPrefix) - if($newFunction){ + if ($newFunction) { $newCmdletData += $newFunction - $cmdletsToExport += $newFunction.Generate - } - else{ - $missingCmdletsToExport += $cmd + $cmdletsToExport += $newFunction.Generate + } else { + $missingCmdletsToExport += $cmd $this.MissingCommandsToMap += $cmd - } + } } - foreach($function in $this.HelperCmdletsToExport.GetEnumerator()){ + foreach ($function in $this.HelperCmdletsToExport.GetEnumerator()) { $cmdletsToExport += $function.Key } - + $this.ModuleMap.CommandsList = $cmdletsToExport $this.ModuleMap.MissingCommandsList = $missingCmdletsToExport $this.ModuleMap.Commands = $this.NewModuleMap($newCmdletData) return $this.ModuleMap - } + } - hidden [scriptblock] GetUnsupportedCommand(){ - $unsupported = @" + hidden [scriptblock] GetUnsupportedCommand() { + $unsupported = @' function Get-EntraUnsupportedCommand { Throw [System.NotSupportedException] "This command is not supported by Microsoft Entra PowerShell." } -"@ +'@ return [scriptblock]::Create($unsupported) } - hidden [scriptblock] GetAlisesFunction() { - if($this.ModuleMap){ + hidden [scriptblock] GetAliasesFunction() { + if ($this.ModuleMap) { $aliases = '' - foreach ($func in $this.ModuleMap.Commands) { + foreach ($func in $this.ModuleMap.Commands) { $aliases += " Set-Alias -Name $($func.SourceName) -Value $($func.Name) -Scope Global -Force`n" } foreach ($func in $this.MissingCommandsToMap) { $aliases += " Set-Alias -Name $($func) -Value Get-EntraUnsupportedCommand -Scope Global -Force`n" } - - #Adding direct aliases - $aliasDefinitionsPath ="" - if($this.ModuleName -eq 'Microsoft.Graph.Entra') - { + + #Adding direct aliases + $aliasDefinitionsPath = '' + if ($this.ModuleName -eq 'Microsoft.Graph.Entra') { $aliasDefinitionsPath = "$PSScriptRoot/EntraAliasDefinitions.ps1" - } - elseif ($this.ModuleName -eq 'Microsoft.Graph.Entra.Beta') { + } elseif ($this.ModuleName -eq 'Microsoft.Graph.Entra.Beta') { $aliasDefinitionsPath = "$PSScriptRoot/EntraBetaAliasDefinitions.ps1" } - #Adding direct aliases - $aliasDefinitionsPath ="" - if($this.ModuleName -eq 'Microsoft.Graph.Entra') - { + #Adding direct aliases + $aliasDefinitionsPath = '' + if ($this.ModuleName -eq 'Microsoft.Graph.Entra') { $aliasDefinitionsPath = "$PSScriptRoot/EntraAliasDefinitions.ps1" - } - elseif ($this.ModuleName -eq 'Microsoft.Graph.Entra.Beta') { + } elseif ($this.ModuleName -eq 'Microsoft.Graph.Entra.Beta') { $aliasDefinitionsPath = "$PSScriptRoot/EntraBetaAliasDefinitions.ps1" } @@ -665,7 +651,7 @@ function Get-EntraUnsupportedCommand { $aliases += $directAliases # Append the content to $aliases } - $aliasFunction = @" + $aliasFunction = @" function Enable-EntraAzureADAlias { $($aliases)} @@ -676,10 +662,10 @@ $($aliases)} return $null } - hidden [scriptblock] GetExportMemeber() { + hidden [scriptblock] GetExportMember() { $CommandsToExport = $this.ModuleMap.CommandsList - $CommandsToExport += "Get-EntraUnsupportedCommand" - $CommandsToExport += "Enable-EntraAzureADAlias" + $CommandsToExport += 'Get-EntraUnsupportedCommand' + $CommandsToExport += 'Enable-EntraAzureADAlias' $functionsToExport = @" Export-ModuleMember -Function @( @@ -700,31 +686,29 @@ Set-Variable -name MISSING_CMDS -value @('$($this.ModuleMap.MissingCommandsList hidden [CommandTranslation[]] NewModuleMap([PSCustomObject[]] $Commands) { [CommandTranslation[]] $translations = @() - foreach($Command in $Commands){ - if('' -eq $command.New){ + foreach ($Command in $Commands) { + if ('' -eq $command.New) { $translations += $this.NewCustomFunctionMap($Command) - } - else { + } else { $translations += $this.NewFunctionMap($Command) - } + } } return $translations } - hidden [CommandTranslation] NewCustomFunctionMap([PSCustomObject] $Command){ + hidden [CommandTranslation] NewCustomFunctionMap([PSCustomObject] $Command) { Write-Host "Creating custom function map for $($Command.Generate)" $parameterDefinitions = $this.GetParametersDefinitions($Command) - $ParamterTransformations = $this.GetParametersTransformations($Command) + $ParameterTransformations = $this.GetParametersTransformations($Command) $OutputTransformations = $this.GetOutputTransformations($Command) - if (($this.cmdtoSkipNameconverssion -notcontains $Command.Generate) -and ($parameterDefinitions.Contains('$ObjectId') -or $parameterDefinitions.Contains('$Id'))) { + if (($this.cmdToSkipNameConversion -notcontains $Command.Generate) -and ($parameterDefinitions.Contains('$ObjectId') -or $parameterDefinitions.Contains('$Id'))) { $function = @" function $($Command.Generate) { -$($Command.CustomScript) +$($Command.CustomScript) } "@ - } - else { + } else { $function = @" function $($Command.Generate) { [CmdletBinding($($Command.DefaultParameterSet))] @@ -732,63 +716,61 @@ function $($Command.Generate) { $parameterDefinitions ) -$($Command.CustomScript) +$($Command.CustomScript) } -"@ +"@ } $codeBlock = [Scriptblock]::Create($function) - return [CommandTranslation]::New($Command.Generate,$Command.Old,$codeBlock) + return [CommandTranslation]::New($Command.Generate, $Command.Old, $codeBlock) } - hidden [CommandTranslation] NewFunctionMap([PSCustomObject] $Command){ + hidden [CommandTranslation] NewFunctionMap([PSCustomObject] $Command) { Write-Host "Creating new function for $($Command.Generate)" - - $cmdLstToSkipKeyIdpair=@( - "Get-EntraGroup", - "Get-EntraServicePrincipalDelegatedPermissionClassification", - "Get-EntraApplication", - "Get-EntraDeletedApplication", - "Get-EntraDeletedGroup", - "Get-EntraBetaDeletedGroup", - "Get-EntraRoleAssignment", - "Get-EntraContact", - "Get-EntraRoleDefinition", - "Get-EntraContract", - "Get-EntraDevice", - "Get-EntraDirectoryRole", - "Get-EntraServicePrincipal", - "Get-EntraAdministrativeUnit", - "Get-EntraDirectoryRoleAssignment", - "Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue", - "Get-EntraBetaFeatureRolloutPolicy", - "Get-EntraBetaGroup", - "Get-EntraBetaPrivilegedResource", - "Get-EntraBetaServicePrincipal", - "Get-EntraBetaAdministrativeUnit", - "Get-EntraBetaAdministrativeUnit", - "Get-EntraBetaDevice", - "Get-EntraBetaPrivilegedRoleDefinition" + + $cmdLstToSkipKeyIdpair = @( + 'Get-EntraGroup', + 'Get-EntraServicePrincipalDelegatedPermissionClassification', + 'Get-EntraApplication', + 'Get-EntraDeletedApplication', + 'Get-EntraDeletedGroup', + 'Get-EntraBetaDeletedGroup', + 'Get-EntraRoleAssignment', + 'Get-EntraContact', + 'Get-EntraRoleDefinition', + 'Get-EntraContract', + 'Get-EntraDevice', + 'Get-EntraDirectoryRole', + 'Get-EntraServicePrincipal', + 'Get-EntraAdministrativeUnit', + 'Get-EntraDirectoryRoleAssignment', + 'Get-EntraBetaCustomSecurityAttributeDefinitionAllowedValue', + 'Get-EntraBetaFeatureRolloutPolicy', + 'Get-EntraBetaGroup', + 'Get-EntraBetaPrivilegedResource', + 'Get-EntraBetaServicePrincipal', + 'Get-EntraBetaAdministrativeUnit', + 'Get-EntraBetaAdministrativeUnit', + 'Get-EntraBetaDevice', + 'Get-EntraBetaPrivilegedRoleDefinition' ) - - + + $parameterDefinitions = $this.GetParametersDefinitions($Command) - $ParamterTransformations = $this.GetParametersTransformations($Command) + $ParameterTransformations = $this.GetParametersTransformations($Command) $OutputTransformations = $this.GetOutputTransformations($Command) - - if($cmdLstToSkipKeyIdpair.Contains($Command.Generate)) { - + + if ($cmdLstToSkipKeyIdpair.Contains($Command.Generate)) { + $keyId = $this.GetKeyIdPair($Command) + } else { + $keyId = '' } - else { - $keyId='' - } - - $customHeadersCommandName = "New-EntraCustomHeaders" - if($this.ModuleName -eq 'Microsoft.Graph.Entra.Beta') - { - $customHeadersCommandName = "New-EntraBetaCustomHeaders" + $customHeadersCommandName = 'New-EntraCustomHeaders' + + if ($this.ModuleName -eq 'Microsoft.Graph.Entra.Beta') { + $customHeadersCommandName = 'New-EntraBetaCustomHeaders' } $function = @" @@ -798,15 +780,15 @@ function $($Command.Generate) { $parameterDefinitions ) - PROCESS { + PROCESS { `$params = @{} `$customHeaders = $customHeadersCommandName -Command `$MyInvocation.MyCommand $($keyId) -$ParamterTransformations +$ParameterTransformations Write-Debug("============================ TRANSFORMATIONS ============================") `$params.Keys | ForEach-Object {"`$_ : `$(`$params[`$_])" } | Write-Debug Write-Debug("=========================================================================``n") - + `$response = $($Command.New) @params -Headers `$customHeaders $OutputTransformations `$response @@ -815,77 +797,76 @@ $OutputTransformations "@ $codeBlock = [Scriptblock]::Create($function) - return [CommandTranslation]::New($Command.Generate,$Command.Old,$codeBlock) + return [CommandTranslation]::New($Command.Generate, $Command.Old, $codeBlock) } - hidden [string] GetParametersDefinitions([PSCustomObject] $Command) { - $commonParameterNames = @("ProgressAction","Verbose", "Debug","ErrorAction", "ErrorVariable", "WarningAction", "WarningVariable", "OutBuffer", "PipelineVariable", "OutVariable", "InformationAction", "InformationVariable","WhatIf","Confirm") - $ignorePropertyParameter = @("Get-EntraBetaApplicationPolicy", "Get-EntraBetaApplicationSignInSummary","Get-EntraBetaPrivilegedRoleAssignment","Get-EntraBetaTrustFrameworkPolicy","Get-EntraBetaPolicy","Get-EntraBetaPolicyAppliedObject","Get-EntraBetaServicePrincipalPolicy","Get-EntraApplicationLogo","Get-EntraBetaApplicationLogo","Get-EntraApplicationKeyCredential","Get-EntraBetaApplicationKeyCredential","Get-EntraBetaServicePrincipalKeyCredential","Get-EntraBetaServicePrincipalPasswordCredential","Get-EntraServicePrincipalKeyCredential","Get-EntraServicePrincipalPasswordCredential") + hidden [string] GetParametersDefinitions([PSCustomObject] $Command) { + $commonParameterNames = @('ProgressAction', 'Verbose', 'Debug', 'ErrorAction', 'ErrorVariable', 'WarningAction', 'WarningVariable', 'OutBuffer', 'PipelineVariable', 'OutVariable', 'InformationAction', 'InformationVariable', 'WhatIf', 'Confirm') + $ignorePropertyParameter = @('Get-EntraBetaApplicationPolicy', 'Get-EntraBetaApplicationSignInSummary', 'Get-EntraBetaPrivilegedRoleAssignment', 'Get-EntraBetaTrustFrameworkPolicy', 'Get-EntraBetaPolicy', 'Get-EntraBetaPolicyAppliedObject', 'Get-EntraBetaServicePrincipalPolicy', 'Get-EntraApplicationLogo', 'Get-EntraBetaApplicationLogo', 'Get-EntraApplicationKeyCredential', 'Get-EntraBetaApplicationKeyCredential', 'Get-EntraBetaServicePrincipalKeyCredential', 'Get-EntraBetaServicePrincipalPasswordCredential', 'Get-EntraServicePrincipalKeyCredential', 'Get-EntraServicePrincipalPasswordCredential') $params = $(Get-Command -Name $Command.Old).Parameters $paramsList = @() - $ParamAlias=$null + $ParamAlias = $null foreach ($paramKey in $Command.Parameters.Keys) { - if($commonParameterNames.Contains($paramKey)) { + if ($commonParameterNames.Contains($paramKey)) { continue } $targetParam = $Command.Parameters[$paramKey] $param = $params[$paramKey] $paramType = $param.ParameterType.ToString() - $paramtypeToCreate = $param.ParameterType.ToString() - if($param.Name -eq 'All'){ - $paramType = "switch" + $paramTypeToCreate = $param.ParameterType.ToString() + if ($param.Name -eq 'All') { + $paramType = 'switch' } - - if( ($this.cmdtoSkipNameconverssion -notcontains $Command.Generate) -and (($param.Name -eq 'ObjectId' -or $param.Name -eq 'Id') -and $null -ne $targetParam.TargetName)){ + + if ( ($this.cmdToSkipNameConversion -notcontains $Command.Generate) -and (($param.Name -eq 'ObjectId' -or $param.Name -eq 'Id') -and $null -ne $targetParam.TargetName)) { if ($targetParam.TargetName) { $ParamAlias = $this.GetParameterAlias($param.Name) $param.Name = $targetParam.TargetName - } - } - if(($null -ne $this.TypePrefix) -and ($paramType -like "*$($this.TypePrefix)*")){ - if($paramType -like "*List*"){ - $paramType = "System.Collections.Generic.List``1[$($param.ParameterType.GenericTypeArguments.FullName)]" - $paramtypeToCreate = $param.ParameterType.GenericTypeArguments.FullName } - elseif($paramType -like "*Nullable*"){ + } + if (($null -ne $this.TypePrefix) -and ($paramType -like "*$($this.TypePrefix)*")) { + if ($paramType -like '*List*') { + $paramType = "System.Collections.Generic.List``1[$($param.ParameterType.GenericTypeArguments.FullName)]" + $paramTypeToCreate = $param.ParameterType.GenericTypeArguments.FullName + } elseif ($paramType -like '*Nullable*') { $paramType = "System.Nullable``1[$($param.ParameterType.GenericTypeArguments.FullName)]" - $paramtypeToCreate = $param.ParameterType.GenericTypeArguments.FullName + $paramTypeToCreate = $param.ParameterType.GenericTypeArguments.FullName + } + if (!$this.TypesToCreate.Contains($paramTypeToCreate)) { + $this.TypesToCreate += $paramTypeToCreate } - if(!$this.TypesToCreate.Contains($paramtypeToCreate)) { - $this.TypesToCreate += $paramtypeToCreate - } - } + } $paramBlock = @" - $ParamAlias + $ParamAlias $($this.GetParameterAttributes($Param))[$($paramType)] `$$($param.Name) "@ $paramsList += $paramBlock - $ParamAlias=$null + $ParamAlias = $null } $addProperty = $true - if('' -ne $Command.New){ + if ('' -ne $Command.New) { $addProperty = $false - $targetCmdparams = $(Get-Command -Name $Command.New).Parameters.Keys - if($null -ne $targetCmdparams){ - foreach($param in $targetCmdparams) { - if($param -eq 'Property') { + $targetCmdParams = $(Get-Command -Name $Command.New).Parameters.Keys + if ($null -ne $targetCmdParams) { + foreach ($param in $targetCmdParams) { + if ($param -eq 'Property') { $addProperty = $true break } - } - } + } + } } - if("Get" -eq $Command.Verb -and !$ignorePropertyParameter.Contains($Command.Generate) -and $addProperty){ + if ('Get' -eq $Command.Verb -and !$ignorePropertyParameter.Contains($Command.Generate) -and $addProperty) { $paramsList += $this.GetPropertyParameterBlock() } return $paramsList -Join ",`n" } - hidden [string] GetPropertyParameterBlock(){ - $propertyType = "System.String[]" + hidden [string] GetPropertyParameterBlock() { + $propertyType = 'System.String[]' $arrayAttrib = @() $arrayAttrib += "Mandatory = `$false" $arrayAttrib += "ValueFromPipeline = `$false" @@ -898,48 +879,44 @@ $OutputTransformations return $propertyParamBlock } - hidden [string] GetParameterAlias($param){ + hidden [string] GetParameterAlias($param) { return "[Alias('$param')]" } - hidden [string] GetParameterAttributes($param){ - $attributesString = "" + hidden [string] GetParameterAttributes($param) { + $attributesString = '' - foreach($attrib in $param.Attributes){ + foreach ($attrib in $param.Attributes) { $arrayAttrib = @() - + try { - if($attrib.ParameterSetName -ne "__AllParameterSets"){ + if ($attrib.ParameterSetName -ne '__AllParameterSets') { $arrayAttrib += "ParameterSetName = `"$($attrib.ParameterSetName)`"" } - } - catch {} - - try { - if($attrib.Mandatory){ + } catch {} + + try { + if ($attrib.Mandatory) { $arrayAttrib += "Mandatory = `$true" } - } - catch {} - - - try { - if($attrib.ValueFromPipeline){ + } catch {} + + + try { + if ($attrib.ValueFromPipeline) { $arrayAttrib += "ValueFromPipeline = `$true" } - } - catch {} - + } catch {} + try { - if($attrib.ValueFromPipelineByPropertyName){ + if ($attrib.ValueFromPipelineByPropertyName) { $arrayAttrib += "ValueFromPipelineByPropertyName = `$true" } - } - catch {} - + } catch {} + $strAttrib = $arrayAttrib -Join ', ' - if($strAttrib.Length -gt 0){ + if ($strAttrib.Length -gt 0) { $attributesString += "[Parameter($strAttrib)]`n " } } @@ -948,92 +925,87 @@ $OutputTransformations } hidden [string] GetParametersTransformations([PSCustomObject] $Command) { - $paramsList = "" + $paramsList = '' - foreach ($paramKey in $Command.Parameters.Keys) { + foreach ($paramKey in $Command.Parameters.Keys) { $param = $Command.Parameters[$paramKey] - $paramBlock = "" - - if([TransformationTypes]::None -eq $param.ConversionType){ + $paramBlock = '' + + if ([TransformationTypes]::None -eq $param.ConversionType) { $paramBlock = $this.GetParameterTransformationName($param.Name, $param.Name) - } - elseif([TransformationTypes]::Name -eq $param.ConversionType){ - if(($this.cmdtoSkipNameconverssion -notcontains $Command.Generate) -and ($param.Name -eq 'ObjectId' -or $param.Name -eq 'Id') -and $null -ne $param.TargetName){ + } elseif ([TransformationTypes]::Name -eq $param.ConversionType) { + if (($this.cmdToSkipNameConversion -notcontains $Command.Generate) -and ($param.Name -eq 'ObjectId' -or $param.Name -eq 'Id') -and $null -ne $param.TargetName) { $paramBlock = $this.GetParameterTransformationName($param.TargetName, $param.TargetName) - }else{ + } else { $paramBlock = $this.GetParameterTransformationName($param.Name, $param.TargetName) - } - } - elseif([TransformationTypes]::Bool2Switch -eq $param.ConversionType){ + } + } elseif ([TransformationTypes]::Bool2Switch -eq $param.ConversionType) { $paramBlock = $this.GetParameterTransformationBoolean2Switch($param.Name, $param.TargetName) - } - elseif([TransformationTypes]::SystemSwitch -eq $param.ConversionType){ + } elseif ([TransformationTypes]::SystemSwitch -eq $param.ConversionType) { $paramBlock = $this.GetParameterTransformationSystemSwitch($param.Name) - } - elseif([TransformationTypes]::ScriptBlock -eq $param.ConversionType){ + } elseif ([TransformationTypes]::ScriptBlock -eq $param.ConversionType) { $paramBlock = $this.GetParameterCustom($param) - } - elseif([TransformationTypes]::Remove -eq $param.ConversionType){ + } elseif ([TransformationTypes]::Remove -eq $param.ConversionType) { $paramBlock = $this.GetParameterException($param) } - - $paramsList += $paramBlock + + $paramsList += $paramBlock } - if("Get" -eq $Command.Verb){ - $paramsList += $this.GetCustomParameterTransformation("Property") + if ('Get' -eq $Command.Verb) { + $paramsList += $this.GetCustomParameterTransformation('Property') } - + return $paramsList } - hidden [string] GetKeyIdPair($Command){ + hidden [string] GetKeyIdPair($Command) { $keys = @() - foreach ($paramKey in $Command.Parameters.Keys) { + foreach ($paramKey in $Command.Parameters.Keys) { $param = $Command.Parameters[$paramKey] - if($param.NameChanged){ - if($param.Name -eq "ObjectId"){ + if ($param.NameChanged) { + if ($param.Name -eq 'ObjectId') { $keys += "$($param.Name) = `"Id`"" - } - elseif($param.Name -eq "Id"){ - } - else{ + } elseif ($param.Name -eq 'Id') { + } else { $keys += "$($param.Name) = `"$($param.TargetName)`"" } - } + } } - - return "`$keysChanged = @{$($keys -Join "; ")}" + + return "`$keysChanged = @{$($keys -Join '; ')}" } - hidden [string] GetParameterTransformationName([string] $OldName, [string] $NewName){ -# $paramBlock = @" -# if(`$null -ne `$PSBoundParameters["$($OldName)"]) -# { -# `$params["$($NewName)"] = `$PSBoundParameters["$($OldName)"] - -# } + hidden [string] GetParameterTransformationName([string] $OldName, [string] $NewName) { + # $paramBlock = @" + # if(`$null -ne `$PSBoundParameters["$($OldName)"]) + # { + # `$params["$($NewName)"] = `$PSBoundParameters["$($OldName)"] + + # } -# "@ - $paramBlock = if ($OldName -eq "Top") {@" + # "@ + $paramBlock = if ($OldName -eq 'Top') { + @" if (`$PSBoundParameters.ContainsKey(`"Top`")) { `$params["$($NewName)"] = `$PSBoundParameters["$($OldName)"] } "@ - } else {@" + } else { + @" if (`$null -ne `$PSBoundParameters["$($OldName)"]) { `$params["$($NewName)"] = `$PSBoundParameters["$($OldName)"] } "@ -} + } return $paramBlock } - hidden [string] GetParameterTransformationBoolean2Switch([string] $OldName, [string] $NewName){ + hidden [string] GetParameterTransformationBoolean2Switch([string] $OldName, [string] $NewName) { $paramBlock = @" if(`$null -ne `$PSBoundParameters["$($OldName)"]) { @@ -1047,7 +1019,7 @@ $OutputTransformations return $paramBlock } - hidden [string] GetParameterTransformationSystemSwitch([string] $Name){ + hidden [string] GetParameterTransformationSystemSwitch([string] $Name) { $paramBlock = @" if(`$PSBoundParameters.ContainsKey("$($Name)")) { @@ -1059,12 +1031,12 @@ $OutputTransformations } - hidden [string] GetParameterException([DataMap] $Param){ - $paramBlock = "" + hidden [string] GetParameterException([DataMap] $Param) { + $paramBlock = '' return $paramBlock } - hidden [string] GetParameterCustom([DataMap] $Param){ + hidden [string] GetParameterCustom([DataMap] $Param) { $paramBlock = @" if(`$null -ne `$PSBoundParameters["$($Param.Name)"]) { @@ -1077,7 +1049,7 @@ $OutputTransformations return $paramBlock } - hidden [string] GetCustomParameterTransformation([string] $ParameterName){ + hidden [string] GetCustomParameterTransformation([string] $ParameterName) { $paramBlock = @" if(`$null -ne `$PSBoundParameters["$($ParameterName)"]) { @@ -1087,43 +1059,39 @@ $OutputTransformations "@ return $paramBlock } - + hidden [string] GetOutputTransformations([PSCustomObject] $Command) { - $responseVerbs = @("Get","Add","New") - $output = "" - - if($this.CmdCustomizations.ContainsKey($Command.Old)) { - $cmd = $this.CmdCustomizations[$Command.Old] - if($null -ne $cmd.Outputs){ - foreach($key in $cmd.Outputs.GetEnumerator()) { - $customOutput = $cmd.Outputs[$key.Name] - if([TransformationTypes]::Name -eq $customOutput.ConversionType){ + $responseVerbs = @('Get', 'Add', 'New') + $output = '' + + if ($this.CmdCustomizations.ContainsKey($Command.Old)) { + $cmd = $this.CmdCustomizations[$Command.Old] + if ($null -ne $cmd.Outputs) { + foreach ($key in $cmd.Outputs.GetEnumerator()) { + $customOutput = $cmd.Outputs[$key.Name] + if ([TransformationTypes]::Name -eq $customOutput.ConversionType) { $output += $this.GetOutputTransformationName($customOutput.Name, $customOutput.TargetName) - } - elseif([TransformationTypes]::ScriptBlock -eq $customOutput.ConversionType){ + } elseif ([TransformationTypes]::ScriptBlock -eq $customOutput.ConversionType) { $output += $this.GetOutputTransformationCustom($customOutput) - } - elseif([TransformationTypes]::FlatObject -eq $customOutput.ConversionType){ + } elseif ([TransformationTypes]::FlatObject -eq $customOutput.ConversionType) { $output += $this.GetOutputTransformationFlatObject($customOutput) } } } } - - foreach($key in $this.GenericOutputTransformations.GetEnumerator()) { - $customOutput = $this.GenericOutputTransformations[$key.Name] - if(2 -eq $customOutput.ConversionType){ + + foreach ($key in $this.GenericOutputTransformations.GetEnumerator()) { + $customOutput = $this.GenericOutputTransformations[$key.Name] + if (2 -eq $customOutput.ConversionType) { $output += $this.GetOutputTransformationName($customOutput.Name, $customOutput.TargetName) - } - elseif([TransformationTypes]::ScriptBlock -eq $customOutput.ConversionType){ + } elseif ([TransformationTypes]::ScriptBlock -eq $customOutput.ConversionType) { $output += $this.GetOutputTransformationCustom($customOutput) - } - elseif([TransformationTypes]::FlatObject -eq $customOutput.ConversionType){ + } elseif ([TransformationTypes]::FlatObject -eq $customOutput.ConversionType) { $output += $this.GetOutputTransformationFlatObject($customOutput) } - } - - if("" -ne $output){ + } + + if ('' -ne $output) { $transform = @" `$response | ForEach-Object { if(`$null -ne `$_) { @@ -1133,19 +1101,19 @@ $($output) "@ return $transform } - return "" + return '' } - hidden [string] GetOutputTransformationName([string] $OldName, [string] $NewName){ - $outputBlock =@" + hidden [string] GetOutputTransformationName([string] $OldName, [string] $NewName) { + $outputBlock = @" Add-Member -InputObject `$_ -MemberType AliasProperty -Name $($NewName) -Value $($OldName) "@ return $outputBlock } - hidden [string] GetOutputTransformationCustom([DataMap] $Param){ - $outputBlock =@" + hidden [string] GetOutputTransformationCustom([DataMap] $Param) { + $outputBlock = @" $($Param.SpecialMapping) Add-Member -InputObject `$_ -MemberType ScriptProperty -Name $($Param.TargetName) -Value `$Value @@ -1153,218 +1121,209 @@ $($output) return $outputBlock } - hidden [string] GetOutputTransformationFlatObject([DataMap] $Param){ - $outputBlock =@" + hidden [string] GetOutputTransformationFlatObject([DataMap] $Param) { + $outputBlock = @" Add-Member -InputObject `$_ -NotePropertyMembers `$_.$($Param.Name) "@ return $outputBlock } - hidden [hashtable] GetModuleCommands([string[]] $ModuleNames, [string[]] $Prefix, [bool] $IgnoreEmptyNoun = $false){ - + hidden [hashtable] GetModuleCommands([string[]] $ModuleNames, [string[]] $Prefix, [bool] $IgnoreEmptyNoun = $false) { + $names = @() foreach ($moduleName in $ModuleNames) { $module = Get-Module -Name $moduleName $names += $module.ExportedCmdlets.Keys $names += $module.ExportedFunctions.Keys } - + $namesDic = @{} foreach ($name in $names) { $cmdComponents = $this.GetParsedCmd($name, $Prefix) - if(!$cmdComponents){ + if (!$cmdComponents) { $this.MissingCommandsToMap += $name continue } - if($IgnoreEmptyNoun -and !$cmdComponents.Noun) { + if ($IgnoreEmptyNoun -and !$cmdComponents.Noun) { continue } $namesDic.Add($name, $cmdComponents) } - + return $namesDic } - hidden [PSCustomObject] GetParsedCmd([string]$Name, [string[]]$Prefixs){ - foreach ($prefix in $Prefixs) { - $components = $name -split '-' + hidden [PSCustomObject] GetParsedCmd([string]$Name, [string[]]$Prefixes) { + foreach ($prefix in $Prefixes) { + $components = $name -split '-' $verb = $components[0] $prefixNoun = $components[1] $components = $prefixNoun -split $prefix - if($components.Length -eq 1) - { + if ($components.Length -eq 1) { continue } $noun = $prefixNoun.Substring($prefix.Length, $prefixNoun.Length - $prefix.Length) - + return [PSCustomObject] @{ - Verb = $verb - Noun = $noun + Verb = $verb + Noun = $noun Prefix = $prefix - } + } } return $null } - hidden [PSCustomObject] GetNewCmdTranslation($SourceCmdName, $SourceCmdlet, $TargetCmdlets, $NewPrefix){ + hidden [PSCustomObject] GetNewCmdTranslation($SourceCmdName, $SourceCmdlet, $TargetCmdlets, $NewPrefix) { $verbsEquivalence = @{ - 'Get' = @('Get') - 'New' = @('New','Add') - 'Add' = @('New','Add') - 'Remove' = @('Remove','Delete') - 'Delete' = @('Remove','Delete') - 'Set' = @('Set','Update') - 'Update' = @('Set','Update') + 'Get' = @('Get') + 'New' = @('New', 'Add') + 'Add' = @('New', 'Add') + 'Remove' = @('Remove', 'Delete') + 'Delete' = @('Remove', 'Delete') + 'Set' = @('Set', 'Update') + 'Update' = @('Set', 'Update') 'Confirm' = @('Confirm') - 'Enable' = @('New') + 'Enable' = @('New') } $targetCmd = $null - if($this.CmdCustomizations.ContainsKey($SourceCmdName)){ + if ($this.CmdCustomizations.ContainsKey($SourceCmdName)) { $targetCmd = $this.CmdCustomizations[$SourceCmdName].TargetName - } - else { - foreach ($prefix in $this.DestinationPrefixs){ - foreach ($verb in $verbsEquivalence[$SourceCmdlet.Verb]){ + } else { + foreach ($prefix in $this.DestinationPrefixes) { + foreach ($verb in $verbsEquivalence[$SourceCmdlet.Verb]) { $tmpCmd = "$($verb)-$($prefix)$($SourceCmdlet.Noun)" - if($TargetCmdlets.ContainsKey($tmpCmd)){ - $targetCmd = $tmpCmd; - break; + if ($TargetCmdlets.ContainsKey($tmpCmd)) { + $targetCmd = $tmpCmd + break } } } } - - if($null -ne $targetCmd){ - if($SourceCmdlet.Prefix.contains('MS')){ + + if ($null -ne $targetCmd) { + if ($SourceCmdlet.Prefix.contains('MS')) { $Prefix = $NewPrefix } else { $prefix = $NewPrefix } - $NewName = "" + $NewName = '' switch ($SourceCmdlet.Noun) { - "RoleDefinition" { $NewName = 'DirectoryRoleDefinition' } - "RoleAssignment" { $NewName = 'DirectoryRoleAssignment' } - "ServiceAppRoleAssignedTo" { $NewName = 'ServicePrincipalAppRoleAssignedTo' } - "ServiceAppRoleAssignment" { $NewName = 'ServicePrincipalAppRoleAssignment' } - "CustomSecurityAttributeDefinitionAllowedValues" { $NewName = 'CustomSecurityAttributeDefinitionAllowedValue' } - "AuditSignInLogs" { $NewName = 'AuditSignInLog' } - "AuditDirectoryLogs" { $NewName = 'AuditDirectoryLog' } + 'RoleDefinition' { $NewName = 'DirectoryRoleDefinition' } + 'RoleAssignment' { $NewName = 'DirectoryRoleAssignment' } + 'ServiceAppRoleAssignedTo' { $NewName = 'ServicePrincipalAppRoleAssignedTo' } + 'ServiceAppRoleAssignment' { $NewName = 'ServicePrincipalAppRoleAssignment' } + 'CustomSecurityAttributeDefinitionAllowedValues' { $NewName = 'CustomSecurityAttributeDefinitionAllowedValue' } + 'AuditSignInLogs' { $NewName = 'AuditSignInLog' } + 'AuditDirectoryLogs' { $NewName = 'AuditDirectoryLog' } default { $NewName = $SourceCmdlet.Noun } } $cmd = [PSCustomObject]@{ - Old = '{0}-{1}{2}' -f $SourceCmdlet.Verb, $SourceCmdlet.Prefix, $SourceCmdlet.Noun - New = $targetCmd - Generate = '{0}-{1}{2}' -f $SourceCmdlet.Verb, $Prefix, $NewName - Noun = $SourceCmdlet.Noun - Verb = $SourceCmdlet.Verb - Parameters = $null - DefaultParameterSet = "" - CustomScript = $null + Old = '{0}-{1}{2}' -f $SourceCmdlet.Verb, $SourceCmdlet.Prefix, $SourceCmdlet.Noun + New = $targetCmd + Generate = '{0}-{1}{2}' -f $SourceCmdlet.Verb, $Prefix, $NewName + Noun = $SourceCmdlet.Noun + Verb = $SourceCmdlet.Verb + Parameters = $null + DefaultParameterSet = '' + CustomScript = $null } - if('' -eq $targetCmd){ + if ('' -eq $targetCmd) { $cmd.CustomScript = $this.CmdCustomizations[$SourceCmdName].CustomScript } $cmd.Parameters = $this.GetCmdletParameters($cmd) - $defaulParam = $this.GetDefaultParameterSet($SourceCmdName) - $cmd.DefaultParameterSet = "DefaultParameterSetName = '$defaulParam'" + $defaultParam = $this.GetDefaultParameterSet($SourceCmdName) + $cmd.DefaultParameterSet = "DefaultParameterSetName = '$defaultParam'" return $cmd } return $null } - hidden [string] GetDefaultParameterSet($Cmdlet){ + hidden [string] GetDefaultParameterSet($Cmdlet) { $sourceCmd = Get-Command -Name $Cmdlet return $sourceCmd.DefaultParameterSet } - hidden [hashtable] GetCmdletParameters($Cmdlet){ - $Bool2Switch = @("All") - $SystemDebug = @("Verbose", "Debug") - $commonParameterNames = @("ErrorAction", "ErrorVariable", "WarningAction", "WarningVariable", "OutBuffer", "PipelineVariable", "OutVariable", "InformationAction", "InformationVariable") + hidden [hashtable] GetCmdletParameters($Cmdlet) { + $Bool2Switch = @('All') + $SystemDebug = @('Verbose', 'Debug') + $commonParameterNames = @('ErrorAction', 'ErrorVariable', 'WarningAction', 'WarningVariable', 'OutBuffer', 'PipelineVariable', 'OutVariable', 'InformationAction', 'InformationVariable') $sourceCmd = Get-Command -Name $Cmdlet.Old $targetCmd = $null - if('' -ne $Cmdlet.New){ - $targetCmd = Get-Command -Name $Cmdlet.New - } + if ('' -ne $Cmdlet.New) { + $targetCmd = Get-Command -Name $Cmdlet.New + } $paramsList = @{} foreach ($paramKey in $sourceCmd.Parameters.Keys) { $param = $sourceCmd.Parameters[$paramKey] $paramObj = [DataMap]::New($param.Name) - - if($this.CmdCustomizations.ContainsKey($Cmdlet.Old)) { + + if ($this.CmdCustomizations.ContainsKey($Cmdlet.Old)) { $custom = $this.CmdCustomizations[$Cmdlet.Old] - if(($null -ne $custom.Parameters) -and ($custom.Parameters.contains($param.Name))){ + if (($null -ne $custom.Parameters) -and ($custom.Parameters.contains($param.Name))) { $paramsList.Add($param.Name, $custom.Parameters[$param.Name]) continue } - if($custom.SpecialMapping) { - $paramObj.SetNone() + if ($custom.SpecialMapping) { + $paramObj.SetNone() $paramsList.Add($param.Name, $paramObj) continue } } - - if($this.GenericParametersTransformations.ContainsKey($param.Name)) { + + if ($this.GenericParametersTransformations.ContainsKey($param.Name)) { $genericParam = $this.GenericParametersTransformations[$param.Name] - if(5 -eq $genericParam.ConversionType){ + if (5 -eq $genericParam.ConversionType) { $tempName = "$($Cmdlet.Noun)$($genericParam.TargetName)" - if($targetCmd.Parameters.ContainsKey($tempName)){ + if ($targetCmd.Parameters.ContainsKey($tempName)) { $paramObj.SetTargetName($tempName) - } - elseif($targetCmd.Parameters.ContainsKey($genericParam.TargetName)){ + } elseif ($targetCmd.Parameters.ContainsKey($genericParam.TargetName)) { $paramObj.SetTargetName($genericParam.TargetName) - } - else - { + } else { foreach ($key in $targetCmd.Parameters.Keys) { - if($key.EndsWith($genericParam.TargetName)){ + if ($key.EndsWith($genericParam.TargetName)) { $paramObj.SetTargetName($key) break } } } - $paramsList.Add($paramObj.Name,$paramObj) - }else{ + $paramsList.Add($paramObj.Name, $paramObj) + } else { $paramsList.Add($genericParam.Name, $genericParam) - } + } continue } - - if($commonParameterNames.Contains($param.Name)) { + + if ($commonParameterNames.Contains($param.Name)) { $paramObj.SetNone() - } - elseif($Bool2Switch.Contains($param.Name)) { + } elseif ($Bool2Switch.Contains($param.Name)) { $paramObj.SetBool2Switch($param.Name) - } - elseif($SystemDebug.Contains($param.Name)) { + } elseif ($SystemDebug.Contains($param.Name)) { $paramObj.SetSystemSwitch($param.Name) - } - else - { - if($targetCmd.Parameters.ContainsKey($param.Name)){ - $paramObj.SetNone() + } else { + if ($targetCmd.Parameters.ContainsKey($param.Name)) { + $paramObj.SetNone() } } - - $paramsList.Add($paramObj.Name,$paramObj) + + $paramsList.Add($paramObj.Name, $paramObj) } - - return $paramsList + + return $paramsList } - hidden [string] GetFileHeader(){ - return @" + hidden [string] GetFileHeader() { + return @' # ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # ------------------------------------------------------------------------------ Set-StrictMode -Version 5 -"@ +'@ } } From 9debfeec8ed775fa45e9b3a733d2eb98c25bfec2 Mon Sep 17 00:00:00 2001 From: DButoyez Date: Thu, 23 Jan 2025 10:34:31 +0300 Subject: [PATCH 124/124] Add Entra User Sponsor Command --- .../Users/Get-EntraUserSponsor.ps1 | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 module/Entra/Microsoft.Entra/Users/Get-EntraUserSponsor.ps1 diff --git a/module/Entra/Microsoft.Entra/Users/Get-EntraUserSponsor.ps1 b/module/Entra/Microsoft.Entra/Users/Get-EntraUserSponsor.ps1 new file mode 100644 index 0000000000..c0686119f9 --- /dev/null +++ b/module/Entra/Microsoft.Entra/Users/Get-EntraUserSponsor.ps1 @@ -0,0 +1,87 @@ +function Get-EntraUserSponsor { + [CmdletBinding(DefaultParameterSetName = 'GetQuery')] + param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.String] $UserId, + [Parameter(ParameterSetName = "GetQuery", ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [System.Int32] $Top, + [Parameter(Mandatory = $false, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] + [switch] $All, + [Parameter(Mandatory = $false, ValueFromPipeline = $false, ValueFromPipelineByPropertyName = $true)] + [System.String[]] $Property + ) + + PROCESS { + $customHeaders = New-EntraCustomHeaders -Command $MyInvocation.MyCommand + $params = @{} + $Method = "GET" + $baseUri = 'https://graph.microsoft.com/v1.0/users' + $properties = '$select=*' + if($null -ne $PSBoundParameters["Property"]) + { + $selectProperties = $PSBoundParameters["Property"] + $selectProperties = $selectProperties -Join ',' + $properties = "`$select=$($selectProperties)" + } + if($null -ne $PSBoundParameters["UserId"]) + { + $params["UserId"] = $PSBoundParameters["UserId"] + $URI = "$baseUri/$($params.UserId)/sponsors?$properties" + } + if($null -ne $PSBoundParameters["All"]) + { + $URI = "$baseUri/$($params.UserId)/sponsors?$properties" + } + if($PSBoundParameters.ContainsKey("Top")) + { + $topCount = $PSBoundParameters["Top"] + $URI = "$baseUri/$($params.UserId)/sponsors?`$top=$topCount&$properties" + } + Write-Debug("============================ TRANSFORMATIONS ============================") + $params.Keys | ForEach-Object {"$_ : $($params[$_])" } | Write-Debug + Write-Debug("=========================================================================`n") + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method | ConvertTo-Json -Depth 10 | ConvertFrom-Json + try { + $data = $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $directoryObjectList = @() + $all = $All.IsPresent + $increment = $topCount - $data.Count + + while ($response.'@odata.nextLink' -and (($all -and ($increment -lt 0)) -or $increment -gt 0)) { + $params["Uri"] = $response.'@odata.nextLink' + if ($increment -gt 0) { + $topValue = [Math]::Min($increment, 999) + $params["Uri"] = $params["Uri"].Replace('$top=999', "`$top=$topValue") + $increment -= $topValue + } + $response = Invoke-GraphRequest -Headers $customHeaders -Uri $URI -Method $Method | ConvertTo-Json -Depth 10 | ConvertFrom-Json + $data += $response.value | ConvertTo-Json -Depth 10 | ConvertFrom-Json + } + } catch {} + + foreach ($item in $data) { + if ($null -ne $item) { + # Determine the type based on @odata.type + switch ($item.'@odata.type') { + '#microsoft.graph.user' { + $directoryObject = [Microsoft.Graph.PowerShell.Models.MicrosoftGraphUser]::new() + } + '#microsoft.graph.group' { + $directoryObject = [Microsoft.Graph.PowerShell.Models.MicrosoftGraphGroup]::new() + } + default { + Write-Warning "Unknown type: $($item.'@odata.type')" + continue + } + } + $item.PSObject.Properties | ForEach-Object { + $propertyName = $_.Name + $propertyValue = $_.Value + $directoryObject | Add-Member -MemberType NoteProperty -Name $propertyName -Value $propertyValue -Force + } + $directoryObjectList += $directoryObject + } + } + $directoryObjectList + } +}